:root {
    --primary: #393562;
    --accent: #2c6e49;
    --accent-light: #3d8a5f;
    --white: #ffffff;
    --bg-color: #f8f5f0;
    --card-bg: #fef7ed;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
    --border-radius: 16px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Inter", sans-serif;
}

.second-container {
    background: var(--card-bg);
    color: var(--primary);
    min-height: calc(100vh - 120px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.form-container {
    width: 100%;
    max-width: 900px;
    height: auto;
    min-height: 600px;
    background: var(--card-bg);
    border-radius: 24px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    position: relative;
    border: 1px solid rgba(57, 53, 98, 0.1);
}

.form-step {
    flex: 1;
    display: none;
    flex-direction: column;
    padding: 30px 40px;
    position: relative;
    overflow-y: auto;
    min-height: 500px;
}

.form-step.active {
    display: flex;
    animation: fadeIn 0.4s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.step-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
    width: 100%;
    padding: 20px 0;
}

.step-title {
    font-size: 28px;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 10px;
    line-height: 1.3;
    background: linear-gradient(135deg, var(--primary), #55527a);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.step-subtitle {
    font-size: 16px;
    color: #666;
    margin-bottom: 20px;
    max-width: 600px;
    line-height: 1.5;
    font-weight: 400;
}

/* Google Form Container */
.google-form-container {
    width: 100%;
    max-width: 800px;
    margin: 20px 0;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    background: var(--white);
    border: 2px solid rgba(57, 53, 98, 0.1);
    min-height: 500px;
    display: flex;
    flex-direction: column;
}

.google-form-container iframe {
    width: 100%;
    height: 500px;
    border: none;
    flex: 1;
}

/* Gender Section */
.gender-options {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin: 30px 0 40px 0;
    width: 100%;
    max-width: 500px;
    flex-wrap: wrap;
}

.gender-option {
    flex: 1;
    min-width: 140px;
    background: var(--white);
    border: 2px solid rgba(57, 53, 98, 0.1);
    border-radius: var(--border-radius);
    padding: 35px 20px;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;
}

.gender-option:hover {
    border-color: var(--accent);
    transform: translateY(-3px);
    box-shadow: 0 15px 30px rgba(44, 110, 73, 0.15);
}

.gender-option.selected {
    border-color: var(--accent);
    background: linear-gradient(135deg, rgba(44, 110, 73, 0.05), rgba(44, 110, 73, 0.02));
    box-shadow: 0 15px 30px rgba(44, 110, 73, 0.1);
}

.gender-icon {
    font-size: 42px;
    color: var(--accent);
}

.gender-label {
    font-size: 17px;
    font-weight: 700;
    color: var(--primary);
}

/* Number Input with Arrows */
.input-container {
    width: 100%;
    max-width: 400px;
    margin: 30px auto;
    position: relative;
}

.number-input-wrapper {
    display: flex;
    align-items: center;
    background: var(--white);
    border: 2px solid rgba(57, 53, 98, 0.1);
    border-radius: var(--border-radius);
    padding: 0;
    height: 80px;
    position: relative;
    transition: var(--transition);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
}

.number-input-wrapper:focus-within {
    border-color: var(--accent);
    box-shadow: 0 15px 30px rgba(44, 110, 73, 0.15);
}

.input-button {
    width: 70px;
    height: 100%;
    background: transparent;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 26px;
    color: var(--accent);
    transition: var(--transition);
    font-weight: 300;
}

.input-button:hover {
    background: rgba(44, 110, 73, 0.08);
}

.input-button:first-child {
    border-right: 1px solid rgba(57, 53, 98, 0.1);
}

.input-button:last-child {
    border-left: 1px solid rgba(57, 53, 98, 0.1);
}

.number-input {
    flex: 1;
    height: 100%;
    border: none;
    background: transparent;
    text-align: center;
    font-size: 32px;
    font-weight: 800;
    color: var(--primary);
    outline: none;
    padding: 0 15px;
}

/* Hide number input arrows */
.number-input::-webkit-outer-spin-button,
.number-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.number-input[type=number] {
    -moz-appearance: textfield;
}

.input-label {
    position: absolute;
    top: -32px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 16px;
    font-weight: 700;
    color: var(--primary);
    white-space: nowrap;
    background: var(--card-bg);
    padding: 5px 20px;
    border-radius: 10px;
}

.unit-display {
    position: absolute;
    bottom: -28px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 14px;
    color: #666;
    font-weight: 600;
    background: var(--card-bg);
    padding: 4px 15px;
    border-radius: 8px;
}

/* Buttons */
.button-group {
    display: flex;
    gap: 15px;
    margin-top: 30px;
    width: 100%;
    max-width: 500px;
    flex-wrap: wrap;
}

.form-btn {
    flex: 1;
    min-width: 160px;
    padding: 16px 25px;
    border: none;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    text-decoration: none;
    text-align: center;
}

.form-btn-primary {
    background: linear-gradient(135deg, var(--accent), var(--accent-light));
    color: white;
    box-shadow: 0 8px 20px rgba(44, 110, 73, 0.25);
}

.form-btn-primary:hover:not(:disabled) {
    transform: translateY(-3px);
    box-shadow: 0 12px 25px rgba(44, 110, 73, 0.35);
    background: linear-gradient(135deg, var(--accent-light), var(--accent));
}

.form-btn-secondary {
    background: var(--white);
    color: var(--primary);
    border: 2px solid rgba(57, 53, 98, 0.15);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.form-btn-secondary:hover {
    border-color: var(--accent);
    color: var(--accent);
    box-shadow: 0 8px 20px rgba(44, 110, 73, 0.15);
}

.form-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05) !important;
}

/* Loading */
.loading-container {
    text-align: center;
    padding: 40px;
    background: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    max-width: 450px;
    width: 100%;
    border: 2px solid rgba(44, 110, 73, 0.1);
}

.loading-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(44, 110, 73, 0.1);
    border-top: 4px solid var(--accent);
    border-radius: 50%;
    margin: 0 auto 25px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.loading-text {
    font-size: 18px;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 12px;
}

/* BMI Result */
.bmi-container {
    background: var(--white);
    border-radius: var(--border-radius);
    padding: 30px;
    box-shadow: var(--shadow);
    max-width: 500px;
    width: 100%;
    border: 2px solid rgba(44, 110, 73, 0.1);
    margin: 20px 0;
}

.bmi-value {
    font-size: 56px;
    font-weight: 900;
    color: var(--accent);
    margin: 20px 0;
    background: linear-gradient(135deg, var(--accent), var(--accent-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 5px 15px rgba(44, 110, 73, 0.2);
}

.bmi-category {
    font-size: 20px;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 15px;
    padding: 10px 25px;
    background: rgba(44, 110, 73, 0.12);
    border-radius: 50px;
    display: inline-block;
}

.bmi-description {
    font-size: 14px;
    color: #666;
    line-height: 1.6;
    max-width: 320px;
    margin: 0 auto;
    font-weight: 500;
}

/* Assessment Question Steps */
.assessment-question-step {
    width: 100%;
    max-width: 700px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.question-container {
    background: var(--white);
    border-radius: var(--border-radius);
    padding: 25px;
    width: 100%;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.1);
    border: 2px solid rgba(57, 53, 98, 0.1);
    margin-bottom: 25px;
}

.question-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 25px;
}

.question-number {
    background: linear-gradient(135deg, var(--accent), var(--accent-light));
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 800;
    box-shadow: 0 4px 12px rgba(44, 110, 73, 0.2);
    flex-shrink: 0;
}

.question-text {
    font-size: 18px;
    font-weight: 700;
    color: var(--primary);
    flex: 1;
    text-align: left;
    line-height: 1.4;
}

.options-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    margin-top: 15px;
}

.option-card {
    display: flex;
    align-items: center;
    padding: 16px 20px;
    background: #f9f7f3;
    border: 2px solid rgba(57, 53, 98, 0.1);
    border-radius: 12px;
    cursor: pointer;
    transition: var(--transition);
    text-align: left;
}

.option-card:hover {
    transform: translateY(-2px);
    border-color: var(--accent-light);
    box-shadow: 0 6px 15px rgba(44, 110, 73, 0.1);
    background: #f5f2ec;
}

.option-card.selected {
    background: rgba(44, 110, 73, 0.08);
    border-color: var(--accent);
    box-shadow: 0 6px 20px rgba(44, 110, 73, 0.15);
}

.option-letter {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary), #55527a);
    color: white;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 800;
    margin-right: 15px;
    flex-shrink: 0;
}

.option-content {
    flex: 1;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.option-text {
    font-size: 15px;
    font-weight: 600;
    color: var(--primary);
    line-height: 1.4;
    flex: 1;
    padding-right: 15px;
}

/* Results Display */
.results-container {
    background: var(--white);
    border-radius: var(--border-radius);
    padding: 30px;
    box-shadow: var(--shadow);
    max-width: 500px;
    width: 100%;
    border: 2px solid rgba(44, 110, 73, 0.1);
    text-align: center;
}

.results-header {
    margin-bottom: 25px;
}

.results-icon {
    font-size: 40px;
    color: var(--accent);
    margin-bottom: 15px;
}

.results-score {
    font-size: 48px;
    font-weight: 900;
    color: var(--accent);
    margin: 15px 0;
    background: linear-gradient(135deg, var(--accent), var(--accent-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 5px 15px rgba(44, 110, 73, 0.2);
}

.score-label {
    font-size: 13px;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 5px;
    font-weight: 600;
}

.results-category {
    font-size: 20px;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 15px;
    padding: 8px 20px;
    background: rgba(44, 110, 73, 0.12);
    border-radius: 50px;
    display: inline-block;
}

.results-description {
    font-size: 14px;
    color: #666;
    line-height: 1.6;
    margin-bottom: 20px;
    font-weight: 500;
}

.results-details {
    background: #f9f7f3;
    border-radius: 12px;
    padding: 20px;
    margin-top: 20px;
    text-align: left;
    border: 2px solid rgba(57, 53, 98, 0.05);
}

.results-details h4 {
    font-size: 16px;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.results-details ul {
    list-style: none;
    padding: 0;
}

.results-details li {
    font-size: 14px;
    color: #666;
    margin-bottom: 8px;
    padding-left: 20px;
    position: relative;
    line-height: 1.5;
}

.results-details li:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--accent);
    font-weight: 800;
}

/* Progress Bar */
.progress-container {
    width: 100%;
    height: 6px;
    background: rgba(57, 53, 98, 0.08);
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(135deg, var(--accent), var(--accent-light));
    width: 0%;
    transition: width 0.4s ease;
    border-radius: 0 3px 3px 0;
}

/* Thank You */
.thank-you-container {
    text-align: center;
    padding: 30px;
    background: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    max-width: 500px;
    width: 100%;
    border: 2px solid rgba(44, 110, 73, 0.1);
}

.thank-you-icon {
    font-size: 50px;
    color: var(--accent);
    margin-bottom: 20px;
    animation: bounce 1.5s ease infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

.thank-you-title {
    font-size: 24px;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 12px;
}

.thank-you-message {
    font-size: 14px;
    color: #666;
    line-height: 1.6;
    margin-bottom: 25px;
    font-weight: 500;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .form-container {
        max-width: 95%;
        border-radius: 20px;
    }
    
    .step-content {
        padding: 15px 0;
    }
    
    .google-form-container {
        max-width: 100%;
        min-height: 450px;
    }
    
    .google-form-container iframe {
        height: 450px;
    }
}

@media (max-width: 768px) {
    .second-container {
        padding: 15px;
        min-height: calc(100vh - 100px);
    }
    
    .form-container {
        border-radius: 16px;
        min-height: 550px;
    }
    
    .form-step {
        padding: 20px;
    }
    
    .step-title {
        font-size: 24px;
    }
    
    .step-subtitle {
        font-size: 15px;
        margin-bottom: 15px;
    }
    
    .gender-options {
        flex-direction: column;
        max-width: 300px;
        margin: 20px 0 30px 0;
    }
    
    .gender-option {
        width: 100%;
        padding: 25px 15px;
    }
    
    .input-container {
        max-width: 300px;
    }
    
    .number-input-wrapper {
        height: 70px;
    }
    
    .number-input {
        font-size: 28px;
    }
    
    .input-button {
        width: 60px;
        font-size: 22px;
    }
    
    .google-form-container {
        min-height: 400px;
        margin: 10px 0;
    }
    
    .google-form-container iframe {
        height: 400px;
    }
    
    .button-group {
        flex-direction: column;
        gap: 10px;
    }
    
    .form-btn {
        width: 100%;
        min-width: 100%;
        padding: 14px 20px;
    }
    
    .question-container {
        padding: 20px;
    }
    
    .question-text {
        font-size: 16px;
    }
    
    .option-card {
        padding: 14px 16px;
    }
    
    .option-letter {
        width: 35px;
        height: 35px;
        font-size: 14px;
        margin-right: 12px;
    }
    
    .option-text {
        font-size: 14px;
    }
    
    .results-container,
    .bmi-container {
        padding: 20px;
    }
    
    .bmi-value,
    .results-score {
        font-size: 42px;
    }
    
    .thank-you-container {
        padding: 25px 20px;
    }
    
    .thank-you-icon {
        font-size: 45px;
    }
    
    .thank-you-title {
        font-size: 22px;
    }
}

@media (max-width: 480px) {
    .second-container {
        padding: 10px;
    }
    
    .form-container {
        border-radius: 12px;
    }
    
    .form-step {
        padding: 15px;
    }
    
    .step-title {
        font-size: 22px;
        margin-bottom: 8px;
    }
    
    .step-subtitle {
        font-size: 14px;
        margin-bottom: 10px;
    }
    
    .google-form-container {
        min-height: 350px;
    }
    
    .google-form-container iframe {
        height: 350px;
    }
    
    .input-container {
        max-width: 280px;
    }
    
    .number-input-wrapper {
        height: 65px;
    }
    
    .number-input {
        font-size: 24px;
    }
    
    .input-label {
        font-size: 14px;
        top: -28px;
        padding: 4px 15px;
    }
    
    .unit-display {
        font-size: 13px;
        bottom: -24px;
        padding: 3px 12px;
    }
    
    .question-header {
        flex-direction: column;
        text-align: center;
        gap: 10px;
        margin-bottom: 20px;
    }
    
    .question-text {
        text-align: center;
        font-size: 15px;
    }
    
    .options-grid {
        gap: 8px;
    }
    
    .option-card {
        padding: 12px 14px;
    }
    
    .option-letter {
        width: 32px;
        height: 32px;
        font-size: 13px;
        margin-right: 10px;
    }
    
    .option-text {
        font-size: 13px;
    }
    
    .form-btn {
        font-size: 14px;
        padding: 12px 16px;
    }
    
    .bmi-value,
    .results-score {
        font-size: 36px;
    }
    
    .bmi-category,
    .results-category {
        font-size: 16px;
        padding: 6px 16px;
    }
    
    .thank-you-container {
        padding: 20px 15px;
    }
    
    .thank-you-icon {
        font-size: 40px;
    }
    
    .thank-you-title {
        font-size: 20px;
    }
    
    .thank-you-message {
        font-size: 13px;
    }
}

/* Hide scrollbar but keep functionality */
.form-step::-webkit-scrollbar {
    width: 6px;
}

.form-step::-webkit-scrollbar-track {
    background: rgba(57, 53, 98, 0.05);
    border-radius: 3px;
}

.form-step::-webkit-scrollbar-thumb {
    background: rgba(44, 110, 73, 0.3);
    border-radius: 3px;
}

.form-step::-webkit-scrollbar-thumb:hover {
    background: rgba(44, 110, 73, 0.4);
}