/*
 * ============================================================
 * CYBER NEXUS — Futuristic Dark Theme for GML Forum
 * ============================================================
 *
 * Overrides CSS custom properties and structural classes when
 * the html.cyber-theme class is present.
 *
 * DESIGN TOKENS (dark palette)
 * --color-bg-body:     #06070f
 * --color-bg-surface:  #0d1117
 * --color-bg-elevated: #161b27
 * --color-primary:     #00d4ff   (neon cyan)
 * --color-accent:      #00ffcc   (teal)
 * --color-secondary:   #8b5cf6   (purple)
 * --color-text:        #e2e8f0
 * --color-text-secondary: #94a3b8
 * --color-text-muted:  #64748b
 * --color-border:      rgba(0,212,255,0.2)
 * ============================================================
 */

/* ============================================================
   CSS CUSTOM PROPERTY OVERRIDES
   ============================================================ */
html.cyber-theme {
  --color-primary: #00d4ff;
  --color-primary-hover: #00ffcc;
  --color-primary-subtle: rgba(0, 212, 255, 0.1);
  --color-secondary: #8b5cf6;
  --color-accent: #00ffcc;
  --color-accent-hover: #00e6b8;

  --color-bg-body: #06070f;
  --color-bg-surface: #0d1117;
  --color-bg-elevated: #161b27;
  --color-bg-hover: #1c2333;
  --color-bg-header: #0d1117;
  --color-bg-nav: #0d1117;

  --color-border: rgba(0, 212, 255, 0.15);
  --color-border-light: rgba(0, 212, 255, 0.08);
  --color-border-focus: #00d4ff;

  --color-text: #e2e8f0;
  --color-text-secondary: #94a3b8;
  --color-text-muted: #64748b;
  --color-text-inverse: #e2e8f0;
  --color-text-link: #00d4ff;
  --color-text-link-hover: #00ffcc;

  --color-success: #10b981;
  --color-error: #f87171;
  --color-warning: #fbbf24;

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.5);
  --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.6);
}

/* ============================================================
   BODY & GLOBAL
   ============================================================ */
html.cyber-theme body {
  background-color: #06070f;
  color: #e2e8f0;
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
}

html.cyber-theme a:hover {
  color: #00ffcc;
}

html.cyber-theme img { border: none; }

/* ============================================================
   SITE HEADER
   ============================================================ */
html.cyber-theme .site-header {
  background: #0a0e18;
  border-bottom: 1px solid rgba(0, 212, 255, 0.15);
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.6), 0 1px 8px rgba(0, 212, 255, 0.06);
}

html.cyber-theme .site-header__brand h1 a {
  color: #00d4ff;
  text-shadow: 0 0 20px rgba(0, 212, 255, 0.4), 0 0 40px rgba(0, 212, 255, 0.15);
}
html.cyber-theme .site-header__brand h1 a:hover {
  color: #00ffcc;
}

/* ============================================================
   HAMBURGER MENU (dark theme)
   ============================================================ */
html.cyber-theme .hamburger {
  border-color: rgba(0, 212, 255, 0.3);
}
html.cyber-theme .hamburger:hover {
  background: rgba(0, 212, 255, 0.08);
  border-color: rgba(0, 212, 255, 0.5);
}
html.cyber-theme .hamburger__line {
  background: #00d4ff;
}

/* ============================================================
   SITE NAVIGATION (dark theme)
   ============================================================ */

/* Mobile slide-out panel */
html.cyber-theme .site-nav {
  background: #0d1117;
  border-left: 1px solid rgba(0, 212, 255, 0.15);
}
html.cyber-theme .site-nav__list li a {
  color: #94a3b8;
  border-bottom-color: rgba(0, 212, 255, 0.06);
}
html.cyber-theme .site-nav__list li a:hover {
  background: rgba(0, 212, 255, 0.06);
  color: #00d4ff;
}
html.cyber-theme .site-nav__utils {
  border-top-color: rgba(0, 212, 255, 0.1);
}
html.cyber-theme .site-nav__backdrop {
  background: rgba(0, 0, 0, 0.7);
}

/* Desktop nav links (1024px+) */
@media (min-width: 1024px) {
  html.cyber-theme .site-nav__list li a {
    color: rgba(148, 163, 184, 0.8);
  }
  html.cyber-theme .site-nav__list li a:hover {
    background: rgba(0, 212, 255, 0.08);
    color: #00d4ff;
  }
}

/* Theme toggle button */
html.cyber-theme #themeToggleBtn {
  border-color: rgba(0, 212, 255, 0.4);
  color: #00d4ff;
  box-shadow: 0 0 6px rgba(0, 212, 255, 0.15);
}
html.cyber-theme #themeToggleBtn:hover {
  border-color: #00d4ff;
  box-shadow: 0 0 12px rgba(0, 212, 255, 0.3);
  background: rgba(0, 212, 255, 0.08);
}

/* Language links */
html.cyber-theme .site-nav__utils a[id^="lang"] {
  color: #64748b;
}
html.cyber-theme .site-nav__utils a[id^="lang"]:hover {
  color: #00d4ff;
}

/* ============================================================
   USER AREA — User card & Login card (dark theme)
   ============================================================ */

/* User card (in nav panel + header indicator) */
html.cyber-theme .site-nav__user-card {
  border-bottom-color: rgba(0, 212, 255, 0.1);
}
html.cyber-theme .indicator__avatar {
  border-color: rgba(0, 212, 255, 0.3);
}
html.cyber-theme .indicator__name {
  color: #00ffcc;
}
html.cyber-theme .indicator__name:hover {
  color: #00d4ff;
}
html.cyber-theme .user-card__name {
  color: #00ffcc;
}
html.cyber-theme .user-card__avatar {
  border-color: rgba(0, 212, 255, 0.3);
}
html.cyber-theme .user-card__links a {
  color: rgba(148, 163, 184, 0.5);
}
html.cyber-theme .user-card__links a:hover {
  color: #00d4ff;
}

/* Badges */
html.cyber-theme .badge {
  background: rgba(0, 212, 255, 0.08);
  border-color: rgba(0, 212, 255, 0.15);
  color: rgba(0, 212, 255, 0.7);
}
html.cyber-theme .badge:hover {
  background: rgba(0, 212, 255, 0.15);
  border-color: rgba(0, 212, 255, 0.4);
  color: #00d4ff;
}

/* Login card */
html.cyber-theme .site-nav__login {
  border-bottom-color: rgba(0, 212, 255, 0.1);
}
html.cyber-theme .login-card__register {
  background: rgba(0, 212, 255, 0.1) !important;
  color: #00d4ff !important;
  border-color: rgba(0, 212, 255, 0.3);
}
html.cyber-theme .login-card__register:hover {
  background: #00d4ff !important;
  color: #06070f !important;
}
html.cyber-theme .login-card__forgot {
  color: #475569 !important;
}
html.cyber-theme .login-card__forgot:hover {
  color: #64748b !important;
}

/* Login form inputs */
html.cyber-theme .login-card__form input[type="text"],
html.cyber-theme .login-card__form input[type="password"] {
  background: rgba(0, 212, 255, 0.06);
  border-color: rgba(0, 212, 255, 0.25);
  color: #e2e8f0;
}
html.cyber-theme .login-card__form input[type="text"]:focus,
html.cyber-theme .login-card__form input[type="password"]:focus {
  border-color: #00d4ff;
  box-shadow: 0 0 8px rgba(0, 212, 255, 0.25);
}
html.cyber-theme .login-card__form input[type="text"]::placeholder,
html.cyber-theme .login-card__form input[type="password"]::placeholder {
  color: #475569;
}
html.cyber-theme .login-card__form input[type="submit"] {
  background: #8b5cf6;
  border-color: #7c3aed;
}
html.cyber-theme .login-card__form input[type="submit"]:hover {
  background: #7c3aed;
}

/* Social login */
html.cyber-theme .login-card__social {
  border-top-color: rgba(0, 212, 255, 0.08);
}
html.cyber-theme .login-card__social a {
  border-color: rgba(139, 92, 246, 0.3);
  background: rgba(139, 92, 246, 0.05);
}
html.cyber-theme .login-card__social a:hover {
  border-color: rgba(139, 92, 246, 0.6);
  background: rgba(139, 92, 246, 0.12);
}

/* Desktop overrides (1024px+): login card in header */
@media (min-width: 1024px) {
  html.cyber-theme .login-card__register {
    background: rgba(0, 212, 255, 0.08) !important;
    border-color: rgba(0, 212, 255, 0.25);
    color: #00d4ff !important;
  }
  html.cyber-theme .login-card__register:hover {
    background: #00d4ff !important;
    color: #06070f !important;
  }
  html.cyber-theme .login-card__forgot {
    color: rgba(100, 116, 139, 0.6) !important;
  }

  html.cyber-theme .login-card__social {
    border-left-color: rgba(0, 212, 255, 0.1);
    border-top-color: transparent;
  }
}

/* ============================================================
   ADMIN BAR
   ============================================================ */
html.cyber-theme .admin-bar {
  background: #10081f;
  border-bottom-color: rgba(139, 92, 246, 0.2);
}
html.cyber-theme .admin-bar ul li a {
  color: #c4b5fd;
}
html.cyber-theme .admin-bar ul li a:hover {
  color: #8b5cf6;
  background: rgba(139, 92, 246, 0.08);
}

/* ============================================================
   GLOBAL INPUTS, BUTTONS & SELECTS
   ============================================================ */
html.cyber-theme input[type="text"],
html.cyber-theme input[type="password"],
html.cyber-theme input[type="submit"],
html.cyber-theme input[type="button"],
html.cyber-theme select,
html.cyber-theme textarea,
html.cyber-theme button {
  border-color: rgba(0, 212, 255, 0.2);
  background-color: #161b27;
  color: #e2e8f0;
}

html.cyber-theme input:focus,
html.cyber-theme select:focus,
html.cyber-theme textarea:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.15);
  border-color: rgba(0, 212, 255, 0.5);
}

html.cyber-theme a.button {
  background-color: #00d4ff;
  color: #06070f !important;
}
html.cyber-theme a.button:hover {
  background-color: #00ffcc;
}

/* Content area buttons */
html.cyber-theme .forumcontent input[type="button"],
html.cyber-theme .forumcontent input[type="submit"],
html.cyber-theme .forumcontent button {
  background: #00d4ff;
  color: #06070f;
  border-color: #00d4ff;
}
html.cyber-theme .forumcontent input[type="button"]:hover,
html.cyber-theme .forumcontent input[type="submit"]:hover,
html.cyber-theme .forumcontent button:hover {
  background: #00ffcc;
  border-color: #00ffcc;
}

/* Grey buttons */
html.cyber-theme .forumcontent input[type="button"].greybutton,
html.cyber-theme .forumcontent input[type="submit"].greybutton,
html.cyber-theme .forumcontent button.greybutton {
  background: #1c2333;
  border-color: rgba(0, 212, 255, 0.15);
  color: #94a3b8;
}
html.cyber-theme .forumcontent input[type="button"].greybutton:hover,
html.cyber-theme .forumcontent input[type="submit"].greybutton:hover,
html.cyber-theme .forumcontent button.greybutton:hover {
  background: #283548;
  color: #e2e8f0;
  border-color: rgba(0, 212, 255, 0.3);
}

/* ============================================================
   FORUM CONTENT AREA
   ============================================================ */
html.cyber-theme .forumcontent h1 { color: #00d4ff; }
html.cyber-theme .forumcontent h2 { color: #e2e8f0; }
html.cyber-theme .forumcontent h2 a { color: #00d4ff; }
html.cyber-theme .forumcontent h2 a:hover { color: #00ffcc; }
html.cyber-theme .forumcontent h3 { color: #e2e8f0; }
html.cyber-theme .forumcontent a { color: #00d4ff; }
html.cyber-theme .forumcontent a:hover { color: #00ffcc; }

/* Table headers */
html.cyber-theme .forumcontent th {
  color: #475569;
  border-bottom: 1px solid rgba(0, 212, 255, 0.08);
}
html.cyber-theme .forumcontent th a { color: #64748b; }

/* Table cells */
html.cyber-theme .forumcontent td {
  border-color: rgba(0, 212, 255, 0.08);
  background-color: #0d1117;
}

html.cyber-theme .forumcontent hr {
  background: rgba(0, 212, 255, 0.1);
}

/* Rounded border tables */
html.cyber-theme .roundedborder {
  border-color: rgba(0, 212, 255, 0.1);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
}

/* Breadcrumb */
html.cyber-theme .forumcontent div.location h2 a,
html.cyber-theme .forumcontent div.location h2 { color: #475569; }
html.cyber-theme .forumcontent div.location h1 a { color: #00d4ff; }

/* Big list row hover */
html.cyber-theme .forumcontent table.biglist tr:hover td {
  background-color: #141c2b;
}

/* Horizontal separated table */
html.cyber-theme table.horizseparated td {
  border-top-color: rgba(0, 212, 255, 0.06);
  background-color: transparent;
}

/* Post list */
html.cyber-theme .forumcontent table.postlist td {
  border-color: rgba(0, 212, 255, 0.08);
}

/* Accepted answer */
html.cyber-theme .forumcontent .acceptedAnswer td { background-color: #0d2318; }

/* Message actions */
html.cyber-theme .forumcontent .messageActions { color: #475569; }
html.cyber-theme .forumcontent .messageActions a { color: #64748b; }
html.cyber-theme .forumcontent .messageActions a:hover {
  color: #00d4ff;
  background: rgba(0, 212, 255, 0.06);
}

/* Gray utilities */
html.cyber-theme .forumcontent .gray { color: #475569; }
html.cyber-theme .forumcontent .gray a { color: #64748b; }
html.cyber-theme .forumcontent .gray a:hover { color: #00d4ff; }
html.cyber-theme .forumcontent .gray2 { color: #334155; }
html.cyber-theme .forumcontent .gray2 a { color: #475569; }
html.cyber-theme .forumcontent .gray2 a:hover { color: #00d4ff; }

/* Pager */
html.cyber-theme .forumcontent .pager { color: #334155; }
html.cyber-theme .forumcontent .pager a { color: #64748b; }
html.cyber-theme .forumcontent .pager a:hover {
  background: rgba(0, 212, 255, 0.08);
  color: #00d4ff;
}
html.cyber-theme .forumcontent .pager span {
  background: #00d4ff;
  color: #06070f;
}

/* ============================================================
   BLOCKQUOTE
   ============================================================ */
html.cyber-theme blockquote {
  color: #a78bfa;
  border-left-color: rgba(139, 92, 246, 0.4);
  background: rgba(139, 92, 246, 0.04);
}

/* ============================================================
   RICH TEXT EDITOR
   ============================================================ */

/* Legacy editbar (hidden when Quill active, kept for compat) */
html.cyber-theme div.richeditor div.editbar {
  background-image: none;
  background-color: #161b27;
  border-color: rgba(0, 212, 255, 0.15);
}
html.cyber-theme div.richeditor div.editbar button {
  color: #94a3b8;
  background-color: transparent;
  border: 1px solid transparent;
}
html.cyber-theme div.richeditor div.editbar button:hover {
  border-color: rgba(0, 212, 255, 0.3);
  background-color: #1c2333;
  color: #e2e8f0;
}
html.cyber-theme div.richeditor div.container {
  border-color: rgba(0, 212, 255, 0.15);
}
html.cyber-theme div.richeditor iframe { background-color: #0d1117; }
html.cyber-theme div.richeditor textarea {
  background-color: #0d1117;
  color: #e2e8f0;
  border-color: rgba(0, 212, 255, 0.15);
}

/* Quill editor — cyber theme overrides are in editor.css
   (html.cyber-theme .modern-editor selectors) */

/* ============================================================
   JGROWL NOTIFICATIONS
   ============================================================ */
html.cyber-theme div.jGrowl div.jGrowl-notification,
html.cyber-theme div.jGrowl div.jGrowl-closer {
  background-color: #161b27;
  color: #e2e8f0;
  border: 1px solid rgba(0, 212, 255, 0.2);
  box-shadow: 0 0 16px rgba(0, 212, 255, 0.1);
}

/* ============================================================
   OTP CONTAINER
   ============================================================ */
html.cyber-theme .otp-container {
  background: #0d1117;
  border: 1px solid rgba(0, 212, 255, 0.2);
  box-shadow: 0 0 30px rgba(0, 212, 255, 0.06);
}
html.cyber-theme .otp-input {
  background-color: #161b27;
  border-color: rgba(0, 212, 255, 0.3);
  color: #00d4ff;
}
html.cyber-theme .otp-input:focus {
  border-color: #00d4ff;
  box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.15);
}
html.cyber-theme .otp-masked-email { color: #64748b; }
html.cyber-theme .otp-timer { color: #00d4ff; }
html.cyber-theme .otp-resend-link { color: #8b5cf6; }
html.cyber-theme .otp-resend-link:hover { color: #a78bfa; }

/* ============================================================
   SCROLLABLE DATA TABLES (dark scrollbar)
   ============================================================ */
html.cyber-theme .forumcontent table.roundedborder:not(.noborder):not(.postlist),
html.cyber-theme .forumcontent table.horizseparated {
  scrollbar-color: rgba(0, 212, 255, 0.3) rgba(13, 17, 23, 0.5);
}
html.cyber-theme .forumcontent table.roundedborder:not(.noborder):not(.postlist)::-webkit-scrollbar,
html.cyber-theme .forumcontent table.horizseparated::-webkit-scrollbar {
  height: 6px;
}
html.cyber-theme .forumcontent table.roundedborder:not(.noborder):not(.postlist)::-webkit-scrollbar-track,
html.cyber-theme .forumcontent table.horizseparated::-webkit-scrollbar-track {
  background: rgba(13, 17, 23, 0.5);
  border-radius: 3px;
}
html.cyber-theme .forumcontent table.roundedborder:not(.noborder):not(.postlist)::-webkit-scrollbar-thumb,
html.cyber-theme .forumcontent table.horizseparated::-webkit-scrollbar-thumb {
  background: rgba(0, 212, 255, 0.3);
  border-radius: 3px;
}
html.cyber-theme .forumcontent table.roundedborder:not(.noborder):not(.postlist)::-webkit-scrollbar-thumb:hover,
html.cyber-theme .forumcontent table.horizseparated::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 212, 255, 0.5);
}

/* ============================================================
   FOOTER
   ============================================================ */
html.cyber-theme .site-footer {
  color: #334155;
  border-top-color: rgba(0, 212, 255, 0.08);
}
html.cyber-theme .site-footer a { color: #475569; }
html.cyber-theme .site-footer a:hover { color: #00d4ff; }

/* ============================================================
   GLASSMORPHISM — semi-transparent surfaces with backdrop blur
   ============================================================ */
@supports (backdrop-filter: blur(1px)) {
  html.cyber-theme .site-header {
    background-color: rgba(10, 14, 24, 0.92);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
  }

  html.cyber-theme .forumcontent td {
    background-color: rgba(13, 17, 23, 0.88);
    -webkit-backdrop-filter: blur(2px);
    backdrop-filter: blur(2px);
  }

  html.cyber-theme .site-nav {
    background-color: rgba(13, 17, 23, 0.95);
    -webkit-backdrop-filter: blur(16px);
    backdrop-filter: blur(16px);
  }
}
