/* ===== RESET & BASE ===== */

/* ===== GLITCH EFFECTS ===== */
.glitch-square {
    position: fixed;
    pointer-events: none;
    z-index: 99999;
    opacity: 0;
    animation: glitchFlash 0.3s ease-in-out;
}

@keyframes glitchFlash {
    0% { opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { opacity: 0; }
}

/* ===== RESET & BASE STYLES ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    cursor: auto;
}

html, body {
    width: 100%;
    height: 100%;
    overflow-x: hidden;
}

body {
    font-family: 'Courier New', 'Courier', monospace;
    background: #0000ff;
    color: #fff;
    position: relative;
    padding-bottom: 60px; /* Space for footer */
}

/* ===== TOP NAVIGATION ===== */
.top-nav {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-start;
    background: #0000ff;
    padding: 8px 10px;
    border-bottom: 3px solid #000;
    gap: 5px;
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-item {
    color: #fff;
    font-weight: bold;
    font-size: 14px;
    text-transform: lowercase;
    padding: 5px 10px;
    cursor: pointer;
    user-select: none;
    white-space: nowrap;
}

#logo-container {
    padding: 0;
    margin-right: 10px;
}

#logo {
    height: auto;
    font-size: 28px;
    font-weight: bold;
    font-style: italic;
    text-decoration: underline;
    display: block;
    cursor: pointer;
    transition: transform 0.1s;
    text-shadow: 2px 2px 0 #000;
    animation: colorCycle 5s infinite;
}

#logo:active {
    transform: scale(0.95);
}

.nav-link {
    transition: all 0.2s;
}

.nav-link:hover {
    background: #ff00ff;
    color: #000;
}

.play-btn {
    color: #ff0000;
}

.timestamp {
    margin-left: auto;
    font-size: 11px;
    color: #00ffff;
}

/* ===== VOLUME SLIDER ===== */
.volume-control {
    display: none; /* Hidden by default */
    align-items: center;
    gap: 8px;
    padding: 5px 10px;
}

.volume-label {
    font-size: 12px;
    color: #00ff00;
    text-transform: lowercase;
}

.volume-value {
    font-size: 11px;
    color: #ff00ff;
    min-width: 35px;
}

.retro-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 80px;
    height: 8px;
    background: #000;
    border: 2px solid #00ffff;
    outline: none;
    cursor: pointer;
}

.retro-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    background: #ff00ff;
    border: 2px solid #000;
    cursor: pointer;
    transition: background 0.2s;
}

.retro-slider::-webkit-slider-thumb:hover {
    background: #00ffff;
}

.retro-slider::-webkit-slider-thumb:active {
    background: #ffff00;
}

.retro-slider::-moz-range-thumb {
    width: 16px;
    height: 16px;
    background: #ff00ff;
    border: 2px solid #000;
    cursor: pointer;
    transition: background 0.2s;
}

.retro-slider::-moz-range-thumb:hover {
    background: #00ffff;
}

.retro-slider::-moz-range-thumb:active {
    background: #ffff00;
}

.retro-slider::-moz-range-track {
    background: #000;
    border: 2px solid #00ffff;
    height: 8px;
}

/* ===== MAIN GRID LAYOUT ===== */
.content-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0;
    padding: 0;
}

/* ===== SIDEBAR ===== */
.sidebar {
    background: black;
    padding: 10px;
    border: 3px solid #0000ff;
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-self: start; /* Prevent stretching on mobile */
}

.video-container {
    position: relative;
    width: 100%;
    height: 30%;
    background: #000;
    border: 2px solid #00ff00;
    overflow: hidden;
}

.sidebar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: contrast(1.2) saturate(1.1);
}

.video-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 40px;
    color: #fff;
    text-shadow: 0 0 10px #000;
    cursor: pointer;
    transition: transform 0.2s;
}

.video-overlay:hover {
    transform: translate(-50%, -50%) scale(1.2);
}

.sidebar-controls {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.control-icon {
    background: #0000ff;
    color: #fff;
    padding: 8px;
    font-size: 11px;
    border: 1px solid #00ffff;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 6px;
}

.control-logo {
    width: 20px;
    height: 20px;
    object-fit: contain;
    vertical-align: middle;
}

.control-emoji {
    display: inline-block;
    width: 20px;
    height: 20px;
    font-size: 16px;
    line-height: 20px;
    text-align: center;
}

.control-icon:hover {
    background: #00ffff;
    color: #000;
}

.album-mini {
    background: #000;
    border: 2px solid #ff00ff;
    padding: 10px;
}

.album-art {
    width: 100%;
    aspect-ratio: 1;
    background: linear-gradient(135deg, #ff00ff, #00ffff);
    margin-bottom: 8px;
}

.track-info {
    font-size: 10px;
    text-align: center;
    color: #00ff00;
}

.visit-counter {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid #ff00ff;
    font-size: 12px;
    text-align: center;
    font-family: 'Courier New', monospace;
}

.counter-label {
    color: #00ffff;
    font-weight: bold;
    text-transform: lowercase;
}

.counter-value {
    color: #00ff00;
    font-weight: bold;
    margin-left: 5px;
    letter-spacing: 1px;
}

/* ===== HERO SECTION ===== */
.hero-section {
    background: #0000ff;
    padding: 15px;
    position: relative;
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
    min-height: 400px;
}

.color-block {
    width: 100%;
    min-height: 80px;
    border: 3px solid #000;
    position: relative;
    overflow: hidden;
}

.draggable-block {
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    cursor: grab;
}

.draggable-block:hover {
    transform: scale(1.02);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
    transition: transform 0.2s, box-shadow 0.2s;
}

.draggable-block.dragging {
    opacity: 0.7;
    z-index: 1000;
    transition: opacity 0.1s;
    cursor: grabbing;
}

.draggable-block.returning {
    transition: all 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.block-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    pointer-events: none;
    filter: brightness(0.9) contrast(1.1);
}

.pink-block {
    background: #ff1493;
    grid-row: 1;
    border-color: #ff1493;
}

.purple-block {
    background: #8b00ff;
    min-height: 120px;
    border-color: #8b00ff;
}

.cyan-block {
    background: #00ffff;
    min-height: 100px;
    border-color: #00ffff;
}

.magenta-block {
    background: #ff00ff;
    min-height: 150px;
    border-color: #ff00ff;
}

.hero-banner {
    background: linear-gradient(rgb(255, 124, 255), rgb(0, 255, 255));
    border: 4px solid #000000;
    padding: 20px;
    text-align: center;
    position: relative;
}

.hero-title {
    font-size: 48px;
    font-weight: bold;
    color: #0000ff;
    text-shadow: 3px 3px 0 #000;
    text-decoration: underline;
    font-style: italic;
    margin-bottom: 10px;
}

.hero-subtitle {
    font-size: 14px;
    color: #72e5ff;
    font-style: italic;
    font-weight: bold;
    margin-bottom: 5px;
    text-shadow: 2px 2px 1px rgba(0, 0, 0, 0.8), -1px -1px 2px rgba(0, 0, 0, 0.5);
}

.hero-text {
    font-size: 12px;
    color: #fb96ff;
    font-style: italic;
    font-weight: bold;
    text-shadow: 2px 2px 1px rgba(0, 0, 0, 0.8), -1px -1px 2px rgba(0, 0, 0, 0.5);
}

.blink {
    animation: blink 1s infinite;
    font-weight: bold;
    text-decoration: underline;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8), -1px -1px 2px rgba(0, 0, 0, 0.5), 0 0 8px rgba(0, 0, 0, 0.6);
}

@keyframes blink {
    0%, 50%, 100% { opacity: 1; }
    25%, 75% { opacity: 0; }
}

@keyframes colorCycle {
    0% { color: #fff; }
    16.66% { color: #ff00ff; }
    33.33% { color: #00ffff; }
    50% { color: #ffff00; }
    66.66% { color: #ff0000; }
    83.33% { color: #00ff00; }
    100% { color: #fff; }
}

.button-stack {
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 2;
}

.retro-btn {
    padding: 15px;
    font-size: 16px;
    font-weight: bold;
    font-family: 'Courier New', monospace;
    border: 3px solid #000;
    cursor: pointer;
    text-transform: uppercase;
    transition: all 0.1s;
    box-shadow: 5px 5px 0 #000;
}

.retro-btn:hover {
    transform: translate(2px, 2px);
    box-shadow: 3px 3px 0 #000;
}

.retro-btn:active {
    transform: translate(5px, 5px);
    box-shadow: 0 0 0 #000;
}

.orange-btn {
    background: #ff8c00;
    color: #000;
}

.pink-btn {
    background: #ff1493;
    color: #fff;
}

.cyan-btn {
    background: #00ffff;
    color: #000;
}

.promo-box {
    background: linear-gradient(135deg, #ff1493 0%, #00ffff 100%);
    border: 3px solid #000;
    padding: 0;
    text-align: center;
    font-weight: bold;
    font-size: 14px;
    line-height: 1.5;
    overflow: hidden;
    white-space: nowrap;
    position: relative;
    min-height: 150px;
    display: flex;
    align-items: center;
}

.promo-ticker {
    display: inline-block;
    padding-left: 100%;
    animation: ticker 25s linear infinite, colorCycle 5s infinite;
    font-size: 120px;
    font-weight: bold;
    font-style: italic;
    text-shadow: 4px 4px 0 #000;
    line-height: 150px;
}

/* ===== SIDE PANEL ===== */
.side-panel {
    background: #ff00ff;
    border: 3px solid #000;
    padding: 15px 15px 0 15px;
    display: none; /* Hidden on mobile */
    flex-direction: column;
    justify-content: space-between;
}

.no-signal-img {
    width: calc(100% + 30px);
    margin-left: -15px;
    margin-right: -15px;
    margin-top: auto;
    display: block;
}

.panel-content h3 {
    color: #000;
    font-size: 16px;
    margin-bottom: 10px;
    text-decoration: underline;
}

.show-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.show-item {
    background: #0000ff;
    color: #fff;
    padding: 10px;
    border: 2px solid #000;
    font-size: 12px;
    font-weight: bold;
}

/* ===== NEWS TICKER FOOTER ===== */
.news-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: #000;
    color: #00ff00;
    padding: 8px 0;
    overflow: hidden;
    white-space: nowrap;
    border-top: 3px solid #00ff00;
    font-size: 14px;
    font-weight: bold;
    z-index: 100;
}

.ticker {
    display: inline-block;
    padding-left: 100%;
    animation: ticker 25s linear infinite;
}

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

/* ===== TABLET BREAKPOINT (600px+) ===== */
@media screen and (min-width: 600px) {
    .top-nav {
        padding: 10px 15px;
    }
    
    .nav-item {
        font-size: 16px;
        padding: 8px 15px;
    }
    
    #logo {
        font-size: 32px;
    }
    
    .content-grid {
        grid-template-columns: 150px 1fr;
    }
    
    .sidebar {
        grid-row: 1 / 3;
        align-self: stretch; /* Normal grid stretching on tablet+ */
    }
    
    .hero-section {
        grid-template-columns: 1fr 1fr;
        padding: 20px;
        gap: 20px;
    }
    
    .pink-block {
        grid-column: 1;
        grid-row: 1;
        min-height: 150px;
    }
    
    .purple-block {
        grid-column: 2;
        grid-row: 1;
        min-height: 150px;
    }
    
    .hero-banner {
        grid-column: 1;
        grid-row: 2;
    }
    
    .cyan-block {
        grid-column: 2;
        grid-row: 2;
    }
    
    .button-stack {
        grid-column: 1;
        grid-row: 3;
    }
    
    .magenta-block {
        grid-column: 2;
        grid-row: 3;
    }
    
    .promo-box {
        grid-column: 1 / 3;
        grid-row: 4;
    }
    
    .side-panel {
        grid-column: 2;
        grid-row: 2;
        display: flex; /* Show on tablet+ */
    }
}

/* ===== DESKTOP BREAKPOINT (900px+) ===== */
@media screen and (min-width: 900px) {
    .top-nav {
        padding: 12px 20px;
    }
    
    .nav-item {
        font-size: 20px;
        padding: 10px 16px;
    }
    
    .volume-control.visible {
        display: flex; /* Show on desktop only when playing */
    }
    
    .volume-label {
        font-size: 16px;
    }
    
    .volume-value {
        font-size: 15px;
    }
    
    #logo {
        font-size: 42px;
    }
    
    .content-grid {
        grid-template-columns: 324px 1fr 450px;
        gap: 0;
    }

    .video-container {
        aspect-ratio: 9/16;
    }
    
    .sidebar {
        grid-column: 1;
        grid-row: 1;
    }
    
    .control-icon {
        font-size: 18px;
        padding: 12px;
    }
    
    .track-info {
        font-size: 14px;
    }
    
    .hero-section {
        grid-column: 2;
        grid-row: 1;
        grid-template-columns: repeat(3, 1fr);
        gap: 15px;
        padding: 25px;
    }
    
    .pink-block {
        grid-column: 1;
        grid-row: 1;
        min-height: 120px;
    }
    
    .purple-block {
        grid-column: 2;
        grid-row: 1;
        min-height: 120px;
    }
    
    .hero-banner {
        grid-column: 3;
        grid-row: 1 / 3;
        padding: 40px 30px;
    }
    
    .hero-title {
        font-size: 96px;
        margin-bottom: 20px;
    }
    
    .hero-subtitle {
        font-size: 24px;
        margin-bottom: 15px;
    }
    
    .hero-text {
        font-size: 20px;
        line-height: 1.8;
    }
    
    .blink {
        font-size: 22px;
    }
    
    .cyan-block {
        grid-column: 1;
        grid-row: 2;
        min-height: 120px;
    }
    
    .button-stack {
        grid-column: 2;
        grid-row: 2;
        gap: 12px;
    }
    
    .magenta-block {
        grid-column: 1;
        grid-row: 3;
        min-height: 100px;
    }
    
    .promo-box {
        grid-column: 2 / 4;
        grid-row: 3;
    }
    
    .retro-btn {
        padding: 18px;
        font-size: 14px;
    }
    
    .side-panel {
        grid-column: 3;
        grid-row: 1;
        display: flex; /* Show on desktop */
    }
    
    .panel-content h3 {
        font-size: 24px;
        margin-bottom: 15px;
    }
    
    .show-item {
        font-size: 18px;
        padding: 14px;
    }
    
    .news-footer {
        font-size: 16px;
        color: rgb(0, 255, 255);
        padding: 10px 0;
    }
}

/* ===== ANIMATIONS & EFFECTS ===== */
@keyframes glitch {
    0% { transform: translate(0); }
    20% { transform: translate(-2px, 2px); }
    40% { transform: translate(-2px, -2px); }
    60% { transform: translate(2px, 2px); }
    80% { transform: translate(2px, -2px); }
    100% { transform: translate(0); }
}

.hero-title:hover {
    animation: glitch 0.3s infinite;
}

a {
  text-decoration: none;
  color: inherit;
}
a:visited {
    color: inherit;
}
a:link {
    color: inherit;
}

/* ===== POP-UP WINDOWS ===== */
.popup-window {
    position: fixed;
    width: 340px;
    background: #c0c0c0;
    border: 3px solid #000;
    box-shadow: 5px 5px 0 #000;
    z-index: 10000;
    font-family: 'Courier New', monospace;
}

.popup-titlebar {
    background: linear-gradient(180deg, #0000ff 0%, #000080 100%);
    color: #fff;
    padding: 5px 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: move;
    user-select: none;
    border-bottom: 2px solid #000;
}

.popup-title {
    font-weight: bold;
    font-size: 14px;
    text-shadow: 1px 1px 0 #000;
}

.popup-close {
    width: 20px;
    height: 20px;
    background: #ff0000;
    color: #fff;
    border: 2px solid #000;
    font-weight: bold;
    font-size: 14px;
    line-height: 16px;
    text-align: center;
    cursor: pointer;
    transition: all 0.1s;
}

.popup-close:hover {
    background: #ff00ff;
    transform: scale(1.1);
}

.popup-close:active {
    background: #00ffff;
    transform: scale(0.95);
}

.popup-content {
    padding: 15px;
    background: #c0c0c0;
    text-align: center;
}

.popup-content img {
    width: 300px;
    height: 300px;
    border: 3px solid #000;
    object-fit: cover;
    filter: brightness(1.1) contrast(1.2) saturate(1.3);
}

.popup-buttons {
    margin-top: 10px;
    display: flex;
    gap: 10px;
    justify-content: center;
}

.popup-btn {
    flex: 1;
    font-size: 12px;
    color: #000 !important;
    font-weight: bold;
    text-transform: uppercase;
    background: #ffff00;
    padding: 10px;
    border: 2px solid #000;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.1s;
    text-align: center;
}

.popup-btn:hover {
    transform: scale(1.05);
    box-shadow: 2px 2px 0 #000;
    color: #000 !important;
}

.popup-btn:active {
    transform: scale(0.95);
    box-shadow: 0 0 0 #000;
    color: #000 !important;
}

/* ===== POP-UP WINDOWS ===== */
.popup-window {
    position: fixed;
    width: 340px;
    background: #c0c0c0;
    border: 3px solid #000;
    box-shadow: 5px 5px 0 #000;
    z-index: 10000;
    font-family: 'Courier New', monospace;
}

.popup-titlebar {
    background: linear-gradient(180deg, #0000ff 0%, #000080 100%);
    color: #fff;
    padding: 5px 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: move;
    user-select: none;
    border-bottom: 2px solid #000;
}

.popup-title {
    font-weight: bold;
    font-size: 14px;
    text-shadow: 1px 1px 0 #000;
}

.popup-close {
    width: 20px;
    height: 20px;
    background: #ff0000;
    color: #fff;
    border: 2px solid #000;
    font-weight: bold;
    font-size: 14px;
    line-height: 16px;
    text-align: center;
    cursor: pointer;
    transition: all 0.1s;
}

.popup-close:hover {
    background: #ff00ff;
    transform: scale(1.1);
}

.popup-close:active {
    background: #00ffff;
    transform: scale(0.95);
}

.popup-content {
    padding: 15px;
    background: #c0c0c0;
    text-align: center;
}

.popup-content img {
    width: 300px;
    height: 300px;
    border: 3px solid #000;
    object-fit: cover;
    filter: brightness(1.1) contrast(1.2) saturate(1.3);
}

.popup-text {
    margin-top: 10px;
    font-size: 12px;
    color: #000;
    font-weight: bold;
    text-transform: uppercase;
    background: #ffff00;
    padding: 8px;
    border: 2px solid #000;
}