    /* ============================================================
       1. BASE STYLES & LAYOUT
       ============================================================ */
    * { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

    body { 
        font-family: 'Montserrat', sans-serif; 
        font-weight: 500; 
        display: flex; 
        flex-direction: column; 
        align-items: center; 
        min-height: 100vh; 
        margin: 0; 
        padding: calc(20px + env(safe-area-inset-top)) 15px calc(20px + env(safe-area-inset-bottom)) 15px; 
        text-align: center; 
        transition: background 0.3s ease, color 0.3s ease;
    }

    .main-wrapper { width: 100%; max-width: 700px; display: flex; flex-direction: column; align-items: center; }
    
/* ============================================================
   LINKS: LIGHT MODE (Base Styles)
   Apply only to links that ARE NOT buttons
   ============================================================ */
a:not(.button):not(.control-icon):not(.status-link) {
    color: #D65930;
    text-decoration: underline;
    font-weight: 600;
    transition: all 0.3s ease;
}

a:not(.button):not(.control-icon):not(.status-link):visited {
    color: #9B4426;
}

a:not(.button):not(.control-icon):not(.status-link):hover, 
a:not(.button):not(.control-icon):not(.status-link):focus {
    color: #1A2B56;
    text-decoration: none;
    transform: translateY(-1px);
}

/* ============================================================
   LINKS: DARK MODE OVERRIDES
   ============================================================ */
body.dark-mode a:not(.button):not(.control-icon):not(.status-link) {
    color: #58A6FF;
}

body.dark-mode a:not(.button):not(.control-icon):not(.status-link):visited {
    color: #A5D6FF;
}

body.dark-mode a:not(.button):not(.control-icon):not(.status-link):hover, 
body.dark-mode a:not(.button):not(.control-icon):not(.status-link):focus {
    color: #33BBFF;
}

/* 1. Shared Base Styles for both Headers */
h1, h2 { 
    font-family: 'Montserrat', sans-serif;
    font-weight: 800; 
    text-transform: uppercase; 
    letter-spacing: 2px; 
    position: relative; /* Anchors the underline */
    display: inline-block; /* Centers underline under text only */
    padding-bottom: 8px;
    margin: 25px 0;
}

/* 2. Specific Font Sizes */
h1 { font-size: 1.5rem; }
h2 { font-size: 1.0rem; }

/* 3. Identical Line Shape for both */
h1::after, h2::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    border-radius: 2px;
}

/* 4. Light Mode Theme Colors */
body.light-mode h1, body.light-mode h2 { 
    color: #1A2B56; 
}
body.light-mode h1::after, body.light-mode h2::after { 
    background: #D65930; 
}

/* 5. Dark Mode Theme Colors */
body.dark-mode h1, body.dark-mode h2 { 
    color: #FFFFFF; 
}
body.dark-mode h1::after, body.dark-mode h2::after { 
    background: #F48120; 
}
    
    .header-controls { display: flex; align-items: center; justify-content: flex-end; gap: 16px; width: 100%; }

    .control-icon {
        display: flex; align-items: center; justify-content: center;
        font-size: 19px; text-decoration: none;
        transition: transform 0.2s ease, color 0.3s ease;
        cursor: pointer; background: none; border: none; padding: 0; margin: 0;
    }

    .control-icon:hover { transform: scale(1.1); opacity: 0.8; }

    .logo-container { width: 100%; max-width: 350px; margin-bottom: 25px; position: relative; }
    @media (max-width: 480px) { .logo-container { max-width: 275px; margin-bottom: 15px; } }
    .logo { width: 100%; height: auto; filter: drop-shadow(0 4px 6px rgba(0,0,0,0.1)); display: none; }

    .text { 
        width: 100%; max-width: 650px; margin: 0 auto 30px auto; 
        line-height: 1.7; font-size: 14px; font-weight: 400;
        letter-spacing: 0.2px; transition: color 0.3s ease;
    }
    
        .small { 
        width: 100%; max-width: 650px; margin: 0 auto 30px auto; 
        line-height: 1.7; font-size: 10px; font-weight: 400;
        letter-spacing: 0.2px; transition: color 0.3s ease;
    }

    /* CARD & INFO STYLES */
.station-info-card { 
    width: 100%; 
    border-radius: 20px; 
    overflow: hidden; /* Keeps the internal background colors from leaking */
    margin-bottom: 25px; 
}
.display-wrapper { 
    width: 100%; 
    display: flex; 
    flex-direction: column; 
    padding: 24px !important; /* Force the padding to return */
    gap: 20px;
    box-sizing: border-box;
    background: #F8FAFC;
}

@media (min-width: 768px) { 
    .display-wrapper { 
        padding: 30px; /* Extra breathing room for desktop */
    } 
}

.metadata-container { 
    width: 100%;
    display: flex; 
    flex-direction: row; 
    align-items: center; /* Centers text vertically relative to the art */
    justify-content: flex-start;
    gap: 16px; 
}

.metadata-display { 
    font-weight: 700; 
    font-size: 14px; /* Adjusted for better mobile fit */
    line-height: 1.3; 
    text-align: left; 
    word-break: normal; /* Changes from 'break-word' to prevent awkward splits */
    overflow-wrap: anywhere; 
    width: 100%;
    padding: 0; /* Removed the 10px padding that was causing early wrapping */
    margin: 0;
}

@media (min-width: 768px) { 
    .metadata-display { 
        text-align: left; 
        padding: 0; 
        font-size: 16px; /* Slightly larger for desktop screens */
        line-height: 1.4;
    }

    .metadata-container {
        gap: 20px; /* Gives more breathing room between art and text on desktop */
    }
}
    
.metadata-text-stack {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    text-align: left;
    /* Add these to fix the wrapping */
    flex: 1; 
    min-width: 0; 
}

    .status-link { font-size: 11px; font-weight: 600; color: #F48120; text-decoration: none; margin-top: 8px; display: block; transition: all 0.2s ease; }
    @media (hover: hover) and (pointer: fine) { .status-link:hover { text-decoration: underline; } }

    .history-container { padding: 15px 25px; text-align: left; }
    .history-label { font-size: 10px; font-weight: 800; color: #A0AEC0; text-transform: uppercase; display: block; margin-bottom: 10px; letter-spacing: 1px; }
    .history-item { font-size: 12px; padding: 10px 0; display: flex; align-items: center; gap: 12px; }
    .history-item:last-child { border-bottom: none; }
    .history-item i { color: #D65930; font-size: 10px; opacity: 0.7; }

    .hidden { display: none !important; }

.live-indicator { 
    display: flex; 
    flex-direction: row; 
    align-items: center; 
    justify-content: flex-start;
    gap: 8px; 
    margin-bottom: 15px; 
}

.live-indicator > span:first-child { 
    display: flex; 
    align-items: center; 
    gap: 5px; 
    line-height: 1; 
    font-size: 11px; 
    font-weight: 800; 
    color: #D65930; 
    text-transform: uppercase; 
    white-space: nowrap; /* Prevents "LIVE" from wrapping */
}

.dot {
  height: 10px;
  width: 10px;
  background-color: #FF0000;
  border-radius: 50%;
  display: inline-block;
  
  /* The timing: 1 second total, 'step-end' ensures no fading */
  animation: rec-blink 1s infinite step-end;
  
  /* Adds the 'glow' effect */
  box-shadow: 0 0 8px #FF0000;
}

@keyframes rec-blink {
  0% { opacity: 1; }
  75% { opacity: 0; }
  100% { opacity: 1; }
}

    .listener-count { padding: 3px 8px; border-radius: 6px; font-size: 9px; font-weight: 700; display: flex; align-items: center; gap: 4px; }
    
#albumArt { 
    width: 85px !important; 
    height: 85px !important; 
    border-radius: 12px; 
    object-fit: cover;
    flex-shrink: 0; /* Keeps it from getting squished */
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

    /* BUTTON BASE STYLES */
.card-controls { 
    display: flex; 
    flex-direction: column; 
    gap: 10px; 
    width: 100%; /* Ensures it stretches to the card edges */
}
    .card-secondary-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; width: 100%; }
@media (min-width: 768px) { 
    .card-controls { 
        flex-direction: row; 
        align-items: center; 
        flex: 1; /* Allows it to grow into the available space */
    } 
    .card-secondary-btns { 
        flex: 1; /* Allows the secondary button group to grow */
        display: flex; 
    } 
}

    .button { 
        display: flex; align-items: center; justify-content: center; gap: 10px; 
        width: 100%; height: 50px; border: none; border-radius: 12px; 
        font-family: 'Montserrat', sans-serif; font-weight: 700; font-size: 13px; color: #FFFFFF; 
        cursor: pointer; transition: all 0.2s ease; text-decoration: none; white-space: nowrap; padding: 0 20px;
    }
    .button:active:not(.button-disabled) { transform: scale(0.96); box-shadow: none; }
    .button.button-disabled { background: #CBD5E0 !important; cursor: not-allowed !important; opacity: 0.7; box-shadow: none !important; }

    /* MODAL & FORM BASE STYLES */
    .modal-overlay { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(26, 43, 86, 0.85); backdrop-filter: blur(4px); z-index: 20000; justify-content: center; align-items: center; padding: 20px; }
    .modal-content { width: 100%; max-width: 460px; padding: 35px 25px; border-radius: 24px; position: relative; text-align: center; max-height: 90vh; overflow-y: auto; animation: modalPop 0.3s cubic-bezier(0.34, 1.56, 0.64, 1); }
    @keyframes modalPop { from { opacity: 0; transform: scale(0.9); } to { opacity: 1; transform: scale(1); } }

    .close-modal { position: absolute; top: 15px; right: 15px; width: 36px; height: 36px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 18px; cursor: pointer; z-index: 9999; transition: all 0.2s ease; outline: none; }

    .modal-title { font-size: 20px; text-transform: uppercase; margin-bottom: 8px; font-weight: 800; letter-spacing: 1px; }
    .modal-subtitle { font-size: 14px; color: #718096; margin-bottom: 25px; line-height: 1.5; display: block; font-weight: 400; }
    .modal-description { font-size: 11px; color: #718096; font-style: italic; margin-top: -15px; margin-bottom: 20px; line-height: 1.4; font-weight: 400; }

    /* FORM INPUTS */
    .modal-content input, .modal-content textarea {
        width: 100%; padding: 14px; border-radius: 12px; font-size: 12px; 
        font-family: 'Montserrat', sans-serif; font-weight: 600; transition: all 0.2s ease;
    }

    .share-stack { display: flex; flex-direction: column; gap: 12px; width: 100%; }
    .share-stack .button:last-child { margin-top: 15px; position: relative; }
    .share-stack .button:last-child::before { content: ""; position: absolute; top: -12px; left: 10%; right: 10%; height: 1px; background: rgba(0, 0, 0, 0.05); }
    .share-modal-btn { height: 60px !important; box-shadow: none !important; font-size: 13px !important; }

    #requestFormWrapper, #contactFormWrapper { transition: opacity 0.2s ease-in-out, transform 0.2s ease-in-out; }
footer { 
    margin-top: auto; /* Pushes footer to the bottom of the wrapper */
    padding: 30px 20px 10px; /* Added more top padding for breathing room */
    font-size: 11px; 
    color: #A0AEC0; 
    width: 100%;
}

    /* ============================================================
       2. LIGHT THEME (Default)
       ============================================================ */
    body.light-mode { background: linear-gradient(180deg, #F8F9FA 0%, #E9ECEF 100%); color: #1A2B56; }
    
    h1, .modal-title { color: #1A2B56; }
    h1::after { background: #D65930; }

    .control-icon { color: #1A2B56; }
    .logo-light { display: block; }
    .text { color: #4A5568; }

    .station-info-card { background: #FFFFFF; border: 1px solid #E2E8F0; box-shadow: 0 10px 25px -5px rgba(0,0,0,0.08); }
    .display-wrapper { background: #F8FAFC; }
    .metadata-display { color: #1A2B56; }
    .history-container { background: #EDF2F7; border-top: 1px solid #E2E8F0; }
    .history-item { color: #4A5568; border-bottom: 1px solid rgba(0,0,0,0.03); }
    .listener-count { background: #1A2B56; color: white; }

    .button, #submitBtn, .share-modal-btn, .copy-btn { 
        background: linear-gradient(135deg, #F48120 0%, #D65930 100%); 
        box-shadow: 0 4px 12px rgba(214, 89, 48, 0.15);
    }
    
    @media (hover: hover) and (pointer: fine) {
        .button:hover:not(.button-disabled):not(.is-playing), 
        #submitBtn:hover:not(.button-disabled), 
        .share-modal-btn:hover:not(.button-disabled), 
        .copy-btn:hover:not(.is-copied) { 
            background: linear-gradient(135deg, #2D5B9A 0%, #1A2B56 100%); 
            transform: translateY(-2px);
            box-shadow: 0 6px 15px rgba(26, 43, 86, 0.2);
        }
    }

    .button:active:not(.button-disabled) { background: #1A2B56 !important; }
    .button.is-playing { background: linear-gradient(135deg, #2D5B9A 0%, #1A2B56 100%) !important; }

    .modal-content { background: white; box-shadow: 0 25px 50px -12px rgba(0,0,0,0.5); }
    .close-modal { background-color: #f1f5f9; border: 1px solid #e2e8f0; color: #64748b; }
    .close-modal:hover { background-color: #e2e8f0; color: #1e293b; transform: scale(1.05); }
    .modal-content input, .modal-content textarea { background: #F8FAFC; border: 1px solid #E2E8F0; color: #4A5568; }

    /* ============================================================
       3. DARK THEME OVERRIDES
       ============================================================ */
    body.dark-mode { background: linear-gradient(180deg, #0F172A 0%, #1A2B56 100%); color: #F8FAFC; }
    
    body.dark-mode h1, body.dark-mode .modal-title { color: #FFFFFF; }
    body.dark-mode .modal-subtitle {color:#E0E0E0; }
    body.dark-mode .modal-description {color: #BDBDBD; }
    body.dark-mode h1 { text-shadow: 0 2px 10px rgba(0,0,0,0.3); }
    body.dark-mode h1::after { background: #F48120; }

    body.dark-mode .control-icon { color: #F48120; }
    body.dark-mode .logo-light { display: none; }
    body.dark-mode .logo-dark { display: block; }
    body.dark-mode .text { color: #CBD5E0; }

    body.dark-mode .station-info-card, 
    body.dark-mode .display-wrapper { background: #1E293B; border-color: #334155; box-shadow: 0 10px 25px -5px rgba(0,0,0,0.3); }
    
    body.dark-mode .metadata-display { color: #FFFFFF; }
    body.dark-mode .history-container { background: #0F172A; border-top-color: #334155; }
    body.dark-mode .history-item { color: #CBD5E0; border-bottom-color: rgba(255,255,255,0.05); }
    body.dark-mode .listener-count { background: #F48120; color: #1A2B56; }

    body.dark-mode .button, body.dark-mode #submitBtn, body.dark-mode .share-modal-btn, body.dark-mode .copy-btn { 
        background: linear-gradient(135deg, #2D5B9A 0%, #1A2B56 100%); 
        box-shadow: 0 4px 15px rgba(15, 23, 42, 0.4); 
    }
    body.dark-mode .button.is-playing { background: linear-gradient(135deg, #F48120 0%, #D65930 100%) !important; }

    @media (hover: hover) and (pointer: fine) {
        body.dark-mode .button:hover:not(.button-disabled):not(.is-playing), 
        body.dark-mode #submitBtn:hover:not(.button-disabled), 
        body.dark-mode .share-modal-btn:hover:not(.button-disabled), 
        body.dark-mode .copy-btn:hover:not(.is-copied) { 
            background: linear-gradient(135deg, #F48120 0%, #D65930 100%) !important; 
            box-shadow: 0 6px 20px rgba(214, 89, 48, 0.3);
        }
    }

    body.dark-mode .modal-content { background: #1E293B; color: #FFFFFF; }
    body.dark-mode .close-modal { background-color: #334155; border: 1px solid #475569; color: #f8fafc; }
    body.dark-mode .close-modal:hover { background-color: #475569; }
    body.dark-mode .modal-content input, body.dark-mode .modal-content textarea { background: #0F172A; border-color: #334155; color: white; }
    
/* Bot Block Styling */
.bot-block {
    text-align: left; 
    background: transparent;
    display: none;
}

body.dark-mode .bot-block { 
    background: #1E293B; 
    border-top-color: #334155;
}

.dj-badge { 
    display: inline-flex; 
    align-items: center; 
    background: #D65930; 
    color: white; 
    padding: 4px 12px; 
    border-radius: 20px; 
    font-size: 11px; 
    font-weight: 700; 
    margin: 5px 8px 5px 0; 
}

/* Base badge structure */
.dj-badge { 
    display: inline-flex; 
    align-items: center; 
    padding: 6px 14px; 
    border-radius: 12px; 
    font-size: 11px; 
    font-weight: 700; 
    margin: 5px 8px 5px 0;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* --- STATE 1: OFF-AIR (Match button-disabled) --- */
body.light-mode .badge-offair {
    background: #CBD5E0; /* Exact match for your light-mode disabled button */
    color: #718096;      /* Muted text color */
}

body.dark-mode .badge-offair {
    background: #334155; /* Match for your dark-mode secondary UI */
    color: #94A3B8;
}

/* --- STATE 2: LIVE (Match active buttons) --- */
body.light-mode .badge-live {
    background: linear-gradient(135deg, #F48120 0%, #D65930 100%);
    color: #FFFFFF;
    box-shadow: 0 4px 12px rgba(214, 89, 48, 0.15);
}

body.dark-mode .badge-live {
    background: linear-gradient(135deg, #2D5B9A 0%, #1A2B56 100%);
    color: #FFFFFF;
    box-shadow: 0 4px 15px rgba(15, 23, 42, 0.4);
}

.ticker-wrapper {
    width: 100%;
    margin-top: 5px; /* Spacing below the main card */
    padding: 0 15px;
    text-align: left;
}

.ticker-content {
    display: flex;
    flex-direction: column; /* This stacks them vertically */
    gap: 10px; /* Space between each message */
}

.ticker-message {
    background: rgba(26, 43, 86, 0.05); /* Subtle background for each row */
    padding: 12px 15px;
    border-left: 4px solid #1A2B56; /* Accent line */
    border-radius: 4px;
    font-size: 0.95rem;
    line-height: 1.4;
}

/* Dark mode adjustment */
.dark-mode .ticker-message {
    background: rgba(255, 255, 255, 0.05);
    border-left-color: #F48120;
}

.ticker-time {
    font-weight: 800;
    margin-right: 8px;
    color: #1A2B56;
    text-transform: uppercase;
    font-size: 0.8rem;
}

.dark-mode .ticker-time {
    color: #ffffff;
}