@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&display=swap');

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: auto;
    overflow-anchor: auto;
}

html,
body {
    width: 100%;
    height: 100%;
}

body {
    font-family: 'Outfit', sans-serif;
    background: #f5f5f5;
    margin: 0;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    align-items: flex-start;
    justify-content: flex-start;
    color: #2d3748;
    position: relative;
    margin-top: 13rem;
    align-content: flex-start;

}

.container {
    max-width: 900px;
    width: calc(100% - 40px);
    margin: 0 auto 30px;
    background: #ffffff;
    border-radius: 32px;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.05), 0 10px 20px rgba(0, 0, 0, 0.02);
    overflow: visible;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.8);
    z-index: 10;
}

.header {
    text-align: right;
    padding: 50px 40px 30px;
    background: #ffffff;
    border-bottom: none;
    position: relative;
    display: flex;
    justify-content: flex-end;
    align-items: flex-end;
    flex-direction: column;
}

.header .logo {
    margin-left: auto;
    margin-right: 0;
}

.header p {
    text-align: right;
    margin-left: auto;
    margin-right: 0;
}

.logo {
    max-width: 200px;
    height: auto;
    margin-bottom: 10px;
    transition: transform 0.3s ease;
}

.logo:hover {
    transform: scale(1.02);
}

.header p {
    color: #718096;
    margin: 10px 0 0;
    font-size: 16px;
    font-weight: 500;
    letter-spacing: 0.5px;
}

/* Doctor Mascot Styles - Above Progress Bar */
.doctor-container {
    position: absolute;
    left: 40px;
    /* Left alignment balances the Right-aligned Logo */
    top: -10px;
    z-index: 1;
    width: 180px;
    height: 180px;
    pointer-events: none;
    transform: none;
}

.doctor-mascot {
    width: 100%;
    height: auto;
    filter: drop-shadow(0 15px 25px rgba(0, 0, 0, 0.15));
    animation: gentleFloat 3s ease-in-out infinite;
}

@keyframes gentleFloat {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-8px);
    }
}

.hello-bubble {
    position: absolute;
    top: 20px;
    right: -70px;
    background: #ffffff;
    padding: 12px 20px;
    border-radius: 20px;
    border-bottom-left-radius: 4px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    font-weight: 600;
    color: #00B7B6;
    font-size: 16px;
    opacity: 0;
    animation: popIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards 1s;
    white-space: nowrap;
}

@keyframes popIn {
    0% {
        opacity: 0;
        transform: scale(0.5) translateY(10px);
    }

    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

@media (max-width: 768px) {
    body {
        margin-top: 13rem;
        padding: 20px;
        display: flex;
        align-items: flex-start;
        justify-content: flex-start;
        align-content: flex-start;
    }

    .header {
        display: none;
    }

    .doctor-container {
        width: 160px;
        height: 160px;
        top: -180px;
        left: 50%;
        transform: translateX(-50%);
        z-index: 1;
    }

    .hello-bubble {
        right: -50px;
        font-size: 14px;
        padding: 8px 16px;
    }

    .progress-container {
        border-radius: 24px 24px 0 0;
        padding: 20px 20px 15px;
    }

    .step {
        padding: 30px 20px;
    }

    .footer {
        padding: 25px 20px;
    }

    .step-label {
        font-size: 10px;
    }

    .step-number {
        width: 36px;
        height: 36px;
        font-size: 13px;
    }
}

/* Progress Indicator */
.progress-container {
    background: #ffffff;
    position: relative;
    z-index: 5;
}

.progress-bar {
    width: 100%;
    height: 6px;
    background: #e5e5e5;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 30px;
    position: relative;
    z-index: 5;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #00B7B6 0%, #00d4d3 100%);
    border-radius: 10px;
    width: 20%;
    transition: width 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 0 15px rgba(0, 183, 182, 0.3);
    position: relative;
    z-index: 6;
}

.progress-steps {
    display: flex;
    justify-content: space-between;
    position: relative;
    padding: 0 10px;
}

.progress-step {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 2;
    opacity: 0.5;
    transition: all 0.4s ease;
}

.progress-step.active,
.progress-step.completed {
    opacity: 1;
}

.step-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
    transition: all 0.4s ease;
    opacity: 0;
    animation: fadeInUp 0.5s ease forwards;
    background: transparent;
    border-radius: 50%;
}

/* Base Active State (Generic properties, colors handled by nth-child below) */
.progress-step.active .step-icon {
    transform: translateY(-4px);
    box-shadow: 0 0 0 4px rgba(0, 183, 182, 0.15);
}

/* 
   PROGRESSIVE SYSTEM 
   Applies to both Active and Completed states to ensure inconsistent coloring is fixed.
   Step 1 -> 5 : Colors get darker/more vibrant 
*/

/* Step 1: Almost White/Grayish Mint */
.progress-step:nth-child(1).active .step-icon,
.progress-step:nth-child(1).completed .step-icon {
    background: #f7fafc;
}

/* Step 2: Very Light Mint (Was Step 1) */
.progress-step:nth-child(2).active .step-icon,
.progress-step:nth-child(2).completed .step-icon {
    background: #f0fdf9;
}

.progress-step:nth-child(2).active .step-icon {
    background: linear-gradient(135deg, #f0fdf9 0%, #e6fffa 100%);
}

/* Step 3: Light Mint (Was Step 2) */
.progress-step:nth-child(3).active .step-icon,
.progress-step:nth-child(3).completed .step-icon {
    background: #e6fffa;
}

.progress-step:nth-child(3).active .step-icon {
    background: linear-gradient(135deg, #e6fffa 0%, #ccfbf1 100%);
}

/* Step 4: Medium Mint (Was Step 3) */
.progress-step:nth-child(4).active .step-icon,
.progress-step:nth-child(4).completed .step-icon {
    background: #ccfbf1;
}

.progress-step:nth-child(4).active .step-icon {
    background: linear-gradient(135deg, #ccfbf1 0%, #99f6e4 100%);
}

/* Step 5: Vibrant Teal (Was Step 4 - Now Final Color) */
.progress-step:nth-child(5).active .step-icon,
.progress-step:nth-child(5).completed .step-icon {
    background: #99f6e4;
    color: #00B7B6;
    /* Keep text dark/brand color for contrast on light teal */
}

.progress-step:nth-child(5).active .step-icon {
    background: linear-gradient(135deg, #99f6e4 0%, #5eead4 100%);
    box-shadow: 0 0 0 4px rgba(0, 183, 182, 0.15);
    /* Softer shadow */
}





.step-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: grayscale(100%) opacity(0.5);
    transition: all 0.4s ease;
}

.progress-step.active .step-icon img,
.progress-step.completed .step-icon img {
    filter: grayscale(0%) opacity(1);
    transform: scale(1.15);
}

.progress-step.active .step-icon {
    transform: translateY(-4px);
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Staggered animation for each step */
.progress-step:nth-child(1) .step-icon {
    animation-delay: 0.1s;
}

.progress-step:nth-child(2) .step-icon {
    animation-delay: 0.2s;
}

.progress-step:nth-child(3) .step-icon {
    animation-delay: 0.3s;
}

.progress-step:nth-child(4) .step-icon {
    animation-delay: 0.4s;
}

.progress-step:nth-child(5) .step-icon {
    animation-delay: 0.5s;
}

/* Legacy .step-number support */
.step-number {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #ffffff;
    color: #a0aec0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    transition: all 0.4s ease;
    border: 2px solid #e2e8f0;
    margin-bottom: 12px;
    position: relative;
}

.progress-step.active .step-number {
    background: #00B7B6;
    color: white;
    border-color: #00B7B6;
    box-shadow: 0 0 0 6px rgba(0, 183, 182, 0.1);
    transform: translateY(-2px);
}

.progress-step.completed .step-number {
    background: #e6fffa;
    color: #00B7B6;
    border-color: #00B7B6;
}

.step-label {
    font-size: 13px;
    color: #718096;
    font-weight: 600;
    letter-spacing: 0.3px;
    transition: all 0.3s ease;
}

.progress-step.active .step-label {
    color: #00B7B6;
    transform: translateY(-2px);
}

/* Steps */
.step {
    display: none;
    padding: 60px 40px;
    animation: fadeSlideUp 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.step.active {
    display: block;
}

@keyframes fadeSlideUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

h3 {
    color: #1a202c;
    font-weight: 700;
    font-size: 28px;
    margin: 0 0 16px;
    letter-spacing: -0.5px;
    text-align: center;
}

.step-description {
    text-align: center;
    color: #718096;
    margin-bottom: 40px;
    font-size: 16px;
    font-weight: 400;
}

/* Gender Cards */
.gender-selection {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 40px;
    max-width: 480px;
    margin-left: auto;
    margin-right: auto;
}

.gender-input {
    display: none;
}

.gender-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    border: 2px solid #e5e5e5;
    border-radius: 24px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: #ffffff;
    min-height: 180px;
    position: relative;
    overflow: hidden;
}

.gender-card:hover {
    border-color: #b2f5ea;
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 183, 182, 0.08);
}

.gender-input:checked+.gender-card {
    border-color: #00B7B6;
    background: #f0fdfe;
    box-shadow: 0 10px 30px rgba(0, 183, 182, 0.15), inset 0 0 0 1px #00B7B6;
}

.gender-icon {
    font-size: 56px;
    margin-bottom: 20px;
    color: #cbd5e0;
    transition: all 0.4s ease;
}

.gender-card:hover .gender-icon {
    color: #00B7B6;
    transform: scale(1.1);
}

.gender-input:checked+.gender-card .gender-icon {
    color: #00B7B6;
    transform: scale(1.1);
}

.gender-label {
    font-size: 18px;
    font-weight: 700;
    color: #4a5568;
    transition: color 0.3s ease;
}

.gender-input:checked+.gender-card .gender-label {
    color: #00B7B6;
}

/* Sub-question Styles */
.sub-question {
    margin-top: 30px;
    padding-top: 30px;
    border-top: 1px solid #e5e5e5;
    animation: fadeSlideUp 0.4s ease;
}

.sub-question h4 {
    font-size: 18px;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 20px;
    text-align: center;
}

.afro-selection {
    justify-content: center;
    max-width: 400px;
    margin: 0 auto;
}

/* Treatment Selection Cards */
.treatment-selection {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
    max-width: 600px;
    margin: 0 auto;
}

.treatment-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 25px 30px;
    border: 2px solid #e5e5e5;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #ffffff;
    min-width: 140px;
    text-align: center;
}

.treatment-card:hover {
    border-color: #b2f5ea;
    transform: translateY(-4px);
    box-shadow: 0 15px 30px rgba(0, 183, 182, 0.1);
}

.treatment-input {
    display: none;
}

.treatment-input:checked+.treatment-card,
.treatment-card:has(input:checked) {
    border-color: #00B7B6;
    background: #f0fdfe;
    box-shadow: 0 8px 20px rgba(0, 183, 182, 0.15);
}

.treatment-icon {
    font-size: 36px;
    margin-bottom: 12px;
    color: #cbd5e0;
    transition: all 0.3s ease;
}

.treatment-card:hover .treatment-icon {
    color: #00B7B6;
}

.treatment-input:checked+.treatment-card .treatment-icon,
.treatment-card:has(input:checked) .treatment-icon {
    color: #00B7B6;
}

.treatment-card span {
    font-size: 14px;
    font-weight: 600;
    color: #4a5568;
}

.treatment-input:checked+.treatment-card span,
.treatment-card:has(input:checked) span {
    color: #00B7B6;
}

/* Norwood Scale Styles */
.norwood-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 40px;
}

.norwood-input {
    display: none;
}

.norwood-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    border: 2px solid #e5e5e5;
    border-radius: 20px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #ffffff;
    text-align: center;
}

.norwood-card img {
    width: 100%;
    height: auto;
    max-height: 120px;
    margin-bottom: 15px;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.norwood-card:hover {
    border-color: #b2f5ea;
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 183, 182, 0.08);
}

.norwood-card:hover img {
    transform: scale(1.05);
}

.norwood-input:checked+.norwood-card {
    border-color: #00B7B6;
    background: #f0fdfe;
    box-shadow: 0 0 0 2px rgba(0, 183, 182, 0.1);
}

.norwood-card span {
    font-size: 14px;
    font-weight: 600;
    color: #718096;
}

.norwood-input:checked+.norwood-card span {
    color: #00B7B6;
}

/* Inputs & Form Groups */
.form-group {
    margin-bottom: 30px;
}

label {
    display: block;
    margin-bottom: 12px;
    font-weight: 600;
    color: #2d3748;
    font-size: 15px;
}

input[type="text"],
input[type="email"],
select,
textarea {
    width: 100%;
    padding: 18px 20px;
    border: 2px solid #e5e5e5;
    border-radius: 16px;
    font-family: 'Outfit', sans-serif;
    font-size: 16px;
    color: #1a202c;
    background: #fafafa;
    transition: all 0.3s ease;
    outline: none;
    font-weight: 500;
}

input[type="text"]:focus,
input[type="email"]:focus,
select:focus,
textarea:focus {
    background: #ffffff;
    border-color: #00B7B6;
    box-shadow: 0 0 0 4px rgba(0, 183, 182, 0.1);
}

input::placeholder,
textarea::placeholder {
    color: #a0aec0;
}

/* Radio Option Group */
.radio-group {
    display: flex;
    gap: 15px;
}

.radio-option {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    padding: 16px 24px;
    border: 2px solid #e5e5e5;
    border-radius: 16px;
    background: #fafafa;
    transition: all 0.3s ease;
    flex: 1;
}

.radio-option:hover {
    border-color: #b2f5ea;
    background: #ffffff;
}

.radio-option input[type="radio"] {
    display: none;
}

.radio-custom {
    width: 22px;
    height: 22px;
    border: 2px solid #cbd5e0;
    border-radius: 50%;
    position: relative;
    transition: all 0.3s ease;
}

.radio-option input[type="radio"]:checked+.radio-custom {
    border-color: #00B7B6;
    background: #00B7B6;
    box-shadow: 0 0 0 3px rgba(0, 183, 182, 0.2);
}

.radio-option input[type="radio"]:checked+.radio-custom::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 8px;
    height: 8px;
    background: white;
    border-radius: 50%;
}

.radio-label {
    font-weight: 500;
    color: #4a5568;
}

/* File Upload */
.file-upload-label {
    background: #f7fafc;
    border: 2px dashed #cbd5e0;
    border-radius: 20px;
    padding: 50px 20px;
    transition: all 0.3s ease;
}

.file-upload-label:hover {
    border-color: #00B7B6;
    background: #f0fdfe;
}

.file-upload-label i {
    font-size: 50px;
    color: #00B7B6;
    opacity: 0.8;
    margin-bottom: 20px;
}

/* Buttons */
.btn-group {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    margin-top: 50px;
    padding-top: 30px;
    border-top: 1px solid #edf2f7;
}

button {
    padding: 18px 40px;
    border: none;
    border-radius: 50px;
    /* Pill shape */
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.3s ease;
    width: auto;
    min-width: 160px;
    letter-spacing: 0.5px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-next,
.btn-submit {
    background: linear-gradient(135deg, #00B7B6 0%, #009a99 100%);
    color: white;
    box-shadow: 0 10px 20px rgba(0, 183, 182, 0.25);
}

.btn-next:hover,
.btn-submit:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 30px rgba(0, 183, 182, 0.35);
}

.btn-prev {
    background: #ffffff;
    color: #718096;
    border: 2px solid #edf2f7;
}

.btn-prev:hover {
    border-color: #cbd5e0;
    color: #2d3748;
    transform: translateY(-3px);
}

.btn-next i,
.btn-prev i {
    font-size: 12px;
}

.btn-next i {
    margin-left: 10px;
}

.btn-prev i {
    margin-right: 10px;
}

/* Responsive */
@media (max-width: 768px) {
    .norwood-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .btn-group {
        flex-direction: column-reverse;
    }

    button {
        width: 100%;
    }
}

/* Spinner */
.loader {
    border: 4px solid rgba(0, 183, 182, 0.1);
    border-top: 4px solid #00B7B6;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 0.8s linear infinite;
    margin: 30px auto;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}


@media (min-width: 768px) {
    body {
        padding: 20px;
    }

    .container {
        padding: 0;
    }

    .logo {
        max-width: 250px;
    }
}

@media (max-width: 480px) {
    .logo {
        max-width: 150px;
    }
}


.progress-step.active .step-label {
    color: #00B7B6;
    font-weight: 600;
}

.step {
    display: none;
    padding: 40px 30px;
    animation: slideIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.step.active {
    display: block;
}

.step-description {
    text-align: center;
    color: #666;
    margin-bottom: 35px;
    font-size: 15px;
    font-weight: 400;
    line-height: 1.6;
}

h3 {
    color: #1a1a1a;
    font-weight: 700;
    font-size: 24px;
    margin: 0 0 12px;
    letter-spacing: -0.5px;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Cinsiyet Seçimi Kartları */
.gender-selection {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 30px;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

.gender-input {
    display: none;
}

.gender-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 35px 25px;
    border: 2.5px solid #e8ecef;
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    background: #fff;
    min-height: 160px;
    position: relative;
    overflow: hidden;
}

.gender-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(0, 183, 182, 0.05) 0%, rgba(0, 154, 153, 0.05) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gender-card:hover {
    border-color: #00B7B6;
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 183, 182, 0.15);
}

.gender-card:hover::before {
    opacity: 1;
}

.gender-input:checked+.gender-card {
    border-color: #00B7B6;
    background: linear-gradient(135deg, #00B7B6 0%, #009a99 100%);
    color: white;
    box-shadow:
        0 8px 32px rgba(0, 183, 182, 0.25),
        0 0 0 4px rgba(0, 183, 182, 0.1);
    transform: translateY(-4px) scale(1.02);
}

.gender-input:checked+.gender-card::before {
    opacity: 0;
}

.gender-icon {
    font-size: 52px;
    margin-bottom: 16px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    z-index: 1;
}

.gender-input:checked+.gender-card .gender-icon {
    transform: scale(1.1);
    color: white;
}

.gender-card .gender-icon {
    color: #00B7B6;
}

.gender-input:checked+.gender-card .gender-icon {
    color: white;
}

.gender-label {
    font-size: 18px;
    font-weight: 600;
    color: #333333;
    position: relative;
    z-index: 1;
    letter-spacing: 0.3px;
}

.gender-input:checked+.gender-card .gender-label {
    color: white;
}


@media (max-width: 480px) {
    .gender-selection {
        gap: 12px;
        margin-bottom: 25px;
    }

    .gender-card {
        padding: 25px 15px;
        min-height: 120px;
    }

    .gender-icon {
        font-size: 40px;
        margin-bottom: 10px;
    }

    .gender-label {
        font-size: 16px;
    }

    .step-description {
        font-size: 13px;
        margin-bottom: 25px;
    }

    h3 {
        font-size: 20px;
    }

    .progress-steps {
        gap: 8px;
    }

    .step-number {
        width: 32px;
        height: 32px;
        font-size: 12px;
    }

    .step-label {
        font-size: 9px;
    }

    .radio-group {
        flex-direction: column;
    }

    .radio-option {
        width: 100%;
    }

    .btn-group {
        flex-direction: column;
    }

    button {
        width: 100%;
    }
}

.form-group {
    margin-bottom: 28px;
}

label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    color: #1a1a1a;
    font-size: 14px;
    letter-spacing: 0.2px;
}

input[type="text"],
input[type="email"],
select,
textarea {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #e8ecef;
    border-radius: 12px;
    box-sizing: border-box;
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 15px;
    color: #1a1a1a;
    background: #fff;
    transition: all 0.3s ease;
    outline: none;
}

input[type="text"]:focus,
input[type="email"]:focus,
select:focus,
textarea:focus {
    border-color: #00B7B6;
    box-shadow: 0 0 0 4px rgba(0, 183, 182, 0.1);
    transform: translateY(-1px);
}

input[type="text"]::placeholder,
input[type="email"]::placeholder,
textarea::placeholder {
    color: #999;
}

select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23333' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 40px;
}

textarea {
    resize: vertical;
    min-height: 100px;
    line-height: 1.6;
}

.btn-group {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid #f0f0f0;
}

button {
    padding: 14px 32px;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    width: 100%;
    position: relative;
    overflow: hidden;
    letter-spacing: 0.3px;
}

button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

button:hover::before {
    width: 300px;
    height: 300px;
}

@media (min-width: 480px) {
    button {
        width: auto;
        min-width: 140px;
    }
}

.btn-next,
.btn-submit {
    background: linear-gradient(135deg, #00B7B6 0%, #009a99 100%);
    color: white;
    box-shadow: 0 4px 14px rgba(0, 183, 182, 0.25);
}

.btn-next:hover,
.btn-submit:hover {
    background: linear-gradient(135deg, #009a99 0%, #008080 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 183, 182, 0.35);
}

.btn-next:active,
.btn-submit:active {
    transform: translateY(0);
}

.btn-prev {
    background: #f5f7fa;
    color: #666;
    border: 2px solid #e8ecef;
}

.btn-prev:hover {
    background: #e8ecef;
    border-color: #d0d4d8;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

/* Button Icons Styling */
.btn-next i,
.btn-prev i {
    font-size: 12px;
}

.btn-next i {
    margin-left: 10px;
}

.btn-prev i {
    margin-right: 10px;
}

.info-text {
    background: linear-gradient(135deg, rgba(0, 183, 182, 0.08) 0%, rgba(0, 154, 153, 0.05) 100%);
    padding: 16px 20px;
    border-left: 4px solid #00B7B6;
    border-radius: 0 12px 12px 0;
    font-size: 14px;
    color: #555;
    line-height: 1.6;
    margin-bottom: 24px;
    box-shadow: 0 2px 8px rgba(0, 183, 182, 0.05);
}

/* Radio Buttons */
.radio-group {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.radio-option {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    padding: 12px 20px;
    border: 2px solid #e8ecef;
    border-radius: 12px;
    background: #fff;
    transition: all 0.3s ease;
    flex: 1;
    min-width: 120px;
    justify-content: center;
}

.radio-option:hover {
    border-color: #00B7B6;
    background: rgba(0, 183, 182, 0.03);
}

.radio-option input[type="radio"] {
    display: none;
}

.radio-custom {
    width: 20px;
    height: 20px;
    border: 2px solid #d0d4d8;
    border-radius: 50%;
    position: relative;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.radio-option input[type="radio"]:checked+.radio-custom {
    border-color: #00B7B6;
    background: #00B7B6;
}

.radio-option input[type="radio"]:checked+.radio-custom::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 8px;
    height: 8px;
    background: white;
    border-radius: 50%;
}

.radio-option input[type="radio"]:checked~.radio-label {
    color: #00B7B6;
    font-weight: 600;
}

.radio-label {
    font-size: 15px;
    color: #555;
    transition: color 0.3s ease;
    user-select: none;
}

.radio-option input[type="radio"]:checked~.radio-label {
    color: #00B7B6;
}

/* File Upload */
.file-upload-wrapper {
    position: relative;
}

.file-input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.file-upload-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    border: 2px dashed #d0d4d8;
    border-radius: 12px;
    background: #fafbfc;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.file-upload-label:hover {
    border-color: #00B7B6;
    background: rgba(0, 183, 182, 0.03);
    transform: translateY(-2px);
}

.file-upload-label i {
    font-size: 48px;
    color: #00B7B6;
    margin-bottom: 12px;
    opacity: 0.7;
}

.file-upload-text {
    font-size: 15px;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 6px;
}

.file-upload-hint {
    font-size: 13px;
    color: #999;
}

.file-list {
    margin-top: 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.file-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: #f5f7fa;
    border-radius: 8px;
    font-size: 14px;
    color: #555;
}

.file-item i {
    color: #00B7B6;
}

.footer {
    margin-top: 0;
    text-align: center;
    font-size: 13px;
    color: #888;
    border-top: 1px solid #f0f0f0;
    padding: 30px;
    background: #fafbfc;
}

.footer p {
    margin: 8px 0;
    line-height: 1.6;
}

.footer strong {
    color: #1a1a1a;
    font-weight: 600;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Spinner */
.loader {
    border: 4px solid rgba(0, 183, 182, 0.1);
    border-top: 4px solid #00B7B6;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 0.8s linear infinite;
    margin: 30px auto;
    box-shadow: 0 0 20px rgba(0, 183, 182, 0.2);
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Norwood Scale Styles */
.norwood-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    margin-bottom: 25px;
}

.norwood-input {
    display: none;
}

.norwood-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    border: 2px solid #e8ecef;
    border-radius: 12px;
    padding: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #fff;
    text-align: center;
}

.norwood-card img {
    width: 100%;
    height: auto;
    max-height: 120px;
    margin-bottom: 10px;
    object-fit: contain;
}

.norwood-card span {
    font-size: 14px;
    font-weight: 600;
    color: #555;
    transition: color 0.3s ease;
}

.norwood-card:hover {
    border-color: #00B7B6;
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0, 183, 182, 0.15);
}

.norwood-input:checked+.norwood-card {
    border-color: #00B7B6;
    background: rgba(0, 183, 182, 0.05);
    box-shadow: 0 0 0 3px rgba(0, 183, 182, 0.1);
}

.norwood-input:checked+.norwood-card span {
    color: #00B7B6;
}

@media (max-width: 768px) {
    .norwood-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Checkboxes */
.checkboxes-group {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.checkbox-container {
    display: block;
    position: relative;
    padding-left: 35px;
    margin-bottom: 12px;
    cursor: pointer;
    font-size: 14px;
    color: #4a5568;
    user-select: none;
    line-height: 1.4;
}

.checkbox-container input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.checkmark {
    position: absolute;
    top: 0;
    left: 0;
    height: 22px;
    width: 22px;
    background-color: #fafafa;
    border: 2px solid #cbd5e0;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.checkbox-container:hover input~.checkmark {
    border-color: #b2f5ea;
}

.checkbox-container input:checked~.checkmark {
    background-color: #00B7B6;
    border-color: #00B7B6;
}

.checkmark:after {
    content: "";
    position: absolute;
    display: none;
}

.checkbox-container input:checked~.checkmark:after {
    display: block;
}

.checkbox-container .checkmark:after {
    left: 7px;
    top: 3px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.checkbox-label {
    vertical-align: top;
    display: inline-block;
    padding-top: 1px;
}

/* Detail Field for Medical History */
.detail-field textarea {
    background: #fff;
    border-color: #e2e8f0;
}

/* Intl Tel Input Overrides */
.iti {
    width: 100%;
    display: block;
}

.iti__flag-container {
    border-top-left-radius: 16px;
    border-bottom-left-radius: 16px;
}

.iti__selected-flag {
    background-color: transparent;
    border-top-left-radius: 16px;
    border-bottom-left-radius: 16px;
    padding: 0 0 0 15px;
    height: 100%;
    display: flex;
    align-items: center;
}

.iti__country-list {
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    font-family: 'Plus Jakarta Sans', sans-serif;
}

input[type="tel"] {
    width: 100%;
    padding: 16px 20px 16px 100px !important;
    border: 2px solid #e2e8f0;
    border-radius: 16px;
    font-size: 16px;
    color: #2d3748;
    background-color: #fafafa;
    transition: all 0.3s ease;
    font-family: 'Plus Jakarta Sans', sans-serif;
    height: auto;
}

input[type="tel"]:focus {
    outline: none;
    border-color: #00B7B6;
    background-color: #fff;
    box-shadow: 0 0 0 4px rgba(0, 183, 182, 0.1);
}

/* Success Screen */
#resultMessage {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 20px;
}

.success-content {
    background: #fff;
    padding: 60px 40px;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    max-width: 600px;
    margin: 0 auto;
    animation: fadeIn 0.6s ease-out;
}

/* Hide doctor and main container when success mode is active */
body.success-mode .doctor-container,
body.success-mode .container {
    display: none !important;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Phone Input Mobile Styling */
.iti-mobile {
    padding-top: 50px;
}