/* --- Design Tokens & Variables --- */
:root {
    /* Color Palette - Light & Elegant */
    --primary: #2d3748; /* Deep elegant slate for text */
    --secondary: #4a5568; /* Softer slate for secondary text */
    --accent: #d4af37; /* Very subtle gold/champagne accent for coaches */
    --accent-hover: #bda132;
    --background-start: #f7fafc;
    --background-end: #edf2f7;
    
    /* Glassmorphism */
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(255, 255, 255, 0.5);
    --glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.07);
    
    /* Layout */
    --border-radius: 16px;
    --transition-speed: 0.3s;
}

/* --- Base Reset & Typography --- */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--primary);
    /* For standalone viewing; in an iframe, the background should blend */
    background: transparent;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

/* --- Layout Containers --- */
.assessment-container {
    width: 100%;
    max-width: 100%;
    padding: 20px;
    margin: 0 auto;
}

/* --- Glassmorphism Card --- */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius);
    box-shadow: var(--glass-shadow);
    padding: 40px;
    position: relative;
    overflow: hidden;
    transition: all var(--transition-speed) ease;
}

/* --- Progress Bar --- */
.progress-bar-container {
    width: 100%;
    height: 6px;
    background: rgba(0, 0, 0, 0.05);
    border-radius: 3px;
    margin-bottom: 24px;
    overflow: hidden;
    display: none; /* Hidden on intro screen */
}

.progress-bar {
    height: 100%;
    background: var(--primary);
    width: 0%;
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* --- Typography --- */
h1 {
    font-size: 1.75rem;
    font-weight: 600;
    margin-bottom: 16px;
    line-height: 1.3;
    letter-spacing: -0.02em;
}

p {
    font-size: 1.05rem;
    line-height: 1.6;
    color: var(--secondary);
    margin-bottom: 24px;
}

.question-text {
    font-size: 1.25rem;
    font-weight: 500;
    margin-bottom: 24px;
    color: var(--primary);
}

/* --- Buttons & Inputs --- */
.btn {
    display: inline-block;
    width: 100%;
    padding: 16px 24px;
    font-size: 1.05rem;
    font-weight: 500;
    font-family: inherit;
    color: #fff;
    background-color: #c36043;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color var(--transition-speed) ease, transform 0.1s ease;
    text-align: center;
}

.btn:hover {
    background-color: #a85036;
}

.btn:active {
    transform: scale(0.98);
}

.option-btn {
    display: block;
    width: 100%;
    text-align: left;
    padding: 16px 20px;
    margin-bottom: 12px;
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 8px;
    color: var(--primary);
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.5;
    cursor: pointer;
    transition: all 0.2s ease;
}

.option-btn:hover {
    background: #fff;
    border-color: rgba(0, 0, 0, 0.2);
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.form-group {
    margin-bottom: 20px;
    text-align: left;
}

.form-group label {
    display: block;
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 8px;
    color: var(--secondary);
}

.form-input {
    width: 100%;
    padding: 14px 16px;
    font-size: 1rem;
    font-family: inherit;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.9);
    color: var(--primary);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(45, 55, 72, 0.1);
}

/* --- State Classes & Animations --- */
.fade-out {
    opacity: 0;
    transform: translateY(-10px);
}

.fade-in {
    animation: fadeIn 0.4s ease forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.error-text {
    color: #e53e3e;
    font-size: 0.85rem;
    margin-top: 6px;
    display: none;
}

.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
    margin-right: 8px;
    vertical-align: middle;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* --- Responsive (Iframe ready) --- */
@media (max-width: 480px) {
    .glass-card {
        padding: 30px 20px;
        border-radius: 12px;
    }
    
    h1 {
        font-size: 1.5rem;
    }
    
    .question-text {
        font-size: 1.15rem;
    }
    
    .option-btn {
        padding: 14px 16px;
    }
}

.form-row {
    display: flex;
    flex-direction: column;
    gap: 0;
}

@media (min-width: 600px) {
    .form-row {
        flex-direction: row;
        gap: 16px;
    }
    .form-row .form-group {
        flex: 1;
    }
    
    .glass-card.intro-width {
        width: 50%;
        margin: 0 auto;
    }
}

.result-message {
    font-size: 1.1rem;
    color: var(--primary);
    font-weight: 500;
    margin-bottom: 0;
}
.inbox-message {
    margin: 0;
    font-size: 0.95rem;
    color: var(--secondary);
    line-height: 1.4;
}

@media (min-width: 600px) {
    .result-message {
        font-size: 1.05rem;
        white-space: nowrap;
    }
    .inbox-message {
        font-size: 0.95rem;
        white-space: nowrap;
    }
}

.terms-label {
    font-size: 0.85rem;
    line-height: 1.4;
    color: var(--secondary);
    font-weight: normal;
    cursor: pointer;
    text-align: left;
}

@media (max-width: 480px) {
    .terms-label {
        font-size: calc(0.85rem - 4px);
    }
}

.terms-container {
    display: flex;
    align-items: start;
    margin-top: 16px;
    margin-bottom: 24px;
}

@media (max-width: 480px) {
    .terms-container {
        margin-top: 8px;
        margin-bottom: 12px;
    }
}
