/* ===== CSS Variables ===== */
:root {
    --primary-color: #2c3e50;
    --primary-light: #34495e;
    --primary-dark: #1a252f;
    --accent-color: #3498db;
    --accent-hover: #2980b9;
    --success-color: #27ae60;
    --warning-color: #f39c12;
    --danger-color: #e74c3c;
    --primary-gradient: linear-gradient(135deg, #2c3e50 0%, #3498db 100%);
    --secondary-gradient: linear-gradient(135deg, #34495e 0%, #2c3e50 100%);
    --success-gradient: linear-gradient(135deg, #27ae60 0%, #229954 100%);
    --card-bg: #ffffff;
    --background-light: #f8f9fa;
    --background-lighter: #ecf0f1;
    --text-primary: #2c3e50;
    --text-secondary: #7f8c8d;
    --text-light: #95a5a6;
    --border-color: #dce1e3;
    --shadow-sm: 0 2px 4px rgba(44, 62, 80, 0.08);
    --shadow-md: 0 4px 6px rgba(44, 62, 80, 0.1);
    --shadow-lg: 0 10px 25px rgba(44, 62, 80, 0.12);
    --shadow-xl: 0 20px 40px rgba(44, 62, 80, 0.15);
    --shadow-glow: 0 0 40px rgba(52, 152, 219, 0.2);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===== Global Styles ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 50%, #3498db 100%);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
    min-height: 100vh;
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 50%, rgba(255, 255, 255, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(255, 255, 255, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 40% 20%, rgba(52, 152, 219, 0.15) 0%, transparent 50%);
    pointer-events: none;
    animation: float 20s ease-in-out infinite;
}

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

.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
}

/* ===== Screen Management ===== */
.screen {
    display: none;
    animation: fadeIn 0.5s ease-in;
}

.screen.active {
    display: block;
}

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

/* ===== Welcome Screen ===== */
.hero-section {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    border-radius: 30px;
    padding: 60px 40px;
    text-align: center;
    box-shadow: 
        0 8px 32px 0 rgba(44, 62, 80, 0.15),
        0 0 80px rgba(52, 152, 219, 0.1),
        inset 0 0 0 1px rgba(255, 255, 255, 0.8);
    margin-top: 40px;
    border: 1px solid rgba(220, 225, 227, 0.3);
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(52, 152, 219, 0.05) 0%, transparent 70%);
    animation: rotate 30s linear infinite;
}

@keyframes rotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.hero-section > * {
    position: relative;
    z-index: 1;
}

.logo {
    margin-bottom: 30px;
    animation: float 3s ease-in-out infinite, glow 2s ease-in-out infinite;
    filter: drop-shadow(0 0 20px rgba(52, 152, 219, 0.3));
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

@keyframes glow {
    0%, 100% { 
        filter: drop-shadow(0 0 20px rgba(52, 152, 219, 0.3));
    }
    50% { 
        filter: drop-shadow(0 0 35px rgba(52, 152, 219, 0.5));
    }
}

.main-title {
    font-size: 3rem;
    font-weight: 800;
    background: linear-gradient(135deg, #2c3e50 0%, #3498db 50%, #2c3e50 100%);
    background-size: 200% 200%;
    animation: gradientText 5s ease infinite;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 15px;
    letter-spacing: -1px;
    text-shadow: 0 4px 20px rgba(52, 152, 219, 0.2);
    filter: drop-shadow(0 2px 4px rgba(44, 62, 80, 0.1));
}

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

.subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 40px;
}

.features {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.feature {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 20px;
    background: linear-gradient(135deg, rgba(52, 152, 219, 0.08) 0%, rgba(44, 62, 80, 0.08) 100%);
    border-radius: 20px;
    transition: var(--transition);
    cursor: default;
}

.feature:hover {
    transform: translateY(-5px) scale(1.05);
    background: linear-gradient(135deg, rgba(52, 152, 219, 0.12) 0%, rgba(44, 62, 80, 0.12) 100%);
    box-shadow: 0 10px 30px rgba(52, 152, 219, 0.15);
}

.feature-icon {
    font-size: 2.5rem;
    animation: bounce 2s ease-in-out infinite;
}

.feature:nth-child(1) .feature-icon {
    animation-delay: 0s;
}

.feature:nth-child(2) .feature-icon {
    animation-delay: 0.3s;
}

.feature:nth-child(3) .feature-icon {
    animation-delay: 0.6s;
}

.feature span:last-child {
    font-weight: 600;
    color: var(--text-primary);
}

.info-box {
    background: linear-gradient(135deg, rgba(248, 249, 250, 0.95) 0%, rgba(236, 240, 241, 0.95) 100%);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 30px;
    margin: 40px 0;
    text-align: left;
    border: 2px solid rgba(220, 225, 227, 0.5);
    box-shadow: 0 8px 32px 0 rgba(44, 62, 80, 0.08);
    transition: var(--transition);
}

.info-box:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 40px 0 rgba(44, 62, 80, 0.12);
}

.info-box h3 {
    font-size: 1.5rem;
    margin-bottom: 20px;
    color: var(--text-primary);
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.info-box ul {
    list-style: none;
}

.info-box li {
    padding: 10px 0;
    padding-left: 30px;
    position: relative;
    color: var(--text-secondary);
    transition: var(--transition);
}

.info-box li:hover {
    padding-left: 35px;
    color: var(--text-primary);
}

.info-box li:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--accent-color);
    font-weight: bold;
    font-size: 1.2rem;
    width: 24px;
    height: 24px;
    background: linear-gradient(135deg, rgba(52, 152, 219, 0.15) 0%, rgba(44, 62, 80, 0.15) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.disclaimer {
    margin-top: 20px;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* ===== Buttons ===== */
.btn {
    padding: 12px 30px;
    border: none;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    outline: none;
    position: relative;
    overflow: hidden;
}

.btn::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;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

.btn-primary {
    background: var(--primary-gradient);
    color: white;
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.3);
    border: 2px solid transparent;
}

.btn-primary:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 25px rgba(52, 152, 219, 0.4);
}

.btn-primary:active {
    transform: translateY(-1px) scale(1.01);
}

.btn-secondary {
    background: white;
    color: var(--text-primary);
    border: 2px solid var(--border-color);
    box-shadow: 0 4px 15px rgba(44, 62, 80, 0.08);
}

.btn-secondary:hover {
    background: linear-gradient(135deg, #f8f9fa 0%, #ecf0f1 100%);
    border-color: var(--accent-color);
    box-shadow: 0 8px 25px rgba(52, 152, 219, 0.15);
    transform: translateY(-3px) scale(1.02);
}

.btn-large {
    padding: 18px 50px;
    font-size: 1.1rem;
}

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

.btn:disabled:hover::before {
    width: 0;
    height: 0;
}

/* ===== Test Screen ===== */
#test-screen {
    padding-top: 20px;
}

.test-header {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: 0 8px 32px 0 rgba(44, 62, 80, 0.12);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    border: 1px solid rgba(220, 225, 227, 0.3);
}

.progress-container {
    flex: 1;
    min-width: 200px;
}

.progress-bar {
    width: 100%;
    height: 12px;
    background: rgba(220, 225, 227, 0.4);
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 10px;
    box-shadow: inset 0 2px 4px rgba(44, 62, 80, 0.08);
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #2c3e50 0%, #3498db 50%, #2c3e50 100%);
    background-size: 200% 100%;
    animation: shimmer 2s infinite;
    transition: width 0.4s ease;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(52, 152, 219, 0.3);
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

.progress-text {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 600;
}

.timer {
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, rgba(52, 152, 219, 0.12) 0%, rgba(44, 62, 80, 0.12) 100%);
    color: var(--text-primary);
    padding: 12px 24px;
    border-radius: 50px;
    border: 2px solid rgba(52, 152, 219, 0.2);
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.1);
    transition: var(--transition);
}

.timer.warning {
    background: linear-gradient(135deg, rgba(231, 76, 60, 0.15) 0%, rgba(192, 57, 43, 0.15) 100%);
    color: var(--danger-color);
    border-color: rgba(231, 76, 60, 0.4);
    animation: pulseWarning 1s infinite;
}

@keyframes pulseWarning {
    0%, 100% { 
        transform: scale(1); 
        box-shadow: 0 4px 15px rgba(231, 76, 60, 0.2);
    }
    50% { 
        transform: scale(1.05); 
        box-shadow: 0 6px 25px rgba(231, 76, 60, 0.35);
    }
}

.question-container {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    border-radius: 25px;
    padding: 40px;
    margin-bottom: 30px;
    box-shadow: 0 8px 32px 0 rgba(44, 62, 80, 0.12);
    min-height: 400px;
    border: 1px solid rgba(220, 225, 227, 0.3);
    position: relative;
    overflow: hidden;
}

.question-container::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, #2c3e50, #3498db, #2c3e50);
    background-size: 300% 300%;
    border-radius: 25px;
    z-index: -1;
    animation: gradientBorder 6s ease infinite;
    opacity: 0.3;
}

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

.question-title {
    font-size: 1.3rem;
    color: var(--text-primary);
    margin-bottom: 30px;
    line-height: 1.6;
}

.question-content {
    margin-bottom: 30px;
}

.pattern-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-bottom: 30px;
}

.pattern-cell {
    aspect-ratio: 1;
    background: linear-gradient(135deg, #f6f8fc 0%, #eef2f7 100%);
    border: 2px solid var(--border-color);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: bold;
    color: var(--text-primary);
}

.pattern-cell.missing {
    background: linear-gradient(135deg, #fff5f5 0%, #ffe0e0 100%);
    border: 2px dashed #f5576c;
    position: relative;
}

.pattern-cell.missing:after {
    content: "?";
    color: #f5576c;
}

.answers {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.answer-option {
    padding: 20px;
    background: linear-gradient(135deg, rgba(248, 249, 250, 0.9) 0%, rgba(236, 240, 241, 0.9) 100%);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(52, 152, 219, 0.15);
    border-radius: 15px;
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
    font-weight: 600;
    color: var(--text-primary);
    position: relative;
    overflow: hidden;
}

.answer-option::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(52, 152, 219, 0.08), transparent);
    transition: left 0.5s;
}

.answer-option:hover::before {
    left: 100%;
}

.answer-option:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 10px 30px rgba(52, 152, 219, 0.15);
    border-color: var(--accent-color);
    background: linear-gradient(135deg, rgba(248, 249, 250, 1) 0%, rgba(236, 240, 241, 1) 100%);
}

.answer-option.selected {
    background: var(--primary-gradient);
    color: white;
    border-color: transparent;
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 10px 30px rgba(52, 152, 219, 0.35);
    animation: selectPulse 0.4s ease;
}

@keyframes selectPulse {
    0% { transform: translateY(-5px) scale(1); }
    50% { transform: translateY(-5px) scale(1.05); }
    100% { transform: translateY(-5px) scale(1.02); }
}

.test-footer {
    display: flex;
    justify-content: space-between;
    gap: 15px;
}

.test-footer .btn {
    flex: 1;
}

/* ===== Results Screen ===== */
.results-container {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    border-radius: 30px;
    padding: 50px 40px;
    box-shadow: 0 8px 32px 0 rgba(44, 62, 80, 0.12);
    margin-top: 40px;
    border: 1px solid rgba(220, 225, 227, 0.3);
    position: relative;
    overflow: hidden;
}

.results-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 80% 20%, rgba(52, 152, 219, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 20% 80%, rgba(44, 62, 80, 0.05) 0%, transparent 50%);
    pointer-events: none;
}

.results-container > * {
    position: relative;
    z-index: 1;
}

.results-hero {
    text-align: center;
    margin-bottom: 50px;
    padding-bottom: 40px;
    border-bottom: 2px solid var(--border-color);
}

.trophy-icon {
    font-size: 5rem;
    margin-bottom: 20px;
    animation: trophyBounce 2s infinite, trophyGlow 2s ease-in-out infinite;
    filter: drop-shadow(0 0 20px rgba(255, 215, 0, 0.5));
}

@keyframes trophyBounce {
    0%, 100% { 
        transform: translateY(0) rotate(0deg); 
    }
    25% { 
        transform: translateY(-15px) rotate(-5deg); 
    }
    50% { 
        transform: translateY(-20px) rotate(0deg); 
    }
    75% { 
        transform: translateY(-15px) rotate(5deg); 
    }
}

@keyframes trophyGlow {
    0%, 100% {
        filter: drop-shadow(0 0 20px rgba(255, 215, 0, 0.5));
    }
    50% {
        filter: drop-shadow(0 0 40px rgba(255, 215, 0, 0.8));
    }
}

.results-title {
    font-size: 2.5rem;
    color: var(--text-primary);
    margin-bottom: 30px;
}

.iq-score-display {
    margin: 30px 0;
}

.iq-score {
    font-size: 6rem;
    font-weight: 800;
    background: linear-gradient(135deg, #2c3e50 0%, #3498db 50%, #2c3e50 100%);
    background-size: 200% 200%;
    animation: gradientText 3s ease infinite, scorePulse 2s ease-in-out infinite;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
    filter: drop-shadow(0 4px 20px rgba(52, 152, 219, 0.25));
}

@keyframes scorePulse {
    0%, 100% {
        transform: scale(1);
        filter: drop-shadow(0 4px 20px rgba(52, 152, 219, 0.25));
    }
    50% {
        transform: scale(1.05);
        filter: drop-shadow(0 8px 30px rgba(52, 152, 219, 0.4));
    }
}

.iq-label {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-top: 10px;
}

.iq-category {
    font-size: 1.5rem;
    font-weight: 600;
    color: white;
    padding: 15px 30px;
    background: var(--primary-gradient);
    border-radius: 50px;
    display: inline-block;
    margin-top: 20px;
    box-shadow: 0 8px 25px rgba(52, 152, 219, 0.25);
    animation: categoryFloat 3s ease-in-out infinite;
}

@keyframes categoryFloat {
    0%, 100% {
        transform: translateY(0px);
        box-shadow: 0 8px 25px rgba(52, 152, 219, 0.25);
    }
    50% {
        transform: translateY(-5px);
        box-shadow: 0 12px 35px rgba(52, 152, 219, 0.35);
    }
}

.results-details {
    display: grid;
    gap: 30px;
    margin-bottom: 40px;
}

.result-card {
    background: linear-gradient(135deg, rgba(248, 249, 250, 0.9) 0%, rgba(236, 240, 241, 0.9) 100%);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 30px;
    border: 2px solid rgba(220, 225, 227, 0.5);
    box-shadow: 0 8px 32px 0 rgba(44, 62, 80, 0.08);
    transition: var(--transition);
}

.result-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px 0 rgba(44, 62, 80, 0.12);
    border-color: rgba(52, 152, 219, 0.3);
}

.result-card h3 {
    font-size: 1.5rem;
    margin-bottom: 20px;
    color: var(--text-primary);
    background: linear-gradient(135deg, #2c3e50 0%, #3498db 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-row {
    display: flex;
    justify-content: space-between;
    padding: 15px 0;
    border-bottom: 1px solid var(--border-color);
}

.stat-row:last-child {
    border-bottom: none;
}

.stat-label {
    color: var(--text-secondary);
    font-weight: 500;
}

.stat-value {
    color: var(--text-primary);
    font-weight: 700;
    font-size: 1.1rem;
}

.distribution-chart {
    margin: 20px 0;
}

.distribution-description {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 20px;
    text-align: center;
}

.distribution-bar {
    display: flex;
    height: 60px;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 20px;
}

.bar-segment {
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 0.9rem;
    position: relative;
    transition: var(--transition);
}

.bar-segment:hover {
    filter: brightness(1.1);
    transform: scaleY(1.1);
}

.bar-segment:nth-child(1) { 
    background: linear-gradient(135deg, #c0392b 0%, #e74c3c 100%);
    box-shadow: 0 4px 15px rgba(231, 76, 60, 0.3);
}
.bar-segment:nth-child(2) { 
    background: linear-gradient(135deg, #d35400 0%, #e67e22 100%);
    box-shadow: 0 4px 15px rgba(230, 126, 34, 0.3);
}
.bar-segment:nth-child(3) { 
    background: linear-gradient(135deg, #f39c12 0%, #f1c40f 100%);
    box-shadow: 0 4px 15px rgba(243, 156, 18, 0.3);
}
.bar-segment:nth-child(4) { 
    background: linear-gradient(135deg, #27ae60 0%, #2ecc71 100%);
    box-shadow: 0 4px 15px rgba(39, 174, 96, 0.3);
}
.bar-segment:nth-child(5) { 
    background: linear-gradient(135deg, #2980b9 0%, #3498db 100%);
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.3);
}
.bar-segment:nth-child(6) { 
    background: linear-gradient(135deg, #8e44ad 0%, #9b59b6 100%);
    box-shadow: 0 4px 15px rgba(142, 68, 173, 0.3);
}

.your-position {
    text-align: center;
    margin-top: 15px;
    position: relative;
    width: 100%;
    height: 70px;
}

.position-arrow {
    display: inline-block;
    animation: arrowBounce 2s ease-in-out infinite;
    filter: drop-shadow(0 4px 12px rgba(102, 126, 234, 0.6));
}

.position-arrow svg {
    display: block;
    margin: 0 auto;
}

@keyframes arrowBounce {
    0%, 100% { 
        transform: translateY(0) translateX(-50%); 
        filter: drop-shadow(0 4px 12px rgba(102, 126, 234, 0.6));
    }
    50% { 
        transform: translateY(-8px) translateX(-50%); 
        filter: drop-shadow(0 8px 20px rgba(102, 126, 234, 0.9));
    }
}

.position-label {
    display: block;
    font-weight: 700;
    font-size: 0.95rem;
    color: #667eea;
    margin-top: 5px;
    text-shadow: 0 2px 4px rgba(102, 126, 234, 0.3);
    animation: labelPulse 2s ease-in-out infinite;
}

@keyframes labelPulse {
    0%, 100% { 
        opacity: 1;
        transform: scale(1);
    }
    50% { 
        opacity: 0.8;
        transform: scale(1.05);
    }
}

.distribution-info {
    text-align: center;
    color: var(--text-secondary);
    font-size: 1rem;
}

.distribution-info span {
    font-weight: 700;
    color: var(--text-primary);
}

.results-actions {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

/* ===== Footer ===== */
.footer {
    text-align: center;
    padding: 30px 20px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
}

/* ===== Responsive Design ===== */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }

    .hero-section {
        padding: 40px 25px;
        margin-top: 20px;
    }

    .main-title {
        font-size: 2rem;
    }

    .subtitle {
        font-size: 1rem;
    }

    .features {
        gap: 25px;
    }

    .info-box {
        padding: 20px;
    }

    .question-container {
        padding: 25px;
        min-height: 300px;
    }

    .question-title {
        font-size: 1.1rem;
    }

    .pattern-grid {
        gap: 10px;
    }

    .pattern-cell {
        font-size: 1.5rem;
    }

    .answers {
        grid-template-columns: 1fr;
    }

    .test-footer {
        flex-direction: column;
    }

    .results-container {
        padding: 30px 20px;
    }

    .results-title {
        font-size: 1.8rem;
    }

    .iq-score {
        font-size: 4rem;
    }

    .iq-category {
        font-size: 1.2rem;
        padding: 12px 20px;
    }

    .result-card {
        padding: 20px;
    }

    .distribution-bar {
        height: 50px;
    }

    .bar-segment {
        font-size: 0.75rem;
    }

    .results-actions {
        flex-direction: column;
    }

    .results-actions .btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .main-title {
        font-size: 1.75rem;
    }

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

    .test-header {
        flex-direction: column;
    }

    .timer {
        font-size: 1.2rem;
    }

    .trophy-icon {
        font-size: 4rem;
    }

    .iq-score {
        font-size: 3.5rem;
    }

    .bar-label {
        font-size: 0.7rem;
    }
}

/* ===== Smooth Animations ===== */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

.slide-up {
    animation: slideUp 0.5s ease-out;
}

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

/* ===== Floating Particles ===== */
.particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.particle {
    position: absolute;
    width: 10px;
    height: 10px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.8) 0%, rgba(255, 255, 255, 0) 70%);
    border-radius: 50%;
    animation: floatParticle 15s infinite ease-in-out;
}

.particle:nth-child(1) {
    left: 10%;
    animation-delay: 0s;
    animation-duration: 12s;
}

.particle:nth-child(2) {
    left: 20%;
    animation-delay: 2s;
    animation-duration: 15s;
}

.particle:nth-child(3) {
    left: 35%;
    animation-delay: 4s;
    animation-duration: 13s;
}

.particle:nth-child(4) {
    left: 50%;
    animation-delay: 1s;
    animation-duration: 14s;
}

.particle:nth-child(5) {
    left: 65%;
    animation-delay: 3s;
    animation-duration: 16s;
}

.particle:nth-child(6) {
    left: 75%;
    animation-delay: 5s;
    animation-duration: 11s;
}

.particle:nth-child(7) {
    left: 85%;
    animation-delay: 2.5s;
    animation-duration: 13.5s;
}

.particle:nth-child(8) {
    left: 90%;
    animation-delay: 4.5s;
    animation-duration: 15.5s;
}

@keyframes floatParticle {
    0% {
        transform: translateY(100vh) scale(0);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(-100vh) scale(1);
        opacity: 0;
    }
}

/* ===== Payment Screen ===== */
.payment-container {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 30px;
    padding: 50px 40px;
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
    margin-top: 40px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.payment-hero {
    text-align: center;
    margin-bottom: 40px;
}

.lock-icon {
    font-size: 4rem;
    margin-bottom: 20px;
    animation: lockPulse 2s ease-in-out infinite;
    filter: drop-shadow(0 4px 15px rgba(52, 152, 219, 0.25));
}

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

.payment-title {
    font-size: 2rem;
    font-weight: 800;
    background: linear-gradient(135deg, #2c3e50 0%, #3498db 50%, #2c3e50 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 15px;
}

.payment-subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
}

.payment-preview {
    background: linear-gradient(135deg, rgba(248, 249, 250, 0.9) 0%, rgba(236, 240, 241, 0.9) 100%);
    border-radius: 20px;
    padding: 30px;
    margin-bottom: 30px;
    border: 2px solid rgba(52, 152, 219, 0.15);
}

.payment-preview h3 {
    font-size: 1.3rem;
    margin-bottom: 20px;
    color: var(--text-primary);
}

.benefits-list {
    list-style: none;
    padding: 0;
}

.benefits-list li {
    display: flex;
    gap: 15px;
    padding: 15px 0;
    border-bottom: 1px solid rgba(226, 232, 240, 0.5);
    transition: var(--transition);
}

.benefits-list li:last-child {
    border-bottom: none;
}

.benefits-list li:hover {
    transform: translateX(5px);
    background: rgba(52, 152, 219, 0.05);
    padding-left: 10px;
    border-radius: 10px;
}

.benefit-icon {
    font-size: 1.8rem;
    flex-shrink: 0;
}

.benefit-content strong {
    display: block;
    color: var(--text-primary);
    font-size: 1.05rem;
    margin-bottom: 5px;
}

.benefit-content p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin: 0;
}

.pricing-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 20px;
    padding: 30px;
    text-align: center;
    margin-bottom: 30px;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.4);
    animation: priceFloat 3s ease-in-out infinite;
}

@keyframes priceFloat {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-5px);
    }
}

.price-badge {
    margin-bottom: 15px;
}

.original-price {
    font-size: 1.3rem;
    color: rgba(255, 255, 255, 0.6);
    text-decoration: line-through;
    margin-right: 15px;
}

.current-price {
    font-size: 3rem;
    font-weight: 800;
    color: white;
}

.price-label {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.95rem;
    margin-bottom: 15px;
}

.urgency-badge {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    padding: 10px 20px;
    border-radius: 50px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: white;
    font-weight: 600;
    animation: urgencyPulse 2s ease-in-out infinite;
}

@keyframes urgencyPulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.7);
    }
    50% {
        box-shadow: 0 0 0 10px rgba(255, 255, 255, 0);
    }
}

.urgency-icon {
    font-size: 1.2rem;
}

.payment-methods {
    margin-bottom: 30px;
}

.payment-methods h3 {
    font-size: 1.2rem;
    margin-bottom: 20px;
    text-align: center;
    color: var(--text-primary);
}

.payment-btn {
    width: 100%;
    padding: 20px;
    margin-bottom: 15px;
    border: 2px solid rgba(102, 126, 234, 0.3);
    border-radius: 15px;
    background: linear-gradient(135deg, rgba(246, 248, 252, 0.8) 0%, rgba(238, 242, 247, 0.8) 100%);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 15px;
    transition: var(--transition);
    font-family: inherit;
}

.payment-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
    border-color: #667eea;
    background: linear-gradient(135deg, rgba(246, 248, 252, 1) 0%, rgba(238, 242, 247, 1) 100%);
}

.payment-icon {
    font-size: 2rem;
    flex-shrink: 0;
}

.payment-text {
    text-align: left;
    flex: 1;
}

.payment-text strong {
    display: block;
    color: var(--text-primary);
    font-size: 1.1rem;
    margin-bottom: 3px;
}

.payment-text small {
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.paypal-btn:hover {
    border-color: #0070ba;
}

.stripe-btn:hover {
    border-color: #635bff;
}

.crypto-btn:hover {
    border-color: #f7931a;
}

.security-badges {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.badge {
    padding: 8px 16px;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    border-radius: 50px;
    font-size: 0.85rem;
    color: var(--text-primary);
    font-weight: 600;
    border: 1px solid rgba(102, 126, 234, 0.2);
}

.skip-payment-link {
    width: 100%;
    padding: 12px;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    text-align: center;
    cursor: pointer;
    font-size: 0.9rem;
    transition: var(--transition);
    text-decoration: underline;
}

.skip-payment-link:hover {
    color: var(--text-primary);
}

