/* ============================================
   CSS Variables & Reset - Glassmorphism Theme
   ============================================ */
:root {
    --primary: #E53935;
    --primary-dark: #B71C1C;
    --primary-light: #FFCDD2;
    --white: #FFFFFF;
    --gray-light: #F5F5F5;
    --gray: #9E9E9E;
    --gray-dark: #616161;
    --text: #212121;
    --text-light: #757575;
    --success: #4CAF50;
    --error: #F44336;

    /* Glassmorphism variables */
    --glass-bg: rgba(255, 255, 255, 0.15);
    --glass-bg-solid: rgba(255, 255, 255, 0.85);
    --glass-border: rgba(255, 255, 255, 0.25);
    --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    --glass-blur: blur(20px);

    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 8px 32px rgba(0, 0, 0, 0.15);
    --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.2);

    --radius-sm: 12px;
    --radius-md: 16px;
    --radius-lg: 20px;
    --radius-xl: 24px;

    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
}

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #E53935 0%, #C62828 50%, #B71C1C 100%);
    background-attachment: fixed;
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

/* ============================================
   Page Transitions
   ============================================ */
.page {
    display: none;
    opacity: 0;
    transition: opacity var(--transition-normal);
}

.page.active {
    display: flex;
    flex-direction: column;
    opacity: 1;
    min-height: 100vh;
}

#login-page.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.page.fade-out {
    opacity: 0;
}

.page.fade-in {
    animation: fadeIn var(--transition-normal) forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* ============================================
   Login Page
   ============================================ */
#login-page {
    position: relative;
}

.gradient-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #E53935 0%, #C62828 40%, #B71C1C 70%, #880E4F 100%);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
    z-index: 0;
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.login-container {
    width: 100%;
    max-width: 420px;
    padding: 20px;
    position: relative;
    z-index: 1;
}

.login-card {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-xl);
    padding: 40px;
    box-shadow: var(--glass-shadow);
    animation: slideUp 0.6s ease forwards;
}

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

.logo-container {
    text-align: center;
    margin-bottom: 24px;
}

.logo {
    max-width: 160px;
    height: auto;
    display: block;
    margin: 0 auto;
}

.logo-text {
    display: inline-block;
    font-size: 28px;
    font-weight: 700;
    color: var(--white);
    letter-spacing: 2px;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    padding: 12px 24px;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 12px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.login-card h1 {
    font-size: 28px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 8px;
    color: var(--white);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.subtitle {
    text-align: center;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 32px;
    font-size: 14px;
}

/* ============================================
   Form Elements
   ============================================ */
.form-group {
    margin-bottom: 20px;
}

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

.form-group input[type="text"],
.form-group input[type="password"] {
    width: 100%;
    padding: 14px 16px;
    font-size: 16px;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: var(--radius-md);
    color: var(--white);
    transition: all var(--transition-fast);
    outline: none;
}

.form-group input:focus {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.5);
    box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.1);
}

.form-group input::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

/* Error Messages */
.error-message {
    color: #FFCDD2;
    font-size: 14px;
    margin-bottom: 16px;
    min-height: 20px;
    animation: shake 0.4s ease;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.error-message:empty {
    display: none;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-8px); }
    40%, 80% { transform: translateX(8px); }
}

/* ============================================
   Buttons
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 28px;
    font-size: 16px;
    font-weight: 600;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-fast);
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: var(--white);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.btn-primary:hover {
    background: rgba(255, 255, 255, 0.35);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-outline {
    background: rgba(255, 255, 255, 0.1);
    color: var(--white);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.2);
}

.btn-sm {
    padding: 8px 16px;
    font-size: 14px;
}

.btn-large {
    width: 100%;
    padding: 16px 32px;
    font-size: 18px;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

/* Button Loader */
.btn-loader {
    display: none;
    width: 20px;
    height: 20px;
    border: 2px solid transparent;
    border-top-color: currentColor;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.btn.loading .btn-text {
    opacity: 0;
}

.btn.loading .btn-loader {
    display: block;
    position: absolute;
}

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

/* ============================================
   Header
   ============================================ */
.header {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border-bottom: 1px solid var(--glass-border);
    padding: 16px 20px;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.header-logo {
    height: 36px;
    width: auto;
}

.header-logo-text {
    font-size: 16px;
    font-weight: 700;
    color: var(--white);
    letter-spacing: 1px;
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 8px;
}

.header h2 {
    font-size: 20px;
    font-weight: 600;
    flex: 1;
    color: var(--white);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* ============================================
   Survey Page
   ============================================ */
.survey-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 24px 20px 40px;
    flex: 1;
}

/* Mode Tabs */
.mode-tabs {
    display: flex;
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 6px;
    margin-bottom: 32px;
    box-shadow: var(--glass-shadow);
    position: relative;
}

.mode-tab {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 16px;
    background: transparent;
    border: none;
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    transition: all var(--transition-fast);
    position: relative;
    z-index: 1;
}

.mode-tab:hover {
    color: rgba(255, 255, 255, 0.9);
}

.mode-tab.active {
    color: var(--white);
}

.tab-icon {
    font-size: 18px;
}

.tab-indicator {
    position: absolute;
    top: 6px;
    left: 6px;
    width: calc(50% - 6px);
    height: calc(100% - 12px);
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: var(--radius-md);
    transition: transform var(--transition-normal);
}

.mode-tab[data-mode="describing_self"].active ~ .tab-indicator,
.mode-tabs:has(.mode-tab[data-mode="describing_self"].active) .tab-indicator {
    transform: translateX(100%);
}

/* Form Sections */
.form-section {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-bottom: 20px;
    box-shadow: var(--glass-shadow);
    animation: fadeInUp 0.4s ease forwards;
    opacity: 0;
}

.form-section:nth-child(1) { animation-delay: 0.05s; }
.form-section:nth-child(2) { animation-delay: 0.1s; }
.form-section:nth-child(3) { animation-delay: 0.15s; }
.form-section:nth-child(4) { animation-delay: 0.2s; }
.form-section:nth-child(5) { animation-delay: 0.25s; }
.form-section:nth-child(6) { animation-delay: 0.3s; }
.form-section:nth-child(7) { animation-delay: 0.35s; }
.form-section:nth-child(8) { animation-delay: 0.4s; }
.form-section:nth-child(9) { animation-delay: 0.45s; }

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

.question-title {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    font-size: 16px;
    font-weight: 600;
    color: var(--white);
}

.question-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: var(--white);
    border-radius: 50%;
    font-size: 14px;
    font-weight: 600;
}

/* Radio Buttons */
.radio-group {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.radio-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-fast);
    min-width: 140px;
}

.radio-option:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
}

.radio-option input[type="radio"] {
    display: none;
}

.radio-custom {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    position: relative;
    transition: all var(--transition-fast);
    flex-shrink: 0;
}

.radio-custom::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    width: 10px;
    height: 10px;
    background: var(--white);
    border-radius: 50%;
    transition: transform var(--transition-fast);
}

.radio-option input:checked + .radio-custom {
    border-color: var(--white);
    background: rgba(255, 255, 255, 0.1);
}

.radio-option input:checked + .radio-custom::after {
    transform: translate(-50%, -50%) scale(1);
}

.radio-label {
    color: rgba(255, 255, 255, 0.9);
    font-weight: 400;
}

.radio-option input:checked ~ .radio-label {
    color: var(--white);
    font-weight: 500;
}

/* Radio Cards */
.radio-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
}

.radio-option.card {
    flex-direction: column;
    align-items: flex-start;
    padding: 16px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.radio-option.card:hover {
    border-color: rgba(255, 255, 255, 0.4);
    background: rgba(255, 255, 255, 0.15);
}

.radio-option.card input:checked ~ .radio-label {
    color: var(--white);
}

.radio-option.card .radio-label {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.radio-option.card .radio-label strong {
    font-size: 15px;
    color: var(--white);
}

.radio-option.card .radio-label small {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.7);
}

.radio-option.card input:checked ~ * ~ .radio-label small {
    color: rgba(255, 255, 255, 0.9);
}

/* Checkboxes */
.checkbox-group {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.checkbox-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.checkbox-option:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
}

.checkbox-option input[type="checkbox"] {
    display: none;
}

.checkbox-custom {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.5);
    border-radius: 6px;
    position: relative;
    transition: all var(--transition-fast);
    flex-shrink: 0;
}

.checkbox-custom::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 6px;
    width: 5px;
    height: 10px;
    border: solid var(--white);
    border-width: 0 2px 2px 0;
    transform: rotate(45deg) scale(0);
    transition: transform var(--transition-fast);
}

.checkbox-option input:checked + .checkbox-custom {
    background: rgba(255, 255, 255, 0.3);
    border-color: var(--white);
    animation: checkBounce 0.3s ease;
}

.checkbox-option input:checked + .checkbox-custom::after {
    transform: rotate(45deg) scale(1);
}

.checkbox-label {
    color: rgba(255, 255, 255, 0.9);
}

.checkbox-option input:checked ~ .checkbox-label {
    color: var(--white);
    font-weight: 500;
}

@keyframes checkBounce {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}

/* Range Sliders */
.slider-container {
    padding: 8px 0;
}

.slider-container.hidden {
    display: none;
}

.range-values, .single-value {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 20px;
    font-size: 28px;
    font-weight: 700;
    color: var(--white);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.range-separator {
    color: rgba(255, 255, 255, 0.6);
}

.range-unit {
    font-size: 14px;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.7);
}

.dual-range {
    position: relative;
    height: 40px;
}

.dual-range input[type="range"] {
    position: absolute;
    width: 100%;
    height: 8px;
    background: transparent;
    pointer-events: none;
    -webkit-appearance: none;
    appearance: none;
    top: 50%;
    transform: translateY(-50%);
}

.dual-range input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 28px;
    height: 28px;
    background: var(--white);
    border-radius: 50%;
    cursor: pointer;
    pointer-events: auto;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.dual-range input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.15);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
}

.dual-range input[type="range"]::-moz-range-thumb {
    width: 28px;
    height: 28px;
    background: var(--white);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    pointer-events: auto;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.range-track {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 8px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    transform: translateY(-50%);
    pointer-events: none;
}

.range-fill {
    position: absolute;
    height: 100%;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 4px;
}

/* Single Slider */
.single-slider {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    -webkit-appearance: none;
    appearance: none;
    outline: none;
}

.single-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 28px;
    height: 28px;
    background: var(--white);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.single-slider::-webkit-slider-thumb:hover {
    transform: scale(1.15);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
}

.single-slider::-moz-range-thumb {
    width: 28px;
    height: 28px;
    background: var(--white);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Hidden class */
.hidden {
    display: none !important;
}

/* Survey Error */
#survey-error {
    color: #FFCDD2;
    background: rgba(244, 67, 54, 0.2);
    padding: 12px 16px;
    border-radius: var(--radius-md);
    border: 1px solid rgba(244, 67, 54, 0.3);
}

#survey-error:empty {
    display: none;
    padding: 0;
    background: none;
    border: none;
}

/* ============================================
   Results Page
   ============================================ */
.results-container {
    max-width: 600px;
    margin: 0 auto;
    padding: 40px 20px;
    text-align: center;
    flex: 1;
}

/* Loading State */
.results-loading {
    padding: 60px 20px;
}

.pulse-loader {
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 50%;
    margin: 0 auto 24px;
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.7;
    }
}

.results-loading p {
    font-size: 18px;
    color: rgba(255, 255, 255, 0.9);
}

/* Results Content */
.results-content {
    animation: fadeIn 0.5s ease forwards;
}

.result-card {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-xl);
    padding: 40px;
    box-shadow: var(--glass-shadow);
    margin-bottom: 32px;
}

/* Circular Progress */
.circular-progress {
    width: 180px;
    height: 180px;
    margin: 0 auto 32px;
    position: relative;
}

.circular-progress svg {
    transform: rotate(-90deg);
    width: 100%;
    height: 100%;
}

.circular-progress circle {
    fill: none;
    stroke-width: 8;
    stroke-linecap: round;
}

.progress-bg {
    stroke: rgba(255, 255, 255, 0.2);
}

.progress-fill {
    stroke: var(--white);
    stroke-dasharray: 283;
    stroke-dashoffset: 283;
    transition: stroke-dashoffset 1.5s ease-out;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.progress-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    align-items: baseline;
    gap: 2px;
}

.percentage {
    font-size: 48px;
    font-weight: 700;
    color: var(--white);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.percent-sign {
    font-size: 24px;
    font-weight: 600;
    color: var(--white);
}

/* Match Stats */
.match-stats {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 32px;
}

.stat-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.stat-value {
    font-size: 32px;
    font-weight: 700;
    color: var(--white);
}

.main-stat .stat-value {
    color: var(--white);
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.stat-label {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.8);
}

.stat-divider {
    width: 1px;
    height: 50px;
    background: rgba(255, 255, 255, 0.3);
}

/* Error State */
.results-error {
    padding: 60px 20px;
}

.error-icon {
    width: 80px;
    height: 80px;
    background: rgba(244, 67, 54, 0.3);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(244, 67, 54, 0.4);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    font-weight: 700;
    margin: 0 auto 24px;
}

.results-error p {
    font-size: 18px;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 24px;
}

/* Confetti Canvas */
#confetti-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1000;
}

/* ============================================
   Responsive Design
   ============================================ */
@media (max-width: 768px) {
    .login-card {
        padding: 32px 24px;
    }

    .login-card h1 {
        font-size: 24px;
    }

    .mode-tab {
        padding: 12px;
        font-size: 13px;
    }

    .tab-icon {
        font-size: 16px;
    }

    .tab-text {
        display: none;
    }

    .mode-tab::after {
        content: attr(data-short);
        display: block;
    }

    .mode-tab[data-mode="searching"]::after {
        content: "Qidirish";
    }

    .mode-tab[data-mode="describing_self"]::after {
        content: "O'zimni";
    }

    .form-section {
        padding: 20px 16px;
    }

    .radio-group, .checkbox-group {
        gap: 8px;
    }

    .radio-option, .checkbox-option {
        padding: 10px 14px;
        min-width: auto;
    }

    .radio-cards {
        grid-template-columns: 1fr;
    }

    .match-stats {
        flex-direction: column;
        gap: 20px;
    }

    .stat-divider {
        width: 50px;
        height: 1px;
    }

    .circular-progress {
        width: 150px;
        height: 150px;
    }

    .percentage {
        font-size: 40px;
    }

    .stat-value {
        font-size: 28px;
    }
}

@media (max-width: 480px) {
    html {
        font-size: 14px;
    }

    .header-content {
        gap: 12px;
    }

    .header h2 {
        font-size: 16px;
    }

    .survey-container {
        padding: 16px 12px 32px;
    }

    .mode-tabs {
        margin-bottom: 24px;
    }

    .question-title {
        font-size: 14px;
    }

    .question-number {
        width: 28px;
        height: 28px;
        font-size: 12px;
    }

    .range-values, .single-value {
        font-size: 24px;
    }

    .result-card {
        padding: 24px 20px;
    }
}

/* Touch-friendly tap targets */
@media (pointer: coarse) {
    .radio-option, .checkbox-option {
        min-height: 44px;
    }

    .btn {
        min-height: 44px;
    }

    .dual-range input[type="range"]::-webkit-slider-thumb,
    .single-slider::-webkit-slider-thumb {
        width: 32px;
        height: 32px;
    }
}

/* ============================================
   Utility Classes
   ============================================ */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

/* Success checkmark animation */
.checkmark {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: block;
    stroke-width: 2;
    stroke: var(--success);
    stroke-miterlimit: 10;
    margin: 10% auto;
    box-shadow: inset 0px 0px 0px var(--success);
    animation: fill 0.4s ease-in-out 0.4s forwards, scale 0.3s ease-in-out 0.9s both;
}

.checkmark__circle {
    stroke-dasharray: 166;
    stroke-dashoffset: 166;
    stroke-width: 2;
    stroke-miterlimit: 10;
    stroke: var(--success);
    fill: none;
    animation: stroke 0.6s cubic-bezier(0.65, 0, 0.45, 1) forwards;
}

.checkmark__check {
    transform-origin: 50% 50%;
    stroke-dasharray: 48;
    stroke-dashoffset: 48;
    animation: stroke 0.3s cubic-bezier(0.65, 0, 0.45, 1) 0.8s forwards;
}

@keyframes stroke {
    100% { stroke-dashoffset: 0; }
}

@keyframes scale {
    0%, 100% { transform: none; }
    50% { transform: scale3d(1.1, 1.1, 1); }
}

@keyframes fill {
    100% { box-shadow: inset 0px 0px 0px 30px var(--success); }
}
