/* Link Minigames Theme - Unified Dark & Modern Aesthetic */
:root {
  --bg-primary: #0a0d14;
  --bg-secondary: #131825;
  --bg-card: rgba(26, 33, 51, 0.75);
  --bg-card-hover: rgba(34, 43, 66, 0.85);

  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;

  --accent-primary: #6366f1; /* Indigo */
  --accent-secondary: #8b5cf6; /* Purple */
  --accent-gradient: linear-gradient(135deg, #6366f1 0%, #a855f7 50%, #ec4899 100%);
  --accent-hover: linear-gradient(135deg, #4f46e5 0%, #9333ea 50%, #db2777 100%);

  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --info: #06b6d4;

  --border-color: rgba(255, 255, 255, 0.12);
  --border-highlight: rgba(99, 102, 241, 0.4);

  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.4);
  --shadow-glow: 0 0 25px rgba(99, 102, 241, 0.3);

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;

  --font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-family);
  min-height: 100vh;
  line-height: 1.5;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  position: relative;
}

a {
  color: inherit;
  text-decoration: none;
}

/* Animations: Aurora, Pulse, Heartbeat, Shimmer */
@keyframes aurora-bg {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

@keyframes heartbeat {
  0% { transform: scale(1); }
  14% { transform: scale(1.1); }
  28% { transform: scale(1); }
  42% { transform: scale(1.1); }
  70% { transform: scale(1); }
}

@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 15px rgba(99, 102, 241, 0.2); }
  50% { box-shadow: 0 0 30px rgba(168, 85, 247, 0.6); }
}

@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-6px); }
}

.aurora-bg {
  background: linear-gradient(125deg, #0a0d14 0%, #1e1b4b 25%, #0f172a 50%, #311042 75%, #0a0d14 100%);
  background-size: 300% 300%;
  animation: aurora-bg 15s ease infinite;
}

.anim-heartbeat {
  animation: heartbeat 2s infinite;
}

.anim-pulse {
  animation: pulse-glow 2.5s infinite;
}

/* Glassmorphism Classes */
.glass-panel {
  background: rgba(26, 33, 51, 0.65);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-lg);
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}

.glass-card {
  background: rgba(26, 33, 51, 0.6);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md);
  transition: var(--transition);
}

.glass-card:hover {
  background: rgba(34, 43, 66, 0.75);
  border-color: rgba(99, 102, 241, 0.5);
  box-shadow: 0 0 25px rgba(99, 102, 241, 0.3);
}

/* Header & Navigation */
.link-header {
  background: rgba(13, 17, 28, 0.8);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 0.875rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.link-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 800;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.link-logo-icon {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  background: var(--accent-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: bold;
  box-shadow: var(--shadow-glow);
}

.btn-back {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(8px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  color: var(--text-primary);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.btn-back:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-highlight);
  transform: translateX(-2px);
}

.btn-guide {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.9rem;
  background: linear-gradient(135deg, rgba(99,102,241,0.2) 0%, rgba(168,85,247,0.2) 100%);
  border: 1px solid rgba(168,85,247,0.4);
  border-radius: var(--radius-full);
  color: #e0e7ff;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.btn-guide:hover {
  background: linear-gradient(135deg, rgba(99,102,241,0.4) 0%, rgba(168,85,247,0.4) 100%);
  border-color: rgba(168,85,247,0.8);
  box-shadow: 0 0 15px rgba(168,85,247,0.4);
}

/* Container */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
  width: 100%;
  flex: 1;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  border: none;
  transition: var(--transition);
  min-height: 44px;
}

.btn-primary {
  background: var(--accent-gradient);
  color: #fff;
  box-shadow: var(--shadow-glow);
}

.btn-primary:hover {
  opacity: 0.92;
  transform: translateY(-2px);
  box-shadow: 0 0 30px rgba(99, 102, 241, 0.5);
}

.btn-secondary {
  background: rgba(26, 33, 51, 0.7);
  backdrop-filter: blur(8px);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}

.btn-secondary:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-highlight);
}

.btn-fav {
  background: transparent;
  border: none;
  font-size: 1.25rem;
  cursor: pointer;
  transition: var(--transition);
}

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

/* Metrics Group Pill Container */
.metrics-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
  align-items: center;
  background: rgba(13, 17, 28, 0.6);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  margin-bottom: 1.25rem;
}

.metric-pill {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.85rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-full);
  font-size: 0.85rem;
}

.metric-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 700;
  letter-spacing: 0.05em;
}

.metric-value {
  font-size: 1.1rem;
  font-weight: 800;
  color: #f1f5f9;
}

/* Stats Counter Pill */
.stats-bar-header {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin-top: 1rem;
  flex-wrap: wrap;
}

.stat-pill {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(8px);
  border: 1px solid var(--border-color);
  padding: 0.4rem 1rem;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.stat-pill strong {
  color: var(--text-primary);
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.625rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.badge-purple {
  background: rgba(139, 92, 246, 0.15);
  color: #c084fc;
  border: 1px solid rgba(139, 92, 246, 0.3);
}

.badge-green {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.badge-amber {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.badge-blue {
  background: rgba(6, 182, 212, 0.15);
  color: #22d3ee;
  border: 1px solid rgba(6, 182, 212, 0.3);
}

/* Modal Explicativo (Hoja Guía / Historia del Juego) */
.guide-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(5, 7, 14, 0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.guide-modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.guide-modal-content {
  background: rgba(19, 24, 38, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-lg);
  max-width: 560px;
  width: 100%;
  max-height: 88vh;
  overflow-y: auto;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6), 0 0 30px rgba(99, 102, 241, 0.2);
  padding: 1.75rem;
  position: relative;
  transform: translateY(20px) scale(0.95);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.guide-modal-overlay.active .guide-modal-content {
  transform: translateY(0) scale(1);
}

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

.guide-modal-title {
  font-size: 1.35rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--text-primary);
}

.guide-modal-close {
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: #fff;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 1.1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.guide-modal-close:hover {
  background: var(--danger);
  transform: rotate(90deg);
}

.guide-section {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1rem;
  margin-bottom: 1rem;
}

.guide-section-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: #c084fc;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.guide-section p {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.guide-controls-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.guide-control-item {
  background: rgba(0, 0, 0, 0.3);
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255,255,255,0.05);
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.guide-control-badge {
  background: var(--accent-primary);
  color: white;
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  font-weight: bold;
  font-size: 0.7rem;
}

/* Touch Control Helpers */
.touch-hint-banner {
  background: linear-gradient(90deg, rgba(99, 102, 241, 0.15), rgba(168, 85, 247, 0.15));
  border: 1px dashed rgba(168, 85, 247, 0.4);
  border-radius: var(--radius-md);
  padding: 0.5rem 1rem;
  text-align: center;
  font-size: 0.8rem;
  color: #d8b4fe;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

/* Footer */
.link-footer {
  border-top: 1px solid var(--border-color);
  padding: 1.5rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.875rem;
  background: rgba(13, 17, 28, 0.9);
  margin-top: auto;
}

.link-footer a {
  color: var(--accent-primary);
}

.link-footer a:hover {
  text-decoration: underline;
}

/* STRICT CONTAINER & CARD OVERFLOW FIXES */
*, *::before, *::after {
  box-sizing: border-box;
}

.games-grid, .channels-grid, .settings-grid, .profile-grid, .chat-grid {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.game-card, .glass-card, .glass-panel, .channel-card, .setting-card, .profile-card, .modal-card {
  max-width: 100% !important;
  box-sizing: border-box !important;
  min-width: 0 !important;
  overflow: hidden !important;
  word-wrap: break-word !important;
  overflow-wrap: break-word !important;
}

.game-card *, .channel-card *, .setting-card *, .profile-card * {
  max-width: 100%;
  min-width: 0;
}

.game-title, .channel-title, .setting-title, .profile-username, .chat-username {
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
  max-width: 100% !important;
}

.game-desc, .setting-desc, .channel-desc, .chat-text-content {
  overflow: hidden;
  word-break: break-word;
  overflow-wrap: anywhere;
}

/* MODAL UI COMPONENTS & NAVIGATION */
.nav-btn-group {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  flex-wrap: wrap;
}

.nav-pill-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.85rem;
  background: rgba(255, 255, 255, 0.07);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  color: var(--text-primary);
  font-size: 0.825rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}

.nav-pill-btn:hover, .nav-pill-btn.active {
  background: var(--accent-gradient);
  border-color: rgba(168, 85, 247, 0.6);
  box-shadow: 0 0 15px rgba(99, 102, 241, 0.4);
  transform: translateY(-1px);
}

/* GENERIC MODAL OVERLAY & CARD CONTAINER */
.platform-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(5, 7, 14, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.platform-modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.platform-modal-card {
  background: rgba(19, 24, 38, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-lg);
  max-width: 680px;
  width: 100%;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7), 0 0 35px rgba(99, 102, 241, 0.25);
  position: relative;
  overflow: hidden;
  transform: translateY(15px) scale(0.97);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.platform-modal-overlay.active .platform-modal-card {
  transform: translateY(0) scale(1);
}

.platform-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border-color);
  background: rgba(13, 17, 28, 0.7);
}

.platform-modal-title {
  font-size: 1.25rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.platform-modal-body {
  padding: 1.5rem;
  overflow-y: auto;
  flex: 1;
  width: 100%;
}

/* CHAT SPECIFIC DESIGN & BACKGROUND PATTERN */
.chat-window-container {
  background: radial-gradient(circle at top right, rgba(99, 102, 241, 0.15), transparent 60%),
              radial-gradient(circle at bottom left, rgba(236, 72, 153, 0.12), transparent 60%),
              #0f1422;
  background-image: radial-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 0);
  background-size: 20px 20px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  height: 480px;
  max-height: 60vh;
  width: 100%;
  overflow: hidden;
}

.chat-messages-pane {
  flex: 1;
  padding: 1rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  width: 100%;
}

.chat-msg-row {
  display: flex;
  flex-direction: column;
  max-width: 85%;
  align-self: flex-start;
  animation: fadeInMsg 0.2s cubic-bezier(0, 0, 0.2, 1);
}

.chat-msg-row.own {
  align-self: flex-end;
}

@keyframes fadeInMsg {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.chat-msg-header {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 0.2rem;
  display: flex;
  gap: 0.4rem;
  align-items: center;
}

.chat-msg-bubble {
  background: rgba(30, 41, 59, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(8px);
  padding: 0.65rem 0.95rem;
  border-radius: 14px 14px 14px 2px;
  color: var(--text-primary);
  font-size: 0.9rem;
  line-height: 1.4;
  word-break: break-word;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.chat-msg-row.own .chat-msg-bubble {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.85), rgba(168, 85, 247, 0.85));
  border-radius: 14px 14px 2px 14px;
}

/* INTERACTIVE SQUARE TRIGGER CARDS IN CHAT */
.chat-trigger-card {
  width: 140px;
  height: 140px;
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.9), rgba(15, 23, 42, 0.95));
  border: 2px solid var(--accent-primary);
  border-radius: 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  box-shadow: 0 0 20px rgba(99, 102, 241, 0.35);
  margin-top: 0.35rem;
  user-select: none;
  position: relative;
  overflow: hidden;
}

.chat-trigger-card::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: conic-gradient(transparent, rgba(168, 85, 247, 0.3), transparent 30%);
  animation: rotateGlow 4s linear infinite;
}

@keyframes rotateGlow {
  100% { transform: rotate(360deg); }
}

.chat-trigger-card-inner {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.chat-trigger-icon {
  font-size: 2.2rem;
  line-height: 1;
  margin-bottom: 0.25rem;
  filter: drop-shadow(0 0 8px rgba(168, 85, 247, 0.6));
}

.chat-trigger-title {
  font-weight: 800;
  font-size: 0.95rem;
  color: #ffffff;
  letter-spacing: 0.02em;
  text-shadow: 0 1px 3px rgba(0,0,0,0.8);
}

.chat-trigger-subtitle {
  font-size: 0.7rem;
  color: #a855f7;
  font-weight: 700;
  text-transform: uppercase;
}

.chat-trigger-card:hover {
  transform: scale(1.05) rotate(1deg);
  border-color: #ec4899;
  box-shadow: 0 0 30px rgba(236, 72, 153, 0.5);
}

.chat-trigger-card:active {
  transform: scale(0.96);
}

/* CHAT BUTTON SHAPES & INPUT AREA */
.chat-input-bar {
  display: flex;
  gap: 0.5rem;
  padding: 0.75rem;
  background: rgba(13, 17, 28, 0.9);
  border-top: 1px solid var(--border-color);
  align-items: center;
}

.chat-input-field {
  flex: 1;
  padding: 0.65rem 1rem;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  color: #fff;
  font-size: 0.9rem;
  outline: none;
  transition: var(--transition);
}

.chat-input-field:focus {
  border-color: var(--accent-primary);
  box-shadow: 0 0 15px rgba(99, 102, 241, 0.3);
}

/* CUSTOM SHAPED BUTTONS */
.btn-shape-pill {
  border-radius: 9999px !important;
  padding: 0.6rem 1.25rem;
  background: var(--accent-gradient);
  color: #fff;
  font-weight: 700;
  border: none;
  cursor: pointer;
  transition: var(--transition);
}

.btn-shape-bevel {
  border-radius: 14px 4px 14px 4px !important;
  padding: 0.6rem 1.1rem;
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.8), rgba(236, 72, 153, 0.8));
  color: #fff;
  font-weight: 700;
  border: 1px solid rgba(255, 255, 255, 0.2);
  cursor: pointer;
  transition: var(--transition);
}

.btn-shape-bevel:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 0 20px rgba(236, 72, 153, 0.4);
}

.btn-shape-glass {
  background: rgba(255, 255, 255, 0.08) !important;
  backdrop-filter: blur(12px) !important;
  border: 1px solid rgba(255, 255, 255, 0.18) !important;
  border-radius: 12px !important;
  color: #fff !important;
  font-weight: 600 !important;
  padding: 0.5rem 0.9rem !important;
  cursor: pointer;
  transition: var(--transition);
}

.btn-shape-glass:hover {
  background: rgba(99, 102, 241, 0.25) !important;
  border-color: rgba(99, 102, 241, 0.6) !important;
}

/* SETTINGS CARD LAYOUT BOUNDS */
.settings-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  width: 100%;
}

.setting-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  gap: 1rem;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.setting-info {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 0;
  flex: 1;
}

/* TOGGLE SWITCH */
.toggle-switch {
  position: relative;
  display: inline-block;
  width: 48px;
  height: 26px;
  flex-shrink: 0;
}

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

.toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: rgba(255, 255, 255, 0.15);
  transition: .3s;
  border-radius: 34px;
  border: 1px solid var(--border-color);
}

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

input:checked + .toggle-slider {
  background: var(--accent-gradient);
}

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

/* LIVE CHANNELS GRID & CARDS */
.channels-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.25rem;
  width: 100%;
}

.channel-card {
  background: rgba(26, 33, 51, 0.7);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  transition: var(--transition);
  position: relative;
  width: 100%;
}

.channel-card:hover {
  transform: translateY(-3px);
  border-color: rgba(168, 85, 247, 0.5);
  box-shadow: 0 0 20px rgba(168, 85, 247, 0.25);
}

.channel-badge-live {
  background: #ef4444;
  color: white;
  font-size: 0.7rem;
  font-weight: 800;
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

/* Responsiveness helpers */
@media (max-width: 640px) {
  .container {
    padding: 0.875rem;
  }
  .link-header {
    padding: 0.75rem 0.875rem;
    flex-wrap: wrap;
    gap: 0.5rem;
  }
  .metrics-group {
    padding: 0.5rem;
    gap: 0.4rem;
  }
  .metric-pill {
    padding: 0.3rem 0.6rem;
    font-size: 0.8rem;
  }
  .guide-modal-content, .platform-modal-card {
    padding: 1rem;
    max-height: 92vh;
  }
  .chat-msg-row {
    max-width: 95%;
  }
}
