/* Stats Specific Styles */

/* Stats Header */
.stats-header {
    background: linear-gradient(135deg, #0c0c0c 0%, #1a1a2e 50%, #16213e 100%);
    padding: 40px 0;
    margin-top: 70px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.player-overview {
    display: flex;
    align-items: center;
    gap: 30px;
    max-width: 1000px;
    margin: 0 auto;
    flex-wrap: wrap;
}

.player-avatar {
    font-size: 4rem;
    color: #00d4ff;
}

.player-info {
    flex: 1;
    min-width: 300px;
}

.player-info h1 {
    font-family: 'Orbitron', monospace;
    font-size: 2.5rem;
    color: #fff;
    margin-bottom: 10px;
}

.player-level {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

.level-label {
    color: #ccc;
    font-size: 1.1rem;
}

.level-value {
    background: linear-gradient(45deg, #00d4ff, #0099cc);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 1.2rem;
    font-weight: 700;
    font-family: 'Orbitron', monospace;
}

.player-experience {
    display: flex;
    align-items: center;
    gap: 15px;
}

.exp-bar {
    flex: 1;
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
}

.exp-fill {
    height: 100%;
    background: linear-gradient(90deg, #00d4ff, #0099cc);
    border-radius: 4px;
    transition: width 0.3s ease;
}

.exp-text {
    color: #ccc;
    font-size: 0.9rem;
    white-space: nowrap;
}

.player-achievements {
    text-align: center;
}

.achievement-count {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    color: #fff;
}

.achievement-count i {
    font-size: 2rem;
    color: #f39c12;
}

.achievement-count span:first-of-type {
    font-size: 1.5rem;
    font-weight: 700;
    font-family: 'Orbitron', monospace;
}

.achievement-count span:last-of-type {
    font-size: 0.9rem;
    color: #ccc;
}

/* Stats Navigation */
.stats-nav {
    padding: 20px 0;
    background: rgba(255, 255, 255, 0.02);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.stats-tabs {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

.stats-tab {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 25px;
    color: #ccc;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    font-weight: 500;
}

.stats-tab:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
}

.stats-tab.active {
    background: linear-gradient(45deg, #00d4ff, #0099cc);
    color: white;
    border-color: #00d4ff;
    box-shadow: 0 5px 20px rgba(0, 212, 255, 0.3);
}

.stats-tab i {
    font-size: 1rem;
}

/* Stats Content */
.stats-content {
    padding: 40px 0 80px;
}

.stats-section {
    display: none;
}

.stats-section.active {
    display: block;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

.stat-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 25px;
    display: flex;
    align-items: center;
    gap: 20px;
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.stat-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(45deg, #00d4ff, #0099cc);
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
    flex-shrink: 0;
}

.stat-info {
    flex: 1;
}

.stat-info h3 {
    color: #fff;
    font-size: 1.1rem;
    margin-bottom: 8px;
    font-weight: 600;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: #00d4ff;
    font-family: 'Orbitron', monospace;
    margin-bottom: 5px;
}

.stat-change {
    font-size: 0.9rem;
    font-weight: 600;
}

.stat-change.positive {
    color: #00ff88;
}

.stat-change.negative {
    color: #ff4757;
}

/* Charts Section */
.charts-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.chart-container {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 25px;
}

.chart-container h3 {
    color: #fff;
    font-size: 1.3rem;
    margin-bottom: 20px;
    text-align: center;
    font-family: 'Orbitron', monospace;
}

.chart-container canvas {
    max-height: 300px;
}

/* Cases Stats */
.cases-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.case-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.case-stat-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 20px;
    text-align: center;
}

.case-stat-name {
    color: #fff;
    font-weight: 600;
    margin-bottom: 10px;
}

.case-stat-count {
    font-size: 1.5rem;
    font-weight: 700;
    color: #00d4ff;
    font-family: 'Orbitron', monospace;
    margin-bottom: 5px;
}

.case-stat-percentage {
    color: #ccc;
    font-size: 0.9rem;
}

/* Timeline */
.timeline {
    max-height: 400px;
    overflow-y: auto;
}

.timeline-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    margin-bottom: 10px;
    border-left: 4px solid #00d4ff;
}

.timeline-icon {
    font-size: 1.5rem;
    width: 40px;
    text-align: center;
}

.timeline-content {
    flex: 1;
}

.timeline-title {
    color: #fff;
    font-weight: 600;
    margin-bottom: 5px;
}

.timeline-description {
    color: #ccc;
    font-size: 0.9rem;
}

.timeline-time {
    color: #666;
    font-size: 0.8rem;
}

/* Items Stats */
.items-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.rarity-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
}

.rarity-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 20px;
    text-align: center;
    position: relative;
}

.rarity-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    border-radius: 15px 15px 0 0;
}

.rarity-card.common::before {
    background: #4a4a4a;
}

.rarity-card.rare::before {
    background: #4a90e2;
}

.rarity-card.epic::before {
    background: #9b59b6;
}

.rarity-card.legendary::before {
    background: linear-gradient(45deg, #f39c12, #e74c3c);
}

.rarity-name {
    color: #fff;
    font-weight: 600;
    margin-bottom: 10px;
    text-transform: uppercase;
    font-size: 0.9rem;
}

.rarity-count {
    font-size: 1.8rem;
    font-weight: 700;
    color: #00d4ff;
    font-family: 'Orbitron', monospace;
    margin-bottom: 5px;
}

.rarity-percentage {
    color: #ccc;
    font-size: 0.9rem;
}

/* Top Items */
.top-items-list {
    max-height: 400px;
    overflow-y: auto;
}

.top-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    margin-bottom: 10px;
}

.top-item-rank {
    width: 30px;
    height: 30px;
    background: linear-gradient(45deg, #00d4ff, #0099cc);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.top-item-icon {
    font-size: 1.5rem;
    width: 40px;
    text-align: center;
}

.top-item-details {
    flex: 1;
}

.top-item-name {
    color: #fff;
    font-weight: 600;
    margin-bottom: 5px;
}

.top-item-rarity {
    padding: 3px 8px;
    border-radius: 10px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    display: inline-block;
}

.top-item-value {
    color: #00d4ff;
    font-weight: 600;
    font-family: 'Orbitron', monospace;
}

/* Achievements */
.achievements-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
}

.achievement-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 25px;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.achievement-card.unlocked {
    border-color: #00d4ff;
    background: rgba(0, 212, 255, 0.1);
}

.achievement-card.unlocked::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent, rgba(0, 212, 255, 0.1), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.achievement-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.achievement-icon {
    font-size: 3rem;
    margin-bottom: 15px;
    color: #f39c12;
}

.achievement-card.unlocked .achievement-icon {
    color: #00d4ff;
}

.achievement-name {
    color: #fff;
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 10px;
}

.achievement-description {
    color: #ccc;
    margin-bottom: 15px;
    line-height: 1.5;
}

.achievement-progress {
    background: rgba(255, 255, 255, 0.1);
    height: 6px;
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 10px;
}

.achievement-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #00d4ff, #0099cc);
    border-radius: 3px;
    transition: width 0.3s ease;
}

.achievement-status {
    font-size: 0.9rem;
    font-weight: 600;
}

.achievement-status.unlocked {
    color: #00ff88;
}

.achievement-status.locked {
    color: #666;
}

/* Leaderboard */
.leaderboard-tabs {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.leaderboard-tab {
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    color: #ccc;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    font-weight: 500;
}

.leaderboard-tab:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
}

.leaderboard-tab.active {
    background: linear-gradient(45deg, #00d4ff, #0099cc);
    color: white;
    border-color: #00d4ff;
}

.leaderboard-content {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 25px;
}

.leaderboard-item {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    margin-bottom: 10px;
    transition: all 0.3s ease;
}

.leaderboard-item:hover {
    background: rgba(255, 255, 255, 0.08);
}

.leaderboard-rank {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.leaderboard-rank.rank-1 {
    background: linear-gradient(45deg, #f39c12, #e74c3c);
    color: white;
}

.leaderboard-rank.rank-2 {
    background: linear-gradient(45deg, #95a5a6, #7f8c8d);
    color: white;
}

.leaderboard-rank.rank-3 {
    background: linear-gradient(45deg, #cd7f32, #b8860b);
    color: white;
}

.leaderboard-rank.rank-other {
    background: rgba(255, 255, 255, 0.1);
    color: #ccc;
}

.leaderboard-player {
    flex: 1;
}

.leaderboard-name {
    color: #fff;
    font-weight: 600;
    margin-bottom: 5px;
}

.leaderboard-level {
    color: #ccc;
    font-size: 0.9rem;
}

.leaderboard-score {
    color: #00d4ff;
    font-weight: 700;
    font-family: 'Orbitron', monospace;
    font-size: 1.1rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .player-overview {
        flex-direction: column;
        text-align: center;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .charts-section {
        grid-template-columns: 1fr;
    }

    .cases-stats,
    .items-stats {
        grid-template-columns: 1fr;
    }

    .achievements-grid {
        grid-template-columns: 1fr;
    }

    .leaderboard-tabs {
        flex-direction: column;
        align-items: center;
    }

    .leaderboard-item {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }
}

@media (max-width: 480px) {
    .player-info h1 {
        font-size: 2rem;
    }

    .stat-card {
        flex-direction: column;
        text-align: center;
    }

    .chart-container {
        padding: 15px;
    }

    .achievement-card {
        padding: 20px;
    }
}
