/* --- Component: Match Cards (BEM + Variables) --- */

/* Grid Layout */
.quick-stats-grid-compact {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.match-history-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    padding: 10px 0;
}

/* Base Card Block */
.match-card {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    aspect-ratio: 1.6 / 1;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.match-card:hover {
    transform: translateY(-8px) scale(1.05);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
    border-color: rgba(255, 255, 255, 0.3);
    z-index: 10;
}

/* Background Element */
.match-card__bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(30, 30, 40, 0.6);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 1;
}

/* Modifiers: Result States */
.match-card--win .match-card__bg {
    background: linear-gradient(135deg, rgba(52, 199, 89, 0.1), rgba(30, 30, 40, 0.8));
    /* Success */
    border-top: 1px solid rgba(52, 199, 89, 0.2);
}

.match-card--loss .match-card__bg {
    background: linear-gradient(135deg, rgba(255, 59, 48, 0.1), rgba(30, 30, 40, 0.8));
    /* Danger */
    border-top: 1px solid rgba(255, 59, 48, 0.2);
}

.match-card--draw .match-card__bg {
    background: linear-gradient(135deg, rgba(255, 149, 0, 0.1), rgba(30, 30, 40, 0.8));
    /* Warning */
    border-top: 1px solid rgba(255, 149, 0, 0.2);
}

/* Content Element */
.match-card__content {
    position: relative;
    z-index: 2;
    padding: var(--radius-xl);
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* Header Row */
.match-card__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Icon */
.match-card__icon {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    background: rgba(255, 255, 255, 0.1);
    box-shadow: var(--shadow-s);
}

/* Colors for sports (Could be variables too, keeping literal for now for gradients) */
.match-card__icon--football {
    background: linear-gradient(135deg, #0cebeb, #20e3b2);
    color: #000;
}

.match-card__icon--basket {
    background: linear-gradient(135deg, #f6d365, #fda085);
    color: #000;
}

.match-card__icon--tennis {
    background: linear-gradient(135deg, #d4fc79, #96e6a1);
    color: #000;
}

.match-card__icon--running {
    background: linear-gradient(135deg, #84fab0, #8fd3f4);
    color: #000;
}

.match-card__date {
    font-size: 0.75rem;
    font-weight: var(--font-weight-medium);
    color: var(--text-secondary);
    /* This variable is mostly for light mode, check opacity */
    color: rgba(255, 255, 255, 0.5);
    /* Override for dark card context */
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

/* Score Section */
.match-card__score {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    font-family: var(--font-family-main);
}

.match-card__score-value {
    font-size: 3.5rem;
    font-weight: var(--font-weight-bold);
    color: var(--text-inverse);
    line-height: 1;
    text-shadow: var(--shadow-s);
}

.match-card__score-divider {
    font-size: 2rem;
    font-weight: 300;
    color: rgba(255, 255, 255, 0.4);
    margin-top: -5px;
}

/* Footer Section */
.match-card__footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.match-card__status {
    padding: 5px 12px;
    border-radius: var(--radius-xl);
    font-size: 0.7rem;
    font-weight: var(--font-weight-bold);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #fff;
}

.match-card__status--win {
    background: var(--success-color);
    box-shadow: 0 2px 8px rgba(52, 199, 89, 0.3);
}

.match-card__status--loss {
    background: var(--danger-color);
    box-shadow: 0 2px 8px rgba(255, 59, 48, 0.3);
}

.match-card__status--draw {
    background: var(--warning-color);
    box-shadow: 0 2px 8px rgba(255, 149, 0, 0.3);
}

.match-card__time {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.6);
    font-weight: var(--font-weight-medium);
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Mobile */
@media (max-width: 480px) {
    .match-history-grid {
        grid-template-columns: 1fr;
    }

    .match-card__score-value {
        font-size: 3rem;
    }
}

/* --- Trophy / Headhunter Styles (BEMified) --- */
/* Assuming .card-content was generic previously, explicit modifier */

.match-card__trophy-info {
    position: absolute;
    bottom: 0;
    width: 100%;
    padding: 10px 15px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0.5) 50%, transparent 100%);
    color: white;
    text-align: center;
    z-index: 10;
}

/* Background Pattern Overlay */
.zelij-bg::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url("data:image/svg+xml,%3Csvg width='40' height='40' viewBox='0 0 40 40' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M20 20.5V18.1L22 17.5V19.1L20 20.5ZM18 20.5V18.1L16 17.5V19.1L18 20.5ZM20 22.5V20.1L22 19.5V21.1L20 22.5ZM18 22.5V20.1L16 19.5V21.1L18 22.5Z' fill='%23ffffff' fill-opacity='0.05'/%3E%3C/svg%3E");
    opacity: 0.4;
    z-index: 1;
}

/* Holographic Shine for Gold Cards */
.match-card:has(.badge.gold)::after {
    content: '';
    position: absolute;
    top: -100%;
    left: -100%;
    width: 300%;
    height: 300%;
    background: linear-gradient(115deg,
            transparent 0%,
            transparent 40%,
            rgba(255, 255, 255, 0.1) 45%,
            rgba(255, 255, 255, 0.3) 50%,
            rgba(255, 255, 255, 0.1) 55%,
            transparent 60%,
            transparent 100%);
    transform: rotate(25deg);
    animation: foilShine 6s infinite linear;
    pointer-events: none;
    z-index: 5;
}

.match-card__header .date {
    font-size: 0.65rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.7);
    letter-spacing: 0.5px;
    background: rgba(0, 0, 0, 0.3);
    padding: 2px 8px;
    border-radius: 10px;
    backdrop-filter: blur(4px);
}

.match-card__header .badge {
    font-size: 0.6rem;
    padding: 2px 8px;
    border-radius: 10px;
    text-transform: uppercase;
    font-weight: 800;
}

.match-card__header .badge.gold {
    background: linear-gradient(135deg, #ffd700, #b8860b);
    color: #000;
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

.match-card__header .badge.common {
    background: rgba(255, 255, 255, 0.15);
    color: white;
}

.match-card__big-score {
    font-size: 2.5rem;
    font-weight: 800;
    font-family: 'Impact', var(--font-family-main);
    text-shadow: var(--shadow-m);
    display: block;
    line-height: 1;
}

.match-card__opponent-name {
    font-size: 0.9rem;
    opacity: 0.9;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 5px;
}

/* --- Social Match Sheet Card (Hidden, for generation) --- */
.match-sheet-card {
    position: fixed;
    top: -9999px;
    left: -9999px;
    width: 400px;
    height: 600px;
    /* Adjust aspect ratio as needed */
    background: linear-gradient(135deg, #1a1a2e, #16213e);
    color: #fff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    border-radius: 20px;
    /* Optional logic for rounded corners in image */
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
    z-index: -1;
}

.match-sheet-card h2 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    color: #ff9f43;
    /* Gold/Orange accent */
}

.match-sheet-card .score {
    font-size: 4rem;
    font-weight: 800;
    margin: 1rem 0;
    text-shadow: 0 0 20px rgba(255, 159, 67, 0.5);
}

.match-sheet-card .date {
    font-size: 1rem;
    color: #a0a0a0;
    margin-bottom: 2rem;
}

.match-sheet-card .team-avatars {
    display: flex;
    gap: 15px;
    margin-top: 2rem;
}

.match-sheet-card .team-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: 3px solid #ff9f43;
    object-fit: cover;
    background-color: #333;
}


/* Burn/Delete Button */
.match-card__btn-burn {
    position: absolute;
    top: 8px;
    right: 8px;
    opacity: 0;
    transform: scale(0.9);
    transition: all 0.2s ease;
    z-index: 20;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-full);
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--danger-color);
    cursor: pointer;
}

.match-card:hover .match-card__btn-burn {
    opacity: 1;
    transform: scale(1);
}

.match-card__btn-burn:hover {
    background: var(--danger-color);
    color: white;
    border-color: var(--danger-color);
}

/* --- ULTRA PREMIUM FUT CARD v3 — HOLOGRAPHIC EDITION --- */
.fut-player-container {
    perspective: 1200px;
    width: 320px;
    height: 480px;
    filter: drop-shadow(0 20px 40px rgba(0, 0, 0, 0.5));
    transition: transform 0.3s ease;
}

@media (max-width: 375px) {
    .fut-player-container {
        transform: scale(0.85);
        transform-origin: top center;
        margin-bottom: -72px; /* Pull up trailing content since scaling leaves visual gap */
    }
}

.fut-card-container {
    width: 100%;
    height: 100%;
    position: relative;
    transform-style: preserve-3d;
    transition: transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

.fut-card-container.flipped .fut-card-flipper {
    transform: rotateY(180deg);
}

.fut-card-flipper {
    width: 100%;
    height: 100%;
    position: relative;
    transform-style: preserve-3d;
    transition: transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

.fut-card-front,
.fut-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    top: 0;
    left: 0;
}

.fut-card-back {
    transform: rotateY(180deg);
}

/* === MAIN CARD BODY === */
.fut-player-card.premium-vision {
    background:
        linear-gradient(160deg, #FF8C00 0%, #E65100 30%, #FF6D00 55%, #FFB300 100%);
    border: none;
    border-radius: 24px;
    padding: 22px 24px 18px;
    color: #2D1A16;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: stretch;
    box-shadow:
        inset 0 2px 0 rgba(255, 255, 255, 0.5),
        inset 0 -2px 0 rgba(0, 0, 0, 0.15),
        inset 2px 0 0 rgba(255, 255, 255, 0.25),
        inset -2px 0 0 rgba(0, 0, 0, 0.08),
        0 0 0 3px rgba(180, 90, 0, 0.4);
    height: 100%;
    overflow: hidden;
    position: relative;
}

.fut-player-card.premium-vision {
    clip-path: none !important;
    -webkit-clip-path: none !important;
}

/* Animated glow layer behind the card */
.card-glow-layer {
    position: absolute;
    inset: -2px;
    border-radius: 26px;
    background: conic-gradient(from 0deg,
            rgba(255, 200, 0, 0.3),
            rgba(255, 120, 0, 0.1),
            rgba(255, 200, 0, 0.3),
            rgba(255, 120, 0, 0.1));
    animation: glowRotate 4s linear infinite;
    z-index: -1;
    filter: blur(8px);
    opacity: 0.6;
}

@keyframes glowRotate {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Holographic rainbow shine on hover */
.fut-player-card.premium-vision::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 24px;
    background: linear-gradient(105deg,
            transparent 0%,
            transparent 35%,
            rgba(255, 255, 255, 0.06) 38%,
            rgba(255, 255, 255, 0.15) 42%,
            rgba(255, 220, 100, 0.12) 45%,
            rgba(255, 255, 255, 0.2) 48%,
            rgba(200, 255, 200, 0.08) 52%,
            rgba(255, 255, 255, 0.15) 55%,
            rgba(255, 200, 100, 0.08) 58%,
            transparent 62%,
            transparent 100%);
    transform: translateX(-120%);
    transition: transform 1.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    pointer-events: none;
    z-index: 10;
    mix-blend-mode: overlay;
}

.fut-player-container:hover .fut-player-card.premium-vision::after {
    transform: translateX(120%);
}

/* Subtle pattern overlay for texture */
.fut-player-card.premium-vision::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 24px;
    background-image:
        repeating-linear-gradient(45deg,
            rgba(255, 255, 255, 0.03) 0px,
            rgba(255, 255, 255, 0.03) 1px,
            transparent 1px,
            transparent 8px);
    pointer-events: none;
    z-index: 1;
}

/* === TOP LAYOUT (Rating + Avatar) === */
.fut-top-layout {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
    position: relative;
    z-index: 5;
}

.rating-block {
    text-align: left;
    line-height: 0.85;
    padding-top: 5px;
}

.fut-rating {
    font-size: 5rem;
    font-weight: 900;
    font-family: 'Inter', sans-serif;
    color: rgba(255, 255, 255, 0.95);
    letter-spacing: -4px;
    text-shadow:
        0 2px 4px rgba(0, 0, 0, 0.3),
        0 0 30px rgba(255, 200, 0, 0.2);
    -webkit-text-stroke: 1px rgba(0, 0, 0, 0.1);
}

.fut-position {
    font-size: 1.2rem;
    font-weight: 800;
    letter-spacing: 2px;
    color: rgba(255, 255, 255, 0.7);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    padding-left: 3px;
    margin-top: 2px;
}

/* === AVATAR === */
.avatar-block {
    position: relative;
    width: 120px;
    height: 120px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.avatar-geometric-bg {
    position: absolute;
    width: 150%;
    height: 150%;
    background-image: url("data:image/svg+xml,%3Csvg width='120' height='120' viewBox='0 0 120 120' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M60 0l51.96 30v60L60 120 8.04 90V30z' fill='none' stroke='rgba(255,255,255,0.2)' stroke-width='2'/%3E%3Cpath d='M60 10l43.3 25v50L60 110 16.7 85V35z' fill='none' stroke='rgba(255,255,255,0.12)' stroke-width='1.5'/%3E%3C/svg%3E");
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0.7;
    filter: drop-shadow(0 0 15px rgba(255, 200, 0, 0.15));
    animation: hexPulse 3s ease-in-out infinite;
}

@keyframes hexPulse {

    0%,
    100% {
        transform: scale(1) rotate(0deg);
        opacity: 0.7;
    }

    50% {
        transform: scale(1.05) rotate(3deg);
        opacity: 0.9;
    }
}

.fut-player-image {
    width: 95px;
    height: 95px;
    border-radius: 50%;
    object-fit: cover;
    z-index: 2;
    border: 3px solid rgba(255, 255, 255, 0.4);
    box-shadow:
        0 8px 25px rgba(0, 0, 0, 0.3),
        0 0 0 2px rgba(255, 180, 0, 0.4),
        inset 0 -3px 6px rgba(0, 0, 0, 0.15);
}

/* === INFO SECTION === */
.fut-info-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding-top: 5px;
    position: relative;
    z-index: 5;
}

.fut-player-name {
    font-size: 2rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0;
    color: #fff;
    text-shadow:
        0 2px 4px rgba(0, 0, 0, 0.3),
        0 0 20px rgba(255, 200, 0, 0.15);
    width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: center;
}

.fut-player-name::after {
    content: '';
    display: block;
    width: 70%;
    height: 2px;
    background: linear-gradient(90deg,
            transparent,
            rgba(255, 255, 255, 0.4),
            rgba(255, 220, 100, 0.6),
            rgba(255, 255, 255, 0.4),
            transparent);
    margin: 8px auto 0;
    border-radius: 2px;
}

.fut-player-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8rem;
    font-weight: 800;
    margin-top: 6px;
    margin-bottom: 12px;
    color: #a0ffa0;
    letter-spacing: 1px;
    text-transform: uppercase;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.meta-dot {
    opacity: 0.4;
    color: rgba(255, 255, 255, 0.5);
}

.lvl-tag {
    color: rgba(255, 255, 255, 0.65);
    font-weight: 700;
}

/* === STATS GRID === */
.fut-stats-grid-v2 {
    width: 100%;
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 14px 0 6px;
    border-top: 2px solid rgba(255, 255, 255, 0.12);
    z-index: 5;
    position: relative;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.stat-item .v {
    font-size: 2.2rem;
    font-weight: 900;
    color: rgba(255, 255, 255, 0.95);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.25);
    line-height: 1;
}

.stat-item .l {
    font-size: 0.75rem;
    font-weight: 800;
    color: rgba(255, 255, 255, 0.45);
    letter-spacing: 2px;
    text-transform: uppercase;
}

/* === SHARE BUTTON === */
.fut-front-share-btn {
    position: absolute;
    bottom: 16px;
    right: 16px;
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.25), rgba(255, 255, 255, 0.1));
    backdrop-filter: blur(10px);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 0.95rem;
    cursor: pointer;
    box-shadow:
        0 4px 15px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.25);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 20;
}

.fut-front-share-btn:hover {
    transform: scale(1.15) rotate(-5deg);
    box-shadow: 0 6px 25px rgba(255, 200, 0, 0.3);
    background: linear-gradient(135deg, rgba(255, 200, 0, 0.4), rgba(255, 180, 0, 0.2));
    border-color: rgba(255, 200, 0, 0.5);
}

/* === INSTAGRAM STORY BUTTON === */
.fut-story-btn {
    position: absolute;
    bottom: 16px;
    left: 16px;
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #f09433, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 0.95rem;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(220, 39, 67, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.25);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 20;
}

.fut-story-btn:hover {
    transform: scale(1.15) rotate(5deg);
    box-shadow: 0 6px 25px rgba(220, 39, 67, 0.6);
}

/* Face arrière */
.fut-back-content {
    background: #1a1a1a;
    width: 100%;
    height: 100%;
    border-radius: 35px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 30px;
    color: white;
    border: 3px solid #ffb800;
}

/* Tier Overrides - High Vibrancy & Color-Matched Glows */
.fut-card-icon {
    background: linear-gradient(135deg, #1a1a1a 0%, #3e3e3e 100%);
    color: #ffd700;
    border: 2px solid #ffd700;
}

.fut-card-front:has(.fut-card-icon),
.fut-card-back:has(.fut-card-icon) {
    filter: drop-shadow(0 0 20px rgba(255, 215, 0, 0.25)) drop-shadow(0 15px 40px rgba(0, 0, 0, 0.7));
}

.fut-card-hero {
    background: linear-gradient(135deg, #2d1b4e 0%, #7c3aed 100%);
    color: #f5f3ff;
    border: 2px solid #a78bfa;
}

.fut-card-front:has(.fut-card-hero),
.fut-card-back:has(.fut-card-hero) {
    filter: drop-shadow(0 0 20px rgba(124, 58, 237, 0.3)) drop-shadow(0 15px 40px rgba(0, 0, 0, 0.7));
}

.fut-card-warrior {
    background: linear-gradient(135deg, #450a0a 0%, #dc2626 100%);
    color: #fef2f2;
    border: 2px solid #f87171;
}

.fut-card-front:has(.fut-card-warrior),
.fut-card-back:has(.fut-card-warrior) {
    filter: drop-shadow(0 0 20px rgba(220, 38, 38, 0.3)) drop-shadow(0 15px 40px rgba(0, 0, 0, 0.7));
}

.fut-card-fairplay {
    background: linear-gradient(135deg, #fff 0%, #fafaf9 100%);
    color: #44403c;
    border: 2px solid #e7e5e4;
}

.fut-card-explorer {
    background: linear-gradient(135deg, #0c4a6e 0%, #0284c7 100%);
    color: #f0f9ff;
    border: 2px solid #38bdf8;
}

.fut-card-front:has(.fut-card-explorer),
.fut-card-back:has(.fut-card-explorer) {
    filter: drop-shadow(0 0 25px rgba(2, 132, 199, 0.4)) drop-shadow(0 15px 40px rgba(0, 0, 0, 0.7));
}

.fut-card-champion {
    background: linear-gradient(135deg, #064e3b 0%, #059669 100%);
    color: #ecfdf5;
    border: 2px solid #34d399;
}

.fut-card-front:has(.fut-card-champion),
.fut-card-back:has(.fut-card-champion) {
    filter: drop-shadow(0 0 20px rgba(5, 150, 105, 0.3)) drop-shadow(0 15px 40px rgba(0, 0, 0, 0.7));
}

.fut-card-silver {
    background: var(--fut-silver-bg);
    border: 2px solid var(--fut-silver-border);
}

.fut-card-bronze {
    background: var(--fut-bronze-bg);
    border: 2px solid var(--fut-bronze-border);
}



.trophy-card.large {
    width: 280px;
    /* Increased width slightly */
    height: 420px;
    /* Increased from 380px */
}

.card-inner {
    background: linear-gradient(135deg,
            #bf953f 0%,
            #fcf6ba 25%,
            #b38728 50%,
            #fbf5b7 75%,
            #aa771c 100%);
    width: 100%;
    height: 100%;
    border-radius: 18px;
    position: relative;
    box-shadow:
        inset 0 0 0 4px rgba(138, 110, 47, 0.4),
        0 15px 35px rgba(0, 0, 0, 0.5),
        0 5px 15px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* Hover Effect: Lift */
.trophy-card:hover .card-inner {
    transform: translateY(-5px) scale(1.02);
    box-shadow:
        inset 0 0 0 4px rgba(138, 110, 47, 0.4),
        0 25px 45px rgba(0, 0, 0, 0.6),
        0 10px 20px rgba(0, 0, 0, 0.4);
}

/* Holographic Shine */
.card-inner::after {
    content: '';
    position: absolute;
    top: -100%;
    left: -100%;
    width: 300%;
    height: 300%;
    background: linear-gradient(115deg,
            transparent 0%,
            transparent 35%,
            rgba(255, 255, 255, 0.2) 45%,
            rgba(255, 255, 255, 0.4) 50%,
            rgba(255, 255, 255, 0.2) 55%,
            transparent 65%,
            transparent 100%);
    transform: rotate(25deg);
    animation: foilShine 6s infinite linear;
    pointer-events: none;
    opacity: 0.7;
}

@keyframes foilShine {
    0% {
        transform: translate(-30%, -30%) rotate(25deg);
    }

    100% {
        transform: translate(30%, 30%) rotate(25deg);
    }
}

/* Top Data */
.card-top {
    position: absolute;
    top: 25px;
    left: 25px;
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 10;
    color: #463409;
}

.card-rating {
    font-size: 2.4rem;
    font-weight: 900;
    line-height: 0.8;
    text-shadow: 1px 1px 0px rgba(255, 255, 255, 0.4), 0 0 10px rgba(62, 48, 8, 0.2);
    position: relative;
}

.card-position {
    font-size: 0.85rem;
    font-weight: 800;
    margin-top: 6px;
    text-transform: uppercase;
    letter-spacing: 1px;
    background: linear-gradient(to bottom, rgba(70, 52, 9, 0.15), rgba(70, 52, 9, 0.05));
    border: 1px solid rgba(70, 52, 9, 0.2);
    padding: 2px 8px;
    border-radius: 4px;
    color: #463409;
}

/* Texture Overlay */
.card-inner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.05'/%3E%3C/svg%3E");
    opacity: 0.4;
    mix-blend-mode: overlay;
    pointer-events: none;
    z-index: 1;
}

/* Ensure content is above texture/shine */
.card-top,
.card-image-container,
.card-info {
    z-index: 5;
    position: relative;
}

.card-name {
    font-size: 1.6rem;
    font-weight: 900;
    text-transform: uppercase;
    color: #463409;
    border-bottom: 2px solid rgba(70, 52, 9, 0.3);
    width: 90%;
    text-align: center;
    padding-bottom: 5px;
    margin-bottom: 8px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.3);
}

.stat {
    color: #463409;
}

/* Remove old pulse if not needed, or keep it */
@keyframes ratingPulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }
}

/* Top Data */
.card-top {
    position: absolute;
    top: 25px;
    left: 25px;
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 10;
    color: #3e3008;
}

.card-rating {
    font-size: 2.2rem;
    font-weight: 900;
    line-height: 0.8;
    text-shadow: 0 0 10px rgba(62, 48, 8, 0.3);
    animation: ratingPulse 2s infinite ease-in-out;
}

@keyframes ratingPulse {

    0%,
    100% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.05);
        opacity: 0.8;
    }
}

.card-position {
    font-size: 0.8rem;
    font-weight: 800;
    margin-top: 6px;
    text-transform: uppercase;
    letter-spacing: 1px;
    background: rgba(62, 48, 8, 0.1);
    padding: 2px 8px;
    border-radius: 4px;
}

.card-club {
    margin-top: 8px;
    font-size: 1.2rem;
    opacity: 0.8;
}

/* Avatar Image */
.card-image-container {
    margin-top: 40px;
    margin-bottom: 0;
    height: 160px;
    display: flex;
    justify-content: center;
    align-items: flex-end;
}

.card-image-container img {
    width: 140px;
    height: 140px;
    object-fit: contain;
    filter: drop-shadow(5px 5px 5px rgba(0, 0, 0, 0.3));
    transition: transform 0.2s;
}

/* Info Section */
.card-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 10px 20px;
}

.card-name {
    font-size: 1.6rem;
    font-weight: 800;
    text-transform: uppercase;
    color: #3e3008;
    border-bottom: 2px solid rgba(62, 48, 8, 0.2);
    width: 90%;
    text-align: center;
    padding-bottom: 5px;
    margin-bottom: 8px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.card-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 20px;
    row-gap: 2px;
    width: 80%;
}

.stat {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    font-weight: 700;
    color: #3e3008;
}

.stat span:first-child {
    font-weight: 500;
    margin-right: 5px;
    opacity: 0.9;
}

.stat span:last-child {
    font-weight: 800;
}

/* Animation */
.pop-animation {
    animation: popSpring 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes popSpring {
    0% {
        transform: scale(0.8);
        opacity: 0;
    }

    50% {
        transform: scale(1.1);
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* ==========================================
   FUT PLAYER CARD CONTAINER & FLIPPER (Migrated from profile.css)
   ========================================== */

.fut-card-container {
    perspective: 1500px;
    width: 300px;
    height: 540px;
    margin: 0 auto 30px;
    cursor: pointer;
    position: relative;
    z-index: 10;
}

.fut-card-flipper {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    transform-style: preserve-3d;
}

.fut-card-container.flipped .fut-card-flipper {
    transform: rotateY(180deg);
}

/* Front & Back Faces */
.fut-card-front,
.fut-card-back {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    backface-visibility: hidden !important;
    -webkit-backface-visibility: hidden !important;
    overflow: visible !important;
    margin: 0 !important;
    filter: drop-shadow(0 15px 30px rgba(0, 0, 0, 0.6));
}

.fut-card-back {
    transform: rotateY(180deg);
    z-index: 1;
}

.fut-card-front {
    z-index: 2;
}

/* Specific styling for the back face */
.fut-back-face-style {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    height: 100%;
    padding: 20px 15px;
    box-sizing: border-box;
    text-align: center;
    background: var(--surface-2);
}

/* Placeholder */
.fut-card-placeholder {
    width: 300px;
    height: 540px;
    background: var(--fut-gold-bg);
    border-radius: 18px;
    opacity: 0.1;
    clip-path: polygon(0 0, 100% 0, 100% 88%, 50% 100%, 0 88%);
    -webkit-clip-path: polygon(0 0, 100% 0, 100% 88%, 50% 100%, 0 88%);
}

/* Flipper Interactive Elements */
.flip-hint-icon {
    position: absolute;
    bottom: 20px;
    right: 20px;
    font-size: 18px;
    opacity: 0.5;
}

.fut-back-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    gap: 30px;
}

.fut-back-title {
    color: inherit;
    font-weight: 900;
    letter-spacing: 2px;
}

.fut-qr-code-wrapper {
    background: white;
    padding: 10px;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.fut-scan-text {
    font-size: 12px;
    font-weight: 800;
    margin-top: 10px;
    opacity: 0.8;
}

.fut-share-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: inherit;
    padding: 10px 20px;
    border-radius: 12px;
    font-weight: 800;
    cursor: pointer;
    transition: background 0.2s;
}

.fut-share-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.fut-front-share-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    background: rgba(0, 0, 0, 0.15);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s;
}

.fut-front-share-btn:hover {
    background: rgba(0, 0, 0, 0.3);
}

/* --- SCÈNE 3D (PACK OPENING) --- */
.scene {
    width: 300px;
    height: 450px;
    perspective: 1000px;
    /* Indispensable pour l'effet 3D */
    margin: auto;
    position: relative;
    top: 50%;
    transform: translateY(-50%);
}

.card-object {
    width: 100%;
    height: 100%;
    transition: transform 1s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    /* Effet rebond */
    transform-style: preserve-3d;
    cursor: pointer;
    position: relative;
}

/* --- CLASSE D'ÉTAT --- */
.card-object.is-flipped {
    transform: rotateY(180deg);
}

/* --- FACES --- */
.card-face {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    /* Cache le dos quand retourné */
    -webkit-backface-visibility: hidden;
    border-radius: 18px;
    /* Match card radius */
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.card-front {
    transform: rotateY(180deg);
    /* La face avant est déjà retournée au départ */
    background: transparent;
    /* Rely on inner content bg */
}

.card-back {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    border: 3px solid #ffd700;
    /* Bordure Or par défaut */
    border-radius: 18px;

    /* Animation d'attente (Idle) */
    animation: breathing-glow 2s infinite alternate;
}

/* --- EFFETS SPÉCIAUX (Metadata based) --- */
/* Effet Remontada (Flammes/Rouge) */
.effect-fire .card-back {
    border-color: #ff4500;
    box-shadow: 0 0 20px #ff4500, inset 0 0 20px #ff4500;
    animation: shake-hard 0.5s infinite;
}

/* Effet Clean Sheet (Glace/Bleu) */
.effect-ice .card-back {
    border-color: #00d2ff;
    box-shadow: 0 0 20px #00d2ff, inset 0 0 20px #00d2ff;
}

/* --- KEYFRAMES --- */
@keyframes breathing-glow {
    from {
        box-shadow: 0 0 10px #ffd700;
        transform: scale(1);
    }

    to {
        box-shadow: 0 0 25px #ffd700;
        transform: scale(1.02);
    }
}

@keyframes shake-hard {
    0% {
        transform: translate(1px, 1px) rotate(0deg);
    }

    10% {
        transform: translate(-1px, -2px) rotate(-1deg);
    }

    20% {
        transform: translate(-3px, 0px) rotate(1deg);
    }

    30% {
        transform: translate(3px, 2px) rotate(0deg);
    }

    40% {
        transform: translate(1px, -1px) rotate(1deg);
    }

    50% {
        transform: translate(-1px, 2px) rotate(-1deg);
    }

    60% {
        transform: translate(-3px, 1px) rotate(0deg);
    }

    70% {
        transform: translate(3px, 1px) rotate(-1deg);
    }

    80% {
        transform: translate(-1px, -1px) rotate(1deg);
    }

    90% {
        transform: translate(1px, 2px) rotate(0deg);
    }

    100% {
        transform: translate(1px, -2px) rotate(-1deg);
    }
}

/* --- Performance Optimization for 3D Animations (Mobile) --- */

/* Hint to browser to optimize caching for 3D transforms */
.card-object {
    will-change: transform;
}

/* Reduced Motion Preference: Disable 3D flip for performance/comfort */
@media (prefers-reduced-motion: reduce) {
    .card-object {
        transition: none !important;
        transform: none !important;
    }

    /* Replace 3D Flip with simple cross-fade */
    .card-front {
        opacity: 0;
        transition: opacity 0.5s;
        transform: none !important;
        z-index: 2;
    }

    .card-object.is-flipped .card-front {
        opacity: 1;
    }
}

/* --- Flex Ultime Additions (CertiScore) --- */
.fut-watermark {
    position: absolute;
    bottom: 80px;
    /* SAFELY ABOVE THE CUT */
    left: 0;
    width: 100%;
    text-align: center;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 2px;
    opacity: 0.6;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.8);
    z-index: 50;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.fut-front-share-btn {
    position: absolute;
    bottom: 160px;
    right: 25px;
    top: auto;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    color: inherit;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.fut-front-share-btn:hover {
    background: white;
    color: black;
    transform: scale(1.1);
}

/* Ajustement stats grid pour laisser place au watermark */
.fut-stats-grid {
    padding-bottom: 25px;
    /* Plus d'espace en bas */
}

/* S'assurer que les container FUT sont centrés */
.fut-player-container {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}

/* Quick Record Location Enhancements */
.recent-locations-grid {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
    overflow-x: auto;
    padding-bottom: 5px;
    /* Pour la scrollbar */
    -webkit-overflow-scrolling: touch;
    /* Scroll fluide iOS */
}

.location-chip {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--surface-light);
    border: 1px solid var(--border-color);
    padding: 8px 12px;
    border-radius: 20px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
    max-width: 200px;
}

.location-chip:hover {
    background: var(--primary-light);
    border-color: var(--primary);
}

.location-chip i {
    color: var(--primary);
}

.location-chip .name {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-weight: 500;
}

.map-compact {
    height: 200px;
    /* Plus petit par défaut pour laisser place à la recherche */
    border-radius: 12px;
    margin-top: 10px;
    transition: height 0.3s ease;
}

.map-compact.active {
    height: 350px;
    /* S'agrandit si on interagit */
}

/* Smart Rivals (Step 3) - Instagram Stories Style */
.recent-opponents-row {
    display: flex;
    gap: 15px;
    overflow-x: auto;
    padding: 5px 5px 15px 5px;
    /* Bottom padding for scrollbar */
    margin-bottom: 20px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    /* Firefox */
}

.recent-opponents-row::-webkit-scrollbar {
    display: none;
    /* Chrome/Safari */
}

.rival-bubble {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    flex: 0 0 auto;
    width: 60px;
    transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.rival-bubble:hover {
    transform: scale(1.1);
}

.rival-avatar {
    width: 54px;
    height: 54px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--primary);
    /* Colorful border */
    background: var(--surface);
    padding: 2px;
    /* Space between border and image */
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: box-shadow 0.2s ease;
}

.rival-bubble:hover .rival-avatar {
    box-shadow: 0 6px 12px rgba(var(--primary-rgb), 0.3);
}

.rival-name {
    font-size: 0.75rem;
    margin-top: 6px;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
    font-weight: 500;
    color: var(--text-secondary);
}

.rival-bubble:hover .rival-name {
    color: var(--text-primary);
}

/* --- Trophy Fail Card --- */
.trophy-card--fail .card-inner {
    background: linear-gradient(135deg, #2c3e50 0%, #000000 100%);
    border: 2px solid #555;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8);
}

.trophy-card--fail .card-inner::after {
    display: none;
    /* No holographic shine */
}

.fail-texture {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M11 18c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm48 25c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm-43-7c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm63 31c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM34 90c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm56-76c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM12 86c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm28-65c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm23-11c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-6 60c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm29 22c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zM32 63c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm57-13c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-9-21c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM60 91c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM35 41c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM12 60c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2z'/%3E%3C/g%3E%3C/svg%3E");
}

.fail-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    z-index: 2;
    color: #dfe6e9;
    text-align: center;
    padding: 20px;
}

.fail-icon-container {
    font-size: 3rem;
    margin-bottom: 15px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.5);
    animation: pulseGray 2s infinite;
}

.fail-icon {
    color: #b2bec3;
}

.fail-title {
    font-family: 'Teko', sans-serif;
    font-size: 2.5rem;
    margin: 10px 0;
    text-transform: uppercase;
    color: #b2bec3;
    letter-spacing: 2px;
}

.fail-message {
    font-size: 1rem;
    opacity: 0.7;
    margin-bottom: 20px;
}

.fail-hint {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #ff7675;
    font-weight: bold;
}

@keyframes pulseGray {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(178, 190, 195, 0.2);
    }

    70% {
        transform: scale(1.05);
        box-shadow: 0 0 0 10px rgba(178, 190, 195, 0);
    }

    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(178, 190, 195, 0);
    }
}

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.1);
        opacity: 0.8;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* --- Victory Card Styles (FUT) --- */
.card-top-badge {
    position: absolute;
    top: 20px;
    width: 100%;
    display: flex;
    justify-content: center;
    z-index: 10;
}

.winner-badge {
    background: linear-gradient(135deg, #ffd700, #ffaa00);
    color: #463409;
    padding: 5px 15px;
    border-radius: 20px;
    font-weight: 800;
    text-transform: uppercase;
    font-size: 0.9rem;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.4);
    display: flex;
    align-items: center;
    gap: 5px;
}

.card-content-centered {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 5;
    padding-top: 30px;
    /* Space for badge */
}

.avatar-ring {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    padding: 4px;
    background: linear-gradient(135deg, #fff, #ffd700);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
    margin-bottom: 10px;
}

.winner-avatar {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #1a1a1a;
    background: #1a1a1a;
}

.winner-avatar-placeholder {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: #333;
    color: #ffd700;
    font-size: 2.5rem;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 3px solid #1a1a1a;
}

.winner-name {
    font-family: 'Teko', sans-serif;
    font-size: 2rem;
    color: #463409;
    margin: 5px 0;
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.4);
    text-transform: uppercase;
    font-weight: 600;
    line-height: 1;
}

.winner-score {
    font-family: 'Impact', 'Anton', sans-serif;
    font-size: 3.5rem;
    color: #463409;
    line-height: 1;
    margin-bottom: 15px;
    background: linear-gradient(to bottom, #463409, #79550b);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    filter: drop-shadow(0 2px 0 rgba(255, 255, 255, 0.3));
}

.card-stats-row {
    display: flex;
    gap: 20px;
    width: 80%;
    justify-content: center;
    border-top: 1px solid rgba(70, 52, 9, 0.2);
    padding-top: 10px;
}

.card-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.stat-label {
    font-size: 0.7rem;
    font-weight: 800;
    opacity: 0.6;
    color: #463409;
    margin-bottom: 2px;
}

.stat-val {
    font-weight: 800;
    color: #463409;
    font-size: 1rem;
}

/* Fail card overrides */
.trophy-card--fail .winner-name,
.trophy-card--fail .stat-val,
.trophy-card--fail .stat-label {
    color: #dfe6e9 !important;
}

/* --- Reveal Modal Close Button --- */
#close-reveal-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    font-size: 2rem;
    cursor: pointer;
    z-index: 10001;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    backdrop-filter: blur(4px);
}

#close-reveal-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

@media (min-width: 768px) {
    #close-reveal-btn {
        top: 30px;
        right: 30px;
        width: 50px;
        height: 50px;
        font-size: 2.2rem;
    }
}