@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap');

/* === DESKTOP STYLES (DEFAULT - MUCH BIGGER) === */
body {
    background: url("white_static.gif") no-repeat center center fixed;
    background-size: cover;
    margin: 0;
    padding: 0;
    height: 100vh;
    width: 100vw;
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
    overflow: hidden !important;
    position: fixed !important;
}

#container {
    width: 100vw;
    height: 100vh;
    position: relative;
    z-index: 0;
}

/* DESKTOP LOGO - BIGGER */
#logo {
    width: 250px; /* Was 280px - now BIGGER */
    position: absolute;
    top: 0;
    left: 0;
}

/* DESKTOP TV GUIDE - MUCH BIGGER */
#tv-guide {
    display: flex;
    flex-direction: column;
    width: 550px; /* Was 600px - now MUCH BIGGER */
    padding: 20px; /* Was 15px - more padding */
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1;
}

#tv-guide, .channel {
    font-family: "Impact";
    text-transform: uppercase;
}

/* DESKTOP CHANNEL BOXES - MUCH BIGGER */
.channel {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    border: 2px solid black;
    background-color: #66a3ff;
    margin: 5px 0; /* Was 8px - more spacing */
    padding: 15px 5px; /* Was 15px 10px - bigger padding */
    width: 500px; /* Was 550px - now MUCH BIGGER */
    height: 30px; /* Was 50px - now TALLER */
    transform: scale(1.2, 0.8);
    position: relative;
    overflow: hidden;
}

.number {
    background-color: #003366;
    color: white;
    padding: 15px 25px; /* Was 10px 18px - bigger padding */
    margin-right: 100px; /* Was 80px - more space */
    font-weight: bold;
    flex-shrink: 0;
    font-size: 24px; /* Was 20px - bigger text */
    min-width: 20px; /* Was 70px - wider */
    text-align: center;
    transform: scale(0.6, 0.8);
}

.channel a {
    color: black;
    text-decoration: none;
    font-size: 26px; /* Was 28px - bigger text */
    letter-spacing: 1px;
    transform: scale(1.3, 1);
    display: inline-block;
    text-align: left;
    flex-grow: 1;
    white-space: nowrap;
    max-width: 450px; /* Was 400px - more room */
    overflow: hidden;
}

.channel:hover {
    background-color: yellow;
}

.channel:hover .number {
    background-color: orange;
}

/* DESKTOP HEADER - BIGGER */
.site-header {
    position: absolute;
    top: 10%; /* Was 8% - moved up for bigger header */
    left: 50%;
    transform: translate(-50%, -50%);
    text-transform: uppercase;
    font-family: Arial Black, sans-serif;
    font-size: 5rem; /* Was 5.5rem - now BIGGER */
    color: #66a3ff;
    -webkit-text-fill-color: black;
    -webkit-text-stroke: 1px;
    z-index: 1000;
    text-shadow: 3px 3px 6px black; /* Bigger shadow */
    pointer-events: auto;
    white-space: nowrap;
    text-decoration: none;
}

.site-header:hover {
    color: #4f8cff;
}

.glitch-font {
    font-family: 'Press Start 2P', cursive;
    font-size: 70px; /* Was 60px - bigger glitch */
    top: 8%;
    left: 50%;
    text-transform: uppercase;
}

@keyframes glitch {
    0% { transform: skewX(0deg); }
    50% { transform: skewX(10deg); }
    100% { transform: skewX(0deg); }
}

/* === MUSIC PAGE STYLES === */
body.music-page {
    background: url("../static/music_background.png") no-repeat center center fixed;
    background-size: cover;
    overflow: hidden;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* Row container for vertical navigation */
.nxe-wrapper {
    position: relative;
    width: 100vw;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    overflow: hidden;
    flex-direction: column; /* Stack rows vertically */
}

/* Individual row styling */
.nxe-track {
    display: flex;
    align-items: center;
    height: 100vh; /* Each row takes full height */
    width: 100vw;
    transform: translateX(200px);
    transition: transform 0.3s ease;
    will-change: transform;
    position: absolute; /* Stack rows on top of each other */
    top: 0;
    left: 0;
}

.tile {
    width: 300px; /* Was 350px - bigger tiles */
    height: 300px; /* Was 350px - bigger tiles */
    margin: 0;
    background:
        linear-gradient(135deg,
            rgba(255,255,255,0.8) 0%,
            rgba(255,255,255,0.4) 25%,
            transparent 50%,
            rgba(0,0,0,0.1) 100%
        ),
        linear-gradient(to bottom, #4f8cff 0%, #9a6eff 20%, #000000 100%);
    text-align: center;
    justify-content: center;
    font-family: Impact, sans-serif;
    font-size: 1.5rem;
    box-shadow:
        0 4px 12px rgba(0, 0, 0, 0.5),
        inset 0 1px 0 rgba(255,255,255,0.4),
        inset 0 -1px 0 rgba(0,0,0,0.3);
    transition: transform 0.3s ease, z-index 0.3s ease, opacity 0.3s ease;
    transform-origin: left center;
    position: relative;
    display: flex;
    overflow: visible;
    pointer-events: auto;
    cursor: pointer;
}

.tile.active {
    transform: scale(1) translateX(200px);
    opacity: 1;
    box-shadow:
        0 6px 20px rgba(0, 0, 0, 0.7),
        inset 0 1px 0 rgba(255,255,255,0.5),
        inset 0 -1px 0 rgba(0,0,0,0.4),
        0 0 30px rgba(79,140,255,0.5);
}

.tile-logo {
    width: 120px; /* Was 160px - bigger logos */
    height: 120px; /* Was 160px - bigger logos */
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    filter:
        drop-shadow(0 0 10px rgba(255,255,255,0.5))
        drop-shadow(0 0 20px rgba(79,140,255,0.3));
    transition: filter 0.3s ease;
}

.tile-logo::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    height: 60%;
    background: inherit;
    opacity: 0.4;
    transform: scaleY(-0.8);
    mask: linear-gradient(to bottom, rgba(0,0,0,0.6) 0%, transparent 100%);
    -webkit-mask: linear-gradient(to bottom, rgba(0,0,0,0.6) 0%, transparent 100%);
    z-index: -1;
}

.tile-text {
    position: absolute;
    bottom: 25px; /* Was 20px - more spacing */
    left: 25px; /* Was 20px - more spacing */
    font-size: 1.3rem; /* Was 1.4rem - bigger text */
    font-weight: bold;
    color: white;
    text-shadow: 1px 1px 6px rgba(0,0,0,0.7);
}

/* === OTHER ELEMENTS === */
.home-button {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    width: 140px;
    height: 50px;
    font-size: 1.25rem;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid #ffffff22;
    color: white;
    font-family: Impact, sans-serif;
    text-transform: uppercase;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease, transform 0.2s ease;
    z-index: 10;
    border-radius: 8px;
    box-shadow: 0 0 8px rgba(255, 255, 255, 0.1);
    /* Fix text centering */
    text-align: center;
    line-height: 1;
}

.home-button:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateX(-50%) scale(1.05);
}

/* DESKTOP UPLOAD/ABOUT/CONTACT BOXES - BIGGER */
#about-box, #contact-box, #upload-box {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(1.1, 0.9);
    width: 800px; /* Was 700px - bigger boxes */
    height: auto;
    min-height: 350px; /* Was 300px - taller */
    padding: 40px; /* Was 30px - more padding */
    background-color: #66a3ff;
    border: 4px solid #003366;
    box-sizing: border-box;
    font-family: "Impact", sans-serif;
    text-transform: uppercase;
    font-size: 24px; /* Was 20px - bigger text */
    color: black;
    text-align: center;
    line-height: 1.5;
    z-index: 2;
}
/* FINAL FIX - Replace your progress bar CSS with this */

#progress-bar-container {
    display: none;
    margin-top: 20px;
    width: 100%;
    height: 35px;
    background: #ccc;
    border: 3px solid #003366;
    overflow: hidden;
    position: relative;
    border-radius: 8px;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.2);
}

#progress-bar {
    height: 100%;
    width: 100%;
    /* CLEAR any existing backgrounds first */
    background-color: transparent !important;
    background-image: repeating-linear-gradient(
        -45deg,
        #66a3ff 0px,
        #66a3ff 12px,
        #4f8cff 12px,
        #4f8cff 24px,
        #003366 24px,
        #003366 36px,
        #1a4d80 36px,
        #1a4d80 48px
    ) !important;
    background-size: 48px 48px !important;
    animation: smooth-barberpole 1.5s linear infinite !important;
    border-radius: 5px;
    opacity: 1 !important;
}

@keyframes smooth-barberpole {
    0% { background-position: 0 0; }
    100% { background-position: 48px 0; }
}

#progress-text {
    display: none;
    margin-top: 15px;
    color: black;
    font-weight: bold;
    font-size: 16px;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* Smooth transitions for all interactive elements */
.tile, .channel, .home-button {
transition: all 0.3s ease;
}

/* Prevent horizontal scrolling */
body, html {
    overflow-x: hidden;
}

::-webkit-scrollbar {
    display: none;
}

.category {
    opacity: 0;
    pointer-events: none;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    transition: all 0.4s ease;
    transform: translateY(100vh); /* Always start from bottom */
}

.category.active {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.category.slide-up {
    transform: translateY(-100vh) !important; /* When going up, slide from top */
}

.main-container {
    position: relative;
}

.tile-header {
    top: 20px;
    left: 60px;
    z-index: 1000;
    font-size: 2rem;
    color: white;
    pointer-events: none;
}

/* Navigation hint styling */
.nav-hint {
    position: absolute;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0,0,0,0.8);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-family: Impact, sans-serif;
    text-transform: uppercase;
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s ease;
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255,255,255,0.2);
}

.column-names {
    position: absolute;
    top: 120px;
    left: 50px;
    z-index: 1000;
    font-family: Impact, sans-serif;
    text-transform: uppercase;
    pointer-events: none;
}

.column-name {
    transition: all 0.4s ease;
    white-space: nowrap;
    margin: 5px 0;
}

.column-name.previous {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.4);
    transform: translateY(-10px);
}

.column-name.current {
    font-size: 1.5rem;
    color: #66a3ff;
    font-weight: bold;
    text-shadow: 0 0 10px rgba(102, 163, 255, 0.5);
}

.column-name.next {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.4);
    transform: translateY(10px);
}

.music-page .home-button {
    z-index: 99999 !important;
    position: fixed !important;
    pointer-events: auto !important;
}

.shop-page .home-button {
    bottom: 200px !important;
    position: fixed !important;
    left: 50%;
    transform: translateX(-50%);
}

/* === MOBILE OVERRIDES (SMALLER SIZES) === */
@media (max-width: 768px) {
    /* MOBILE HEADER - SMALLER */
    .site-header {
        font-size: 2.5rem;
        top: 8%;
    }

    .glitch-font {
        font-size: 2rem;
        top: 10%;
    }

    /* MOBILE LOGO - SMALLER */
    #logo {
        width: 180px;
    }

    /* MOBILE TV GUIDE - SMALLER */
    #tv-guide {
        width: 88vw;
        padding: 5px;
    }

    /* MOBILE CHANNEL BOXES - SMALLER */
    .channel {
        width: 85vw;
        height: 40px;
        margin: 8px 0;
        transform: scale(1.1, 0.9);
        padding: 8px 5px;
    }

    .number {
        padding: 5px 8px;
        margin-right: 20px;
        font-size: 0.9rem;
        min-width: 40px;
        transform: none;
    }

    .channel a {
        transform: scale(1, 1);
        font-size: 18px;
        max-width: calc(85vw - 80px);
    }

    /* MOBILE TILES - SMALLER */
    .nxe-track {
        transform: translateX(50px);
    }


    .tile {
        width: 50vw;
        height: 50vw;
        max-width: 260px;
        max-height: 260px;
        margin: 0 5px;
    }

    .tile.active {
        margin-left: 30px;
    }

    .tile-logo {
        width: 100px;
        height: 100px;
    }

    .tile-text {
        font-size: 1rem;
        bottom: 10px;
        left: 10px;
    }

    /* MOBILE BOXES - SMALLER */
    #about-box, #contact-box, #upload-box {
        width: 90vw;
        padding: 20px;
        font-size: 16px;
        min-height: 420px;
        transform: translate(-50%, -50%) scale(1, 1);
    }

    #upload-box input[type="file"],
    #upload-box input[type="text"] {
        width: 100%;
        padding: 10px;
        margin: 10px 0;
        border: 2px solid #003366;
        border-radius: 5px;
        font-size: 16px;
        box-sizing: border-box;
    }

    #upload-box button {
        width: 100%;
        padding: 15px;
        margin: 10px 0;
        background-color: #003366;
        color: white;
        border: none;
        border-radius: 5px;
        font-size: 18px;
        font-family: Impact, sans-serif;
        text-transform: uppercase;
        cursor: pointer;
        transition: background-color 0.3s ease;
    }

    #upload-box button:hover {
        background-color: #004080;
    }

    /* Touch-friendly navigation */
    .nxe-wrapper {
        touch-action: pan-x;
        -webkit-overflow-scrolling: touch;
    }

    .nxe-track {
        cursor: grab;
        -webkit-user-select: none;
        user-select: none;
    }

    .nxe-track:active {
        cursor: grabbing;
    }

    .tile {
        -webkit-user-select: none;
        user-select: none;
        -webkit-tap-highlight-color: transparent;
    }

    .tile-text {
        pointer-events: none;
    }

    .home-button {
        display: block !important;
        position: fixed !important;
        width: 100px !important;
        height: 40px !important;
        font-size: 1rem !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
        background: rgba(255, 255, 255, 0.1) !important;
        border: 2px solid #ffffff22 !important;
        isolation: isolate;
        z-index: 10000 !important;
        color: white !important;
        /* Perfect centering for mobile */
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }

    /* Different bottom positions for different pages */
    body:not(.music-page) .home-button {
        bottom: 10px !important; /* Higher for upload/contact/about pages */
    }

    body.music-page .home-button {
        bottom: 20px !important; /* Lower for music page */
    }

    body.shop-page .home-button {
        bottom: 140px !important;
    }


    .row-indicator {
    top: 60px;
    right: 20px;
    padding: 10px 15px;
    font-size: 0.9rem;
    }

    .row-title {
        font-size: 1rem;
    }

    .row-counter {
        font-size: 0.8rem;
    }

    .column-names {
        top: 100px;
        left: 20px;
        height: 100px;
    }

    .column-name.current {
        font-size: 1.2rem;
        top: 25px;
    }

    .column-name.previous,
    .column-name.next {
        font-size: 0.9rem;
    }

    .column-name.previous {
        top: 0;
    }

    .column-name.next {
        top: 60px;
    }
}
}

@media (max-width: 480px) {
    .site-header {
        font-size: 1.8rem;
    }

    .glitch-font {
        font-size: 1.5rem;
    }

    .tile {
        width: 50vw;
        height: 50vw;
        max-width: 200px;
        max-height: 200px;
    }

    .tile-logo {
        width: 80px;
        height: 80px;
    }

    .tile-text {
        font-size: 0.9rem;
    }

    .nxe-track {
        transform: translateX(30px);
    }

    .channel a {
        font-size: 26px;
    }

    .home-button {
        display: block !important;
        position: fixed !important;
        width: 100px !important;
        height: 40px !important;
        font-size: 1rem !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
        background: rgba(255, 255, 255, 0.1) !important;
        border: 2px solid #ffffff22 !important;
        z-index: 9999 !important;
        color: white !important;
        /* Perfect centering for mobile */
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }

    #progress-text {
        font-size: 14px;
        margin-top: 10px;
    }
}

/* Landscape orientation adjustments */
@media (max-width: 768px) and (orientation: landscape) {
    .site-header {
        font-size: 2rem;
        top: 5%;
    }

    #tv-guide {
        margin-top: 20px;
    }

    .tile {
        width: 30vw;
        height: 30vw;
        max-width: 180px;
        max-height: 180px;
    }

    #upload-box, #contact-box, #about-box {
        max-height: 70vh;
        overflow-y: auto;
    }
}

/* Add this to your CSS - Enhanced mobile scroll prevention */

/* More aggressive scroll prevention for home page */
html.no-scroll,
body.home-page {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    overflow: hidden !important;
    overscroll-behavior: none !important;
    -webkit-overflow-scrolling: auto !important;
}

/* Prevent touch actions that could cause scrolling */
body.home-page * {
    touch-action: none !important;
    -webkit-touch-callout: none !important;
    -webkit-user-select: none !important;
    -khtml-user-select: none !important;
    -moz-user-select: none !important;
    -ms-user-select: none !important;
    user-select: none !important;
}

/* Allow text selection for specific elements if needed */
body.home-page .channel a,
body.home-page .site-header {
    -webkit-user-select: auto !important;
    -moz-user-select: auto !important;
    -ms-user-select: auto !important;
    user-select: auto !important;
    touch-action: manipulation !important;
}

/* Extra mobile-specific prevention */
@media (max-width: 768px) {
    body.home-page {
        position: fixed !important;
        width: 100vw !important;
        height: 100vh !important;
        overflow: hidden !important;
        overscroll-behavior: contain !important;
        touch-action: manipulation !important;
    }

    /* Prevent any element from causing scroll */
    body.home-page #container,
    body.home-page #tv-guide {
        position: absolute !important;
        overflow: visible !important;
    }
}