/* Metal Gear Solid (iDroid HUD) Theme - CSS overrides
   Scoped under body[data-theme="mgs"] */

body[data-theme="mgs"] {
  font-family: "Rajdhani", "Noto Sans", sans-serif;
  --mgs-cyan: #74d7e8;
  --mgs-cyan-soft: #a3e8f3;
  --mgs-panel: rgba(7, 29, 42, 0.78);
  --mgs-grid: rgba(116, 215, 232, 0.12);
  --mgs-warning: #f0d76a;
}

body[data-theme="mgs"] h1,
body[data-theme="mgs"] h2,
body[data-theme="mgs"] h3,
body[data-theme="mgs"] .sidebar-header h3,
body[data-theme="mgs"] .chat-welcome h3,
body[data-theme="mgs"] .auth-logo h1,
body[data-theme="mgs"] .auth-panel h2,
body[data-theme="mgs"] .channel-category,
body[data-theme="mgs"] .members-header {
  font-family: "Orbitron", "Rajdhani", sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.07em;
}

body[data-theme="mgs"] .app-layout {
  background:
    radial-gradient(900px 420px at 75% 5%, rgba(116, 215, 232, 0.2), transparent 65%),
    linear-gradient(180deg, #04111a 0%, #082132 50%, #051520 100%);
}

body[data-theme="mgs"] .server-rail,
body[data-theme="mgs"] .channel-sidebar,
body[data-theme="mgs"] .members-sidebar,
body[data-theme="mgs"] .main-content {
  background-image:
    linear-gradient(transparent 95%, rgba(116, 215, 232, 0.05) 96%),
    linear-gradient(90deg, transparent 95%, rgba(116, 215, 232, 0.05) 96%);
  background-size: 14px 14px;
}

body[data-theme="mgs"] .server-rail {
  border-right: 1px solid rgba(116, 215, 232, 0.32);
}

body[data-theme="mgs"] .channel-sidebar {
  border-right: 1px solid rgba(116, 215, 232, 0.28);
}

body[data-theme="mgs"] .members-sidebar {
  border-left: 1px solid rgba(116, 215, 232, 0.28);
}

body[data-theme="mgs"] .chat-header,
body[data-theme="mgs"] .sidebar-header,
body[data-theme="mgs"] .members-header {
  position: relative;
  background: linear-gradient(180deg, rgba(24, 64, 82, 0.85), rgba(10, 30, 42, 0.9));
  border-bottom: 1px solid rgba(116, 215, 232, 0.35);
  box-shadow:
    inset 0 1px 0 rgba(186, 241, 249, 0.14),
    0 1px 0 rgba(0, 0, 0, 0.6);
}

body[data-theme="mgs"] .chat-header::after,
body[data-theme="mgs"] .sidebar-header::after,
body[data-theme="mgs"] .members-header::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--mgs-cyan), transparent);
}

body[data-theme="mgs"] .channel-category {
  color: var(--mgs-warning);
  border-bottom: 1px solid rgba(240, 215, 106, 0.36);
  margin-bottom: 6px;
  padding-bottom: 4px;
}

body[data-theme="mgs"] .channel-item.active {
  border-left: 3px solid var(--mgs-cyan);
  background: rgba(116, 215, 232, 0.14);
  box-shadow: inset 0 0 0 1px rgba(116, 215, 232, 0.18);
}

body[data-theme="mgs"] .channel-item:hover {
  background: rgba(116, 215, 232, 0.1);
}

body[data-theme="mgs"] .chat-messages,
body[data-theme="mgs"] .members-list,
body[data-theme="mgs"] .channel-list {
  background: var(--mgs-panel);
}

body[data-theme="mgs"] .chat-input-form {
  border: 1px solid rgba(116, 215, 232, 0.45);
  background: rgba(4, 21, 32, 0.84);
  box-shadow:
    inset 0 1px 4px rgba(0, 0, 0, 0.55),
    0 0 8px rgba(116, 215, 232, 0.1);
}

body[data-theme="mgs"] .chat-input-form:focus-within {
  border-color: var(--mgs-cyan-soft);
  box-shadow:
    inset 0 1px 4px rgba(0, 0, 0, 0.55),
    0 0 12px rgba(116, 215, 232, 0.28);
}

body[data-theme="mgs"] .btn-primary {
  background: linear-gradient(180deg, #9feaf4 0%, #74d7e8 52%, #4ca8be 100%);
  border: 1px solid #aceef7;
  color: #032230;
  font-family: "Orbitron", "Rajdhani", sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

body[data-theme="mgs"] .btn-primary:hover:not(:disabled) {
  background: linear-gradient(180deg, #b8f0f8 0%, #8de1ee 52%, #5dbfd1 100%);
  box-shadow: 0 0 12px rgba(116, 215, 232, 0.36);
}

body[data-theme="mgs"] .btn-secondary {
  background: linear-gradient(180deg, #1d4558 0%, #123444 100%);
  border: 1px solid #4d8aa2;
}

body[data-theme="mgs"] .msg-avatar,
body[data-theme="mgs"] .member-avatar,
body[data-theme="mgs"] .user-avatar,
body[data-theme="mgs"] .voice-user-avatar,
body[data-theme="mgs"] .server-card-icon {
  background: linear-gradient(180deg, #24556d, #16384a);
  border: 1px solid #66b5cb;
  color: #e6f8fd;
}

body[data-theme="mgs"] .voice-bar,
body[data-theme="mgs"] .user-panel {
  background: linear-gradient(180deg, rgba(8, 24, 34, 0.95), rgba(4, 17, 26, 0.95));
  border-top: 1px solid rgba(116, 215, 232, 0.3);
}

body[data-theme="mgs"] .voice-dot {
  background: var(--mgs-warning);
  box-shadow: 0 0 8px rgba(240, 215, 106, 0.65);
}

body[data-theme="mgs"] .theme-dropdown,
body[data-theme="mgs"] .context-menu,
body[data-theme="mgs"] .voice-settings-card,
body[data-theme="mgs"] .media-tile {
  border: 1px solid rgba(116, 215, 232, 0.35);
  box-shadow:
    0 0 14px rgba(116, 215, 232, 0.14),
    0 8px 24px rgba(0, 0, 0, 0.5);
}

body[data-theme="mgs"] .settings-row select {
  border-color: rgba(116, 215, 232, 0.45);
}

/* iDroid-like scanline film */
body[data-theme="mgs"]::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9998;
  background: repeating-linear-gradient(
    0deg,
    rgba(0, 0, 0, 0.0) 0px,
    rgba(0, 0, 0, 0.0) 2px,
    rgba(0, 0, 0, 0.035) 3px,
    rgba(0, 0, 0, 0.035) 4px
  );
}
