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

:root {
    --primary-color: #ffffff;
    --secondary-color: #ffffff;
    --dark-bg: #000000;
    --dark-surface: #000000;
    --dark-surface-hover: #000000;
    --text-primary: #ffffff;
    --text-secondary: #ffffff;
    --accent-glow: rgba(255, 255, 255, 0);
    --success-color: #ffffff;
    --bg-color: #000000;
    --text-color: #ffffff;
    --border-color: #ffffff;
}

/* Light mode (inverted colors) */
body.light-mode {
    --bg-color: #ffffff;
    --text-color: #000000;
    --border-color: #000000;
    --primary-color: #000000;
    --secondary-color: #000000;
    --text-primary: #000000;
    --text-secondary: #000000;
}

body {
    font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg-color);
    color: var(--text-color);
    min-height: 100vh;
    line-height: 1.6;
    font-weight: 400;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* NIGHT MODE TOGGLE BUTTON */
/* Header buttons container */
.header-buttons {
    display: flex;
    align-items: center;
    gap: 12px;
    position: absolute;
    right: 0;
    top: 0;
    z-index: 10;
}

.night-mode-toggle {
    border: 1px solid var(--border-color);
    color: var(--text-color);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    background: transparent;
}

body.light-mode .night-mode-toggle {
    background: transparent;
}

.night-mode-toggle:hover {
    transform: scale(1.1);
    border-color: var(--text-color);
}

.night-mode-toggle:active {
    transform: scale(0.95);
}

.night-mode-toggle svg {
    transition: transform 0.3s ease;
}

body.light-mode .night-mode-toggle svg {
    transform: rotate(180deg);
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 60px 20px;
}

/* TYPOGRAPHY UTILITIES - SHARED SYSTEM */
.heading-xl {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 6rem;
    font-weight: 400;
    color: var(--text-color);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    line-height: 1.1;
    transition: color 0.3s ease;
}

.heading-l {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 3.5rem;
    font-weight: 700;
    color: var(--text-color);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    line-height: 1.1;
    transition: color 0.3s ease;
}

.heading-m {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-color);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    line-height: 1.2;
    transition: color 0.3s ease;
}

.label-xs {
    font-family: 'Roboto', sans-serif;
    font-size: 0.65rem;
    font-weight: 700;
    color: var(--text-color);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    opacity: 0.6;
    transition: color 0.3s ease;
}

/* CARD STYLING - UNIFIED SYSTEM */
.card {
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 28px;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

header {
    text-align: center;
    margin-bottom: 80px;
    padding-bottom: 40px;
    border-bottom: 1px solid var(--border-color);
    position: relative;
    transition: border-color 0.3s ease;
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 16px;
    position: relative;
    width: 100%;
}

.header-top > div {
    flex: 1;
    text-align: center;
}

.back-home-link {
    font-family: 'Roboto', sans-serif;
    font-size: 0.65rem;
    font-weight: 500;
    color: var(--text-color);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    text-decoration: none;
    transition: opacity 0.2s ease, color 0.3s ease;
    position: absolute;
    left: 0;
    top: 0;
    z-index: 10;
    white-space: nowrap;
}

.back-home-link:hover {
    opacity: 0.7;
}

.popout-btn {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-color);
    padding: 10px 14px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease, border-color 0.3s ease, color 0.3s ease;
}

.popout-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--border-color);
    transform: scale(1.05);
}

body.light-mode .popout-btn:hover {
    background: rgba(0, 0, 0, 0.1);
}

.popout-btn:active {
    transform: scale(0.95);
}

.popout-btn svg {
    display: block;
}

header h1 {
    margin-bottom: 8px;
}

header h1,
header h1.heading-l {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 3.5rem;
    font-weight: 700;
    color: var(--primary-color);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    line-height: 1.1;
}

.subtitle {
    font-family: 'Roboto', sans-serif;
    font-size: 1.1rem;
    color: var(--text-color);
    font-weight: 500;
    margin-bottom: 16px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    transition: color 0.3s ease;
}

.mission {
    font-family: 'Roboto', sans-serif;
    font-size: 0.95rem;
    color: var(--text-color);
    font-weight: 300;
    line-height: 1.7;
    max-width: 600px;
    margin: 0 auto;
    margin-top: 16px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: color 0.3s ease;
}

/* Current Show Section - UNIFIED CARD STYLING */
.current-show {
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 20px 16px;
    margin-bottom: 40px;
    position: relative;
    text-align: center;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.current-show::before { display: none; }

@keyframes pulse {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 0.6; }
}

.show-badge {
    display: block;
    background: var(--bg-color);
    color: var(--text-color);
    padding: 6px 14px;
    border-radius: 999px;
    margin-bottom: 12px;
    font-family: 'Roboto', sans-serif;
    font-size: 0.9rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    text-align: left;
    width: fit-content;
    opacity: 0.6;
    transition: background-color 0.3s ease, color 0.3s ease;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.current-show h2 {
    margin: 12px 0;
    position: relative;
    z-index: 1;
}

.current-show h2,
.current-show h2.heading-m {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-color);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    line-height: 1.2;
    transition: color 0.3s ease;
}

.current-show p {
    font-family: 'Roboto', sans-serif;
    font-size: 1rem;
    font-weight: 300;
    color: var(--text-color);
    letter-spacing: 0.05em;
    position: relative;
    z-index: 1;
    transition: color 0.3s ease;
    opacity: 0.8;
}

/* Now Playing Info - UNIFIED SYSTEM */
.now-playing-info {
    margin-top: 0;
    text-align: center;
}

.now-playing-title {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 3.5rem;
    font-weight: 700;
    color: var(--text-color);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin: 0;
    position: relative;
    z-index: 1;
    line-height: 1.1;
    transition: color 0.3s ease;
}

.now-playing-artist {
    display: none; /* Hidden - using unified format */
}

.now-playing-info.hidden {
    display: none;
}

.now-playing-info {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

/* Audio Visualizer */
.audio-visualizer {
    width: 100%;
    max-width: 400px;
    height: 60px;
    margin: 20px auto 0;
    display: none; /* Hidden by default, shown when playing */
    opacity: 0.6;
    transition: opacity 0.3s ease;
}

.audio-visualizer.active {
    display: block;
}

/* Controls */
main {
    margin-bottom: 50px;
}

.controls {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-bottom: 24px;
}

.control-btn {
    font-family: 'Bebas Neue', sans-serif;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 24px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-color);
    color: var(--text-color);
    font-size: 1.3rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.play-btn { 
    background: var(--text-color); 
    color: var(--bg-color); 
    position: relative;
    border-color: var(--text-color);
}

.play-btn:hover { 
    background: var(--text-color); 
    opacity: 0.9;
}

.play-btn.playing {
    animation: pulse 2s ease-in-out infinite;
}

.play-btn.playing::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    border: 2px solid var(--bg-color);
    border-radius: 8px;
    opacity: 0.3;
    animation: pulse-ring 2s ease-in-out infinite;
    transition: border-color 0.3s ease;
}

@keyframes pulse-ring {
    0% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.3;
    }
    50% {
        transform: translate(-50%, -50%) scale(1.1);
        opacity: 0.1;
    }
    100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.3;
    }
}

.talk-btn { 
    background: var(--bg-color); 
    color: var(--text-color); 
    border: 1px solid var(--border-color); 
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}
.talk-btn:hover { 
    background: var(--bg-color); 
    opacity: 0.9;
}

.control-btn svg {
    width: 24px;
    height: 24px;
}

/* Status */
.status {
    text-align: center;
    margin-bottom: 30px;
}

.status-indicator {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    background: var(--bg-color);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.status-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--success-color);
    animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.status-text {
    font-family: 'Roboto', sans-serif;
    color: var(--text-color);
    font-weight: 500;
    letter-spacing: 0.05em;
    transition: color 0.3s ease;
    opacity: 0.9;
}

.listener-count {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: var(--bg-color);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    margin-top: 12px;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.listener-icon {
    font-size: 1.1rem;
    opacity: 0.9;
}

.listener-text {
    font-family: 'Roboto', sans-serif;
    font-size: 0.9rem;
    color: var(--text-color);
    font-weight: 500;
    letter-spacing: 0.05em;
    transition: color 0.3s ease;
}

/* Schedule */
.show-schedule {
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 28px;
    margin-bottom: 40px;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.show-schedule h3 {
    margin-bottom: 30px;
}

.show-schedule h3,
.show-schedule h3.heading-m {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    line-height: 1.2;
}

.schedule-list {
    display: grid;
    gap: 15px;
}

.schedule-item {
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
    transition: all 0.3s ease, background-color 0.3s ease, border-color 0.3s ease;
    cursor: pointer;
    opacity: 0.8;
}

body.light-mode .schedule-item {
    opacity: 0.9;
}

.schedule-item:hover {
    background: var(--bg-color);
    border-color: var(--border-color);
    transform: translateX(5px);
    opacity: 1;
}

.schedule-item.active {
    border-color: var(--primary-color);
    background: linear-gradient(135deg, rgba(255, 107, 107, 0.1) 0%, rgba(78, 205, 196, 0.1) 100%);
}

.schedule-item .time {
    color: var(--text-color);
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 5px;
    transition: color 0.3s ease;
}

.schedule-item .show-name {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 5px;
    color: var(--text-color);
    transition: color 0.3s ease;
}

.schedule-item .show-host {
    color: var(--text-color);
    font-size: 0.95rem;
    opacity: 0.8;
    transition: color 0.3s ease;
}

/* Channel Info */
.channel-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 28px;
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    margin-bottom: 40px;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.channel-info p {
    color: var(--text-secondary);
}

.channel-info strong {
    color: var(--primary-color);
}

.admin-btn { 
    padding: 10px 16px; 
    background: var(--bg-color); 
    color: var(--text-color); 
    border: 1px solid var(--border-color); 
    border-radius: 6px; 
    cursor: pointer; 
    font-weight: 700; 
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}
.admin-btn:hover { 
    background: var(--bg-color); 
    opacity: 0.9;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    backdrop-filter: blur(10px);
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: var(--dark-surface);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 40px;
    max-width: 700px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
}

.close {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 2rem;
    cursor: pointer;
    color: var(--text-secondary);
    transition: color 0.3s;
}

.close:hover {
    color: var(--text-primary);
}

.modal-content h2 {
    font-family: 'Bebas Neue', sans-serif;
    margin-bottom: 30px;
    font-size: 2.5rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.modal-content h3 {
    font-family: 'Bebas Neue', sans-serif;
    margin-bottom: 20px;
    font-size: 1.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.admin-section {
    margin-bottom: 30px;
}

.show-form {
    margin-top: 30px;
}

.show-form input,
.show-form select {
    width: 100%;
    padding: 15px;
    margin-bottom: 20px;
    background: var(--dark-bg);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 1rem;
}

.show-form input:focus,
.show-form select:focus {
    outline: none;
    border-color: var(--primary-color);
}

.form-actions {
    display: flex;
    gap: 15px;
}

.btn-primary {
    padding: 12px 30px;
    background: var(--text-color);
    color: var(--bg-color);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: background-color 0.3s ease, color 0.3s ease;
    transition: all 0.3s;
}

.btn-primary:hover {
    background: #ffffff;
    transform: translateY(0);
}

.btn-secondary {
    padding: 12px 30px;
    background: #000000;
    color: #ffffff;
    border: 1px solid #ffffff;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
}

.btn-secondary:hover {
    background: #000000;
}

.shows-list {
    margin-bottom: 20px;
}

.show-item {
    background: var(--dark-bg);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.show-item-info {
    flex: 1;
}

.show-item-info h4 {
    margin-bottom: 5px;
}

.show-item-info p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.show-item-actions {
    display: flex;
    gap: 10px;
}

.btn-edit, .btn-delete {
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s;
}

.btn-edit {
    background: var(--secondary-color);
    color: #000000;
}

.btn-delete {
    background: #000000;
    color: #ffffff;
}

/* Chat */
.chat-box { display: grid; gap: 12px; }
.chat-messages {
    background: #000000;
    border: 1px solid #ffffff;
    border-radius: 8px;
    padding: 12px;
    max-height: 320px;
    overflow-y: auto;
}
.chat-message { margin-bottom: 8px; }
.chat-message .meta { color: #ffffff; font-size: 0.8rem; }
.chat-form { display: grid; grid-template-columns: 160px 1fr auto; gap: 8px; }
.chat-input { padding: 10px; border: 1px solid #ffffff; border-radius: 6px; background: #000000; color: #ffffff; }

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 40px 20px;
    }
    
    /* Night mode toggle on mobile */
    .header-buttons {
        gap: 8px;
    }
    
    .night-mode-toggle {
        width: 40px;
        height: 40px;
    }
    
    .night-mode-toggle svg {
        width: 18px;
        height: 18px;
    }
    
    .popout-btn {
        padding: 8px 12px;
    }
    
    .popout-btn svg {
        width: 18px;
        height: 18px;
    }
    
    header {
        margin-bottom: 60px;
        padding-bottom: 30px;
    }
    
    header h1 {
        font-size: 2.5rem;
    }
    
    .now-playing-title {
        font-size: 2.5rem;
    }
    
    .subtitle {
        font-size: 1rem;
    }
    
    .header-top {
        flex-direction: column;
        align-items: center;
        gap: 20px;
        position: relative;
    }
    
    .back-home-link {
        position: static !important;
        left: auto !important;
        font-size: 0.65rem;
        padding: 8px 0;
        text-align: center;
        order: 1;
        width: 100%;
        margin-bottom: 0;
    }
    
    .header-top > div {
        order: 2;
        text-align: center;
        width: 100%;
        margin: 0;
    }
    
    .header-buttons {
        position: static !important;
        order: 3;
        justify-content: center;
        width: 100%;
        margin-top: 12px;
    }
    
    .popout-btn {
        display: none !important; /* Hide ticker option on mobile */
    }
    
    .mission {
        font-size: 0.85rem;
        padding: 0 10px;
    }
    
    .current-show {
        padding: 20px 16px;
        margin-bottom: 40px;
    }
    
    .current-show h2 {
        font-size: 2rem;
    }
    
    .current-show p {
        font-size: 1rem;
    }
    
    .controls {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }
    
    .control-btn {
        width: 100%;
        padding: 16px 20px; /* Increased for better touch target */
        font-size: 1.1rem;
        min-height: 48px; /* Minimum touch target */
        -webkit-tap-highlight-color: rgba(255, 255, 255, 0.1);
    }
    
    /* Improve touch feedback */
    .control-btn:active {
        transform: scale(0.95);
    }
    
    /* Disable hover effects on touch devices */
    @media (hover: none) {
        .control-btn:hover {
            transform: none;
        }
    }
    
    .audio-visualizer {
        display: none !important; /* Hide on mobile for performance */
    }
    
    .channel-info {
        flex-direction: column;
        gap: 20px;
        text-align: center;
        padding: 14px 16px;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    /* Chat Mobile Optimization */
    .chat-box {
        gap: 10px;
    }
    
    .chat-messages {
        max-height: 180px;
        padding: 10px;
        font-size: 0.9rem;
    }
    
    .chat-message {
        margin-bottom: 8px;
        padding: 6px 0;
    }
    
    .chat-message .meta {
        font-size: 0.75rem;
        margin-top: 3px;
    }
    
    .chat-form {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .chat-input {
        padding: 12px;
        font-size: 16px; /* Prevents zoom on iOS */
    }
    
    #chatSendBtn {
        width: 100%;
        padding: 12px;
        font-size: 0.9rem;
    }
    
    .show-schedule {
        padding: 20px 16px;
        margin-top: 16px;
    }
    
    .show-schedule h3 {
        font-size: 1.3rem;
        margin-bottom: 16px;
    }
}

/* iPhone Specific (Smaller screens) */
@media (max-width: 480px) {
    header h1 {
        font-size: 2rem;
    }
    
    .now-playing-title {
        font-size: 2rem;
    }
    
    .container {
        padding: 16px 10px;
    }
    
    .chat-messages {
        max-height: 140px;
        padding: 8px;
        font-size: 0.85rem;
    }
    
    .chat-message {
        margin-bottom: 6px;
        padding: 4px 0;
    }
    
    .chat-message .meta {
        font-size: 0.7rem;
    }
    
    .chat-form {
        gap: 8px;
    }
    
    .chat-input {
        padding: 10px;
        font-size: 16px;
    }
    
    #chatSendBtn {
        padding: 10px;
        font-size: 0.9rem;
    }
    
    .show-schedule {
        padding: 16px 12px;
        margin-top: 16px;
    }
    
    .show-schedule h3 {
        font-size: 1.2rem;
        margin-bottom: 12px;
    }
    
    .current-show {
        padding: 16px 12px;
    }
    
    .current-show h2 {
        font-size: 1.75rem;
    }
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--dark-surface);
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #000000;
}

