/* --- CSS Variables for Easy Theming --- */
:root {
    --bg-dark: #0D0D0D;
    --text-main: #EDEDED;
    --text-muted: #888888;
    /*--accent-cyan: #00E5FF; */
    --accent-cyan: #F0B501;
    --accent-hover: #00B8CC;
    --card-bg: #1A1A1A;
    --font-sans: 'Inter', sans-serif;
    --font-mono: 'Roboto Mono', monospace;
}

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

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: var(--font-sans);
    line-height: 1.6;
    /* Leaves room for the fixed bottom player */
    padding-bottom: 80px; 
}

/* --- Header & Navigation --- */
.site-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2rem 5%;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.logo {
    font-size: 1.5rem;
    font-weight: 900;
    letter-spacing: -1px;
    text-transform: uppercase;
    text-decoration: none; /* Prevents the link underline */
    color: var(--text-main); /* Keeps it white instead of standard link blue */
}

.main-nav ul {
    list-style: none;
    display: flex;
    gap: 2rem;
}

.main-nav a {
    color: var(--text-main);
    text-decoration: none;
    font-weight: 700;
    transition: color 0.3s ease;
}

.main-nav a:hover {
    color: var(--accent-cyan);
}

/* --- Main Content & Hero --- */
.content-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 4rem 5%;
}

.hero {
    text-align: center;
    margin-bottom: 5rem;
}

.headline {
    font-size: clamp(3rem, 8vw, 6rem);
    font-weight: 900;
    letter-spacing: -2px;
    margin-bottom: 1rem;
}

.subhead {
    font-size: 1.2rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
}

.play-btn {
    background-color: var(--accent-cyan);
    color: var(--bg-dark);
    border: none;
    padding: 1rem 2.5rem;
    font-size: 1.1rem;
    font-weight: 700;
    border-radius: 50px;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.play-btn:hover {
    background-color: var(--accent-hover);
    transform: scale(1.05);
}

/* --- Features Grid --- */
.promise-grid {
    display: grid;
    /* Forces exactly 2 equal columns on desktop */
    grid-template-columns: repeat(2, 1fr); 
    gap: 2rem;
}

/* Tells the browser to stack them into 1 column on smaller screens (phones/tablets) */
@media (max-width: 768px) {
    .promise-grid {
        grid-template-columns: 1fr; 
    }
}
.promise-card {
    background-color: var(--card-bg);
    padding: 2rem;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.promise-card h3 {
    color: var(--accent-cyan);
    margin-bottom: 0.5rem;
}

/* --- Persistent Bottom Player --- */
.audio-player-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 80px;
    background-color: rgba(13, 13, 13, 0.95);
    backdrop-filter: blur(10px);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 5%;
    z-index: 1000;
}

.now-playing {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.status {
    background-color: #FF2A2A;
    color: white;
    font-size: 0.75rem;
    font-weight: 900;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    text-transform: uppercase;
    animation: pulse 2s infinite;
}

.track-info {
    font-family: var(--font-mono);
    font-size: 0.9rem;
    color: var(--accent-cyan);
}

.control-btn {
    background: none;
    border: 1px solid var(--accent-cyan);
    color: var(--accent-cyan);
    padding: 0.5rem 1.5rem;
    border-radius: 20px;
    cursor: pointer;
    font-weight: 700;
    transition: all 0.3s ease;
}

.control-btn:hover {
    background: var(--accent-cyan);
    color: var(--bg-dark);
}

/* Simple breathing animation for the 'Live' badge */
@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.6; }
    100% { opacity: 1; }
}

/* --- Modern Form Styling --- */
.modern-form label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.modern-form input,
.modern-form textarea {
    width: 100%;
    padding: 0.8rem;
    margin-bottom: 1.5rem;
    background-color: var(--bg-dark);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-main);
    border-radius: 6px;
    font-family: var(--font-sans);
}

.modern-form input:focus,
.modern-form textarea:focus {
    outline: none;
    border-color: var(--accent-cyan);
}


/* --- Audio Visualizer --- */
.visualizer {
    display: flex;
    align-items: flex-end; /* Keeps the bars anchored to the bottom */
    gap: 3px;
    height: 18px;
    margin: 0 15px; /* Spacing between the Live badge and the track text */
    opacity: 0.3; /* Dimmed when paused */
    transition: opacity 0.3s ease;
}

/* Lights up when the JS adds the 'active' class */
.visualizer.active {
    opacity: 1; 
}

.visualizer .bar {
    width: 4px;
    background-color: var(--accent-cyan);
    border-radius: 2px;
    height: 4px; /* The flat resting state */
    transition: height 0.2s ease;
}

/* The bouncing keyframe animation */
@keyframes sound-wave {
    0% { height: 4px; }
    50% { height: 18px; }
    100% { height: 4px; }
}

/* Apply the animation ONLY when playing */
.visualizer.active .bar {
    animation: sound-wave 1s infinite ease-in-out;
}

/* Stagger the timing so they don't all bounce at the exact same time */
.visualizer.active .bar:nth-child(1) { animation-delay: 0.0s; animation-duration: 0.8s; }
.visualizer.active .bar:nth-child(2) { animation-delay: 0.2s; animation-duration: 0.9s; }
.visualizer.active .bar:nth-child(3) { animation-delay: 0.4s; animation-duration: 0.7s; }
.visualizer.active .bar:nth-child(4) { animation-delay: 0.1s; animation-duration: 0.85s; }

/* --- Mobile Header Responsiveness --- */
@media (max-width: 768px) {
    .site-header {
        flex-direction: column; /* Stacks the logo and the nav menu vertically */
        align-items: center;    /* Centers everything perfectly */
        padding: 1.5rem 1rem;   /* Gives it some breathing room */
        gap: 1rem;              /* Space between logo and links */
    }

    .main-nav ul {
        justify-content: center;
        flex-wrap: wrap;        /* Allows links to drop to a second line if needed */
        gap: 0.8rem 1.5rem;     /* Vertical and horizontal spacing between links */
    }
}

/* --- Player Bar Text Truncation --- */

/* 1. We have to tell the parent container it is allowed to shrink */
/* --- Premium Ping-Pong Scrolling for Long Titles --- */
/* --- Premium Ping-Pong Scrolling for Long Titles --- */

/* 1. The main container */
.now-playing {
    display: flex;
    align-items: center;
    flex: 1;
    min-width: 0;
    margin-right: 15px; 
}

/* 2. Protect the badge and visualizer from getting squished! */
.status, .visualizer {
    flex-shrink: 0; 
}

/* 3. The invisible window just for the text */
.track-wrapper {
    flex: 1;
    min-width: 0;
    overflow: hidden; /* The text will disappear when it hits the edge of this box */
}

.track-info {
    display: inline-block; 
    white-space: nowrap;
    color: #FFB300;
}

/* (Leave your .track-info.scrolling and @keyframes rules exactly as they are!) */

/* This class gets added by JS ONLY if the text is too long */
.track-info.scrolling {
    /* We will calculate --scroll-amount dynamically in the JS */
    animation: ping-pong-scroll 8s ease-in-out infinite alternate;
}

/* The animation pauses at 0% (start) and 100% (end) so it's easy to read */
@keyframes ping-pong-scroll {
    0%, 15% { transform: translateX(0); }
    85%, 100% { transform: translateX(var(--scroll-amount)); }
}
