/* =========================================
   1. VARIABLES & THEME SETUP
   ========================================= */
:root {
    --bg-body: #d1ced0; 
    --bg-container: #ffffff;
    --bg-column: #ffffff;
    --bg-search: #ffffff;
    --bg-footer-button: #f5f5f5;
    --bg-footer-hover: #e0e0e0;
    --text-primary: #333;
    --text-primary-hover: #000;
    --text-secondary: #555;
    --text-placeholder: #999;
    --text-footer: #333;
    --border-color: #ddd;
    --border-light: #eee;
    --search-focus-border: #E67E22; 
    --search-icon-color: #E67E22;
    --shadow-color: rgba(0,0,0,0.1);
    --shadow-light: rgba(0,0,0,0.05);
    color-scheme: light dark;
}

body.dark-theme {
    --bg-body: #121212;
    background-image: none;
    --bg-container: #1e1e1e;
    --bg-column: #2c2c2c;
    --bg-search: #2c2c2c;
    --bg-footer-button: #333;
    --bg-footer-hover: #444;
    --text-primary: #e0e0e0;
    --text-primary-hover: #ffffff;
    --text-secondary: #aaaaaa;
    --text-placeholder: #777;
    --text-footer: #e0e0e0;
    --border-color: #444;
    --border-light: #3a3a3a;
    --shadow-color: rgba(0,0,0,0.4);
    --shadow-light: rgba(0,0,0,0.2);
}

body {
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    line-height: 1.6;
    background-color: var(--bg-body);
    color: var(--text-primary);
    padding: 20px;
    transition: padding 0.2s ease-in-out, background-color 0.3s, color 0.3s;
}

.main-content-wrapper {
    max-width: 1400px;
    margin: auto;
}

.visually-hidden {
    position: absolute;
    width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0, 0, 0, 0); border: 0;
}

.full-width-panel, 
.column-header-actions, 
.category-pill-track, 
.welcome-disclosure-row {
    column-span: all;
    -webkit-column-span: all;
    grid-column: 1 / -1; 
}

/* =========================================
   2. HEADER & NAVIGATION
   ========================================= */
.install-app-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background-color: #222222; /* Change this hex code to your preferred color */
    color: #ffffff;            /* Text and icon color */
    border: none;
    border-radius: 20px;
    font-weight: bold;
    font-size: 14px;
    cursor: pointer;
    white-space: nowrap;
    text-transform: uppercase;
}

.install-app-btn svg {
    width: 18px;
    height: 18px;
}

.install-app-btn:hover {
    background-color: #444444; /* Hover state color */
}

@media (max-width: 768px) {
    .install-app-btn .btn-text {
        display: none;
    }
    .install-app-btn {
        padding: 8px;
        border-radius: 50%;
    }
}

.casting-tip {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background-color: var(--bg-container);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    font-size: 0.85em;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px var(--shadow-light);
}

.casting-tip svg {
    fill: currentColor;
    flex-shrink: 0;
}

.casting-tip:hover {
    background-color: var(--bg-body);
    color: var(--search-focus-border);
    border-color: var(--search-focus-border);
    box-shadow: 0 2px 5px var(--shadow-color);
}


.header-controls {
    display: flex;
    align-items: center;
    margin-bottom: 0px;
    gap: 20px;
}

.site-logo { 
    height: 80px;      
    width: auto;       
    display: block; 
    flex-shrink: 0;
}

.site-header { 
    display: flex; 
    align-items: center; 
    width: auto;       
    min-width: 200px;  
    flex-shrink: 0; 
}

.site-title {
    font-size: 2.2em;
    font-weight: 800;
    color: var(--text-primary);
    margin: 0;
}

.search-wrapper {
    flex-grow: 1;
    max-width: 500px; 
    margin: 0;
}
.search-form {
    position: relative;
    display: flex;
    width: 100%;
}
.search-form input[type="text"] {
    width: 100%;
    padding: 15px 50px 15px 25px;
    font-size: 1.1em;
    color: var(--text-primary);
    background-color: var(--bg-search);
    border: 1px solid var(--border-color);
    border-radius: 50px; 
    box-shadow: 0 4px 10px var(--shadow-light);
    box-sizing: border-box; 
    outline: none;
    transition: border-color 0.2s, background-color 0.3s, color 0.3s;
}
.search-form input[type="text"]::placeholder { color: var(--text-placeholder); }
.search-form input[type="text"]:focus { border-color: var(--search-focus-border); }
.search-form button[type="submit"] {
    position: absolute;
    right: 10px; top: 50%;
    transform: translateY(-50%);
    background: none; border: none;
    cursor: pointer; padding: 10px;
    display: flex; align-items: center; justify-content: center;
}
.search-form button svg {
    width: 24px; height: 24px;
    stroke: var(--search-icon-color);
    stroke-width: 3; fill: none;
}

.header-icons-right {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-left: auto;
    flex-shrink: 0;
}

.theme-switcher-wrapper { flex-shrink: 0; }
.theme-switcher { position: relative; display: inline-block; width: 60px; height: 34px; }
.theme-switcher input { opacity: 0; width: 0; height: 0; }
.slider {
    position: absolute; cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: #ccc; transition: .4s; border-radius: 34px;
}
.slider:before {
    position: absolute; content: "☀️";
    height: 26px; width: 26px;
    left: 4px; bottom: 4px;
    background-color: white; transition: .4s;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 16px;
}
input:checked + .slider { background-color: #2196F3; }
input:checked + .slider:before { transform: translateX(26px); content: "🌙"; }

.header-icon-wrapper { display: block; }
.header-icon-btn {
    display: flex; align-items: center; justify-content: center;
    width: 40px; height: 40px;
    background-color: var(--bg-search);
    border-radius: 50%;
    border: 1px solid var(--border-color);
    box-shadow: 0 2px 4px var(--shadow-light);
    transition: background-color 0.3s, border-color 0.3s;
    text-decoration: none;
}
.header-icon-btn:hover { background-color: var(--bg-body); }
.header-icon-btn svg {
    width: 22px; height: 22px;
    fill: var(--text-secondary); transition: fill 0.3s;
}
.header-icon-btn:hover svg { fill: var(--search-icon-color); }
.header-icon-btn span {
    font-size: 22px; font-weight: 900;
    color: var(--text-secondary); line-height: 1;
    transition: color 0.3s;
}
.header-icon-btn:hover span { color: var(--search-icon-color); }

#header-contact-link.submit-oval-btn {
    position: relative;
    width: auto; height: auto;
    min-height: 40px;
    border-radius: 50px;
    padding: 4px 12px;
    display: flex; align-items: center; justify-content: center;
    background-color: var(--bg-search); 
    border: 2px solid var(--search-icon-color);
    text-decoration: none;
}
#header-contact-link.submit-oval-btn:hover { animation-play-state: paused; }
#header-contact-link.submit-oval-btn .btn-text {
    font-weight: 800; font-size: 1em;
    text-transform: uppercase;
    color: var(--text-secondary);
}

.btn-icon-mobile { display: none; }

@keyframes pulse-flash {
    0% { box-shadow: 0 0 0 0 rgba(255, 165, 0, 0.7); }
    50% { box-shadow: 0 0 0 8px rgba(255, 165, 0, 0); }
    100% { box-shadow: 0 0 0 0 rgba(255, 165, 0, 0.7); }
}

/* --- Directory Switcher (Apps/Guides) --- */
.directory-toolbar {
    grid-column: 1 / -1;
    display: flex; align-items: center; justify-content: flex-start;
    padding: 10px 0 0 0; margin-bottom: -5px; width: 100%;
}
.directory-switcher-wrapper { margin-right: 20px; flex-shrink: 0; }
.gtv-toggle { 
    position: relative; 
    display: inline-block; 
    width: 230px; 
    height: 34px; 
    user-select: none; 
}
.gtv-toggle input { opacity: 0; width: 0; height: 0; }
.gtv-slider {
    position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0;
    background-color: #607D8B; transition: .4s;
    border-radius: 34px; border: 2px solid rgba(0,0,0,0.1);
    display: flex; align-items: center; justify-content: space-between;
    padding: 0 15px; box-sizing: border-box;
}
.gtv-slider:before {
    position: absolute; content: "";
    height: 26px; width: 26px; left: 4px; bottom: 2px;
    background-color: white; transition: .4s; border-radius: 50%;
    z-index: 5; box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}
.gtv-toggle input:checked + .gtv-slider { background-color: #3DDC84; }
.gtv-toggle input:checked + .gtv-slider:before { transform: translateX(192px); }

.toggle-text { 
    font-size: 0.85em; font-weight: 800; color: rgba(255,255,255,0.6); 
    z-index: 1; transition: color 0.3s;
    width: 90px; text-align: center;
}
.general-text { margin-left: 20px; }
.gtv-text { margin-right: 20px; }

.gtv-toggle input:not(:checked) + .gtv-slider .general-text { color: #fff; }
.gtv-toggle input:checked + .gtv-slider .gtv-text { color: #000; }

body.general-mode .category-row[data-directory-type="gtv"] { display: none !important; }
body.gtv-mode .category-row[data-directory-type="general"] { display: none !important; }

/* =========================================
   3. MASONRY DIRECTORY GRID (Pinterest Style)
   ========================================= */
.directory-container {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: 5px; 
    column-gap: 20px;
    align-items: start;
    padding: 20px 0;
    width: 100%;
}

.category-row {
    width: 100%;
    background-color: transparent;
    border: none;
    box-sizing: border-box;
    margin-bottom: 0; 
}

.row-header {
    height: auto; 
    padding: 0 0 10px 0;
    margin: 0;
    border-bottom: none;
    border-left: none !important;
    background-color: transparent;
    display: flex;
    align-items: flex-start;
    box-sizing: border-box;
}

.row-header h3 {
    font-size: 1.25em;
    font-weight: 800;
    margin: 0;
    color: var(--text-primary);
    white-space: normal;
    line-height: 1.3;
}

.row-header h3 a { color: inherit; text-decoration: none; }
.row-header h3 a:hover { text-decoration: underline; }
.row-header p { display: none; }

/* In style.css */
.card-carousel {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 8px; 
    
    /* ADD THESE LINES */
    max-height: 450px; /* Adjust height based on your card size (approx 6 * card height) */
    overflow-y: auto;
    /* ----------------- */
}
.channel-card {
    width: 100%;
    max-width: none;
    height: auto !important; 
    min-height: unset;
    background-color: var(--bg-container);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 12px;
    box-shadow: 0 1px 3px var(--shadow-light);
    position: relative;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    transition: box-shadow 0.2s, border-color 0.2s;
}

.channel-card:hover {
    box-shadow: 0 4px 8px var(--shadow-color);
    border-color: var(--search-focus-border);
}

.channel-link {
    text-decoration: none;
    color: var(--text-primary);
    display: grid;
    grid-template-columns: auto 1fr;
    grid-template-rows: auto 0fr; 
    gap: 0 12px;
    align-items: center;
    width: 100%;
    box-sizing: border-box;
    transition: grid-template-rows 0.3s cubic-bezier(0.4, 0, 0.2, 1), gap 0.3s ease;
}

.card-title {
    grid-column: 2;
    font-size: 0.95em;
    font-weight: 700;
    text-align: left;
    width: 100%;
    white-space: normal;
    line-height: 1.2;
}

.channel-link[data-desc]::after {
    content: attr(data-desc);
    grid-column: 2;
    grid-row: 2;
    font-size: 0.85em;
    font-weight: 400;
    color: var(--text-secondary);
    line-height: 1.4;
    display: block;
    overflow: hidden; 
    opacity: 0;
    transform: translateY(15px);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.2s ease;
}

.channel-card:hover .channel-link {
    grid-template-rows: auto 1fr; 
    gap: 6px 12px;
}

.channel-card:hover .card-title {
    transform: translateY(0); 
}

.channel-card:hover .channel-link[data-desc]::after {
    opacity: 1;
    transform: translateY(0); 
}

.card-icon, .card-icon-emoji, .icon-placeholder {
    width: 32px;
    height: 32px;
    margin: 0;
    grid-row: 1 / span 2; /* Forces alignment */
    align-self: start;
    object-fit: contain;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 2px;
}

.card-icon-emoji { font-size: 24px; line-height: 1; }
.icon-placeholder { display: none; } 

.card-badges { 
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 8px;
}

.pin-icon {
    position: absolute;
    right: -8px; left: auto; top: -8px;
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 50%;
    padding: 4px;
    margin: 0; font-size: 10px;
    filter: drop-shadow(0 2px 2px rgba(0,0,0,0.1));
    z-index: 5;
}

.empty-item {
    color: var(--text-placeholder);
    padding: 15px;
    font-style: italic;
    background: var(--bg-container);
    border: 1px dashed var(--border-color);
    border-radius: 4px;
}

.row-footer {
    height: auto; margin: 8px 0 0 0; padding: 0;
    border-top: none;
    display: flex; align-items: center; justify-content: flex-start;
    box-sizing: border-box; background-color: transparent;
}

.row-footer a {
    font-size: 0.85em; font-weight: bold;
    color: var(--text-secondary); text-decoration: none;
}

.row-footer a:hover { color: var(--search-focus-border); text-decoration: underline; }

/* =========================================
   4. NEWSFEED & SHOUTBOX PANEL
   ========================================= */
.full-width-panel {
    grid-column: 1 / -1;
    min-height: 300px;
    display: flex; flex-direction: column;
    background-color: var(--bg-container);
    border: 1px solid var(--border-color); border-radius: 6px;
    margin-bottom: 20px; overflow: hidden;
}

.big-news-header {
    /* Deep Slate Gradient for a premium feel */
    background: linear-gradient(135deg, #2c3e50 0%, #000000 100%); 
    color: #ffffff;
    padding: 20px 25px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 4px solid #FF9800; /* Keeps your branding accent */
    border-radius: 6px 6px 0 0;
}

/* Make the title text pop against the dark background */
#panel-title-text {
    color: #ffffff !important;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}


/* Ensure this is NOT inside any other brackets */
.panel-toggle-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 20px;
    height: 34px;
    border-radius: 50px !important; /* Forces the pill shape */
    background: rgba(255, 255, 255, 0.1) !important;
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
    color: #ffffff !important;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

.panel-toggle-btn:hover {
    background: rgba(255, 255, 255, 0.2) !important;
    border-color: #ffffff !important;
}


.bignews-left { flex: 0 0 200px; text-align: left; }
.bignews-right { flex: 0 0 200px; display: flex; justify-content: flex-end; }
.bignews-center { flex-grow: 1; text-align: center; }
.bignews-center h3 { margin: 0; color: #222; line-height: 1.3; }

.news-toggle { 
    position: relative; 
    display: inline-block; 
    width: 230px; 
    height: 34px; 
    user-select: none; 
}
.news-toggle input { opacity: 0; width: 0; height: 0; }
.news-slider {
    position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0;
    background-color: #333; transition: .4s;
    border-radius: 34px; border: 2px solid rgba(255,255,255,0.3);
    display: flex; align-items: center; justify-content: space-between;
    padding: 0 15px; box-sizing: border-box;
}
.news-slider:before {
    position: absolute; content: ""; height: 26px; width: 26px; left: 4px; bottom: 2px;
    background-color: white; transition: .4s; border-radius: 50%; 
    z-index: 5; box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}
.news-toggle input:checked + .news-slider:before { transform: translateX(192px); }

.news-toggle .toggle-text { 
    font-size: 0.85em; font-weight: 800; color: rgba(255,255,255,0.4); 
    z-index: 1; transition: color 0.3s;
    width: 90px; text-align: center;
}
.news-toggle input:not(:checked) + .news-slider .news-text { color: #fff; }
.news-toggle input:checked + .news-slider .shout-text { color: #fff; }
.news-text { margin-left: 20px; }
.shout-text { margin-right: 20px; }

.panel-toggle-btn {
    display: inline-flex; align-items: center; justify-content: center;
    width: auto; padding: 6px 16px; height: 34px;
    background: rgba(0, 0, 0, 0.15); border: 1px solid rgba(0, 0, 0, 0.3);
    border-radius: 20px; cursor: pointer; font-size: 0.9em; font-weight: bold;
    color: #222; transition: background 0.2s ease;
}
.panel-toggle-btn:hover { background: rgba(0, 0, 0, 0.3); }
.bignews-right .panel-toggle-btn { display: block; color: #222; }

#bigNewsPanel.collapsed .tab-content-wrapper,
#bigNewsPanel.collapsed .footer-button { display: none !important; }
#bigNewsPanel.collapsed { min-height: 0 !important; height: auto !important; flex-grow: 0; }

.newsfeed-container {
    display: flex; flex-wrap: wrap; padding: 15px; flex-grow: 1; gap: 15px;
    background-color: var(--bg-column);
}
.newsfeed-col {
    flex: 1; min-width: 280px; display: flex; flex-direction: column;
    max-height: 600px; overflow-y: auto;
}
.newsfeed-col-mid {
    border-left: 1px solid var(--border-color);
    border-right: 1px solid var(--border-color);
    padding: 0 15px;
}
.newsfeed-main-event { text-align: center; margin-bottom: 25px; padding-bottom: 20px; border-bottom: 1px solid var(--border-light); }
.newsfeed-main-event img { max-width: 100%; height: auto; border: 1px solid var(--border-color); margin-bottom: 10px; }
.newsfeed-main-event a {
    font-size: 24px; font-weight: 900; text-transform: uppercase; display: block;
    line-height: 1.1; text-decoration: none; color: var(--text-primary);
}
.newsfeed-link-item { margin-bottom: 12px; padding-bottom: 12px; border-bottom: 1px solid var(--border-light); line-height: 1.4; font-size: 15px; font-weight: 500; }
.newsfeed-link-item:last-child { border-bottom: none; }
.newsfeed-link-item a { color: var(--text-primary); text-decoration: none; }
.newsfeed-link-item a:hover { text-decoration: underline; }
.newsfeed-source { font-size: 11px; color: var(--text-secondary); margin-top: 3px; opacity: 0.8; line-height: 1; }
.newsfeed-top-left-box { border: 1px solid var(--border-color); padding: 10px; margin-bottom: 20px; background: var(--bg-footer-button); font-size: 13px; }
.newsfeed-red { color: #cc0000 !important; }
.newsfeed-bold { font-weight: bold; }
body.dark-theme .newsfeed-red { color: #ff5252 !important; }

#shoutbox-content-area { height: 500px; max-height: 500px; display: none; flex-direction: column; overflow: hidden; }
#shoutboxContentArea { display: flex; flex-direction: column; height: 100%; overflow: hidden; padding: 0; }
#shoutboxDisplay { flex-grow: 1; overflow-y: auto; min-height: 0; padding: 10px; background-color: var(--bg-column); color: var(--text-primary); }
#shoutboxForm {
    flex-shrink: 0; padding: 10px; border-top: 1px solid var(--border-color);
    background-color: var(--bg-footer-button); position: relative; z-index: 5;
}
#shoutboxForm label { display: block; font-size: 0.8em; font-weight: bold; margin-bottom: 3px; color: var(--text-secondary); }
#shoutboxForm input[type="text"] {
    width: 100%; padding: 8px; margin-bottom: 5px; border-radius: 4px;
    background-color: var(--bg-search); color: var(--text-primary);
    border: 1px solid var(--border-color); outline: none; box-sizing: border-box;
}
#shoutboxForm input[type="text"]:focus { border-color: var(--search-focus-border); }
.shoutbox-message-group { display: flex; gap: 5px; }
.message-wrapper { flex-grow: 1; }
#shoutboxSubmitBtn {
    align-self: flex-end; padding: 8px 12px; background: #d84315; color: white;
    border: none; border-radius: 4px; cursor: pointer; font-weight: bold; height: 34px; margin-bottom: 5px;
}
.shoutbox-hp { position: absolute !important; left: -9999px !important; opacity: 0 !important; pointer-events: none !important; }

#shoutbox-footer { min-height: 45px; display: flex; align-items: center; justify-content: center; overflow: hidden; }
#shoutbox-footer .shoutbox-status-message {
    width: 100%; height: 100%; display: flex; align-items: center; justify-content: center;
    margin: 0; padding: 10px; font-size: 0.95em; font-weight: bold; color: var(--text-secondary);
}
#shoutbox-footer .shoutbox-status-message.success { background-color: #4CAF50; color: white; }
#shoutbox-footer .shoutbox-status-message.error { background-color: #f44336; color: white; }

/* =========================================
   5. MODALS
   ========================================= */
.modal-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background-color: rgba(0, 0, 0, 0.7); display: none;
    justify-content: center; align-items: center; z-index: 1000; padding: 20px; box-sizing: border-box;
}
.modal-overlay.active, #contact-modal-overlay.active { display: flex; }
.modal-content {
    background-color: var(--bg-container); color: var(--text-primary);
    border-radius: 8px; padding: 20px; padding-top: 50px;
    width: 100%; max-width: 925px; max-height: 90vh;
    overflow-y: auto; position: relative; box-shadow: 0 5px 15px rgba(0,0,0,0.5);
}
.modal-close-btn {
    position: absolute; top: 10px; right: 15px;
    font-size: 2.5em; font-weight: bold; color: var(--text-secondary);
    background: none; border: none; cursor: pointer; line-height: 1;
}
.modal-close-btn:hover { color: var(--text-primary); }

.modal-body ul { height: auto; overflow-y: visible; list-style: disc; padding-left: 30px; display: block; }
.modal-body ul::after { display: none; }
.modal-body li { height: auto; display: list-item; border-bottom: none; font-size: 1em; flex-shrink: unset; }

#contact-modal-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background-color: rgba(0, 0, 0, 0.7); display: none;
    justify-content: center; align-items: center; z-index: 1000; padding: 20px; box-sizing: border-box;
}
#contact-modal-overlay .modal-content { max-width: 500px; }
#suggestionForm { display: flex; flex-direction: column; gap: 10px; }
#suggestionForm input[type="email"], #suggestionForm textarea {
    width: 100%; padding: 12px; font-size: 1em;
    color: var(--text-primary); background-color: var(--bg-search);
    border: 1px solid var(--border-color); border-radius: 6px;
    box-sizing: border-box; outline: none;
}
#suggestionForm button[type="submit"] {
    padding: 12px 20px; font-size: 1.1em; font-weight: bold; color: #ffffff;
    background-color: var(--search-focus-border); border: none; border-radius: 6px; cursor: pointer;
}

/* =========================================
   6. FOOTERS & DISCLOSURES
   ========================================= */
.welcome-disclosure-row {
    grid-column: 1 / -1; 
    width: 100%; 
    text-align: center; 
    margin: 10px 0 20px 0;
}

.welcome-disclosure p {
    font-size: 0.85em; 
    color: var(--text-secondary); 
    background-color: var(--bg-footer-button); 
    display: inline-block;
    padding: 8px 20px; 
    border-radius: 20px; 
    border: 1px solid var(--border-light);
    transition: background-color 0.3s, color 0.3s;
}

.welcome-disclosure p strong { color: var(--text-primary); }

.site-footer {
    width: 100%; max-width: 1400px; margin: 40px auto 20px; padding: 20px;
    background-color: var(--bg-container); border: 1px solid var(--border-color);
    border-radius: 8px; text-align: center; color: var(--text-secondary);
    box-sizing: border-box;
}
.footer-links a { color: var(--text-primary); text-decoration: underline; margin: 0 10px; cursor: pointer; font-weight: 500; }
.footer-links a:hover { color: var(--search-focus-border); }

/* =========================================
   7. MEDIA QUERIES & RESPONSIVE STEPPING
   ========================================= */
@media (max-width: 1400px) {
    .directory-container { grid-template-columns: repeat(3, 1fr) !important; }
}

@media (max-width: 1024px) {
    .directory-container { grid-template-columns: repeat(2, 1fr) !important; }
}

@media (max-width: 768px) {
    .directory-container { 
        grid-template-columns: 1fr !important; 
        padding: 20px 0;
    }
    
    .category-row {
        margin-bottom: 20px;
    }

    .directory-toolbar { justify-content: center; padding: 15px 0 5px 0; }
    .header-controls { flex-direction: row; flex-wrap: wrap; justify-content: space-between; gap: 10px; }
    .site-header { order: 1; margin: 0; flex: 0 0 auto; }
    .site-logo { max-height: 40px; width: auto; }
    .header-icons-right { order: 2; margin-left: auto; gap: 10px; }
    .search-wrapper { order: 3; width: 100%; flex-basis: 100%; margin: 5px 0 0 0; }

    #header-contact-link.submit-oval-btn {
        width: 40px; height: 40px; border-radius: 50%; padding: 0; 
        border: 1px solid var(--border-color); background-color: var(--bg-search);
        display: flex; align-items: center; justify-content: center;
    }
    #header-contact-link.submit-oval-btn .btn-text { display: none; }
    #header-contact-link.submit-oval-btn .btn-icon-mobile {
        display: block !important; width: 22px; height: 22px; fill: var(--search-icon-color);
    }

    .big-news-header {
        display: grid !important; grid-template-columns: auto auto !important; 
        justify-content: space-between !important; align-items: center !important;
        padding: 12px 14px !important; width: 100% !important; box-sizing: border-box !important; gap: 12px 0 !important; 
    }
    .bignews-left { grid-column: 1 !important; grid-row: 1 !important; display: flex !important; align-items: center !important; } 
    .bignews-left .news-toggle { width: 230px !important; }
    .bignews-left .news-toggle input:checked + .news-slider:before { transform: translateX(192px) !important; }
    .bignews-right { grid-column: 2 !important; grid-row: 1 !important; display: flex !important; justify-content: flex-end !important; align-items: center !important; }
    .bignews-right .panel-toggle-btn { white-space: nowrap !important; padding: 6px 12px !important; font-size: 0.85em !important; }
    .bignews-center { 
        grid-column: 1 / span 2 !important; grid-row: 2 !important; width: 100% !important;
        margin-top: 4px !important; padding-top: 12px !important; border-top: 1px solid rgba(0, 0, 0, 0.1) !important; 
        text-align: center !important; display: block !important;
    }
    .bignews-center h3 { display: block !important; font-size: 1.1em !important; margin: 0 !important; line-height: 1.4 !important; }
}

@media (max-width: 600px) {
    .category-header { flex-direction: column; align-items: flex-start; gap: 15px; }
    .directory-switcher-wrapper { order: 2; margin-right: 0; margin-bottom: 5px; align-self: center; }
}

@media (max-width: 480px) {
    body { padding: 10px; }
    .directory-container { padding: 10px 0; }
    .search-form input[type="text"] { padding-left: 20px; font-size: 1em; }
    .header-icons-right { gap: 5px; }
    .header-icon-btn, #header-contact-link.submit-oval-btn { width: 34px; height: 34px; }
    .header-icon-btn svg, #header-contact-link.submit-oval-btn .btn-icon-mobile { width: 18px; height: 18px; }
}

/* =========================================
   8. PLAYLIST MODAL ENHANCEMENTS
   ========================================= */
.modal-overlay.playlist-mode .modal-content {
    max-width: 1200px;
    padding: 10px;
    background-color: #1a202c;
}
.modal-overlay.playlist-mode .modal-body { padding: 0; overflow: hidden; }
.modal-overlay.playlist-mode .modal-close-btn { color: #cbd5e0; z-index: 1001; }

@media (max-width: 1024px) {
    .modal-overlay.playlist-mode .modal-content { max-width: 95vw; height: 95vh; }
}
@media (max-width: 768px) {
    .modal-overlay.playlist-mode .modal-content { padding-top: 40px; }
}

.attention-grabber {
    animation: pulse-flash 3s infinite;
    border-radius: 50%;
}
.attention-grabber:hover { animation-play-state: paused; }

.topic-selection { display: flex; flex-direction: column; gap: 10px; margin-bottom: 20px; text-align: left; }
.topic-item {
    display: flex; align-items: center; padding: 10px;
    background: rgba(0,0,0,0.03); border: 1px solid #ddd;
    border-radius: 6px; cursor: pointer; transition: background 0.2s;
}
.topic-item:hover { background: rgba(0,0,0,0.06); }
.topic-item input[type="radio"] { margin-right: 12px; width: 18px; height: 18px; cursor: pointer; }

#suggestionForm textarea { width: 100%; min-height: 120px; padding: 12px; border: 1px solid #ccc; border-radius: 4px; box-sizing: border-box; }
#suggestionForm input[type="email"] { width: 100%; padding: 10px; margin-top: 15px; border: 1px solid #ccc; border-radius: 4px; box-sizing: border-box; }

#formSubmitBtn {
    width: 100%; margin-top: 20px; padding: 12px; background-color: #222;
    color: #fff; border: none; border-radius: 4px; font-weight: bold; cursor: pointer;
}
#formSubmitBtn:hover { background-color: #444; }

/* =========================================
   9. CUSTOM SCROLLBARS
   ========================================= */
.newsfeed-col::-webkit-scrollbar,
ul::-webkit-scrollbar,
#shoutboxDisplay::-webkit-scrollbar {
    width: 6px; 
}
.newsfeed-col::-webkit-scrollbar-track,
ul::-webkit-scrollbar-track,
#shoutboxDisplay::-webkit-scrollbar-track {
    background: transparent; 
}
.newsfeed-col::-webkit-scrollbar-thumb,
ul::-webkit-scrollbar-thumb,
#shoutboxDisplay::-webkit-scrollbar-thumb {
    background-color: var(--border-color); 
    border-radius: 10px;
    border: 1px solid transparent; 
}
.newsfeed-col::-webkit-scrollbar-thumb:hover,
ul::-webkit-scrollbar-thumb:hover,
#shoutboxDisplay::-webkit-scrollbar-thumb:hover {
    background-color: var(--text-placeholder); 
}

.newsfeed-col, ul, #shoutboxDisplay {
    scrollbar-width: thin;
    scrollbar-color: var(--border-color) transparent;
}

/* =========================================
   10. DIRECTORY CONTROLS & TOGGLES
   ========================================= */
.column-header-actions {
    flex-basis: 100%; 
    width: 100%;
    display: flex;
    justify-content: flex-start; 
    padding-left: 10px;
    margin-bottom: 15px;         
}

.directory-filter-bar { 
    display: flex; 
    align-items: center; 
    gap: 16px; 
    width: 100%; 
    background: transparent; 
    border: none; 
}

.dir-toggle { cursor: pointer; display: inline-block; position: relative; width: 220px; height: 34px; }
.dir-toggle input { opacity: 0; width: 0; height: 0; }
.dir-slider {
    position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0;
    background-color: #351837; transition: 0.4s; border-radius: 34px;
    display: flex; align-items: center; padding: 0 5px;
}
.dir-slider:before {
    position: absolute; content: ""; height: 26px; width: 105px; left: 4px; bottom: 4px;
    background-color: white; transition: 0.4s; border-radius: 34px; z-index: 1;
}

.dir-toggle input:checked + .dir-slider:before { transform: translateX(107px); }
.dir-slider .toggle-text {
    flex: 1; z-index: 2; font-size: 10px; font-weight: bold; text-align: center; color: white;
    transition: color 0.4s; pointer-events: none; display: flex; align-items: center;
    justify-content: center; height: 100%; line-height: 1;
}

.dir-toggle input:not(:checked) + .dir-slider .dir-all-text { color: #351837; }
.dir-toggle input:checked + .dir-slider .dir-gtv-text { color: #351837; }

#bigNewsPanel.full-width-panel {
    flex: 0 0 100% !important;
    width: 100% !important;
    max-width: 100% !important;
    margin-bottom: 25px;
}

/* =========================================
   11. TOOLTIPS & SLIDE-IN SHOUTBOX
   ========================================= */
#custom-tooltip {
    position: fixed; background-color: var(--bg-container); color: var(--text-primary);
    border: 1px solid var(--search-focus-border); border-radius: 6px; padding: 8px 12px;
    font-size: 0.85em; font-weight: 500; max-width: 300px; box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    pointer-events: none; z-index: 9999; opacity: 0; visibility: hidden;
    transition: opacity 0.15s ease-out; line-height: 1.4;
}
#custom-tooltip.visible { opacity: 1; visibility: visible; }

.shoutbox-fab {
    position: fixed; bottom: 25px; right: 25px; width: 60px; height: 60px; border-radius: 50%;
    background-color: var(--search-focus-border); color: white; font-size: 28px; border: none;
    box-shadow: 0 4px 15px var(--shadow-color); cursor: pointer; z-index: 1000;
    display: flex; align-items: center; justify-content: center;
    transition: transform 0.2s ease, background-color 0.2s ease;
}
.shoutbox-fab:hover { transform: scale(1.05); background-color: #e68a00; }

.shoutbox-slide-panel {
    position: fixed; top: 0; right: -400px; width: 100%; max-width: 400px; height: 100vh;
    background-color: var(--bg-container); box-shadow: -5px 0 20px var(--shadow-color);
    z-index: 2000; transition: right 0.3s ease-in-out; display: flex; flex-direction: column;
}
.shoutbox-slide-panel.open { right: 0; }

.shoutbox-panel-header {
    display: flex; justify-content: space-between; align-items: center;
    padding: 15px 20px; background-color: var(--bg-column); border-bottom: 1px solid var(--border-color);
    cursor: pointer; transition: background-color 0.2s ease; z-index: 2001;
}
.shoutbox-panel-header:hover { background-color: var(--bg-footer-hover); }
.shoutbox-panel-header h3 { margin: 0; color: var(--text-primary); font-size: 1.2em; }
.shoutbox-close-btn { background: none; border: none; font-size: 32px; color: var(--text-secondary); cursor: pointer; line-height: 1; padding: 0; }
.shoutbox-close-btn:hover { color: var(--text-primary); }

.shoutbox-slide-panel #shoutboxContentArea { flex-grow: 1; display: flex; flex-direction: column; overflow: hidden; }
.shoutbox-slide-panel #shoutboxDisplay { flex-grow: 1; overflow-y: auto; padding: 15px; background-color: var(--bg-body); }
.shoutbox-slide-panel #shoutboxForm { flex-shrink: 0; background-color: var(--bg-column); }
.shoutbox-panel-header h3, .shoutbox-close-btn { pointer-events: none; }

@keyframes periodic-jingle {
  0% { transform: rotate(0) scale(1); }
  2%, 6% { transform: rotate(-15deg) scale(1.1); }
  4%, 8% { transform: rotate(15deg) scale(1.1); }
  10% { transform: rotate(0) scale(1); }
  100% { transform: rotate(0) scale(1); }
}
.chat-jingle { animation: periodic-jingle 8s ease-in-out infinite; transform-origin: center; z-index: 1002; }

/* =========================================
   12. CATEGORY PILL FILTER & ISOLATION
   ========================================= */
.category-pill-track {
    grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 8px; padding: 10px 0 20px 0; margin-bottom: 5px;
}

@media (max-width: 768px) {
    .category-pill-track {
        width: 100%; flex-basis: 100%; min-width: 0; flex-wrap: nowrap; overflow-x: auto; overflow-y: hidden; padding-bottom: 14px; 
        scroll-behavior: smooth; -webkit-overflow-scrolling: touch; scrollbar-width: thin; scrollbar-color: var(--border-color) transparent;
    }
    .category-pill-track::-webkit-scrollbar { display: block; height: 6px; }
    .category-pill-track::-webkit-scrollbar-track { background: transparent; }
    .category-pill-track::-webkit-scrollbar-thumb { background-color: var(--border-color); border-radius: 10px; }
}

.category-pill {
    flex: 0 0 auto; padding: 8px 14px; border-radius: 4px; background-color: var(--bg-container); color: var(--text-primary);
    border: 1px solid var(--border-color); font-size: 0.9em; font-weight: 500;
    cursor: pointer; white-space: nowrap; transition: background-color 0.2s, color 0.2s, border-color 0.2s;
}

.category-pill:hover, .category-pill.active { 
    background-color: var(--bg-body); 
    font-weight: 700; 
    color: var(--text-primary); 
    border-color: var(--text-secondary); 
    box-shadow: 0 2px 4px var(--shadow-light); 
}

.category-row.pill-hidden { display: none !important; }
.category-row.search-hidden { display: none !important; }
li.channel-card.search-hidden-item { display: none !important; }

body.general-mode .category-pill[data-directory-type="gtv"] { display: none !important; }
body.gtv-mode .category-pill[data-directory-type="general"] { display: none !important; }