/* Scoring System Styles */
.points-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 12px 20px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
    transform: translateX(100%);
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    z-index: 10000;
    min-width: 150px;
    text-align: center;
}

.points-notification.show {
    transform: translateX(0);
}

.points-amount {
    font-size: 1.5em;
    font-weight: bold;
    margin-bottom: 4px;
}

.points-amount.positive {
    color: #4ade80;
}

.points-amount.negative {
    color: #f87171;
}

.points-action {
    font-size: 0.9em;
    opacity: 0.9;
}

.achievement-notification {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    background: linear-gradient(135deg, #ffd700 0%, #ffb347 100%);
    color: #333;
    padding: 20px 30px;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(255, 215, 0, 0.4);
    transition: all 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    z-index: 10001;
    text-align: center;
    max-width: 400px;
    border: 3px solid #fff;
}

.achievement-notification.show {
    transform: translate(-50%, -50%) scale(1);
}

.achievement-header {
    font-size: 1.2em;
    font-weight: bold;
    margin-bottom: 8px;
}

.achievement-name {
    font-size: 1.4em;
    font-weight: bold;
    margin-bottom: 8px;
    color: #b8860b;
}

.achievement-description {
    font-size: 1em;
    margin-bottom: 10px;
    opacity: 0.8;
}

.achievement-points {
    font-size: 1.1em;
    font-weight: bold;
    color: #2d5a27;
}

/* Leaderboard Styles */
.leaderboard-container {
    background: white;
    border-radius: 15px;
    padding: 20px;
    margin: 20px 0;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.leaderboard-header {
    text-align: center;
    margin-bottom: 20px;
    color: #333;
}

.leaderboard-title {
    font-size: 1.8em;
    font-weight: bold;
    margin-bottom: 5px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.leaderboard-subtitle {
    color: #666;
    font-size: 0.9em;
}

.leaderboard-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.leaderboard-item {
    display: flex;
    align-items: center;
    padding: 15px;
    margin-bottom: 10px;
    background: #f8f9fa;
    border-radius: 12px;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.leaderboard-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.leaderboard-item.rank-1 {
    background: linear-gradient(135deg, #ffd700 20%, #fff 100%);
    border-color: #ffd700;
}

.leaderboard-item.rank-2 {
    background: linear-gradient(135deg, #c0c0c0 20%, #fff 100%);
    border-color: #c0c0c0;
}

.leaderboard-item.rank-3 {
    background: linear-gradient(135deg, #cd7f32 20%, #fff 100%);
    border-color: #cd7f32;
}

.rank-number {
    font-size: 1.2em;
    font-weight: bold;
    min-width: 40px;
    text-align: center;
    margin-right: 15px;
}

.rank-1 .rank-number {
    color: #b8860b;
}

.rank-2 .rank-number {
    color: #708090;
}

.rank-3 .rank-number {
    color: #8b4513;
}

.player-info {
    flex: 1;
    margin-right: 15px;
}

.player-name {
    font-weight: bold;
    margin-bottom: 4px;
    color: #333;
}

.player-stats {
    font-size: 0.85em;
    color: #666;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 4px;
}

.player-achievements {
    display: flex;
    gap: 4px;
    margin-left: 10px;
}

.achievement-badge {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ffd700 0%, #ffb347 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8em;
    color: #333;
    border: 2px solid #fff;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: transform 0.2s ease;
}

.achievement-badge:hover {
    transform: scale(1.2);
}

.score-display {
    text-align: right;
    min-width: 80px;
}

.current-score {
    font-size: 1.3em;
    font-weight: bold;
    color: #667eea;
    margin-bottom: 2px;
}

.total-score {
    font-size: 0.9em;
    color: #666;
}

/* Player Profile Modal */
.player-profile-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 10000;
    backdrop-filter: blur(5px);
}

.player-profile-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    border-radius: 20px;
    padding: 30px;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.profile-header {
    text-align: center;
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 2px solid #f0f0f0;
}

.profile-name {
    font-size: 1.6em;
    font-weight: bold;
    margin-bottom: 10px;
    color: #333;
}

.profile-title {
    color: #667eea;
    font-size: 1.1em;
    margin-bottom: 10px;
}

.profile-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 15px;
    margin-bottom: 25px;
}

.profile-stat {
    text-align: center;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 12px;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.profile-stat:hover {
    border-color: #667eea;
    transform: translateY(-2px);
}

.stat-value {
    font-size: 1.4em;
    font-weight: bold;
    color: #667eea;
    margin-bottom: 5px;
}

.stat-label {
    font-size: 0.9em;
    color: #666;
}

.achievements-section {
    margin-bottom: 20px;
}

.achievements-title {
    font-size: 1.2em;
    font-weight: bold;
    margin-bottom: 15px;
    color: #333;
}

.achievements-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
}

.achievement-card {
    background: linear-gradient(135deg, #ffd700 0%, #ffb347 100%);
    padding: 15px;
    border-radius: 12px;
    color: #333;
    text-align: center;
    box-shadow: 0 4px 10px rgba(255, 215, 0, 0.3);
}

.achievement-icon {
    font-size: 1.5em;
    margin-bottom: 8px;
}

.achievement-name {
    font-weight: bold;
    margin-bottom: 5px;
}

.achievement-desc {
    font-size: 0.85em;
    opacity: 0.8;
}

.close-profile {
    position: absolute;
    top: 15px;
    right: 20px;
    background: none;
    border: none;
    font-size: 1.5em;
    cursor: pointer;
    color: #666;
    transition: color 0.3s ease;
}

.close-profile:hover {
    color: #333;
}

/* Game Statistics */
.game-stats-container {
    background: white;
    border-radius: 15px;
    padding: 20px;
    margin: 20px 0;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.game-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
}

.game-stat-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    border-radius: 12px;
    text-align: center;
    transition: transform 0.3s ease;
}

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

.stat-icon {
    font-size: 2em;
    margin-bottom: 10px;
}

.stat-number {
    font-size: 1.8em;
    font-weight: bold;
    margin-bottom: 5px;
}

.stat-description {
    font-size: 0.9em;
    opacity: 0.9;
}

/* Quick Score Notification */
.quick-score-notification {
    position: fixed;
    top: 20px;
    left: 20px;
    background: white;
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    transform: translateX(-100%);
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    z-index: 10000;
    min-width: 250px;
    border: 2px solid #667eea;
}

.quick-score-notification.show {
    transform: translateX(0);
}

.quick-score-header {
    font-size: 1.1em;
    font-weight: bold;
    margin-bottom: 15px;
    color: #667eea;
    text-align: center;
}

.quick-score-list {
    margin-bottom: 15px;
}

.quick-score-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
}

.quick-score-item:last-child {
    border-bottom: none;
}

.quick-rank {
    font-size: 1.1em;
    margin-right: 10px;
}

.quick-name {
    flex: 1;
    font-weight: 500;
}

.quick-score {
    font-weight: bold;
    color: #667eea;
}

.view-full-leaderboard {
    width: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 10px;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.view-full-leaderboard:hover {
    transform: translateY(-2px);
}

/* Leaderboard Controls */
.leaderboard-controls {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
    gap: 10px;
}

.view-toggle {
    padding: 10px 20px;
    border: 2px solid #667eea;
    background: white;
    color: #667eea;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.view-toggle.active {
    background: #667eea;
    color: white;
}

.view-toggle:hover:not(.active) {
    background: #f0f4ff;
}

.empty-leaderboard {
    text-align: center;
    padding: 40px;
    color: #666;
}

.empty-leaderboard p {
    margin: 10px 0;
    font-size: 1.1em;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .points-notification {
        top: 10px;
        right: 10px;
        left: 10px;
        transform: translateY(-100%);
        min-width: auto;
    }
    
    .points-notification.show {
        transform: translateY(0);
    }
    
    .quick-score-notification {
        left: 10px;
        right: 10px;
        min-width: auto;
        transform: translateY(-100%);
    }
    
    .quick-score-notification.show {
        transform: translateY(0);
    }
    
    .achievement-notification {
        width: 90%;
        padding: 15px 20px;
    }
    
    .leaderboard-item {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }
    
    .player-info {
        margin-right: 0;
        margin-bottom: 10px;
    }
    
    .player-stats {
        justify-content: center;
    }
    
    .profile-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .achievements-grid {
        grid-template-columns: 1fr;
    }
    
    .leaderboard-controls {
        flex-direction: column;
        align-items: center;
    }
    
    .view-toggle {
        width: 200px;
    }
}

@media (max-width: 480px) {
    .player-profile-content {
        padding: 20px;
    }
    
    .leaderboard-container {
        padding: 15px;
        margin: 15px 0;
    }
    
    .profile-stats-grid {
        grid-template-columns: 1fr;
    }
    
    .quick-score-notification {
        padding: 15px;
    }
}