/* ==================== JS TEST STYLES ==================== */
@import url('https://fonts.googleapis.com/css2?family=Rubik:wght@400;500;600;700&display=swap');

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

body {
    font-family: 'Rubik', sans-serif;
    background: #faf9f7;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    position: relative;
    overflow-x: hidden;
}

/* ==================== FLYING SQUARES ==================== */
.flying-squares {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.flying-square {
    position: absolute;
    border-radius: 8px;
    opacity: 0;
    animation: floatUp linear infinite;
}

.flying-square:nth-child(1) { width: 40px; height: 40px; background: #F7DF1E; left: 5%; animation-duration: 20s; animation-delay: 0s; }
.flying-square:nth-child(2) { width: 30px; height: 30px; background: #323330; left: 15%; animation-duration: 18s; animation-delay: -3s; }
.flying-square:nth-child(3) { width: 50px; height: 50px; background: #F7DF1E; left: 25%; animation-duration: 25s; animation-delay: -6s; }
.flying-square:nth-child(4) { width: 25px; height: 25px; background: #323330; left: 35%; animation-duration: 22s; animation-delay: -2s; }
.flying-square:nth-child(5) { width: 45px; height: 45px; background: #F7DF1E; left: 45%; animation-duration: 19s; animation-delay: -8s; }
.flying-square:nth-child(6) { width: 35px; height: 35px; background: #323330; left: 55%; animation-duration: 24s; animation-delay: -4s; }
.flying-square:nth-child(7) { width: 55px; height: 55px; background: #F7DF1E; left: 65%; animation-duration: 21s; animation-delay: -10s; }
.flying-square:nth-child(8) { width: 28px; height: 28px; background: #323330; left: 75%; animation-duration: 17s; animation-delay: -5s; }
.flying-square:nth-child(9) { width: 42px; height: 42px; background: #F7DF1E; left: 85%; animation-duration: 23s; animation-delay: -7s; }
.flying-square:nth-child(10) { width: 38px; height: 38px; background: #323330; left: 92%; animation-duration: 20s; animation-delay: -1s; }
.flying-square:nth-child(11) { width: 32px; height: 32px; background: #F7DF1E; left: 8%; animation-duration: 26s; animation-delay: -9s; }
.flying-square:nth-child(12) { width: 48px; height: 48px; background: #323330; left: 50%; animation-duration: 28s; animation-delay: -12s; }

@keyframes floatUp {
    0% { transform: translateY(100vh) rotate(0deg); opacity: 0; }
    5% { opacity: 0.15; }
    95% { opacity: 0.15; }
    100% { transform: translateY(-100px) rotate(360deg); opacity: 0; }
}

/* ==================== TEST CONTAINER ==================== */
.test-container {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 600px;
}

.test-screen {
    background: white;
    border-radius: 24px;
    padding: 50px 40px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    border: 3px solid #131010;
    text-align: center;
}

.test-screen.hidden {
    display: none;
}

/* ==================== INTRO SCREEN ==================== */
.test-logo img {
    width: 120px;
    height: 120px;
    margin-bottom: 25px;
    filter: drop-shadow(0 8px 20px rgba(247, 223, 30, 0.4));
}

.test-screen h1 {
    font-size: 2.2rem;
    color: #131010;
    margin-bottom: 15px;
    font-weight: 700;
}

.test-description {
    color: #666;
    font-size: 1.1rem;
    margin-bottom: 35px;
    line-height: 1.6;
}

/* Level Cards */
.level-cards {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-bottom: 35px;
    flex-wrap: wrap;
}

.level-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px 25px;
    border-radius: 16px;
    border: 2px solid #e5e5e5;
    transition: all 0.3s ease;
    min-width: 120px;
}

.level-card:hover {
    transform: translateY(-5px);
}

.level-junior { background: rgba(247, 223, 30, 0.15); border-color: #F7DF1E; }
.level-middle { background: rgba(255, 159, 0, 0.15); border-color: #FF9F00; }
.level-senior { background: rgba(39, 174, 96, 0.15); border-color: #27ae60; }

.level-emoji {
    font-size: 2rem;
    margin-bottom: 8px;
}

.level-name {
    font-weight: 700;
    font-size: 1rem;
    color: #131010;
}

.level-desc {
    font-size: 0.8rem;
    color: #666;
    margin-top: 4px;
}

/* Start Button */
.start-btn {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    background: #F7DF1E;
    color: #131010;
    border: 3px solid #131010;
    padding: 18px 45px;
    border-radius: 14px;
    font-size: 1.2rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Rubik', sans-serif;
}

.start-btn:hover {
    background: #e6cf1a;
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(247, 223, 30, 0.4);
}

.test-info {
    margin-top: 20px;
    color: #888;
    font-size: 0.95rem;
}

.login-warning {
    margin-top: 25px;
    padding: 15px 20px;
    background: #fff3cd;
    border: 2px solid #ffc107;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

.login-warning i {
    color: #856404;
}

.login-warning span {
    color: #856404;
    font-size: 0.9rem;
}

.login-warning a {
    color: #F7DF1E;
    font-weight: 600;
    text-decoration: underline;
    background: #131010;
    padding: 5px 12px;
    border-radius: 6px;
}

.login-warning.hidden {
    display: none;
}

/* ==================== QUESTION SCREEN ==================== */
.progress-bar {
    width: 100%;
    height: 10px;
    background: #e5e5e5;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 20px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #F7DF1E, #FF9F00);
    border-radius: 10px;
    transition: width 0.4s ease;
    width: 0%;
}

.question-counter {
    color: #666;
    font-size: 0.95rem;
    margin-bottom: 30px;
}

.question-card {
    text-align: left;
}

.question-text {
    font-size: 1.35rem;
    color: #131010;
    margin-bottom: 30px;
    line-height: 1.5;
    font-weight: 600;
}

.options-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.option-btn {
    width: 100%;
    padding: 18px 24px;
    background: #f8f8f8;
    border: 2px solid #e5e5e5;
    border-radius: 12px;
    font-size: 1.05rem;
    color: #131010;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
    font-family: 'Rubik', sans-serif;
}

.option-btn:hover {
    border-color: #F7DF1E;
    background: rgba(247, 223, 30, 0.1);
}

.option-btn.selected {
    border-color: #F7DF1E;
    background: rgba(247, 223, 30, 0.2);
    font-weight: 600;
}

.option-btn.correct {
    border-color: #27ae60;
    background: rgba(39, 174, 96, 0.2);
}

.option-btn.wrong {
    border-color: #e74c3c;
    background: rgba(231, 76, 60, 0.2);
}

/* ==================== RESULT SCREEN ==================== */
.result-animation {
    font-size: 4rem;
    margin-bottom: 20px;
    animation: bounce 0.6s ease infinite;
}

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

.result-title {
    font-size: 1.5rem;
    color: #666;
    margin-bottom: 20px;
    font-weight: 500;
}

.result-level {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 25px;
}

.result-emoji {
    font-size: 3.5rem;
}

.result-name {
    font-size: 3rem;
    font-weight: 700;
    color: #131010;
}

.result-name.junior { color: #F7DF1E; text-shadow: 1px 1px 0 #131010; }
.result-name.middle { color: #FF9F00; }
.result-name.senior { color: #27ae60; }

.result-score {
    font-size: 1.2rem;
    color: #666;
    margin-bottom: 15px;
}

.result-description {
    color: #888;
    font-size: 1rem;
    margin-bottom: 35px;
    line-height: 1.6;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

.result-actions {
    display: flex;
    flex-direction: column;
    gap: 15px;
    align-items: center;
}

.result-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 16px 35px;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    font-family: 'Rubik', sans-serif;
    border: 3px solid #131010;
}

.result-btn.primary {
    background: #F7DF1E;
    color: #131010;
}

.result-btn.primary:hover {
    background: #e6cf1a;
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(247, 223, 30, 0.4);
}

.result-btn.secondary {
    background: white;
    color: #131010;
}

.result-btn.secondary:hover {
    background: #f5f5f5;
}

/* ==================== CONFETTI ==================== */
.confetti {
    position: fixed;
    width: 12px;
    height: 12px;
    top: -20px;
    animation: confetti-fall linear forwards;
    z-index: 1000;
}

@keyframes confetti-fall {
    to {
        transform: translateY(100vh) rotate(720deg);
        opacity: 0;
    }
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 600px) {
    .test-screen {
        padding: 35px 25px;
    }

    .test-screen h1 {
        font-size: 1.8rem;
    }

    .test-logo img {
        width: 90px;
        height: 90px;
    }

    .level-cards {
        gap: 10px;
    }

    .level-card {
        padding: 15px 18px;
        min-width: 100px;
    }

    .start-btn {
        padding: 15px 35px;
        font-size: 1.1rem;
    }

    .question-text {
        font-size: 1.15rem;
    }

    .option-btn {
        padding: 15px 18px;
        font-size: 0.95rem;
    }

    .result-emoji {
        font-size: 2.5rem;
    }

    .result-name {
        font-size: 2.2rem;
    }
}
