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

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

body {
    font-family: 'Rubik', sans-serif;
    background: #faf9f7;
    min-height: 100vh;
    overflow-x: hidden;
}

/* Flying Squares - Python colors */
.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: 10px; opacity: 0; animation: floatUp linear infinite; }
.flying-square:nth-child(1) { width: 50px; height: 50px; background: #3776AB; left: 5%; animation-duration: 22s; }
.flying-square:nth-child(2) { width: 35px; height: 35px; background: #FFD43B; left: 15%; animation-duration: 18s; animation-delay: -4s; }
.flying-square:nth-child(3) { width: 70px; height: 70px; background: #C6DF2B; left: 25%; animation-duration: 28s; animation-delay: -8s; }
.flying-square:nth-child(4) { width: 25px; height: 25px; background: #3776AB; left: 40%; animation-duration: 20s; animation-delay: -2s; }
.flying-square:nth-child(5) { width: 45px; height: 45px; background: #FFD43B; left: 55%; animation-duration: 25s; animation-delay: -6s; }
.flying-square:nth-child(6) { width: 60px; height: 60px; background: #FF4E99; left: 70%; animation-duration: 23s; animation-delay: -10s; }
.flying-square:nth-child(7) { width: 30px; height: 30px; background: #3776AB; left: 82%; animation-duration: 19s; animation-delay: -3s; }
.flying-square:nth-child(8) { width: 55px; height: 55px; background: #009DFF; left: 92%; animation-duration: 26s; animation-delay: -7s; }

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

/* Container */
.test-container {
    position: relative;
    z-index: 1;
    max-width: 800px;
    margin: 0 auto;
    padding: 40px 20px;
    min-height: 100vh;
}

/* Screens */
.screen { display: none; }
.screen.active { display: block; animation: fadeIn 0.5s ease; }

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

/* Back Button */
.back-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #666;
    text-decoration: none;
    font-weight: 500;
    margin-bottom: 30px;
    transition: color 0.3s;
}
.back-btn:hover { color: #3776AB; }

/* Intro Screen */
.intro-content { text-align: center; }
.test-logo { font-size: 80px; margin-bottom: 20px; animation: bounce 2s infinite; }
@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-15px); }
}

.intro-content h1 {
    font-size: 2.5rem;
    color: #131010;
    margin-bottom: 15px;
}

.intro-content > p {
    color: #666;
    font-size: 1.15rem;
    margin-bottom: 40px;
}

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

.level-card {
    background: white;
    border: 3px solid #131010;
    border-radius: 16px;
    padding: 25px 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    min-width: 140px;
    transition: transform 0.3s, box-shadow 0.3s;
}

.level-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.level-card.junior { background: linear-gradient(135deg, #e8f5e9, #c8e6c9); }
.level-card.middle { background: linear-gradient(135deg, #e3f2fd, #bbdefb); }
.level-card.senior { background: linear-gradient(135deg, #fce4ec, #f8bbd9); }

.level-emoji { font-size: 2rem; }
.level-name { font-weight: 700; color: #131010; }
.level-desc { font-size: 0.85rem; color: #666; }

/* Test Info */
.test-info {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #666;
}

.info-item i { color: #3776AB; }

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

.start-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(55, 118, 171, 0.4);
}

/* Login Warning */
.login-warning {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 25px;
    padding: 15px 25px;
    background: #fff3cd;
    border: 2px solid #ffc107;
    border-radius: 12px;
    color: #856404;
}

.login-warning.show { display: flex; }

/* Progress Section */
.progress-section {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 40px;
}

.progress-bar {
    flex: 1;
    height: 12px;
    background: #e0e0e0;
    border-radius: 10px;
    overflow: hidden;
}

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

.progress-text {
    font-weight: 700;
    color: #131010;
    min-width: 60px;
}

/* Question Container */
.question-container {
    background: white;
    border: 3px solid #131010;
    border-radius: 24px;
    padding: 40px;
    margin-bottom: 30px;
}

.question-badge {
    display: inline-block;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 20px;
    background: #e8f5e9;
    color: #2e7d32;
}

.question-badge.middle { background: #e3f2fd; color: #1565c0; }
.question-badge.senior { background: #fce4ec; color: #c2185b; }

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

/* Answers */
.answers-grid {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.answer-btn {
    background: #f8f9fa;
    border: 3px solid #e0e0e0;
    border-radius: 14px;
    padding: 18px 24px;
    text-align: left;
    font-size: 1.05rem;
    cursor: pointer;
    transition: all 0.3s;
    font-family: 'Rubik', sans-serif;
}

.answer-btn:hover {
    border-color: #3776AB;
    background: #e3f2fd;
}

.answer-btn.selected {
    border-color: #3776AB;
    background: #3776AB;
    color: white;
}

.answer-btn.correct {
    border-color: #4caf50;
    background: #e8f5e9;
    color: #2e7d32;
}

.answer-btn.incorrect {
    border-color: #f44336;
    background: #ffebee;
    color: #c62828;
}

/* Navigation */
.navigation-btns {
    display: flex;
    justify-content: space-between;
    gap: 20px;
}

.nav-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 28px;
    border: 3px solid #131010;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    font-family: 'Rubik', sans-serif;
    background: white;
}

.nav-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.nav-btn.primary {
    background: #3776AB;
    color: white;
}

.nav-btn.primary:hover:not(:disabled) {
    background: #2c5f8a;
}

/* Result Screen */
.result-content { text-align: center; padding-top: 40px; }
.result-icon { font-size: 100px; margin-bottom: 20px; animation: bounce 2s infinite; }
.result-title { font-size: 1.5rem; color: #666; margin-bottom: 10px; }

.result-level {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 15px;
    background: linear-gradient(135deg, #3776AB, #FFD43B);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

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

.result-card {
    background: white;
    border: 3px solid #131010;
    border-radius: 20px;
    padding: 30px;
    margin-bottom: 40px;
}

.result-card.junior { background: linear-gradient(135deg, #e8f5e9, #f1f8e9); }
.result-card.middle { background: linear-gradient(135deg, #e3f2fd, #e1f5fe); }
.result-card.senior { background: linear-gradient(135deg, #fce4ec, #f3e5f5); }

.result-card p {
    font-size: 1.1rem;
    color: #444;
    line-height: 1.6;
}

/* Result Actions */
.result-actions {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.result-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 16px 32px;
    border: 3px solid #131010;
    border-radius: 14px;
    font-size: 1.05rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    font-family: 'Rubik', sans-serif;
}

.result-btn.primary {
    background: #3776AB;
    color: white;
}

.result-btn.primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(55, 118, 171, 0.4);
}

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

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

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

/* Responsive */
@media (max-width: 600px) {
    .test-container { padding: 20px 15px; }
    .intro-content h1 { font-size: 1.8rem; }
    .test-logo { font-size: 60px; }
    .level-cards { gap: 12px; }
    .level-card { padding: 18px 22px; min-width: 100px; }
    .question-container { padding: 25px 20px; }
    .question-text { font-size: 1.15rem; }
    .result-level { font-size: 2.2rem; }
}