/* ============================================================
   style.css — Deep Space Cyber UI for AI Detection App
   ============================================================ */

/* ---------- Design tokens ---------- */
:root {
  --bg-body:        #05050f; /* Deepest midnight navy */
  --bg-card:        rgba(15, 17, 30, 0.85); /* Dark blue-grey glass */
  --bg-card-alt:    rgba(20, 22, 40, 0.75);
  --bg-input:       rgba(255, 255, 255, 0.05);
  --surface:        rgba(255, 255, 255, 0.03);
  
  --border-glow:    #1de9b6; /* Mint/Cyan */
  --border-glow-2:  #e040fb; /* Neon Pink/Purple */
  --border-subtle:  rgba(29, 233, 182, 0.2);
  
  --accent:         #1de9b6; /* Cyan */
  --accent-hover:   #00bfa5; /* Darker Cyan */
  --accent-light:   #64ffda; /* Light Cyan */
  
  --text-primary:   #f8f9fa; /* Crisp white */
  --text-secondary: #94a3b8; /* Slate gray */
  --text-muted:     #64748b;
  
  --success:        #1de9b6;
  --success-bg:     rgba(29, 233, 182, 0.12);
  --danger:         #ff1744;
  --danger-bg:      rgba(255, 23, 68, 0.12);
  --warning:        #e040fb;
  --warning-bg:     rgba(224, 64, 251, 0.12);
  --info:           #00e5ff;
  --info-bg:        rgba(0, 229, 255, 0.12);
  
  --font-body:      'Inter', system-ui, sans-serif;
  --font-heading:   'Outfit', 'Inter', system-ui, sans-serif;
  
  --radius:         12px;
  --radius-sm:      8px;
  --radius-lg:      16px;
  
  --shadow-glow:    0 0 30px rgba(29, 233, 182, 0.25),
                    0 0 80px rgba(224, 64, 251, 0.15);
  --shadow-card:    0 8px 32px rgba(0, 0, 0, 0.5);
  
  --transition:     0.25s cubic-bezier(.4,0,.2,1);
  --sidebar-width:  250px;
  --sidebar-collapsed: 68px;
  --glass-blur:     blur(24px);
  --glass-border:   1px solid rgba(255, 255, 255, 0.05);
}

/* ---------- Reset & Base ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; }

body {
  font-family: var(--font-body);
  background: #050816;
  color: var(--text-primary);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

#particles-js {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}

a { color: var(--accent); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--accent-light); }
img { max-width: 100%; display: block; }

/* ---------- Scrollbar ---------- */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--text-muted); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent); }

/* ============================================================
   AUTH PAGES  (Login / Register)
   ============================================================ */
.auth-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  padding: 24px;
}

.auth-card {
  display: flex;
  width: 100%;
  max-width: 900px;
  min-height: 560px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: var(--shadow-card), 0 0 40px rgba(29, 233, 182, 0.1);
  background: var(--bg-card);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  animation: fadeUp 0.6s ease both;
}

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

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* ---- Left panel (form) ---- */
.auth-left {
  flex: 1 1 50%;
  padding: 56px 48px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: rgba(8, 9, 20, 0.95); /* Extremely dark blue */
}

.auth-title {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 2rem;
  margin-bottom: 32px;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.auth-form { display: flex; flex-direction: column; gap: 20px; }

.field label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.input-row {
  position: relative;
  display: flex;
  align-items: center;
}

.input-row input,
.form-input {
  width: 100%;
  padding: 12px 42px 12px 0;
  border: none;
  border-bottom: 1px solid var(--text-muted);
  background: transparent;
  color: var(--text-primary);
  font-size: 1rem;
  font-family: var(--font-body);
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.input-row input::placeholder,
.form-input::placeholder { color: var(--text-muted); }

.input-row input:focus,
.form-input:focus {
  border-bottom-color: var(--accent);
  box-shadow: 0 1px 0 0 var(--accent);
}

.field-icon {
  position: absolute;
  right: 4px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  background: none;
  border: none;
  cursor: default;
  padding: 4px;
}

.toggle-pwd { cursor: pointer; transition: color var(--transition); }
.toggle-pwd:hover { color: var(--accent); }

.options {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-top: 4px;
}

.remember {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.remember input[type="checkbox"] {
  accent-color: var(--accent);
  width: 16px;
  height: 16px;
  cursor: pointer;
}

/* Primary button - Cyber style */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 32px;
  border: none;
  border-radius: 999px;
  background: var(--accent);
  color: #05050f; /* Dark text for contrast */
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition);
  box-shadow: 0 4px 24px rgba(29, 233, 182, 0.4);
  margin-top: 8px;
}

.btn-primary:hover {
  background: var(--accent-light);
  box-shadow: 0 6px 32px rgba(29, 233, 182, 0.6);
  transform: translateY(-2px);
}

.btn-primary:active { transform: translateY(0); box-shadow: 0 2px 12px rgba(29, 233, 182, 0.4); }
.btn-primary:disabled { opacity: 0.6; cursor: not-allowed; transform: none; box-shadow: none; }

/* Secondary / outline button */
.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 28px;
  border: 1px solid var(--border-subtle);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
}

.btn-secondary:hover {
  background: rgba(29, 233, 182, 0.1);
  border-color: var(--accent);
  color: var(--accent);
}

/* Danger button */
.btn-danger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 28px;
  border: 1px solid rgba(255, 23, 68, 0.3);
  border-radius: 999px;
  background: rgba(255, 23, 68, 0.05);
  color: var(--danger);
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
}

.btn-danger:hover {
  background: var(--danger-bg);
  border-color: var(--danger);
}

.switch-text {
  font-size: 0.9rem;
  color: var(--text-secondary);
  text-align: center;
  margin-top: 8px;
}

/* Social Login Styles */
.social-login-divider {
  display: flex;
  align-items: center;
  text-align: center;
  margin: 20px 0;
}

.social-login-divider::before,
.social-login-divider::after {
  content: "";
  flex: 1;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.social-login-divider span {
  padding: 0 16px;
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 500;
}

.social-login-group {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-bottom: 8px;
}

.btn-social {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
  cursor: pointer;
  transition: all var(--transition);
}

.btn-social:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--text-secondary);
  transform: translateY(-2px);
}

/* ---- Right panel (welcome) ---- */
.auth-right {
  flex: 1 1 50%;
  position: relative;
  background: #080914; /* Solid dark base */
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

/* Cyber glow effects for the right panel */
.auth-right::before {
  content: '';
  position: absolute;
  top: -20%;
  right: -20%;
  width: 70%;
  height: 70%;
  background: radial-gradient(circle, rgba(224, 64, 251, 0.15) 0%, transparent 60%);
  z-index: 1;
}

.auth-right::after {
  content: '';
  position: absolute;
  bottom: -20%;
  left: -20%;
  width: 70%;
  height: 70%;
  background: radial-gradient(circle, rgba(29, 233, 182, 0.15) 0%, transparent 60%);
  z-index: 1;
}

/* Subtle grid overlay */
.diagonal-overlay {
  position: absolute;
  inset: 0;
  background-image: 
    linear-gradient(rgba(255,255,255,0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.02) 1px, transparent 1px);
  background-size: 30px 30px;
  z-index: 2;
  opacity: 0.5;
}

.right-content {
  position: relative;
  z-index: 3;
  text-align: center;
  padding: 40px;
}

.welcome-heading {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 3.5rem;
  line-height: 1.1;
  color: #fff;
  letter-spacing: -0.03em;
  margin-bottom: 24px;
}

.welcome-heading span {
  color: var(--accent);
}

.welcome-sub {
  color: var(--text-secondary);
  font-size: 1.05rem;
  line-height: 1.6;
  max-width: 300px;
  margin: 0 auto;
}

@media (max-width: 800px) {
  .auth-card { flex-direction: column; max-width: 480px; }
  .auth-right { min-height: 240px; }
  .welcome-heading { font-size: 2.5rem; }
  .auth-left { padding: 40px 32px; }
}

/* ============================================================
   APP LAYOUT  (Top Navbar + Main)
   ============================================================ */
.app-layout {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ---- Top Navbar ---- */
.sidebar {
  width: 100%;
  height: 62px;
  background: rgba(8, 9, 20, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 200;
  display: flex;
  align-items: center;
}

.sidebar aside {
  width: 100%;
  display: flex;
  align-items: center;
  padding: 0 32px;
  gap: 0;
  height: 62px;
}

/* Brand */
.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-right: 40px;
  flex-shrink: 0;
}

.sidebar-brand-icon { font-size: 1.4rem; }

.sidebar-brand-text {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: -0.01em;
}

/* Nav links — right aligned */
.sidebar-nav {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 2px;
  flex: 1;
  justify-content: flex-end;
}

.sidebar-divider { display: none; }

.nav-item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 13px;
  border-radius: 8px;
  color: #94a3b8;
  font-size: 0.875rem;
  font-weight: 500;
  transition: all 0.2s ease;
  border: none;
  background: transparent;
  cursor: pointer;
  font-family: var(--font-body);
  text-decoration: none;
  white-space: nowrap;
}

.nav-item:hover {
  background: rgba(255,255,255,0.06);
  color: #f1f5f9;
}

.nav-item.active {
  background: rgba(29, 233, 182, 0.1);
  color: var(--accent);
  border: 1px solid rgba(29, 233, 182, 0.2);
}

.nav-item .nav-icon {
  font-size: 1rem;
  width: auto;
  flex-shrink: 0;
}

.nav-item.logout-item {
  color: #ff1744;
  margin-left: 4px;
}

.nav-item.logout-item:hover {
  background: rgba(255, 23, 68, 0.1);
}

/* ---- Navbar Dropdown ---- */
.nav-dropdown-wrapper {
  position: relative;
}

.nav-dropdown-trigger {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-dropdown-arrow {
  font-size: 0.7rem;
  margin-left: 2px;
  opacity: 0.7;
  transition: transform 0.2s ease;
}

.nav-dropdown-menu {
  position: absolute;
  top: calc(100% + 12px);
  left: 0;
  background: #0f1020;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 10px;
  padding: 6px;
  min-width: 160px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.5);
  z-index: 999;
  animation: dropdownFade 0.15s ease;
}

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

.nav-dropdown-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  border-radius: 7px;
  color: #94a3b8;
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease;
  white-space: nowrap;
}

.nav-dropdown-item:hover {
  background: rgba(255,255,255,0.06);
  color: #f1f5f9;
}

.nav-dropdown-item.active {
  background: rgba(29, 233, 182, 0.1);
  color: var(--accent);
}

/* User pill — right side */
.sidebar-user {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
  padding: 6px 12px;
  border-radius: 24px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  flex-shrink: 0;
}

.sidebar-user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--bg-card-alt);
  border: 1px solid var(--border-glow);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  color: var(--accent);
  flex-shrink: 0;
}

.sidebar-user-info { overflow: hidden; }

.sidebar-user-name {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-user-handle {
  font-size: 0.7rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ---- Main Content ---- */
.main-content {
  margin-left: 0;
  margin-top: 62px;
  flex: 1;
  padding: 48px 56px;
  display: flex;
  flex-direction: column;
  gap: 40px;
  animation: fadeIn 0.4s ease;
}

.page-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.page-header h1 {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 2.2rem;
  color: var(--text-primary);
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}

.page-header-sub {
  font-size: 1rem;
  color: var(--text-secondary);
}

/* ============================================================
   DASHBOARD PAGE
   ============================================================ */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
}

.stat-card {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 28px 24px;
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: var(--glass-border);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
  transition: transform var(--transition), box-shadow var(--transition);
}

.stat-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4), 0 0 20px rgba(29, 233, 182, 0.05);
}

.stat-icon {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 1.6rem;
}

.stat-total .stat-icon { background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(255,255,255,0.1); }
.stat-real  .stat-icon { background: var(--success-bg); border: 1px solid rgba(29, 233, 182, 0.2); }
.stat-ai    .stat-icon { background: var(--warning-bg); border: 1px solid rgba(224, 64, 251, 0.2); }

.stat-info { display: flex; flex-direction: column; gap: 6px; }

.stat-label {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-secondary);
  font-weight: 600;
}

.stat-value {
  font-family: var(--font-heading);
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1;
}

/* Quick Detect */
.quick-detect-section { display: flex; gap: 16px; flex-wrap: wrap; }
.btn-detect { padding: 16px 40px; font-size: 1.05rem; }

/* Activity */
.section-heading {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1.3rem;
  color: var(--text-primary);
  margin-bottom: 20px;
}

.activity-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.activity-list li {
  padding: 16px 20px;
  background: var(--bg-card);
  backdrop-filter: var(--glass-blur);
  border-radius: var(--radius);
  font-size: 0.95rem;
  color: var(--text-primary);
  border: var(--glass-border);
  border-left: 3px solid var(--accent);
}

.activity-empty {
  border-left-color: var(--text-muted) !important;
  color: var(--text-secondary) !important;
  font-style: normal;
}

/* ============================================================
   DETECT IMAGE PAGE
   ============================================================ */
.detect-container {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.detect-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
}

@media (max-width: 900px) {
  .detect-grid-2 { grid-template-columns: 1fr; }
}

/* Panel base styling */
.detect-panel {
  background: var(--bg-card);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border-radius: var(--radius-lg);
  border: var(--glass-border);
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.detect-panel h3 {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

/* Upload Zone */
.detect-zone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 60px 24px;
  border: 1px dashed rgba(255, 255, 255, 0.2);
  border-radius: var(--radius);
  background: rgba(0, 0, 0, 0.2);
  text-align: center;
  cursor: pointer;
  transition: all var(--transition);
  position: relative;
  min-height: 280px;
}

.detect-zone:hover {
  background: rgba(255, 255, 255, 0.02);
  border-color: var(--accent);
}

.detect-zone.dragover {
  background: rgba(29, 233, 182, 0.05);
  border-color: var(--accent);
  box-shadow: 0 0 20px rgba(29, 233, 182, 0.1) inset;
}

.detect-zone-icon { font-size: 3rem; margin-bottom: 8px; }
.detect-zone-text { font-size: 1rem; color: var(--text-secondary); }
.detect-zone input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

/* Image wrappers */
.img-wrap {
  width: 100%;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 260px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  position: relative;
}

.img-wrap img {
  max-width: 100%;
  max-height: 320px;
  object-fit: contain;
}

.img-placeholder {
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* Stats */
.stats-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.stats-row:last-child { border-bottom: none; }

.stats-label { font-weight: 500; color: var(--text-secondary); font-size: 0.95rem; }
.stats-val { font-family: var(--font-heading); font-weight: 600; color: var(--text-primary); font-size: 1.05rem; }

.result-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
}
.result-badge.real { background: var(--success-bg); color: var(--success); border: 1px solid rgba(29, 233, 182, 0.2); }
.result-badge.ai { background: var(--danger-bg); color: var(--danger); border: 1px solid rgba(255, 23, 68, 0.2); }

/* Explanation */
.explanation-text {
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--text-secondary);
}

/* Action bar */
.detect-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 16px;
}

/* ============================================================
   HISTORY PAGE
   ============================================================ */
/* Controls */
.history-controls {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  align-items: center;
  background: var(--bg-card);
  backdrop-filter: var(--glass-blur);
  padding: 20px 24px;
  border-radius: var(--radius-lg);
  border: var(--glass-border);
  margin-bottom: 24px;
}

.history-search-wrap {
  flex: 1;
  min-width: 240px;
  position: relative;
}

.history-search-wrap input {
  width: 100%;
  padding: 12px 16px 12px 44px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.95rem;
  outline: none;
  transition: border-color var(--transition);
}

.history-search-wrap input:focus {
  border-color: var(--accent);
}

.history-search-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
}

.history-select {
  padding: 12px 16px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.95rem;
  outline: none;
  cursor: pointer;
  min-width: 160px;
}

/* Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-content {
  background: var(--bg-card);
  backdrop-filter: var(--glass-blur);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 860px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-card);
  transform: translateY(20px);
  transition: transform 0.3s ease;
}

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

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 32px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.modal-header h2 {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: 600;
  margin: 0;
}

.modal-close {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 1.8rem;
  cursor: pointer;
  transition: color var(--transition);
}

.modal-close:hover {
  color: var(--text-primary);
}

.modal-body {
  padding: 32px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.history-table-wrap {
  overflow-x: auto;
  border-radius: var(--radius);
  border: var(--glass-border);
  background: rgba(0, 0, 0, 0.2);
}

.history-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.history-table thead {
  background: rgba(255, 255, 255, 0.03);
}

.history-table th {
  padding: 16px 20px;
  text-align: left;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.history-table td {
  padding: 16px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.02);
  color: var(--text-primary);
  vertical-align: middle;
}

.history-table tbody tr {
  transition: background var(--transition);
}

.history-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.03);
}

.history-thumb {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  background: #000;
}

.tag {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
}

.tag-real { background: var(--success-bg); color: var(--success); border: 1px solid rgba(29, 233, 182, 0.2); }
.tag-ai   { background: var(--danger-bg);  color: var(--danger); border: 1px solid rgba(255, 23, 68, 0.2); }

.empty-state {
  text-align: center;
  padding: 80px 20px;
  color: var(--text-muted);
}

.empty-state-icon { font-size: 3.5rem; margin-bottom: 16px; opacity: 0.5; }
.empty-state-text { font-size: 1rem; }

/* ============================================================
   ANALYTICS PAGE
   ============================================================ */
.charts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  gap: 32px;
}

.chart-card {
  background: var(--bg-card);
  backdrop-filter: var(--glass-blur);
  border-radius: var(--radius-lg);
  border: var(--glass-border);
  padding: 32px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.2);
}

.chart-card h3 {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--text-primary);
  margin-bottom: 20px;
}

.chart-canvas-wrap {
  position: relative;
  width: 100%;
  min-height: 280px;
}

.chart-canvas-wrap canvas {
  width: 100% !important;
  height: 280px !important;
}

/* ============================================================
   PROFILE PAGE
   ============================================================ */
.profile-grid {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 32px;
}

.profile-card {
  background: var(--bg-card);
  backdrop-filter: var(--glass-blur);
  border-radius: var(--radius-lg);
  border: var(--glass-border);
  padding: 40px 32px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  text-align: center;
}

.profile-avatar {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: var(--bg-card-alt);
  border: 2px solid var(--border-glow);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  color: var(--accent);
  font-weight: 700;
  font-family: var(--font-heading);
  box-shadow: 0 0 20px rgba(29, 233, 182, 0.2);
  overflow: hidden;
}

.profile-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Avatar generator styles */
.avatar-cat-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #94a3b8;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.avatar-cat-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.avatar-cat-btn.active {
  background: rgba(29, 233, 182, 0.15);
  border-color: var(--accent);
  color: var(--accent);
}

.avatar-item {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  border: 2px solid transparent;
  cursor: pointer;
  overflow: hidden;
  transition: all 0.2s ease;
  background: rgba(255, 255, 255, 0.05);
}

.avatar-item:hover {
  transform: scale(1.08);
  border-color: rgba(29, 233, 182, 0.5);
}

.avatar-item.selected {
  border-color: var(--accent);
  box-shadow: 0 0 12px var(--accent);
  transform: scale(1.08);
}

.avatar-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-name {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.4rem;
  color: var(--text-primary);
}

.profile-email {
  font-size: 0.95rem;
  color: var(--text-secondary);
}

.profile-details {
  background: var(--bg-card);
  backdrop-filter: var(--glass-blur);
  border-radius: var(--radius-lg);
  border: var(--glass-border);
  padding: 40px;
}

.profile-details h3 {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1.2rem;
  color: var(--text-primary);
  margin-bottom: 24px;
}

.form-group {
  margin-bottom: 24px;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-sm);
  background: rgba(0, 0, 0, 0.2);
  color: var(--text-primary);
  font-size: 1rem;
  font-family: var(--font-body);
  outline: none;
  transition: all var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--accent);
  background: rgba(0, 0, 0, 0.4);
}

.form-group textarea {
  min-height: 120px;
  resize: vertical;
}

.form-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 12px;
}

@media (max-width: 800px) {
  .profile-grid { grid-template-columns: 1fr; }
}

/* ============================================================
   ABOUT PAGE
   ============================================================ */
.about-section {
  background: var(--bg-card);
  backdrop-filter: var(--glass-blur);
  border-radius: var(--radius-lg);
  border: var(--glass-border);
  padding: 36px;
  margin-bottom: 24px;
}

.about-section h2 {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.5rem;
  color: var(--text-primary);
  margin-bottom: 16px;
}

.about-section h3 {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1.15rem;
  color: var(--accent);
  margin: 24px 0 12px;
}

.about-section p,
.about-section li {
  color: var(--text-secondary);
  font-size: 1rem;
  line-height: 1.7;
}

.about-section ul {
  padding-left: 24px;
}

.about-section ul li {
  margin-bottom: 8px;
}

.tech-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 16px;
}

.tech-badge {
  padding: 8px 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
  font-size: 0.85rem;
  font-weight: 500;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

/* ============================================================
   CONTACT PAGE
   ============================================================ */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
}

.contact-form-card {
  background: var(--bg-card);
  backdrop-filter: var(--glass-blur);
  border-radius: var(--radius-lg);
  border: var(--glass-border);
  padding: 36px;
}

.contact-form-card h2 {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.4rem;
  margin-bottom: 24px;
  color: var(--text-primary);
}

.contact-info-card {
  background: var(--bg-card);
  backdrop-filter: var(--glass-blur);
  border-radius: var(--radius-lg);
  border: var(--glass-border);
  padding: 36px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.contact-info-card h2 {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.4rem;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.contact-item {
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.contact-item-icon {
  font-size: 1.4rem;
  width: 48px;
  height: 48px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.contact-item-text h4 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.contact-item-text p {
  font-size: 0.95rem;
  color: var(--text-secondary);
}

@media (max-width: 800px) {
  .contact-grid { grid-template-columns: 1fr; }
}

/* ============================================================
   TOAST NOTIFICATION
   ============================================================ */
.toast {
  position: fixed;
  bottom: 32px;
  right: 32px;
  padding: 16px 28px;
  border-radius: var(--radius-sm);
  color: #fff;
  font-size: 0.95rem;
  font-weight: 500;
  z-index: 9999;
  animation: toastIn 0.3s ease, toastOut 0.3s ease 2.7s forwards;
  box-shadow: 0 8px 32px rgba(0,0,0,0.5);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.toast-success { background: #059669; }
.toast-error   { background: #dc2626; }
.toast-info    { background: rgba(29, 233, 182, 0.2); backdrop-filter: blur(8px); border-color: var(--accent); color: var(--accent); }

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

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

/* ============================================================
   MOBILE HAMBURGER BUTTON
   ============================================================ */
.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  border-radius: 8px;
  color: var(--text-primary);
  transition: background var(--transition);
  flex-shrink: 0;
  margin-left: auto;
  z-index: 300;
}

.mobile-menu-btn:hover { background: rgba(255,255,255,0.07); }

.mobile-menu-btn svg { display: block; }

/* Mobile drawer overlay */
.mobile-nav-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  z-index: 400;
  backdrop-filter: blur(4px);
}

.mobile-nav-overlay.open { display: block; }

/* Mobile nav drawer */
.mobile-nav-drawer {
  position: fixed;
  top: 0;
  right: -280px;
  width: 280px;
  height: 100dvh;
  background: #080914;
  border-left: 1px solid rgba(255,255,255,0.08);
  z-index: 500;
  display: flex;
  flex-direction: column;
  padding: 24px 16px;
  gap: 8px;
  transition: right 0.3s cubic-bezier(.4,0,.2,1);
  overflow-y: auto;
}

.mobile-nav-drawer.open { right: 0; }

.mobile-nav-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.mobile-nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.mobile-nav-brand img { height: 32px; width: auto; object-fit: contain; }

.mobile-nav-brand-text {
  font-family: var(--font-heading);
  font-weight: 900;
  font-size: 1.05rem;
  background: -webkit-linear-gradient(45deg,#3b82f6,#a855f7);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.mobile-nav-close {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 1.6rem;
  cursor: pointer;
  line-height: 1;
  padding: 4px;
}

.mobile-nav-user {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 12px;
  background: rgba(255,255,255,0.04);
  border-radius: var(--radius);
  border: 1px solid rgba(255,255,255,0.07);
  margin-bottom: 12px;
}

.mobile-nav-user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--border-glow);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  color: var(--accent);
  background: var(--bg-card-alt);
  flex-shrink: 0;
}

.mobile-nav-user-name {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mobile-nav-user-handle {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.mobile-nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border-radius: 10px;
  color: var(--text-secondary);
  font-size: 0.95rem;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.2s ease;
  border: none;
  background: transparent;
  cursor: pointer;
  font-family: var(--font-body);
  width: 100%;
  text-align: left;
}

.mobile-nav-link:hover {
  background: rgba(255,255,255,0.05);
  color: var(--text-primary);
}

.mobile-nav-link.active {
  background: rgba(29,233,182,0.1);
  color: var(--accent);
  border: 1px solid rgba(29,233,182,0.15);
}

.mobile-nav-link.logout {
  color: var(--danger);
  margin-top: 8px;
}

.mobile-nav-link.logout:hover { background: rgba(255,23,68,0.1); }

.mobile-nav-section-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  padding: 8px 14px 4px;
  font-weight: 600;
}

.mobile-nav-sub {
  padding-left: 14px;
}

/* ============================================================
   RESPONSIVE — TABLET & MOBILE  (≤ 900px)
   ============================================================ */
@media (max-width: 900px) {
  /* --- Navbar: full-width top bar, hide desktop nav --- */
  .sidebar {
    width: 100%;
    height: 58px;
    padding: 0;
  }

  .sidebar aside {
    padding: 0 16px;
    gap: 0;
    height: 58px;
  }

  .sidebar-brand { margin-right: 0; }

  /* Hide all desktop nav links & user pill */
  .sidebar-nav,
  .sidebar-user { display: none; }

  /* Show hamburger button */
  .mobile-menu-btn { display: flex; align-items: center; justify-content: center; }

  /* Main content: no side offset, reduced padding */
  .main-content {
    margin-left: 0;
    margin-top: 58px;
    padding: 24px 16px;
    gap: 24px;
  }

  /* Page header stacks */
  .page-header { flex-direction: column; align-items: flex-start; gap: 8px; }
  .page-header h1 { font-size: 1.6rem; }

  /* Auth card: stack vertically */
  .auth-card {
    flex-direction: column;
    max-width: 420px;
  }
  .auth-right { min-height: 200px; }
  .welcome-heading { font-size: 2rem; }
  .auth-left { padding: 32px 24px; }

  /* Detect grid: single column */
  .detect-grid-2 { grid-template-columns: 1fr; }

  /* Stats grid: smaller min */
  .stats-grid { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; }
  .stat-card { padding: 18px 14px; gap: 12px; }
  .stat-value { font-size: 1.8rem; }

  /* Charts: single column */
  .charts-grid { grid-template-columns: 1fr; }

  /* Profile: single column */
  .profile-grid { grid-template-columns: 1fr; }

  /* Contact: single column */
  .contact-grid { grid-template-columns: 1fr; }

  /* History controls: stack */
  .history-controls { flex-direction: column; align-items: stretch; }
  .history-search-wrap { min-width: unset; }
  .history-select { width: 100%; }

  /* News grid: single col on small */
  .news-grid { grid-template-columns: 1fr; }

  /* Quick detect: stack */
  .quick-detect-section { flex-direction: column; gap: 12px; }
  .btn-detect { padding: 14px 28px; font-size: 1rem; width: 100%; justify-content: center; }
  .btn-secondary { width: 100%; justify-content: center; }

  /* Detect panel */
  .detect-panel { padding: 20px 16px; }
  .detect-zone { padding: 40px 16px; min-height: 200px; }

  /* Modal: full-screen on mobile */
  .modal-overlay { padding: 0; align-items: flex-end; }
  .modal-content { border-radius: var(--radius-lg) var(--radius-lg) 0 0; max-height: 92dvh; }
  .modal-body { padding: 20px 16px; }
  .modal-header { padding: 16px 20px; }

  /* Tables: allow scroll */
  .history-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .history-table { min-width: 560px; }

  /* Profile details */
  .profile-details { padding: 24px 16px; }

  /* Toast: bottom-center on mobile */
  .toast { bottom: 16px; right: 16px; left: 16px; text-align: center; }

  /* Nav dropdown on desktop: hide inside mobile drawer (drawer handles it) */
  .sidebar-nav .nav-dropdown-menu { display: none !important; }
}

/* ============================================================
   RESPONSIVE — PHONE  (≤ 480px)
   ============================================================ */
@media (max-width: 480px) {
  .main-content { padding: 16px 12px; gap: 20px; }

  .auth-left { padding: 28px 16px; }
  .auth-title { font-size: 1.6rem; }
  .welcome-heading { font-size: 1.6rem; }
  .auth-right { min-height: 160px; }

  .stat-card { flex-direction: column; text-align: center; padding: 16px 12px; }
  .stat-icon { width: 44px; height: 44px; font-size: 1.3rem; }
  .stat-value { font-size: 1.6rem; }

  .chart-card { padding: 20px 12px; }
  .chart-canvas-wrap canvas { height: 220px !important; }

  .detect-zone { padding: 30px 12px; min-height: 160px; }
  .detect-zone-icon { font-size: 2rem; }

  .section-heading { font-size: 1.1rem; }
  .page-header h1 { font-size: 1.4rem; }

  .stats-grid { grid-template-columns: 1fr 1fr; gap: 10px; }

  .about-section { padding: 20px 16px; }
  .contact-form-card, .contact-info-card { padding: 20px 16px; }

  .news-grid { gap: 16px; }
  .news-header-actions { flex-direction: column; align-items: stretch; }
  .search-box { width: 100%; }

  .form-actions { flex-direction: column; }
  .form-actions .btn-primary,
  .form-actions .btn-secondary { width: 100%; }

  .btn-primary { padding: 13px 24px; font-size: 0.95rem; }
}

/* ============================================================
   NEWS FEATURE (news.html & saved_news.html)
   ============================================================ */
.news-header-actions {
  display: flex;
  gap: 16px;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 16px;
}

.search-box {
  display: flex;
  background: var(--bg-input);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-sm);
  overflow: hidden;
  width: 300px;
}

.search-box input {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text-primary);
  padding: 10px 14px;
  outline: none;
  font-family: var(--font-body);
}

.search-box button {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  padding: 0 14px;
  cursor: pointer;
  transition: color var(--transition);
}

.search-box button:hover {
  color: var(--accent);
}

.news-chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.chip {
  background: var(--bg-card-alt);
  border: 1px solid rgba(255, 255, 255, 0.05);
  padding: 6px 14px;
  border-radius: 20px;
  color: var(--text-secondary);
  font-size: 0.85rem;
  cursor: pointer;
  transition: all var(--transition);
}

.chip:hover, .chip.active {
  background: rgba(29, 233, 182, 0.15);
  border-color: var(--accent);
  color: var(--accent);
}

.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
  margin-top: 24px;
}

.news-card {
  background: var(--bg-card);
  border: var(--glass-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform var(--transition), box-shadow var(--transition);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
}

.news-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4), 0 0 15px rgba(29, 233, 182, 0.1);
  border-color: rgba(29, 233, 182, 0.3);
}

.news-image {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  background: #111; /* fallback for missing images */
}

.news-content {
  padding: 20px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.news-title {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 12px;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.news-desc {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 16px;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}

.news-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.news-source {
  font-weight: 500;
  color: var(--accent-light);
}

.news-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.news-btn {
  background: rgba(255, 255, 255, 0.05);
  border: none;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition);
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  gap: 6px;
}

.news-btn:hover {
  background: rgba(29, 233, 182, 0.1);
  color: var(--text-primary);
}

.news-btn.saved {
  color: var(--accent);
  background: rgba(29, 233, 182, 0.15);
}

.news-btn.liked {
  color: var(--danger);
  background: rgba(255, 23, 68, 0.15);
}

.news-read-more {
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--accent);
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 500;
  text-decoration: none;
  transition: all var(--transition);
}

.news-read-more:hover {
  background: rgba(29, 233, 182, 0.1);
  box-shadow: 0 0 10px rgba(29, 233, 182, 0.2);
}

.trending-section {
  background: var(--bg-card);
  border: var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-top: 24px;
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
}

.trending-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-heading);
  font-size: 1.2rem;
  color: var(--text-primary);
  margin-bottom: 16px;
}

.trending-tags {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.trending-tag {
  color: var(--warning);
  background: var(--warning-bg);
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid rgba(224, 64, 251, 0.2);
  transition: all var(--transition);
}

.trending-tag:hover {
  background: rgba(224, 64, 251, 0.25);
  box-shadow: 0 0 15px rgba(224, 64, 251, 0.2);
}

/* Loading State for News */
.news-loading {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
  font-size: 1.1rem;
}

/* ============================================================
   IMAGE INFO & DETAILS TABLES
   ============================================================ */
.info-table {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.info-row:last-child {
  border-bottom: none;
}
.info-label {
  font-size: 0.95rem;
  color: var(--text-secondary);
}
.info-val {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-primary);
}

/* Report Preview Style overrides for printing to fit screen properly */
.report-preview-card img {
  max-width: 100%;
  display: block;
}

/* ---------- News Loading Animation ---------- */
#newsLoading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 350px;
}

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

@keyframes glowRing {
  0%   { box-shadow: 0 0 20px rgba(29,233,182,0.15), 0 0 40px rgba(224,64,251,0.1); }
  50%  { box-shadow: 0 0 35px rgba(29,233,182,0.35), 0 0 70px rgba(224,64,251,0.2); }
  100% { box-shadow: 0 0 20px rgba(29,233,182,0.15), 0 0 40px rgba(224,64,251,0.1); }
}

.news-loader-video-wrap {
  position: relative;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  overflow: hidden;
  animation: glowRing 2s ease-in-out infinite;
}

.news-loader-video-wrap video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  mix-blend-mode: screen;
  filter: brightness(1.3) saturate(1.4);
}
