@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

html,
body {
    min-height: 100vh;
    height: 100vh;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: auto !important;
}

* {
    scroll-behavior: auto !important;
}

body {
    font-family: 'Inter', sans-serif;
    display: flex;
    flex-direction: column;
}

body .hero-image,
body .hero-image-mobile {
    display: flex;
    align-items: center;
    justify-content: center;
}

body .age-assessment-logo {
    height: 60px !important;
}

body .clock-container {
    position: relative;
    width: 500px;
    height: 500px;
    min-width: 500px;
    overflow: hidden;
}

/* Clock body image */
body .clock-body {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
}

/* Needle positioning */
body .needle-container {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
}

body .needle {
    position: absolute;
    top: 50%;
    left: 50%;
    transform-origin: center 75%;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

body .hour-hand,
body .hour-hand-mobile {
    width: 40px;
    height: 180px;
    margin-left: -4%;
    margin-top: -29%;
    transition: transform 0.5s cubic-bezier(0.4, 0.0, 0.2, 1);
}

body .minute-hand,
body .minute-hand-mobile {
    width: 60px;
    height: 245px;
    margin-left: 1%;
    margin-top: -13%;
    transition: transform 0.5s cubic-bezier(0.4, 0.0, 0.2, 1);
}

/* Center dot */
body .center-dot {
    position: absolute;
    width: 40px;
    height: 40px;
    background-color: black;
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
}

.hero-gradient {
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 1) 100%);
}

.fade-in {
    animation: fadeIn 0.8s ease-in-out;
}

.slide-up {
    animation: slideUp 0.8s ease-out;
}

.slide-in-left {
    animation: slideInLeft 0.8s ease-out;
}

.slide-out-right {
    animation: slideOutRight 0.5s ease-in-out forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(50px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideOutRight {
    from {
        opacity: 1;
        transform: translateX(0);
    }

    to {
        opacity: 0;
        transform: translateX(50px);
    }
}

/* Ensure main content takes remaining space */
main {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Content section transitions */
.content-section {
    transition: all 0.5s ease-in-out;
}

.content-hidden {
    display: none;
}

.content-visible {
    display: flex;
    justify-content: end;
}

.radio-option {
    position: relative;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 12px 16px 12px 48px;
    background: rgba(187, 187, 187, 0.15);
    border-radius: 15px;
    transition: all 0.3s ease;
    margin-bottom: 12px;
}

.radio-option:hover {
    background: rgb(255 255 255 / 7%);
}

.radio-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.result-title {
    color: rgb(255, 255, 255);
    font-size: 30px;
    font-weight: 400;
    margin: 60px 0px 15px;
}

.result-sub-title {
    color: rgb(255, 255, 255);
    font-size: 14px;
    font-weight: 400;
}

.radio-option .checkmark {
    position: absolute;
    top: 50%;
    left: 16px;
    transform: translateY(-50%);
    height: 18px;
    width: 18px;
    background-color: transparent;
    border: 0.5px solid #535862;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.radio-option.selected .checkmark {
    background-color: rgba(224, 224, 224, 0.15);
    border: 0.5px solid #1976d2;
}

.radio-option.selected .checkmark:after {
    content: "";
    position: absolute;
    display: block;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #1976d2;
}

.content-centered {
    display: flex;
    align-items: center !important;
    justify-content: center;
    min-height: 100vh;
    width: 100%;
}

.content-centered .content-wrapper {
    width: 100%;
    padding: 2rem;
    text-align: center;
}

#prev-btn-mobile,
#prev-btn {
    border: 1px solid #535862 !important;
}

#prev-btn:hover,
#next-btn:hover,
#prev-btn-mobile:hover,
#next-btn-mobile:hover {
    transform: scale(1.07);
    border: 1px solid #1976d2 !important;
}

.clock-nav-style {
    padding: 0px !important;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

/* Mobile responsiveness (below 1024px) */
@media (max-width: 1023px) {
    .content-centered .content-wrapper {
        padding: 1rem;
        max-width: 90%;
    }

    #results-content,
    #thankyou-content {
        display: none !important;
    }

    .content-visible {
        display: block !important;
    }

    /* Reduce clock size on mobile */
    body .clock-container {
        width: 220px;
        height: 220px;
        min-width: 220px;
    }

    body .hour-hand,
    body .hour-hand-mobile {
        width: 20px;
        height: 88px;
        margin-top: -33%;
    }

    body .minute-hand,
    body .minute-hand-mobile {
        width: 28px;
        height: 121px;
        margin-top: -17%;
    }

    body .center-dot {
        width: 20px;
        height: 20px;
    }

    /* Fix hero image mobile to prevent cutoff */
    .hero-image-mobile {
        height: auto;
        min-height: 250px;
        padding: 15px 0;
        margin-bottom: 30px;
        flex-shrink: 0;
    }

    /* Add bottom margin to dynamic content mobile */
    .dynamic-content-section-mobile {
        padding-bottom: 60px !important;
        overflow: visible !important;
    }

    /* Ensure main doesn't constrain height */
    main {
        min-height: auto;
        height: auto;
    }

    /* Mobile layout container should not be constrained */
    main>div {
        min-height: auto;
    }

    /* Ensure radio options are fully visible */
    .radio-option {
        margin-bottom: 15px;
    }
}

/* Desktop and larger screens */
@media (min-width: 1024px) {

    #results-content-mobile,
    #thankyou-content-mobile {
        display: none !important;
    }
}

/* Mid-size screens (1024px - 1300px) */
@media (max-width: 1300px) {
    body .clock-container {
        width: 300px;
        height: 300px;
        min-width: 300px;
    }

    body .hour-hand,
    body .hour-hand-mobile {
        width: 28px;
        height: 126px;
        margin-top: -31%;
    }

    body .minute-hand,
    body .minute-hand-mobile {
        width: 42px;
        height: 171px;
        margin-top: -15%;
    }

    body .center-dot {
        width: 28px;
        height: 28px;
    }
}


/* Extra small screens (mobile phones below 640px) */
@media (max-width: 380px) {
    body .clock-container {
        width: 200px;
        height: 200px;
        min-width: 200px;
    }

    body .hour-hand,
    body .hour-hand-mobile {
        width: 16px;
        height: 70px;
        margin-top: -29%;
    }

    body .minute-hand,
    body .minute-hand-mobile {
        width: 22px;
        height: 96px;
        margin-top: -14%;
    }

    body .center-dot {
        width: 16px;
        height: 16px;
    }

    .dynamic-content-section-mobile {
        padding-left: 16px !important;
        padding-right: 16px !important;
        padding-bottom: 40px !important;
        overflow: visible !important;
    }

    .content-centered .content-wrapper {
        padding: 0.75rem;
        max-width: 98%;
    }

    .hero-image-mobile {
        min-height: 210px;
        padding: 0;
        margin-bottom: 0px;
    }

    .radio-option {
        padding: 10px 14px 10px 44px;
        margin-bottom: 12px;
        font-size: 13px;
    }
}