:root {
    --color-black: #0f0704;
    --color-charcoal: #1f110a;
    --color-gold: #ffcc00;
    --color-orange: #d98a3c;
    --color-red: #cc2900;
    --color-green: #298a29;
    --color-parchment: #fff3d4;
    --color-paper: #ffe6b3;
    
    --font-logo: 'Rye', serif;
    --font-manifesto: 'Special Elite', monospace;
    --font-body: 'Oswald', sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    background-color: #1a0a05;
    /* Deep rich gradient that complements the warm sunset banner */
    background-image: linear-gradient(to bottom, #2a110a 0%, #0f0502 100%);
    background-attachment: fixed;
    color: var(--color-parchment);
    font-family: var(--font-body);
    overflow-x: hidden;
}

/* Texture Overlay */
.noise-overlay {
    position: fixed;
    top: 0; left: 0; width: 100vw; height: 100vh;
    pointer-events: none;
    z-index: 9999;
    opacity: 0.05;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}

/* TOP NAVBAR */
.top-nav {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(20, 10, 5, 0.95);
    border-bottom: 3px solid var(--color-gold);
    backdrop-filter: blur(10px);
    padding: 0.5rem 2rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.5);
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.brand {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.nav-logo {
    height: 90px;
    filter: drop-shadow(0 4px 6px rgba(0,0,0,0.5));
    transition: transform 0.3s;
}

.nav-logo:hover {
    transform: scale(1.05);
}

.nav-links {
    display: flex;
    gap: 3rem;
}

.nav-links a {
    color: var(--color-parchment);
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: 2px;
    transition: color 0.3s;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.8);
}

.nav-links a:hover {
    color: var(--color-gold);
}

/* HERO BANNER SECTION */
.hero-banner-section {
    width: 100%;
    position: relative;
    z-index: 1;
    box-shadow: 0 15px 40px rgba(0,0,0,0.9);
    margin-bottom: 0;
}

.hero-banner-img {
    width: 100%;
    height: 30vh;
    display: block;
    object-fit: cover;
    border-bottom: 4px solid var(--color-gold);
}

/* MAIN CONTENT */
.main-content {
    max-width: 100%; /* Removed the 1400px limit so there are NO invisible margins */
    margin: 0 auto;
    padding: 0 4rem 2rem 4rem; /* Push content against banner but keep side breathing room */
}

/* DASHBOARD LAYOUT (Player + History Side-by-Side) */
.radio-dashboard {
    display: grid;
    grid-template-columns: 2.5fr 1fr; /* Massive space for the player, smaller space for history */
    gap: 2rem;
    align-items: stretch; /* Forces both columns to be exactly the exact same height */
    margin-top: 0; /* Eliminate any hidden gaps */
    margin-bottom: 5rem;
}

@media (max-width: 1200px) {
    .radio-dashboard {
        grid-template-columns: 1fr; /* On laptops/tablets, drop history below so player is HUGE */
    }
}

/* PLAYER */
.player-wrapper {
    width: 100%;
    display: block;
    height: 100%; /* Stretch to grid cell height */
}

.player-housing {
    background: rgba(0,0,0,0.4);
    padding: 1rem 1.5rem;
    border-radius: 8px;
    border: 2px solid #4a1c0a;
    box-shadow: inset 0 0 20px rgba(0,0,0,0.6);
    width: 100%;
    max-width: 100%;
    height: 100%; /* Stretch to wrapper height */
    display: flex;
    align-items: center; /* Center the grill vertically */
}

.player-grill {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: transparent;
    padding: 0;
    border: none;
    box-shadow: none;
    width: 100%;
}

.left-panel {
    flex: 1;
    text-align: left; /* Shift text all the way to the far left edge */
    padding-left: 1rem; /* Small buffer from the absolute edge */
    min-width: 0; /* Prevent flex container blowout with long text */
}

.right-panel {
    flex: 1; /* Balance out the left panel to perfectly center the logo! */
    text-align: left;
    padding-left: 2rem;
}

.turntable-area {
    margin: 0; 
    flex: 0 0 500px; /* Explicit size to prevent collapse - Increased from 420px */
    height: 500px;
    max-width: 100%;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.logo-base {
    width: 100%;
    height: 100%;
    object-fit: contain;
    position: absolute;
    z-index: 1;
}

.record-sleeve {
    width: 57%; /* Fits perfectly over the black vinyl of the logo */
    height: 57%;
    object-fit: cover;
    position: absolute;
    z-index: 3;
    transition: all 0.3s ease;
    border-radius: 50%;
    box-shadow: 0 0 15px rgba(0,0,0,0.8);
    display: block; /* Always show */
}

.record-hole {
    position: absolute;
    width: 12px;
    height: 12px;
    background: #111;
    border-radius: 50%;
    z-index: 5;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.9);
    display: none;
}

.record-sleeve + .record-hole {
    display: block; /* Always show the hole */
}

.now-playing-info {
    margin-bottom: 0;
    background: transparent;
    padding: 0;
    border: none;
}

.track-title {
    font-family: var(--font-body);
    color: #fff;
    font-size: 1.3rem; /* Slightly smaller to guarantee fit */
    font-weight: 700;
    margin-bottom: 0.5rem;
    text-shadow: none;
    line-height: 1.4;
    white-space: normal; /* Allow text to wrap instead of pushing elements */
    word-break: break-word; /* Ensure extremely long words break */
}

.track-artist {
    font-family: var(--font-body);
    color: var(--color-gold);
    font-size: 1.1rem; /* Slightly smaller to guarantee fit */
    text-transform: uppercase;
    letter-spacing: 1px;
    white-space: normal; /* Allow text to wrap instead of pushing elements */
    word-break: break-word; /* Ensure extremely long words break */
}

.minimal-controls {
    display: flex;
    justify-content: flex-start;
    align-items: center;
}

.simple-btn {
    background: transparent;
    border: 3px solid var(--color-gold);
    color: var(--color-gold);
    width: 65px;
    height: 65px;
    border-radius: 50%;
    font-size: 1.8rem;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.3s;
    box-shadow: 0 5px 15px rgba(0,0,0,0.5);
}

.simple-btn:hover {
    background: var(--color-gold);
    color: #000;
}

.simple-btn.playing {
    border-color: var(--color-red);
    color: var(--color-red);
}

.simple-btn.playing:hover {
    background: var(--color-red);
    color: #000;
}

/* HISTORY SECTION */
.history-wrapper {
    background: rgba(0,0,0,0.4);
    padding: 1rem 1.5rem; /* Significantly reduced padding */
    border-radius: 8px;
    border: 2px solid #4a1c0a;
    box-shadow: inset 0 0 20px rgba(0,0,0,0.6);
    height: 100%; /* Stretch to grid cell height */
    min-width: 0; /* Prevent grid blowout */
}

.history-title {
    font-family: var(--font-logo);
    color: var(--color-gold);
    font-size: 1.5rem; /* Much smaller so it fits on one line */
    text-align: center;
    margin-bottom: 0.8rem; /* Tighter spacing */
    letter-spacing: 2px;
    -webkit-text-stroke: 1px black;
    text-shadow: 2px 2px 0px rgba(0,0,0,1);
    border-bottom: 1px solid rgba(212, 160, 76, 0.2);
    padding-bottom: 0.5rem; /* Tighter spacing */
    white-space: nowrap; /* Force one line */
}

.history-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    min-width: 0; /* Prevent flex blowout */
}

.history-item {
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: transparent;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    padding: 0.6rem 1rem;
    border-left: 3px solid var(--color-gold);
    transition: all 0.3s;
    min-width: 0; /* Prevent flex blowout */
}

.history-item:hover {
    transform: translateX(5px);
    border-left-color: var(--color-orange);
    background: rgba(255,255,255,0.05);
}

.history-info {
    flex: 1;
    width: 100%;
    min-width: 0; /* Prevent flex blowout */
}

.history-title-text {
    font-family: var(--font-body);
    font-weight: 700;
    color: #fff;
    font-size: 1.1rem;
    margin-bottom: 0.2rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.history-artist {
    color: var(--color-gold);
    font-size: 0.9rem;
    text-transform: uppercase;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* MANIFESTO SECTION */
.manifesto-section {
    margin-bottom: 5rem;
}

.manifesto-heading {
    font-family: var(--font-logo);
    color: var(--color-gold);
    font-size: 3.5rem;
    text-align: center;
    margin-bottom: 2rem;
    letter-spacing: 2px;
    -webkit-text-stroke: 1.5px black;
    text-shadow: 3px 3px 0px rgba(0,0,0,1), 0 0 15px rgba(255,204,0,0.5);
}

.manifesto-text {
    font-family: var(--font-manifesto);
    font-size: 1.4rem;
    line-height: 1.8;
    color: var(--color-parchment);
    padding: 3rem;
    margin: 0 auto;
    max-width: 1100px;
    background: rgba(10, 5, 0, 0.5);
    backdrop-filter: blur(4px);
    border: 2px solid rgba(212, 160, 76, 0.4);
    border-radius: 8px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.6);
    text-shadow: 2px 2px 4px rgba(0,0,0,0.9);
}

.manifesto-text p {
    margin-bottom: 1.5rem;
}
.manifesto-text p:last-child {
    margin-bottom: 0;
}

/* CHAT SECTION */
.chat-container {
    max-width: 800px;
    margin: 0 auto;
    background: rgba(20, 10, 5, 0.9);
    border: 3px solid var(--color-gold);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0,0,0,0.7);
}

.chat-messages {
    height: 350px;
    padding: 1.5rem;
    overflow-y: auto;
    font-family: var(--font-manifesto);
    color: var(--color-parchment);
    background: #0f0704;
}

.chat-messages .message {
    margin-bottom: 1rem;
    border-bottom: 1px dashed #333;
    padding-bottom: 0.5rem;
}

.chat-messages .user {
    color: var(--color-gold);
    font-weight: bold;
    text-transform: uppercase;
}

.chat-input-area {
    display: flex;
    border-top: 3px solid var(--color-gold);
}

.chat-input-area input {
    flex: 1;
    padding: 1.5rem;
    background: #1f110a;
    border: none;
    color: #fff;
    font-family: var(--font-manifesto);
    font-size: 1.2rem;
}

.chat-input-area input:focus {
    outline: none;
    background: #2a110a;
}

.send-btn {
    padding: 0 3rem;
    background: var(--color-gold);
    color: #000;
    border: none;
    font-family: var(--font-logo);
    font-size: 1.5rem;
    cursor: pointer;
    transition: background 0.3s;
}

.send-btn:hover {
    background: #fff;
}

footer {
    text-align: center;
    padding: 3rem;
    background: #080504;
    border-top: 2px solid var(--color-orange);
    color: var(--color-gold);
    font-family: var(--font-body);
    letter-spacing: 2px;
}
