input, textarea, select {
    box-sizing: border-box;
}

:root {
    --bg-color: #000000;
    --text-color: #D4AF37;
    --header-bg: #111111;
    --header-text: #D4AF37;
    --card-bg: #1a1a1a;
    --border-color: #D4AF37;
    --accent-color: #C8102E;
    --accent-hover: #A00000;
}


body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    margin: 0;
    padding: 0;
    transition: background-color 0.3s, color 0.3s;
}

header {
    background-color: var(--header-bg);
    color: var(--header-text);
    padding: 0.3rem 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 2px solid var(--border-color);
}

.header-left {
    flex: 1;
    display: flex;
    align-items: center;
}

.header-left img {
    height: 40px;
    width: auto;
}

.header-center {
    flex: 2;
    display: flex;
    justify-content: center;
}

.header-right {
    flex: 1;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 10px;
}

.header-right a {
    color: var(--header-text);
    text-decoration: none;
    margin-left: 1rem;
    font-weight: bold;
}

.header-player audio {
    display: none;
}

.header-player {
    display: flex;
    align-items: center;
    gap: 20px;
}

.player-badge {
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid var(--border-color);
    padding: 6px 15px;
    display: flex;
    align-items: center;
    gap: 15px;
    border-radius: 30px;
    box-shadow: 0 0 10px rgba(212, 175, 55, 0.1);
}

.player-badge i {
    color: var(--text-color);
    font-size: 1.2rem;
    animation: pulse 2s infinite;
}

.m3u-badge {
    background-color: var(--accent-color);
    color: white;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: bold;
    text-decoration: none;
    border: 1px solid rgba(255,255,255,0.2);
    transition: all 0.2s ease;
    white-space: nowrap;
    box-shadow: 0 0 10px rgba(200, 16, 46, 0.2);
}

.m3u-badge:hover {
    background-color: var(--accent-hover);
    transform: scale(1.05);
    box-shadow: 0 0 15px rgba(200, 16, 46, 0.4);
    color: white;
}

.header-stats-badge {
    background: rgba(0, 0, 0, 0.5);
    padding: 8px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-radius: 35px;
    box-shadow: 0 0 15px rgba(212, 175, 55, 0.2);
    min-width: 320px;
    height: 46px;
    justify-content: center;
    font-size: 1.1rem;
    font-weight: bold;
    transition: opacity 0.5s ease-in-out;
    box-sizing: border-box;
}

.header-stats-badge img {
    height: 35px;
    width: auto;
    display: block;
}

.stat-value {
    color: #fff;
}

.stat-label {
    color: #888;
}

@keyframes fadeInOut {
    0% { opacity: 0; transform: translateY(5px); }
    10% { opacity: 1; transform: translateY(0); }
    90% { opacity: 1; transform: translateY(0); }
    100% { opacity: 0; transform: translateY(-5px); }
}

.animate-stats {
    animation: fadeInOut 5s ease-in-out;
}

@keyframes pulse {
    0% { opacity: 0.7; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.1); }
    100% { opacity: 0.7; transform: scale(1); }
}

.volume-container {
    display: flex;
    align-items: center;
    gap: 10px;
    border-left: 1px solid rgba(212, 175, 55, 0.2);
    padding-left: 15px;
    margin-left: 5px;
}

.volume-slider {
    -webkit-appearance: none;
    width: 80px;
    height: 4px;
    background: #333;
    border-radius: 2px;
    outline: none;
    margin: 0;
    cursor: pointer;
}

.volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 12px;
    height: 12px;
    background: var(--text-color);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 0 5px rgba(0,0,0,0.5);
    border: none;
}

.volume-slider::-moz-range-thumb {
    width: 12px;
    height: 12px;
    background: var(--text-color);
    border-radius: 50%;
    cursor: pointer;
    border: none;
    box-shadow: 0 0 5px rgba(0,0,0,0.5);
}

#header-volume-icon {
    color: var(--text-color);
    font-size: 0.9rem;
    width: 15px;
    text-align: center;
}

/* Main Nav */
.main-nav {
    background-color: #222;
    border-bottom: 1px solid var(--border-color);
    padding: 0.5rem 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Mobile Tab Bar */
.mobile-tab-bar {
    display: none;
    background-color: #111;
    border-bottom: 1px solid var(--border-color);
    height: 60px;
    justify-content: space-around;
    align-items: center;
    position: sticky;
    top: 66px; /* Below header */
    z-index: 999;
}

.tab-item {
    background: transparent;
    border: none;
    color: #888;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    gap: 4px;
    flex: 1;
    height: 100%;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
}

.tab-item i {
    font-size: 1.2rem;
}

.tab-item.active {
    color: var(--text-color);
    background: rgba(212, 175, 55, 0.05);
}

.tab-item.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 10%;
    right: 10%;
    height: 3px;
    background: var(--text-color);
    border-radius: 3px 3px 0 0;
}

.tab-badge {
    position: absolute;
    top: 8px;
    right: 25%;
    background: var(--accent-color);
    color: #fff;
    font-size: 0.6rem;
    padding: 2px 5px;
    border-radius: 10px;
    font-weight: bold;
    border: 1px solid #000;
}

.tab-badge-inline {
    background: var(--accent-color);
    color: #fff;
    font-size: 0.7rem;
    padding: 1px 6px;
    border-radius: 10px;
    font-weight: bold;
}

.main-nav a {
    color: var(--text-color);
    text-decoration: none;
    margin-right: 1rem;
    font-weight: bold;
}

.main-nav a:hover {
    color: #fff;
}

.nav-left, .nav-right {
    display: flex;
    align-items: center;
}

.btn-admin {
    background-color: #FF9800 !important;
    border: 1px solid #FF9800 !important;
    color: black !important;
    margin-left: 5px;
    font-weight: bold;
}

.btn-admin:hover {
    background-color: #F57C00 !important;
    border-color: #F57C00 !important;
}

/* Request Table */
#request-results-table th, #request-results-table td {
    padding: 8px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

#request-results-table th {
    background-color: rgba(255,255,255,0.1);
    color: #fff;
}

.dimmed {
    opacity: 0.5;
}

button[disabled], button.btn-disabled {
    cursor: not-allowed;
    background-color: #555;
    opacity: 0.7;
}

.btn-filter {
    background-color: #333;
    border: 1px solid var(--border-color);
    color: var(--text-color);
    margin-right: 5px;
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.btn-filter:hover {
    background-color: #444;
}

.btn-filter.active {
    background-color: var(--accent-color);
    color: #fff;
    border-color: var(--accent-color);
}

.container {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1rem;
    display: grid;
    grid-template-columns: 1fr 300px; /* Main content + Sidebar */
    gap: 2rem;
}

.container.main-layout {
    max-width: none;
    width: 100%;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    height: calc(100vh - 110px); /* header + nav */
    overflow: hidden;
}

/* Tab Panes */
.tab-pane {
    height: 100%;
    overflow-y: auto;
    display: none;
    flex-direction: column;
}

.tab-pane.active {
    display: flex;
}

/* Modals styled as panes for desktop */
.pane-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 2000;
    justify-content: center;
    align-items: center;
    padding: 20px;
    box-sizing: border-box;
}

.pane-modal.active {
    display: flex;
}

.pane-content-wrapper {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 50px 20px 20px 20px;
    width: 90%;
    max-width: 900px;
    max-height: 85vh;
    position: relative;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

@media (max-width: 768px) {
    header {
        display: grid;
        grid-template-columns: 1fr 1fr;
        grid-template-areas:
            "left right"
            "center center";
        gap: 10px;
        padding: 10px;
        max-width: none;
        margin: 0;
        left: 0;
        right: 0;
        align-items: center;
    }

    .header-left {
        grid-area: left;
        display: flex;
        justify-content: flex-start;
        flex: none;
    }

    .header-center {
        grid-area: center;
        display: flex;
        justify-content: center;
    }

    .header-right {
        grid-area: right;
        display: flex;
        justify-content: flex-end;
        align-items: center;
        gap: 10px;
        flex: none;
    }

    .header-player {
        display: flex;
        align-items: center;
        gap: 10px;
    }

    .player-badge {
        padding: 5px 10px;
        gap: 8px;
        margin: 0;
    }

    .player-badge .volume-container {
        display: flex !important;
        padding-left: 10px;
        margin-left: 0;
    }

    .volume-slider {
        width: 60px;
    }

    .header-stats-badge {
        margin: 0;
        min-width: auto !important;
        width: auto;
        justify-content: center;
        background: rgba(0, 0, 0, 0.5);
        padding: 4px 12px;
        box-shadow: 0 0 10px rgba(212, 175, 55, 0.1);
        font-size: 0.85rem;
        height: 34px;
        border-radius: 24px;
    }

    .header-stats-badge img {
        height: 25px !important;
    }

    #btn-profile-modal {
        display: flex !important;
        background: transparent;
        border: none;
        padding: 0;
        box-shadow: none;
    }

    #header-avatar {
        height: 28px;
        width: 28px;
        margin: 0;
    }

    #username-span {
        display: none !important;
    }

    #btn-login-modal {
        display: inline-block !important;
        font-size: 0.75rem;
        padding: 4px 8px;
    }

    #btn-notsam {
        display: none !important;
    }

    #btn-header-pager {
        display: none !important;
    }

    .main-nav {
        display: none !important;
    }

    .mobile-tab-bar {
        display: flex;
        top: 98px; /* Taller multiline header */
        max-width: none;
        margin: 0;
        left: 0;
        right: 0;
    }

    .container.main-layout {
        display: block;
        height: calc(100vh - 158px); /* Header(~98) + TabBar(60) */
        max-width: none;
        margin: 0;
    }

    .tab-pane {
        display: none !important;
        height: 100%;
        overflow-y: auto;
        padding: 10px 20px;
    }

    .tab-pane.active {
        display: flex !important;
    }

    /* Modal panes on mobile become simple full-screen tabs */
    .pane-modal {
        position: static;
        background: none;
        padding: 10px 20px;
        z-index: auto;
        justify-content: flex-start !important;
        align-items: stretch !important;
    }

    .pane-content-wrapper {
        width: 100% !important;
        max-width: none !important;
        height: 100% !important;
        max-height: none !important;
        border: none;
        border-radius: 0;
        padding: 0;
        background: transparent;
    }

    .pane-content-wrapper h2 {
        margin-top: 0;
    }

    .pane-content-wrapper .close {
        display: none; /* No close button in tab mode */
    }
}

main, aside {
    padding: 1rem;
    height: 100%;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.card {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.card h2 {
    margin-top: 0;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.5rem;
}

/* Radio Player */
.player-info {
    padding: 0;
}

.player-header {
    text-align: center;
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 1rem;
}

.player-body {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 20px;
    align-items: stretch;
}

.player-left-col {
    text-align: center;
}

.player-right-col {
    text-align: left;
    display: flex;
    flex-direction: column;
    justify-content: center;
    height: 100%;
}

.art-container {
    position: relative;
    display: inline-block;
    border-radius: 4px;
    overflow: hidden;
    border: none;
}

.art-container img {
    max-width: 250px;
    height: auto;
    display: block;
}

.live-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(200, 16, 46, 0.85); /* Accent red with transparency */
    color: white;
    padding: 2px 0;
    font-weight: bold;
    pointer-events: none;
    white-space: nowrap;
    animation: livePulse s infinite;
    z-index: 10;
    text-align: center;
    font-size: 0.7rem;
    border-top: 1px solid rgba(255, 255, 255, 0.5);
    text-transform: uppercase;
    letter-spacing: 1px;
}

@keyframes livePulse {
    0% { opacity: 0.8; }
    50% { opacity: 1; }
    100% { opacity: 0.8; }
}

.player-art img {
    max-width: 250px;
    height: auto;
    border-radius: 4px;
    border: none;
}

.song-title {
    font-size: 1.8rem;
    font-weight: bold;
    color: #fff;
    margin-bottom: 0.2rem;
}

#np-time {
    margin-top: 0.5rem;
    font-weight: bold;
    font-size: 1.2rem;
    color: #fff;
}

#np-album, #np-year, #np-source {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

@media (max-width: 768px) {
    .player-body {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .player-art-side {
        justify-content: center;
        margin-bottom: 20px;
    }
    .player-right-col {
        text-align: center;
        align-items: center;
    }
}

.song-artist {
    font-size: 1.1rem;
    color: var(--text-color);
    opacity: 0.8;
}

/* Chat */
#chat-box {
    flex: 1;
    overflow-y: auto;
    padding: 0.5rem;
    margin-bottom: 0.5rem;
    background-color: rgba(0,0,0,0.05);
}

.message {
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    position: relative;
}

.btn-delete-msg, .btn-ban-msg, .btn-edit-msg, .btn-ban-guest, .btn-reply-msg {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(212, 175, 55, 0.3);
    color: #fff;
    cursor: pointer;
    font-size: 0.65rem;
    padding: 2px 6px;
    border-radius: 4px;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    height: 20px;
    min-width: 35px;
    text-transform: uppercase;
    font-weight: bold;
    margin-left: 4px;
    box-sizing: border-box;
}

.btn-delete-msg i, .btn-ban-msg i, .btn-edit-msg i, .btn-ban-guest i, .btn-reply-msg i {
    font-size: 0.7rem;
}

.btn-edit-msg {
    border-color: #4caf50;
    color: #4caf50;
}

.btn-delete-msg {
    border-color: #f44336;
    color: #f44336;
}

.btn-ban-msg {
    border-color: #ff9800;
    color: #ff9800;
}

.btn-reply-msg {
    border-color: var(--accent-color);
    color: var(--accent-color);
    opacity: 0.7;
}

.btn-edit-msg:hover { background: #4caf50; color: #fff; }
.btn-delete-msg:hover { background: #f44336; color: #fff; }
.btn-ban-msg:hover { background: #ff9800; color: #fff; }
.btn-reply-msg:hover { background: var(--accent-color); color: #000; opacity: 1; }

.message .user {
    font-weight: bold;
    color: #fff;
}

/* Drag & Drop Overlay for Pager Modal */
#pager-send-modal.drag-over::after {
    content: '\f03d'; /* FontAwesome video icon */
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    z-index: 100;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #fff;
    pointer-events: none;
    border: 2px dashed var(--accent-color);
    border-radius: 8px;
    box-sizing: border-box;
    font-size: 3rem;
}

#pager-send-modal.drag-over::before {
    content: 'Drop Video/Image to Pager';
    position: absolute;
    top: 60%;
    left: 0;
    width: 100%;
    text-align: center;
    z-index: 101;
    color: #fff;
    font-weight: bold;
    font-size: 1.2rem;
    pointer-events: none;
}

/* Chat Drag & Drop Overlay */
.chat-drop-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    z-index: 100;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #fff;
    pointer-events: none;
    border: 2px dashed var(--accent-color);
    border-radius: 8px;
    box-sizing: border-box;
}

.chat-drop-overlay i {
    font-size: 3rem;
    margin-bottom: 10px;
    color: var(--accent-color);
}

.chat-drop-overlay span {
    font-size: 1.2rem;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.drag-over .chat-drop-overlay {
    display: flex;
}

/* New Chat Card Styles */
.chat-card {
    background: rgba(212, 175, 55, 0.05); /* Very light gold */
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 10px;
    margin-bottom: 10px;
    display: flex;
    gap: 12px;
    position: relative;
    transition: transform 0.2s, box-shadow 0.2s;
}

.chat-card:hover {
    box-shadow: 0 2px 8px rgba(212, 175, 55, 0.2);
}

.chat-card.mentioned {
    background: rgba(255, 235, 59, 0.15) !important;
    border-color: #fdd835 !important;
    box-shadow: inset 0 0 10px rgba(253, 216, 53, 0.2);
}

.chat-card.task-message {
    background: rgba(0, 40, 80, 0.5) !important;
    border-color: #0056b3 !important;
}

.chat-card.report-message {
    background: rgba(128, 0, 0, 0.5) !important;
    border-color: #f44336 !important;
}

.chat-card-left {
    flex: 0 0 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.chat-card-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid var(--border-color);
    background: #222;
    cursor: pointer;
    display: block;
}

.chat-avatar-container {
    position: relative;
    width: 40px;
    height: 40px;
}

.chat-avatar-container.compact {
    width: 30px;
    height: 30px;
}

.chat-avatar-container.compact .status-dot {
    width: 10px;
    height: 10px;
    border-width: 1px;
}

.chat-role-container {
    display: flex;
    justify-content: center;
    margin-top: 15px;
    width: 100%;
}

.role-icon.admin {
    color: var(--accent-color);
}

.role-icon.deejay {
    color: #2196F3;
}

.report-avatar-icon {
    font-size: 1.2rem;
}

.chat-card-right {
    flex: 1;
    min-width: 0;
    position: relative;
}

.chat-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}

.chat-card-user {
    font-weight: bold;
    color: #fff;
    font-size: 0.9rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    position: relative;
}

.marquee-active {
    text-overflow: clip !important;
}

.marquee-content {
    display: inline-block;
    will-change: transform;
}

.marquee-active .marquee-content {
    animation: marquee-bounce 10s linear infinite alternate;
}

@keyframes marquee-bounce {
    0%, 20% {
        transform: translateX(0);
    }
    80%, 100% {
        transform: translateX(var(--scroll-amount, 0));
    }
}

.chat-card-time {
    font-size: 0.7rem;
    color: #888;
}

.chat-card-header-actions {
    display: flex;
    align-items: center;
    gap: 6px;
}

.chat-card-content {
    font-size: 0.95rem;
    line-height: 1.4;
    word-wrap: break-word;
    color: var(--text-color);
}

.chat-link-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: rgba(212, 175, 55, 0.1);
    border: 1px solid var(--border-color);
    color: #fff;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    text-decoration: none;
    margin: 2px 0;
    transition: all 0.2s;
    cursor: pointer;
}

.chat-link-btn:hover {
    background: var(--accent-color);
    color: white;
}

.chat-img-preview {
    max-width: 100%;
    max-height: 300px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    margin-top: 5px;
    display: block;
    cursor: zoom-in;
}

.chat-video-preview {
    position: relative;
    max-width: 250px;
    cursor: pointer;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    margin-top: 5px;
    background: #000;
    transition: transform 0.2s;
}

.chat-video-preview:hover {
    transform: scale(1.02);
}

.chat-video-preview video {
    display: block;
    width: 100%;
    height: auto;
}

.video-play-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0,0,0,0.6);
    color: #fff;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: all 0.2s;
    border: 2px solid rgba(255,255,255,0.2);
}

.chat-video-preview:hover .video-play-overlay {
    background: var(--accent-color);
    border-color: #fff;
    transform: translate(-50%, -50%) scale(1.1);
}

.chat-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 8px;
    border-top: 1px solid rgba(212, 175, 55, 0.1);
    padding-top: 5px;
}

.chat-reactions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.chat-actions {
    display: flex;
    gap: 4px;
    margin-left: auto;
}

.chat-actions button {
    margin-left: 0;
}

.btn-react {
    background: transparent;
    border: none;
    color: #888;
    cursor: pointer;
    font-size: 0.75rem;
    padding: 2px 5px;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: color 0.2s, transform 0.1s;
}

.btn-react:hover {
    color: #fff;
    transform: scale(1.1);
}

.btn-react.active {
    color: #fff;
    font-weight: bold;
}


/* Forms */
input[type="text"], input[type="password"], input[type="email"], input[type="number"], input[type="search"], textarea {
    width: 100%;
    padding: 0.4rem 1rem;
    margin-bottom: 1rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background-color: var(--bg-color);
    color: var(--text-color);
    font-size: 1rem;
}

input[type="text"]:focus, input[type="password"]:focus, input[type="email"]:focus, input[type="number"]:focus, input[type="search"]:focus, textarea:focus {
    outline: none !important;
    border: 1px solid #fff !important;
}

button {
    background-color: var(--text-color); /* Gold */
    color: #000; /* Black */
    border: none;
    padding: 0.75rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.2s, transform 0.1s;
    font-weight: bold;
}

button:active {
    transform: scale(0.98);
}

button:hover {
    background-color: #bfa030; /* Darker Gold */
}

/* Specific red buttons */
.btn-danger, #btn-logout {
    background-color: #C8102E !important;
    color: white !important;
}

.btn-danger:hover, #btn-logout:hover {
    background-color: #A00000 !important;
}

.btn-dark-red {
    background-color: #800000;
    color: white;
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

.btn-dark-red:hover {
    background-color: #a00000;
}

a.btn-sm {
    text-decoration: none;
    display: inline-block;
    background-color: var(--text-color);
    color: black;
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
    font-weight: bold;
}

a.btn-sm:hover {
    background-color: #bfa030;
    color: black;
}

/* Helpers */
.hidden { display: none !important; }
.btn-sm { padding: 0.25rem 0.5rem; font-size: 0.8rem; }
.text-right { text-align: right; }
.mt-1 { margin-top: 0.25rem !important; }
.mt-2 { margin-top: 0.5rem !important; }
.mt-3 { margin-top: 1rem !important; }
.mt-4 { margin-top: 1.5rem !important; }
.mt-5 { margin-top: 3rem !important; }

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 3000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.5);
    /* Support flex centering when shown with display: flex */
    align-items: center;
    justify-content: center;
}

.modal-content {
    background-color: var(--card-bg);
    margin: 10% auto;
    padding: 40px 20px 20px 20px;
    border: 1px solid var(--border-color);
    width: 80%;
    max-width: 500px;
    border-radius: 8px;
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
}

.close {
    color: #fff;
    position: absolute;
    top: 8px;
    right: 15px;
    font-size: 32px;
    font-weight: bold;
    cursor: pointer;
    z-index: 5000;
    text-shadow: 0 0 10px rgba(0,0,0,1);
    line-height: 1;
    transition: all 0.2s;
}

.close:hover {
    color: var(--accent-color);
    transform: scale(1.1);
}

/* Command Centre Styles */
#command-centre-view {
    width: 98%;
    margin: 1rem auto;
    height: calc(100vh - 80px); /* Fill remaining height */
    box-sizing: border-box;
}

.command-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 1rem;
    height: 100%;
    overflow: hidden;
}

.pane {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    height: 100%;
}

.pane-header {
    padding: 10px;
    border-bottom: 1px solid var(--border-color);
    background: rgba(255,255,255,0.05);
    font-weight: bold;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.pane-content {
    flex: 1;
    overflow-y: auto;
    padding: 10px;
}

/* Queue List */
.queue-item {
    background: rgba(0,0,0,0.2);
    border: 1px solid #333;
    padding: 8px;
    margin-bottom: 5px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: grab;
}

.queue-item:active {
    cursor: grabbing;
}

.queue-item.dragging {
    opacity: 0.5;
    border: 1px dashed var(--accent-color);
}

/* Search Results */
.search-item {
    display: flex;
    justify-content: space-between;
    padding: 5px;
    border-bottom: 1px solid #333;
}

.search-item:hover {
    background: rgba(255,255,255,0.05);
}

/* CC Player */
.cc-player {
    text-align: center;
    padding: 10px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 10px;
}

.cc-player img {
    max-width: 150px;
    border-radius: 4px;
}

.progress-bar {
    width: 100%;
    height: 10px;
    background: #222;
    margin-top: 10px;
    position: relative;
    border-radius: 5px;
    overflow: hidden;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.5);
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-color), #ff4d4d);
    width: 0%;
    transition: width 1s linear;
    box-shadow: 0 0 10px rgba(200, 16, 46, 0.5);
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2000;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.toast {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-left: 5px solid var(--accent-color);
    color: var(--text-color);
    padding: 15px 25px;
    margin-top: 10px;
    border-radius: 4px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.3);
    min-width: 250px;
    display: flex;
    align-items: center;
    justify-content: space-between;

    /* Animation: slide up from bottom */
    transform: translateY(150%);
    transition: transform 1s cubic-bezier(0.68, -0.55, 0.27, 1.5);
}

.toast.show {
    transform: translateY(0);
}

.toast.hide {
    transform: translateY(150%);
}

.toast-message {
    font-weight: 500;
}

/* Profile Badge */
#btn-header-pager, #btn-header-mail, .btn-profile-badge {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-color);
    padding: 5px 10px;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    border-radius: 20px;
    transition: all 0.2s;
    font-size: 0.8rem;
}

#btn-header-pager:hover, #btn-header-mail:hover, .btn-profile-badge:hover {
    background: rgba(255, 255, 255, 0.1);
}

.header-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid var(--accent-color);
}

/* Profile Modal */
#profile-modal .modal-content {
    width: 600px;
    max-width: 95%;
}

.profile-tabs {
    display: flex;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 15px;
    gap: 5px;
}

#btn-logout-profile {
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: none;
    cursor: pointer;
    font-weight: bold;
    padding: 10px 15px;
    border-radius: 4px 4px 0 0;
}

.tab-btn, .cc-tab-btn, .task-tab-btn {
    background: #000;
    border: none;
    color: var(--text-color);
    padding: 10px 15px;
    cursor: pointer;
    font-weight: bold;
    border-radius: 4px 4px 0 0;
    transition: all 0.2s;
    text-transform: uppercase;
    font-size: 0.85rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.tab-btn.active, .cc-tab-btn.active, .task-tab-btn.active {
    background: var(--text-color) !important;
    color: #000 !important;
}

.profile-section {
    display: none;
}

.profile-section.active {
    display: block;
    overflow-y: auto;
    flex: 1;
}

/* Avatar History Navigation */
.user-profile-avatar-side {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.up-nav-btn-side {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.4);
    border: none;
    color: #fff;
    padding: 15px 8px;
    cursor: pointer;
    z-index: 5;
    opacity: 0.2;
    transition: all 0.2s;
    border-radius: 4px;
    font-size: 1.2rem;
}

.user-profile-avatar-side:hover .up-nav-btn-side {
    opacity: 0.8;
}

.up-nav-btn-side:hover {
    background: rgba(0,0,0,0.8) !important;
    opacity: 1 !important;
    color: var(--accent-color);
}

.up-prev { left: 5px; }
.up-next { right: 5px; }

.avatar-preview {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--accent-color);
    display: block;
    margin: 0 auto 15px;
}

.upload-zone {
    border: 2px dashed var(--border-color);
    padding: 20px;
    text-align: center;
    margin-bottom: 15px;
    cursor: pointer;
    border-radius: 8px;
    transition: background 0.2s;
}

.upload-zone:hover, .upload-zone.dragover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--accent-color);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 15px;
    max-height: 500px;
    overflow-y: auto;
    margin-top: 15px;
}

.gallery-item {
    position: relative;
    cursor: pointer;
}

.gallery-item img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    border-radius: 4px;
    border: 2px solid transparent;
}

.gallery-item.active img {
    border-color: var(--accent-color);
}

.gallery-item:hover img {
    opacity: 0.8;
}

.gallery-actions {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0,0,0,0.7);
    display: none;
    justify-content: center;
    padding: 2px;
}

.gallery-item:hover .gallery-actions {
    display: flex;
}

.btn-icon-sm {
    background: transparent;
    border: none;
    color: #fff;
    padding: 5px 10px;
    font-size: 18px;
}

.btn-icon-sm:hover {
    color: #fff;
}

/* Camera */
#camera-view {
    text-align: center;
}

#camera-stream {
    width: 100%;
    max-width: 400px;
    background: #000;
    border: 1px solid var(--border-color);
}

#camera-canvas {
    display: none;
}

/* User Manager Permissions & Actions */
.badge-icon {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    margin-right: 4px;
    font-size: 14px;
}

.badge-icon.success {
    background: rgba(40, 167, 69, 0.2);
    color: #28a745;
    border: 1px solid #28a745;
}

.badge-icon.danger {
    background: rgba(220, 53, 69, 0.2);
    color: #dc3545;
    border: 1px solid #dc3545;
}

.text-success { color: #28a745 !important; }
.text-danger { color: #dc3545 !important; }

.actions-cell {
    display: flex;
    gap: 8px;
    align-items: center;
    white-space: nowrap;
}

.btn-icon {
    padding: 6px 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-toggle-perm {
    background: transparent;
    border: 1px solid #444;
    color: #666;
    padding: 8px 12px;
    margin: 5px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex: 1 0 40%;
    min-width: 140px;
}

.btn-toggle-perm[data-active="true"] {
    background: rgba(40, 167, 69, 0.1);
    color: #28a745;
    border-color: #28a745;
}

.btn-toggle-perm[data-active="false"] {
    background: rgba(220, 53, 69, 0.1);
    color: #dc3545;
    border-color: #dc3545;
}

/* Uploader Step Scrolling */
#upload-step-1, #upload-step-2, #upload-step-3, #upload-step-saving, #upload-step-success {
    display: flex;
    flex-direction: column;
    flex: 1;
    overflow-y: auto;
    min-height: 0;
    padding-right: 5px; /* Spacing for scrollbar */
}

#upload-metadata-review {
    display: flex;
    flex-direction: column;
    height: 100%;
}

#upload-groups-container {
    flex: 1;
}

.track-item-grid {
    display: grid;
    grid-template-columns: 2fr 3fr 60px 60px 80px 100px;
    gap: 10px;
    align-items: center;
}

.track-duration {
    font-size: 0.8rem;
    color: #888;
    text-align: center;
}

.track-actions {
    display: flex;
    gap: 5px;
    justify-content: flex-end;
}

@media (max-width: 768px) {
    .track-item-grid {
        grid-template-columns: 1fr;
        gap: 5px;
    }

    .track-duration {
        text-align: left;
        margin-left: 5px;
    }

    .track-actions {
        justify-content: flex-start;
        margin-top: 5px;
    }

    .upload-group > div {
        flex-direction: column !important;
        align-items: center;
    }

    .upload-group > div > div {
        width: 100% !important;
    }
}

.btn-remove-track, .btn-remove-group {
    opacity: 0.5;
    transition: opacity 0.2s, transform 0.2s;
}

.btn-remove-track:hover, .btn-remove-group:hover {
    opacity: 1;
    transform: scale(1.1);
}

.upload-group {
    position: relative;
    transition: transform 0.2s, box-shadow 0.2s;
}

#upload-active-file-row .file-upload-row {
    border: 2px solid var(--text-color);
    background: rgba(212, 175, 55, 0.05);
    box-shadow: 0 0 15px rgba(212, 175, 55, 0.1);
}

#upload-step-indicator {
    text-transform: uppercase;
    letter-spacing: 2px;
    background: linear-gradient(90deg, rgba(212, 175, 55, 0.2), transparent);
    padding: 10px 15px !important;
}

.upload-group:hover {
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.1);
}

.track-item {
    transition: background-color 0.2s;
}

.track-item:hover {
    background-color: rgba(255, 255, 255, 0.03);
}

.track-item input {
    margin-bottom: 0 !important;
}

.group-art-gallery img {
    transition: transform 0.2s, border-color 0.2s;
    object-fit: cover;
}

.group-art-gallery img:hover {
    transform: scale(1.5);
    border-color: var(--accent-color) !important;
    z-index: 100;
    position: relative;
    box-shadow: 0 0 30px rgba(0,0,0,1);
    outline: 2px solid var(--accent-color);
}

.group-art-preview {
    box-shadow: 0 0 10px rgba(0,0,0,0.5);
    transition: opacity 0.3s;
}

.group-art-preview:hover {
    opacity: 0.9;
}

/* Image Viewer Modal */
#image-viewer-modal {
    display: none;
    position: fixed;
    z-index: 4000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background-color: rgba(0,0,0,0.9);
}

.close-image-viewer {
    position: absolute;
    top: 15px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
    cursor: pointer;
    z-index: 4001;
}

.close-image-viewer:hover,
.close-image-viewer:focus {
    color: #fff;
    text-decoration: none;
}

#full-image {
    margin: auto;
    display: block;
    width: auto;
    max-width: 90%;
    max-height: 90vh;
    object-fit: contain;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 0 0 20px rgba(0,0,0,0.5);
    border: 1px solid rgba(212, 175, 55, 0.3);
}

/* @Mentions Autocomplete */
.mention-autocomplete {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: #222;
    border: 1px solid var(--border-color);
    border-top: none;
    max-height: 200px;
    overflow-y: auto;
    z-index: 1100;
    border-radius: 0 0 8px 8px;
    display: none;
    box-shadow: 0 4px 10px rgba(0,0,0,0.5);
}

.mention-item {
    padding: 8px 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 1px solid rgba(212, 175, 55, 0.1);
}

.mention-item:hover, .mention-item.active {
    background: rgba(212, 175, 55, 0.2);
}

.mention-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    object-fit: cover;
}

.mention-name {
    color: #fff;
    font-weight: bold;
}

/* Reply UI */
.reply-indicator {
    background: rgba(212, 175, 55, 0.1);
    border-bottom: 1px solid var(--border-color);
    padding: 5px 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    color: var(--text-color);
}

.chat-card-reply-to {
    font-size: 0.75rem;
    color: #888;
    margin-bottom: 5px;
    display: flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
}

.chat-card-reply-to:hover {
    color: var(--text-color);
}

.reply-preview-overlay {
    position: absolute;
    top: 45px;
    left: 10px;
    right: 10px;
    background: #1a1a1a;
    border: 1px solid var(--border-color);
    padding: 10px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.8);
    z-index: 1000;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s;
}

.chat-card-reply-to:hover + .reply-preview-overlay,
.reply-preview-overlay.visible {
    opacity: 1;
}

.border-none { border: none !important; }

.chat-container-card {
    border: none !important;
    background: transparent !important;
    box-shadow: none !important;
    padding-top: 0 !important;
}

#chat-input-area {
    padding: 0;
    box-sizing: border-box;
}

#chat-message, #chat-input {
    max-width: 100%;
    min-width: 0;
}

#chat-message:focus, #chat-input:focus {
    outline: none !important;
    border: 1px solid #fff !important;
    background-color: var(--bg-color) !important;
    color: var(--text-color) !important;
}

#chat-message {
    margin-bottom: 0 !important;
    resize: none;
    overflow-y: auto;
}

/* Modernized Now Playing */
.now-playing-card {
    background: linear-gradient(135deg, #1a1a1a 0%, #0d0d0d 100%);
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    padding: 1rem !important;
}

.player-header-row {
    display: grid;
    /* Symmetric columns ensure the center column is perfectly centered in the card */
    grid-template-columns: minmax(var(--side-width, 0px), 1fr) minmax(0, auto) minmax(var(--side-width, 0px), 1fr);
    align-items: center;
    gap: 15px;
    width: 100%;
    margin-bottom: 0;
}

.header-side-left {
    display: flex;
    justify-content: flex-start;
    min-width: 0;
}

.header-side-right {
    display: flex;
    justify-content: flex-end;
    min-width: 0;
}

.glass-glow {
    position: relative;
    border: none !important;
    box-shadow: 0 0 20px rgba(212, 175, 55, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.glass-glow:hover {
    transform: scale(1.02);
    box-shadow: 0 0 30px rgba(212, 175, 55, 0.4);
}

.song-title-modern {
    font-size: clamp(1rem, 6cqw, 1.8rem);
    font-weight: 800;
    color: #fff;
    margin-bottom: 0.2rem;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    position: relative;
    text-align: center;
    width: 100%;
}

.marquee-active {
    text-overflow: clip !important;
}

.marquee-content {
    display: inline-block;
    will-change: transform;
}

.marquee-active .marquee-content {
    animation: marquee-bounce 10s linear infinite alternate;
}

@keyframes marquee-bounce {
    0%, 20% {
        transform: translateX(0);
    }
    80%, 100% {
        transform: translateX(var(--scroll-amount, 0));
    }
}

.song-artist-modern {
    font-size: 1.2rem;
    color: var(--text-color);
    margin-bottom: 0;
    opacity: 0.9;
}

.player-header-modern {
    text-align: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(212, 175, 55, 0.2);
    container-type: inline-size;
}

.player-art-side {
    display: flex;
    justify-content: flex-start;
    align-items: flex-start;
}

.player-lyrics-side {
    display: flex;
    flex-direction: column;
    height: 250px; /* Match flip-card height */
    flex: 1;
    position: relative;
}

#btn-resume-lyrics {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(212, 175, 55, 0.8);
    color: #000;
    border: none;
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: bold;
    cursor: pointer;
    z-index: 10;
    transition: all 0.2s ease;
    box-shadow: 0 4px 15px rgba(0,0,0,0.5);
    white-space: nowrap;
}

#btn-resume-lyrics:hover {
    background: rgba(212, 175, 55, 1);
    transform: translateX(-50%) scale(1.05);
}

.lyrics-container {
    height: 100%;
    width: 100%;
    overflow-y: auto;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(212, 175, 55, 0.1);
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none;  /* IE and Edge */
    scroll-behavior: smooth;
    box-sizing: border-box;
}

.lyrics-container::-webkit-scrollbar {
    display: none; /* Chrome, Safari and Opera */
}

.lyrics-line {
    font-size: 1.1rem;
    color: #ccc;
    margin-bottom: 15px;
    line-height: 1.4;
}

.progress-bar-modern {
    width: 100%;
    height: 8px;
    background: #222;
    border-radius: 4px;
    margin-top: 10px;
    overflow: hidden;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.5);
}

.time-container {
    display: flex;
    justify-content: space-between;
    margin-top: 8px;
    font-family: 'Courier New', monospace;
    font-weight: bold;
    font-size: 0.9rem;
}

#np-time-remaining {
    color: #fff;
    font-size: 1.1rem;
}

.player-actions {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 10px;
}


.actions-badges {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.badge-action {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.2s ease;
    border: none;
    background: rgba(212, 175, 55, 0.1);
    color: var(--text-color);
    cursor: pointer;
}

.badge-action:hover {
    background: var(--text-color);
    color: #000;
    transform: translateY(-1px);
}

.badge-blue {
    background: rgba(33, 150, 243, 0.1);
    color: #2196F3;
}

.badge-blue:hover {
    background: #2196F3;
    color: #fff;
}

.badge-red {
    background: rgba(244, 67, 54, 0.1);
    color: #f44336;
}

.badge-red:hover {
    background: #f44336;
    color: #fff;
}

.badge-gold {
    background: #D4AF37 !important;
    color: #000 !important;
}

.badge-gold:hover {
    background: #bfa030 !important;
}

.btn-top-10 {
    background: #D4AF37 !important;
    color: #000 !important;
    border: none !important;
    padding: 4px 8px !important;
    border-radius: 4px !important;
    font-size: 0.7rem !important;
    font-weight: bold !important;
    cursor: pointer !important;
    transition: all 0.2s !important;
    display: inline-flex;
    align-items: center !important;
    gap: 4px !important;
    height: auto !important;
    line-height: 1 !important;
    text-transform: uppercase !important;
    letter-spacing: normal !important;
}

.btn-top-10:hover {
    background: #fff;
    transform: translateY(-1px);
}

/* Flip Card Styling */
.flip-card {
    background-color: transparent;
    width: 250px;
    height: 250px;
    perspective: 1000px;
    margin: 0;
    /* Ensure outer container doesn't jitter during child 3D transforms */
    -webkit-font-smoothing: subpixel-antialiased;
}

.flip-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: center;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    transform-style: preserve-3d;
    will-change: transform;
}

.flip-card:hover .flip-card-inner {
    transform: rotateY(180deg);
}

.flip-card-front, .flip-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    border-radius: 8px;
}

.flip-card-front {
    background-color: #111;
    color: black;
    display: flex;
    align-items: center;
    justify-content: center;
    transform: rotateY(0deg); /* Explicitly set for stability */
}

.flip-card-back {
    background: linear-gradient(135deg, #222 0%, #111 100%);
    color: white;
    transform: rotateY(180deg);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
    border: 1px solid rgba(212, 175, 55, 0.3);
}

.back-content h3 {
    color: var(--text-color);
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid rgba(212, 175, 55, 0.2);
    padding-bottom: 0.5rem;
}

.stat-row {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 12px;
    font-size: 1rem;
    text-align: left;
}

.stat-row i {
    color: var(--text-color);
    font-size: 1.2rem;
    width: 24px;
    text-align: center;
}

.source-row {
    margin-top: 15px;
    padding-top: 10px;
    border-top: 1px solid rgba(212, 175, 55, 0.2);
    position: relative;
}

.edited-badge {
    background-color: #4caf50;
    color: #000;
    font-size: 0.6rem;
    padding: 1px 4px;
    border-radius: 3px;
    font-weight: bold;
    margin-right: 8px;
    display: inline-block;
    line-height: 1;
    text-transform: uppercase;
}

.queue-item-card.history-insertion {
    background: linear-gradient(90deg, #001f3f 0%, #000b1a 100%);
    border-color: #007bff !important;
}

.queue-item-card.history-insertion .h-list-title {
    color: #fff !important;
}

.queue-item-card.ident-insertion {
    background: linear-gradient(90deg, #072a0a 0%, #031004 100%);
    border-color: #4caf50 !important;
}

.queue-item-card.ident-insertion .h-list-title {
    color: #fff !important;
}

.history-label {
    background: #007bff;
    color: #fff;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: bold;
    text-transform: uppercase;
}

@keyframes reaction-pulse {
    0% { transform: scale(1); filter: drop-shadow(0 0 0 var(--pulse-color)); }
    50% { transform: scale(1.1); filter: drop-shadow(0 0 5px var(--pulse-color)); }
    100% { transform: scale(1); filter: drop-shadow(0 0 0 var(--pulse-color)); }
}

@keyframes flash-message {
    0% { background-color: rgba(212, 175, 55, 0.4); }
    100% { background-color: rgba(212, 175, 55, 0.05); }
}

.flash-message {
    animation: flash-message 2s ease-out;
}

.btn-react.pulse {
    animation: reaction-pulse 2s infinite ease-in-out;
}

.btn-react.pulse-like { --pulse-color: #2196F3; color: #2196F3 !important; }
.btn-react.pulse-dislike { --pulse-color: #ff9800; color: #ff9800 !important; }
.btn-react.pulse-laughing { --pulse-color: #ffeb3b; color: #ffeb3b !important; }
.btn-react.pulse-sad { --pulse-color: #03a9f4; color: #03a9f4 !important; }
.btn-react.pulse-angry { --pulse-color: #f44336; color: #f44336 !important; }
.btn-react.pulse-celebrate { --pulse-color: #9c27b0; color: #9c27b0 !important; }

.source-row #np-source {
    font-size: 0.85rem;
    opacity: 0.8;
}

.stat-row strong {
    color: #fff;
    margin-left: auto;
}

/* Online Users Section */
.online-users-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.online-user-card {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(255, 255, 255, 0.05);
    padding: 8px 15px;
    border-radius: 50px;
    border: 1px solid rgba(212, 175, 55, 0.2);
    transition: all 0.2s ease;
}

.online-user-card {
    cursor: pointer;
}

.online-user-card:hover {
    background: rgba(212, 175, 55, 0.1);
    border-color: var(--text-color);
    transform: translateY(-2px);
}

.online-user-card .online-user-info {
    display: none;
}

.online-user-card:hover .online-user-info {
    display: flex;
}

.online-user-avatar-container {
    position: relative;
    width: 40px;
    height: 40px;
}

.online-user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(212, 175, 55, 0.3);
    transition: border-color 0.2s;
}

.online-user-card:hover .online-user-avatar {
    border-color: var(--text-color);
}

.status-dot {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid #1a1a1a;
    display: block;
}

.status-dot.status-active { background-color: #4caf50; box-shadow: 0 0 5px #4caf50; }
.status-dot.status-idle { background-color: #ff9800; box-shadow: 0 0 5px #ff9800; }
.status-dot.status-away { background-color: #9e9e9e; }

.online-user-info {
    display: flex;
    flex-direction: column;
}

.online-user-name {
    font-weight: bold;
    font-size: 0.9rem;
    color: #fff;
    white-space: nowrap;
}

.status-badge {
    font-size: 0.65rem;
    text-transform: uppercase;
    font-weight: 800;
    letter-spacing: 0.5px;
}

.status-badge.status-active { color: #4caf50; }
.status-badge.status-idle { color: #ff9800; }
.status-badge.status-away { color: #9e9e9e; }

/* Task Notes Styles */
.task-notes-section {
    margin-top: 15px;
    padding-top: 10px;
    border-top: 1px solid rgba(212, 175, 55, 0.2);
    width: 100%;
}

.task-notes-header {
    font-size: 0.8rem;
    color: var(--text-color);
    margin-bottom: 8px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.task-note-item {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 4px;
    padding: 8px 12px;
    margin-bottom: 8px;
    font-size: 0.85rem;
    position: relative;
    border-left: 2px solid var(--accent-color);
}

.task-note-author {
    font-weight: bold;
    color: #fff;
    font-size: 0.75rem;
    margin-bottom: 3px;
}

.task-note-text {
    line-height: 1.4;
}

.task-note-meta {
    font-size: 0.7rem;
    color: #888;
    margin-top: 4px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.task-note-actions {
    display: flex;
    gap: 8px;
}

.btn-note-action {
    background: transparent;
    border: none;
    color: #888;
    cursor: pointer;
    font-size: 0.7rem;
    padding: 0;
    transition: color 0.2s;
}

.btn-note-action:hover {
    color: #fff;
}

.btn-note-action.delete:hover {
    color: #f44336;
}

.add-note-container {
    margin-top: 10px;
    display: flex;
    gap: 8px;
}

.add-note-input {
    flex: 1;
    background: #222;
    border: 1px solid #444;
    color: #fff;
    padding: 6px 10px;
    border-radius: 4px;
    font-size: 0.85rem;
    margin-bottom: 0 !important;
}

.btn-add-note {
    background: var(--accent-color);
    color: #000;
    font-weight: bold;
    font-size: 0.75rem;
    padding: 6px 12px;
    border-radius: 4px;
    border: none;
    cursor: pointer;
}

.btn-ban-guest {
    display: none;
    margin-left: 10px;
}

.online-user-card:hover .btn-ban-guest {
    display: inline-block;
}

.online-user-card.guest-card {
    border-style: dashed;
}

/* Hierarchical List (NOTSAM style) */
.hierarchical-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Unique Task Item Style */
.task-item {
    display: flex !important;
    align-items: flex-start !important;
    background: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid var(--border-color) !important;
    border-radius: 8px !important;
    padding: 20px !important;
    margin-bottom: 15px !important;
    height: auto !important;
    min-height: 80px !important;
    box-sizing: border-box !important;
    flex-direction: column !important;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
    width: 100%;
}

.task-item:hover {
    background: rgba(212, 175, 55, 0.1) !important;
    border-color: #fff !important;
}

/* Unique Milestone Item Style */
.milestone-item {
    display: flex !important;
    flex-direction: column !important;
    padding: 20px !important;
    border-left: 4px solid var(--accent-color) !important;
    border-right: 1px solid var(--border-color) !important;
    border-top: 1px solid var(--border-color) !important;
    border-bottom: 1px solid var(--border-color) !important;
    border-radius: 8px !important;
    margin-bottom: 15px !important;
    background: rgba(255, 255, 255, 0.03) !important;
    height: auto !important;
    transition: all 0.2s ease;
}

.milestone-item:hover {
    background: rgba(212, 175, 55, 0.05) !important;
}

.h-list-item {
    display: flex !important;
    align-items: flex-start !important;
    background: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid var(--border-color) !important;
    border-radius: 8px !important;
    padding: 10px !important;
    min-height: 60px !important;
    box-sizing: border-box !important;
    flex-shrink: 0 !important;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.h-list-item:hover {
    background: rgba(212, 175, 55, 0.1);
    border-color: #fff;
}

.h-list-art {
    width: 50px;
    height: 50px;
    flex-shrink: 0;
    margin-right: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000;
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}

.h-list-art img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.h-list-art i {
    font-size: 1.5rem;
    color: var(--text-color);
}

.h-list-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.h-list-title {
    font-weight: bold;
    color: #fff !important;
    white-space: normal;
    font-size: 0.9rem;
    line-height: 1.2;
}

.h-list-title.expanded {
    white-space: normal;
    word-break: break-word;
}

.h-list-subtitle {
    font-size: 0.75rem;
    color: #888;
    white-space: normal;
}

.h-list-meta {
    font-size: 0.8rem;
    color: var(--text-color);
    white-space: normal;
}

.path-badge {
    background-color: #000;
    color: #fff;
    font-family: 'Courier New', Courier, monospace;
    padding: 1px 4px;
    border-radius: 3px;
    font-size: 0.7rem;
    display: inline-block;
    margin-top: 1px;
    word-break: break-all;
    border: 1px solid #444;
}

@keyframes pulse-ttl-red {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

.pulse-ttl-red {
    animation: pulse-ttl-red 1s infinite ease-in-out;
}

.h-list-action {
    margin-left: 10px;
    color: #555;
    align-self: flex-start;
    flex-shrink: 0;
    white-space: nowrap;
}

.h-list-item:hover .h-list-action {
    color: var(--text-color);
}

/* Song Manager Specific List Items (Compact) */
.sm-list-item {
    display: flex !important;
    align-items: center !important;
    background: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid var(--border-color) !important;
    border-radius: 6px !important;
    padding: 5px 10px !important;
    height: 80px !important;
    min-height: 80px !important;
    box-sizing: border-box !important;
    flex-shrink: 0 !important;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.sm-list-item:hover {
    background: rgba(212, 175, 55, 0.1);
    border-color: #fff;
}

.sm-list-art {
    width: 70px;
    height: 70px;
    flex-shrink: 0;
    margin-right: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000;
    border-radius: 4px;
    overflow: hidden;
}

.sm-list-art img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sm-list-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.sm-list-title {
    font-weight: bold;
    color: #fff !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 1.1rem;
    line-height: 1.2;
}

.sm-list-subtitle {
    font-size: 1rem;
    color: #888;
    white-space: nowrap;
    margin-top: 7px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sm-list-meta {
    font-size: 0.65rem;
    color: var(--text-color);
    opacity: 0.6;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Breadcrumbs */
.breadcrumbs {
    background: rgba(0,0,0,0.3);
    padding: 10px;
    border-radius: 8px;
    margin-bottom: 15px;
    border: 1px solid rgba(212, 175, 55, 0.1);
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.bc-badge {
    background-color: var(--text-color);
    color: #000;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid var(--text-color);
}

.bc-badge:hover {
    background-color: #fff;
    border-color: #fff;
    transform: translateY(-1px);
}

.bc-badge.active {
    background-color: transparent;
    color: var(--text-color);
    cursor: default;
}

.bc-badge.active:hover {
    transform: none;
}

.bc-sep {
    font-size: 0.7rem;
    color: #555;
}

.request-tab-btn.active {
    border-bottom-color: var(--accent-color) !important;
    color: #fff !important;
}

/* Prohibited Overlay */
.prohibited-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding: 10px 20px;
    box-sizing: border-box;
    text-align: right;
    z-index: 10;
    pointer-events: none;
}

.prohibited-reason {
    color: #fff;
    font-size: 0.9rem;
    font-weight: bold;
    line-height: 1.2;
    text-transform: uppercase;
    text-shadow: 1px 1px 3px #000;
}

.h-list-item.prohibited {
    cursor: not-allowed;
}

.h-list-item.prohibited .h-list-info {
    opacity: 0.5;
}

#request-search, #wizard-search {
    margin-bottom: 10px;
    width: 100%;
}

#request-results-container, #request-tab-wizard {
    overflow-y: auto;
    overflow-x: hidden;
    flex: 1;
    min-height: 0; /* Important for flex child to be scrollable */
}

.wizard-status-bar {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 15px;
    display: flex;
    align-items: center;
    gap: 15px;
    transition: all 0.3s ease;
    font-weight: bold;
}

.wizard-status-bar i {
    font-size: 1.5rem;
    transition: transform 0.5s ease;
}

.wizard-status-bar.active {
    background: linear-gradient(90deg, rgba(212, 175, 55, 0.1), rgba(200, 16, 46, 0.1));
    border-color: var(--text-color);
    color: #fff;
    box-shadow: 0 0 15px rgba(212, 175, 55, 0.1);
}

.wizard-status-bar.active i {
    color: var(--text-color);
    text-shadow: 0 0 10px var(--text-color);
    transform: rotate(360deg);
}

.wizard-status-bar.inactive {
    background: rgba(0, 0, 0, 0.3);
    border-color: #444;
    color: #888;
    filter: grayscale(1);
}

.wizard-status-bar.inactive i {
    color: #555;
}

/* Wizard Count Badge */
.online-user-wizard-badge {
    background: var(--accent-color);
    color: #fff;
    font-size: 0.6rem;
    padding: 1px 4px;
    border-radius: 10px;
    font-weight: bold;
    position: absolute;
    top: -5px;
    right: -5px;
    z-index: 5;
    border: 1px solid #000;
}

.online-user-wizard-badge.inactive {
    background: #888;
}

@keyframes pager-pulse {
    0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(200, 16, 46, 0.7); }
    70% { transform: scale(1.1); box-shadow: 0 0 0 10px rgba(200, 16, 46, 0); }
    100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(200, 16, 46, 0); }
}

#btn-header-pager.pulse {
    animation: pager-pulse 2s infinite;
    border-color: var(--accent-color);
    background: rgba(200, 16, 46, 0.2);
}

#btn-header-pager.pulse i {
    color: #fff;
}

/* Wizard Move Buttons */
.btn-wizard-move {
    background: #333;
    color: #fff;
    border: 1px solid #444;
}

.btn-wizard-move.disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.tab-badge {
    background: var(--accent-color);
    color: #fff;
    font-size: 0.6rem;
    padding: 1px 4px;
    border-radius: 10px;
    vertical-align: top;
    margin-left: 2px;
}

.live-pulse-white {
    animation: livePulseWhite 2s infinite alternate;
    font-weight: bold;
}

@keyframes livePulseWhite {
    from { color: var(--accent-color); }
    to { color: #fff; }
}

.search-hint {
    text-align: center;
    color: #888;
    padding: 40px 20px;
    font-style: italic;
    width: 100%;
}

/* Queue Section Styles */
.queue-header {
    user-select: none;
    transition: background 0.2s;
}

.queue-header:hover {
    background: rgba(255, 255, 255, 0.05);
}

.queue-content {
    border-top: 1px solid rgba(212, 175, 55, 0.2);
    padding-top: 15px;
    margin-top: 15px;
    max-height: 400px;
    overflow-y: auto;
    overflow-x: hidden;
}

.queue-item-card {
    display: flex;
    align-items: center;
    padding: 10px;
    border-radius: 8px;
    margin-bottom: 8px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(212, 175, 55, 0.1);
    transition: transform 0.2s, background 0.2s;
}

.queue-item-card:hover {
    background: rgba(255, 255, 255, 0.06);
    transform: translateX(5px);
}

.queue-item-card.user-request {
    background: linear-gradient(90deg, #4a0404 0%, #2a0202 100%);
    border-color: #c8102e;
}

.queue-item-card.notsam-filler {
    background: linear-gradient(90deg, #2e0854 0%, #1a052e 100%);
    border-color: #9370db;
}

.queue-item-card.user-request .h-list-title,
.queue-item-card.notsam-filler .h-list-title {
    color: #fff;
}

.queue-item-card.user-request .h-list-subtitle,
.queue-item-card.user-request .h-list-meta,
.queue-item-card.notsam-filler .h-list-subtitle,
.queue-item-card.notsam-filler .h-list-meta {
    color: #e0e0e0;
}

.queue-art {
    width: 45px;
    height: 45px;
    border-radius: 4px;
    margin-right: 15px;
    object-fit: cover;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.queue-info {
    flex: 1;
    min-width: 0;
}

.queue-time-badge {
    text-align: right;
    font-size: 0.8rem;
    color: var(--text-color);
    margin-left: 10px;
    min-width: 100px;
}

.queue-remove-btn {
    background: transparent;
    border: 1px solid #c8102e;
    color: #c8102e;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.7rem;
    margin-left: 0;
    cursor: pointer;
    transition: all 0.2s;
}

.queue-remove-btn:hover {
    background: #c8102e;
    color: #fff;
}

.queue-wizard-btn {
    background: transparent;
    border: 1px solid #9370db;
    color: #9370db;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.7rem;
    margin-left: 0;
    cursor: pointer;
    transition: all 0.2s;
}

.queue-wizard-btn:hover {
    background: #9370db;
    color: #fff;
}

.user-request-label {
    background: #c8102e;
    color: #fff;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: bold;
    text-transform: uppercase;
    margin-left: 5px;
    display: inline-block;
}

.notsam-filler-label {
    background: #9370db;
    color: #fff;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: bold;
    text-transform: uppercase;
    display: inline-block;
}

.ident-label {
    background: #4caf50;
    color: #000;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: bold;
    text-transform: uppercase;
    display: inline-block;
}

.spotlight-voters-list {
    background: rgba(0, 0, 0, 0.3);
    padding: 8px 15px;
    border-bottom-left-radius: 8px;
    border-bottom-right-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-top: none;
    font-size: 0.85rem;
    color: #aaa;
    line-height: 1.4;
}

.spotlight-voters-list i {
    color: var(--text-color);
    margin-right: 5px;
}

.btn-fave-main:hover {
    transform: scale(1.2);
}

.btn-fave-main i.fas {
    color: #ff4b2b;
    filter: drop-shadow(0 0 5px rgba(255, 75, 43, 0.5));
}

.rating-option:hover {
    transform: translateY(-5px);
}

.rating-option:hover .rating-emoji {
    filter: drop-shadow(0 0 8px var(--accent-color));
}

.btn-toggle-fave-list {
    background: none;
    border: none;
    color: #ff4b2b;
    cursor: pointer;
    font-size: 1rem;
    padding: 5px;
    transition: transform 0.2s;
}

.btn-toggle-fave-list:hover {
    transform: scale(1.2);
}

#np-requester.user-request-label {
    margin-left: 0;
}

.logged-in .clickable-meta {
    cursor: pointer;
    transition: color 0.2s, text-decoration 0.2s;
}

.logged-in .clickable-meta:hover {
    text-decoration: underline;
    color: #fff !important;
}

/* --- Command Centre (NOTSAM) Styles --- */
#pane-notsam {
    padding: 0;
    overflow: hidden;
}

.cc-container {
    width: 100%;
    height: 100%;
    display: grid;
    grid-template-columns: 1fr 1.2fr 1fr;
    grid-template-rows: 1fr 150px;
    gap: 1rem;
    padding: 1rem;
    box-sizing: border-box;
}

.cc-pane {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    height: 100%;
}

.cc-pane-header {
    padding: 10px;
    border-bottom: 1px solid var(--border-color);
    background: rgba(255,255,255,0.05);
    font-weight: bold;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cc-pane-content {
    flex: 1;
    overflow-y: auto;
    padding: 10px;
}

.cc-logger-container {
    grid-column: 1 / span 2;
    grid-row: 2;
    background: #000;
    border: 1px solid var(--border-color);
    padding: 5px;
    overflow-y: auto;
    font-family: monospace;
    font-size: 0.8rem;
    color: #ccc;
    border-radius: 8px;
}

.cc-pane-right {
    grid-column: 3;
    grid-row: 1 / span 2;
}

.cc-log-entry {
    border-bottom: 1px solid #222;
    padding: 2px 0;
}

/* CC Player Styles */
.cc-player {
    display: flex;
    flex-direction: row;
    padding: 10px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 10px;
    gap: 15px;
    align-items: flex-start;
}

.cc-art-container {
    flex: 0 0 120px;
}

.cc-art-container img {
    width: 100%;
    border-radius: 4px;
    display: block;
}

.cc-meta-container {
    flex: 1;
    text-align: left;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Queue List in CC */
.cc-queue-item {
    background: rgba(0,0,0,0.2);
    border: 1px solid #333;
    padding: 8px;
    margin-bottom: 5px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: grab;
    position: relative;
}

.cc-queue-item:active {
    cursor: grabbing;
}

.cc-queue-item.dragging {
    opacity: 0.5;
    border: 1px dashed var(--accent-color);
}

/* Tab buttons for Library/History */
.cc-tab-nav {
    display: flex;
    background: rgba(0,0,0,0.2);
    border-bottom: 1px solid var(--border-color);
    gap: 5px;
}

.cc-search-item {
    display: flex;
    justify-content: space-between;
    padding: 8px;
    border-bottom: 1px solid #333;
}

.cc-search-item:hover {
    background: rgba(255,255,255,0.05);
}

.cc-history-item {
    padding: 8px;
    border-bottom: 1px solid #333;
    font-size: 0.9rem;
}

#cc-chat-list {
    flex: 1;
    overflow-y: auto;
    padding: 10px;
}

#cc-chat-input-container {
    padding: 10px;
    border-bottom: 1px solid var(--border-color);
    background: rgba(0,0,0,0.1);
}

#cc-chat-input {
    width: 100%;
    background-color: #222;
    border: 1px solid #444;
    color: #fff;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 0.9rem;
    transition: all 0.2s;
}

#cc-chat-input:focus {
    outline: none;
    border-color: var(--accent-color);
    background-color: #000;
    box-shadow: 0 0 5px rgba(212, 175, 55, 0.3);
}

#cc-chat-input::placeholder {
    color: #666;
}

/* Animations from NOTSAM */
@keyframes ccLockingPulse {
    0% { opacity: 0.4; }
    100% { opacity: 1; }
}

.cc-locking-pulse {
    animation: ccLockingPulse 0.5s infinite alternate;
}

@media (max-width: 768px) {
    #pane-notsam {
        display: none !important; /* Force hide on mobile as requested */
    }

    .h-list-item {
        flex-direction: column !important;
        align-items: stretch !important;
    }

    .h-list-action {
        margin-left: 0;
        margin-top: 10px;
        justify-content: flex-start !important;
        width: 100%;
        flex-wrap: wrap;
        white-space: normal;
    }
}

/* Song Ratings */
.rating-emojis {
    display: flex;
    justify-content: center;
    gap: 25px;
    margin: 20px 0;
    padding: 10px;
}

.rating-emoji {
    font-size: 3rem;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    opacity: 0.4;
    filter: grayscale(1);
}

.rating-emoji:hover {
    transform: scale(1.3);
    opacity: 1;
    filter: grayscale(0);
}

.rating-emoji.active {
    opacity: 1;
    filter: grayscale(0);
    transform: scale(1.3);
    text-shadow: 0 0 20px var(--accent-color);
}

.rating-option {
    cursor: pointer;
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: transform 0.2s;
}

.rating-label {
    font-size: 0.8rem;
    font-weight: bold;
    margin-top: 10px;
    color: #888;
    transition: color 0.2s;
}

.rating-option:hover .rating-label, .rating-option.active .rating-label {
    color: #fff;
}

.other-rating-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px;
    border-bottom: 1px solid rgba(212, 175, 55, 0.1);
}
.other-rating-item:last-child {
    border-bottom: none;
}
.other-rating-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 1px solid var(--border-color);
}
.other-rating-info {
    flex: 1;
    font-size: 0.85rem;
}
.other-rating-user {
    font-weight: bold;
    color: #fff;
}
.other-rating-stars {
    color: #ffd700;
    font-size: 0.8rem;
}

.rating-star-none {
    color: #666 !important;
}
.rating-star-others {
    color: #ffd700 !important;
}
.rating-star-mine {
    color: #ffd700 !important;
}

/* Chat Message Song Snapshot */
.chat-message-song-info {
    margin-top: 10px;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(212, 175, 55, 0.2);
    border-radius: 6px;
    padding: 10px;
    animation: chatSnapshotFadeIn 0.3s ease-out;
}

@keyframes chatSnapshotFadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.chat-song-info-content {
    display: flex;
    gap: 12px;
    align-items: center;
}

.chat-song-art {
    width: 60px;
    height: 60px;
    border-radius: 4px;
    object-fit: cover;
    border: 1px solid rgba(212, 175, 55, 0.3);
}

.chat-song-details {
    flex: 1;
    min-width: 0;
}

.chat-song-title {
    font-weight: bold;
    color: #fff;
    font-size: 0.9rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.2;
}

.chat-song-artist {
    color: var(--text-color);
    font-size: 0.8rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.chat-song-album {
    color: #888;
    font-size: 0.75rem;
    font-style: italic;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.chat-song-requester {
    margin-top: 4px;
    font-size: 0.65rem;
    color: var(--accent-color);
    text-transform: uppercase;
    font-weight: bold;
    letter-spacing: 0.5px;
}

.btn-song-toggle {
    color: var(--text-color) !important;
    opacity: 0.6;
}

.btn-song-toggle:hover {
    opacity: 1;
    color: #fff !important;
    transform: scale(1.2);
}

/* MAIN SITE Button */
.btn-main-site {
    background-color: var(--bg-color) !important;
    color: var(--text-color) !important;
    border: 1px solid var(--text-color) !important;
}

@keyframes pulse-gold-glow {
    0% { box-shadow: 0 0 5px rgba(212, 175, 55, 0.5); transform: scale(1); }
    50% { box-shadow: 0 0 30px rgba(212, 175, 55, 1); transform: scale(1.1); background-color: #fff; }
    100% { box-shadow: 0 0 5px rgba(212, 175, 55, 0.5); transform: scale(1); }
}

.pulse-gold {
    animation: pulse-gold-glow 1.5s infinite ease-in-out;
    border: 1px solid #fff !important;
}

@keyframes pulse-red-glow {
    0% { box-shadow: 0 0 5px rgba(200, 16, 46, 0.5); transform: scale(1); }
    50% { box-shadow: 0 0 30px rgba(200, 16, 46, 1); transform: scale(1.1); background-color: #ff4d4d; color: #fff; }
    100% { box-shadow: 0 0 5px rgba(200, 16, 46, 0.5); transform: scale(1); }
}

.pulse-red {
    animation: pulse-red-glow 1.5s infinite ease-in-out;
    border: 1px solid #ff4d4d !important;
}


/* Station Ident / Stats View */
.ident-stats-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    height: 100%;
    padding: 10px 20px;
    gap: 12px;
    animation: fadeIn 0.5s ease-out;
}

.ident-stat-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(212, 175, 55, 0.1);
    padding-bottom: 8px;
    transition: background 0.2s;
}

.ident-stat-row:hover {
    background: rgba(212, 175, 55, 0.05);
}

.ident-stat-label {
    font-size: 0.85rem;
    color: var(--text-color);
    text-transform: uppercase;
    font-weight: bold;
    letter-spacing: 1px;
    opacity: 0.8;
}

.ident-stat-value {
    font-size: 1.1rem;
    color: #fff;
    font-weight: bold;
    text-shadow: 0 0 10px rgba(212, 175, 55, 0.2);
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@media (max-width: 768px) {
    .ident-stats-container {
        padding: 20px 0;
    }
}

/* Profile Redesign Styles */
.profile-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.profile-column {
    display: flex;
    flex-direction: column;
}

.profile-group-title {
    color: var(--accent-color);
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 1px;
    margin-bottom: 15px;
    border-bottom: 1px solid rgba(200, 16, 46, 0.3);
    padding-bottom: 5px;
}

.profile-field {
    margin-bottom: 15px;
}

.profile-field label {
    display: block;
    margin-bottom: 5px;
    font-size: 0.8rem;
    color: #888;
    font-weight: bold;
}

.profile-field .sub-label {
    font-size: 0.7rem;
    color: #666;
    margin-bottom: 2px;
}

.profile-value-static {
    background: rgba(255, 255, 255, 0.05);
    padding: 8px 12px;
    border-radius: 4px;
    color: #fff;
    min-height: 1.2rem;
    border: 1px solid #333;
}

.flex-row { display: flex; }
.flex-1 { flex: 1; }
.align-center { align-items: center; }
.justify-end { justify-content: flex-end; }
.gap-10 { gap: 10px; }

.btn-accent {
    background: var(--accent-color);
    color: black;
    font-weight: bold;
    border: none;
    padding: 8px 20px;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-accent:hover {
    background: var(--accent-hover);
}

.migration-status-banner {
    background: rgba(40, 167, 69, 0.1);
    border: 1px solid #28a745;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    text-align: center;
}

.migration-status-banner i {
    font-size: 1.5rem;
    color: #28a745;
    margin-bottom: 10px;
    display: block;
}

.migration-date {
    font-weight: bold;
    color: #fff;
}

@media (max-width: 600px) {
    .profile-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
}

/* User Profile Modal */
.user-profile-header-flex {
    display: flex;
    padding: 20px;
    gap: 25px;
    background: linear-gradient(135deg, rgba(255,255,255,0.05) 0%, rgba(0,0,0,0) 100%);
}

.user-profile-avatar-side img {
    width: 150px;
    height: 150px;
    border-radius: 12px;
    object-fit: cover;
    border: 2px solid rgba(212, 175, 55, 0.3);
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

.user-profile-info-side {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.profile-mini-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-top: 5px;
}

.profile-mini-item label {
    display: block;
    font-size: 0.65rem;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 2px;
}

.profile-mini-item div {
    font-size: 0.9rem;
    color: #eee;
}

.social-link {
    transition: transform 0.2s, opacity 0.2s;
}

.social-link:hover {
    transform: scale(1.1);
    opacity: 0.8;
}

@media (max-width: 500px) {
    .user-profile-header-flex {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .profile-mini-grid {
        text-align: left;
    }

    #up-socials {
        justify-content: center;
    }
}

/* Global Red/White enforcement for labels and badges */
.badge-danger,
.badge-icon.danger,
.status-badge.danger,
.log-label-badge[style*="background: #f44336"],
.log-label-badge[style*="background: #800000"],
.log-label-badge[style*="background: #C8102E"],
.log-label-badge[style*="background: var(--accent-color)"],
.badge-time[style*="background: var(--accent-color)"],
.user-request-label,
.notsam-filler-label,
.btn-danger,
.btn-dark-red {
    color: white !important;
}

/* Ensure solid red background for danger badges if they aren't already */
.badge-icon.danger {
    background: #dc3545 !important;
}

/* Log Pane Filter Styles & Alignment Fix */
.log-filters {
    display: flex;
    gap: 10px;
    padding: 10px;
    background: rgba(255,255,255,0.05);
    border-bottom: 1px solid var(--border-color);
    flex-wrap: wrap;
    align-items: flex-end; /* Align all filter items to the bottom */
}

.log-filters > div {
    display: flex;
    flex-direction: column;
}

.log-filters label {
    font-size: 0.7rem;
    color: #888;
    text-transform: uppercase;
    display: block;
    margin-bottom: 5px;
}

.log-filters input, .log-filters select {
    margin-top: 0 !important; /* Managed by parent flex gap/margin */
    height: 38px; /* Force consistent height */
    padding: 8px 12px;
}

#btn-refresh-logs-pane {
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0;
}

/* Live Deejay On Air Styles */
.cc-btn-off-air {
    background-color: #800080 !important; /* Purple background */
    color: #fff !important; /* White text for better contrast on purple */
    font-weight: bold;
}

.cc-btn-on-air {
    background-color: #800000 !important;
    color: #ff0000 !important;
    font-weight: bold;
    animation: onAirFlash 1s infinite;
}

@keyframes onAirFlash {
    0% { color: #ff0000; text-shadow: 0 0 5px #ff0000; }
    50% { color: #800000; text-shadow: none; }
    100% { color: #ff0000; text-shadow: 0 0 5px #ff0000; }
}

.np-on-air-avatar-wrapper {
    position: relative;
    width: 75px;
    height: 75px;
}

#np-on-air-avatar {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 3px solid var(--accent-color);
    object-fit: cover;
    animation: avatarPulse 2s infinite;
}

@keyframes avatarPulse {
    0% { box-shadow: 0 0 0 0 rgba(212, 175, 55, 0.7); }
    70% { box-shadow: 0 0 0 15px rgba(212, 175, 55, 0); }
    100% { box-shadow: 0 0 0 0 rgba(212, 175, 55, 0); }
}

.np-on-air-badge {
    position: absolute;
    bottom: -5px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--accent-color);
    color: white;
    font-size: 0.6rem;
    padding: 1px 4px;
    border-radius: 4px;
    font-weight: bold;
    white-space: nowrap;
}

/* Live Show Info Card (Player side) */
.live-show-info-container {
    height: 100%;
    display: flex;
    flex-direction: column;
    padding: 20px;
    background: rgba(200, 16, 46, 0.05);
    border: 1px solid rgba(212, 175, 55, 0.1);
    border-radius: 8px;
    text-align: left;
}

.live-show-header h2 {
    margin: 0;
    color: #fff;
    font-size: 1.4rem;
}

#live-show-deejay {
    color: var(--accent-color);
    font-weight: bold;
    font-size: 1rem;
    margin-bottom: 15px;
}

.badge-show-type {
    display: inline-block;
    background: var(--accent-color);
    color: #fff;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: bold;
    text-transform: uppercase;
    margin-bottom: 10px;
}

.live-show-disclaimer {
    font-style: italic;
    color: #aaa;
    font-size: 0.85rem;
    margin-bottom: 15px;
    line-height: 1.4;
}

.live-show-time {
    font-size: 0.9rem;
    color: #fff;
    font-family: monospace;
}

.live-show-signature {
    margin-top: auto;
    font-family: 'Georgia', serif;
    font-style: italic;
    color: #ddd;
    border-top: 1px solid rgba(255,255,255,0.05);
    padding-top: 10px;
    font-size: 0.95rem;
}

.badge-on-air-large {
    display: inline-block;
    background: #f44336;
    color: white;
    padding: 2px 10px;
    border-radius: 4px;
    font-weight: bold;
    font-size: 0.8rem;
    letter-spacing: 1px;
    animation: livePulse 1s infinite;
}

/* Small Toggle Switch */
.switch-sm {
  position: relative;
  display: inline-block;
  width: 34px;
  height: 20px;
}

.switch-sm input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider-sm {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #333;
  transition: .4s;
  border-radius: 20px;
}

.slider-sm:before {
  position: absolute;
  content: "";
  height: 14px;
  width: 14px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .4s;
  border-radius: 50%;
}

input:checked + .slider-sm {
  background-color: var(--accent-color);
}

input:checked + .slider-sm:before {
  transform: translateX(14px);
}

/* Avatar Selector */
.avatar-select-item {
    flex: 0 0 60px;
    height: 60px;
    border-radius: 4px;
    border: 2px solid transparent;
    cursor: pointer;
    overflow: hidden;
    transition: border-color 0.2s;
}

.avatar-select-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.avatar-select-item.selected {
    border-color: var(--accent-color);
}

/* Compact Rating Star for Search Results */
.compact-rating-container {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    width: 32px;
    height: 32px;
    transition: all 0.2s;
    line-height: 1;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
}

.compact-rating-container:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-1px);
}

.compact-rating-container i {
    font-size: 22px;
}

.compact-rating-avg {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -35%);
    font-size: 0.75rem;
    font-weight: 900;
    pointer-events: none;
    white-space: nowrap;
}

.compact-rating-none i { color: #666; }
.compact-rating-none .compact-rating-avg { display: none; }

.compact-rating-others i { color: #ffd700; }
.compact-rating-others .compact-rating-avg { color: #fff; }

.compact-rating-mine i { color: #ffd700; }
.compact-rating-mine .compact-rating-avg { color: #000; }

/* Magic Request Styles */
#magic-search {
    background: rgba(0,0,0,0.4);
    border: 1px solid rgba(212, 175, 55, 0.3);
    color: #fff;
    transition: all 0.3s;
}

#magic-search:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 10px rgba(212, 175, 55, 0.2);
    background: rgba(0,0,0,0.6);
}

.fa-magic-spin {
    animation: magic-spin 2s infinite linear;
}

@keyframes magic-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes voice-pulse {
    0% { color: var(--text-color); transform: scale(1); }
    50% { color: var(--accent-color); transform: scale(1.2); }
    100% { color: var(--text-color); transform: scale(1); }
}

.voice-active i {
    animation: voice-pulse 1.5s infinite;
    color: var(--accent-color) !important;
}

#btn-magic-voice:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    filter: grayscale(1);
}

/* Spotlight Feature */
.spotlight-header {
    background: rgba(212, 175, 55, 0.1);
    border-bottom: 1px solid var(--border-color);
    padding: 10px 15px;
    color: var(--text-color);
    cursor: pointer;
    font-size: 0.9rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.2s;
    border-radius: 8px 8px 0 0;
    margin-bottom: 15px;
    font-weight: bold;
}

.spotlight-header:hover {
    background: rgba(212, 175, 55, 0.2);
    color: #fff;
}

.spotlight-header b {
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.np-spotlight-banner {
    background: rgba(212, 175, 55, 0.1);
    border: 1px solid var(--border-color);
    color: #fff;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    text-align: center;
    font-weight: bold;
    font-size: 1.6rem;
    animation: spotlightStunningPulse 2s infinite alternate ease-in-out;
}

@keyframes spotlightStunningPulse {
    0% {
        border-color: var(--accent-color);
        background-color: rgba(212, 175, 55, 0.2);
        box-shadow: 0 0 15px rgba(200, 16, 46, 0.4);
    }
    100% {
        border-color: #fff;
        background-color: rgba(200, 16, 46, 0.3);
        box-shadow: 0 0 30px rgba(200, 16, 46, 0.8), 0 0 10px rgba(255, 255, 255, 0.5);
    }
}

.leader-glow {
    animation: spotlightStunningPulse 1.5s infinite alternate ease-in-out;
}

.queue-item-card.spotlight-insertion {
    background: linear-gradient(90deg, #332200 0%, #110b00 100%);
    border-color: var(--text-color) !important;
}

.queue-item-card.spotlight-insertion .h-list-title {
    color: var(--text-color) !important;
}

.spotlight-label {
    background: var(--text-color);
    color: #000;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: bold;
    text-transform: uppercase;
    display: inline-block;
}

/* Mobile optimizations for Now Playing */
@media (max-width: 768px) {
    #np-time-elapsed,
    .time-sep,
    #np-time-total {
        display: none !important;
    }

    #np-time-remaining {
        margin-left: 0 !important;
    }

    #np-country-code {
        display: none !important;
    }

    .player-actions {
        justify-content: space-between;
        width: 100%;
        gap: 5px !important;
    }

    .player-actions .btn-text {
        display: none !important;
    }

    #np-rating-count {
        display: none !important;
    }

    /* Make buttons more compact on mobile */
    #btn-np-top-10,
    #btn-update-info,
    #btn-report-song,
    #np-rating-container,
    #np-country-container {
        padding: 6px 10px !important;
        min-width: 0 !important;
        gap: 0 !important;
    }

    #np-rating-container {
        gap: 5px !important; /* Keep gap between star and avg rating */
    }

    /* Album Art Full Width */
    .player-body {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .player-art-side {
        justify-content: center !important;
        margin-bottom: 20px;
        width: 100%;
    }
    .flip-card {
        width: 100% !important;
        height: auto !important;
        aspect-ratio: 1 / 1 !important;
    }
    .art-container img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
    }
}

/* Search Input Clear Button */
.search-container {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}

.search-container input {
    margin-bottom: 0 !important;
}

.clear-search-btn {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: #f44336;
    cursor: pointer;
    z-index: 5;
    display: none;
    font-size: 0.9rem;
    transition: opacity 0.2s;
}

.clear-search-btn:hover {
    opacity: 0.8;
}

/* Specific adjustment for inputs with clear button to avoid text overlap */
.search-container input {
    padding-right: 30px !important;
}

/* Magic search special case (with microphone) */
#magic-search-container input {
    padding-right: 70px !important;
}

#magic-search-container .clear-search-btn {
    right: 45px;
}

/* Upload Preview */
.upload-preview-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 8px;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(212, 175, 55, 0.1);
    border-bottom: none;
    border-radius: 4px 4px 0 0;
}

.upload-preview-item {
    position: relative;
    width: 60px;
    height: 60px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.2s;
}

.upload-preview-item:hover {
    transform: scale(1.05);
    border-color: #fff;
}

.upload-preview-item img, .upload-preview-item video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.upload-preview-remove {
    position: absolute;
    top: 2px;
    right: 2px;
    background: rgba(0, 0, 0, 0.7);
    color: #f44336;
    border: none;
    border-radius: 50%;
    width: 16px;
    height: 16px;
    font-size: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
}

.upload-preview-remove:hover {
    background: #f44336;
    color: #fff;
}

/* Shoutout Message and Confetti Animation */
.shoutout-message {
    border: 2px solid #ffed4a !important;
    background: rgba(255, 237, 74, 0.05) !important;
    position: relative;
    overflow: hidden;
}

.confetti-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.confetti {
    position: absolute;
    top: -10px;
    width: 8px;
    height: 8px;
    opacity: 0;
    animation: confetti-fall 4s ease-out forwards;
}

@keyframes confetti-fall {
    0% {
        transform: translateY(0) rotate(0deg);
        opacity: 1;
    }
    25% {
        opacity: 1;
    }
    100% {
        transform: translateY(400px) rotate(720deg);
        opacity: 0;
    }
}

/* Listener Stats Modal Styles */
#listener-stats-modal .stats-range-picker button {
    background: transparent;
    color: #888;
    border: none;
    padding: 5px 12px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: bold;
    font-size: 0.75rem;
}

#listener-stats-modal .stats-range-picker button.active {
    background: var(--accent-color);
    color: #000;
}

#listener-stats-modal .stats-range-picker button:hover:not(.active) {
    color: #fff;
    background: rgba(255,255,255,0.1);
}

#listener-stats-modal input[type="date"] {
    font-size: 0.75rem;
    padding: 4px 8px;
    height: 28px;
}

#listener-stats-modal .stat-card {
    transition: transform 0.2s, background 0.2s;
}

#listener-stats-modal .stat-card:hover {
    transform: translateY(-2px);
    background: rgba(255,255,255,0.05) !important;
}

@media (max-width: 768px) {
    #stats-summary-footer {
        grid-template-columns: 1fr 1fr !important;
    }
}

/* Pager Styles */
.pager-group {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    margin-bottom: 15px;
    overflow: hidden;
}

.pager-group-header {
    background: rgba(212, 175, 55, 0.1);
    padding: 10px 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: background 0.2s;
}

.pager-group-header:hover {
    background: rgba(212, 175, 55, 0.2);
}

.pager-sender-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.pager-sender-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 1px solid var(--border-color);
}

.pager-sender-name {
    font-weight: bold;
    color: #fff;
}

.pager-unread-count-badge {
    background: var(--accent-color);
    color: #fff;
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: 10px;
    font-weight: bold;
}

.pager-collapse-icon {
    transition: transform 0.3s;
    font-size: 0.8rem;
    color: var(--text-color);
}

.pager-group.collapsed .pager-collapse-icon {
    transform: rotate(180deg);
}

.pager-messages {
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.pager-group.collapsed .pager-messages {
    display: none;
}

.pager-message-item {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(212, 175, 55, 0.1);
    padding: 10px;
    border-radius: 6px;
    position: relative;
}

.pager-message-item.unread {
    border-left: 3px solid var(--accent-color);
    background: rgba(200, 16, 46, 0.05);
}

.pager-message-item.saved {
    border-right: 3px solid #ffeb3b;
}

.pager-message-item.reply {
    margin-left: 20px;
    border-left: 2px solid rgba(212, 175, 55, 0.3);
}

.pager-message-text {
    font-size: 0.95rem;
    margin-bottom: 5px;
    word-break: break-word;
}

.pager-message-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.75rem;
    color: #888;
}

.pager-actions {
    display: flex;
    gap: 8px;
}

.btn-pager-action {
    background: transparent;
    border: none;
    color: #888;
    cursor: pointer;
    padding: 2px;
    transition: color 0.2s;
}

.btn-pager-action:hover {
    color: #fff;
}

.btn-pager-action.active {
    color: #ffeb3b;
}

.btn-pager-action.delete:hover {
    color: var(--accent-color);
}

@keyframes pulse-header {
    0% { background: rgba(212, 175, 55, 0.1); }
    50% { background: rgba(212, 175, 55, 0.3); }
    100% { background: rgba(212, 175, 55, 0.1); }
}

.pulse-header {
    animation: pulse-header 2s infinite;
}

@keyframes flash-header {
    0% { background: var(--accent-color); }
    100% { background: rgba(212, 175, 55, 0.1); }
}

.flash-header {
    animation: flash-header 2s ease-out;
}
