/* === Global layout === */
body {
    margin: 0;
    padding: 0;
    background: linear-gradient(135deg, #ffffff 0%, #fff5f5 100%);
    font-family: "Poppins", sans-serif;
    color: #222;
    overflow-y: auto;
    position: relative;
}

/* Animated background particles */
body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(
            circle at 20% 30%,
            rgba(255, 0, 0, 0.03) 0%,
            transparent 50%
        ),
        radial-gradient(
            circle at 80% 70%,
            rgba(255, 0, 0, 0.02) 0%,
            transparent 50%
        );
    pointer-events: none;
    z-index: 0;
    animation: particleFloat 20s ease-in-out infinite;
}

@keyframes particleFloat {
    0%,
    100% {
        transform: translate(0, 0);
    }

    50% {
        transform: translate(20px, 20px);
    }
}

/* === 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%);
    box-shadow: 0 8px 32px rgba(255, 0, 0, 0.3),
        inset 0 -2px 0 rgba(255, 255, 255, 0.1);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    animation: headerPulse 4s ease-in-out infinite;
    overflow: hidden;
}

/* Animated shine effect on header */
.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 6px 24px rgba(255, 0, 0, 0.4),
        inset 0 -2px 0 rgba(255, 255, 255, 0.15);
}

/* 🔙 Back button */
.back-btn {
    position: absolute;
    left: 32px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 42px;
    color: #ff0000;
    text-decoration: none;
    line-height: 1;
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ffffff 0%, #fff5f5 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15),
        0 0 0 4px rgba(255, 255, 255, 0.3),
        inset 0 2px 4px rgba(255, 255, 255, 0.8);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    touch-action: manipulation;
}

.back-btn::before {
    content: "";
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ff0000, #ff3333);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
}

.back-btn:hover {
    background: linear-gradient(135deg, #ffffff 0%, #ffebeb 100%);
    transform: translateY(-50%) scale(1.1) rotate(-10deg);
    box-shadow: 0 12px 28px rgba(255, 0, 0, 0.3), 0 0 0 5px rgba(255, 0, 0, 0.2),
        inset 0 2px 6px rgba(255, 255, 255, 0.9);
}

.back-btn:hover::before {
    opacity: 0.15;
}

.back-btn:active {
    transform: translateY(-50%) scale(0.95);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2), 0 0 0 3px rgba(255, 0, 0, 0.3);
}

/* 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 3px 10px rgba(255, 255, 255, 0.95),
        0 0 40px rgba(255, 255, 255, 0.3);
    animation: titleFloat 2s ease-in-out infinite;
    background: linear-gradient(to bottom, #ffffff 0%, #ffe0e0 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

@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;
}

/* === Shows Grid === */
.shows-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
    padding: 50px 60px 60px;
    position: relative;
    z-index: 1;
}

/* === Show Card === */
.show-card {
    background: linear-gradient(135deg, #ffffff 0%, #fffafa 100%);
    border-radius: 28px;
    padding: 20px 20px 24px;
    cursor: pointer;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08), 0 0 0 1px rgba(255, 0, 0, 0.05),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    border: 2px solid transparent;
    opacity: 0;
    transform: translateY(30px) scale(0.95);
    animation: cardReveal 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
    position: relative;
    overflow: hidden;
}

/* Shine effect on cards */
.show-card::before {
    content: "";
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        to bottom right,
        transparent 40%,
        rgba(255, 255, 255, 0.3) 50%,
        transparent 60%
    );
    transform: translateX(-100%) translateY(-100%);
    transition: transform 0.6s ease;
}

.show-card:hover::before {
    transform: translateX(0) translateY(0);
}

/* Stagger animation */
.show-card:nth-child(1) {
    animation-delay: 0.1s;
}

.show-card:nth-child(2) {
    animation-delay: 0.2s;
}

.show-card:nth-child(3) {
    animation-delay: 0.3s;
}

.show-card:nth-child(4) {
    animation-delay: 0.4s;
}

.show-card:nth-child(5) {
    animation-delay: 0.5s;
}

.show-card:nth-child(6) {
    animation-delay: 0.6s;
}

.show-card:hover {
    transform: translateY(-12px) scale(1.03);
    border-color: #ff0000;
    box-shadow: 0 20px 50px rgba(255, 0, 0, 0.3), 0 0 0 3px rgba(255, 0, 0, 0.2),
        0 0 60px rgba(255, 0, 0, 0.15), inset 0 1px 0 rgba(255, 255, 255, 1);
}

/* Tap feedback for kiosk */
.show-card:active {
    transform: translateY(-6px) scale(0.98);
    transition: all 0.1s ease;
}

/* Poster */
.poster-frame {
    border-radius: 20px;
    overflow: hidden;
    background: linear-gradient(135deg, #f8f8f8 0%, #f0f0f0 100%);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15),
        inset 0 0 0 1px rgba(255, 255, 255, 0.5);
    position: relative;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.show-card:hover .poster-frame {
    box-shadow: 0 12px 30px rgba(255, 0, 0, 0.25),
        inset 0 0 0 2px rgba(255, 0, 0, 0.3);
    transform: scale(1.02);
}

.poster-frame::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
        135deg,
        rgba(255, 0, 0, 0) 0%,
        rgba(255, 0, 0, 0.05) 100%
    );
    opacity: 0;
    transition: opacity 0.4s ease;
}

.show-card:hover .poster-frame::after {
    opacity: 1;
}

.poster-frame img {
    width: 100%;
    height: 400px;
    object-fit: cover;
    transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.show-card:hover .poster-frame img {
    transform: scale(1.08);
}

/* Text */
.show-info {
    text-align: center;
    padding-top: 16px;
    position: relative;
    z-index: 1;
}

.show-name {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 6px;
    color: #1a1a1a;
    transition: all 0.3s ease;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.show-card:hover .show-name {
    color: #ff0000;
    transform: scale(1.05);
    text-shadow: 0 2px 8px rgba(255, 0, 0, 0.2);
}

.show-details {
    font-size: 16px;
    color: #666;
    transition: color 0.3s ease;
    font-weight: 500;
}

.show-card:hover .show-details {
    color: #ff3333;
}

/* No Shows */
.no-shows-msg {
    text-align: center;
    font-size: 24px;
    margin-top: 60px;
    color: #999;
    font-weight: 600;
    animation: fadeInUp 0.6s ease;
    grid-column: 1 / -1;
}

/* Responsive */
@media (max-width: 1024px) {
    .shows-grid {
        grid-template-columns: repeat(2, 1fr);
        padding: 40px 30px 50px;
        gap: 28px;
    }

    .title-main {
        font-size: 52px;
    }

    .back-btn {
        width: 64px;
        height: 64px;
        font-size: 38px;
        left: 24px;
    }
}

/* === Animations === */

@keyframes headerPulse {
    0%,
    100% {
        box-shadow: 0 8px 32px rgba(255, 0, 0, 0.3),
            inset 0 -2px 0 rgba(255, 255, 255, 0.1);
    }

    50% {
        box-shadow: 0 12px 40px rgba(255, 60, 0, 0.4),
            inset 0 -2px 0 rgba(255, 255, 255, 0.2);
    }
}

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

    100% {
        transform: translateX(-100%);
    }
}

@keyframes cardReveal {
    0% {
        opacity: 0;
        transform: translateY(30px) scale(0.95) rotateX(10deg);
    }

    60% {
        transform: translateY(-5px) scale(1.02) rotateX(0deg);
    }

    100% {
        opacity: 1;
        transform: translateY(0) scale(1) rotateX(0deg);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

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

/* Smooth scrollbar styling */
::-webkit-scrollbar {
    width: 12px;
}

::-webkit-scrollbar-track {
    background: #f5f5f5;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #ff0000 0%, #cc0000 100%);
    border-radius: 6px;
    border: 2px solid #f5f5f5;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #ff3333 0%, #ff0000 100%);
}
