/* ============================================
   FIFA World Cup 2026 — Splash Experience
   Temporary feature: auto-expires July 5, 2026
   ============================================ */

:root {
    --fifa-gold: #D4AF37;
    --fifa-gold-bright: #F4D03F;
    --fifa-gold-dim: rgba(212, 175, 55, 0.3);
    --fifa-black: #000000;
    --fifa-dark: #0a0a0a;
    --fifa-card-bg: rgba(255, 255, 255, 0.05);
    --fifa-card-border: rgba(212, 175, 55, 0.25);
}

/* ── Floating Soccer Ball Trigger ── */

.fifa-floating-ball {
    position: fixed;
    right: -4px;
    bottom: 120px;
    z-index: 9998;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    animation: fifaBallBounce 1.8s ease-in-out infinite;
    transition: right 0.3s ease;
}

.fifa-floating-ball:hover {
    right: 4px;
    animation-play-state: paused;
}

.fifa-ball-icon {
    width: 80px;
    height: 80px;
    font-size: 68px;
    line-height: 80px;
    text-align: center;
    filter: drop-shadow(0 0 16px rgba(212, 175, 55, 0.6));
    transition: transform 0.3s ease, filter 0.3s ease;
}

.fifa-floating-ball:hover .fifa-ball-icon {
    transform: scale(1.15);
    filter: drop-shadow(0 0 24px rgba(212, 175, 55, 0.9));
}

.fifa-ball-label {
    background: var(--fifa-gold);
    color: #000;
    font-family: 'Montserrat', 'Poppins', sans-serif;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    padding: 3px 10px;
    border-radius: 4px;
    white-space: nowrap;
    animation: fifaLabelPulse 2s ease-in-out infinite;
    box-shadow: 0 2px 8px rgba(212, 175, 55, 0.4);
}

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

@keyframes fifaLabelPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

/* ── Full-Screen Overlay ── */

.fifa-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: var(--fifa-black);
    z-index: 10000;
    display: none;
    overflow-y: auto;
    overflow-x: hidden;
}

.fifa-overlay.is-active {
    display: block;
}

/* ── Close Button ── */

.fifa-close-btn {
    position: fixed;
    top: 20px;
    right: 24px;
    z-index: 10001;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid var(--fifa-gold-dim);
    background: rgba(0, 0, 0, 0.6);
    color: var(--fifa-gold);
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    opacity: 0;
}

.fifa-close-btn:hover {
    border-color: var(--fifa-gold);
    background: rgba(212, 175, 55, 0.15);
    transform: rotate(90deg);
}

/* ── Skip Intro ── */

.fifa-skip-btn {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10001;
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.4);
    font-family: 'Poppins', sans-serif;
    font-size: 13px;
    letter-spacing: 1px;
    cursor: pointer;
    transition: color 0.3s ease;
    opacity: 0;
}

.fifa-skip-btn:hover {
    color: var(--fifa-gold);
}

/* ── Cinematic Content ── */

.fifa-cinema {
    position: relative;
    width: 100%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px 40px;
}

/* 3D Flip: Logo → Trophy */
.fifa-flip-container {
    perspective: 1200px;
    margin: 10px auto 15px;
    width: 200px;
    height: 200px;
}

.fifa-flip-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
    opacity: 0;
}

.fifa-flip-front,
.fifa-flip-back {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.fifa-flip-front img {
    height: 80px;
    width: auto;
    filter: brightness(0) invert(1);
}

.fifa-flip-back {
    transform: rotateY(180deg);
    background: transparent;
}

.fifa-flip-back img {
    max-height: 180px;
    max-width: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    filter: drop-shadow(0 0 30px rgba(212, 175, 55, 0.5)) drop-shadow(0 0 60px rgba(212, 175, 55, 0.2));
    border-radius: 8px;
}

@media (max-width: 767px) {
    .fifa-flip-container {
        width: 150px;
        height: 150px;
    }
    .fifa-flip-front img {
        height: 55px;
    }
    .fifa-flip-back img {
        max-height: 130px;
    }
}

/* Golden line */
.fifa-golden-line {
    width: 60%;
    max-width: 400px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--fifa-gold), transparent);
    transform: scaleX(0);
    margin-bottom: 30px;
}

/* Title block */
.fifa-title-block {
    text-align: center;
    margin-bottom: 20px;
}

.fifa-title-main {
    font-family: 'Montserrat', 'Poppins', sans-serif;
    font-size: 42px;
    font-weight: 700;
    color: var(--fifa-gold);
    letter-spacing: 6px;
    text-transform: uppercase;
    margin: 0;
    opacity: 0;
    text-shadow: 0 0 30px rgba(212, 175, 55, 0.3);
}

.fifa-title-sub {
    font-family: 'Montserrat', 'Poppins', sans-serif;
    font-size: 22px;
    font-weight: 300;
    color: rgba(255, 255, 255, 0.8);
    letter-spacing: 12px;
    text-transform: uppercase;
    margin: 8px 0 0;
    opacity: 0;
}

/* Venue line */
.fifa-venue {
    text-align: center;
    margin-bottom: 10px;
    opacity: 0;
}

.fifa-venue-icon {
    font-size: 20px;
    margin-right: 8px;
    color: var(--fifa-gold);
}

.fifa-venue-text {
    font-family: 'Poppins', sans-serif;
    font-size: 16px;
    color: rgba(255, 255, 255, 0.6);
    letter-spacing: 2px;
}

.fifa-venue-divider {
    width: 40%;
    max-width: 250px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--fifa-gold-dim), transparent);
    margin: 15px auto 10px;
    transform: scaleX(0);
}

/* Sawari branding */
.fifa-powered-by {
    text-align: center;
    margin-bottom: 30px;
    opacity: 0;
}

.fifa-powered-by span {
    font-family: 'Poppins', sans-serif;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.35);
    letter-spacing: 2px;
    text-transform: uppercase;
}

.fifa-powered-by strong {
    color: var(--fifa-gold);
    font-weight: 600;
}

/* ── Match Cards Grid ── */

.fifa-cards-container {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 15px;
}

.fifa-cards-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.fifa-match-card {
    background: var(--fifa-card-bg);
    border: 1px solid var(--fifa-card-border);
    border-radius: 12px;
    padding: 24px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.35s ease;
    opacity: 0;
    transform: translateY(40px);
    position: relative;
    overflow: hidden;
    text-decoration: none;
    display: block;
}

.fifa-match-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--fifa-gold), transparent);
    opacity: 0;
    transition: opacity 0.35s ease;
}

.fifa-match-card:hover {
    border-color: var(--fifa-gold);
    transform: translateY(-4px);
    box-shadow: 0 8px 32px rgba(212, 175, 55, 0.15), 0 0 0 1px rgba(212, 175, 55, 0.1);
    text-decoration: none;
}

.fifa-match-card:hover::before {
    opacity: 1;
}

/* Card content */
.fifa-card-flags {
    font-size: 36px;
    margin-bottom: 10px;
    line-height: 1.2;
}

.fifa-card-vs {
    display: inline-block;
    font-family: 'Montserrat', 'Poppins', sans-serif;
    font-size: 12px;
    font-weight: 700;
    color: var(--fifa-gold);
    margin: 0 10px;
    letter-spacing: 2px;
}

.fifa-card-teams {
    font-family: 'Poppins', sans-serif;
    font-size: 15px;
    font-weight: 600;
    color: #fff;
    margin-bottom: 12px;
    line-height: 1.4;
}

.fifa-card-teams .team-name {
    white-space: nowrap;
}

.fifa-card-teams .vs-text {
    color: var(--fifa-gold);
    font-size: 12px;
    font-weight: 400;
    margin: 0 6px;
}

.fifa-card-stage {
    font-family: 'Poppins', sans-serif;
    font-size: 11px;
    font-weight: 600;
    color: var(--fifa-gold);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 6px;
}

.fifa-card-date {
    font-family: 'Poppins', sans-serif;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.55);
    margin-bottom: 18px;
}

.fifa-card-cta {
    display: inline-block;
    background: var(--fifa-gold);
    color: #000;
    font-family: 'Montserrat', 'Poppins', sans-serif;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    padding: 10px 28px;
    border-radius: 50px;
    border: none;
    transition: all 0.3s ease;
    text-decoration: none;
}

.fifa-match-card:hover .fifa-card-cta {
    background: var(--fifa-gold-bright);
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.4);
}

/* ── Background Ambient Effects ── */

.fifa-ambient-glow {
    position: absolute;
    top: 10%;
    left: 50%;
    transform: translateX(-50%);
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(212, 175, 55, 0.06) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}

.fifa-cinema > *:not(.fifa-ambient-glow):not(.fifa-bg-image):not(.fifa-flip-container) {
    position: relative;
    z-index: 1;
}

/* Particle pseudo-elements */
.fifa-overlay::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        radial-gradient(1px 1px at 10% 20%, rgba(212, 175, 55, 0.3) 0%, transparent 100%),
        radial-gradient(1px 1px at 30% 70%, rgba(212, 175, 55, 0.2) 0%, transparent 100%),
        radial-gradient(1px 1px at 50% 40%, rgba(255, 255, 255, 0.15) 0%, transparent 100%),
        radial-gradient(1px 1px at 70% 80%, rgba(212, 175, 55, 0.25) 0%, transparent 100%),
        radial-gradient(1px 1px at 90% 30%, rgba(212, 175, 55, 0.2) 0%, transparent 100%),
        radial-gradient(1px 1px at 20% 90%, rgba(255, 255, 255, 0.1) 0%, transparent 100%),
        radial-gradient(1px 1px at 80% 10%, rgba(212, 175, 55, 0.15) 0%, transparent 100%),
        radial-gradient(1px 1px at 60% 60%, rgba(255, 255, 255, 0.1) 0%, transparent 100%);
    pointer-events: none;
    z-index: 0;
    animation: fifaStarsTwinkle 4s ease-in-out infinite alternate;
}

@keyframes fifaStarsTwinkle {
    0% { opacity: 0.4; }
    100% { opacity: 1; }
}

/* ── Trophy/Stadium Background Image ── */

.fifa-bg-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0;
    pointer-events: none;
    z-index: 0;
}

/* Dark gradient over the stadium image so text stays readable */
.fifa-bg-image::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(ellipse at center top, rgba(0,0,0,0.4) 0%, rgba(0,0,0,0.85) 70%, rgba(0,0,0,0.95) 100%);
}

/* ── Responsive ── */

@media (max-width: 991px) {
    .fifa-cards-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .fifa-title-main {
        font-size: 30px;
        letter-spacing: 4px;
    }

    .fifa-title-sub {
        font-size: 16px;
        letter-spacing: 8px;
    }
}

@media (max-width: 767px) {
    .fifa-cards-grid {
        grid-template-columns: 1fr;
        max-width: 400px;
        margin: 0 auto;
    }

    .fifa-title-main {
        font-size: 22px;
        letter-spacing: 3px;
    }

    .fifa-title-sub {
        font-size: 13px;
        letter-spacing: 6px;
    }

    .fifa-venue-text {
        font-size: 13px;
    }

    .fifa-floating-ball {
        right: -2px;
        bottom: 90px;
    }

    .fifa-ball-icon {
        width: 64px;
        height: 64px;
        font-size: 54px;
        line-height: 64px;
    }

    .fifa-close-btn {
        top: 12px;
        right: 12px;
        width: 38px;
        height: 38px;
        font-size: 16px;
    }

    .fifa-cinema {
        padding: 50px 15px 30px;
        justify-content: flex-start;
        padding-top: 70px;
    }

    .fifa-match-card {
        padding: 20px 16px;
    }

    .fifa-card-flags {
        font-size: 30px;
    }
}

/* ── Ball hidden when overlay is active ── */
.fifa-overlay.is-active ~ .fifa-floating-ball {
    display: none;
}

/* ── Golden Sparkle Confetti ── */

.fifa-sparkle {
    position: fixed;
    pointer-events: none;
    z-index: 10002;
    will-change: transform, opacity;
}

.fifa-sparkle-dot {
    width: var(--size, 6px);
    height: var(--size, 6px);
    border-radius: 50%;
    background: var(--color, #D4AF37);
    box-shadow: 0 0 6px var(--color, #D4AF37);
    animation: fifaSparkleFall var(--duration, 2s) ease-out forwards;
}

.fifa-sparkle-rect {
    width: var(--w, 8px);
    height: var(--h, 4px);
    background: var(--color, #D4AF37);
    animation: fifaSparkleFloat var(--duration, 2.5s) ease-out forwards;
}

.fifa-sparkle-star {
    width: var(--size, 8px);
    height: var(--size, 8px);
    background: var(--color, #D4AF37);
    clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
    animation: fifaSparkleSpin var(--duration, 2.2s) ease-out forwards;
}

@keyframes fifaSparkleFall {
    0% {
        transform: translate(0, 0) scale(1);
        opacity: 1;
    }
    100% {
        transform: translate(var(--dx, 30px), var(--dy, 300px)) scale(0);
        opacity: 0;
    }
}

@keyframes fifaSparkleFloat {
    0% {
        transform: translate(0, 0) rotate(0deg) scale(1);
        opacity: 1;
    }
    100% {
        transform: translate(var(--dx, -20px), var(--dy, 350px)) rotate(var(--rot, 720deg)) scale(0.2);
        opacity: 0;
    }
}

@keyframes fifaSparkleSpin {
    0% {
        transform: translate(0, 0) rotate(0deg) scale(1.2);
        opacity: 1;
    }
    50% {
        opacity: 1;
    }
    100% {
        transform: translate(var(--dx, 40px), var(--dy, 280px)) rotate(var(--rot, 540deg)) scale(0);
        opacity: 0;
    }
}
