/* Player Summary (accordion body) */
.player-summary {
    background: var(--surface-2, rgba(0, 0, 0, 0.02));
}

.player-summary h6 {
    color: var(--theme-text-primary, rgba(0, 0, 0, 0.9));
}

.player-summary p {
    color: var(--theme-text-secondary, rgba(0, 0, 0, 0.8));
}

/* Dark mode override */
@media (prefers-color-scheme: dark) {
    .player-summary {
        background: var(--surface-2, rgba(255, 255, 255, 0.03));
    }

    .player-summary h6 {
        color: var(--theme-text-primary, rgba(255, 255, 255, 0.9));
    }

    .player-summary p {
        color: var(--theme-text-secondary, rgba(255, 255, 255, 0.8));
    }
}

/* AI Round Recap Styles */
.ai-round-recap {
    background-color: var(--theme-bg-secondary, #f8f9fa);
    border-radius: 0.5rem;
    padding: 1.5rem;
    border-left: 4px solid var(--theme-info, #0d6efd);
}

.ai-round-recap .recap-title {
    color: var(--theme-info, #0d6efd);
    margin-bottom: 1rem;
    font-size: 1.1rem;
    font-weight: 600;
}

.ai-round-recap .recap-content {
    color: var(--theme-text-primary, #212529);
    line-height: 1.6;
}

.ai-round-recap .recap-content p:last-child {
    margin-bottom: 0;
}

/* Team Score Card Styles */
.team-score-card {
    border: 1px solid var(--theme-border-color, rgba(0, 0, 0, 0.125));
    border-radius: 0.5rem;
    overflow: hidden;
    transition: box-shadow 0.2s ease;
}

.team-score-card:hover {
    box-shadow: var(--theme-shadow-lg, 0 4px 8px rgba(0, 0, 0, 0.1));
}

/* Team Display Styles */
.team-info {
    flex: 1;
}

.team-name {
    color: var(--theme-info, #0d6efd);
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.team-members {
    font-size: 0.9rem;
    line-height: 1.4;
}

.team-format {
    font-size: 0.75rem;
    text-transform: uppercase;
}

.team-stats {
    gap: 1.5rem;
}

.bag-tag-section {
    background-color: var(--theme-bg-secondary, #f8f9fa);
    padding: 1rem;
    border-radius: 0.5rem;
    margin-top: 1rem;
}

/* Dark mode support */
[data-bs-theme="dark"] .ai-round-recap {
    background-color: var(--theme-surface-2, #334155);
    border-left-color: var(--theme-info);
}

[data-bs-theme="dark"] .ai-round-recap .recap-title {
    color: var(--theme-info);
}

[data-bs-theme="dark"] .ai-round-recap .recap-content {
    color: var(--theme-text-primary);
}

[data-bs-theme="dark"] .ai-round-recap .recap-content a,
[data-bs-theme="dark"] .ai-round-recap .recap-content .player-link,
[data-bs-theme="dark"] .ai-round-recap .recap-content .team-link {
    color: var(--theme-text-primary) !important;
    text-decoration: underline;
}

[data-bs-theme="dark"] .ai-round-recap .recap-content a:hover,
[data-bs-theme="dark"] .ai-round-recap .recap-content .player-link:hover,
[data-bs-theme="dark"] .ai-round-recap .recap-content .team-link:hover {
    color: var(--theme-text-primary) !important;
    text-decoration: none;
    opacity: 0.9;
}

[data-bs-theme="dark"] .team-score-card {
    border-color: var(--theme-border-color);
    background-color: var(--theme-surface-1, #1e293b);
}

[data-bs-theme="dark"] .team-score-card:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

[data-bs-theme="dark"] .bag-tag-section {
    background-color: var(--theme-surface-2);
    border: 1px solid var(--theme-border-color);
}

[data-bs-theme="dark"] .team-name {
    color: var(--theme-info);
}

/* Player and Team Link Styles */
.player-link, .team-link {
    color: var(--primary-color, #5e72e4);
    cursor: pointer;
    text-decoration: underline;
    transition: all 0.2s ease;
}

.player-link:hover, .team-link:hover {
    color: var(--accent-color, #4c63d2);
    text-decoration: none;
}

/* Add a small icon to team links to differentiate them */
.team-link::before {
    content: '\f0c0'; /* Font Awesome users icon */
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    margin-right: 0.25rem;
    font-size: 0.85em;
    opacity: 0.7;
}

/* Player Recap Tabs Styling */
.player-recap-tabs {
    border: none !important;
    border-bottom: none !important;
    margin-bottom: 1.5rem !important;
    display: flex !important;
    flex-wrap: nowrap !important;
    justify-content: center !important;
    gap: 0.5rem !important;
    background-color: var(--theme-surface-2, #f0f0f0) !important;
    padding: 0.5rem !important;
    border-radius: 0.75rem !important;
    list-style: none !important;
    width: 100% !important;
    min-height: 60px !important;
}

/* Equal width tabs */
.player-recap-tabs .nav-item {
    flex: 1 1 0 !important;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    min-width: 0 !important;
}

.player-recap-tabs .nav-link {
    color: var(--theme-text-secondary, #6c757d) !important;
    border: 1px solid transparent !important;
    border-radius: 0.5rem !important;
    padding: 0.75rem 1.5rem !important;
    font-weight: 600 !important;
    transition: all 0.2s ease !important;
    background-color: transparent !important;
    white-space: nowrap !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    visibility: visible !important;
    opacity: 1 !important;
    width: 100% !important;
}

.player-recap-tabs .nav-link:hover {
    color: var(--theme-text-primary, #212529) !important;
    background-color: rgba(0, 0, 0, 0.05) !important;
    border-color: var(--theme-border-color, #dee2e6) !important;
}

.player-recap-tabs .nav-link.active {
    color: var(--theme-info, #0d6efd) !important;
    background-color: var(--theme-bg-primary, #ffffff) !important;
    border-color: var(--theme-info, #0d6efd) !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1) !important;
}

/* Tag exchange info styling */
.tag-exchange-info {
    font-size: 0.85rem !important;
    font-weight: 400 !important;
    opacity: 0.8 !important;
    margin-left: 0.25rem !important;
}

/* Tag tab content - inline on desktop */
.tag-tab-content {
    display: inline !important;
}

/* Ensure horizontal layout for nav-tabs */
.player-recap-tabs.nav-tabs {
    flex-direction: row !important;
}

/* Force all tabs to be visible */
.player-recap-tabs > li,
.player-recap-tabs .nav-item,
ul.player-recap-tabs > li.nav-item {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    position: static !important;
    min-width: 0 !important;
    max-width: none !important;
}

/* Override Bootstrap's nav-tabs behavior */
.player-recap-tabs.nav-tabs .nav-item + .nav-item {
    margin-left: 0 !important;
}

/* Ensure icons are visible */
.player-recap-tabs .nav-link i {
    display: inline-block !important;
    visibility: visible !important;
}

.tag-exchange-info i {
    font-size: 0.75rem !important;
}

.tag-exchange-info .fa-chevron-up {
    color: var(--theme-success, #28a745) !important;
}

.tag-exchange-info .fa-chevron-down {
    color: var(--theme-danger, #dc3545) !important;
}

/* Tab content spacing */
.player-recap-tab-content {
    padding-top: 1rem;
}

/* Mobile styles for tabs */
@media (max-width: 768px) {
    .player-recap-tabs {
        padding: 0.25rem !important;
        gap: 0.25rem !important;
    }

    .player-recap-tabs .nav-item {
        flex: 1 1 0 !important;
        display: block !important;
    }

    .player-recap-tabs .nav-link {
        padding: 0.5rem 0.5rem !important;
        font-size: 0.75rem !important;
        text-align: center !important;
        white-space: normal !important;
        line-height: 1.2 !important;
        min-height: 55px !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 0.25rem !important;
    }

    .player-recap-tabs .nav-link i {
        display: none !important;
    }

    /* Split text on mobile */
    .player-recap-tabs .nav-link .mobile-break {
        display: block !important;
    }

    /* Handle tag content on mobile */
    .player-recap-tabs .tag-tab-content {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        gap: 0.125rem !important;
    }

    .tag-exchange-info {
        display: block !important;
        font-size: 0.65rem !important;
        margin-left: 0 !important;
        margin-top: 0.25rem !important;
        line-height: 1 !important;
        opacity: 0.9 !important;
    }

    /* Force all nav items visible on mobile */
    .player-recap-tabs > li,
    .player-recap-tabs .nav-item {
        display: block !important;
        visibility: visible !important;
    }
}

/* Dark mode support for tabs */
[data-bs-theme="dark"] .player-recap-tabs {
    background-color: var(--theme-surface-1, #1e293b) !important;
}

[data-bs-theme="dark"] .player-recap-tabs .nav-link {
    color: var(--theme-text-secondary) !important;
}

[data-bs-theme="dark"] .player-recap-tabs .nav-link:hover {
    color: var(--theme-text-primary) !important;
    background-color: rgba(255, 255, 255, 0.05) !important;
    border-color: var(--theme-border-color) !important;
}

[data-bs-theme="dark"] .player-recap-tabs .nav-link.active {
    color: #ffffff !important;
    background-color: var(--theme-info, #0d6efd) !important;
    border-color: var(--theme-info, #0d6efd) !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3) !important;
}

/* Super Ace Section Styles */
.super-ace-section .empty-state-icon {
    color: var(--theme-primary);
    opacity: 0.2;
}

.super-ace-section .card-body.text-center {
    background: linear-gradient(135deg,
    var(--theme-surface-1) 0%,
    var(--theme-surface-2) 100%);
}

/* Make the upload button SUPER visible in empty state */
.super-ace-section .btn-primary {
    font-size: 1.1rem;
    padding: 0.75rem 2rem;
    font-weight: 600;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    transition: all 0.3s ease;
    animation: pulse-glow 2s infinite;
}

.super-ace-section .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 7px 20px rgba(102, 126, 234, 0.5);
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
}

/* Pulsing glow animation for upload button */
@keyframes pulse-glow {
    0% {
        box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    }
    50% {
        box-shadow: 0 4px 25px rgba(102, 126, 234, 0.6),
        0 0 30px rgba(102, 126, 234, 0.3);
    }
    100% {
        box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    }
}

/* Header upload button (when attempts exist) */
.super-ace-section .card-header .btn-outline-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    font-weight: 600;
    padding: 0.5rem 1rem;
    transition: all 0.3s ease;
}

.super-ace-section .card-header .btn-outline-primary:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

/* Empty state styling */
.super-ace-section .empty-state-icon i {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    opacity: 0.3;
}

.super-ace-section h3.h5 {
    color: var(--theme-text-primary);
    font-weight: 600;
}

/* Dark mode adjustments */
[data-bs-theme="dark"] .super-ace-section .btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.5);
}

[data-bs-theme="dark"] .super-ace-section .btn-primary:hover {
    box-shadow: 0 7px 30px rgba(102, 126, 234, 0.7);
}

[data-bs-theme="dark"] .super-ace-section .card-body.text-center {
    background: linear-gradient(135deg,
    var(--theme-surface-2) 0%,
    var(--theme-surface-3) 100%);
}

/* PDGA icon sizing */
.pdga-logo {
    height: 1.5em;
    width: auto;
}

.pdga-link-small .pdga-logo {
    height: 1em;
}

/* Faction summary utility spacing */
.faction-summary .faction-score-btn {
    min-width: 140px;
}

/* Victory message spacing */
.victory-message {
    transition: opacity 0.2s ease;
}

/* Personal Content Row - 3:1 Layout on Desktop */
.personal-content-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

@media (min-width: 992px) {
    .personal-content-row {
        grid-template-columns: 3fr 1fr;
    }
}

/* Force stacked layout (even on desktop) when requested */
.personal-content-row--stacked {
    grid-template-columns: 1fr;
}

@media (min-width: 992px) {
    .personal-content-row--stacked {
        grid-template-columns: 1fr;
    }
}

.personal-content-main {
    min-width: 0;
}

.personal-content-sidebar {
    min-width: 0;
}

.personal-content-sidebar .my-bag-tag-recap {
    margin-bottom: 0;
}

/* Restore natural spacing when stacked */
.personal-content-row--stacked .personal-content-sidebar .my-bag-tag-recap {
    margin-bottom: 2rem;
}

.personal-content-row--stacked .personal-content-main .my-recap-section {
    margin-bottom: 2rem;
}

/* ============================================
   TROPHY CASE - PlayStation-Inspired Achievement Showcase
   ============================================ */

/* Trophy Case Color Variables */
:root {
    --trophy-legendary-glow: rgba(255, 215, 0, 0.5);
    --trophy-epic-glow: rgba(168, 85, 247, 0.5);
    --trophy-rare-glow: rgba(59, 130, 246, 0.5);
    --trophy-shine: linear-gradient(135deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.3) 50%, rgba(255, 255, 255, 0) 100%);
}

/* Main Container */
.event-achievements-trophy-case {
    background: var(--theme-surface-1);
    border: 1px solid var(--theme-border-color);
    border-radius: 16px;
    padding: 1.5rem;
    position: relative;
    overflow: hidden;
}

.event-achievements-trophy-case::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(
        circle at top right,
        rgba(255, 215, 0, 0.03),
        transparent 60%
    );
    pointer-events: none;
}

/* ============================================
   HEADER SECTION
   ============================================ */

.trophy-case-header {
    margin-bottom: 1.5rem;
    position: relative;
    z-index: 1;
}

.trophy-case-header__content {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.trophy-case-header__title-group {
    flex: 1;
    min-width: 0;
}

.trophy-case-header__title {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--theme-text-primary);
    margin: 0 0 0.25rem 0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.trophy-case-header__icon {
    color: #FFD700;
    font-size: 1.75rem;
    filter: drop-shadow(0 2px 8px rgba(255, 215, 0, 0.4));
}

.trophy-case-header__text {
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.trophy-case-header__subtitle {
    font-size: 0.875rem;
    color: var(--theme-text-muted);
    margin: 0;
    font-weight: 500;
}

/* ============================================
   PERSONAL ACHIEVEMENTS (Your Trophies)
   ============================================ */

.trophy-case-personal {
    background: var(--theme-surface-2);
    border: 2px solid rgba(255, 215, 0, 0.3);
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 1.5rem;
    position: relative;
    overflow: hidden;
}

.trophy-case-personal::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(
        circle at 10% 20%,
        rgba(255, 215, 0, 0.08),
        transparent 50%
    );
    pointer-events: none;
}

.trophy-case-personal::after {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    animation: trophy-case-shine 8s infinite;
    pointer-events: none;
}

@keyframes trophy-case-shine {
    0% { left: -100%; }
    10% { left: 100%; }
    100% { left: 100%; }
}

.trophy-case-personal > * {
    position: relative;
    z-index: 1;
}

.trophy-case-personal__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.trophy-case-personal__title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--theme-text-primary);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.trophy-case-personal__title i {
    color: #FFD700;
    font-size: 1.1rem;
}

.trophy-case-personal__count {
    background: rgba(255, 215, 0, 0.15);
    color: #FFD700;
    padding: 0.15rem 0.5rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 800;
    border: 1px solid rgba(255, 215, 0, 0.3);
}

/* ============================================
   SECTION (All Event Trophies)
   ============================================ */

.trophy-case-section {
    position: relative;
    z-index: 1;
}

.trophy-case-section__header {
    margin-bottom: 1rem;
}

.trophy-case-section__title {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--theme-text-primary);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.trophy-case-section__title i {
    color: var(--theme-text-muted);
    font-size: 1rem;
}

.trophy-case-section__count {
    background: var(--theme-surface-3);
    color: var(--theme-text-muted);
    padding: 0.15rem 0.5rem;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 800;
}

/* ============================================
   TROPHY GRID (Wrapped Grid Layout)
   ============================================ */

.trophy-case-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
    gap: 1rem;
    padding: 0.5rem 0 1.5rem 0;
}

/* Trophy items in grid */
.trophy-case-grid .trophy-case-item-wrapper,
.trophy-case-grid .trophy-case-item {
    width: 100%;
    aspect-ratio: 1;
}

@media (min-width: 576px) {
    .trophy-case-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
        gap: 1.25rem;
    }
}

@media (min-width: 992px) {
    .trophy-case-grid {
        grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    }
}

/* Personal grid - slightly larger minimum size */
.trophy-case-grid--personal {
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
}

@media (min-width: 576px) {
    .trophy-case-grid--personal {
        grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    }
}

@media (min-width: 992px) {
    .trophy-case-grid--personal {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    }
}

/* ============================================
   TROPHY ITEM (Individual Achievement)
   ============================================ */

.trophy-case-item-wrapper {
    position: relative;
}

.trophy-case-item {
    position: relative;
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--theme-surface-2);
    border: 2px solid var(--theme-border-color);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    overflow: hidden;
    text-decoration: none;
    padding: 0.5rem;
}

.trophy-case-item:hover {
    transform: translateY(-8px) scale(1.08);
    z-index: 100;
}

.trophy-case-item:active {
    transform: translateY(-4px) scale(1.04);
}

/* Trophy Image */
.trophy-case-item__image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: all 0.3s ease;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.2));
    position: relative;
    z-index: 2;
}

.trophy-case-item:hover .trophy-case-item__image {
    transform: scale(1.15) rotate(5deg);
    filter: drop-shadow(0 4px 16px rgba(0, 0, 0, 0.3));
}

/* Trophy Badge (Winner Count) */
.trophy-case-item__badge {
    position: absolute;
    top: 0.25rem;
    right: 0.25rem;
    background: var(--theme-surface-3);
    color: var(--theme-text-primary);
    border-radius: 8px;
    font-size: 0.65rem;
    font-weight: 800;
    padding: 0.15rem 0.35rem;
    border: 1px solid var(--theme-border-color);
    z-index: 3;
    transition: all 0.3s ease;
}

.trophy-case-item:hover .trophy-case-item__badge {
    transform: scale(1.15);
    background: var(--theme-info);
    color: white;
    border-color: var(--theme-info);
}

/* Shine Effect */
.trophy-case-item__shine {
    position: absolute;
    inset: 0;
    background: var(--trophy-shine);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    z-index: 4;
}

.trophy-case-item:hover .trophy-case-item__shine {
    opacity: 1;
    animation: trophy-shine 1.5s ease-in-out infinite;
}

@keyframes trophy-shine {
    0%, 100% { transform: translateX(-100%); }
    50% { transform: translateX(100%); }
}

/* ============================================
   TIER-BASED STYLING (Legendary, Epic, Rare)
   ============================================ */

/* Legendary (Gold) */
.trophy-case-item--legendary {
    border-color: rgba(255, 215, 0, 0.4);
    background: linear-gradient(135deg,
        rgba(255, 215, 0, 0.1),
        var(--theme-surface-2));
}

.trophy-case-item--legendary:hover {
    border-color: #FFD700;
    box-shadow: 0 8px 24px var(--trophy-legendary-glow),
                0 0 40px rgba(255, 215, 0, 0.3);
}

/* Epic (Purple) */
.trophy-case-item--epic {
    border-color: rgba(168, 85, 247, 0.4);
    background: linear-gradient(135deg,
        rgba(168, 85, 247, 0.08),
        var(--theme-surface-2));
}

.trophy-case-item--epic:hover {
    border-color: #A855F7;
    box-shadow: 0 8px 24px var(--trophy-epic-glow),
                0 0 40px rgba(168, 85, 247, 0.3);
}

/* Rare (Blue) */
.trophy-case-item--rare {
    border-color: rgba(59, 130, 246, 0.4);
    background: linear-gradient(135deg,
        rgba(59, 130, 246, 0.08),
        var(--theme-surface-2));
}

.trophy-case-item--rare:hover {
    border-color: #3B82F6;
    box-shadow: 0 8px 24px var(--trophy-rare-glow),
                0 0 40px rgba(59, 130, 246, 0.3);
}

/* Unlocked State (Your Achievements) */
.trophy-case-item--unlocked {
    animation: trophy-unlock-pulse 2s ease-in-out infinite;
}

@keyframes trophy-unlock-pulse {
    0%, 100% {
        box-shadow: 0 0 0 0 var(--trophy-legendary-glow);
    }
    50% {
        box-shadow: 0 0 20px 4px var(--trophy-legendary-glow);
    }
}

/* ============================================
   TOOLTIP (Progressive Disclosure - Hidden Until Hover)
   ============================================ */

.trophy-case-item__tooltip {
    position: absolute;
    bottom: calc(100% + 12px);
    left: 50%;
    transform: translateX(-50%) scale(0.9);
    background: var(--theme-surface-3);
    border: 1px solid var(--theme-border-color);
    border-radius: 8px;
    padding: 0.5rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--theme-text-primary);
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
    z-index: 1000;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
    max-width: 200px;
    text-align: center;
}

.trophy-case-item__tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: var(--theme-surface-3);
}

.trophy-case-item:hover .trophy-case-item__tooltip {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) scale(1);
}

.trophy-case-item__tooltip-title {
    display: block;
    font-weight: 700;
    margin-bottom: 0.15rem;
}

.trophy-case-item__tooltip-winners {
    display: block;
    font-size: 0.65rem;
    color: var(--theme-text-muted);
    font-weight: 500;
}

.trophy-case-item__tooltip-detail {
    display: block;
    font-size: 0.7rem;
    color: var(--theme-text-muted);
    margin-top: 0.25rem;
    font-weight: 500;
}

/* ============================================
   WINNER LIST BUTTON (Opens Modal)
   ============================================ */

.trophy-case-winners-toggle {
    width: 100%;
    margin-top: 0.5rem;
    padding: 0.35rem 0.75rem;
    background: var(--theme-surface-2);
    border: 1px solid var(--theme-border-color);
    border-radius: 8px;
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--theme-text-primary);
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.trophy-case-winners-toggle:hover {
    background: var(--theme-surface-3);
    border-color: var(--theme-info);
}

.trophy-case-winners-toggle i {
    font-size: 0.6rem;
    transition: transform 0.2s ease;
}

.trophy-case-winners-toggle:hover i {
    transform: translateX(2px);
}

/* ============================================
   DARK MODE
   ============================================ */

[data-bs-theme="dark"] .event-achievements-trophy-case {
    background: rgba(255, 255, 255, 0.02);
}

[data-bs-theme="dark"] .trophy-case-item {
    background: rgba(255, 255, 255, 0.03);
}

[data-bs-theme="dark"] .trophy-case-personal {
    background: rgba(255, 215, 0, 0.05);
    border-color: rgba(255, 215, 0, 0.4);
}

[data-bs-theme="dark"] .trophy-case-item__tooltip {
    background: #2d333b;
    border-color: rgba(255, 255, 255, 0.1);
}

[data-bs-theme="dark"] .trophy-case-item__tooltip::after {
    border-top-color: #2d333b;
}

/* ============================================
   TROPHY UNVEILING MODAL - Art Deco Prestige
   ============================================ */

/* Trophy Modal Color Variables */
:root {
    --trophy-modal-legendary: #FFD700;
    --trophy-modal-legendary-glow: rgba(255, 215, 0, 0.6);
    --trophy-modal-epic: #A855F7;
    --trophy-modal-epic-glow: rgba(168, 85, 247, 0.6);
    --trophy-modal-rare: #3B82F6;
    --trophy-modal-rare-glow: rgba(59, 130, 246, 0.6);
}

/* Modal Backdrop Override */
.trophy-unveiling-modal .modal-backdrop {
    background: #000;
    opacity: 0.85;
}

/* Modal Dialog */
.trophy-unveiling-modal .modal-dialog {
    max-width: 600px;
}

/* Modal Content Container */
.trophy-modal {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border: none;
    border-radius: 20px;
    overflow: visible;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5),
                0 0 100px rgba(0, 0, 0, 0.3);
}

/* Radial Glow Backdrop (Tier-Specific) */
.trophy-modal__glow-backdrop {
    position: absolute;
    inset: 0;
    border-radius: 20px;
    opacity: 0.3;
    pointer-events: none;
    z-index: 0;
}

.trophy-modal--legendary .trophy-modal__glow-backdrop {
    background: radial-gradient(
        circle at 50% 30%,
        var(--trophy-modal-legendary-glow) 0%,
        transparent 60%
    );
}

.trophy-modal--epic .trophy-modal__glow-backdrop {
    background: radial-gradient(
        circle at 50% 30%,
        var(--trophy-modal-epic-glow) 0%,
        transparent 60%
    );
}

.trophy-modal--rare .trophy-modal__glow-backdrop {
    background: radial-gradient(
        circle at 50% 30%,
        var(--trophy-modal-rare-glow) 0%,
        transparent 60%
    );
}

/* Geometric Art Deco Frame Corners */
.trophy-modal__frame {
    position: absolute;
    inset: 15px;
    pointer-events: none;
    z-index: 5;
}

.trophy-modal__frame-corner {
    position: absolute;
    width: 40px;
    height: 40px;
    border: 2px solid rgba(255, 255, 255, 0.15);
}

.trophy-modal__frame-corner--tl {
    top: 0;
    left: 0;
    border-right: none;
    border-bottom: none;
    border-top-left-radius: 8px;
}

.trophy-modal__frame-corner--tr {
    top: 0;
    right: 0;
    border-left: none;
    border-bottom: none;
    border-top-right-radius: 8px;
}

.trophy-modal__frame-corner--bl {
    bottom: 0;
    left: 0;
    border-right: none;
    border-top: none;
    border-bottom-left-radius: 8px;
}

.trophy-modal__frame-corner--br {
    bottom: 0;
    right: 0;
    border-left: none;
    border-top: none;
    border-bottom-right-radius: 8px;
}

/* Tier-Specific Frame Colors */
.trophy-modal--legendary .trophy-modal__frame-corner {
    border-color: var(--trophy-modal-legendary);
    box-shadow: 0 0 20px var(--trophy-modal-legendary-glow);
}

.trophy-modal--epic .trophy-modal__frame-corner {
    border-color: var(--trophy-modal-epic);
    box-shadow: 0 0 20px var(--trophy-modal-epic-glow);
}

.trophy-modal--rare .trophy-modal__frame-corner {
    border-color: var(--trophy-modal-rare);
    box-shadow: 0 0 20px var(--trophy-modal-rare-glow);
}

/* Close Button */
.trophy-modal__close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    color: rgba(255, 255, 255, 0.8);
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
}

.trophy-modal__close:hover {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    transform: rotate(90deg);
}

/* Trophy Showcase Section */
.trophy-modal__showcase {
    position: relative;
    padding: 3rem 2rem 2rem 2rem;
    text-align: center;
    z-index: 1;
}

/* Particle Field */
.trophy-modal__particles {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 2;
}

.trophy-modal__particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    opacity: 0;
    animation: particle-float 3s ease-in-out infinite;
}

/* Stagger particle positions and delays */
.trophy-modal__particle:nth-child(1) { left: 20%; top: 30%; animation-delay: 0s; }
.trophy-modal__particle:nth-child(2) { left: 80%; top: 35%; animation-delay: 0.3s; }
.trophy-modal__particle:nth-child(3) { left: 15%; top: 60%; animation-delay: 0.6s; }
.trophy-modal__particle:nth-child(4) { left: 85%; top: 65%; animation-delay: 0.9s; }
.trophy-modal__particle:nth-child(5) { left: 50%; top: 25%; animation-delay: 1.2s; }
.trophy-modal__particle:nth-child(6) { left: 40%; top: 70%; animation-delay: 1.5s; }
.trophy-modal__particle:nth-child(7) { left: 60%; top: 40%; animation-delay: 1.8s; }
.trophy-modal__particle:nth-child(8) { left: 30%; top: 50%; animation-delay: 2.1s; }
.trophy-modal__particle:nth-child(9) { left: 70%; top: 55%; animation-delay: 2.4s; }
.trophy-modal__particle:nth-child(10) { left: 25%; top: 75%; animation-delay: 2.7s; }
.trophy-modal__particle:nth-child(11) { left: 75%; top: 80%; animation-delay: 3s; }
.trophy-modal__particle:nth-child(12) { left: 50%; top: 85%; animation-delay: 3.3s; }

@keyframes particle-float {
    0%, 100% {
        opacity: 0;
        transform: translateY(0) scale(0.5);
    }
    10% {
        opacity: 1;
    }
    50% {
        opacity: 0.8;
        transform: translateY(-15px) scale(1);
    }
    90% {
        opacity: 0;
    }
}

/* Trophy Icon Container */
.trophy-modal__icon-container {
    position: relative;
    display: inline-block;
    margin-bottom: 1.5rem;
    z-index: 3;
    animation: trophy-reveal 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
    opacity: 0;
    transform: scale(0.5);
}

@keyframes trophy-reveal {
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Trophy Icon Glow */
.trophy-modal__icon-glow {
    position: absolute;
    inset: -30px;
    border-radius: 50%;
    opacity: 0.5;
    filter: blur(30px);
    animation: glow-pulse 2s ease-in-out infinite;
}

.trophy-modal--legendary .trophy-modal__icon-glow {
    background: var(--trophy-modal-legendary-glow);
}

.trophy-modal--epic .trophy-modal__icon-glow {
    background: var(--trophy-modal-epic-glow);
}

.trophy-modal--rare .trophy-modal__icon-glow {
    background: var(--trophy-modal-rare-glow);
}

@keyframes glow-pulse {
    0%, 100% {
        opacity: 0.5;
        transform: scale(1);
    }
    50% {
        opacity: 0.8;
        transform: scale(1.1);
    }
}

/* Trophy Icon Image */
.trophy-modal__icon {
    position: relative;
    width: 140px;
    height: 140px;
    object-fit: contain;
    filter: drop-shadow(0 10px 30px rgba(0, 0, 0, 0.5));
    z-index: 1;
}

/* Achievement Title */
.trophy-modal__title {
    font-size: 1.75rem;
    font-weight: 800;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin: 0 0 0.75rem 0;
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.5);
    animation: title-reveal 0.6s ease-out 0.3s forwards;
    opacity: 0;
    transform: translateY(10px);
}

@keyframes title-reveal {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.trophy-modal--legendary .trophy-modal__title {
    color: var(--trophy-modal-legendary);
    text-shadow: 0 0 30px var(--trophy-modal-legendary-glow),
                 0 2px 20px rgba(0, 0, 0, 0.5);
}

.trophy-modal--epic .trophy-modal__title {
    color: var(--trophy-modal-epic);
    text-shadow: 0 0 30px var(--trophy-modal-epic-glow),
                 0 2px 20px rgba(0, 0, 0, 0.5);
}

.trophy-modal--rare .trophy-modal__title {
    color: var(--trophy-modal-rare);
    text-shadow: 0 0 30px var(--trophy-modal-rare-glow),
                 0 2px 20px rgba(0, 0, 0, 0.5);
}

/* Achievement Description */
.trophy-modal__description {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.6;
    margin: 0;
    max-width: 85%;
    margin-left: auto;
    margin-right: auto;
    animation: description-reveal 0.6s ease-out 0.5s forwards;
    opacity: 0;
    transform: translateY(10px);
}

@keyframes description-reveal {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Content Section (Winners) */
.trophy-modal__content {
    padding: 0 2rem 2rem 2rem;
    position: relative;
    z-index: 1;
    animation: content-reveal 0.6s ease-out 0.7s forwards;
    opacity: 0;
    transform: translateY(10px);
}

@keyframes content-reveal {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Divider */
.trophy-modal__divider {
    position: relative;
    text-align: center;
    margin-bottom: 1.5rem;
}

.trophy-modal__divider::before,
.trophy-modal__divider::after {
    content: '';
    position: absolute;
    top: 50%;
    width: calc(50% - 80px);
    height: 1px;
    background: linear-gradient(
        to right,
        transparent,
        rgba(255, 255, 255, 0.2),
        transparent
    );
}

.trophy-modal__divider::before {
    left: 0;
}

.trophy-modal__divider::after {
    right: 0;
}

.trophy-modal__divider-text {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    color: rgba(255, 255, 255, 0.5);
    text-transform: uppercase;
    padding: 0 1rem;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
}

/* Winners List */
.trophy-modal__winners {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    max-height: 250px;
    overflow-y: auto;
    padding-right: 0.5rem;
}

/* Custom Scrollbar */
.trophy-modal__winners::-webkit-scrollbar {
    width: 6px;
}

.trophy-modal__winners::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
}

.trophy-modal__winners::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
}

.trophy-modal__winners::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Individual Winner */
.trophy-modal__winner {
    padding: 0.875rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 0.875rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.trophy-modal__winner::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: transparent;
    transition: background 0.3s ease;
}

.trophy-modal--legendary .trophy-modal__winner:hover::before {
    background: var(--trophy-modal-legendary);
}

.trophy-modal--epic .trophy-modal__winner:hover::before {
    background: var(--trophy-modal-epic);
}

.trophy-modal--rare .trophy-modal__winner:hover::before {
    background: var(--trophy-modal-rare);
}

.trophy-modal__winner:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateX(5px);
}

.trophy-modal__winner.player-link {
    cursor: pointer;
}

.trophy-modal__winner-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255, 255, 255, 0.2);
    flex-shrink: 0;
    transition: border-color 0.3s ease, transform 0.3s ease;
}

.trophy-modal__winner:hover .trophy-modal__winner-avatar {
    border-color: rgba(255, 255, 255, 0.4);
    transform: scale(1.05);
}

.trophy-modal__winner-avatar--initials {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
    font-weight: 600;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.8);
}

/* Rarity-themed avatar borders */
.trophy-modal--legendary .trophy-modal__winner:hover .trophy-modal__winner-avatar {
    border-color: var(--trophy-modal-legendary);
}

.trophy-modal--epic .trophy-modal__winner:hover .trophy-modal__winner-avatar {
    border-color: var(--trophy-modal-epic);
}

.trophy-modal--rare .trophy-modal__winner:hover .trophy-modal__winner-avatar {
    border-color: var(--trophy-modal-rare);
}

.trophy-modal__winner-name {
    font-weight: 600;
    color: #fff;
    font-size: 0.95rem;
    flex: 1;
}

.trophy-modal__winner-detail {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.6);
    font-style: italic;
}

/* Footer Actions */
.trophy-modal__actions {
    padding: 0 2rem 2rem 2rem;
    text-align: center;
    position: relative;
    z-index: 1;
    animation: actions-reveal 0.6s ease-out 0.9s forwards;
    opacity: 0;
    transform: translateY(10px);
}

@keyframes actions-reveal {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.trophy-modal__btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 2rem;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: 10px;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.trophy-modal__btn--primary {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #fff;
}

.trophy-modal__btn--primary:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
}

.trophy-modal--legendary .trophy-modal__btn--primary:hover {
    box-shadow: 0 5px 20px var(--trophy-modal-legendary-glow);
}

.trophy-modal--epic .trophy-modal__btn--primary:hover {
    box-shadow: 0 5px 20px var(--trophy-modal-epic-glow);
}

.trophy-modal--rare .trophy-modal__btn--primary:hover {
    box-shadow: 0 5px 20px var(--trophy-modal-rare-glow);
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 767px) {
    .event-achievements-trophy-case {
        padding: 1rem;
    }

    .trophy-case-header__title {
        font-size: 1.25rem;
    }

    .trophy-case-grid {
        gap: 0.75rem;
    }

    .trophy-case-item__tooltip {
        font-size: 0.7rem;
        max-width: 150px;
    }

    .trophy-modal__header {
        padding: 1rem;
    }

    .trophy-modal__icon {
        width: 48px;
        height: 48px;
    }

    .trophy-modal__title {
        font-size: 1.1rem;
    }

    .trophy-modal__body {
        padding: 1rem;
    }
}
