/* Tech Games Modal Styles */
.tech-games-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(5px);
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease-out;
}

.tech-games-modal-content {
    background: linear-gradient(135deg, #000000 0%, #1a1a1a 50%, #333333 100%);
    border: 2px solid #64B5F6;
    border-radius: 20px;
    width: 95%;
    max-width: 900px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 25px 50px rgba(255, 105, 0, 0.3);
    animation: slideInUp 0.4s ease-out;
}

.tech-games-modal-header {
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    border-radius: 20px 20px 0 0;
    padding: 20px 30px;
    border-bottom: 2px solid #64B5F6;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.tech-games-modal-header h2 {
    color: #ffffff;
    margin: 0;
    font-size: 1.8em;
    font-weight: 700;
}

.tech-games-close-btn {
    background: rgba(255, 105, 0, 0.2);
    border: 2px solid #64B5F6;
    color: #64B5F6;
    font-size: 24px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    font-weight: bold;
}

.tech-games-close-btn:hover {
    background: #64B5F6;
    color: #000000;
    transform: scale(1.1);
}

.tech-games-modal-body {
    padding: 30px;
}

/* Game Selection Styles */
.tech-game-selection h3 {
    color: #ffffff;
    text-align: center;
    margin-bottom: 30px;
    font-size: 1.5em;
    font-weight: 600;
}

.tech-games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    margin-bottom: 20px;
}

/* Ensure typing test appears first and gets proper visibility */
.tech-games-grid .tech-game-card[data-game="typing_test"] {
    grid-row: 1;
    grid-column: 1 / -1; /* Take full width if needed */
    order: -100; /* Very strong negative order */
    display: block !important;
    visibility: visible !important;
}

.tech-games-grid .tech-game-card.recommended {
    grid-row: 1;
    grid-column: 1;
    order: -10; /* Strong negative order to ensure it's first */
}

.tech-game-card {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    border: 2px solid #64B5F6;
    border-radius: 15px;
    padding: 25px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(255, 105, 0, 0.1);
}

.tech-game-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(255, 105, 0, 0.3);
    border-color: #42A5F5;
    background: linear-gradient(135deg, #2d2d2d 0%, #404040 100%);
}

.tech-game-icon {
    font-size: 3em;
    margin-bottom: 15px;
    display: block;
}

.tech-game-card h4 {
    color: #ffffff;
    margin-bottom: 10px;
    font-size: 1.3em;
    font-weight: 600;
}

.tech-game-card p {
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 15px;
    font-size: 0.95em;
    line-height: 1.4;
}

.difficulty-badge {
    background: linear-gradient(45deg, #64B5F6, #42A5F5);
    color: #ffffff;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.8em;
    font-weight: 600;
    display: inline-block;
    margin-bottom: 20px;
    box-shadow: 0 4px 15px rgba(255, 105, 0, 0.3);
}

.start-tech-game-btn {
    background: linear-gradient(45deg, #64B5F6, #42A5F5);
    color: #ffffff;
    border: none;
    padding: 12px 25px;
    border-radius: 25px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    box-shadow: 0 6px 20px rgba(255, 105, 0, 0.2);
}

.start-tech-game-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(255, 105, 0, 0.4);
    background: linear-gradient(45deg, #42A5F5, #90CAF9);
}

/* Game Play Styles */
.tech-game-play {
    color: #ffffff;
}

.game-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    border: 2px solid #64B5F6;
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 8px 32px rgba(255, 105, 0, 0.1);
}

.game-info h3 {
    margin: 0 0 10px 0;
    font-size: 1.4em;
    font-weight: 600;
}

.game-stats {
    display: flex;
    gap: 20px;
    font-size: 0.9em;
}

.game-stats span {
    background: rgba(255, 105, 0, 0.2);
    border: 1px solid #64B5F6;
    padding: 5px 12px;
    border-radius: 20px;
    font-weight: 600;
    color: #64B5F6;
}

.back-btn {
    background: rgba(255, 105, 0, 0.2);
    color: #64B5F6;
    border: 2px solid #64B5F6;
    padding: 10px 20px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.9em;
    font-weight: 600;
    transition: all 0.3s ease;
}

.back-btn:hover {
    background: #64B5F6;
    color: #000000;
    transform: translateY(-2px);
}

.question-container {
    margin-bottom: 20px;
}

.question-card {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    border: 2px solid #64B5F6;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 8px 32px rgba(255, 105, 0, 0.1);
}

.question-card h4 {
    font-size: 1.2em;
    margin-bottom: 25px;
    line-height: 1.5;
    color: #ffffff;
}

.options-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
    margin-bottom: 20px;
}

.option-btn {
    background: rgba(255, 255, 255, 0.05);
    color: #ffffff;
    border: 2px solid rgba(255, 105, 0, 0.3);
    padding: 15px 20px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 1em;
    transition: all 0.3s ease;
    text-align: left;
}

.option-btn:hover:not(:disabled) {
    background: rgba(255, 105, 0, 0.1);
    border-color: #64B5F6;
    transform: translateX(5px);
}

.option-btn.correct {
    background: linear-gradient(45deg, #4CAF50, #45a049);
    border-color: #4CAF50;
    color: #ffffff;
}

.option-btn.incorrect {
    background: linear-gradient(45deg, #f44336, #d32f2f);
    border-color: #f44336;
    color: #ffffff;
}

.option-btn:disabled {
    cursor: not-allowed;
}

.question-feedback {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 20px;
    margin-top: 20px;
    border: 2px solid #64B5F6;
    box-shadow: 0 8px 32px rgba(255, 105, 0, 0.1);
}

.feedback-content {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    margin-bottom: 20px;
}

.feedback-icon {
    font-size: 2em;
    flex-shrink: 0;
}

.feedback-title {
    font-size: 1.2em;
    font-weight: 600;
    margin: 0 0 10px 0;
}

.feedback-title.correct {
    color: #4CAF50;
}

.feedback-title.incorrect {
    color: #f44336;
}

.feedback-explanation {
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.5;
    margin: 0;
}

.next-btn {
    background: linear-gradient(45deg, #64B5F6, #42A5F5);
    color: #ffffff;
    border: none;
    padding: 12px 25px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 1em;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 6px 20px rgba(255, 105, 0, 0.3);
}

.next-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(255, 105, 0, 0.5);
    background: linear-gradient(45deg, #42A5F5, #90CAF9);
}

.progress-bar {
    background: rgba(255, 255, 255, 0.2);
    height: 8px;
    border-radius: 4px;
    overflow: hidden;
    margin-top: 20px;
}

.progress-fill {
    background: linear-gradient(45deg, #64B5F6, #42A5F5);
    height: 100%;
    border-radius: 4px;
    transition: width 0.5s ease;
}

/* Results Styles */
.tech-game-results {
    text-align: center;
    color: #ffffff;
}

.results-container {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    border: 2px solid #64B5F6;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 15px 40px rgba(255, 105, 0, 0.2);
}

.results-icon {
    font-size: 4em;
    margin-bottom: 20px;
    animation: bounce 1s ease-in-out;
}

.results-container h3 {
    font-size: 2em;
    margin-bottom: 30px;
    font-weight: 700;
}

.results-stats {
    display: flex;
    justify-content: space-around;
    margin-bottom: 30px;
    gap: 20px;
}

.stat {
    background: rgba(255, 105, 0, 0.1);
    border-radius: 15px;
    padding: 20px;
    flex: 1;
    border: 2px solid rgba(255, 105, 0, 0.3);
}

.stat-value {
    display: block;
    font-size: 2em;
    font-weight: 700;
    color: #64B5F6;
    margin-bottom: 5px;
}

.stat-label {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9em;
}

.results-message {
    font-size: 1.1em;
    margin-bottom: 30px;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.5;
}

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

.play-again-btn, .back-to-games-btn {
    padding: 12px 25px;
    border-radius: 25px;
    border: none;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.play-again-btn {
    background: linear-gradient(45deg, #64B5F6, #42A5F5);
    color: #ffffff;
    box-shadow: 0 6px 20px rgba(255, 105, 0, 0.3);
}

.back-to-games-btn {
    background: rgba(255, 105, 0, 0.1);
    color: #64B5F6;
    border: 2px solid #64B5F6;
}

.play-again-btn:hover, .back-to-games-btn:hover {
    transform: translateY(-2px);
}

.play-again-btn:hover {
    box-shadow: 0 10px 25px rgba(255, 105, 0, 0.5);
    background: linear-gradient(45deg, #42A5F5, #90CAF9);
}

.back-to-games-btn:hover {
    background: #64B5F6;
    color: #000000;
    box-shadow: 0 10px 25px rgba(255, 105, 0, 0.3);
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

@keyframes bounce {
    0%, 20%, 60%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-20px);
    }
    80% {
        transform: translateY(-10px);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .tech-games-modal-content {
        width: 95%;
        margin: 10px;
        max-height: 95vh;
    }

    .tech-games-modal-body {
        padding: 20px;
    }

    .tech-games-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .game-header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }

    .game-stats {
        flex-wrap: wrap;
        gap: 10px;
    }

    .results-stats {
        flex-direction: column;
        gap: 15px;
    }

    .results-actions {
        flex-direction: column;
        gap: 15px;
    }

    .tech-games-modal-header {
        padding: 15px 20px;
    }

    .tech-games-modal-header h2 {
        font-size: 1.5em;
    }

    .question-card {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .options-container {
        gap: 10px;
    }

    .option-btn {
        padding: 12px 15px;
        font-size: 0.9em;
    }

    .feedback-content {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }

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

    .stat-value {
        font-size: 1.5em;
    }
}

/* Typing Test Game Styles - Ultra High Priority */
.tech-game-card[data-game="typing_test"] {
    position: relative !important;
    border: 3px solid #FFD700 !important;
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%) !important;
    color: #000 !important;
    box-shadow: 0 8px 25px rgba(255, 215, 0, 0.4) !important;
    animation: glow 2s ease-in-out infinite alternate !important;
    order: -100 !important; /* Very strong negative order */
    display: block !important; /* Force display */
    visibility: visible !important; /* Force visibility */
    z-index: 100 !important; /* Ensure it's on top */
    opacity: 1 !important;
    flex: none !important;
    grid-column: 1 !important;
    grid-row: 1 !important;
}

.tech-game-card.recommended {
    position: relative !important;
    border: 3px solid #FFD700 !important;
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%) !important;
    color: #000 !important;
    box-shadow: 0 8px 25px rgba(255, 215, 0, 0.4) !important;
    animation: glow 2s ease-in-out infinite alternate !important;
    order: -100 !important; /* Very strong negative order */
    display: block !important; /* Force display */
    visibility: visible !important; /* Force visibility */
    z-index: 100 !important; /* Ensure it's on top */
    opacity: 1 !important;
}

.tech-game-card[data-game="typing_test"] h4,
.tech-game-card[data-game="typing_test"] p,
.tech-game-card.recommended h4,
.tech-game-card.recommended p {
    color: #000 !important;
}

.tech-game-card[data-game="typing_test"] .difficulty-badge,
.tech-game-card.recommended .difficulty-badge {
    background: rgba(0, 0, 0, 0.2) !important;
    color: #000 !important;
}

.tech-game-card[data-game="typing_test"] .start-tech-game-btn,
.tech-game-card.recommended .start-tech-game-btn {
    background: linear-gradient(45deg, #000, #333) !important;
    color: #FFD700 !important;
    border: 2px solid #000 !important;
}

@keyframes glow {
    from {
        box-shadow: 0 8px 25px rgba(255, 215, 0, 0.4);
    }
    to {
        box-shadow: 0 12px 35px rgba(255, 215, 0, 0.7);
    }
}

.recommended-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: linear-gradient(45deg, #FF6B35, #FF4500);
    color: white;
    padding: 6px 12px;
    border-radius: 15px;
    font-size: 0.65em;
    font-weight: bold;
    transform: rotate(12deg);
    animation: recommendedPulse 3s ease-in-out infinite;
    box-shadow: 0 3px 10px rgba(255, 107, 53, 0.4);
    border: 2px solid #fff;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

@keyframes recommendedPulse {
    0%, 100% {
        transform: rotate(12deg) scale(1);
        box-shadow: 0 3px 10px rgba(255, 107, 53, 0.4);
    }
    50% {
        transform: rotate(12deg) scale(1.05);
        box-shadow: 0 5px 15px rgba(255, 107, 53, 0.6);
    }
}

.typing-test-game {
    padding: 20px;
    min-height: 600px;
}

.typing-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #64B5F6;
}

.typing-info h3 {
    color: #ffffff;
    margin: 0 0 10px 0;
    font-size: 1.8em;
}

.typing-stats {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.stat-item {
    background: rgba(100, 181, 246, 0.1);
    padding: 8px 15px;
    border-radius: 15px;
    color: #64B5F6;
    font-weight: bold;
    border: 1px solid rgba(100, 181, 246, 0.3);
}

.typing-settings {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
    padding: 20px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 15px;
    align-items: center;
    flex-wrap: wrap;
}

.setting-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.setting-group label {
    color: #ffffff;
    font-weight: bold;
    min-width: 80px;
}

.setting-group select {
    background: rgba(100, 181, 246, 0.1);
    border: 2px solid #64B5F6;
    border-radius: 8px;
    color: #ffffff;
    padding: 8px 12px;
    font-size: 1em;
}

.start-typing-btn, .restart-typing-btn {
    background: linear-gradient(45deg, #64B5F6, #42A5F5);
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 25px;
    font-size: 1.1em;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.start-typing-btn:hover, .restart-typing-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(100, 181, 246, 0.4);
}

.typing-container {
    margin-bottom: 20px;
}

.text-display {
    background: rgba(0, 0, 0, 0.5);
    border: 2px solid #64B5F6;
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 20px;
    min-height: 200px;
    max-height: 300px;
    overflow-y: auto;
}

.typing-text {
    font-family: 'Courier New', monospace;
    font-size: 1.3em;
    line-height: 1.8;
    color: #ffffff;
    word-wrap: break-word;
}

.typing-text span {
    padding: 2px 1px;
    transition: all 0.1s ease;
}

.typing-text span.correct {
    background-color: rgba(76, 175, 80, 0.3);
    color: #4CAF50;
}

.typing-text span.incorrect {
    background-color: rgba(244, 67, 54, 0.3);
    color: #F44336;
}

.typing-text span.current {
    background-color: rgba(255, 193, 7, 0.5);
    animation: blink 1s infinite;
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0.3; }
}

.typing-input-container {
    position: relative;
}

.typing-input {
    width: 100%;
    min-height: 120px;
    background: rgba(0, 0, 0, 0.7);
    border: 2px solid #64B5F6;
    border-radius: 15px;
    padding: 20px;
    font-family: 'Courier New', monospace;
    font-size: 1.2em;
    color: #ffffff;
    resize: vertical;
    outline: none;
    transition: border-color 0.3s ease;
}

.typing-input:focus {
    border-color: #FFD700;
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.3);
}

.typing-input:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.typing-progress {
    margin-top: 20px;
}

.typing-test-results {
    padding: 30px;
    text-align: center;
}

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

.stat-card {
    background: rgba(100, 181, 246, 0.1);
    border: 2px solid #64B5F6;
    border-radius: 15px;
    padding: 20px;
    text-align: center;
    transition: transform 0.3s ease;
}

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

.stat-card .stat-value {
    display: block;
    font-size: 2.2em;
    font-weight: bold;
    color: #64B5F6;
    margin-bottom: 5px;
}

.stat-card .stat-label {
    color: #ffffff;
    font-size: 0.9em;
    opacity: 0.8;
}

.performance-message {
    background: rgba(255, 215, 0, 0.1);
    border: 2px solid #FFD700;
    border-radius: 15px;
    padding: 20px;
    margin: 20px 0;
    color: #FFD700;
    font-size: 1.2em;
    font-weight: bold;
}

/* Responsive Design for Typing Test */
@media (max-width: 768px) {
    .typing-stats {
        gap: 10px;
    }
    
    .stat-item {
        padding: 6px 10px;
        font-size: 0.9em;
    }
    
    .typing-settings {
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
    }
    
    .setting-group {
        flex-direction: column;
        align-items: stretch;
        gap: 5px;
    }
    
    .typing-text {
        font-size: 1.1em;
    }
    
    .typing-input {
        font-size: 1em;
        min-height: 100px;
    }
    
    .typing-results-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .stat-card .stat-value {
        font-size: 1.8em;
    }
}

@media (max-width: 480px) {
    .typing-header {
        flex-direction: column;
        gap: 15px;
        align-items: stretch;
    }
    
    .typing-stats {
        justify-content: center;
    }
    
    .typing-results-stats {
        grid-template-columns: 1fr;
    }
    
    .typing-text {
        font-size: 1em;
        line-height: 1.6;
    }
}

/* Player Name Input Section */
.player-name-section {
    display: none;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: linear-gradient(135deg, #1e3c72, #2a5298);
    padding: 30px;
    border-radius: 15px;
    border: 2px solid #ffd700;
    box-shadow: 0 8px 25px rgba(255, 215, 0, 0.3);
    text-align: center;
    z-index: 1001;
    min-width: 400px;
}

.name-input-container h3 {
    color: #ffd700;
    margin-bottom: 10px;
    font-size: 1.8rem;
}

.name-input-container p {
    color: #fff;
    margin-bottom: 20px;
    opacity: 0.9;
}

.name-input-group {
    display: flex;
    gap: 10px;
    align-items: center;
    justify-content: center;
}

#playerNameField {
    padding: 12px 15px;
    border: 2px solid #ffd700;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    font-size: 1.1rem;
    min-width: 200px;
    backdrop-filter: blur(10px);
}

#playerNameField::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

#playerNameField:focus {
    outline: none;
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

.continue-btn {
    padding: 12px 20px;
    background: linear-gradient(45deg, #ffd700, #ffed4e);
    color: #1e3c72;
    border: none;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.continue-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 215, 0, 0.4);
}

/* Leaderboard Section */
.leaderboard-section {
    display: none;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: linear-gradient(135deg, #1e3c72, #2a5298);
    padding: 30px;
    border-radius: 15px;
    border: 2px solid #ffd700;
    box-shadow: 0 8px 25px rgba(255, 215, 0, 0.3);
    z-index: 1001;
    min-width: 500px;
    max-height: 80vh;
    overflow-y: auto;
}

.leaderboard-section h3 {
    color: #ffd700;
    text-align: center;
    margin-bottom: 20px;
    font-size: 1.8rem;
}

.leaderboard-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
}

.leaderboard-entry {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    border-left: 4px solid #ffd700;
    backdrop-filter: blur(10px);
}

.leaderboard-entry.rank-1 {
    border-left-color: #ffd700;
    background: rgba(255, 215, 0, 0.1);
}

.leaderboard-entry.rank-2 {
    border-left-color: #c0c0c0;
    background: rgba(192, 192, 192, 0.1);
}

.leaderboard-entry.rank-3 {
    border-left-color: #cd7f32;
    background: rgba(205, 127, 50, 0.1);
}

.leaderboard-rank {
    font-size: 1.5rem;
    font-weight: bold;
    color: #ffd700;
    min-width: 30px;
}

.leaderboard-name {
    flex-grow: 1;
    color: #fff;
    font-weight: bold;
    margin-left: 15px;
}

.leaderboard-stats {
    display: flex;
    gap: 15px;
    color: #fff;
    font-size: 0.9rem;
}

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

.leaderboard-stat-value {
    display: block;
    font-weight: bold;
    color: #ffd700;
}

.leaderboard-stat-label {
    display: block;
    opacity: 0.8;
    font-size: 0.8rem;
}

.close-leaderboard-btn {
    width: 100%;
    padding: 12px;
    background: linear-gradient(45deg, #ffd700, #ffed4e);
    color: #1e3c72;
    border: none;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.close-leaderboard-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 215, 0, 0.4);
}

.show-leaderboard-btn {
    background: linear-gradient(45deg, #ffd700, #ffed4e);
    color: #1e3c72;
    border: none;
    padding: 10px 15px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
    margin-left: 10px;
}

.show-leaderboard-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 215, 0, 0.4);
}

.player-name-display {
    color: #ffd700;
    font-weight: bold;
    margin-right: 10px;
}

.change-name-btn {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    border: 1px solid #ffd700;
    padding: 5px 10px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.8rem;
    transition: all 0.3s ease;
}

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

.empty-leaderboard {
    text-align: center;
    color: rgba(255, 255, 255, 0.6);
    padding: 20px;
    font-style: italic;
}
