:root {
    --main-red: #D4001A;
}

body {
    margin: 0;
    padding: 0;
    background-color: #000000;
    background-position: center calc(120px - 5vw);
    background-size: 100% auto;
    color: white;
    font-family: sans-serif;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    min-height: 100vh;
}

/* Navigation Bar */
.circus-nav {
    width: 100%;
    background: #000000;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 8px 0;
    gap: 25px;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
}

.circus-nav .nav-item {
    font-family: 'Rye', serif;
    font-size: clamp(0.9rem, 1.2vw, 1.1rem);
    color: #ffd700;
    text-decoration: none;
    padding: 6px 12px;
    /* Border removed */
    border-radius: 15px;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.circus-nav .nav-item img {
    width: 70px;
    /* Increased from 40px */
    height: 70px;
    /* Increased from 40px */
    object-fit: contain;
    transition: transform 0.3s ease;
}

.circus-nav .nav-item:hover {
    color: white;
    /* Background and border removed */
    text-shadow: 0 0 10px var(--main-red);
}

.circus-nav .nav-item:hover img {
    transform: scale(1.1);
}

.circus-nav .nav-item.active {
    /* Subtle indication instead of border/box */
    color: white;
    text-shadow: 0 0 10px #ffd700;
}

/* Nav Toggle Button (Hidden by default) */
.nav-toggle {
    display: none;
    background: var(--main-red);
    color: white;
    border: none;
    padding: 8px 15px;
    font-family: 'Rye', serif;
    font-size: 1.2rem;
    cursor: pointer;
    width: 100%;
    text-align: center;
    position: relative;
    z-index: 1001;
    border-bottom: 2px solid #000;
}

@media (max-width: 768px) {
    .nav-toggle {
        display: block;
        /* Show toggle on mobile */
    }

    .nav-wrapper {
        position: relative;
        z-index: 2000;
        width: 100%;
        /* Ensure full width */
    }

    .circus-nav {
        display: none;
        /* Hidden by default */
        grid-template-columns: repeat(3, 1fr);
        /* 3 columns */
        gap: 8px;
        padding: 8px;
        justify-content: center;
        width: 100%;
        box-sizing: border-box;
        position: absolute;
        /* Overlay */
        top: 100%;
        /* Below toggle */
        left: 0;
        z-index: 2000;
        background: rgba(0, 0, 0, 0.95);
        border-bottom: 2px solid #ffd700;
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
    }

    .circus-nav.open {
        display: grid;
        /* Show when open */
        animation: slideDown 0.3s ease-out;
    }

    .circus-nav .nav-item {
        padding: 8px;
        font-size: 0.8rem;
        white-space: normal;
        text-align: center;
        width: 100%;
        box-sizing: border-box;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        /* background removed */
        border-radius: 10px;
    }

    .circus-nav .nav-item img {
        width: 56px;
        /* Increased from 32px */
        height: 56px;
        /* Increased from 32px */
        margin-bottom: 4px;
    }

    @keyframes slideDown {
        from {
            opacity: 0;
            transform: translateY(-10px);
        }

        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    .header-container {
        margin-top: 2vh;
        padding: 8px;
    }

    .circus-title {
        font-size: clamp(1.8rem, 7vw, 4rem) !important;
        margin: 0 15px;
        letter-spacing: 2px;
    }

    .circus-subtitle {
        font-size: clamp(0.9rem, 3vw, 1.5rem) !important;
        margin-top: 8px;
        letter-spacing: 1px;
    }

    /* Betting section mobile optimization */
    .betting-container {
        margin-top: 15px;
    }

    .match-up {
        flex-direction: row;
        gap: 12px;
        margin-bottom: 25px;
    }

    .team-input label {
        font-size: 1rem;
        margin-bottom: 5px;
    }

    .team-input input {
        font-size: 2rem;
        width: 70px;
    }

    .vs {
        font-size: 2.5rem;
    }

    #validate-bet {
        font-size: clamp(1rem, 2.5vw, 1.5rem);
        padding: 10px 25px;
    }
}

.header-container {
    padding: 15px;
    text-align: center;
    margin-top: 5vh;
    /* Revert to top positioning */
    display: flex;
    flex-direction: column;
    align-items: center;
}

.circus-title {
    font-family: 'Rye', serif;
    font-size: clamp(1.5rem, 6vw, 6rem);
    /* Responsive sizing */
    color: #ffd700;
    /* Gold base */
    text-transform: uppercase;
    letter-spacing: 5px;
    position: relative;
    margin: 0 60px;
    z-index: 20;

    /* The Illumination Effect */
    text-shadow:
        0 0 10px var(--main-red),
        0 0 20px var(--main-red),
        0 0 40px var(--main-red),
        0 0 80px var(--main-red);

    animation: flicker 3s infinite alternate;
}

#play-cta {
    font-family: 'Rye', serif;
    font-size: clamp(1.2rem, 3vw, 2.5rem);
    /* Responsive sizing */
    color: #ffd700;
    background-color: rgba(0, 0, 0, 0.6);
    border: 4px solid var(--main-red);
    padding: 12px 35px;
    margin-top: 40px;
    cursor: pointer;
    border-radius: 50px;
    text-shadow: 0 0 10px var(--main-red);
    box-shadow: 0 0 20px rgba(240, 84, 59, 0.4);
    transition: all 0.3s ease;
    animation: pulse-cta 2s infinite;
}

#play-cta:hover {
    background-color: var(--main-red);
    color: white;
    box-shadow: 0 0 40px var(--main-red);
    transform: scale(1.1);
}

@keyframes pulse-cta {
    0% {
        transform: scale(1);
        box-shadow: 0 0 20px rgba(240, 84, 59, 0.4);
    }

    50% {
        transform: scale(1.05);
        box-shadow: 0 0 30px rgba(240, 84, 59, 0.7);
    }

    100% {
        transform: scale(1);
        box-shadow: 0 0 20px rgba(240, 84, 59, 0.4);
    }
}

.secondary-cta {
    font-family: 'Rye', serif;
    font-size: clamp(1rem, 2.5vw, 1.8rem);
    color: #ffd700;
    background-color: transparent;
    border: 3px solid #ffd700;
    padding: 12px 35px;
    cursor: pointer;
    border-radius: 50px;
    text-shadow: 0 0 8px rgba(255, 215, 0, 0.5);
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.3);
    transition: all 0.3s ease;
}

.secondary-cta:hover {
    background-color: #ffd700;
    color: #000000;
    box-shadow: 0 0 30px rgba(255, 215, 0, 0.6);
    transform: scale(1.05);
}

.video-play-btn {
    margin-top: 40px;
    background: transparent;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    animation: pulse-play 2s infinite;
}

.video-play-btn:hover {
    transform: scale(1.15);
}

.video-play-btn svg {
    filter: drop-shadow(0 0 10px rgba(255, 215, 0, 0.6));
}

@keyframes pulse-play {

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

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

.video-container {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    margin-top: 30px;
}

.video-container video {
    width: 90%;
    max-width: 800px;
    border-radius: 15px;
    border: 3px solid #ffd700;
    box-shadow: 0 0 30px rgba(255, 215, 0, 0.4);
}

.circus-subtitle {
    font-family: 'Rye', serif;
    font-size: clamp(0.8rem, 2.5vw, 1.5rem);
    /* Responsive sizing */
    color: #FFF;
    margin-top: 20px;
    letter-spacing: 3px;
    text-transform: uppercase;
    text-shadow: 0 0 10px rgba(0, 0, 0, 0.8);
    opacity: 0.9;
}

/* Simulate a vintage bulb shine inside text if needed, or stick to outer glow */
@keyframes flicker {

    0%,
    18%,
    22%,
    25%,
    53%,
    57%,
    100% {
        text-shadow:
            0 0 10px var(--main-red),
            0 0 20px #ff4500,
            0 0 40px #ff4500,
            0 0 60px var(--main-red);
        opacity: 1;
    }

    20%,
    24%,
    55% {
        text-shadow: none;
        opacity: 0.5;
    }
}

/* Cards Container */
.cards-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 50px;
    height: 300px;
    perspective: 1000px;
    position: relative;
    width: 100%;
}

/* Base Card Style */
.card {
    width: 120px;
    height: 160px;
    background-color: transparent;
    transform-style: preserve-3d;
    cursor: pointer;
    position: relative;
    transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    margin: 8px;
}

/* Flip Animation Class */
.card.flip .card-inner {
    transform: rotateY(180deg);
}

.card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: center;
    transition: transform 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    /* Bouncy flip */
    transform-style: preserve-3d;
}

.card:hover .card-inner {
    transition: transform 0.1s linear;
    /* Fast response for mouse tracking */
}

/* Front & Back Faces */
.card-front,
.card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    border-radius: 15px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.5);
    border: 4px solid #FFF;
}

/* Design: Front */
.card-front {
    background-color: #2a2a2a;
    color: #ffd700;
    transform: translateZ(1px);
    /* Push forward to avoid z-fighting */
}

.card-front h3 {
    font-family: 'Rye', serif;
    font-size: 1.2rem;
    margin: 8px 0;
    text-transform: uppercase;
}

/* Design: Back */
.card-back {
    background-color: var(--main-red);
    color: white;
    transform: rotateY(180deg) translateZ(1px);
    /* Push forward (in local space) -> effective separation */
}

.card-back h3 {
    font-family: 'Rye', serif;
    font-size: 1.2rem;
    margin: 8px 0;
}

.card-back p {
    font-family: 'Rye', serif;
    font-size: 1.5rem;
    margin: 0;
    font-weight: bold;
}

/* Curved Layout Logic (7 cards) */
/* Detailed nth-child rules to handle Position + Rotation + Z-Index + Hover state */

/* Card 1 */
.card:nth-child(1) {
    transform: translateY(60px) rotate(-15deg);
    z-index: 1;
}

.card:nth-child(1):hover {
    transform: translateY(30px) rotate(-15deg) scale(1.1);
    z-index: 100;
}

/* Card 2 */
.card:nth-child(2) {
    transform: translateY(30px) rotate(-10deg);
    z-index: 2;
}

.card:nth-child(2):hover {
    transform: translateY(0px) rotate(-10deg) scale(1.1);
    z-index: 100;
}

/* Card 3 */
.card:nth-child(3) {
    transform: translateY(10px) rotate(-5deg);
    z-index: 3;
}

.card:nth-child(3):hover {
    transform: translateY(-20px) rotate(-5deg) scale(1.1);
    z-index: 100;
}

/* Card 4 (Center) */
.card:nth-child(4) {
    transform: translateY(0px) rotate(0deg);
    z-index: 4;
}

.card:nth-child(4):hover {
    transform: translateY(-30px) rotate(0deg) scale(1.1);
    z-index: 100;
}

/* Card 5 */
.card:nth-child(5) {
    transform: translateY(10px) rotate(5deg);
    z-index: 5;
}

.card:nth-child(5):hover {
    transform: translateY(-20px) rotate(5deg) scale(1.1);
    z-index: 100;
}

/* Card 6 */
.card:nth-child(6) {
    transform: translateY(30px) rotate(10deg);
    z-index: 6;
}

.card:nth-child(6):hover {
    transform: translateY(0px) rotate(10deg) scale(1.1);
    z-index: 100;
}

/* Card 7 */
.card:nth-child(7) {
    transform: translateY(60px) rotate(15deg);
    z-index: 7;
}

.card:nth-child(7):hover {
    transform: translateY(30px) rotate(15deg) scale(1.1);
    z-index: 100;
}

/* Card 8 */
.card:nth-child(8) {
    transform: translateY(100px) rotate(20deg);
    z-index: 8;
}

.card:nth-child(8):hover {
    transform: translateY(70px) rotate(20deg) scale(1.1);
    z-index: 100;
}

/* Card 9 */
.card:nth-child(9) {
    transform: translateY(140px) rotate(25deg);
    z-index: 9;
}

.card:nth-child(9):hover {
    transform: translateY(110px) rotate(25deg) scale(1.1);
    z-index: 100;
}

/* Glow effect on inner card during hover for extra feedback */
/* REMOVED filter: drop-shadow(...) from .card-inner because it breaks preserve-3d in many browsers */
.card:hover .card-front,
.card:hover .card-back {
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.8);
}

.card:hover .card-inner {
    /* filter: drop-shadow(0 0 15px rgba(255, 215, 0, 0.8)); */

    /* Apply dynamic tilt from JS */
    /* Note: We multiply by 1 to cast to number if needed, but deg is string. */
    /* Combine rotateY(180deg) conditionally?
       No, .flip adds rotateY(180deg).
       We need to ADD our tilt to that or BASE state.
       Best way: Apply tilt to wrapper or inner.
       If we apply to inner, it might conflict with flip.
       Actually, flip is on card-inner.
       Let's add the tilt to the .card-inner transform.
       BUT, allow .flip to simply add 180deg to Y.
       Complex transform: rotateX(var(--tilt-x)) rotateY(calc(var(--tilt-y) + 0deg))
       For flipped: rotateX(var(--tilt-x)) rotateY(calc(var(--tilt-y) + 180deg))
    */
    transform: rotateX(var(--tilt-x, 0deg)) rotateY(calc(var(--tilt-y, 0deg)));
}

.card.flip:hover .card-inner {
    transform: rotateX(var(--tilt-x, 0deg)) rotateY(calc(var(--tilt-y, 0deg) + 180deg));
}

/* Club Logos */
.club-logo {
    width: 60%;
    height: auto;
    object-fit: contain;
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.3));
    transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    /* Smooth parallax */
    transform: translateZ(0);
    /* Base Z */
}

/* Parallax Logo on Hover */
.card:hover .club-logo {
    transform: translateZ(50px) scale(1.1);
    /* Pop out significantly */
    filter: drop-shadow(0 10px 15px rgba(0, 0, 0, 0.5));
}

/* Glossy/Lighting Effect */
.card-front::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 11px;
    /* Slightly less than parent because of border */
    /* Dynamic Radial Gradient tracking mouse */
    background: radial-gradient(circle at var(--cursor-x, 50%) var(--cursor-y, 50%),
            rgba(255, 255, 255, 0.5) 0%,
            rgba(255, 255, 255, 0.1) 40%,
            rgba(255, 255, 255, 0) 80%);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    mix-blend-mode: overlay;
    /* Blends nicely with the colors */
}

.card:hover .card-front::after {
    opacity: 1;
}

/* Custom Gradients per Club */

/* Paris (Blue/Red) */
.card-paris .card-front {
    background: linear-gradient(135deg, #004170 0%, #DA291C 100%);
}

/* Fribourg (Red/White/Black) - Freiburg */
.card-fribourg .card-front {
    background: linear-gradient(135deg, #b0a9a9 0%, #b7b6b6 100%);
}

/* Metz (Garnet) */
.card-metz .card-front {
    background: linear-gradient(135deg, #fbbdbd 0%, #800000 100%);
    /* Deep Garnet */
}

/* Marseille (Blue/White) */
.card-marseille .card-front {
    background: linear-gradient(135deg, #009DDC 0%, #FFFFFF 100%);
}

/* Porto (Blue/White) */
.card-porto .card-front {
    background: linear-gradient(135deg, #004E8A 0%, #FFFFFF 60%, #004E8A 100%);
}

/* Lorient (Orange/Black) */
.card-lorient .card-front {
    background: linear-gradient(135deg, #F58113 0%, #202020 100%);
}

/* Angers (Black/White) */
.card-angers .card-front {
    background: linear-gradient(135deg, #000000 0%, #FFFFFF 100%);
}

/* Braga (Red/White) */
.card-braga .card-front {
    background: linear-gradient(135deg, #E30613 0%, #FFFFFF 100%);
}

/* Lens (Blood/Gold - Sang et Or) */
.card-lens .card-front {
    background: linear-gradient(135deg, #EA0C27 0%, #FFCC00 100%);
}

.card-lens .club-logo {
    width: 85%;
    /* Fix: SVG has large internal padding */
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .cards-container {
        flex-direction: column;
        height: auto;
        /* Gap replaced by negative margin on cards for overlap */
        gap: 0;
        margin-top: 50px;
        margin-bottom: 50px;
        padding-bottom: 20px;
        /* Space for last card */
    }

    .card {
        margin: 0;
        /* create overlap: pull up */
        margin-top: -60px;
        /* Reset transform transition for these static placements,
           but keep it for hover/flip if needed. */
    }

    /* First card shouldn't pull up as much or at all */
    .card:first-child {
        margin-top: 0;
    }

    /* Reset default curve transforms and apply new "Random" Alternating Mobile Transforms */

    /* Card 1: Left ish */
    .card:nth-child(1) {
        transform: rotate(-8deg);
        z-index: 1;
    }

    /* Card 2: Right ish */
    .card:nth-child(2) {
        transform: rotate(10deg);
        z-index: 2;
    }

    /* Card 3: Left ish */
    .card:nth-child(3) {
        transform: rotate(-6deg);
        z-index: 3;
    }

    /* Card 4: Right ish */
    .card:nth-child(4) {
        transform: rotate(12deg);
        z-index: 4;
    }

    /* Card 5: Left ish */
    .card:nth-child(5) {
        transform: rotate(-10deg);
        z-index: 5;
    }

    /* Card 6: Right ish */
    .card:nth-child(6) {
        transform: rotate(7deg);
        z-index: 6;
    }

    /* Card 7: Left ish */
    .card:nth-child(7) {
        transform: rotate(-5deg);
        z-index: 7;
    }

    /* Card 8: Right ish */
    .card:nth-child(8) {
        transform: rotate(8deg);
        z-index: 8;
    }

    /* Card 9: Left ish */
    .card:nth-child(9) {
        transform: rotate(-9deg);
        z-index: 9;
    }


    /* Adjust hover for mobile */
    /* Pop up slightly and straighten or keep angle?
       Let's keep it simple: scale up.
       Note: JS tilt might interfere, but acceptable. */
    .card:hover {
        transform: scale(1.05) translateY(-10px) !important;
        z-index: 1000;
        /* Ensure it stays on top */
    }
}

/* --- Betting Game Styles (bet.html) --- */

.betting-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    /* Override previously added margin if needed, but the generic rule handles basics. 
       We add card styling here. */
    background: #1c1c1e;
    border-radius: 20px;
    padding: 30px 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-sizing: border-box;
    /* The margin-top: 20px is handled by the specific override in layout section */
}

.match-up {
    display: flex;
    justify-content: space-evenly;
    align-items: center;
    width: 100%;
    margin-bottom: 30px;
}

.team-input {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.team-input label {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-size: 0.9rem;
    font-weight: 700;
    color: #ffd700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: 0;
}

.team-input input {
    width: 70px;
    height: 70px;
    font-size: 2rem;
    font-weight: bold;
    text-align: center;
    background: #2c2c2e;
    border: 1px solid #3a3a3c;
    border-radius: 16px;
    /* Smooth rounded corners */
    color: white;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    outline: none;
    transition: border-color 0.2s, transform 0.2s;
}

.team-input input:focus {
    border-color: #ffd700;
    transform: scale(1.05);
}

.vs {
    font-family: 'Rye', serif;
    font-size: 1.5rem;
    color: #666;
    /* Subtler VS */
    text-shadow: none;
    margin: 0 10px;
    padding-top: 20px;
    /* Align visually with inputs */
}

#validate-bet {
    width: 100%;
    background: linear-gradient(135deg, #ff3b30, #ff2d55);
    /* Nice Red Gradient */
    color: white;
    border: none;
    border-radius: 14px;
    padding: 16px;
    font-size: 1rem;
    font-weight: 700;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    text-transform: uppercase;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(255, 45, 85, 0.4);
    transition: transform 0.2s, box-shadow 0.2s;
    margin-bottom: 10px;
}

#validate-bet:hover {
    transform: scale(1.02);
    box-shadow: 0 6px 15px rgba(255, 45, 85, 0.6);
}

#validate-bet:active {
    transform: scale(0.98);
}

.back-link {
    display: none;
    /* Often redundant with header */
}

/* Modals */
.modal {
    display: none;
    /* JS toggles flex */
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background: #000000;
    border: 5px solid #ffd700;
    padding: 40px;
    text-align: center;
    border-radius: 20px;
    box-shadow: 0 0 50px var(--main-red);
    max-width: 90%;
    animation: popIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes popIn {
    from {
        transform: scale(0.5);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

.modal-content h2 {
    font-family: 'Rye', serif;
    font-size: 2.5rem;
    color: var(--main-red);
    margin-top: 0;
}

.modal-content p {
    font-size: 1.2rem;
    line-height: 1.5;
}

.close-modal {
    margin-top: 20px;
    padding: 10px 30px;
    background: transparent;
    border: 1px solid white;
    color: white;
    cursor: pointer;
    font-family: sans-serif;
}

.close-modal:hover {
    background: white;
    color: black;
}

/* Flomo Animation */
.flomo-anim {
    width: 150px;
    height: auto;
    display: block;
    margin: 0 auto 20px auto;
    animation: balance infinite 2s ease-in-out;
}

@keyframes balance {
    0% {
        transform: rotate(-15deg);
    }

    50% {
        transform: rotate(15deg);
    }

    100% {
        transform: rotate(-15deg);
    }
}

/* Utilities */
.hidden {
    display: none !important;
}

/* SPA Section Management */
.page-section {
    width: 100%;
}

.page-section.hidden {
    display: none;
}

.page-section.active {
    display: block;
}

/* Background dimming for all pages except Home */
.page-section:not(#section-home)::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    /* Semi-transparent dark overlay */
    z-index: -1;
    pointer-events: none;
}

/* Slot Machine Styles */
.slot-machine {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 50px;
    padding: 20px;
}

.slot-display {
    display: flex;
    gap: 15px;
    background: linear-gradient(135deg, #1a0033 0%, #0d0019 100%);
    border: 5px solid #ffd700;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 0 40px rgba(255, 215, 0, 0.5), inset 0 0 30px rgba(0, 0, 0, 0.5);
    margin-bottom: 40px;
    position: relative;
    /* For gradient overlay */
}

/* 3D Gradient Overlay */
.gradient-fade {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    z-index: 10;
    background: linear-gradient(to bottom,
            rgba(0, 0, 0, 0.8) 0%,
            rgba(0, 0, 0, 0) 15%,
            rgba(0, 0, 0, 0) 85%,
            rgba(0, 0, 0, 0.8) 100%);
    border-radius: 10px;
}


.reel {
    width: 120px;
    height: 120px;
    background: linear-gradient(180deg, #2d1b3d 0%, #1a0f26 100%);
    border: 3px solid var(--main-red);
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.8);
}

.symbol-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    /* Height will be dynamic */
    display: flex;
    flex-direction: column;
    /* Stack symbols vertically */
    will-change: transform;
}

.reel .symbol {
    font-size: 4rem;
    height: 120px;
    /* Fixed height for calculation */
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    /* Remove absolute positioning */
}

.reel.spinning .symbol {
    animation: none;
    /* Controlled by JS */
}

@keyframes slideUp {
    from {
        transform: translateY(0);
        opacity: 1;
    }

    to {
        transform: translateY(-120px);
        opacity: 0;
    }
}

@keyframes slideIn {
    from {
        transform: translateY(120px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.symbol-image {
    width: 80px;
    height: 80px;
    object-fit: contain;
}

.symbol {
    animation: symbolGlow 2s ease-in-out infinite;
}

@keyframes symbolGlow {

    0%,
    100% {
        filter: drop-shadow(0 0 5px rgba(255, 215, 0, 0.3));
    }

    50% {
        filter: drop-shadow(0 0 15px rgba(255, 215, 0, 0.6));
    }
}

.club-logo-card {
    width: 50px;
    height: 50px;
    object-fit: contain;
}

.spin-button {
    background: linear-gradient(135deg, #ff0000, #cc0000);
    color: #fff;
    border: 2px solid #ffd700;
    padding: 12px 30px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    border-radius: 8px;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.7);
    box-shadow: 0 0 20px rgba(240, 84, 59, 0.5);
}

.spin-button:hover:not(:disabled) {
    transform: scale(1.05);
    box-shadow: 0 0 30px rgba(240, 84, 59, 1);
}

.spin-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.result-messagebody {
    margin: 0;
    padding: 0;
    font-family: 'Roboto', sans-serif;
    background-color: #190022;
    color: #fff;
    font-size: 14px;
    text-align: center;
    min-height: 60px;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.8);
}

.result-message.win {
    animation: winPulse 0.5s ease-in-out 3;
}

@keyframes winPulse {

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

    50% {
        transform: scale(1.2);
        color: #ff6b00;
    }
}

/* Mobile Slot Machine */
@media (max-width: 768px) {
    .slot-display {
        gap: 10px;
        padding: 20px;
    }

    .reel {
        width: 80px;
        height: 80px;
        font-size: 2.5rem;
    }

    .spin-button {
        font-size: 1.2rem;
        padding: 15px 40px;
    }

    .result-message {
        font-size: 1.3rem;
    }
}

/* --- Shop Styles (Le Mayo) --- */

.shop-container {
    display: flex;
    flex-direction: row;
    gap: 40px;
    background: rgba(0, 0, 0, 0.6);
    border: 4px solid var(--main-red);
    border-radius: 20px;
    padding: 30px;
    max-width: 1000px;
    margin: 30px auto;
    box-shadow: 0 0 50px rgba(240, 84, 59, 0.3);
}

.shop-gallery {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.main-image-container {
    width: 100%;
    height: 600px;
    /* Fixed height for consistency */
    display: flex;
    justify-content: center;
    align-items: center;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    overflow: hidden;
}

#main-jersey-img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transition: opacity 0.2s ease, transform 0.3s ease;
    filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.5));
    cursor: pointer;
}

#main-jersey-img:hover {
    transform: scale(1.05);
}

.thumbnails-container {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 5px;
    justify-content: center;
}

.shop-thumbnail {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border: 2px solid transparent;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    opacity: 0.7;
}

.shop-thumbnail:hover {
    opacity: 1;
    transform: scale(1.1);
}

.shop-thumbnail.active {
    border-color: #ffd700;
    opacity: 1;
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

.shop-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: left;
}

.product-title {
    font-family: 'Rye', serif;
    font-size: 2.5rem;
    color: #ffd700;
    margin-bottom: 15px;
    text-shadow: 0 0 10px var(--main-red);
}

.product-description {
    font-family: sans-serif;
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 30px;
    color: #ddd;
}

.shop-controls {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 30px;
}

.control-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.control-group label {
    font-family: 'Rye', serif;
    color: var(--main-red);
    font-size: 1.2rem;
}

.control-group select {
    background: rgba(0, 0, 0, 0.8);
    border: 2px solid #ffd700;
    color: white;
    padding: 12px;
    font-family: sans-serif;
    font-size: 1rem;
    border-radius: 8px;
    cursor: pointer;
    outline: none;
    transition: all 0.3s ease;
}

.control-group select:hover,
.control-group select:focus {
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.3);
    border-color: var(--main-red);
}

.communique-btn {
    font-family: 'Rye', serif;
    font-size: clamp(1.2rem, 3vw, 1.2rem);
    color: #FFF;
    background-color: var(--main-red);
    border: 2px solid #ffd700;
    padding: 15px 50px;
    cursor: pointer;
    border-radius: 50px;
    margin-bottom: 30px;
    transition: transform 0.2s;
    text-decoration: none;
    text-align: center;
}

.communique-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 0 20px rgba(240, 84, 59, 1);
}

.shop-cta {
    font-family: 'Rye', serif;
    font-size: 1.5rem;
    color: #000000;
    background-color: #ffd700;
    border: none;
    padding: 15px 30px;
    cursor: pointer;
    border-radius: 50px;
    text-transform: uppercase;
    transition: all 0.3s ease;
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.4);
    align-self: flex-start;
}

.shop-cta:hover {
    background-color: white;
    transform: scale(1.05);
    box-shadow: 0 0 30px rgba(255, 255, 255, 0.6);
}


/* Reusing similar style as CTA */



#validate-bet:hover {
    transform: scale(1.05);
    box-shadow: 0 0 20px rgba(240, 84, 59, 1);
}

/* Shop Responsive */
@media (max-width: 900px) {
    .shop-container {
        flex-direction: column;
        padding: 20px;
        margin: 10px;
        max-width: 95%;
    }

    .shop-gallery {
        width: 100%;
    }

    .shop-details {
        text-align: center;
        align-items: center;
    }

    .shop-cta {
        align-self: center;
        width: 100%;
    }

    .main-image-container {
        height: 300px;
    }
}

/* Lightbox Styles */
.lightbox {
    position: fixed;
    z-index: 2000;
    padding-top: 50px;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.lightbox.visible {
    opacity: 1;
    pointer-events: auto;
}

.lightbox-content {
    margin: auto;
    display: block;
    width: auto;
    max-width: 90%;
    max-height: 90vh;
    border-radius: 10px;
    box-shadow: 0 0 50px rgba(255, 215, 0, 0.2);
    animation: zoom 0.4s;
}

@keyframes zoom {
    from {
        transform: scale(0)
    }

    to {
        transform: scale(1)
    }
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
    cursor: pointer;
    z-index: 2001;
}

.lightbox-close:hover,
.lightbox-close:focus {
    color: var(--main-red);
    text-decoration: none;
    cursor: pointer;
}

#section-generator::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    /* Semi-transparent dark overlay */
    z-index: -1;
    pointer-events: none;
}


#section-generator.active {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}



/* --- NAVIGATION --- */
.nav-cirque {
    width: 100%;
    background: #000000;
    display: flex;
    justify-content: center;
    padding: 15px 0;
    gap: 30px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
}

.element-nav {
    font-family: 'Rye', serif;
    color: #ffd700;
    text-decoration: none;
    padding: 8px 20px;
    border: 2px solid transparent;
    border-radius: 20px;
    transition: all 0.3s ease;
}

.element-nav:hover,
.element-nav.actif {
    border-color: #F0543B;
    color: white;
    text-shadow: 0 0 10px #F0543B;
}

/* --- EN-TÊTE --- */
.conteneur-entete {
    text-align: center;
    margin-top: 5vh;
}

.titre-cirque {
    font-family: 'Rye', serif;
    font-size: clamp(2rem, 5vw, 4rem);
    color: #ffd700;
    letter-spacing: 3px;
    margin: 0;
    text-shadow:
        0 0 10px #F0543B,
        0 0 20px #F0543B;
    animation: scintillement 3s infinite alternate;
}

.sous-titre-cirque {
    font-family: 'Rye', serif;
    color: white;
    font-size: clamp(0.8rem, 2vw, 1.2rem);
    margin-top: 10px;
    letter-spacing: 2px;
    opacity: 0.8;
}

/* --- LA MACHINE À SOUS --- */
.scene-principale {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 40px;
    width: 100%;
    max-width: 900px;
    padding: 20px;
}

.cadre-machine {
    background-color: #0f0015;
    border: 6px solid #ffd700;
    border-radius: 20px;
    padding: 20px;
    box-shadow: 0 0 40px rgba(240, 84, 59, 0.3);
    position: relative;
    width: 100%;
    max-width: 800px;
}

.conteneur-rouleaux {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    background: #000;
    padding: 15px;
    border-radius: 10px;
    border: 2px solid #333;
}

.fenetre-rouleau {
    background: white;
    flex: 1;
    height: 150px;
    border-radius: 5px;
    border: 4px solid #555;
    overflow: hidden;
    position: relative;
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.8);
}

/* Reflet vitre */
.fenetre-rouleau::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0.4) 0%, rgba(255, 255, 255, 0) 100%);
    pointer-events: none;
}

.rouleau {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    min-height: 80px;
    padding: 0px 10px;
    text-align: center;
}

.rouleau span {
    font-family: 'Rye', serif;
    font-size: clamp(1.2rem, 1.5vw, 1.5rem);
    color: #000;
    line-height: 1.2;
    font-weight: bold;
}

.effet-flou {
    filter: blur(4px);
    opacity: 0.7;
    transition: filter 0.1s;
}

/* --- BOUTON --- */
.style-bouton-action {
    padding: 15px 40px;
    margin-top: 40px;
    cursor: pointer;
    text-transform: uppercase;
    transition: all 0.3s ease;
}


/* --- RESULTAT (erreur) --- */
.style-erreur {
    margin-top: 40px;
    background: #000000;
    border: 4px solid #ffd700;
    padding: 30px;
    text-align: center;
    border-radius: 15px;
    box-shadow: 0 0 30px #F0543B;
    max-width: 90%;
    width: 100%;
    animation: apparition 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.cache {
    display: none;
}

.titre-erreur {
    font-family: 'Rye', serif;
    color: #F0543B;
    margin-top: 0;
    font-size: 1.5rem;
    text-transform: uppercase;
}

.texte-excuse {
    font-size: 1.5rem;
    line-height: 1.5;
    font-style: italic;
    color: white;
}



.progression {
    height: 100%;
    background: #F0543B;
    width: 0%;
    transition: width 0.2s;
    animation: charger 2s infinite linear;
}

/* --- MODE BUG (ERREUR) --- */
.style-erreur.mode-erreur {
    border-color: red;
    box-shadow: 0 0 50px red;
    background-color: #000;
    animation: secousse 0.5s cubic-bezier(.36, .07, .19, .97) both;
}

.style-erreur.mode-erreur .texte-excuse {
    color: red;
    font-family: 'Courier New', Courier, monospace;
    font-weight: bold;
    font-size: 1.8rem;
    text-transform: uppercase;
    text-shadow: 2px 0 blue, -2px 0 yellow;
}


@keyframes scintillement {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.8;
    }
}

@keyframes apparition {
    from {
        transform: scale(0.8);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes charger {
    0% {
        width: 0%;
    }

    100% {
        width: 100%;
    }
}

@keyframes secousse {

    10%,
    90% {
        transform: translate3d(-1px, 0, 0);
    }

    20%,
    80% {
        transform: translate3d(2px, 0, 0);
    }

    30%,
    50%,
    70% {
        transform: translate3d(-4px, 0, 0);
    }

    40%,
    60% {
        transform: translate3d(4px, 0, 0);
    }
}

/* =========================================
   =  OPTIMISATION SMARTPHONE (RESPONSIVE) =
   ========================================= */

@media (max-width: 768px) {

    #section-generator * {
        box-sizing: border-box;
    }

    .nav-cirque {
        flex-wrap: wrap;
        gap: 8px;
        padding: 10px 5px;
        justify-content: center;
    }

    .element-nav {
        font-size: 0.75rem;
        padding: 5px 10px;
        white-space: nowrap;
    }

    .titre-cirque {
        line-height: 1.1;
        font-size: 1.8rem;
        padding: 0 10px;
    }


    .scene-principale {
        padding: 10px;
        margin-top: 10px;
        width: 100%;
        max-width: 100vw;
        overflow-x: hidden;
    }

    .cadre-machine {
        padding: 10px;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }

    .conteneur-rouleaux {
        flex-direction: column;
        gap: 8px;
        width: 100%;
    }

    .fenetre-rouleau {
        height: 70px;
        width: 100%;
    }

    .rouleau {
        width: 100%;
        padding: 0 5px;
    }

    .rouleau span {
        font-size: 1rem;
        white-space: normal;
        line-height: 1.2;
        text-align: center;
    }

    .style-bouton-action {
        width: 100%;
        max-width: 100%;
        margin-top: 20px;
        padding: 12px;
        font-size: 1rem;
        box-sizing: border-box;
    }

    .style-erreur {
        margin-top: 20px;
        padding: 15px;
        width: 100%;
        box-sizing: border-box;
    }

    .titre-erreur {
        font-size: 1.1rem;
    }

    .texte-excuse {
        font-size: 1.1rem;
        word-wrap: break-word;
    }
}

#bouton-lancer {
    font-family: 'Rye', serif;
    font-size: clamp(1.2rem, 3vw, 2rem);
    color: #FFF;
    background-color: var(--main-red);
    border: 2px solid #ffd700;
    padding: 15px 50px;
    cursor: pointer;
    border-radius: 50px;
    margin-bottom: 30px;
    transition: transform 0.2s;
}

#bouton-lancer:hover {
    transform: scale(1.05);
    box-shadow: 0 0 20px rgba(240, 84, 59, 1);
}

.cursor-clown {
    cursor: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='40' height='48' viewport='0 0 100 100' style='fill:black;font-size:24px;'><text y='50%'>🤡</text></svg>") 16 0, pointer;
}

/* --- INFIRMERIE DU RIRE --- */
.infirmary-container {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    justify-content: center;
    max-width: 1200px;
    margin: 24px auto;
}

.patient-card {
    background: rgba(0, 0, 0, 1);
    border-radius: 16px;
    padding: 16px;
    margin: 16px;
    width: 100%;
    display: block;
    box-shadow: 0 0 30px rgba(240, 84, 59, 0.2);
    transition: transform 0.3s ease;
    text-align: left;
    position: relative;
    overflow: hidden;
}

.patient-card:hover {
    box-shadow: 0 0 50px rgba(240, 84, 59, 0.4);
}

.patient-header {
    border-bottom: 2px solid #ffd700;
    padding-bottom: 10px;
    margin-bottom: 5px;
}

.patient-header h3 {
    font-family: 'Rye', serif;
    color: #ffd700;
    margin: 0;
    font-size: 1.2rem;
    text-transform: uppercase;
}

.status-badge {
    display: inline-block;
    margin-top: 5px;
    padding: 4px 10px;
    border-radius: 5px;
    font-weight: bold;
    font-size: 0.7rem;
    text-transform: uppercase;
    color: #fff;
    font-family: sans-serif;
}

.status-badge.critical {
    background-color: #ff0000;
    box-shadow: 0 0 10px #ff0000;
    animation: flash 1s infinite alternate;
}

.status-badge.severe {
    background-color: #ff6600;
}

.status-badge.hopeless {
    background-color: #333;
    color: #999;
    border: 1px solid #666;
}

@keyframes flash {
    from {
        opacity: 1;
    }

    to {
        opacity: 0.5;
    }
}

.diagnosis h4,
.prognosis h4 {
    color: var(--main-red);
    margin: 0 0 5px 0;
    font-size: 0.9rem;
    text-transform: uppercase;
    font-family: sans-serif;
}

.diagnosis p,
.prognosis p {
    color: #ddd;
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.4;
    font-family: sans-serif;
}

.prognosis .duration {
    font-weight: bold;
    color: #ffd700;
    font-size: 1.2rem;
}

/* --- BILLETTERIE (TICKETS) --- */
.ticket-container {
    display: block;
    max-width: 1000px;
    margin: 40px auto;
    padding: 20px;
    background: rgba(20, 0, 30, 0.8);
    border: 2px solid #ffd700;
    border-radius: 15px;
}

/* WIZARD STEPS INDICATOR */
.steps-indicator {
    display: flex;
    justify-content: space-around;
    margin: 20px 0;
    border-bottom: 1px solid rgba(255, 215, 0, 0.3);
    padding-bottom: 20px;
}

.step {
    font-size: 0.7rem;
    color: #666;
    font-weight: bold;
    padding: 10px 20px;
    background: rgba(0, 0, 0, 0.5);
    transition: all 0.3s;
}

.step.active {
    color: #ffd700;
    background: #4a0050;
    box-shadow: 0 0 10px #ffd700;
}

/* STEP CONTENT LAYOUTS */
.ticket-step {
    display: none;
    animation: fadeIn 0.5s ease;
}

.ticket-step.active {
    display: block;
}

.ticket-step h3 {
    text-align: center;
    color: #ffd700;
    margin-bottom: 25px;
    font-size: 1rem;
    text-transform: uppercase;
}

.step-subtitle {
    text-align: center;
    color: #aaa;
    margin-bottom: 20px;
    font-size: 0.9rem;
}

.step-subtitle span {
    color: #ffd700;
    font-weight: bold;
}

/* STEP 1: ZONE CARDS */
.zones-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.zone-card {
    background: #2a0033;
    border: 2px solid #555;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    transition: all 0.3s;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.zone-card:hover {
    border-color: #ffd700;
    transform: translateY(-5px);
}

.zone-card.selected {
    border-color: #ffd700;
    background: #3e004d;
    box-shadow: 0 0 15px #ffd700;
}

.zone-card h4 {
    color: #fff;
    margin-bottom: 10px;
}

.zone-price {
    font-size: 1.5rem;
    color: #ffd700;
    font-weight: bold;
    margin: 10px 0;
}

.zone-card p {
    color: #ccc;
    font-size: 0.9rem;
    margin-bottom: 15px;
    flex-grow: 1;
}

.select-zone-btn {
    background: transparent;
    border: 1px solid #ffd700;
    color: #ffd700;
    padding: 8px 15px;
    cursor: pointer;
    margin-top: auto;
}

.zone-card:hover .select-zone-btn {
    background: #ffd700;
    color: #000000;
}

/* Unavailable Card Style */
.zone-card.unavailable {
    opacity: 0.5;
    background: #1a0022;
    border-color: #333;
    cursor: not-allowed;
    filter: grayscale(1);
}

.zone-card.unavailable:hover {
    transform: none;
    border-color: #333;
    box-shadow: none;
}

.zone-card.unavailable .select-zone-btn {
    border-color: #555;
    color: #555;
    background: transparent !important;
    cursor: not-allowed;
}


/* STEP 2: SEAT MAP */
.seat-map-container {
    background: #2a0033;
    padding: 20px;
    border: 4px solid #ffd700;
    border-radius: 10px;
    margin-bottom: 20px;
}

.stage-indicator {
    background: #006400;
    /* Green pitch */
    color: white;
    text-align: center;
    padding: 10px;
    margin-bottom: 20px;
    font-weight: bold;
    border: 2px dashed rgba(255, 255, 255, 0.5);
}

.seat-grid {
    display: grid;
    grid-template-columns: repeat(10, 1fr);
    gap: 5px;
    max-width: 500px;
    margin: 0 auto;
}

.seat {
    aspect-ratio: 1;
    /* Square seats */
    background: #555;
    border-radius: 5px 5px 0 0;
    cursor: pointer;
    transition: background 0.2s;
}

.seat:hover:not(.taken) {
    background: #888;
}

.seat.selected {
    background: #ffd700;
    box-shadow: 0 0 10px #ffd700;
}

.seat.taken {
    background: #aa0000;
    cursor: not-allowed;
    opacity: 0.5;
}


/* STEP 3: PACKS & OPTIONS */
.packs-section h4,
.services-section h4 {
    color: #fff;
    border-bottom: 2px solid #ffd700;
    display: inline-block;
    margin-bottom: 15px;
}

.pack-option-card {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.05);
    margin-bottom: 10px;
    padding: 15px;
    border-radius: 8px;
}

.pack-option-card input {
    margin-right: 15px;
    transform: scale(1.5);
}

.pack-option-card label {
    color: #fff;
    cursor: pointer;
}

.pack-option-card strong {
    color: #ffd700;
    font-size: 1.1rem;
}

.pack-option-card p {
    margin: 5px 0 0 0;
    font-size: 0.9rem;
    color: #ccc;
    font-style: italic;
}

.service-option {
    margin-bottom: 15px;
    display: flex;
    align-items: flex-start;
}

.service-option input {
    margin-top: 5px;
    margin-right: 10px;
    transform: scale(1.3);
}

.service-option label {
    color: white;
    font-size: 1.1rem;
    cursor: pointer;
}

.service-option small {
    display: block;
    color: #888;
    font-size: 0.85rem;
}


/* CONTROLS & CART */
.step-controls {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 20px;
    align-items: center;
}

.btn-prev {
    background: #444;
    color: white;
    border: none;
    padding: 10px 20px;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.8rem;
}

.btn-next,
.action-btn {
    background: var(--main-red);
    color: white;
    border: none;
    padding: 12px 30px;
    font-size: 0.8rem;
    font-family: 'Rye', serif;
    cursor: pointer;
    transition: transform 0.2s;
}

.btn-next:hover,
.action-btn:hover {
    transform: scale(1.05);
}

.final-cart {
    background: #000;
    padding: 20px;
    margin-top: 30px;
    border: 1px dashed #ffd700;
}

#final-cart-list {
    margin-bottom: 15px;
    text-align: left;
    max-height: 150px;
    overflow-y: auto;
}

.cart-item {
    display: flex;
    justify-content: space-between;
    padding: 5px 0;
    border-bottom: 1px solid #333;
    color: #ddd;
}

.cart-total {
    font-size: 1.5rem;
    color: #ffd700;
    font-weight: bold;
    text-align: right;
    margin-bottom: 20px;
}


/* Boycott Modal */
.boycott-content {
    background: #000;
    border: 10px solid #ff0000;
    color: #ff0000;
    text-align: center;
    box-shadow: 0 0 100px #ff0000;
}

.boycott-content h2 {
    font-size: 3rem;
    margin-bottom: 20px;
    animation: shake 0.5s infinite;
}

.boycott-msg-1 {
    font-size: 1.5rem;
    font-weight: bold;
    color: white;
    margin-bottom: 10px;
}

.boycott-slogans {
    font-size: 2rem;
    font-weight: 900;
    color: #ff0000;
    line-height: 1.5;
    margin: 20px 0;
    text-transform: uppercase;
}

.boycott-hashtag {
    color: #fff;
    font-size: 1.2rem;
    opacity: 0.8;
}

@keyframes shake {
    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);
    }
}

/* --- Projet INEOS Section --- */
.ineos-container {
    max-width: 800px;
    margin: 40px auto;
    font-family: 'Courier New', Courier, monospace;
    color: #00ff00;
    /* Mainframe Green */
}

.loading-system {
    background: #000;
    border: 2px solid #00ff00;
    padding: 30px;
    box-shadow: 0 0 20px rgba(0, 255, 0, 0.2);
    margin-bottom: 30px;
}

.system-status {
    margin-bottom: 15px;
    font-size: 1.2rem;
    text-shadow: 0 0 5px #00ff00;
}

.progress-container {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

.progress-bar {
    flex-grow: 1;
    height: 30px;
    border: 2px solid #00ff00;
    padding: 2px;
    background: #111;
}

.progress-fill {
    height: 100%;
    background: repeating-linear-gradient(45deg,
            #00cc00,
            #00cc00 10px,
            #00ff00 10px,
            #00ff00 20px);
    width: 0%;
    transition: width 0.2s linear;
    box-shadow: 0 0 10px #00ff00;
}

.progress-percentage {
    font-size: 1.5rem;
    font-weight: bold;
    min-width: 80px;
    text-align: right;
}

.system-details {
    font-size: 0.9rem;
    opacity: 0.8;
}

.blink {
    animation: blinker 1s linear infinite;
}

@keyframes blinker {
    50% {
        opacity: 0;
    }
}

/* Error Modal inside Section */
.system-error {
    background: #0000aa;
    /* BSOD Blue */
    color: white;
    font-family: 'Courier New', Courier, monospace;
    border: 4px solid white;
    padding: 2px;
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
    position: relative;
    top: -230px;
    animation: shake 0.5s cubic-bezier(.36, .07, .19, .97) both;
}

.error-header {
    background: white;
    color: #0000aa;
    font-weight: bold;
    padding: 5px;
    text-transform: uppercase;
}

.error-body {
    padding: 20px;
}

.error-body p {
    margin: 15px 0;
    font-size: 1.1rem;
}

.insert-coin-btn {
    background: #ccc;
    color: black;
    border: 2px outset white;
    padding: 10px 20px;
    font-family: inherit;
    font-weight: bold;
    cursor: pointer;
    margin-top: 15px;
    font-size: 1.2rem;
}

.insert-coin-btn:active {
    border-style: inset;
}

/* --- Labyrinth Game --- */
.game-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    margin-top: 20px;
}

.maze-container {
    background: #000;
    padding: 10px;
    border: 4px solid #ffd700;
    border-radius: 10px;
    box-shadow: 0 0 30px rgba(240, 84, 59, 0.4);
}

.maze-grid {
    display: grid;
    grid-template-columns: repeat(15, 20px);
    /* 15 cols of 20px */
    grid-template-rows: repeat(15, 20px);
    gap: 1px;
}

@media (min-width: 600px) {
    .maze-grid {
        grid-template-columns: repeat(15, 40px);
        grid-template-rows: repeat(15, 40px);
    }
}

.maze-cell {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 14px;
    background-color: #EEE;
    position: relative;
    /* For absolute positioning of overlapping images */
}

@media (min-width: 600px) {
    .maze-cell {
        font-size: 20px;
    }
}

.maze-cell.wall {
    background-color: var(--main-red);
    border-radius: 2px;
}

.maze-cell.player {
    animation: bounce 0.5s infinite alternate;
}

.maze-cell.goal {
    animation: pulse 1s infinite;
}

/* Labyrinth Images */
.maze-img {
    pointer-events: none;
}

.moffi-face {
    width: 180%;
    /* Overlap borders */
    height: 180%;
    object-fit: contain;
    position: absolute;
    z-index: 10;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5));
}

.bonnet-goal {
    width: 90%;
    height: 90%;
    object-fit: contain;
}

@keyframes bounce {
    from {
        transform: translateY(0);
    }

    to {
        transform: translateY(-2px);
    }
}

/* D-Pad Controls */
.dpad-controls {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 10px;
}

.dpad-middle {
    display: flex;
    gap: 20px;
}

.dpad-btn {
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid #ffd700;
    border-radius: 50%;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.2s;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.dpad-btn:active {
    background: rgba(255, 215, 0, 0.3);
    transform: scale(0.95);
}

.dpad-btn.up {
    margin-bottom: 10px;
}

.dpad-btn.down {
    margin-top: 10px;
}

/* Hide dpad on large screens if desired, but good for touch laptops */
/* D-pad always visible as requested */
/* 
@media (min-width: 1024px) {
    .dpad-controls {
        display: none;
    }
}
*/

.nav-btn-style {
    font-family: 'Rye', serif;
    font-size: 1rem;
    color: #000000;
    background-color: #ffd700;
    border: none;
    padding: 10px 20px;
    cursor: pointer;
    border-radius: 50px;
    margin-top: 10px;
    transition: all 0.3s ease;
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.4);
}

/* Labyrinth Specific Modal Overrides */
#section-labyrinth .modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.85);
    z-index: 10000;
    display: flex;
    justify-content: center;
    align-items: center;
}

#section-labyrinth .modal.hidden {
    display: none !important;
}

/* Fix for Lose Modal reusing system-error class */
#labyrinth-lose-modal .system-error {
    top: 0 !important;
    margin: 0 !important;
    position: relative !important;
    max-width: 90%;
}

/* --- Personality Quiz --- */
/* Standardized App Containers - Resetting borders */
.betting-container,
.ticket-container,
.quiz-container,
.infirmary-container,
.game-container,
.video-container {
    border: none !important;
    box-shadow: none !important;
    background: transparent !important;
    padding: 0 !important;
    margin: 0 !important;
}

/* Specific overrides requested by user */
.video-container,
.betting-container {
    margin-top: 20px !important;
}

/* Specific cleanup for Quiz */
.quiz-container {
    max-width: 100%;
    margin: 0 auto;
    /* Background handled by specific elements if needed, or transparent */
    background: transparent;
    padding: 0;
    border: none;
    border-radius: 0;
    min-height: 200px;
}

.quiz-intro p {
    font-size: 0.8rem;
    margin-bottom: 15px;
    color: white;
}

.quiz-progress {
    color: #ffd700;
    margin-bottom: 12px;
    font-family: 'Rye', serif;
    font-size: 0.9rem;
}

.quiz-question-text {
    font-size: 1rem;
    margin-bottom: 20px;
    font-weight: bold;
    line-height: 1.4;
}

.quiz-answers {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.quiz-answer-btn {
    background: white;
    color: #000000;
    border: none;
    padding: 8px;
    border-radius: 8px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s;
    text-align: left;
    line-height: 1.3;
}

.quiz-answer-btn:hover {
    background: #ffd700;
}

/* Quiz Result */
.quiz-result .result-card {
    background: #1a1a1a;
    border: none;
    padding: 20px;
    margin: 15px 0;
    border-radius: 8px;
}

.quiz-result p {
    font-size: 1rem;
    line-height: 1.5;
}

/* --- Transfert / Mercato Styles --- */

#section-transfert {
    text-align: center;
}

.transfert-grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
    padding: 40px 0 0 0;
    max-width: 1200px;
    margin: 0 auto;
}

/* Recruit Card */
.recruit-card {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 15px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    backdrop-filter: blur(5px);
    position: relative;
    min-height: 350px;
    display: flex;
    flex-direction: column;
}

.recruit-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.5);
    border-color: rgba(255, 255, 255, 0.5);
}

/* Revealed Style */
.recruit-card.revealed .recruit-photo {
    height: 250px;
    overflow: hidden;
    background: #222;
}

.recruit-card.revealed .recruit-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.recruit-card:hover .recruit-photo img {
    transform: scale(1.1);
}

/* Hidden Style */
.recruit-card.hidden {
    background: repeating-linear-gradient(45deg, #111, #111 10px, #222 10px, #222 20px);
    justify-content: center;
    align-items: center;
    border: 2px dashed #444;
}

.recruit-mystery {
    font-size: 5rem;
    animation: pulse 2s infinite;
}

.recruit-info {
    padding: 20px;
    text-align: left;
    background: rgba(0, 0, 0, 0.8);
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.recruit-info h3 {
    margin: 0;
    color: white;
    font-size: 1.5rem;
    text-transform: uppercase;
}

.recruit-info p {
    color: #aaa;
    margin: 5px 0 15px 0;
}

.recruit-tag {
    display: inline-block;
    padding: 5px 10px;
    background: #e74c3c;
    color: white;
    font-size: 0.8rem;
    font-weight: bold;
    border-radius: 4px;
    text-transform: uppercase;
}

.recruit-date {
    display: inline-block;
    padding: 5px 10px;
    border: 1px solid #aaa;
    color: #aaa;
    font-size: 0.8rem;
    border-radius: 4px;
}

/* Modal Specifics */
.transfert-modal-content {
    background: #1a1a1a;
    color: white;
    max-width: 600px;
    width: 90%;
    border: 1px solid #444;
    padding: 0;
    /* Custom padding internal */
    overflow-y: auto;
    max-height: 90vh;
    /* Ensure it doesn't overflow screen */
    position: relative;
    text-align: left;
    border-radius: 20px;
    /* Matching the card radius style */
}

.close-modal-x {
    position: absolute;
    top: 10px;
    right: 15px;
    background: none;
    border: none;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    z-index: 10;
}

.modal-header {
    display: flex;
    align-items: center;
    background: linear-gradient(to right, #e74c3c, #c0392b);
    padding: 20px;
}

.modal-photo {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 3px solid white;
    margin-right: 20px;
    object-fit: cover;
    background: white;
}

.modal-body {
    padding: 30px;
}

.communique-badge {
    display: inline-block;
    background: #333;
    color: #e74c3c;
    padding: 5px 10px;
    font-weight: bold;
    font-size: 0.9rem;
    margin-bottom: 20px;
    letter-spacing: 1px;
}

.recruit-desc {
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 20px;
}

.recruit-quote {
    font-style: italic;
    font-size: 1.2rem;
    color: #ddd;
    border-left: 4px solid #e74c3c;
    padding-left: 20px;
    margin: 20px 0;
}

.recruit-footer {
    font-size: 0.8rem;
    color: #666;
    margin-top: 25px;
    text-align: right;
}

/* --- Mercato App Specific Styles --- */

/* Friendly Card Design */
.recruit-card {
    background: #1c1c1e;
    /* Darker card background */
    border-radius: 20px;
    /* Rounded corners */
    overflow: hidden;
    margin-bottom: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    transition: transform 0.2s, box-shadow 0.2s;
    cursor: pointer;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.recruit-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.5);
    border-color: rgba(255, 255, 255, 0.3);
}

.recruit-photo img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
}

.recruit-info {
    padding: 16px;
}

.recruit-info h3 {
    margin: 0 0 5px 0;
    font-size: 1.2rem;
    color: #fff;
}

.recruit-info p {
    margin: 0 0 10px 0;
    font-size: 0.9rem;
    color: #aaa;
}

.recruit-tag {
    display: inline-block;
    background: #007aff;
    color: white;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: bold;
    text-transform: uppercase;
}

/* Article Modal Styles */
.modal-article {
    background: #000;
    color: #fff;
    padding-bottom: 40px;
}

.article-hero img {
    width: 100%;
    height: auto;
    max-height: 300px;
    object-fit: cover;
    border-radius: 0 0 20px 20px;
    /* Round bottom corners of hero */
    margin-bottom: 20px;
}

.article-header {
    padding: 0 20px;
    margin-bottom: 20px;
}

.article-title {
    font-family: 'Rye', serif;
    /* Circus font */
    font-size: 1.3rem;
    color: #ffd700;
    /* Gold for title */
    margin-bottom: 10px;
    line-height: 1.2;
}

.article-meta {
    font-size: 0.75rem;
    color: #888;
    border-left: 3px solid #007aff;
    padding-left: 10px;
}

.article-body {
    padding: 0 20px;
    font-size: 0.8rem;
    line-height: 1.6;
    color: #ddd;
}

.article-body p {
    margin-bottom: 15px;
}

.article-image {
    width: 100%;
    border-radius: 12px;
    margin: 20px 0;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.article-list {
    margin: 20px 0;
    padding-left: 20px;
    list-style-type: none;
}

.article-list li {
    margin-bottom: 15px;
    position: relative;
    padding-left: 15px;
}

.article-list li::before {
    content: '🤡';
    position: absolute;
    left: -10px;
    top: 0;
}

.article-quote {
    background: rgba(255, 215, 0, 0.1);
    /* Subtle gold bg */
    border-left: 4px solid #ffd700;
    margin: 20px 0;
    padding: 15px;
    font-style: italic;
    color: #fff;
    border-radius: 0 10px 10px 0;
}

.article-footer {
    font-size: 0.9rem;
    color: #888;
    text-align: center;
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}