/* ===================================
   EXAM PAGE STYLES
   =================================== */

.page-header {
    background: white;
    padding: 30px 20px;
    border-bottom: 1px solid var(--border-color);
    position: relative;
}

.page-header .container {
    max-width: 1400px;
    margin: 0 auto;
    position: relative;
    text-align: center;
    padding: 0 100px;
}

.page-header .back-link {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-color);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
}

.page-header .back-link:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-50%) translateX(-3px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.page-header .back-link i {
    font-size: 0.85rem;
    transition: transform 0.3s ease;
}

.page-header .back-link:hover i {
    transform: translateX(-2px);
}

.page-header h1 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    margin-top: 0;
    color: var(--primary-dark);
    font-weight: 700;
    letter-spacing: -0.5px;
}

.page-header p {
    font-size: 1rem;
    color: var(--text-color);
    margin: 0;
}

.exam-selection {
    padding: 30px 20px;
}

.exam-selection .container {
    max-width: 1200px;
    margin: 0 auto;
}

/* Device Recommendation Note */
.device-recommendation {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    background: linear-gradient(135deg, #f0f9ff, #e0f2fe);
    border: 1px solid #bae6fd;
    border-left: 3px solid #0ea5e9;
    padding: 0.35rem 1rem;
    border-radius: 6px;
    margin: 0 auto 1.25rem auto;
    font-size: 0.78rem;
    color: #0369a1;
    width: fit-content;
}

.device-recommendation i {
    color: #0ea5e9;
    font-size: 0.85rem;
}

@media (max-width: 768px) {
    .device-recommendation {
        font-size: 0.72rem;
        padding: 0.3rem 0.7rem;
    }
}

.exam-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    align-items: stretch;
}

.exam-card {
    background: white;
    padding: 1.5rem 1.75rem;
    border-radius: 16px;
    box-shadow: var(--shadow-md);
    text-align: center;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.exam-card .start-exam,
.exam-card .buy-now-btn,
.exam-card .start-test-btn,
.exam-card .repurchase-btn,
.exam-card .cooldown-btn {
    margin-top: auto;
}

.exam-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-xl);
    border-color: var(--primary-color);
}

/* Card Badges */
.card-badge {
    position: absolute;
    top: 8px;
    right: -28px;
    padding: 2px 30px;
    font-size: 0.6rem;
    font-weight: 700;
    text-transform: uppercase;
    transform: rotate(45deg);
    letter-spacing: 0.5px;
}

.card-badge.free {
    background: #22C55E;
    color: white;
}

.card-badge.popular {
    background: var(--primary-color);
    color: white;
}

.card-badge.premium {
    background: linear-gradient(135deg, #F59E0B 0%, #D97706 100%);
    color: white;
}

/* Card Borders for Color Themes */
.free-card {
    border: 2px solid #22C55E;
}

.free-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(34, 197, 94, 0.2);
}

/* Popular Card Highlight */
.popular-card {
    border: 2px solid var(--primary-color);
}

.popular-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(37, 99, 235, 0.2);
}

.premium-card {
    border: 2px solid #F59E0B;
}

.premium-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(245, 158, 11, 0.2);
}

.exam-icon {
    width: 50px;
    height: 50px;
    margin: 0 auto 0.75rem;
    background: var(--gradient-1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.3rem;
}

.free-card .exam-icon {
    background: linear-gradient(135deg, #22C55E 0%, #16A34A 100%);
}

.premium-card .exam-icon {
    background: linear-gradient(135deg, #F59E0B 0%, #D97706 100%);
}

.exam-card h3 {
    color: var(--dark-color);
    margin-bottom: 0.5rem;
    font-size: 1.35rem;
    font-weight: 700;
}

.exam-subtitle {
    color: var(--text-color);
    font-size: 0.75rem;
    margin-bottom: 0.4rem;
}

/* Pricing */
.exam-price {
    margin: 0.75rem 0;
}

.exam-price .price {
    font-size: 2.25rem;
    font-weight: 700;
    color: #1E293B;
}

.exam-price.free .price {
    color: #1E293B;
}

.exam-price .original-price {
    font-size: 1.2rem;
    color: #94a3b8;
    text-decoration: line-through;
    margin-right: 0.5rem;
    font-weight: 500;
}

.exam-price .discount-badge {
    display: inline-block;
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    margin-left: 0.5rem;
    letter-spacing: 0.5px;
}

.limited-offer {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.4rem 1rem;
    border-radius: 6px;
    margin: 0.5rem 0 1rem 0;
    display: inline-block;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.85; }
}

.exam-price .price-note {
    display: block;
    font-size: 0.7rem;
    color: var(--text-color);
    margin-top: 0.1rem;
}

/* Feature List */
.exam-features {
    list-style: none;
    padding: 0;
    margin: 0.5rem 0;
    text-align: left;
}

.exam-features li {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.2rem 0;
    color: var(--text-color);
    font-size: 0.8rem;
    border-bottom: 1px solid #f1f5f9;
}

.exam-features li:last-child {
    border-bottom: none;
}

.exam-features li.highlight-feature {
    color: #b45309;
}

.exam-features li.highlight-feature strong {
    color: #92400e;
}

.exam-features i {
    color: #22C55E;
    font-size: 0.7rem;
}

.course-info {
    background: #f8fafc;
    padding: 0.3rem 0.5rem;
    border-radius: 4px;
    font-size: 0.68rem;
    color: var(--text-color);
    margin-bottom: 0.5rem;
}

.start-exam {
    width: 100%;
}

/* ===================================
   EXAM INTERFACE
   =================================== */

.exam-interface {
    padding: 15px;
    min-height: 100vh;
    background: var(--light-color);
}

.exam-container {
    max-width: 1000px;
    margin: 0 auto;
}

/* Back to Tests Button */
.back-to-tests {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-color);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    margin-bottom: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
}

.back-to-tests:hover {
    background: var(--primary-color);
    color: white;
    transform: translateX(-3px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.back-to-tests i {
    transition: transform 0.3s ease;
}

.back-to-tests:hover i {
    transform: translateX(-2px);
}

.exam-header {
    background: white;
    padding: 0.75rem 1.25rem;
    border-radius: 10px;
    box-shadow: var(--shadow-sm);
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.exam-info h3 {
    color: var(--dark-color);
    margin-bottom: 0.15rem;
    font-size: 1rem;
}

.exam-info p {
    color: var(--text-color);
    font-size: 0.85rem;
    margin: 0;
}

.exam-timer {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    background: var(--primary-color);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: bold;
}

.exam-timer.warning {
    background: var(--accent-color);
    animation: pulse 1s infinite;
}

.exam-timer.danger {
    background: var(--error-color);
    animation: pulse 0.5s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

/* Question Navigation */
.question-nav {
    background: white;
    padding: 0.75rem 1rem;
    border-radius: 10px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 10px;
}

.nav-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.question-btn {
    width: 32px;
    height: 32px;
    border: 2px solid var(--border-color);
    background: white;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.8rem;
    transition: all 0.3s ease;
}

.question-btn:hover {
    transform: scale(1.1);
    border-color: var(--primary-color);
}

.question-btn.answered {
    background: var(--success-color);
    color: white;
    border-color: var(--success-color);
}

.question-btn.marked {
    background: var(--accent-color);
    color: white;
    border-color: var(--accent-color);
}

.question-btn.current {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    transform: scale(1.15);
}

/* Question Container */
.question-container {
    background: white;
    padding: 1rem 1.25rem;
    border-radius: 10px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 10px;
}

.question-card {
    min-height: 200px;
}

.question-text {
    font-size: 1rem;
    color: var(--dark-color);
    margin-bottom: 1rem;
    line-height: 1.6;
    font-weight: 500;
}

.options-container {
    display: grid;
    gap: 0.5rem;
}

.option-item {
    background: var(--light-color);
    padding: 0.75rem 1rem;
    border-radius: 8px;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.option-item:hover {
    border-color: #2563EB;
    background: rgba(37, 99, 235, 0.05);
    transform: translateX(3px);
}

/* Touch-friendly active state for mobile */
.option-item:active {
    border-color: #2563EB;
    background: rgba(37, 99, 235, 0.1);
    transform: scale(0.98);
}

.option-item.selected {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.option-letter {
    width: 28px;
    height: 28px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 0.85rem;
    color: var(--primary-color);
    flex-shrink: 0;
}

.option-item.selected .option-letter {
    background: white;
    color: var(--primary-color);
}

.option-text {
    flex: 1;
    font-size: 0.9rem;
}

/* Review Mode Styles */
.option-item.correct {
    background: #D1FAE5;
    border-color: var(--success-color);
}

.option-item.incorrect {
    background: #FEE2E2;
    border-color: var(--error-color);
}

.option-item.correct .option-letter {
    background: var(--success-color);
    color: white;
}

.option-item.incorrect .option-letter {
    background: var(--error-color);
    color: white;
}

/* Exam Controls */
.exam-controls {
    display: flex;
    justify-content: space-between;
    gap: 0.5rem;
    flex-wrap: wrap;
    background: white;
    padding: 0.75rem 1rem;
    border-radius: 10px;
    box-shadow: var(--shadow-sm);
}

.exam-controls .btn {
    flex: 1;
    min-width: 120px;
    padding: 0.5rem 0.75rem;
    font-size: 0.85rem;
}

/* ===================================
   RESULTS DISPLAY
   =================================== */

.exam-results {
    padding: 15px;
    min-height: 100vh;
    background: var(--light-color);
}

.results-container {
    max-width: 800px;
    margin: 0 auto;
}

.results-card {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    text-align: center;
    margin-bottom: 1rem;
}

.results-header {
    margin-bottom: 1rem;
}

.results-header i {
    font-size: 2.5rem;
    color: var(--accent-color);
    margin-bottom: 0.5rem;
}

.results-header h2 {
    color: var(--dark-color);
    font-size: 1.5rem;
    margin: 0;
}

/* Score Row - Compact 3 boxes */
.score-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin: 1rem 0;
}

.score-box {
    background: var(--gradient-1);
    padding: 1rem;
    border-radius: 10px;
    color: white;
}

.score-box.net-marks {
    background: linear-gradient(135deg, #22C55E 0%, #16A34A 100%);
}

.score-box.rank-box {
    background: linear-gradient(135deg, #F59E0B 0%, #D97706 100%);
}

.score-box .score-value {
    font-size: 1.75rem;
    font-weight: 700;
}

.score-box p {
    font-size: 0.8rem;
    margin: 0.25rem 0 0 0;
    opacity: 0.9;
}

.results-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.75rem;
    margin: 1rem 0;
}

.stat-item {
    padding: 0.75rem;
    border-radius: 8px;
    background: var(--light-color);
}

.stat-item i {
    font-size: 1.25rem;
    margin-bottom: 0.25rem;
}

.stat-item:nth-child(1) i {
    color: var(--success-color);
}

.stat-item:nth-child(2) i {
    color: var(--error-color);
}

.stat-item:nth-child(3) i {
    color: var(--accent-color);
}

.stat-item:nth-child(4) i {
    color: var(--primary-color);
}

.stat-item h3 {
    font-size: 1.25rem;
    color: var(--dark-color);
    margin: 0.25rem 0;
}

.stat-item p {
    color: var(--text-color);
    font-size: 0.75rem;
    margin: 0;
}

.results-actions {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.results-actions .btn {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
}

/* Answers Review */
.answers-review {
    margin-top: 3rem;
}

.answer-card {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: var(--shadow-md);
    margin-bottom: 1.5rem;
}

.answer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--border-color);
}

.answer-status {
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: 600;
}

.answer-status.correct {
    background: #D1FAE5;
    color: var(--success-color);
}

.answer-status.incorrect {
    background: #FEE2E2;
    color: var(--error-color);
}

.answer-status.unattempted {
    background: #FEF3C7;
    color: var(--accent-color);
}

.answer-question {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    color: var(--dark-color);
}

.answer-explanation {
    background: var(--light-color);
    padding: 1rem;
    border-radius: 8px;
    border-left: 4px solid var(--primary-color);
    margin-top: 1rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .page-header {
        padding: 20px 15px;
    }

    .page-header .container {
        padding: 0 15px;
        text-align: left;
    }

    .page-header .back-link {
        position: relative;
        left: 0;
        top: 0;
        transform: none;
        margin-bottom: 1rem;
        display: inline-flex;
        font-size: 0.85rem;
        padding: 6px 10px;
    }

    .page-header h1 {
        font-size: 1.5rem;
    }

    .page-header p {
        font-size: 0.9rem;
    }

    /* Exam Selection */
    .exam-selection {
        padding: 20px 15px;
    }

    .exam-grid {
        grid-template-columns: 1fr;
    }

    .exam-card {
        padding: 1.25rem;
    }

    .exam-card h3 {
        font-size: 1.15rem;
    }

    /* Exam Interface */
    .exam-header {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
        padding: 1rem;
    }

    .exam-timer {
        width: 100%;
        justify-content: center;
        font-size: 1.3rem;
    }

    .exam-controls {
        flex-direction: column;
        gap: 0.75rem;
    }

    .exam-controls .btn {
        width: 100%;
    }

    /* Question Card */
    .question-card {
        padding: 1.25rem;
        margin-bottom: 1rem;
    }

    .question-text {
        font-size: 1rem;
    }

    .option-label {
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
    }

    /* Question Navigator */
    .question-navigator {
        padding: 1rem;
    }

    .nav-grid {
        gap: 0.4rem;
    }

    .nav-btn {
        width: 35px;
        height: 35px;
        font-size: 0.85rem;
    }

    /* Results */
    .score-circle {
        width: 140px;
        height: 140px;
    }

    .score-value {
        font-size: 2.2rem;
    }

    .results-stats {
        grid-template-columns: 1fr 1fr;
        gap: 0.75rem;
    }

    .stat-card {
        padding: 1rem;
    }

    .stat-card h4 {
        font-size: 0.8rem;
    }

    .stat-card p {
        font-size: 1.3rem;
    }

    .results-actions {
        flex-direction: column;
    }

    .results-actions .btn {
        width: 100%;
    }

    /* Answer Explanation */
    .answer-explanation {
        padding: 0.85rem;
        font-size: 0.9rem;
    }
    
    /* Exam Grid Mobile */
    .exam-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .exam-card {
        padding: 1.25rem;
    }
    
    .exam-icon {
        width: 45px;
        height: 45px;
        font-size: 1.1rem;
    }
    
    .exam-card h3 {
        font-size: 1.15rem;
    }
    
    .exam-subtitle {
        font-size: 0.8rem;
    }
    
    .exam-features li {
        font-size: 0.85rem;
    }
    
    .start-exam {
        padding: 0.7rem 1.25rem;
        font-size: 0.9rem;
    }
    
    /* Card Badges Mobile */
    .card-badge {
        font-size: 0.5rem;
        right: -30px;
        top: 8px;
    }
    
    /* Disable hover transform on touch devices */
    .option-item:hover {
        transform: none;
    }
}

@media (max-width: 480px) {
    .exam-timer {
        font-size: 1.1rem;
        padding: 0.6rem 1rem;
    }

    .question-card {
        padding: 1rem;
    }

    .question-text {
        font-size: 0.95rem;
    }

    .option-label {
        padding: 0.65rem 0.85rem;
        font-size: 0.85rem;
    }

    .score-circle {
        width: 120px;
        height: 120px;
    }

    .score-value {
        font-size: 2rem;
    }

    .results-stats {
        grid-template-columns: 1fr;
    }

    .stat-card {
        padding: 0.85rem;
    }

    .nav-btn {
        width: 32px;
        height: 32px;
        font-size: 0.8rem;
    }
    
    .exam-card {
        padding: 1rem;
    }
    
    .exam-card h3 {
        font-size: 1rem;
    }
    
    .exam-icon {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
}

/* Extra small mobile (390px - typical 6.1" phone) */
@media (max-width: 390px) {
    .exam-card {
        padding: 0.875rem;
    }
    
    .exam-card h3 {
        font-size: 0.95rem;
    }
    
    .exam-price .price {
        font-size: 1.75rem;
    }
    
    .exam-features li {
        font-size: 0.75rem;
        padding: 0.15rem 0;
    }
    
    .exam-features i {
        font-size: 0.65rem;
    }
    
    .card-badge {
        font-size: 0.45rem;
        right: -32px;
        top: 6px;
        padding: 2px 28px;
    }
    
    .exam-card .btn {
        padding: 0.65rem 1rem;
        font-size: 0.85rem;
    }
    
    .exam-selection {
        padding: 15px 10px;
    }
    
    .device-recommendation {
        font-size: 0.68rem;
        padding: 0.25rem 0.5rem;
    }
}

/* ===================================
   PURCHASE MODAL
   =================================== */

.purchase-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 15px;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.purchase-modal {
    background: white;
    border-radius: 16px;
    max-width: 400px;
    width: 100%;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s ease;
    max-height: 90vh;
    overflow-y: auto;
}

@keyframes slideUp {
    from { 
        opacity: 0;
        transform: translateY(30px);
    }
    to { 
        opacity: 1;
        transform: translateY(0);
    }
}

.purchase-modal .modal-header {
    background: linear-gradient(135deg, var(--primary-color), var(--dark-color));
    color: white;
    padding: 1.5rem;
    text-align: center;
}

.purchase-modal .modal-header i {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    display: block;
}

.purchase-modal .modal-header h3 {
    margin: 0;
    font-size: 1.3rem;
}

.purchase-modal .modal-body {
    padding: 1.5rem;
    text-align: center;
}

.purchase-modal .modal-body p {
    color: var(--text-light);
    margin-bottom: 0.5rem;
}

.purchase-modal .modal-body h4 {
    color: var(--text-color);
    font-size: 1.1rem;
    margin-bottom: 1rem;
}

.purchase-modal .modal-price {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin: 1rem 0;
}

.purchase-modal .modal-note {
    font-size: 0.85rem;
    color: var(--text-light);
}

.purchase-modal .modal-actions {
    display: flex;
    gap: 1rem;
    padding: 1.5rem;
    border-top: 1px solid var(--border-color);
    background: var(--light-color);
}

.purchase-modal .modal-actions .btn {
    flex: 1;
    padding: 0.8rem 1rem;
    font-size: 0.95rem;
}

@media (max-width: 480px) {
    .purchase-modal .modal-header {
        padding: 1.25rem;
    }

    .purchase-modal .modal-header i {
        font-size: 2rem;
    }

    .purchase-modal .modal-header h3 {
        font-size: 1.1rem;
    }

    .purchase-modal .modal-body {
        padding: 1.25rem;
    }

    .purchase-modal .modal-price {
        font-size: 2rem;
    }

    .purchase-modal .modal-actions {
        flex-direction: column;
        padding: 1rem;
        gap: 0.75rem;
    }
}

/* ===================================
   LEADERBOARD FLOATING BUTTON & MODAL
   =================================== */

.leaderboard-fab {
    position: fixed;
    top: 100px;
    right: 24px;
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
    border: none;
    border-radius: 50px;
    padding: 13px 21px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 9px;
    box-shadow: 0 4px 20px rgba(245, 158, 11, 0.4);
    transition: all 0.3s ease;
    z-index: 999;
    animation: leaderboardBlink 1.5s ease-in-out infinite;
}

@keyframes leaderboardBlink {
    0%, 100% {
        opacity: 1;
        box-shadow: 0 4px 20px rgba(245, 158, 11, 0.4);
    }
    50% {
        opacity: 0.75;
        box-shadow: 0 4px 35px rgba(245, 158, 11, 0.8);
    }
}

.leaderboard-fab:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(245, 158, 11, 0.6);
    animation: none;
    opacity: 1;
}

.leaderboard-fab i {
    font-size: 1.1rem;
}

.leaderboard-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    backdrop-filter: blur(4px);
    padding: 20px;
}

.leaderboard-modal-overlay.active {
    display: flex;
}

.leaderboard-modal {
    background: white;
    border-radius: 20px;
    max-width: 900px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    padding: 1.5rem;
    position: relative;
    animation: modalSlideUp 0.3s ease;
}

@keyframes modalSlideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.leaderboard-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.25rem;
}

.leaderboard-modal-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-dark);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
}

.leaderboard-modal-header h2 i {
    color: #f59e0b;
}

.leaderboard-login-hint {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.7rem;
    color: #64748b;
    background: linear-gradient(135deg, #f1f5f9, #e2e8f0);
    padding: 0.3rem 0.65rem;
    border-radius: 20px;
    margin-left: auto;
    margin-right: 1.5rem;
    flex-shrink: 0;
}

.leaderboard-login-hint i {
    font-size: 0.6rem;
    color: #94a3b8;
}

.leaderboard-modal-header .modal-close {
    background: #f1f5f9;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.leaderboard-modal-header .modal-close:hover {
    background: #e2e8f0;
}

.leaderboard-modal-subtitle {
    color: var(--secondary-color);
    font-size: 0.9rem;
    margin: 0 0 1.25rem 0;
}

.leaderboard-modal .leaderboard-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.leaderboard-modal .leaderboard-column {
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
}

/* Responsive Leaderboard Modal */
@media (max-width: 768px) {
    .leaderboard-fab {
        top: 80px;
        right: 16px;
        padding: 10px;
        border-radius: 50%;
    }
    
    .leaderboard-fab span {
        display: none;
    }
    
    .leaderboard-modal {
        padding: 1rem;
        border-radius: 16px;
    }
    
    .leaderboard-modal .leaderboard-grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    
    .leaderboard-modal-header h2 {
        font-size: 1.25rem;
    }
}

.leaderboard-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.leaderboard-column {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.leaderboard-column:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.leaderboard-header {
    padding: 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: white;
    font-weight: 600;
}

.leaderboard-header.quick {
    background: linear-gradient(135deg, #22c55e, #16a34a);
}

.leaderboard-header.ab {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
}

.leaderboard-header.abc {
    background: linear-gradient(135deg, #f59e0b, #d97706);
}

.leaderboard-header i {
    font-size: 1.25rem;
}

.leaderboard-header h3 {
    font-size: 1.1rem;
    margin: 0;
}

.leaderboard-body {
    padding: 0;
    min-height: 140px;
}

.leaderboard-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 140px;
    color: var(--secondary-color);
}

.leaderboard-loading i {
    font-size: 1.5rem;
}

.leaderboard-entry {
    display: flex;
    align-items: center;
    padding: 0.875rem 1.25rem;
    border-bottom: 1px solid #f1f5f9;
    transition: background-color 0.2s ease;
}

.leaderboard-entry:last-child {
    border-bottom: none;
}

.leaderboard-entry:hover {
    background-color: #f8fafc;
}

.leaderboard-medal {
    font-size: 1.25rem;
    margin-right: 0.75rem;
    flex-shrink: 0;
}

.leaderboard-name {
    flex: 1;
    font-weight: 500;
    color: var(--text-color);
    font-size: 0.95rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.leaderboard-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 140px;
    color: var(--secondary-color);
    text-align: center;
    padding: 1rem;
}

.leaderboard-empty i {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    opacity: 0.5;
}

.leaderboard-empty p {
    font-size: 0.85rem;
    margin: 0;
}

/* Responsive Leaderboard */
@media (max-width: 992px) {
    .leaderboard-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .leaderboard-column {
        max-width: 500px;
        margin: 0 auto;
        width: 100%;
    }
}

@media (max-width: 480px) {
    .leaderboard-header {
        padding: 1rem;
    }
    
    .leaderboard-entry {
        padding: 0.75rem 1rem;
    }
    
    .leaderboard-medal {
        font-size: 1.1rem;
    }
}