.shm-more-items {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-in-out;
}

.shm-more-items.open {
    max-height: 500px; /* Tillräckligt stor för att rymma alla länkar */
}

.shm-more-arrow {
    transition: transform 0.3s ease-in-out;
}

.shm-more-toggle.active .shm-more-arrow {
    transform: rotate(180deg);
}

.shm-more-items a.shm-menu-item {
    padding-left: 3rem; /* Indrag för att visa att det är en undermeny */
}

/* ========================================================= */
/* MERGED & OPTIMIZED STYLES FOR MAD MIX (v2.1 - Bug Fixes)  */
/* ========================================================= */

/* --- variables.css --- */
:root {
    --bg-primary: #0a0a0b;
    --bg-secondary: #151517;
    --bg-glass: rgba(15, 15, 17, 0.7);
    --bg-glass-hover: rgba(25, 25, 27, 0.85);
    --text-primary: #ffffff;
    --text-secondary: #b3b3b3;
    --text-muted: #666666;
    --accent-primary: #6b7280;
    --accent-secondary: #9ca3af;
    --accent-gradient: linear-gradient(135deg, #6b7280, #9ca3af);
    --accent-glow: rgba(107, 114, 128, 0.3);
    --accent-rgb: 107, 114, 128;
    --border-subtle: rgba(255, 255, 255, 0.08);
    --shadow-glow: 0 0 10px var(--accent-glow);
    --radius-sm: 2px;
    --radius-md: 4px;
    --radius-lg: 6px;
    --radius-xl: 8px;
    --space-2: 0.5rem;
    --space-3: 0.75rem;
    --space-4: 1rem;
    --space-6: 1.5rem;
    --space-8: 2rem;
    --card-background: rgba(var(--accent-rgb), 0.05);
    --border-color: rgba(var(--accent-rgb), 0.2);
}

[data-theme="gray"] { 
    --accent-primary: #6b7280; 
    --accent-secondary: #9ca3af; 
    --accent-gradient: linear-gradient(135deg, #6b7280, #9ca3af);
    --accent-glow: rgba(107, 114, 128, 0.3);
    --accent-rgb: 107, 114, 128; 
}
[data-theme="purple"] { 
    --accent-primary: #8b5cf6; 
    --accent-secondary: #a78bfa; 
    --accent-gradient: linear-gradient(135deg, #8b5cf6, #a78bfa);
    --accent-glow: rgba(139, 92, 246, 0.3);
    --accent-rgb: 139, 92, 246; 
}
[data-theme="blue"] { 
    --accent-primary: #3b82f6; 
    --accent-secondary: #60a5fa; 
    --accent-gradient: linear-gradient(135deg, #3b82f6, #60a5fa);
    --accent-glow: rgba(59, 130, 246, 0.3);
    --accent-rgb: 59, 130, 246; 
}
[data-theme="green"] { 
    --accent-primary: #52a468; 
    --accent-secondary: #6db67c; 
    --accent-gradient: linear-gradient(135deg, #52a468, #6db67c);
    --accent-glow: rgba(82, 164, 104, 0.3);
    --accent-rgb: 82, 164, 104; 
}
[data-theme="pink"] { 
    --accent-primary: #c96184; 
    --accent-secondary: #d584a0; 
    --accent-gradient: linear-gradient(135deg, #c96184, #d584a0);
    --accent-glow: rgba(201, 97, 132, 0.3);
    --accent-rgb: 201, 97, 132; 
}
[data-theme="orange"] { 
    --accent-primary: #c57b3b; 
    --accent-secondary: #d0915e; 
    --accent-gradient: linear-gradient(135deg, #c57b3b, #d0915e);
    --accent-glow: rgba(197, 123, 59, 0.3);
    --accent-rgb: 197, 123, 59; 
}

/* --- base.css --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    overflow-x: hidden;
    width: 100%;
    scrollbar-gutter: stable;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-primary); 
    color: var(--text-primary);
    overflow-x: hidden;
    min-height: 100vh;
    cursor: default;
    margin: 0;
    padding: 0;
    width: 100%;
    scrollbar-gutter: stable;
    box-sizing: border-box;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: 
        radial-gradient(circle 800px at 20% 80%, rgba(var(--accent-rgb), 0.08) 0%, transparent 50%),
        radial-gradient(circle 600px at 80% 20%, rgba(var(--accent-rgb), 0.05) 0%, transparent 50%),
        radial-gradient(circle 400px at 40% 40%, rgba(var(--accent-rgb), 0.03) 0%, transparent 50%),
        linear-gradient(135deg, #0a0a0b 0%, #0f0f11 25%, #151517 50%, #111113 75%, #0a0a0b 100%);
}

.shape {
    position: fixed;
    pointer-events: none;
    z-index: -1;
}

.shape-1 {
    top: 10%;
    left: 80%;
    width: 200px;
    height: 200px;
    background: linear-gradient(45deg, rgba(var(--accent-rgb), 0.06), rgba(var(--accent-rgb), 0.03));
    border-radius: 63% 37% 54% 46% / 55% 48% 52% 45%;
}

.shape-2 {
    bottom: 20%;
    left: 10%;
    width: 150px;
    height: 150px;
    background: linear-gradient(135deg, rgba(var(--accent-rgb), 0.04), rgba(var(--accent-rgb), 0.02));
    border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%;
}

/* Animations */
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.7; } }
@keyframes cardSlideIn { to { opacity: 1; transform: translateY(0); } }
@keyframes fadeIn { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }

/* Custom scrollbars */
.main::-webkit-scrollbar,
.sidebar::-webkit-scrollbar,
.rightbar::-webkit-scrollbar,
.shm-sidebar::-webkit-scrollbar {
    width: 8px;
}

.main::-webkit-scrollbar-track,
.sidebar::-webkit-scrollbar-track,
.rightbar::-webkit-scrollbar-track,
.shm-sidebar::-webkit-scrollbar-track {
    background: #232529;
    border-radius: 4px;
}

.main::-webkit-scrollbar-thumb,
.sidebar::-webkit-scrollbar-thumb,
.rightbar::-webkit-scrollbar-thumb,
.shm-sidebar::-webkit-scrollbar-thumb {
    background: #4c515c;
    border-radius: 4px;
}

/* --- components.css (Cleaned & Corrected) --- */

/* Form Styling */
.form-container { width: 100%; margin: 0; }
.form-section { background: var(--bg-secondary, #1a1a1a); padding: 2rem; border-radius: 12px; border: 1px solid var(--border-color, #333); }
.form-section h3 { color: var(--text-primary, #e3e3e3); margin: 0 0 1.5rem; font-size: 1.5rem; }
.form-group { margin-bottom: 1.5rem; }
.form-group label { display: block; margin-bottom: 0.5rem; color: var(--text-primary, #e3e3e3); font-weight: 500; }
.form-group input,
.form-group textarea,
.form-group select { width: 100%; padding: 12px; background: var(--bg-tertiary, #2a2a2a); border: 1px solid var(--border-color, #555); border-radius: 8px; color: var(--text-primary, #e3e3e3); font-size: 16px; transition: border-color 0.2s ease; box-sizing: border-box; }
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus { outline: none; border-color: var(--accent-primary, #ff6b35); box-shadow: 0 0 0 3px var(--accent-primary-alpha, rgba(255, 107, 53, 0.1)); }
.form-group input:disabled,
.form-group textarea:disabled,
.form-group select:disabled { opacity: 0.5; cursor: not-allowed; }
.form-btn { padding: 12px 24px; border: none; border-radius: 8px; font-size: 16px; font-weight: 500; cursor: pointer; transition: all 0.2s ease; text-decoration: none; display: inline-block; text-align: center; }
.form-btn.primary { background: var(--accent-primary, #ff6b35); color: var(--text-on-accent, #ffffff); }
.form-btn.primary:hover:not(:disabled) { background: var(--accent-primary-dark, #e55a2b); transform: translateY(-1px); }
.form-btn.secondary { background: var(--bg-button, #444); color: var(--text-button, #e3e3e3); border: 1px solid var(--border-button, #666); }
.form-btn.secondary:hover:not(:disabled) { background: var(--bg-button-hover, #555); transform: translateY(-1px); }
.form-btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none !important; }
.form-divider { text-align: center; margin: 2rem 0; position: relative; }
.form-divider::before { content: ''; position: absolute; top: 50%; left: 0; right: 0; height: 1px; background: var(--border-color, #333); }
.form-divider span { background: var(--bg-secondary, #1a1a1a); padding: 0 1rem; color: var(--text-secondary, #adadad); }

/* Server Status Styling */
.status-dashboard { max-width: 1200px; margin: 0 auto; }
.status-overview { background: var(--bg-secondary, #1a1a1a); padding: 2rem; border-radius: 12px; border: 1px solid var(--border-color, #333); margin-bottom: 2rem; text-align: center; }
.status-indicator { display: flex; align-items: center; justify-content: center; gap: 1rem; }
.status-circle { width: 20px; height: 20px; border-radius: 50%; position: relative; }
.status-circle.status-online { background: #22c55e; box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.2); }
.status-circle.status-offline { background: #ef4444; box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.2); }
.status-circle.status-checking { background: #f59e0b; box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.2); animation: pulse 2s infinite; }
.status-text h3 { margin: 0; color: var(--text-primary, #e3e3e3); }
.status-text p { margin: 0.5rem 0 0 0; color: var(--text-secondary, #adadad); }
.status-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.5rem; margin-bottom: 2rem; }
.status-card { background: var(--bg-secondary, #1a1a1a); padding: 1.5rem; border-radius: 12px; border: 1px solid var(--border-color, #333); }
.status-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; }
.status-header h3 { margin: 0; color: var(--text-primary, #e3e3e3); font-size: 1.1rem; }
.status-details p { margin: 0.5rem 0; color: var(--text-secondary, #adadad); font-size: 0.9rem; }
.status-url { font-family: monospace; color: var(--accent-primary, #ff6b35); }
.status-controls { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 1rem; background: var(--bg-secondary, #1a1a1a); padding: 1.5rem; border-radius: 12px; border: 1px solid var(--border-color, #333); }
.status-controls label { color: var(--text-secondary, #adadad); cursor: pointer; }

/* App Container */
.app-container {
    display: grid;
    min-height: 100vh;
    max-height: 100vh;
    gap: var(--space-4);
    padding: var(--space-4);
    grid-template-areas: "header" "main" "player";
    grid-template-rows: 100px 1fr 120px;
    grid-template-columns: 1fr;
    overflow: hidden;
    width: 100%;
}

/* CORRECTED: Hamburger Icon Styling (Restored) */
.mobile-menu-toggle {
    display: none;
    background: rgba(var(--accent-rgb), 0.1);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(var(--accent-rgb), 0.2);
    border-radius: var(--radius-md);
    padding: var(--space-3);
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}
.mobile-menu-toggle::before { content: ''; position: absolute; top: 0; left: -100%; width: 100%; height: 100%; background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent); transition: left 0.5s; }
.mobile-menu-toggle:hover::before { left: 100%; }
.mobile-menu-toggle:hover { background: rgba(var(--accent-rgb), 0.2); border-color: rgba(var(--accent-rgb), 0.4); transform: translateY(-2px); box-shadow: 0 5px 15px rgba(var(--accent-rgb), 0.2); }


/* Sidebar [DESKTOP STYLES RETAINED] */
.sidebar {
    display: none; /* Hidden by default, shown in desktop media query */
}
/* CORRECTED: Hide brand logo in desktop sidebar */
.sidebar .sidebar-header {
    display: none;
}


/* Desktop Only / Mobile Only Classes */
.desktop-only { display: block; }
.mobile-only { display: none; }

/* Header */
.header {
    grid-area: header;
    background: rgba(var(--accent-rgb), 0.08);
    backdrop-filter: blur(40px);
    border: 1px solid rgba(var(--accent-rgb), 0.2);
    border-radius: var(--radius-xl);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-4);
    position: relative;
    overflow: hidden;
    gap: var(--space-4);
    flex-wrap: wrap;
}
.header::before { content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: linear-gradient(135deg, rgba(var(--accent-rgb), 0.08) 0%, rgba(var(--accent-rgb), 0.03) 100%); pointer-events: none; }

/* Brand */
.brand { display: flex; align-items: center; gap: var(--space-3); flex-shrink: 0; z-index: 1; }
.brand-logo { width: 50px; height: 50px; background: transparent; border-radius: var(--radius-md); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 1.5rem; color: white; position: relative; overflow: hidden; transition: all 0.3s ease; box-shadow: 0 0 2px rgba(var(--accent-rgb), 0.1); }
.brand-logo:hover { transform: scale(1.1) rotate(5deg); box-shadow: 0 0 4px rgba(var(--accent-rgb), 0.15); }
.brand-text { font-size: 1.5rem; font-weight: 700; background: var(--accent-gradient); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }

/* Search Box */
.search-box { flex: 1; min-width: 250px; max-width: 500px; position: relative; order: 3; width: 100%; z-index: 1; }
.search-input { width: 100%; padding: var(--space-4) var(--space-4) var(--space-4) 50px; background: rgba(var(--accent-rgb), 0.05); backdrop-filter: blur(20px); border: 1px solid rgba(var(--accent-rgb), 0.2); border-radius: var(--radius-xl); color: var(--text-primary); font-size: 1rem; transition: all 0.3s ease; }
.search-input:focus { outline: none; border-color: rgba(var(--accent-rgb), 0.6); box-shadow: 0 0 15px rgba(var(--accent-rgb), 0.2); transform: translateY(-2px); }
.search-icon { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); color: rgba(var(--accent-rgb), 0.8); width: 20px; height: 20px; }

/* Header Controls */
.header-controls-extra { display: flex; align-items: right; gap: var(--space-3); order: 2; z-index: 1; }
.header-controls { display: flex; align-items: center; gap: var(--space-3); order: 2; z-index: 1; }

/* Theme Selector */
.theme-selector { display: flex; gap: 8px; padding: var(--space-3); background: rgba(var(--accent-rgb), 0.05); border: 1px solid rgba(var(--accent-rgb), 0.2); border-radius: var(--radius-xl); }
.theme-color { width: 32px; height: 32px; border-radius: var(--radius-lg); cursor: pointer; transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); border: 2px solid transparent; position: relative; overflow: hidden; }
.theme-color:hover { transform: scale(1.2); box-shadow: 0 0 8px currentColor; }
.theme-color.active { border-color: white; transform: scale(1.1); box-shadow: 0 0 12px currentColor; }
.theme-gray { background: linear-gradient(135deg, #6b7280, #9ca3af); color: #6b7280; }
.theme-purple { background: linear-gradient(135deg, #8b5cf6, #a78bfa); color: #8b5cf6; }
.theme-blue { background: linear-gradient(135deg, #3b82f6, #60a5fa); color: #3b82f6; }
.theme-green { background: linear-gradient(135deg, #52a468, #6db67c); color: #52a468; }
.theme-pink { background: linear-gradient(135deg, #c96184, #d584a0); color: #c96184; }
.theme-orange { background: linear-gradient(135deg, #c57b3b, #d0915e); color: #c57b3b; }

/* Sidebar/Rightbar Sections [DESKTOP] */
.sidebar-section, .rightbar-section { margin-bottom: var(--space-8); position: relative; z-index: 1; }
.sidebar-title, .rightbar-title { font-size: 0.9rem; font-weight: 600; color: rgba(var(--accent-rgb), 0.8); text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: var(--space-4); }
.sidebar-menu, .rightbar-menu { list-style: none; }

/* Sidebar/Rightbar Items [DESKTOP] */
.sidebar-item, .rightbar-item { display: flex; align-items: center; gap: 16px; padding: 16px 20px; border-radius: var(--radius-lg); cursor: pointer; transition: all 0.3s ease; margin-bottom: 12px; color: var(--text-secondary); font-weight: 500; position: relative; overflow: hidden; background: rgba(var(--accent-rgb), 0.03); border: 1px solid rgba(var(--accent-rgb), 0.1); }
.sidebar-item::before, .rightbar-item::before { content: ''; position: absolute; top: 0; left: -100%; width: 100%; height: 100%; background: linear-gradient(180deg, rgba(var(--accent-rgb), 0.06) 0%, rgba(var(--accent-rgb), 0.02) 100%); transition: left 0.6s; }
.sidebar-item:hover::before, .rightbar-item:hover::before { left: 100%; }
.sidebar-item:hover, .rightbar-item:hover { background: rgba(var(--accent-rgb), 0.1); color: var(--text-primary); transform: translateX(8px) scale(1.02); border-color: rgba(var(--accent-rgb), 0.3); box-shadow: 0 3px 15px rgba(var(--accent-rgb), 0.15); }
.sidebar-item.active, .rightbar-item.active { background: rgba(var(--accent-rgb), 0.15); color: var(--text-primary); border-color: rgba(var(--accent-rgb), 0.4); box-shadow: 0 0 20px rgba(var(--accent-rgb), 0.2); }
.sidebar-item svg, .sidebar-icon svg, .rightbar-item svg, .rightbar-icon svg { fill: currentColor; }
.sidebar-icon, .rightbar-icon { font-size: 1.5rem; width: 30px; text-align: center; }

/* Main Content */
.main { grid-area: main; background: #151415; backdrop-filter: blur(40px); border: 1px solid rgba(var(--accent-rgb), 0.15); border-radius: var(--radius-xl); padding: var(--space-8); overflow-y: auto; overflow-x: hidden; position: relative; min-height: 0; max-height: 100%; }
.main::before { content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: #151415; pointer-events: none; border-radius: var(--radius-xl); }
.page-content { position: relative; z-index: 1; }

/* Page Styling */
.page-title { font-size: clamp(2.5rem, 5vw, 4rem); font-weight: 800; letter-spacing: -0.05em; line-height: 1; margin-bottom: var(--space-6); background: linear-gradient(135deg, var(--text-primary) 0%, rgba(var(--accent-rgb), 1) 50%, var(--text-primary) 100%); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; position: relative; z-index: 1; }
.page-subtitle { font-size: clamp(1.2rem, 2.5vw, 1.5rem); color: var(--text-secondary); font-weight: 400; margin-bottom: var(--space-8); line-height: 1.6; position: relative; z-index: 1; }
.page-actions { display: flex; gap: var(--space-6); margin-bottom: var(--space-8); flex-wrap: wrap; position: relative; z-index: 1; }

/* Action Buttons */
.action-btn { padding: 16px 32px; border-radius: var(--radius-lg); font-weight: 600; text-transform: uppercase; letter-spacing: 0.1em; cursor: pointer; transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1); border: none; position: relative; overflow: hidden; font-size: 1rem; }
.action-btn::before { content: ''; position: absolute; top: 0; left: -100%; width: 100%; height: 100%; background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent); transition: left 0.6s; }
.action-btn:hover::before { left: 100%; }
.action-btn.primary { background: var(--accent-gradient); color: white; box-shadow: 0 5px 20px rgba(var(--accent-rgb), 0.2); }
.action-btn.primary:hover { transform: translateY(-5px) scale(1.05); box-shadow: 0 10px 30px rgba(var(--accent-rgb), 0.3); }
.action-btn.secondary { background: rgba(var(--accent-rgb), 0.1); color: var(--text-primary); border: 1px solid rgba(var(--accent-rgb), 0.3); backdrop-filter: blur(20px); }
.action-btn.secondary:hover { background: rgba(var(--accent-rgb), 0.2); border-color: rgba(var(--accent-rgb), 0.5); transform: translateY(-5px) scale(1.05); box-shadow: 0 8px 25px rgba(var(--accent-rgb), 0.2); }

/* Content Grid */
.content-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: var(--space-8); margin-bottom: var(--space-8); position: relative; z-index: 1; }

/* Content Cards */
.content-card { background: rgba(var(--accent-rgb), 0.05); backdrop-filter: blur(30px); border: 1px solid rgba(var(--accent-rgb), 0.2); border-radius: var(--radius-xl); padding: var(--space-8); text-align: center; cursor: pointer; transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1); position: relative; overflow: hidden; transform-style: preserve-3d; }
.content-card::before { content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: linear-gradient(135deg, rgba(var(--accent-rgb), 0.08) 0%, rgba(var(--accent-rgb), 0.03) 100%); opacity: 0; transition: opacity 0.4s ease; pointer-events: none; }
.content-card:hover::before { opacity: 1; }
.content-card:hover { background: rgba(var(--accent-rgb), 0.1); border-color: rgba(var(--accent-rgb), 0.4); transform: translateY(-20px) rotateX(5deg) rotateY(5deg) scale(1.05); box-shadow: 0 0 20px 20px rgba(var(--accent-rgb), 0.1); }
.card-image { font-size: 4rem; margin-bottom: var(--space-6); width: auto; height: auto; background: linear-gradient(135deg, #2a2a2a 0%, #3a3a3a 100%); border-radius: var(--radius-md); margin: 0 auto var(--space-6); display: flex; align-items: center; justify-content: center; position: relative; overflow: hidden; }
.card-title { font-size: 1.5rem; font-weight: 700; color: var(--text-primary); margin-bottom: var(--space-4); }
.card-description { color: var(--text-secondary); line-height: 1.6; font-size: 1rem; }

/* Player */
.player { grid-area: player; background: rgba(var(--accent-rgb), 0.08); backdrop-filter: blur(40px); border: 1px solid rgba(var(--accent-rgb), 0.2); border-radius: var(--radius-xl); padding: var(--space-4); position: relative; overflow: hidden; }
.player::before { content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: linear-gradient(135deg, rgba(var(--accent-rgb), 0.08) 0%, rgba(var(--accent-rgb), 0.03) 100%); pointer-events: none; }
.player-content { display: flex; flex-direction: column; gap: var(--space-4); position: relative; z-index: 1; }
.now-playing { display: flex; align-items: center; gap: var(--space-4); }
.track-image { width: 70px; height: 70px; border-radius: var(--radius-lg); background: var(--accent-gradient); display: flex; align-items: center; justify-content: center; font-size: 2rem; color: white; flex-shrink: 0; box-shadow: 0 0 5px rgba(var(--accent-rgb), 0.1); overflow: hidden; }
.track-image img { width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }
.track-details { flex: 1; min-width: 0; }
.track-name { font-size: 1.2rem; font-weight: 600; color: var(--text-primary); margin-bottom: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.track-artist { font-size: 1rem; color: var(--text-secondary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.player-controls { display: flex; flex-direction: column; gap: var(--space-4); align-items: center; flex: 1; justify-content: center; width: 100%; }
.control-buttons { display: flex; align-items: center; justify-content: center; gap: var(--space-4); }
.volume-control { display: flex; align-items: center; gap: var(--space-3); }

/* Control Buttons force */
.volume-btn, #fullscreen-toggle { background: rgba(var(--accent-rgb), 0.1); backdrop-filter: blur(20px); border: 1px solid rgba(var(--accent-rgb), 0.3); border-radius: var(--radius-lg); width: 45px; height: 45px; display: flex; align-items: center; justify-content: center; color: var(--text-primary); cursor: pointer; transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); position: relative; overflow: hidden; }
.volume-btn:hover, #fullscreen-toggle:hover { background: rgba(var(--accent-rgb), 0.2); border-color: rgba(var(--accent-rgb), 0.5); transform: scale(1.1); }
.control-btn { background: rgba(var(--accent-rgb), 0.1); backdrop-filter: blur(20px); border: 1px solid rgba(var(--accent-rgb), 0.3); border-radius: var(--radius-lg); width: 50px; height: 50px; display: flex; align-items: center; justify-content: center; color: var(--text-primary); cursor: pointer; transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); position: relative; overflow: hidden; }
.control-btn::before { content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: radial-gradient(circle, rgba(var(--accent-rgb), 0.3) 0%, transparent 70%); opacity: 0; transition: opacity 0.3s ease; }
.control-btn:hover::before { opacity: 1; }
.control-btn:hover { background: rgba(var(--accent-rgb), 0.2); border-color: rgba(var(--accent-rgb), 0.5); transform: scale(1.1); box-shadow: 0 0 5px rgba(var(--accent-rgb), 0.15); }
.play-btn { background: var(--accent-gradient); border-color: rgba(var(--accent-rgb), 0.8); color: white; width: 60px; height: 60px; box-shadow: 0 0 4px rgba(var(--accent-rgb), 0.1); position: relative; }
.play-btn:hover { transform: scale(1.15); box-shadow: 0 0 6px rgba(var(--accent-rgb), 0.15); }
.progress-container { display: flex; align-items: center; gap: var(--space-4); width: 250px; }
.time-display { font-size: 0.9rem; color: var(--text-muted); font-weight: 500; min-width: 45px; text-align: center; }
.progress-bar { height: 6px; background: rgba(var(--accent-rgb), 0.2); border-radius: 3px; position: relative; cursor: pointer; overflow: hidden; width: 150px; flex: none; }
.progress-bar::before { content: ''; position: absolute; top: 0; left: 0; height: 100%; width: 0; /* 35%; */ background: var(--accent-gradient); border-radius: 3px; box-shadow: 0 0 5px rgba(var(--accent-rgb), 0.3); }

/* Grid Layouts for Content Sections */
#stationGrid, #podcastGrid, #tvGrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1rem; padding: 1rem 0; }

/* TV/Radio/Podcast Cards */
.tv-card { background: var(--card-background); border: 1px solid var(--border-color); border-radius: var(--radius-lg); overflow: hidden; transition: all 0.3s ease; cursor: pointer; display: flex; align-items: center; padding: 0.75rem; min-height: 90px; max-height: 110px; }
.tv-card:hover { background: rgba(var(--accent-rgb), 0.1); border-color: rgba(var(--accent-rgb), 0.4); transform: translateX(8px) scale(1.02); box-shadow: 0 3px 15px rgba(var(--accent-rgb), 0.15); }

/* Image Frames */
.tv-image-frame, .radio-image-frame, .podcast-image-frame { position: relative; width: 70px; height: 70px; flex-shrink: 0; overflow: hidden; border-radius: var(--radius-md); margin-right: 1rem; background: linear-gradient(135deg, #2a2a2a 0%, #3a3a3a 100%); }
.tv-image-frame img, .radio-image-frame img, .podcast-image-frame img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s ease; }
.tv-card:hover .tv-image-frame img, .tv-card:hover .radio-image-frame img, .tv-card:hover .podcast-image-frame img { transform: scale(1.05); }

/* Text Content for Cards */
.tv-text { flex: 1; overflow: hidden; }
.tv-text h3 { margin: 0 0 0.25rem 0; color: var(--text-primary); font-size: 0.95rem; font-weight: 600; line-height: 1.2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tv-text p { margin: 0; color: var(--text-secondary); font-size: 0.8rem; line-height: 1.3; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }

/* Specific Rules for Radio/TV/Podcast Grids */
.tv-grid .tv-card h3, .tv-grid .tv-card .tv-text h3 { font-size: 0.95rem; line-height: 1.2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tv-grid .tv-card .tv-text p { font-size: 0.8rem; line-height: 1.3; }
.tv-grid .tv-card { max-height: 110px; overflow: hidden; }

/* Play Overlays */
.podcast-play-overlay, .tv-play-overlay { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); background: rgba(0, 0, 0, 0.7); border-radius: 50%; width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; opacity: 0; transition: opacity 0.3s ease; }
.tv-card:hover .podcast-play-overlay, .tv-card:hover .tv-play-overlay { opacity: 1; }

/* Quality Badges */
.tv-quality-badge { position: absolute; top: 0.25rem; right: 0.25rem; background: #007a63; color: white; padding: 2px 4px; border-radius: 2px; font-size: 0.6em; font-weight: bold; }

/* Radio Status */
.radio-status { position: absolute; bottom: 0.25rem; left: 0.25rem; width: 8px; height: 8px; border-radius: 50%; background: #22c55e; border: 1px solid white; }
.radio-status.offline { background: #ef4444; }

/* Accordion */
.accordion { margin-bottom: var(--space-6); }
.accordion-item { background: rgba(var(--accent-rgb), 0.05); border: 1px solid rgba(var(--accent-rgb), 0.2); border-radius: var(--radius-lg); margin-bottom: var(--space-4); }
.accordion-header { padding: var(--space-4); cursor: pointer; transition: all 0.3s ease; }
.accordion-header:hover { background: rgba(var(--accent-rgb), 0.1); }

/* Buttons */
.madmix-search-btn, .btn-coffee { display: flex; align-items: center; justify-content: center; padding: 8px; border-radius: 6px; cursor: pointer; transition: all 0.3s ease; background: rgba(var(--accent-rgb), 0.1); border: 1px solid rgba(var(--accent-rgb), 0.2); }
.madmix-search-btn:hover, .btn-coffee:hover { transform: scale(1.1); box-shadow: 0 0 10px rgba(var(--accent-rgb), 0.2); background: rgba(var(--accent-rgb), 0.2); }

/* Sections */
.radio-section, .podcast-section { position: relative; z-index: 1; }
.radio-content, .podcast-content { color: var(--text-primary); }

/* Card Animations */
.content-card { animation: cardSlideIn 0.8s ease-out forwards; opacity: 0; transform: translateY(50px); }
.content-card:nth-child(1) { animation-delay: 0.1s; }
.content-card:nth-child(2) { animation-delay: 0.2s; }
.content-card:nth-child(3) { animation-delay: 0.3s; }
.content-card:nth-child(4) { animation-delay: 0.4s; }
.fade-in { animation: fadeIn 0.5s ease-in-out; }

/* About Section */
.about-section { margin-top: 4rem; position: relative; z-index: 1; }
.about-title { color: var(--text-primary); margin-bottom: 2rem; font-size: clamp(1.8rem, 3vw, 2.5rem); font-weight: 700; background: var(--accent-gradient); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.about-text { color: var(--text-secondary); line-height: 1.8; font-size: clamp(1.1rem, 2vw, 1.3rem); }
.version { margin-top: -15px; font-size: 0.85rem; color: var(--text-muted); text-align: center; }

/* Rightbar */
.rightbar { display: none; }

/* Fallback Radio Grid */
.radio-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1rem; padding: 1rem 0; }

/* Activity Items */
.activity-item { display: flex; gap: 16px; padding: 20px; border-radius: var(--radius-lg); margin-bottom: 16px; background: rgba(var(--accent-rgb), 0.05); border: 1px solid rgba(var(--accent-rgb), 0.2); transition: all 0.3s ease; cursor: pointer; position: relative; overflow: hidden; color: var(--text-secondary); font-weight: 500; }
.activity-item::before { content: ''; position: absolute; top: 0; left: -100%; width: 100%; height: 100%; background: linear-gradient(90deg, transparent, rgba(var(--accent-rgb), 0.1), transparent); transition: left 0.6s; }
.activity-item:hover::before { left: 100%; }
.activity-item:hover { background: rgba(var(--accent-rgb), 0.1); border-color: rgba(var(--accent-rgb), 0.4); transform: translateX(8px) scale(1.02); box-shadow: 0 5px 20px rgba(var(--accent-rgb), 0.15); color: var(--text-primary); }
.activity-avatar { width: 50px; height: 50px; border-radius: var(--radius-md); border: 1px solid #555; background: var(--accent-gradient); display: flex; align-items: center; justify-content: center; font-weight: 700; color: white; font-size: 1.2rem; flex-shrink: 0; box-shadow: 0 0 3px rgba(var(--accent-rgb), 0.1); overflow: hidden; }
.activity-avatar img { width: 100%; height: 100%; object-fit: cover; }
.activity-text { font-size: 1rem; color: var(--text-primary); margin-bottom: 4px; font-weight: 600; }
.activity-time { font-size: 0.85rem; color: var(--text-muted); }


/* --- smart-hamburger-menu.css --- */
:root {
    --shm-accent-rgb: 107, 114, 128;
    --shm-text-primary: #ffffff;
    --shm-text-secondary: #b3b3b3;
    --shm-radius-lg: 6px;
    --shm-space-3: 0.75rem;
    --shm-space-6: 1.5rem;
    --shm-accent-gradient: linear-gradient(135deg, #6b7280, #9ca3af);
}

.shm-sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s ease;
}
.shm-sidebar-overlay.active {
    opacity: 1;
    visibility: visible;
}
.shm-sidebar {
    position: fixed;
    top: 0;
    left: -100%;
    width: min(320px, 85vw);
    height: 100vh;
    background: #151415;
    backdrop-filter: blur(40px);
    border-right: 1px solid rgba(var(--shm-accent-rgb), 0.2);
    padding: var(--shm-space-6);
    overflow-y: auto;
    z-index: 1000;
    transition: left 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.shm-sidebar.open {
    left: 0;
}
.shm-sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(var(--shm-accent-rgb), 0.2);
}
.shm-sidebar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}
.shm-sidebar-brand-logo {
    width: 40px;
    height: 40px;
    background: var(--shm-accent-gradient);
    border-radius: var(--shm-radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.2rem;
    color: white;
}
.shm-sidebar-brand-text {
    font-size: 1.3rem;
    font-weight: 700;
    background: var(--shm-accent-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
.shm-sidebar-close {
    background: rgba(var(--shm-accent-rgb), 0.1);
    border: 1px solid rgba(var(--shm-accent-rgb), 0.2);
    border-radius: var(--shm-radius-lg);
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--shm-text-primary);
    cursor: pointer;
    transition: all 0.3s ease;
}
.shm-sidebar-close:hover {
    background: rgba(var(--shm-accent-rgb), 0.2);
    transform: scale(1.1);
}
.shm-primary-menu {
    list-style: none;
    margin-bottom: 1.5rem;
    padding: 0;
}
.shm-menu-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    border-radius: var(--shm-radius-lg);
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 8px;
    color: var(--shm-text-secondary);
    font-weight: 500;
    position: relative;
    overflow: hidden;
    background: rgba(var(--shm-accent-rgb), 0.03);
    border: 1px solid rgba(var(--shm-accent-rgb), 0.1);
    text-decoration: none;
}
.shm-menu-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(var(--shm-accent-rgb), 0.1), transparent);
    transition: left 0.6s;
}
.shm-menu-item:hover::before {
    left: 100%;
}
.shm-menu-item:hover {
    background: rgba(var(--shm-accent-rgb), 0.1);
    color: var(--shm-text-primary);
    transform: translateX(8px) scale(1.02);
    border-color: rgba(var(--shm-accent-rgb), 0.3);
    box-shadow: 0 3px 15px rgba(var(--shm-accent-rgb), 0.15);
}
.shm-menu-item.active {
    background: rgba(var(--shm-accent-rgb), 0.15);
    color: var(--shm-text-primary);
    border-color: rgba(var(--shm-accent-rgb), 0.4);
    box-shadow: 0 0 20px rgba(var(--shm-accent-rgb), 0.2);
}
.shm-menu-icon {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    fill: currentColor;
}
.shm-menu-icon svg {
    width: 100%;
    height: 100%;
    fill: currentColor;
}
.shm-more-section {
    border-top: 1px solid rgba(var(--shm-accent-rgb), 0.2);
    padding-top: 1rem;
}
.shm-more-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-radius: var(--shm-radius-lg);
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 12px;
    color: var(--shm-text-secondary);
    font-weight: 600;
    background: rgba(var(--shm-accent-rgb), 0.05);
    border: 1px solid rgba(var(--shm-accent-rgb), 0.2);
}
.shm-more-toggle:hover {
    background: rgba(var(--shm-accent-rgb), 0.1);
    color: var(--shm-text-primary);
    border-color: rgba(var(--shm-accent-rgb), 0.3);
}
.shm-more-arrow {
    transition: transform 0.3s ease;
}
.shm-more-toggle.expanded .shm-more-arrow {
    transform: rotate(180deg);
}
.shm-more-items {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.shm-more-items.expanded {
    max-height: 600px; /* Adjust if more items are added */
}
.shm-more-items .shm-menu-item {
    padding: 12px 20px;
    margin-bottom: 4px;
    font-size: 0.95rem;
}

/* --- responsive.css (Cleaned & Corrected) --- */

/* MOBILE RESPONSIVE - Fixed player alignment */
@media (max-width: 767px) {
    /* Layout foundation */
    .app-container {
        display: flex;
        flex-direction: column;
        min-height: 100vh;
        padding: 0;
        gap: 0;
        overflow: hidden;
    }
    
    /* Header */
    .header {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        z-index: 1000;
        height: 70px;
        padding: 8px 8px;
        border-radius: 0;
        flex-direction: row;
        flex-wrap: nowrap;
    }
    
    .search-box { display: none; }
    
    .brand {
        flex: 1;
        min-width: 0;
    }
    
    .brand-logo {
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }
    
    .brand-text {
        font-size: 1rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    .theme-selector {
        gap: 4px;
        padding: 4px;
    }
    
    .theme-color {
        width: 20px;
        height: 20px;
    }
    
    /* Main content */
    .main {
        flex: 1;
        margin-top: 70px;
        margin-bottom: 110px;
        height: calc(100vh - 180px);
        overflow-y: auto;
        border-radius: 0;
        padding: 16px;
        border: none;
    }
    
    /* Mobile player - FIXED */
    .player {
        position: fixed !important;
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        z-index: 1000 !important;
        height: 110px !important;
        padding: 12px !important;
        border-radius: 0 !important;
        border: none !important;
        border-top: 1px solid rgba(var(--accent-rgb), 0.2) !important;
        display: flex !important;
        flex-direction: column !important;
        width: 100%;
        margin: 0;
        grid-area: none;
        box-sizing: border-box !important;
        background: var(--bg-secondary);
        backdrop-filter: none;
    }

    .player::before {
        display: none;
    }
    
    .player-content {
        display: flex !important;
        flex-direction: column !important;
        gap: 10px !important;
        height: 100% !important;
        justify-content: space-between !important;
        flex: 1 !important;
        box-sizing: border-box !important;
    }
    
    /* Track info row */
    .now-playing {
        display: flex !important;
        align-items: center !important;
        gap: 0px !important;
        width: 100% !important;
        min-width: 0 !important;
        flex: 0 0 auto !important;
        box-sizing: border-box !important;
    }
    
    .track-image {
        width: 42px !important;
        height: 42px !important;
        min-width: 42px !important;
        min-height: 42px !important;
        max-width: 42px !important;
        max-height: 42px !important;
        font-size: 1.2rem !important;
        flex-shrink: 0 !important;
        margin-right: 12px !important;
        box-sizing: border-box !important;
    }
    
    .track-details {
        flex: 1 !important;
        min-width: 0 !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }
    
    .track-name,
    .track-artist {
        font-size: 0.9rem !important;
        margin-bottom: 2px !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }
    
    .track-artist {
        font-size: 0.8rem !important;
    }
    
    /* Controls row */
    .player-controls {
        display: flex !important;
        width: 100% !important;
        align-items: center !important;
        justify-content: center !important;
        flex: 0 0 auto !important;
        flex-direction: row !important;
        position: static !important;
        box-sizing: border-box !important;
    }
    
    .control-buttons {
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        width: 100% !important;
        max-width: none !important;
        gap: 8px !important;
        padding: 0 !important;
    }
    
    /* All buttons same size */
    .control-btn,
    .play-btn,
    .volume-btn,
    #fullscreen-toggle,
    #rewindBtn,
    #forwardBtn,
    #requestBtn,
    #lyricsBtn {
        width: 40px !important;
        height: 40px !important;
        flex: 1;
        min-width: 35px;
        max-width: 45px;
        display: flex !important;
        align-items: center;
        justify-content: center;
        background: rgba(var(--accent-rgb), 0.1);
        border: 1px solid rgba(var(--accent-rgb), 0.3);
        border-radius: var(--radius-lg);
        color: var(--text-primary);
        cursor: pointer;
        transition: all 0.3s ease;
    }
    
    .play-btn {
        background: var(--accent-gradient) !important;
        border-color: rgba(var(--accent-rgb), 0.8) !important;
        color: white !important;
    }
    
    .progress-container { display: none !important; }
    
    /* CORRECTED: Make hamburger icon visible and sized correctly */
    .mobile-menu-toggle {
        display: flex;
        min-width: 44px;
        min-height: 44px;
        padding: 8px;
        margin: 0;
    }
    
    /* Content adjustments */
    .content-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .content-card {
        padding: 16px;
    }
    
    .card-image {
        margin-bottom: 12px;
        height: 120px;
    }
    
    .tv-card {
        max-height: 70px;
        min-height: 60px;
        padding: 8px;
    }
    
    .tv-image-frame,
    .radio-image-frame,
    .podcast-image-frame {
        width: 40px;
        height: 40px;
        margin-right: 8px;
    }
    
    .tv-text h3 {
        font-size: 0.85rem;
        line-height: 1.2;
    }
    
    .tv-text p {
        font-size: 0.75rem;
        line-height: 1.3;
        -webkit-line-clamp: 1;
    }
    
    .form-section {
        padding: 16px;
    }
    
    .form-group input,
    .form-group textarea,
    .form-group select {
        font-size: 16px;
        padding: 12px;
    }
    
    .form-btn {
        min-height: 44px;
        font-size: 16px;
    }
    
    .page-actions {
        flex-direction: column;
        gap: 12px;
    }
    
    .action-btn {
        text-align: center;
        min-height: 44px;
        padding: 12px 24px;
    }
}

/* Extra small screens */
@media (max-width: 480px) {
    .header {
        height: 60px;
        padding: 6px 6px;
    }
    
    .main {
        margin-top: 60px;
        margin-bottom: 100px;
        height: calc(100vh - 160px);
        padding: 12px;
    }
    
    .player {
        padding: 8px 8px !important;
    }
    
    .brand-logo {
        width: 30px;
        height: 30px;
        font-size: 0.9rem;
    }
    
    .brand-text {
        font-size: 0.9rem;
    }
    
    .control-buttons {
        max-width: 280px;
        gap: 6px;
    }
    
    .tv-image-frame,
    .radio-image-frame,
    .podcast-image-frame {
        width: 35px;
        height: 35px;
        margin-right: 6px;
    }
    
    .tv-card {
        max-height: 60px;
        min-height: 50px;
        padding: 6px;
    }
    
    .page-title {
        font-size: 2rem;
    }
    
    .page-subtitle {
        font-size: 1rem;
    }
}

/* PORTRAIT TABLETS - Uses mobile-style stacked player */
@media (min-width: 768px) and (max-width: 1023px) and (orientation: portrait) {
    .app-container { 
        grid-template-areas: "header header" "main main" "player player"; 
        grid-template-columns: 1fr; 
        grid-template-rows: 100px 1fr 130px; 
        height: 100vh; 
        overflow: hidden; 
        padding: var(--space-4);
        gap: var(--space-4);
    }
    
    .mobile-menu-toggle { display: flex; }
    
    /* Portrait tablet player - stacked like mobile */
    .player { 
        position: static !important;
        bottom: auto !important;
        left: auto !important;
        right: auto !important;
        width: auto !important;
        height: 130px !important;
        border-radius: var(--radius-xl) !important;
        margin: 0 !important;
        padding: 16px !important;
        border: 1px solid rgba(var(--accent-rgb), 0.2) !important;
        display: flex !important;
        flex-direction: column !important;
        box-sizing: border-box !important;
    }
    
    .player-content {
        display: flex !important;
        flex-direction: column !important;
        gap: 12px !important;
        height: 100% !important;
        justify-content: space-between !important;
        box-sizing: border-box !important;
        flex: 1 !important;
    }
    
    /* Track info row for portrait tablets */
    .now-playing {
        display: flex !important;
        align-items: center !important;
        gap: 12px !important;
        width: 100% !important;
        min-width: 0 !important;
        flex: 0 0 auto !important;
        box-sizing: border-box !important;
    }
    
    .track-image {
        width: 50px !important;
        height: 50px !important;
        font-size: 1.4rem !important;
        flex-shrink: 0 !important;
        min-width: 50px !important;
        min-height: 50px !important;
        max-width: 50px !important;
        max-height: 50px !important;
        margin-right: 12px !important;
        box-sizing: border-box !important;
    }
    
    .track-details {
        flex: 1 !important;
        min-width: 0 !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }
    
    .track-name {
        font-size: 1rem !important;
        margin-bottom: 4px !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }
    
    .track-artist {
        font-size: 0.9rem !important;
    }
    
    /* Control buttons row for portrait tablets */
    .player-controls {
        display: flex !important;
        width: 100% !important;
        align-items: center !important;
        justify-content: center !important;
        flex: 0 0 auto !important;
        flex-direction: row !important;
        position: static !important;
        box-sizing: border-box !important;
    }
    
    .control-buttons {
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
        gap: 16px !important;
        width: 100% !important;
        max-width: 500px !important;
        padding: 0 !important;
        margin: 0 auto !important;
        box-sizing: border-box !important;
        flex-wrap: nowrap !important;
    }
    
    .control-btn,
    .play-btn,
    .volume-btn,
    #fullscreen-toggle,
    #rewindBtn,
    #forwardBtn,
    #requestBtn,
    #lyricsBtn {
        width: 50px !important;
        height: 50px !important;
        flex: none !important;
        min-width: 50px !important;
        max-width: 50px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        background: rgba(var(--accent-rgb), 0.1) !important;
        border: 1px solid rgba(var(--accent-rgb), 0.3) !important;
        border-radius: var(--radius-lg) !important;
        color: var(--text-primary) !important;
        cursor: pointer !important;
        transition: all 0.3s ease !important;
    }
    
    .play-btn {
        width: 60px !important;
        height: 60px !important;
        min-width: 60px !important;
        max-width: 60px !important;
        background: var(--accent-gradient) !important;
        border-color: rgba(var(--accent-rgb), 0.8) !important;
        color: white !important;
    }
    
    .progress-container { display: none !important; }
    
    .main { 
        overflow-y: auto;
        box-sizing: border-box;
    }
    
    .content-grid { 
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); 
        gap: var(--space-6);
    }
    
    .header { 
        flex-wrap: wrap; 
        min-height: 100px; 
    }
    
    .brand { order: 1; }
    .header-controls { order: 2; }
    .search-box { 
        order: 3; 
        width: 100%; 
        flex-basis: 100%; 
        margin-top: var(--space-3); 
    }
    
    .tv-grid, #stationGrid, #podcastGrid, #tvGrid { 
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); 
    }
}

/* LANDSCAPE TABLETS - Uses desktop layout with responsive adjustments */
@media (min-width: 768px) and (max-width: 1023px) and (orientation: landscape) {
    .app-container { 
        grid-template-areas: "header header" "main main" "player player"; 
        grid-template-columns: 1fr; 
        grid-template-rows: 100px 1fr 120px; 
        height: 100vh; 
        overflow: hidden; 
        padding: var(--space-4);
        gap: var(--space-4);
    }
    
    .mobile-menu-toggle { display: flex; }
    
    /* Landscape tablet player - horizontal like desktop but more compact */
    .player { 
        position: static; 
        width: auto; 
        bottom: auto; 
        left: auto; 
        border-radius: var(--radius-xl); 
        margin: 0; 
        height: 120px;
        padding: 16px;
    }
    
    .player-content { 
        flex-direction: row; 
        align-items: center; 
        gap: var(--space-4);
    }
    
    .now-playing { 
        min-width: 250px; 
        flex-shrink: 0;
    }
    
    .track-image { 
        width: 55px; 
        height: 55px; 
        font-size: 1.6rem; 
    }
    
    .player-controls { 
        flex: 1; 
        align-items: center; 
        flex-direction: row; 
        gap: var(--space-4);
        justify-content: center;
    }
    
    .control-buttons {
        gap: var(--space-3);
        display: flex;
        align-items: center;
        justify-content: center;
        flex: 1;
        flex-wrap: nowrap;
    }
    
    /* Landscape tablet rectangular buttons - proper CSS cascade solution */
    .player .player-content .player-controls .control-buttons .control-btn,
    .player .player-content .player-controls .control-buttons .volume-btn,
    .player .player-content .player-controls .control-buttons button[id="fullscreen-toggle"],
    .player .player-content .player-controls .control-buttons button[id="rewindBtn"],
    .player .player-content .player-controls .control-buttons button[id="forwardBtn"],
    .player .player-content .player-controls .control-buttons button[id="requestBtn"],
    .player .player-content .player-controls .control-buttons button[id="lyricsBtn"] {
        width: auto;
        height: 45px;
        min-width: 50px;
        flex: 1 1 auto;
        max-width: 90px;
        border-radius: 8px;
        display: flex;
        align-items: center;
        justify-content: center;
        background: rgba(var(--accent-rgb), 0.1);
        border: 1px solid rgba(var(--accent-rgb), 0.3);
        color: var(--text-primary);
        cursor: pointer;
        transition: all 0.3s ease;
        font-size: 0.9rem;
        box-sizing: border-box;
    }
    
    /* Play button remains circular */
    .player .player-content .player-controls .control-buttons .play-btn {
        width: 55px;
        height: 55px;
        min-width: 55px;
        max-width: 55px;
        flex: none;
        border-radius: 50%;
        background: var(--accent-gradient);
        border-color: rgba(var(--accent-rgb), 0.8);
        color: white;
    }
    
    /* Responsive progress bar for landscape tablets */
    .progress-container { 
        max-width: 300px; 
        flex: 1;
        min-width: 200px;
    }
    
    .progress-bar { 
        width: 100%;
        min-width: 150px;
    }
    
    .main { 
        overflow-y: auto; 
    }
    
    .content-grid { 
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); 
    }
    
    .header { 
        flex-wrap: wrap; 
        min-height: 100px; 
    }
    
    .brand { order: 1; }
    .header-controls { order: 2; }
    .search-box { 
        order: 3; 
        width: 100%; 
        flex-basis: 100%; 
        margin-top: var(--space-3); 
    }
    
    .tv-grid, #stationGrid, #podcastGrid, #tvGrid { 
        grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); 
    }
    
    .tv-card { 
        min-height: 80px; 
        max-height: 100px; 
        padding: 0.6rem; 
    }
    
    .tv-image-frame, .radio-image-frame, .podcast-image-frame { 
        width: 60px; 
        height: 60px; 
    }
}

/* Tablet and desktop - keep existing layout */
@media (max-width: 768px) {
    .form-section { padding: 1.5rem; }
    .status-overview { padding: 1.5rem; }
    .status-indicator { flex-direction: column; gap: 0.5rem; }
    .status-controls { flex-direction: column; align-items: stretch; }
}

/* DESKTOP AND LARGE LANDSCAPE TABLETS */
@media (min-width: 1024px) {
    .app-container { 
        grid-template-areas: "sidebar main rightbar"; 
        grid-template-rows: 100px 1fr 120px; 
        grid-template-columns: 320px 1fr 320px; 
        gap: var(--space-6); 
        padding: var(--space-6) var(--space-6) 0 var(--space-6);
        grid-template-areas: "header header header" "sidebar main rightbar" "player player player";
        height: 100vh; 
        overflow: hidden; 
        box-sizing: border-box;
        width: 100vw;
        max-width: 100vw;
    }
    
    .sidebar { 
        display: block; /* Make sidebar visible on desktop */
        position: static; 
        width: auto; 
        height: auto; 
        grid-area: sidebar; 
        z-index: auto; 
        left: auto; 
        border-right: none; 
        border: 1px solid rgba(var(--accent-rgb), 0.2); 
        border-radius: var(--radius-xl); 
        overflow-y: auto; 
        box-sizing: border-box;
        background: #151415;
        backdrop-filter: blur(40px);
        padding: var(--space-6);
    }
    
    .sidebar::before { 
        content: ''; 
        position: absolute; 
        top: 0; left: 0; 
        width: 100%; height: 100%; 
        background: #151415; 
        pointer-events: none; 
    }

    .mobile-menu-toggle { display: none !important; }
    .search-box { order: 2; max-width: 600px; }
    .header-controls { order: 3; }
    
    .player { 
        position: static; 
        width: auto; 
        bottom: auto; 
        left: auto; 
        border-radius: var(--radius-xl); 
        margin: 0; 
        height: fit-content; 
        box-sizing: border-box;
    }
    
    .player-content { 
        flex-direction: row; 
        align-items: center; 
        gap: var(--space-6); 
    }
    
    .now-playing { 
        min-width: 280px; 
        max-width: 350px;
        flex-shrink: 0;
    }
    
    .track-image { 
        width: 60px; 
        height: 60px; 
        font-size: 1.8rem; 
    }
    
    .track-details {
        min-width: 0;
        flex: 1;
    }
    
    .track-name,
    .track-artist {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    .control-btn { 
        width: 45px; 
        height: 45px; 
    }
    
    .play-btn { 
        width: 55px; 
        height: 55px; 
    }
    
    .player-controls { 
        flex: 1; 
        align-items: center; 
        flex-direction: row; 
        gap: var(--space-6);
        min-width: 0;
    }
    
    .progress-container { 
        display: flex; /* Re-enable progress bar for desktop */
        flex: 1;
        max-width: 600px;
        min-width: 300px;
    }
    
    .progress-bar { 
        flex: 1;
        min-width: 200px;
        max-width: 400px;
    }
    
    .main { 
        overflow-y: auto; 
        box-sizing: border-box;
    }
    
    .tv-grid, #stationGrid, #podcastGrid, #tvGrid { 
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); 
    }
    
    .rightbar { 
        display: block; 
        grid-area: rightbar; 
        background: #151415; 
        backdrop-filter: blur(40px); 
        border: 1px solid rgba(var(--accent-rgb), 0.2); 
        border-radius: var(--radius-xl); 
        padding: var(--space-6); 
        overflow-y: auto; 
        position: relative; 
        box-sizing: border-box;
    }
    
    .rightbar::before { 
        content: ''; 
        position: absolute; 
        top: 0; 
        left: 0; 
        width: 100%; 
        height: 100%; 
        background: #151415; 
        pointer-events: none; 
    }
}

/* LARGE PORTRAIT TABLETS (iPad Pro etc) - No sidebars */
@media (min-width: 1024px) and (orientation: portrait) {
    .app-container { 
        grid-template-areas: "header header" "main main" "player player"; 
        grid-template-columns: 1fr; 
        grid-template-rows: 100px 1fr 130px; 
        height: 100vh; 
        overflow: hidden; 
        padding: var(--space-4);
        gap: var(--space-4);
    }
    
    .mobile-menu-toggle { display: flex; }
    
    /* Ensure old sidebar is hidden and new one is used */
    .sidebar { display: none; }
    .rightbar { display: none; }
    
    .shm-sidebar { 
        width: 320px; 
    }
    
    /* Large portrait tablet player - stacked like other tablets */
    .player { 
        position: static !important;
        bottom: auto !important;
        left: auto !important;
        right: auto !important;
        width: auto !important;
        height: 130px !important;
        border-radius: var(--radius-xl) !important;
        margin: 0 !important;
        padding: 16px !important;
        border: 1px solid rgba(var(--accent-rgb), 0.2) !important;
        display: flex !important;
        flex-direction: column !important;
        box-sizing: border-box !important;
    }
    
    .player-content {
        display: flex !important;
        flex-direction: column !important;
        gap: 12px !important;
        height: 100% !important;
        justify-content: space-between !important;
        box-sizing: border-box !important;
        flex: 1 !important;
    }
    
    /* Track info row for large portrait tablets */
    .now-playing {
        display: flex !important;
        align-items: center !important;
        gap: 12px !important;
        width: 100% !important;
        min-width: 0 !important;
        flex: 0 0 auto !important;
        box-sizing: border-box !important;
    }
    
    .track-image {
        width: 50px !important;
        height: 50px !important;
        font-size: 1.4rem !important;
        flex-shrink: 0 !important;
        min-width: 50px !important;
        min-height: 50px !important;
        max-width: 50px !important;
        max-height: 50px !important;
        margin-right: 12px !important;
        box-sizing: border-box !important;
    }
    
    .track-details {
        flex: 1 !important;
        min-width: 0 !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }
    
    .track-name {
        font-size: 1rem !important;
        margin-bottom: 4px !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }
    
    .track-artist {
        font-size: 0.9rem !important;
    }
    
    /* Control buttons row for large portrait tablets */
    .player-controls {
        display: flex !important;
        width: 100% !important;
        align-items: center !important;
        justify-content: center !important;
        flex: 0 0 auto !important;
        flex-direction: row !important;
        position: static !important;
        left: auto !important;
        transform: none !important;
        z-index: auto !important;
        box-sizing: border-box !important;
    }
    
    .control-buttons {
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
        gap: 16px !important;
        width: 100% !important;
        max-width: 500px !important;
        padding: 0 !important;
        margin: 0 auto !important;
        box-sizing: border-box !important;
        flex-wrap: nowrap !important;
    }
    
    .control-btn,
    .play-btn,
    .volume-btn,
    #fullscreen-toggle,
    #rewindBtn,
    #forwardBtn,
    #requestBtn,
    #lyricsBtn {
        width: 50px !important;
        height: 50px !important;
        flex: none !important;
        min-width: 50px !important;
        max-width: 50px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        background: rgba(var(--accent-rgb), 0.1) !important;
        border: 1px solid rgba(var(--accent-rgb), 0.3) !important;
        border-radius: var(--radius-lg) !important;
        color: var(--text-primary) !important;
        cursor: pointer !important;
        transition: all 0.3s ease !important;
    }
    
    .play-btn {
        width: 60px !important;
        height: 60px !important;
        min-width: 60px !important;
        max-width: 60px !important;
        background: var(--accent-gradient) !important;
        border-color: rgba(var(--accent-rgb), 0.8) !important;
        color: white !important;
    }
    
    .progress-container { display: none !important; }
    
    .main { 
        overflow-y: auto;
        box-sizing: border-box;
    }
    
    .content-grid { 
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); 
        gap: var(--space-6);
    }
    
    .header { 
        flex-wrap: wrap; 
        min-height: 100px; 
    }
    
    .brand { order: 1; }
    .header-controls { order: 2; }
    .search-box { 
        order: 3; 
        width: 100%; 
        flex-basis: 100%; 
        margin-top: var(--space-3); 
    }
    
    .tv-grid, #stationGrid, #podcastGrid, #tvGrid { 
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); 
    }
}