/* Go Brown Professional Training - Main Styles */

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: linear-gradient(135deg, #1a1a1a, #0d0d0d);
    color: white;
    min-height: 100vh;
}

/* Login Screen */
#loginScreen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #1a1a1a, #0d0d0d);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

#loginScreen.hidden {
    display: none;
}

.login-container {
    background: linear-gradient(135deg, #2a2a2a, #1a1a1a);
    border: 3px solid #FFD700;
    border-radius: 30px;
    padding: 50px;
    max-width: 500px;
    width: 100%;
    text-align: center;
    box-shadow: 0 30px 60px rgba(0,0,0,0.8), 0 0 100px rgba(255,215,0,0.3);
}

.login-logo {
    font-size: 5rem;
    margin-bottom: 20px;
    animation: bounce 2s infinite;
}

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

.login-title {
    font-size: 2.5rem;
    color: #FFD700;
    margin-bottom: 10px;
    text-shadow: 0 0 30px rgba(255,215,0,0.8);
}

.login-subtitle {
    color: #FFA500;
    margin-bottom: 30px;
    font-size: 1.1rem;
}

.login-input {
    width: 100%;
    padding: 15px;
    margin: 10px 0;
    background: rgba(0,0,0,0.5);
    border: 2px solid #FFD700;
    border-radius: 15px;
    color: white;
    font-size: 1.1rem;
}

.login-input::placeholder {
    color: rgba(255,215,0,0.5);
}

.login-btn {
    background: linear-gradient(135deg, #FFD700, #FFA500);
    color: #1a1a1a;
    border: none;
    padding: 20px 40px;
    border-radius: 30px;
    font-size: 1.3rem;
    font-weight: bold;
    cursor: pointer;
    width: 100%;
    margin-top: 20px;
    transition: all 0.3s ease;
    box-shadow: 0 10px 30px rgba(255,215,0,0.5);
}

.login-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(255,215,0,0.7);
}

/* Main App */
#mainApp {
    display: none;
}

#mainApp.active {
    display: block;
}

/* Header */
.header {
    background: linear-gradient(135deg, #FFD700, #FFA500);
    padding: 30px;
    text-align: center;
    position: relative;
}

.header h1 {
    color: #1a1a1a;
    font-size: 2.5rem;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.leaderboard-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    background: linear-gradient(135deg, #1a1a1a, #2a2a2a);
    color: #FFD700;
    border: 2px solid #FFD700;
    padding: 12px 25px;
    border-radius: 25px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

.leaderboard-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255,215,0,0.4);
    background: linear-gradient(135deg, #2a2a2a, #3a3a3a);
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Stats */
.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.stat-card {
    background: rgba(255,215,0,0.1);
    border: 2px solid #FFD700;
    padding: 20px;
    text-align: center;
    border-radius: 10px;
    transition: all 0.3s;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(255,215,0,0.3);
}

.stat-value {
    font-size: 2rem;
    color: #FFD700;
    font-weight: bold;
}

/* Modules */
.modules {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.module-card {
    background: rgba(42,42,42,0.9);
    border: 2px solid #FFD700;
    padding: 25px;
    border-radius: 15px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
}

.module-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(255,215,0,0.3);
}

.module-card.completed {
    background: rgba(74,222,128,0.1);
    border-color: #4ADE80;
}

.module-card.locked {
    opacity: 0.5;
    cursor: not-allowed;
}

.module-icon {
    font-size: 3rem;
    margin-bottom: 15px;
}

.module-title {
    color: #FFD700;
    font-size: 1.2rem;
    margin-bottom: 10px;
}

.start-btn {
    background: #FFD700;
    color: #1a1a1a;
    border: none;
    padding: 10px 20px;
    border-radius: 20px;
    font-weight: bold;
    cursor: pointer;
    margin-top: 15px;
}

.start-btn:disabled {
    background: #666;
    cursor: not-allowed;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.95);
    z-index: 1000;
    overflow-y: auto;
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-content {
    background: #2a2a2a;
    border: 3px solid #FFD700;
    border-radius: 20px;
    max-width: 900px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
}

/* Reading Progress Bar */
.reading-progress {
    position: sticky;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: rgba(255,255,255,0.1);
    z-index: 100;
}

.reading-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #FFD700, #FFA500);
    width: 0%;
    transition: width 0.3s ease;
    box-shadow: 0 0 10px rgba(255,215,0,0.5);
}

.modal-header {
    background: linear-gradient(135deg, #FFD700, #FFA500);
    padding: 30px;
    color: #1a1a1a;
    text-align: center;
    border-radius: 20px 20px 0 0;
}

.modal-body {
    padding: 30px;
    color: #fff;
    line-height: 1.8;
}

.modal-body h3 {
    color: #FFD700;
    font-size: 1.8rem;
    margin-bottom: 20px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.modal-body h4 {
    color: #FFA500;
    font-size: 1.3rem;
    margin-top: 25px;
    margin-bottom: 15px;
    border-bottom: 2px solid rgba(255,215,0,0.3);
    padding-bottom: 10px;
}

.modal-body p {
    color: #e0e0e0;
    font-size: 1.1rem;
    margin: 15px 0;
    line-height: 1.7;
}

.modal-body ul {
    list-style: none;
    padding-left: 0;
    margin: 20px 0;
}

.modal-body ul li {
    color: #fff;
    font-size: 1.05rem;
    padding: 10px 0;
    padding-left: 30px;
    position: relative;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.modal-body ul li:before {
    content: "▸";
    color: #FFD700;
    position: absolute;
    left: 0;
    font-size: 1.2rem;
}

.modal-body ul li:last-child {
    border-bottom: none;
}

.modal-body strong {
    color: #FFD700;
    font-weight: 600;
}

/* Accordion Sections */
.accordion-container {
    margin: 20px 0;
}

.accordion-section {
    background: rgba(255,255,255,0.03);
    border: 2px solid rgba(255,215,0,0.2);
    border-radius: 15px;
    margin-bottom: 15px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.accordion-section.active {
    border-color: #FFD700;
    box-shadow: 0 5px 20px rgba(255,215,0,0.2);
}

.accordion-header {
    background: linear-gradient(135deg, rgba(255,215,0,0.1), rgba(255,165,0,0.05));
    padding: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.accordion-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,215,0,0.2), transparent);
    transition: left 0.5s;
}

.accordion-header:hover::before {
    left: 100%;
}

.accordion-header:hover {
    background: linear-gradient(135deg, rgba(255,215,0,0.15), rgba(255,165,0,0.1));
}

.accordion-title {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 1.3rem;
    color: #FFD700;
    font-weight: 600;
}

.accordion-icon {
    font-size: 1.8rem;
    min-width: 40px;
    text-align: center;
}

.accordion-arrow {
    font-size: 1.5rem;
    color: #FFA500;
    transition: transform 0.3s ease;
}

.accordion-section.active .accordion-arrow {
    transform: rotate(180deg);
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s ease, padding 0.3s ease;
    padding: 0 20px;
}

.accordion-section.active .accordion-content {
    max-height: 2000px;
    padding: 20px;
}

.accordion-content ul {
    list-style: none;
    padding-left: 0;
    margin: 15px 0;
}

.accordion-content ul li {
    color: #e0e0e0;
    font-size: 1.05rem;
    padding: 12px 0;
    padding-left: 35px;
    position: relative;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    transition: all 0.3s ease;
}

.accordion-content ul li:hover {
    padding-left: 40px;
    color: #fff;
}

.accordion-content ul li:before {
    content: "▸";
    color: #FFD700;
    position: absolute;
    left: 10px;
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

.accordion-content ul li:hover:before {
    left: 15px;
    color: #FFA500;
}

/* Reading Stats */
.reading-stats {
    background: rgba(255,215,0,0.05);
    border: 1px solid rgba(255,215,0,0.2);
    border-radius: 15px;
    padding: 15px;
    margin: 20px 0;
    display: flex;
    justify-content: space-around;
    align-items: center;
}

.reading-stat {
    text-align: center;
}

.reading-stat-value {
    color: #FFD700;
    font-size: 1.5rem;
    font-weight: bold;
}

.reading-stat-label {
    color: rgba(255,255,255,0.6);
    font-size: 0.9rem;
    margin-top: 5px;
}

/* Section Complete Badge */
.section-complete {
    display: inline-block;
    background: linear-gradient(135deg, #10B981, #059669);
    color: white;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    margin-left: 10px;
    animation: pulse 2s infinite;
}

/* Content Animation */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.accordion-section.active .accordion-content > * {
    animation: slideDown 0.5s ease forwards;
}

.close-btn {
    float: right;
    font-size: 30px;
    cursor: pointer;
    background: none;
    border: none;
    color: #1a1a1a;
}

/* Quiz Button in Modal */
.quiz-start-btn {
    background: linear-gradient(135deg, #FFD700, #FFA500);
    color: #1a1a1a;
    border: none;
    padding: 20px 40px;
    border-radius: 30px;
    width: 100%;
    margin-top: 30px;
    font-size: 1.3rem;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 10px 30px rgba(255,215,0,0.4);
    transition: all 0.3s ease;
}

.quiz-start-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(255,215,0,0.6);
}

/* Quiz */
.quiz-option {
    background: #1a1a1a;
    padding: 15px;
    margin: 10px 0;
    border-radius: 10px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.3s;
}

.quiz-option:hover {
    border-color: #FFD700;
}

.quiz-option.correct {
    background: rgba(74,222,128,0.2);
    border-color: #4ADE80;
}

.quiz-option.incorrect {
    background: rgba(239,68,68,0.2);
    border-color: #EF4444;
}

/* Menu */
.menu-btn {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 100;
    background: #FFD700;
    border: none;
    padding: 15px;
    border-radius: 10px;
    font-size: 1.5rem;
    cursor: pointer;
}

/* Professional Sidebar */
.sidebar {
    position: fixed;
    left: -380px;
    top: 0;
    width: 380px;
    height: 100vh;
    background: linear-gradient(180deg, #0a0a0a 0%, #1a1a1a 50%, #0a0a0a 100%);
    border-right: 4px solid transparent;
    background-clip: padding-box;
    transition: left 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 99;
    padding: 90px 25px 25px;
    overflow-y: auto;
    box-shadow: 5px 0 30px rgba(0,0,0,0.8), 0 0 80px rgba(255,215,0,0.1);
}

.sidebar::before {
    content: '';
    position: absolute;
    top: 0;
    right: -4px;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, #FFD700, #FFA500, #FFD700);
    animation: goldPulse 3s ease-in-out infinite;
}

@keyframes goldPulse {
    0%, 100% { opacity: 0.8; }
    50% { opacity: 1; }
}

.sidebar.open {
    left: 0;
}

.sidebar h3 {
    color: #FFD700;
    margin-bottom: 15px;
    font-size: 1.8rem;
    text-align: center;
    text-shadow: 0 0 20px rgba(255,215,0,0.8);
    font-weight: 700;
    letter-spacing: 1px;
}

.sidebar-item {
    padding: 18px;
    margin: 12px 0;
    background: linear-gradient(135deg, rgba(42,42,42,0.6), rgba(30,30,30,0.4));
    border: 2px solid rgba(255,255,255,0.05);
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 15px;
    position: relative;
    overflow: hidden;
}

.sidebar-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,215,0,0.1), transparent);
    transition: left 0.5s;
}

.sidebar-item:hover::before {
    left: 100%;
}

.sidebar-item.active {
    background: linear-gradient(135deg, rgba(255,215,0,0.25), rgba(255,165,0,0.15));
    border: 2px solid #FFD700;
    transform: translateX(8px) scale(1.02);
    box-shadow: 0 8px 25px rgba(255,215,0,0.4);
}

.sidebar-item.active::after {
    content: '▸';
    position: absolute;
    left: -8px;
    color: #FFD700;
    font-size: 1.5rem;
    animation: pulse 1.5s infinite;
}

.sidebar-item.completed {
    background: linear-gradient(135deg, rgba(74,222,128,0.15), rgba(16,185,129,0.1));
    border: 2px solid rgba(74,222,128,0.5);
}

.sidebar-item.completed .sidebar-icon {
    filter: grayscale(0.3);
}

.sidebar-item.locked {
    opacity: 0.4;
    cursor: not-allowed;
    background: linear-gradient(135deg, rgba(20,20,20,0.5), rgba(10,10,10,0.3));
    border: 2px solid rgba(255,255,255,0.02);
}

.sidebar-item:hover:not(.locked):not(.active) {
    background: linear-gradient(135deg, rgba(255,215,0,0.18), rgba(255,165,0,0.1));
    border-color: rgba(255,215,0,0.5);
    transform: translateX(8px);
    box-shadow: 0 5px 20px rgba(255,215,0,0.2);
}

.sidebar-icon {
    font-size: 1.8rem;
    min-width: 35px;
    text-align: center;
}

.sidebar-text {
    flex: 1;
    color: #fff;
    font-size: 1.05rem;
    font-weight: 500;
    letter-spacing: 0.3px;
}

.sidebar-item.completed .sidebar-text {
    text-decoration: line-through;
    opacity: 0.8;
}

.sidebar-status {
    color: #4ADE80;
    font-size: 1.4rem;
    min-width: 30px;
    text-align: center;
}

.sidebar-item.locked .sidebar-status {
    color: rgba(255,255,255,0.3);
}

/* Progress Bar */
.sidebar-progress {
    background: rgba(255,255,255,0.05);
    border-radius: 20px;
    height: 8px;
    margin: 0 10px 10px;
    overflow: hidden;
    position: relative;
}

.sidebar-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #FFD700, #FFA500);
    border-radius: 20px;
    transition: width 0.5s ease;
    box-shadow: 0 0 10px rgba(255,215,0,0.5);
}

/* Sidebar Stats Section */
.sidebar-stats {
    background: rgba(255,215,0,0.05);
    border: 1px solid rgba(255,215,0,0.2);
    border-radius: 15px;
    padding: 15px;
    margin: 20px 0;
    text-align: center;
}

.sidebar-stats h4 {
    color: #FFA500;
    margin-bottom: 10px;
    font-size: 1.1rem;
}

.sidebar-stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 10px;
}

.sidebar-stat {
    background: rgba(0,0,0,0.3);
    padding: 8px;
    border-radius: 8px;
}

.sidebar-stat-value {
    color: #FFD700;
    font-size: 1.3rem;
    font-weight: bold;
}

.sidebar-stat-label {
    color: rgba(255,255,255,0.6);
    font-size: 0.8rem;
    margin-top: 2px;
}

/* Eliminator Round */
#eliminatorModal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.98);
    z-index: 2000;
    align-items: center;
    justify-content: center;
}

#eliminatorModal.show {
    display: flex;
    animation: epicEntrance 1s ease;
}

@keyframes epicEntrance {
    0% {
        transform: scale(0) rotate(720deg);
        opacity: 0;
    }
    50% {
        transform: scale(1.2) rotate(360deg);
    }
    100% {
        transform: scale(1) rotate(0deg);
        opacity: 1;
    }
}

.eliminator-container {
    background: linear-gradient(135deg, #1a1a1a, #2a2a2a);
    border: 4px solid #FFD700;
    border-radius: 30px;
    padding: 40px;
    max-width: 600px;
    width: 90%;
    text-align: center;
    box-shadow: 0 0 100px rgba(255,215,0,0.5);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { box-shadow: 0 0 50px rgba(255,215,0,0.5); }
    50% { box-shadow: 0 0 100px rgba(255,215,0,0.8); }
}

@keyframes fadeUp {
    0% {
        opacity: 0;
        transform: translate(-50%, 20px);
    }
    50% {
        opacity: 1;
        transform: translate(-50%, -10px);
    }
    100% {
        opacity: 0;
        transform: translate(-50%, -30px);
    }
}

.eliminator-title {
    font-size: 3rem;
    color: #FFD700;
    margin-bottom: 20px;
    text-shadow: 0 0 30px rgba(255,215,0,0.8);
    animation: glow 2s ease-in-out infinite;
}

@keyframes glow {
    0%, 100% { text-shadow: 0 0 30px rgba(255,215,0,0.8); }
    50% { text-shadow: 0 0 50px rgba(255,215,0,1); }
}

.eliminator-question {
    font-size: 1.5rem;
    margin: 30px 0;
    min-height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.swipe-container {
    display: flex;
    justify-content: center;
    gap: 80px;
    margin-top: 40px;
}

.swipe-btn {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    border: none;
    font-size: 3rem;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.swipe-left {
    background: linear-gradient(135deg, #EF4444, #DC2626);
    box-shadow: 0 10px 30px rgba(239,68,68,0.5);
}

.swipe-right {
    background: linear-gradient(135deg, #10B981, #059669);
    box-shadow: 0 10px 30px rgba(16,185,129,0.5);
}

.swipe-btn:hover {
    transform: scale(1.1);
}

.swipe-btn:active {
    transform: scale(0.95);
}

.eliminator-progress {
    margin-top: 30px;
    color: #FFD700;
    font-size: 1.2rem;
}

/* Combo Feedback */
.combo-popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 5rem;
    font-weight: bold;
    color: #FFD700;
    text-shadow: 0 0 40px rgba(255,215,0,1);
    z-index: 3000;
    animation: comboAnimation 1.5s ease;
    pointer-events: none;
}

@keyframes comboAnimation {
    0% {
        transform: translate(-50%, -50%) scale(0) rotate(0deg);
        opacity: 0;
    }
    30% {
        transform: translate(-50%, -50%) scale(1.8) rotate(180deg);
        opacity: 1;
    }
    70% {
        transform: translate(-50%, -50%) scale(1.2) rotate(360deg);
        opacity: 1;
    }
    100% {
        transform: translate(-50%, -50%) scale(1) rotate(380deg);
        opacity: 0;
    }
}

/* Correct Answer Feedback */
.correct-answer-flash {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(74,222,128,0.3), transparent);
    z-index: 2999;
    animation: correctFlash 0.6s ease;
    pointer-events: none;
}

@keyframes correctFlash {
    0% { opacity: 0; }
    50% { opacity: 1; }
    100% { opacity: 0; }
}

/* Wrong Answer Shake */
.shake {
    animation: shake 0.5s;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    75% { transform: translateX(10px); }
}

/* Lives Warning Modal */
.lives-warning {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0) rotateY(0deg);
    background: linear-gradient(135deg, #1a1a1a, #2a2a2a);
    border: 4px solid #EF4444;
    border-radius: 30px;
    padding: 40px;
    text-align: center;
    z-index: 5000;
    animation: livesWarning3D 2s ease forwards;
    box-shadow: 0 0 50px rgba(239,68,68,0.8);
}

@keyframes livesWarning3D {
    0% {
        transform: translate(-50%, -50%) scale(0) rotateY(0deg);
        opacity: 0;
    }
    20% {
        transform: translate(-50%, -50%) scale(1.3) rotateY(180deg);
        opacity: 1;
    }
    40% {
        transform: translate(-50%, -50%) scale(1.1) rotateY(360deg);
    }
    60% {
        transform: translate(-50%, -50%) scale(1.2) rotateY(380deg);
    }
    80% {
        transform: translate(-50%, -50%) scale(1) rotateY(360deg);
    }
    100% {
        transform: translate(-50%, -50%) scale(1) rotateY(360deg);
        opacity: 1;
    }
}

.lives-warning h2 {
    color: #EF4444;
    font-size: 3rem;
    margin-bottom: 20px;
    text-shadow: 0 0 30px rgba(239,68,68,0.8);
    animation: pulse 1s infinite;
}

.lives-display {
    font-size: 4rem;
    margin: 20px 0;
    animation: heartbeat 1.5s infinite;
}

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

.lives-warning p {
    color: #FFA500;
    font-size: 1.3rem;
    margin: 20px 0;
}

.lives-warning button {
    background: linear-gradient(135deg, #FFD700, #FFA500);
    color: #1a1a1a;
    border: none;
    padding: 15px 30px;
    border-radius: 25px;
    font-size: 1.2rem;
    font-weight: bold;
    cursor: pointer;
    margin-top: 20px;
    transition: all 0.3s;
}

.lives-warning button:hover {
    transform: scale(1.1);
    box-shadow: 0 10px 30px rgba(255,215,0,0.5);
}

/* Confetti */
.confetti {
    position: fixed;
    width: 10px;
    height: 10px;
    top: -10px;
    z-index: 3000;
    animation: confettiFall 3s linear;
}

@keyframes confettiFall {
    to {
        transform: translateY(100vh) rotate(360deg);
    }
}

/* Styled Message Modal */
.styled-message {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    background: linear-gradient(135deg, #2a2a2a, #1a1a1a);
    border-radius: 20px;
    padding: 30px;
    text-align: center;
    z-index: 6000;
    min-width: 350px;
    max-width: 500px;
    animation: messagePopup 0.5s ease forwards;
    box-shadow: 0 20px 60px rgba(0,0,0,0.8);
}

@keyframes messagePopup {
    to {
        transform: translate(-50%, -50%) scale(1);
    }
}

.styled-message.success {
    border: 3px solid #4ADE80;
    box-shadow: 0 20px 60px rgba(74,222,128,0.3);
}

.styled-message.error {
    border: 3px solid #EF4444;
    box-shadow: 0 20px 60px rgba(239,68,68,0.3);
}

.styled-message.warning {
    border: 3px solid #FFA500;
    box-shadow: 0 20px 60px rgba(255,165,0,0.3);
}

.styled-message h3 {
    font-size: 2rem;
    margin-bottom: 15px;
}

.styled-message.success h3 {
    color: #4ADE80;
}

.styled-message.error h3 {
    color: #EF4444;
}

.styled-message.warning h3 {
    color: #FFA500;
}

.styled-message p {
    color: #e0e0e0;
    font-size: 1.2rem;
    margin-bottom: 20px;
    line-height: 1.4;
}

.styled-message button {
    background: linear-gradient(135deg, #FFD700, #FFA500);
    color: #1a1a1a;
    border: none;
    padding: 12px 30px;
    border-radius: 20px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
}

.styled-message button:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 30px rgba(255,215,0,0.4);
}

/* Footer */
.footer {
    background: linear-gradient(135deg, #1a1a1a, #0d0d0d);
    border-top: 3px solid #FFD700;
    padding: 30px;
    text-align: center;
    margin-top: 50px;
}

.footer h3 {
    color: #FFD700;
    font-size: 1.8rem;
    margin-bottom: 10px;
    text-shadow: 0 2px 10px rgba(255,215,0,0.5);
}

.footer p {
    color: #FFA500;
    font-size: 1.1rem;
    margin-bottom: 5px;
}

.footer a {
    color: #FFD700;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s;
}

.footer a:hover {
    color: #FFA500;
    text-shadow: 0 0 10px rgba(255,215,0,0.8);
}

/* Daily Reward Modal */
.daily-reward-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    transition: opacity 0.5s;
}

.daily-reward-modal.show {
    opacity: 1;
}

.daily-reward-container {
    background: linear-gradient(135deg, #2a2a2a, #1a1a1a);
    border: 4px solid #FFD700;
    border-radius: 30px;
    padding: 40px;
    text-align: center;
    max-width: 600px;
    animation: bounceIn 0.8s;
}

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

.reward-icon {
    font-size: 6rem;
    margin: 20px 0;
    animation: pulse 2s infinite;
}

.streak-display {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin: 30px 0;
}

.streak-day {
    padding: 10px;
    background: rgba(255,255,255,0.1);
    border-radius: 10px;
    opacity: 0.5;
}

.streak-day.collected {
    background: rgba(255,215,0,0.2);
    border: 2px solid #FFD700;
    opacity: 1;
}

.streak-day.today {
    background: linear-gradient(135deg, #FFD700, #FFA500);
    transform: scale(1.2);
    animation: glow 2s infinite;
}

.claim-btn {
    background: linear-gradient(135deg, #FFD700, #FFA500);
    color: #1a1a1a;
    border: none;
    padding: 20px 40px;
    border-radius: 30px;
    font-size: 1.5rem;
    font-weight: bold;
    cursor: pointer;
    animation: pulse 1.5s infinite;
    transition: all 0.3s;
}

.claim-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 20px 40px rgba(255,215,0,0.6);
}

/* Power-Up Gained Popup */
.powerup-gained {
    position: fixed;
    bottom: -100px;
    right: 20px;
    background: linear-gradient(135deg, #2a2a2a, #1a1a1a);
    border: 3px solid #FFD700;
    border-radius: 20px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    transition: bottom 0.5s ease;
    z-index: 5000;
}

.powerup-gained.show {
    bottom: 20px;
}

.powerup-icon {
    font-size: 3rem;
}

/* Achievement Unlocked */
.achievement-unlocked {
    position: fixed;
    top: -300px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #2a2a2a, #1a1a1a);
    border: 4px solid #FFD700;
    border-radius: 25px;
    padding: 30px;
    text-align: center;
    transition: top 0.5s ease;
    z-index: 10000;
    min-width: 400px;
}

.achievement-unlocked.show {
    top: 50px;
}

.achievement-icon {
    font-size: 5rem;
    margin: 20px 0;
}

.achievement-xp {
    font-size: 2rem;
    color: #FFD700;
    font-weight: bold;
    margin-top: 20px;
}

/* Mystery Box Modal */
.mystery-box-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

.mystery-box-container {
    background: linear-gradient(135deg, #2a2a2a, #1a1a1a);
    border: 4px solid #FFD700;
    border-radius: 30px;
    padding: 40px;
    text-align: center;
}

.box-animation {
    font-size: 8rem;
    margin: 30px 0;
}

.box-animation.shaking {
    animation: shake 0.5s infinite;
}

.rarity-common { color: #808080; font-size: 2rem; }
.rarity-rare { color: #3B82F6; font-size: 2rem; }
.rarity-epic { color: #A855F7; font-size: 2.5rem; }
.rarity-legendary { 
    color: #FFD700; 
    font-size: 3rem;
    text-shadow: 0 0 30px rgba(255,215,0,1);
    animation: glow 1s infinite;
}

/* Near Miss Modal */
.near-miss-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    background: linear-gradient(135deg, #2a2a2a, #1a1a1a);
    border: 4px solid #FFA500;
    border-radius: 25px;
    padding: 30px;
    text-align: center;
    z-index: 5000;
    transition: transform 0.3s;
}

.near-miss-modal.show {
    transform: translate(-50%, -50%) scale(1);
}

.progress-visual {
    width: 100%;
    height: 40px;
    background: rgba(255,255,255,0.1);
    border-radius: 20px;
    overflow: hidden;
    position: relative;
    margin: 20px 0;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #FFD700, #FFA500);
    border-radius: 20px;
    animation: pulse 2s infinite;
}

.progress-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-weight: bold;
    font-size: 1.2rem;
}

.retry-btn {
    background: linear-gradient(135deg, #10B981, #059669);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 25px;
    font-size: 1.2rem;
    font-weight: bold;
    cursor: pointer;
    margin-top: 20px;
    animation: pulse 1.5s infinite;
}

/* Power-Up Buttons in Quiz */
.powerup-bar {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin: 20px 0;
}

.powerup-btn {
    background: rgba(255,215,0,0.1);
    border: 2px solid #FFD700;
    border-radius: 15px;
    padding: 10px 15px;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
}

.powerup-btn:hover {
    background: rgba(255,215,0,0.3);
    transform: scale(1.1);
}

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

.powerup-count {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #FFD700;
    color: #1a1a1a;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: bold;
}

/* Leaderboard Styles */
.leaderboard-content {
    max-width: 700px;
}

.leaderboard-tabs {
    display: flex;
    gap: 10px;
    padding: 20px;
    background: rgba(0,0,0,0.3);
    border-radius: 15px;
    margin-bottom: 20px;
}

.tab-btn {
    flex: 1;
    background: rgba(255,255,255,0.1);
    border: 2px solid rgba(255,215,0,0.3);
    color: #FFA500;
    padding: 12px;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
}

.tab-btn:hover {
    background: rgba(255,215,0,0.2);
}

.tab-btn.active {
    background: linear-gradient(135deg, #FFD700, #FFA500);
    color: #1a1a1a;
    border-color: #FFD700;
}

.tournament-banner {
    background: linear-gradient(135deg, #FF6B6B, #FF1744);
    border-radius: 15px;
    padding: 20px;
    margin: 20px;
    text-align: center;
    animation: pulse 2s infinite;
}

.tournament-banner h3 {
    color: white;
    font-size: 1.5rem;
    margin-bottom: 10px;
}

.tournament-timer {
    font-size: 1.3rem;
    color: #FFD700;
    margin: 10px 0;
}

.tournament-prize {
    color: white;
    font-size: 1.1rem;
}

.your-rank-card {
    background: linear-gradient(135deg, rgba(255,215,0,0.2), rgba(255,165,0,0.1));
    border: 3px solid #FFD700;
    border-radius: 15px;
    padding: 20px;
    margin: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.rank-position {
    font-size: 2rem;
    color: #FFD700;
    font-weight: bold;
}

.rank-details {
    flex: 1;
    margin: 0 20px;
}

.rank-name {
    display: block;
    font-size: 1.3rem;
    color: white;
    margin-bottom: 5px;
}

.rank-xp {
    color: #FFA500;
    font-size: 1.1rem;
}

.rank-trend {
    font-size: 1.5rem;
}

.leaderboard-list {
    max-height: 400px;
    overflow-y: auto;
    padding: 0 20px;
}

.leaderboard-item {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 15px;
    transition: all 0.3s;
}

.leaderboard-item:hover {
    background: rgba(255,255,255,0.05);
    transform: translateX(5px);
}

.leaderboard-item.is-you {
    background: rgba(255,215,0,0.1);
    border: 2px solid #FFD700;
}

.leaderboard-item.top-three {
    background: linear-gradient(135deg, rgba(255,215,0,0.1), rgba(255,165,0,0.05));
}

.rank-number {
    font-size: 1.3rem;
    font-weight: bold;
    min-width: 40px;
    text-align: center;
    color: #FFD700;
}

.player-avatar {
    font-size: 2rem;
}

.player-info {
    flex: 1;
}

.player-name {
    font-size: 1.1rem;
    color: white;
    margin-bottom: 5px;
}

.country-flag {
    margin-left: 5px;
    font-size: 1rem;
}

.player-stats {
    color: rgba(255,255,255,0.6);
    font-size: 0.9rem;
}

.player-xp {
    font-size: 1.2rem;
    color: #FFA500;
    font-weight: bold;
}

.leaderboard-actions {
    display: flex;
    gap: 10px;
    padding: 20px;
}

.action-btn {
    flex: 1;
    background: linear-gradient(135deg, #FFD700, #FFA500);
    color: #1a1a1a;
    border: none;
    padding: 15px;
    border-radius: 15px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
}

.action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(255,215,0,0.4);
}

.friends-empty {
    text-align: center;
    padding: 50px;
    color: rgba(255,255,255,0.6);
}

.friends-empty h3 {
    color: #FFA500;
    margin-bottom: 10px;
}

/* Advanced Level System Styles */
.advanced-status {
    display: flex;
    gap: 15px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.stat-card.advanced {
    background: linear-gradient(135deg, rgba(255,165,0,0.2), rgba(255,215,0,0.1));
    border: 2px solid #FFA500;
    box-shadow: 0 5px 20px rgba(255,165,0,0.3);
}

.stat-card.certification {
    background: linear-gradient(135deg, rgba(255,215,0,0.3), rgba(255,215,0,0.2));
    border: 3px solid #FFD700;
    animation: certificationPulse 2s infinite;
    transform: scale(1.1);
}

@keyframes certificationPulse {
    0%, 100% { 
        box-shadow: 0 0 30px rgba(255,215,0,0.5);
        transform: scale(1.1);
    }
    50% { 
        box-shadow: 0 0 50px rgba(255,215,0,0.8);
        transform: scale(1.15);
    }
}

.certification-ready {
    display: flex;
    justify-content: center;
    animation: bounce 2s infinite;
}

.module-card.certification-card {
    background: linear-gradient(135deg, #1a1a1a, #2a2a2a);
    border: 4px solid #FFD700;
    box-shadow: 0 0 50px rgba(255,215,0,0.6);
    animation: certificationGlow 3s infinite;
    transform: scale(1.05);
}

@keyframes certificationGlow {
    0%, 100% { 
        border-color: #FFD700;
        box-shadow: 0 0 50px rgba(255,215,0,0.6);
    }
    50% { 
        border-color: #FFA500;
        box-shadow: 0 0 80px rgba(255,215,0,0.9);
    }
}

.start-btn.certification {
    background: linear-gradient(135deg, #FFD700, #FFA500);
    font-size: 1.3rem;
    padding: 18px 35px;
    animation: certificationButton 2s infinite;
}

@keyframes certificationButton {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-3px) scale(1.05); }
}

/* Advanced Section */
.advanced-section {
    margin-top: 60px;
    padding: 40px 20px;
    background: linear-gradient(135deg, rgba(255,165,0,0.05), rgba(255,215,0,0.02));
    border-radius: 25px;
    border: 2px solid rgba(255,165,0,0.2);
}

.advanced-title {
    color: #FFA500;
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 10px;
    text-shadow: 0 0 30px rgba(255,165,0,0.8);
    font-weight: 700;
}

.advanced-subtitle {
    color: rgba(255,255,255,0.7);
    font-size: 1.3rem;
    text-align: center;
    margin-bottom: 40px;
    font-style: italic;
}

.advanced-level {
    margin-bottom: 50px;
    padding: 30px;
    background: rgba(0,0,0,0.3);
    border-radius: 20px;
    border: 2px solid rgba(255,165,0,0.3);
}

.advanced-level.locked {
    opacity: 0.6;
    background: rgba(0,0,0,0.1);
    border-color: rgba(255,255,255,0.1);
}

.advanced-level h3 {
    color: #FFA500;
    font-size: 2rem;
    margin-bottom: 15px;
    text-shadow: 0 0 20px rgba(255,165,0,0.6);
}

.advanced-level p {
    color: rgba(255,255,255,0.8);
    font-size: 1.2rem;
    margin-bottom: 25px;
    line-height: 1.6;
}

.module-card.advanced {
    background: linear-gradient(135deg, rgba(255,165,0,0.1), rgba(255,215,0,0.05));
    border: 2px solid #FFA500;
    position: relative;
    overflow: hidden;
}

.module-card.advanced::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255,165,0,0.1), transparent);
    transform: rotate(45deg);
    animation: advancedShimmer 3s infinite;
}

@keyframes advancedShimmer {
    0% { transform: translateX(-100%) translateY(-100%) rotate(45deg); }
    100% { transform: translateX(100%) translateY(100%) rotate(45deg); }
}

.module-card.advanced.completed {
    background: linear-gradient(135deg, rgba(255,215,0,0.2), rgba(255,165,0,0.1));
    border-color: #FFD700;
    box-shadow: 0 0 30px rgba(255,215,0,0.4);
}

.difficulty-badge {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 0.9rem;
    font-weight: bold;
    margin-top: 10px;
}

.difficulty-badge {
    background: linear-gradient(135deg, #FF6B6B, #FF1744);
    color: white;
    text-shadow: 0 1px 3px rgba(0,0,0,0.5);
}

.start-btn.advanced {
    background: linear-gradient(135deg, #FFA500, #FF6B35);
    border: 2px solid #FFA500;
    box-shadow: 0 8px 25px rgba(255,165,0,0.4);
    position: relative;
    overflow: hidden;
}

.start-btn.advanced::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.start-btn.advanced:hover::before {
    left: 100%;
}

.start-btn.advanced:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 12px 35px rgba(255,165,0,0.6);
}

/* Difficulty Multiplier Display */
.difficulty-display {
    position: fixed;
    top: 20px;
    right: 20px;
    background: rgba(255,165,0,0.1);
    border: 2px solid #FFA500;
    border-radius: 15px;
    padding: 10px 20px;
    color: #FFA500;
    font-weight: bold;
    z-index: 50;
}

/* Time-based scoring indicator */
.time-indicator {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(255,0,0,0.8);
    color: white;
    padding: 5px 10px;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: bold;
    animation: timeWarning 1s infinite;
}

@keyframes timeWarning {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

/* Scenario mode styling */
.scenario-question {
    background: linear-gradient(135deg, rgba(255,165,0,0.1), rgba(255,215,0,0.05));
    border: 2px solid #FFA500;
    border-radius: 15px;
    padding: 25px;
    margin: 20px 0;
    position: relative;
}

.scenario-question::before {
    content: '🎭';
    position: absolute;
    top: -10px;
    left: 20px;
    background: #1a1a1a;
    padding: 0 10px;
    font-size: 1.5rem;
}

.scenario-context {
    font-style: italic;
    color: rgba(255,255,255,0.8);
    margin-bottom: 15px;
    line-height: 1.6;
}

.scenario-question-text {
    color: #FFA500;
    font-weight: bold;
    font-size: 1.2rem;
}

/* Multiple correct answers styling */
.multi-select-hint {
    background: rgba(255,215,0,0.1);
    border: 1px solid #FFD700;
    border-radius: 10px;
    padding: 10px 15px;
    margin: 15px 0;
    color: #FFD700;
    font-size: 0.9rem;
    text-align: center;
}

.quiz-option.multi-select {
    position: relative;
}

.quiz-option.multi-select::before {
    content: '☐';
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.2rem;
    color: #FFD700;
}

.quiz-option.multi-select.selected::before {
    content: '☑';
    color: #4ADE80;
}

.quiz-option.multi-select {
    padding-left: 45px;
}

/* Advanced progress indicators */
.mastery-progress {
    background: rgba(255,165,0,0.1);
    border: 2px solid #FFA500;
    border-radius: 15px;
    padding: 20px;
    margin: 30px 0;
    text-align: center;
}

.mastery-title {
    color: #FFA500;
    font-size: 1.5rem;
    margin-bottom: 15px;
}

.mastery-bars {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.mastery-bar {
    text-align: center;
}

.mastery-label {
    color: rgba(255,255,255,0.8);
    font-size: 0.9rem;
    margin-bottom: 8px;
}

.mastery-progress-bar {
    background: rgba(255,255,255,0.1);
    height: 8px;
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}

.mastery-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #FFA500, #FFD700);
    border-radius: 4px;
    transition: width 1s ease;
}

.mastery-percentage {
    color: #FFD700;
    font-weight: bold;
    margin-top: 5px;
}

/* Responsive design for advanced features */
@media (max-width: 768px) {
    .advanced-title {
        font-size: 2rem;
    }
    
    .advanced-level {
        padding: 20px;
    }
    
    .advanced-status {
        flex-direction: column;
    }
    
    .stat-card.advanced {
        margin-bottom: 10px;
    }
    
    .difficulty-display {
        position: relative;
        top: auto;
        right: auto;
        margin: 10px 0;
        text-align: center;
    }
}