/* Achievement Details Page Styles */

/* Hero Section */
.achievement-hero {
    background: linear-gradient(135deg, var(--surface-1) 0%, var(--surface-2) 100%);
    border-radius: var(--theme-radius-lg);
    padding: 3rem;
    margin-bottom: 3rem;
    position: relative;
    overflow: hidden;
}

.achievement-hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 60%;
    height: 200%;
    background: radial-gradient(circle, var(--theme-primary) 0%, transparent 70%);
    opacity: 0.05;
    pointer-events: none;
}

.achievement-icon-hero {
    width: 200px;
    height: 200px;
    background: var(--theme-bg-primary);
    border-radius: 24px;
    padding: 30px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 1;
    animation: float 6s ease-in-out infinite;
}

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

.achievement-icon-hero img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.achievement-hero-content h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--theme-text-primary);
    margin-bottom: 1rem;
}

.achievement-description {
    font-size: 1.25rem;
    color: var(--theme-text-secondary);
    margin-bottom: 2rem;
}

/* Stats Cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.stat-card {
    background: var(--theme-bg-primary);
    border: 1px solid var(--theme-border-color);
    border-radius: var(--theme-radius);
    padding: 1.5rem;
    text-align: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--theme-shadow-lg);
}

.stat-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--theme-primary);
    display: block;
}

.stat-label {
    font-size: 0.875rem;
    color: var(--theme-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Rarity Badge */
.rarity-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 999px;
    font-weight: 600;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.rarity-common {
    background: var(--theme-success);
    color: white;
}

.rarity-uncommon {
    background: var(--theme-info);
    color: white;
}

.rarity-rare {
    background: var(--theme-purple);
    color: white;
}

.rarity-legendary {
    background: var(--theme-warning);
    color: white;
}

/* Players Timeline */
.players-section {
    margin-top: 3rem;
}

.players-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--theme-border-color);
}

.timeline-view {
    position: relative;
    padding-left: 2rem;
}

.timeline-view::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--theme-border-color);
}

.timeline-item {
    position: relative;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: var(--theme-bg-primary);
    border: 1px solid var(--theme-border-color);
    border-radius: var(--theme-radius);
    transition: all 0.3s ease;
}

.timeline-item:hover {
    transform: translateX(4px);
    box-shadow: var(--theme-shadow);
    border-color: var(--theme-primary);
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -2.5rem;
    top: 50%;
    transform: translateY(-50%);
    width: 12px;
    height: 12px;
    background: var(--theme-primary);
    border: 3px solid var(--theme-bg-primary);
    border-radius: 50%;
    z-index: 1;
}

.timeline-date {
    font-size: 0.875rem;
    color: var(--theme-text-muted);
    margin-bottom: 0.5rem;
}

.timeline-content {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.timeline-player {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Override player avatar sizes for timeline */
.timeline-player .player-avatar-display,
.timeline-player .initials-circle {
    width: 48px;
    height: 48px;
    font-size: 16px;
}

.player-name {
    font-weight: 600;
    color: var(--theme-text-primary);
    text-decoration: none;
}

.player-name:hover {
    color: var(--theme-primary);
}

.timeline-event {
    font-size: 0.875rem;
    color: var(--theme-text-secondary);
}

.timeline-event a {
    color: var(--theme-primary);
    text-decoration: none;
}

.timeline-event a:hover {
    text-decoration: underline;
}

/* First Achievement Highlight */
.first-achievement {
    background: linear-gradient(135deg, var(--theme-warning) 0%, var(--theme-warning-hover) 100%);
    color: white;
    position: relative;
    overflow: hidden;
}

.first-achievement::after {
    content: '🏆 FIRST!';
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    font-size: 0.75rem;
    font-weight: 700;
    background: rgba(0, 0, 0, 0.2);
    padding: 0.25rem 0.5rem;
    border-radius: var(--theme-radius);
}

.first-achievement .timeline-date,
.first-achievement .timeline-event,
.first-achievement .player-name {
    color: white !important;
}

.first-achievement .initials-circle {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

/* Recent Achievement Animation */
.recent-achievement {
    animation: pulse 2s ease-in-out infinite;
}

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

/* Empty State */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--theme-text-muted);
}

.empty-state-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

/* View Toggle */
.view-toggle {
    display: flex;
    gap: 0.5rem;
}

.view-toggle button {
    padding: 0.5rem 1rem;
    border: 1px solid var(--theme-border-color);
    background: var(--theme-bg-primary);
    color: var(--theme-text-secondary);
    border-radius: var(--theme-radius);
    cursor: pointer;
    transition: all 0.2s ease;
}

.view-toggle button:hover {
    background: var(--surface-1);
}

.view-toggle button.active {
    background: var(--theme-primary);
    color: white;
    border-color: var(--theme-primary);
}

/* Grid View */
.grid-view {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.player-card {
    background: var(--theme-bg-primary);
    border: 1px solid var(--theme-border-color);
    border-radius: var(--theme-radius);
    padding: 1.5rem;
    text-align: center;
    transition: all 0.3s ease;
}

.player-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--theme-shadow-lg);
    border-color: var(--theme-primary);
}

/* Override player avatar sizes for grid view */
.player-card .player-avatar-display,
.player-card .initials-circle {
    width: 80px;
    height: 80px;
    margin: 0 auto 1rem;
    font-size: 1.5rem;
}

/* Dark Mode Enhancements */
[data-theme="dark"] .achievement-hero {
    background: linear-gradient(135deg, var(--surface-2) 0%, var(--surface-3) 100%);
}

[data-theme="dark"] .achievement-icon-hero {
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .stat-card {
    background: var(--surface-1);
}

[data-theme="dark"] .timeline-item {
    background: var(--surface-1);
}

/* Responsive */
@media (max-width: 768px) {
    .achievement-hero {
        padding: 2rem 1.5rem;
    }

    .achievement-hero-content h1 {
        font-size: 2rem;
    }

    .achievement-icon-hero {
        width: 150px;
        height: 150px;
    }

    .stats-grid {
        grid-template-columns: 1fr 1fr;
    }
}

/* Timeline Images */
.timeline-images {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: 0.5rem;
}

.event-image-wrapper {
    position: relative;
    border-radius: var(--theme-radius);
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease;
}

.event-image-wrapper:hover {
    transform: scale(1.05);
}

.league-image,
.event-image {
    width: 120px;
    height: 80px;
    object-fit: cover;
    display: block;
}

.image-label {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8) 0%, transparent 100%);
    color: white;
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
}

/* Flippy Take */
.flippy-take {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--theme-border-color);
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    .achievement-icon-hero {
        animation: none;
    }

    .recent-achievement {
        animation: none;
    }

    .timeline-item,
    .stat-card,
    .player-card,
    .event-image-wrapper {
        transition: none;
    }
}