/* RAVN Alerts Terminal - Styles */

:root {
  --bg-dark: #0a0a0f;
  --bg-panel: #12121a;
  --bg-card: #1a1a25;
  --bg-hover: #22222f;
  --bg-input: #0d0d12;
  
  --accent-primary: #00f5ff;
  --accent-cyan: #00f5ff;
  --accent-magenta: #ff00ff;
  --accent-gold: #ffd700;
  --accent-green: #50fa7b;
  --accent-red: #ff5555;
  --accent-orange: #ffb86c;
  --accent-purple: #bd93f9;
  
  --text-primary: #e8e8e8;
  --text-secondary: #a0a0a0;
  --text-muted: #666;
  
  --border-color: rgba(255, 255, 255, 0.08);
  --border-glow: rgba(0, 245, 255, 0.3);
  --glow-color: rgba(0, 245, 255, 0.5);
  
  --header-height: 60px;
  --toolbar-height: 45px;
  --sidebar-width: 240px;
  
  --font-mono: 'Share Tech Mono', 'JetBrains Mono', monospace;
  --font-display: 'Orbitron', sans-serif;
  --font-pixel: 'VT323', monospace;
}

/* ========== THEMES ========== */

/* Midnight Blue */
[data-theme="midnight"] {
  --bg-dark: #0a0f1a;
  --bg-panel: #101828;
  --bg-card: #182035;
  --bg-hover: #1f2a45;
  --bg-input: #0c1220;
  
  --accent-primary: #4a9eff;
  --accent-cyan: #4a9eff;
  --border-glow: rgba(74, 158, 255, 0.3);
  --glow-color: rgba(74, 158, 255, 0.5);
}

/* Hacker Green / Matrix */
[data-theme="hacker"] {
  --bg-dark: #0a0f0a;
  --bg-panel: #0d150d;
  --bg-card: #121a12;
  --bg-hover: #1a251a;
  --bg-input: #080c08;
  
  --accent-primary: #00ff41;
  --accent-cyan: #00ff41;
  --accent-green: #00ff41;
  --text-primary: #00ff41;
  --text-secondary: #00cc33;
  --text-muted: #007722;
  --border-color: rgba(0, 255, 65, 0.15);
  --border-glow: rgba(0, 255, 65, 0.4);
  --glow-color: rgba(0, 255, 65, 0.6);
}

/* Golden / Luxe */
[data-theme="golden"] {
  --bg-dark: #0f0d08;
  --bg-panel: #1a1610;
  --bg-card: #252015;
  --bg-hover: #302a1a;
  --bg-input: #0c0a06;
  
  --accent-primary: #ffd700;
  --accent-cyan: #ffd700;
  --accent-gold: #ffd700;
  --text-primary: #f5e6c8;
  --text-secondary: #c4a86a;
  --text-muted: #8a7040;
  --border-color: rgba(255, 215, 0, 0.12);
  --border-glow: rgba(255, 215, 0, 0.35);
  --glow-color: rgba(255, 215, 0, 0.5);
}

/* Crimson / Blood */
[data-theme="crimson"] {
  --bg-dark: #0f0808;
  --bg-panel: #1a1010;
  --bg-card: #251515;
  --bg-hover: #351a1a;
  --bg-input: #0c0606;
  
  --accent-primary: #ff3355;
  --accent-cyan: #ff3355;
  --accent-red: #ff3355;
  --text-primary: #f5d0d0;
  --text-secondary: #c48080;
  --text-muted: #804040;
  --border-color: rgba(255, 51, 85, 0.12);
  --border-glow: rgba(255, 51, 85, 0.35);
  --glow-color: rgba(255, 51, 85, 0.5);
}

/* Purple Haze */
[data-theme="purple"] {
  --bg-dark: #0d0a12;
  --bg-panel: #15101f;
  --bg-card: #1d1528;
  --bg-hover: #261a35;
  --bg-input: #0a0810;
  
  --accent-primary: #bd93f9;
  --accent-cyan: #bd93f9;
  --accent-purple: #bd93f9;
  --text-primary: #e8e0f5;
  --text-secondary: #a090c0;
  --text-muted: #605080;
  --border-color: rgba(189, 147, 249, 0.12);
  --border-glow: rgba(189, 147, 249, 0.35);
  --glow-color: rgba(189, 147, 249, 0.5);
}

/* ========== FONT SIZES ========== */
[data-font-size="small"] { font-size: 13px; }
[data-font-size="medium"] { font-size: 15px; }
[data-font-size="large"] { font-size: 17px; }

[data-font-size="small"] .message-text { font-size: 1rem; }
[data-font-size="medium"] .message-text { font-size: 1.1rem; }
[data-font-size="large"] .message-text { font-size: 1.25rem; }

/* Reset */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: var(--font-mono);
  background: var(--bg-dark);
  color: var(--text-primary);
  min-height: 100vh;
  overflow: hidden;
}

.hidden { display: none !important; }

/* Auth Check Screen */
.auth-check {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-dark);
  z-index: 9999;
}

.auth-check-content { text-align: center; }

.logo-spin {
  width: 100px;
  height: 100px;
  border: 3px solid var(--border-glow);
  border-top-color: var(--accent-cyan);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  animation: spin 1.5s linear infinite;
}

.logo-spin .logo-text {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 900;
  color: var(--accent-cyan);
  animation: spin-reverse 1.5s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes spin-reverse { to { transform: rotate(-360deg); } }

.auth-status {
  font-size: 0.9rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 2px;
}

/* Not Auth Screen */
.not-auth {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: 
    radial-gradient(ellipse at 50% 0%, rgba(0, 245, 255, 0.08) 0%, transparent 50%),
    var(--bg-dark);
}

.not-auth-content {
  text-align: center;
  padding: 50px;
  background: var(--bg-panel);
  border: 1px solid var(--border-glow);
  border-radius: 16px;
  max-width: 500px;
}

.not-auth-content .logo {
  font-family: var(--font-display);
  font-size: 3rem;
  font-weight: 900;
  color: var(--accent-cyan);
  text-shadow: 0 0 30px rgba(0, 245, 255, 0.5);
  margin-bottom: 5px;
  letter-spacing: 6px;
}

.not-auth-content .subtitle {
  font-size: 1rem;
  color: var(--text-muted);
  letter-spacing: 4px;
  margin-bottom: 40px;
}

.not-auth-message {
  font-size: 1rem;
  color: var(--text-secondary);
  line-height: 1.8;
}

.not-auth-message code {
  background: var(--bg-dark);
  padding: 4px 10px;
  border-radius: 4px;
  color: var(--accent-cyan);
}

.not-auth-message a {
  color: var(--accent-cyan);
  text-decoration: none;
}

.not-auth-message a:hover {
  text-decoration: underline;
}

/* Header */
.header {
  height: var(--header-height);
  background: var(--bg-panel);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
}

.header-left {
  display: flex;
  align-items: baseline;
  gap: 15px;
}

.header .logo {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 900;
  color: var(--accent-cyan);
  text-shadow: 0 0 15px rgba(0, 245, 255, 0.4);
  letter-spacing: 3px;
}

.header .subtitle {
  font-size: 0.7rem;
  color: var(--text-muted);
  letter-spacing: 3px;
  text-transform: uppercase;
}

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

.connection-status {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: var(--bg-dark);
  border-radius: 20px;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

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

.connection-status.connected .status-dot {
  background: var(--accent-green);
  animation: none;
}

.connection-status.disconnected .status-dot {
  background: var(--accent-red);
  animation: none;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.header-right {
  display: flex;
  align-items: center;
  gap: 15px;
}

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

.tier-badge {
  font-family: var(--font-display);
  font-size: 0.65rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 4px;
  background: var(--accent-gold);
  color: var(--bg-dark);
  letter-spacing: 1px;
}

.tier-badge.pro { background: var(--accent-gold); }
.tier-badge.vip { background: var(--accent-purple); }
.tier-badge.admin { background: var(--accent-cyan); }
.tier-badge.web { background: var(--accent-magenta); }

.username {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.btn-icon {
  width: 36px;
  height: 36px;
  background: transparent;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  cursor: pointer;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.btn-icon:hover {
  background: var(--bg-hover);
  border-color: var(--accent-cyan);
}

.btn-icon.small {
  width: 28px;
  height: 28px;
  font-size: 0.8rem;
}

/* Toolbar */
.toolbar {
  height: var(--toolbar-height);
  background: var(--bg-panel);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  position: fixed;
  top: var(--header-height);
  left: 0;
  right: 0;
  z-index: 99;
}

.toolbar-left, .toolbar-right {
  display: flex;
  align-items: center;
  gap: 15px;
}

.btn-tool {
  padding: 6px 14px;
  background: var(--bg-dark);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-tool:hover {
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
}

.layout-buttons {
  display: flex;
  gap: 5px;
}

.btn-layout {
  width: 32px;
  height: 28px;
  background: var(--bg-dark);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  font-size: 1.1rem;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-layout:hover {
  border-color: var(--accent-primary);
  color: var(--accent-primary);
  background: var(--bg-hover);
}

.btn-layout.active {
  border-color: var(--accent-primary);
  color: var(--accent-primary);
  background: rgba(0, 245, 255, 0.1);
  box-shadow: 0 0 8px var(--glow-color);
}

.channel-count {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.channel-count span {
  color: var(--accent-cyan);
  font-weight: bold;
}

/* Sidebar */
.sidebar {
  width: var(--sidebar-width);
  min-width: 180px;
  max-width: 500px;
  background: var(--bg-panel);
  border-right: 1px solid var(--border-color);
  position: fixed;
  top: calc(var(--header-height) + var(--toolbar-height));
  left: 0;
  bottom: 0;
  overflow-y: auto;
  z-index: 50;
  transition: transform 0.3s ease;
}

.sidebar.collapsed {
  transform: translateX(-100%);
  pointer-events: none;
  opacity: 0;
}

/* Sidebar resize handle */
.sidebar-resize-handle {
  position: absolute;
  top: 0;
  right: -4px;
  width: 8px;
  height: 100%;
  cursor: ew-resize;
  background: transparent;
  z-index: 60;
  transition: background 0.2s;
}

.sidebar-resize-handle:hover,
.sidebar-resize-handle.dragging {
  background: var(--accent-primary);
  opacity: 0.5;
}

.sidebar.resizing {
  transition: none;
  user-select: none;
}

body.sidebar-resizing {
  cursor: ew-resize;
  user-select: none;
}

body.sidebar-resizing * {
  cursor: ew-resize !important;
}

.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px;
  border-bottom: 1px solid var(--border-color);
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 2px;
  color: var(--text-muted);
}

.channel-list {
  padding: 10px;
}

.channel-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  margin-bottom: 5px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
}

.channel-item:hover {
  background: var(--bg-hover);
}

.channel-item.active {
  background: rgba(0, 245, 255, 0.1);
  border-color: var(--border-glow);
}

.channel-toggle {
  width: 18px;
  height: 18px;
  border-radius: 4px;
  border: 2px solid var(--text-muted);
  background: transparent;
  transition: all 0.2s;
}

.channel-item.active .channel-toggle {
  border-color: var(--accent-cyan);
  background: var(--accent-cyan);
}

.channel-item.active .channel-toggle::after {
  content: '✓';
  display: block;
  text-align: center;
  line-height: 14px;
  font-size: 12px;
  color: var(--bg-dark);
  font-weight: bold;
}

.chain-emoji {
  font-size: 0.75rem;
  flex-shrink: 0;
}

.channel-name {
  flex: 1;
  font-size: 0.85rem;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.channel-item.active .channel-name {
  color: var(--text-primary);
}

.channel-type {
  font-size: 0.65rem;
  padding: 2px 6px;
  border-radius: 3px;
  background: var(--bg-dark);
  color: var(--text-muted);
  text-transform: uppercase;
}

.channel-type.alerts { background: rgba(255, 85, 85, 0.2); color: var(--accent-red); }
.channel-type.group { background: rgba(80, 250, 123, 0.2); color: var(--accent-green); }
.channel-type.vip { background: rgba(189, 147, 249, 0.2); color: var(--accent-purple); }

/* Main Content */
.main-content {
  position: fixed;
  top: calc(var(--header-height) + var(--toolbar-height));
  left: var(--sidebar-width);
  right: 0;
  bottom: 0;
  background: var(--bg-dark);
  overflow: auto;
  padding: 15px;
  transition: left 0.3s ease;
}

.sidebar.collapsed + .main-content,
.main-content.expanded {
  left: 0;
}

.empty-state {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
}

.empty-icon {
  font-size: 4rem;
  margin-bottom: 20px;
  opacity: 0.5;
}

.empty-state h2 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 10px;
  letter-spacing: 2px;
}

.empty-state p {
  font-size: 0.9rem;
}

/* Channel Panels Grid */
.channel-panels {
  display: grid;
  gap: 15px;
  min-height: 100%;
}

/* Auto-fit grid - adapts to available space */
.channel-panels.layout-grid {
  grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
}

/* 2 columns */
.channel-panels.layout-two {
  grid-template-columns: repeat(2, 1fr);
}

/* 3 columns */
.channel-panels.layout-three {
  grid-template-columns: repeat(3, 1fr);
}

/* Single stack */
.channel-panels.layout-stack {
  grid-template-columns: 1fr;
  max-width: 900px;
  margin: 0 auto;
}

/* When sidebar is hidden, allow wider panels */
.main-content.expanded .channel-panels.layout-grid {
  grid-template-columns: repeat(auto-fit, minmax(420px, 1fr));
}

.main-content.expanded .channel-panels.layout-stack {
  max-width: 1000px;
}

/* Channel Panel */
.channel-panel {
  background: var(--bg-panel);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  height: 500px; /* Fixed height for consistent sizing */
  min-height: 300px;
  max-height: 70vh;
  overflow: hidden;
  transition: border-color 0.3s;
}

.channel-panel:hover {
  border-color: var(--border-glow);
}

.channel-panel.highlight {
  animation: highlight-pulse 0.5s ease;
}

@keyframes highlight-pulse {
  0%, 100% { border-color: var(--border-color); }
  50% { border-color: var(--accent-cyan); box-shadow: 0 0 20px rgba(0, 245, 255, 0.3); }
}

.panel-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 15px;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border-color);
  cursor: grab;
}

.panel-header:active {
  cursor: grabbing;
}

.drag-handle {
  color: var(--text-muted);
  font-size: 14px;
  letter-spacing: 2px;
  opacity: 0.5;
  transition: opacity 0.2s;
}

.channel-panel:hover .drag-handle {
  opacity: 1;
}

/* Drag and drop states */
.channel-panel.dragging {
  opacity: 0.5;
  border-color: var(--accent-primary);
  box-shadow: 0 0 20px var(--glow-color);
}

.channel-panel.drag-over {
  border-color: var(--accent-primary);
  background: var(--bg-hover);
  transform: scale(1.02);
  box-shadow: 0 0 30px var(--glow-color);
}

.chain-indicator {
  font-size: 0.9rem;
  margin-right: 6px;
  filter: drop-shadow(0 0 3px currentColor);
}

.panel-title {
  flex: 1;
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: 1px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

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

.panel-mute,
.panel-settings,
.panel-close {
  width: 24px;
  height: 24px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 0.9rem;
  cursor: pointer;
  border-radius: 4px;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.panel-close {
  font-size: 1.2rem;
}

.panel-mute:hover {
  background: rgba(0, 245, 255, 0.2);
  color: var(--accent-cyan);
}

.panel-mute.muted {
  color: var(--accent-red);
  opacity: 0.7;
}

.panel-settings:hover {
  background: rgba(0, 245, 255, 0.2);
  color: var(--accent-cyan);
}

.panel-close:hover {
  background: rgba(255, 85, 85, 0.2);
  color: var(--accent-red);
}

.panel-messages {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 10px;
  min-height: 0; /* Critical for flex children to scroll properly */
}

/* Messages */
.message {
  padding: 10px 12px;
  margin-bottom: 8px;
  background: var(--bg-card);
  border-radius: 8px;
  border-left: 3px solid transparent;
  animation: message-in 0.3s ease;
}

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

.message.new {
  border-left-color: var(--accent-cyan);
}

.message-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.message-sender {
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--accent-gold);
}

.message-time {
  font-size: 0.7rem;
  color: var(--text-muted);
}

.message-forwarded {
  font-size: 0.7rem;
  color: var(--text-muted);
  font-style: italic;
}

.message-text {
  font-family: var(--font-pixel);
  font-size: 1.1rem;
  line-height: 1.4;
  color: var(--text-secondary);
  white-space: pre-wrap;
  word-break: break-word;
  letter-spacing: 0.5px;
}

.message-text a {
  color: var(--accent-primary);
  text-decoration: none;
}

.message-text a:hover {
  text-decoration: underline;
}

/* Copyable code/pre elements */
.message-text code,
.message-text pre {
  background: var(--bg-dark);
  padding: 2px 6px;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 0.85em;
  color: var(--accent-primary);
  border: 1px solid var(--border-color);
}

.message-text pre {
  display: block;
  padding: 10px;
  margin: 8px 0;
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-all;
}

.message-text .copyable {
  cursor: pointer;
  position: relative;
  transition: all 0.2s;
}

.message-text .copyable:hover {
  background: var(--bg-hover);
  border-color: var(--accent-primary);
  box-shadow: 0 0 8px var(--glow-color);
}

.message-text .copyable:active {
  transform: scale(0.98);
}

.message-text .copyable.copied::after {
  content: '✓ Copied!';
  position: absolute;
  top: -25px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--accent-green);
  color: var(--bg-dark);
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: bold;
  white-space: nowrap;
  animation: fadeOut 1.5s forwards;
}

@keyframes fadeOut {
  0%, 70% { opacity: 1; }
  100% { opacity: 0; }
}

.message-media {
  margin-top: 8px;
  padding: 8px;
  background: var(--bg-dark);
  border-radius: 6px;
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* Inline keyboard buttons */
.message-buttons {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.button-row {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.inline-button {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 8px 14px;
  background: var(--bg-dark);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  color: var(--accent-primary);
  font-size: 1rem;
  font-family: var(--font-pixel);
  text-decoration: none;
  transition: all 0.2s;
  white-space: nowrap;
}

.inline-button:hover {
  background: var(--bg-hover);
  border-color: var(--accent-primary);
  box-shadow: 0 0 10px var(--glow-color);
  transform: translateY(-1px);
}

.inline-button:active {
  transform: translateY(0);
}

.message-media-icon {
  margin-right: 6px;
}

/* Modals */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.modal-content {
  background: var(--bg-panel);
  border: 1px solid var(--border-glow);
  border-radius: 12px;
  width: 90%;
  max-width: 500px;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 0 50px rgba(0, 245, 255, 0.2);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px;
  border-bottom: 1px solid var(--border-color);
}

.modal-header h3 {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 2px;
  color: var(--text-primary);
}

.btn-close {
  width: 30px;
  height: 30px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  cursor: pointer;
  transition: color 0.2s;
}

.btn-close:hover {
  color: var(--accent-red);
}

.modal-body {
  flex: 1;
  padding: 20px;
  overflow-y: auto;
}

.modal-footer {
  padding: 15px 20px;
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.btn {
  padding: 10px 20px;
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 1px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-primary {
  background: var(--accent-cyan);
  border: none;
  color: var(--bg-dark);
}

.btn-primary:hover {
  box-shadow: 0 0 20px rgba(0, 245, 255, 0.4);
}

.btn-secondary {
  background: transparent;
  border: 1px solid var(--text-muted);
  color: var(--text-secondary);
}

.btn-secondary:hover {
  border-color: var(--text-primary);
  color: var(--text-primary);
}

/* Channel Select List */
.channel-select-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.channel-select-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: var(--bg-card);
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s;
}

.channel-select-item:hover {
  background: var(--bg-hover);
}

.channel-select-item input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--accent-cyan);
}

.channel-select-info {
  flex: 1;
}

.channel-select-name {
  font-size: 0.9rem;
  color: var(--text-primary);
}

.channel-select-tier {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
}

/* Settings */
.setting-group {
  margin-bottom: 20px;
}

.setting-group label {
  display: block;
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.setting-group select {
  width: 100%;
  padding: 10px;
  background: var(--bg-dark);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 0.9rem;
}

.setting-group input[type="checkbox"] {
  margin-right: 10px;
  accent-color: var(--accent-primary);
}

.sound-selector {
  display: flex;
  gap: 10px;
  align-items: center;
}

.sound-selector select {
  flex: 1;
}

.sound-selector .btn-tool {
  padding: 8px 12px;
  white-space: nowrap;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

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

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

::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

/* Responsive */
@media (max-width: 768px) {
  .sidebar {
    width: 100%;
    transform: translateX(-100%);
  }
  
  .sidebar.open {
    transform: translateX(0);
  }
  
  .main-content {
    left: 0 !important;
  }
  
  .channel-panels.layout-two,
  .channel-panels.layout-three {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 1200px) {
  .channel-panels.layout-three {
    grid-template-columns: repeat(2, 1fr);
  }
}
