html,
body {
    margin: 0;
    padding: 0;
    width: 100%;
    background: linear-gradient(135deg, #ffffff 0%, #fff5f5 100%);
    display: flex;
    justify-content: center;
    min-height: 100vh;
    overflow-x: hidden;
    font-family: "Poppins", sans-serif; /* Keep font here */
}

/* === Top header === */
.top-section {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    padding: 32px 32px 24px;
    background: linear-gradient(135deg, #ff0000 0%, #cc0000 100%);

    /* Lighter shadow to reduce paint cost */
    /* box-shadow: 0 6px 18px rgba(255, 0, 0, 0.25); */

    transition: padding 0.2s ease, box-shadow 0.2s ease;
    overflow: hidden;
}

/* Shine effect on header (DISABLED IN KIOSK MODE) */
.top-section::before {
    content: "";
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        45deg,
        transparent 30%,
        rgba(255, 255, 255, 0.1) 50%,
        transparent 70%
    );
    animation: headerShine 6s linear infinite;
}

@keyframes headerShine {
    0% {
        transform: translateX(-100%) translateY(-100%) rotate(45deg);
    }
    100% {
        transform: translateX(100%) translateY(100%) rotate(45deg);
    }
}

.top-section.shrink {
    padding: 18px 24px 14px;
    /* box-shadow: 0 5px 14px rgba(255, 0, 0, 0.28); */
}

/* Main title */
.title-wrapper {
    text-align: center;
    color: #ffffff;
    letter-spacing: 4px;
    position: relative;
    z-index: 1;
}

.title-main {
    font-size: 64px;
    font-weight: 900;
    text-shadow: 0 2px 6px rgba(255, 255, 255, 0.6);
    background: linear-gradient(to bottom, #ffffff 0%, #ffe0e0 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;

    /* Remove float animation in kiosk mode via overrides below */
    animation: titleFloat 2s ease-in-out infinite;
}

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

/* Scrolling tagline */
.subtitle-ticker {
    margin-top: 10px;
    width: 100%;
    max-width: 800px;
    overflow: hidden;
    white-space: nowrap;
    font-size: 20px;
    font-weight: 500;
    color: #ffe9b0;
    opacity: 0.95;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.subtitle-ticker span {
    display: inline-block;
    padding-left: 100%;
    animation: marqueeSlide 18s linear infinite;
}

@keyframes marqueeSlide {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-100%);
    }
}

/* This creates the fixed 1080px box that stays in the middle */
.main-kiosk-wrapper {
    width: 1080px;
    background-color: #f9fafb;
    min-height: 1920px;
    margin: 0 auto;
    position: relative;
    /* Optional: helps you see the edge of the screen while testing */
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.5);
}

/* === Precision Grid Calculation === */
.shows-grid {
    display: grid;
    grid-template-columns: repeat(3, 300px); /* Fixed width cards */
    column-gap: 30px; /* Fixed gap */
    row-gap: 50px;
    padding: 50px 60px; /* Fixed side padding (60 + 900 + 60 + 60 = 1080) */
    /* width: 1080px; */
    box-sizing: border-box;
}

/* === Show Card === */
.show-card {
    width: 300px; /* Force card width */
    background: #ffffff;
    border-radius: 28px;
    padding: 12px;
    box-sizing: border-box;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.03);
    cursor: pointer;
    transition: transform 0.1s ease;
}

.show-card:active {
    transform: scale(0.96);
}

/* === Poster Frame (The Crop Fix) === */
.poster-frame {
    width: 276px; /* Card width (300) minus padding (12*2) */
    height: 410px; /* Optimized aspect ratio to prevent stretching */
    border-radius: 20px;
    overflow: hidden;
    background: #fdfdfd;
}

.poster-frame img {
    width: 100%;
    height: 100%;
    /* 'contain' ensures the image is NEVER cropped. 
       'background-size: cover' is better for aesthetic, 
       but use 'contain' if you need every pixel visible. */
    object-fit: cover;
}

/* === Typography === */
.show-info {
    text-align: center;
    padding: 15px 5px 10px;
    width: 100%;
    box-sizing: border-box;
}

.show-name {
    font-size: 22px;
    font-weight: 800;
    color: #1a1a1a;
    margin-bottom: 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis; /* Prevents text from pushing card width */
}

.show-details {
    font-size: 15px;
    color: #888;
    font-weight: 600;
    display: flex;
    justify-content: center;
    align-items: center;
    white-space: nowrap;
}

.red-dot {
    color: #e7000b;
    margin: 0 6px;
    font-size: 18px;
}

/* === Scrollbar === */
::-webkit-scrollbar {
    width: 10px;
}
::-webkit-scrollbar-thumb {
    background: #e7000b;
    border-radius: 10px;
}
