/* --- HyperBeat Radio Global Styles --- */
:root {
    --primary-color: #00ffcc;
    --secondary-color: #ffcc00;
    --background-color: #0d0d0d;
    --text-color: #ffffff;
    --surface-color: #1a1a1a;
    --border-color: #444;
}

body.light-mode {
    --primary-color: #008066;
    --secondary-color: #b38f00;
    --background-color: #f0f0f0;
    --text-color: #1a1a1a;
    --surface-color: #ffffff;
    --border-color: #ccc;
}

/* --- Global Transitions --- */
a, button {
    transition: color 0.2s ease-in-out, background-color 0.2s ease-in-out, transform 0.2s ease-in-out;
}

/* --- Global Layout --- */
body {
    margin: 0;
    font-family: 'Roboto', sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    text-align: center;
}

.skip-link {
    position: absolute; top: -1000px; left: -1000px; height: 1px; width: 1px; overflow: hidden;
}
.skip-link:focus {
    left: 10px; top: 10px; width: auto; height: auto; padding: 10px 15px;
    background-color: var(--primary-color); color: var(--background-color); z-index: 9999;
    border-radius: 5px; font-weight: 500; text-decoration: none;
}

main {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.6s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* --- Header & Navigation --- */
.site-header {
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}
.site-header .logo { width: 80px; margin: 0; }
.site-header h1 { font-size: 2.5em; color: var(--primary-color); margin: 0 20px; }

.main-nav ul { margin: 0; padding: 0; list-style: none; }
.main-nav li { display: inline-block; margin: 0 15px; }
.main-nav a {
    color: var(--text-color); text-decoration: none; font-size: 1.2em;
    padding: 5px 10px; border-radius: 5px; transition: background-color 0.3s;
}
.main-nav a:hover { background-color: rgba(255, 255, 255, 0.1); }
.main-nav a[aria-current="page"] {
    color: var(--primary-color); border-bottom: 2px solid var(--primary-color); font-weight: 500;
}

#theme-toggle {
    background: none; border: 1px solid var(--text-color); color: var(--text-color);
    padding: 8px 12px; cursor: pointer; border-radius: 20px; font-size: 0.9em; margin-right: 20px;
}
#theme-toggle:hover { background-color: var(--text-color); color: var(--background-color); }

/* --- Sections --- */
h2 { font-size: 3em; color: var(--secondary-color); }
p { font-size: 1.2em; max-width: 600px; line-height: 1.6; }

.cta-button {
    display: inline-block; margin-top: 20px; padding: 15px 30px;
    background-color: var(--primary-color); color: var(--background-color);
    font-size: 1.5em; font-weight: 500; text-decoration: none;
    border-radius: 50px; border: none; cursor: pointer;
}
.cta-button:hover { transform: scale(1.05); }

/* --- About & Legal --- */
.about-section, .legal-content { max-width: 800px; text-align: left; }
.about-section strong, .legal-content strong { color: var(--primary-color); }
.legal-content h3 { color: var(--primary-color); margin-top: 30px; }

/* --- Contact Form --- */
.contact-section { max-width: 600px; width: 100%; }
.contact-form { display: flex; flex-direction: column; text-align: left; }
.contact-form label { margin-bottom: 8px; font-weight: 500; }
.contact-form input, .contact-form select, .contact-form textarea {
    background-color: var(--surface-color); border: 1px solid var(--border-color);
    border-radius: 5px; padding: 12px; font-size: 1em; color: var(--text-color); margin-bottom: 20px;
}
.contact-form button {
    padding: 15px 30px; background-color: var(--primary-color); color: var(--background-color);
    font-size: 1.2em; font-weight: 500; border: none; cursor: pointer; border-radius: 50px;
}
.contact-form button:disabled { background-color: #888; cursor: not-allowed; }

/* --- Footer --- */
.site-footer {
    background-color: #000; color: #ccc; padding: 40px 20px 10px 20px;
    text-align: left; margin-top: 40px; border-top: 2px solid var(--primary-color);
}
.footer-main {
    display: flex; justify-content: space-around; flex-wrap: wrap; gap: 30px;
    max-width: 1200px; margin: 0 auto 30px auto;
}
.footer-column { flex: 1; min-width: 200px; }
.footer-column h3, .footer-column h4 {
    color: var(--text-color); margin-top: 0; text-transform: uppercase; font-size: 1.1em;
}
.footer-column.footer-brand h3 { font-size: 1.5em; margin: 10px 0 5px 0; color: var(--primary-color); }
.footer-logo { width: 60px; }
.footer-column ul { list-style: none; padding: 0; margin: 0; }
.footer-column ul li { margin-bottom: 10px; }
.footer-column ul a { color: #ccc; text-decoration: none; transition: color 0.2s; }
.footer-column ul a:hover { color: var(--primary-color); }

.footer-bottom-bar {
    border-top: 1px solid #333; padding-top: 15px; display: flex;
    justify-content: space-between; align-items: center; font-size: 0.9em;
    max-width: 1200px; margin: 0 auto; flex-wrap: wrap;
}
.footer-bottom-bar ul li { display: inline-block; margin-left: 20px; }
.footer-bottom-bar ul a { color: #ccc; text-decoration: none; }
.footer-bottom-bar ul a:hover { text-decoration: underline; }

/* --- Back to Top --- */
.back-to-top {
    position: fixed; bottom: 20px; right: 20px;
    background-color: var(--primary-color); color: var(--background-color);
    width: 50px; height: 50px; border-radius: 50%; display: flex;
    align-items: center; justify-content: center; font-size: 24px;
    text-decoration: none; opacity: 0; visibility: hidden; transition: opacity 0.3s; z-index: 1000;
}
.back-to-top.visible { opacity: 1; visibility: visible; }

/* --- Responsive --- */
@media (max-width: 768px) {
    .site-header { flex-direction: column; }
    .site-header h1 { margin: 15px 0; }
}

/* --- PLAYER STYLES (Visuals) --- */

.player-box {
    background: #111;
    border: 1px solid #333;
    padding: 30px;
    border-radius: 8px;
    max-width: 400px;
    margin: 20px auto;
    text-align: center;
}

.meta-info {
    margin-bottom: 20px;
    min-height: 60px;
}

#song-title {
    display: block;
    font-size: 1.5em;
    font-weight: bold;
    color: var(--primary-color);
    margin-bottom: 5px;
}

#song-artist {
    display: block;
    font-size: 1.1em;
    color: #ccc;
}

/* Custom Control Buttons */
.controls { 
    display: flex; 
    flex-direction: column; 
    gap: 15px; 
    align-items: center; 
}

button#play-btn {
    background: var(--primary-color);
    color: #000;
    font-size: 1.2em;
    padding: 10px 40px;
    border: none;
    border-radius: 30px;
    cursor: pointer;
    font-weight: bold;
    width: 100%;
}
button#play-btn.playing {
    background: #ff4444;
    color: white;
}

.vol-wrap { 
    width: 100%; 
    display: flex; 
    align-items: center; 
    gap: 10px; 
    color: #888; 
}
input[type=range] { 
    flex-grow: 1; 
    accent-color: var(--primary-color); 
}

/* Pop-out Button */
.popout-container {
    margin-top: 15px;
}

.popout-link {
    display: inline-block;
    color: #888;
    font-size: 0.9em;
    text-decoration: underline;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}
.popout-link:hover { color: var(--primary-color); }

/* History List */
.history-box {
    margin-top: 25px;
    border-top: 1px solid #333;
    padding-top: 10px;
    text-align: left;
}
.history-box h3 {
    font-size: 0.9em;
    color: #666;
    text-transform: uppercase;
    margin-bottom: 10px;
    letter-spacing: 1px;
}
.history-box ul {
    list-style: none;
    padding: 0;
    margin: 0;
    color: #888;
    font-size: 0.85em;
}
.history-box li {
    padding: 5px 0;
    border-bottom: 1px solid #222;
}

/* Adjustments for Pop-out Window specifically */
body.popout-mode {
    background: #111;
    padding: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
}

/* --- LAUNCH FIXES (Hiding Logic) --- */

/* 1. Hide the Native Player completely */
/* Keeps audio functional but removes the broken timeline UI */
audio {
    display: none; 
}

/* 2. Hide Metadata & History by default */
/* Prevents "Loading..." text flash. JS will reveal them. */
.now-playing, .history-box {
    display: none;
}

/* 3. Animation for when data loads */
.fade-in {
    animation: fadeIn 0.5s ease-in forwards;
}
/* --- Distribution & Listen Links Section --- */
.ways-to-listen { 
    margin-top: 40px; 
    width: 100%; 
    max-width: 500px; /* Aligns with player box width */
    padding-top: 30px; 
    border-top: 1px solid var(--border-color); 
}
.ways-to-listen h3 { 
    font-size: 1.5em; 
    color: var(--secondary-color); 
    margin: 0 0 10px 0; 
}
.ways-to-listen p { 
    font-size: 1em; 
    color: #ccc; 
    margin-top: 0; 
}
.listen-links { 
    display: flex; 
    justify-content: center; 
    gap: 20px; 
    margin-top: 20px; 
}
.listen-link { 
    display: inline-block; 
    padding: 12px 25px; 
    border: 2px solid var(--primary-color); 
    border-radius: 50px; 
    color: var(--primary-color); 
    text-decoration: none; 
    font-size: 1.1em; 
}
.listen-link:hover { 
    background-color: var(--primary-color); 
    color: var(--background-color); 
}
.alexa-instruction { 
    margin-top: 20px; 
    color: #ccc; 
    font-size: 1.1em; 
}
/* --- V2 PLAYER UPDATES --- */

/* Ensure the volume wrap can be hidden cleanly via JS */
.vol-wrap {
    transition: opacity 0.3s;
}

/* Loading State Style for Play Button */
button#play-btn:disabled {
    background-color: #555;
    color: #888;
    cursor: wait;
}