/* Ekkoscope Design System - Cyberpunk Tech Grid Stylesheet */

@import url('https://fonts.googleapis.com/css2?family=Geist:wght@300;400;500;600;700;800;900&family=Inter:wght@400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600;700;800&family=Outfit:wght@600;800;900&display=swap');

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

/* ==========================================================================
   Design Tokens & Themes
   ========================================================================== */
:root {
  /* Fonts */
  --font-sans: 'Geist', ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-heading: 'Geist', ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Spring transitions & parameters */
  --transition-spring: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-fade: all 0.15s ease;
  --radius: 4px;
  --radius-sm: 2px;
  --radius-lg: 6px;
  /* Cyber Dark Theme (Default) */
  --bg-solid: #050506;
  --grid-color: rgba(255, 255, 255, 0.05);
  --surface: rgba(10, 10, 12, 0.85);
  --surface-hover: rgba(16, 16, 20, 0.95);
  --surface-solid: #0d0d0f;
  --surface-card-blur: blur(8px);

  /* Borders & Shadows */
  --border: rgba(229, 26, 55, 0.35);
  --border-light: rgba(229, 26, 55, 0.55);
  --border-focus: #ff334b;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.85);
  --shadow-hover: 0 15px 40px rgba(229, 26, 55, 0.15);
  --shadow-inset: inset 0 2px 4px rgba(0, 0, 0, 0.7);

  /* Accents (Crimson & Vibrant Reds) */
  --accent: #e51a37;
  --accent-light: #ff334b;
  --accent-gradient: linear-gradient(135deg, #e51a37, #ff334b);
  --accent2: #ff2a4b;
  --accent2-gradient: linear-gradient(135deg, #ff2a4b, #e51a37);
  --brand-gradient: linear-gradient(135deg, #ffffff 0%, #ff5268 70%, #ff2a4b 100%);

  /* Glows */
  --glow-accent: rgba(229, 26, 55, 0.4);
  --glow-accent2: rgba(255, 42, 75, 0.3);

  /* Status Colors */
  --green: #10b981;
  --green-bg: rgba(16, 185, 129, 0.06);
  --green-border: rgba(16, 185, 129, 0.25);
  --green-text: #34d399;

  --red: #e51a37;
  --red-bg: rgba(229, 26, 55, 0.06);
  --red-border: rgba(229, 26, 55, 0.25);
  --red-text: #ff6b7d;

  --yellow: #f59e0b;
  --yellow-bg: rgba(245, 158, 11, 0.06);
  --yellow-border: rgba(245, 158, 11, 0.25);
  --yellow-text: #fcd34d;

  --blue: #3b82f6;
  --blue-bg: rgba(59, 130, 246, 0.06);
  --blue-border: rgba(59, 130, 246, 0.25);
  --blue-text: #93c5fd;

  /* Typography Colors */
  --text: rgb(229, 225, 228);
  --text-inverse: #000000;
  --muted: #8e8e9c;
  --overlay-bg: rgba(5, 5, 6, 0.9);
}

/* Light Theme Variables */
html[data-theme="light"] {
  --bg-solid: #f4f5f6;
  --grid-color: rgba(211, 27, 51, 0.05);
  --surface: rgba(255, 255, 255, 0.92);
  --surface-hover: rgba(248, 248, 250, 0.98);
  --surface-solid: #ffffff;
  --surface-card-blur: blur(8px);

  /* Borders & Shadows */
  --border: rgba(211, 27, 51, 0.15);
  --border-light: rgba(211, 27, 51, 0.35);
  --border-focus: #d31b33;
  --shadow: 0 10px 25px rgba(0, 0, 0, 0.05), inset 0 1px 0 rgba(255, 255, 255, 0.8);
  --shadow-hover: 0 15px 35px rgba(211, 27, 51, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.9);
  --shadow-inset: inset 0 1px 3px rgba(0, 0, 0, 0.08);

  /* Accents */
  --accent: #d31b33;
  --accent-light: #e51a37;
  --brand-gradient: linear-gradient(135deg, #050506 0%, #d31b33 100%);

  /* Typography Colors */
  --text: #0d0d0f;
  --text-inverse: #ffffff;
  --muted: #80808a;
  --overlay-bg: rgba(244, 245, 246, 0.9);

  /* Status Colors */
  --green-text: #059669;
  --red-text: #b91c1c;
  --yellow-text: #b45309;
  --blue-text: #1d4ed8;
}

/* ==========================================================================
   Base Elements & Layout
   ========================================================================== */
body {
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background-color: var(--bg-solid);
  background-image:
    linear-gradient(var(--grid-color) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-color) 1px, transparent 1px);
  background-size: 24px 24px;
  background-attachment: fixed;
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow-x: hidden;
  position: relative;
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* Subtle Vignette Edge Overlay */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background: radial-gradient(circle at 50% 50%, transparent 40%, rgba(0, 0, 0, 0.6) 100%);
  pointer-events: none;
  z-index: 0;
}

html[data-theme="light"] body::before {
  background: radial-gradient(circle at 50% 50%, transparent 60%, rgba(0, 0, 0, 0.05) 100%);
}

/* Premium Tech Scrollbar */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

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

::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 0;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--border-light);
}

/* ==========================================================================
   Header & Navigation
   ========================================================================== */
.header {
  position: relative;
  z-index: 10;
  width: 100%;
  max-width: 1200px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px;
  border-bottom: 1px solid var(--border);
  background: rgba(var(--bg-solid), 0.85);
  backdrop-filter: blur(8px);
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.logo-icon {
  width: 32px;
  height: 32px;
  background: transparent;
  border: 1px solid var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-spring);
  position: relative;
}

.logo-icon::before {
  content: '';
  position: absolute;
  inset: 2px;
  border: 1px dashed var(--accent);
  opacity: 0.5;
}

.logo:hover .logo-icon {
  transform: rotate(90deg);
  border-color: var(--accent-light);
  box-shadow: 0 0 10px var(--glow-accent);
}

.logo-icon svg {
  width: 16px;
  height: 16px;
  stroke: var(--accent);
  stroke-width: 2;
  fill: none;
}

.logo-text {
  font-family: var(--font-heading);
  font-size: 20px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--text);
}

.logo-badge {
  font-family: var(--font-mono);
  font-size: 8px;
  background: var(--red-bg);
  border: 1px solid var(--red-border);
  color: var(--red-text);
  padding: 2px 6px;
  font-weight: 800;
  letter-spacing: 1px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.auth-box {
  display: flex;
  gap: 10px;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 4px 12px;
  border-radius: var(--radius);
  box-shadow: var(--shadow-inset);
  font-size: 12px;
}

.auth-email {
  color: var(--text);
  font-weight: 500;
}

/* Sleek Cyber Theme Toggle */
.theme-toggle-btn {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  width: 34px;
  height: 34px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: var(--transition-spring);
}

.theme-toggle-btn:hover {
  border-color: var(--border-light);
  box-shadow: 0 0 8px var(--glow-accent);
  color: var(--accent);
}

.theme-toggle-btn svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  position: absolute;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s;
}

.theme-toggle-btn .sun-icon {
  opacity: 0;
  transform: scale(0.5) rotate(-45deg);
}

.theme-toggle-btn .moon-icon {
  opacity: 1;
  transform: scale(1) rotate(0deg);
}

html[data-theme="light"] .theme-toggle-btn .sun-icon {
  opacity: 1;
  transform: scale(1) rotate(0deg);
}

html[data-theme="light"] .theme-toggle-btn .moon-icon {
  opacity: 0;
  transform: scale(0.5) rotate(45deg);
}

/* ==========================================================================
   Hero Section Vibe
   ========================================================================== */
.hero-sec {
  width: 100%;
  max-width: 800px;
  text-align: center;
  margin: 24px auto 32px auto;
  padding: 0 24px;
  position: relative;
  z-index: 1;
}

.sys-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--surface-solid);
  border: 1px solid var(--border);
  color: var(--accent-light);
  padding: 6px 12px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 24px;
  box-shadow: 0 0 10px rgba(229, 26, 55, 0.1);
}

.sys-badge::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  background: var(--accent);
  border-radius: 50%;
  animation: pulse-dot-anim 1.5s infinite;
}

.hero-title {
  font-family: var(--font-heading);
  font-size: 25px;
  font-weight: 900;
  letter-spacing: -1px;
  text-transform: uppercase;
  line-height: 1.1;
  margin-bottom: 16px;
  color: var(--text);
}

.hero-title span {
  color: var(--accent);
  display: block;
  font-size: 24px;
  letter-spacing: 2px;
  margin-top: 6px;
  font-family: var(--font-mono);
  font-weight: 500;
}

.hero-sub {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.6;
  max-width: 600px;
  margin: 0 auto;
}

/* ==========================================================================
   Main Layout & Cards
   ========================================================================== */
.main-wrap {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 640px;
  padding: 0 24px;
  margin: 0 auto 40px auto;
}

.table-wrap {
  position: relative;
  z-index: 1;
  width: 96%;
  max-width: 1200px;
  padding: 0 24px;
  margin: 0 auto 60px auto;
}

/* Cyber Tech Console Card Style */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  backdrop-filter: var(--surface-card-blur);
  box-shadow: var(--shadow);
  transition: var(--transition-spring);
  position: relative;
}

/* Visual console headers */
.card[data-title]::before,
.modal[data-title]::before {
  content: attr(data-title);
  position: absolute;
  top: -10px;
  left: 16px;
  background: var(--surface-solid);
  border: 1px solid var(--border);
  color: var(--accent-light);
  padding: 2px 8px;
  font-size: 10px;
  font-weight: 700;
  font-family: var(--font-mono);
  z-index: 2;
}

.card:hover {
  border-color: var(--border-light);
  box-shadow: var(--shadow-hover);
}

/* ==========================================================================
   Forms & Inputs
   ========================================================================== */
.section-title {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-top: 12px;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.section-title::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
  opacity: 0.5;
}

/* Free Tier Banner */
.free-banner {
  background: var(--surface-solid);
  border: 1px solid var(--border);
  padding: 10px 14px;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 20px;
  display: flex;
  gap: 10px;
  align-items: center;
}

.free-banner svg {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  stroke: var(--accent);
  fill: none;
  stroke-width: 2;
}

.free-banner b {
  color: var(--text);
}

/* Terminal styled inputs */
.url-input,
.clip-input,
.text-input {
  width: 100%;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 12px 16px;
  border-radius: var(--radius);
  font-size: 13px;
  font-family: var(--font-mono);
  outline: none;
  transition: var(--transition-spring);
  margin-bottom: 16px;
  box-shadow: var(--shadow-inset);
}

html[data-theme="light"] .url-input,
html[data-theme="light"] .clip-input,
html[data-theme="light"] .text-input {
  background: rgba(255, 255, 255, 0.8);
}

.url-input:focus,
.clip-input:focus,
.text-input:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 10px var(--glow-accent);
}

.url-input::placeholder,
.clip-input::placeholder,
.text-input::placeholder {
  color: var(--muted);
  opacity: 0.5;
}

/* Clip fields layout */
.clip-row {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
}

.clip-field {
  flex: 1;
}

.clip-label {
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 4px;
  display: block;
}

/* ==========================================================================
   Buttons System
   ========================================================================== */
.btn-row {
  display: flex;
  gap: 12px;
  flex-direction: column;
}

@media(min-width: 480px) {
  .btn-row {
    flex-direction: row;
  }
}

/* Flat Cyberpunk Tech Buttons */
.btn {
  flex: 1;
  padding: 12px 20px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 12px;
  cursor: pointer;
  letter-spacing: 0.5px;
  transition: var(--transition-spring);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn:hover {
  background: var(--border);
  border-color: var(--border-light);
  box-shadow: 0 0 8px rgba(229, 26, 55, 0.15);
}

.btn:active {
  transform: translateY(1px);
}

.btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
  background: transparent !important;
  color: var(--muted) !important;
}

/* Full / Clip Button Styling override */
.btn-full {
  background: var(--accent);
  border-color: var(--accent-light);
  color: #ffffff;
}

.btn-full:hover {
  background: var(--accent-light);
  box-shadow: 0 0 12px var(--glow-accent);
}

.btn-clip {
  background: rgba(229, 26, 55, 0.1);
  border-color: var(--border-light);
  color: var(--accent-light);
}

.btn-clip:hover {
  background: var(--accent);
  border-color: var(--accent-light);
  color: #ffffff;
  box-shadow: 0 0 12px var(--glow-accent);
}

.btn-ghost {
  border-color: var(--border);
  color: var(--muted);
}

.btn-ghost:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
}

html[data-theme="light"] .btn-ghost:hover {
  background: rgba(0, 0, 0, 0.05);
}

.btn-sm {
  padding: 6px 12px;
  font-size: 11px;
}

.btn-danger {
  background: rgba(229, 26, 55, 0.1);
  border-color: var(--accent);
  color: var(--red-text);
}

.btn-danger:hover {
  background: var(--accent);
  color: #ffffff;
}

.btn-primary {
  background: var(--accent);
  border-color: var(--accent-light);
  color: #ffffff;
}

.btn-primary:hover {
  background: var(--accent-light);
}

/* ==========================================================================
   Dashboard Table & Log Console
   ========================================================================== */
.dashboard-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  position: relative;
}

.dashboard-panel::before {
  content: '[■ DOWNLOAD_QUEUE_LOGS]';
  position: absolute;
  top: -10px;
  left: 16px;
  background: var(--surface-solid);
  border: 1px solid var(--border);
  color: var(--accent-light);
  padding: 2px 8px;
  font-size: 10px;
  font-weight: 700;
  font-family: var(--font-mono);
}

.dash-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  border-bottom: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.2);
}

html[data-theme="light"] .dash-toolbar {
  background: rgba(0, 0, 0, 0.02);
}

.dash-title {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
}

.table-container {
  width: 100%;
  overflow-x: auto;
}

.custom-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  min-width: 1000px;
}

.custom-table th {
  background: rgba(0, 0, 0, 0.3);
  padding: 12px 16px;
  color: var(--muted);
  font-weight: 700;
  border-bottom: 1px solid var(--border);
  text-transform: uppercase;
  font-size: 10px;
  letter-spacing: 0.5px;
}

html[data-theme="light"] .custom-table th {
  background: rgba(0, 0, 0, 0.03);
}

.custom-table td {
  padding: 12px 16px;
  border-bottom: 1px solid rgba(229, 26, 55, 0.1);
  vertical-align: middle;
  color: var(--text);
}

.custom-table tr:hover td {
  background: rgba(229, 26, 55, 0.03);
}

/* Magnifying Hover previews for thumbnails */
.thumb-container {
  position: relative;
  width: 80px;
  height: 48px;
  display: block;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.td-thumb img,
.td-thumb .no-thumb {
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s ease, border-color 0.2s ease;
  position: relative;
  z-index: 1;
}

.thumb-container:hover img {
  transform: scale(1.08);
  border-color: var(--accent);
}

.td-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #000;
  display: block;
  transition: var(--transition-spring);
}

.thumb-hint {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(5, 5, 6, 0.85);
  color: var(--accent-light);
  font-family: var(--font-mono);
  font-size: 8px;
  font-weight: 800;
  padding: 3px 0;
  text-align: center;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s ease, transform 0.15s ease;
  z-index: 5;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  transform: translateY(100%);
}

.thumb-container:hover .thumb-hint {
  opacity: 1;
  transform: translateY(0);
}

.td-thumb .no-thumb {
  width: 80px;
  height: 48px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.02);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  border: 1px solid var(--border);
}

/* Storyboard Lightbox Modal Content */
.storyboard-modal-content {
  position: relative;
  background: var(--surface-solid);
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 16px;
  max-width: 85%;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.95), 0 0 30px var(--glow-accent);
  animation: storyboard-zoom 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes storyboard-zoom {
  from { transform: scale(0.9); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

#storyboard-modal-img {
  max-width: 100%;
  max-height: 70vh;
  object-fit: contain;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: #000;
}

.storyboard-modal-caption {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-top: 12px;
  font-weight: 700;
}

.storyboard-close {
  position: absolute;
  top: -12px;
  right: -12px;
  width: 28px;
  height: 28px;
  background: var(--accent);
  border: 1px solid var(--accent-light);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
  transition: var(--transition-spring);
  z-index: 10;
}

.storyboard-close:hover {
  background: var(--accent-light);
  transform: scale(1.1);
}

/* Status Icons */
.status-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: var(--radius);
  transition: var(--transition-spring);
}

.status-icon.success {
  background: var(--green-bg);
  color: var(--green-text);
  border: 1px solid var(--green-border);
}

.status-icon.error {
  background: var(--red-bg);
  color: var(--red-text);
  border: 1px solid var(--red-border);
}

.status-icon.pending {
  background: var(--yellow-bg);
  color: var(--yellow-text);
  border: 1px solid var(--yellow-border);
  animation: pulse-animation 2s infinite ease-in-out;
}

/* Actions in Table */
.actions-wrapper {
  display: flex;
  gap: 8px;
  align-items: center;
}

.action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 6px 10px;
  border-radius: var(--radius);
  font-size: 10px;
  font-weight: 700;
  text-decoration: none;
  text-transform: uppercase;
  transition: var(--transition-spring);
  cursor: pointer;
  border: 1px solid var(--border);
  background: rgba(229, 26, 55, 0.05);
  color: var(--text);
  white-space: nowrap;
}

/* Pricing Package Price Badges (Popping & Larger) */
.pkg-card .action-btn,
#btn-pkg-custom {
  padding: 10px 18px !important;
  font-size: 14px !important;
  font-weight: 900 !important;
  font-family: var(--font-mono);
  background: rgba(229, 26, 55, 0.12) !important;
  border: 1px solid var(--accent) !important;
  color: #ffffff !important;
  box-shadow: 0 4px 10px rgba(229, 26, 55, 0.15) !important;
}

.pkg-card .action-btn-play {
  border-color: var(--accent) !important;
}

.pkg-card .action-btn-link2 {
  border-color: #8b5cf6 !important;
  background: rgba(139, 92, 246, 0.12) !important;
  color: #d8b4fe !important;
}

.action-btn:hover {
  transform: translateY(-1px);
}

.action-btn:active {
  transform: translateY(1px);
}

.action-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
  transform: none !important;
  background: transparent !important;
}

/* Action variants */
.action-btn-play {
  background: rgba(229, 26, 55, 0.05);
  color: var(--accent-light);
  border-color: var(--border);
}

.action-btn-play:hover {
  background: var(--accent);
  color: #ffffff;
  border-color: var(--accent-light);
}

.action-btn-upload,
.action-btn-link1 {
  background: rgba(59, 130, 246, 0.05);
  color: var(--blue-text);
  border-color: var(--blue-border);
}

.action-btn-upload:hover,
.action-btn-link1:hover {
  background: var(--blue);
  color: #ffffff;
}

.action-btn-link2 {
  background: rgba(168, 85, 247, 0.05);
  color: #c084fc;
  border-color: rgba(168, 85, 247, 0.2);
}

.action-btn-link2:hover {
  background: #8b5cf6;
  color: #ffffff;
}

.action-btn-delete {
  background: rgba(229, 26, 55, 0.05);
  color: var(--red-text);
  border-color: var(--red-border);
}

.action-btn-delete:hover {
  background: var(--accent);
  color: #ffffff;
}

.table-url {
  color: var(--accent-light);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 500;
}

.table-url:hover {
  color: var(--text);
  text-shadow: 0 0 5px var(--glow-accent);
}

.timer-badge {
  font-size: 10px;
  font-family: var(--font-mono);
  font-weight: 600;
  color: var(--muted);
  background: rgba(0, 0, 0, 0.2);
  padding: 4px 8px;
  border: 1px solid var(--border);
  white-space: nowrap;
}

.timer-expired {
  color: var(--red-text);
  background: var(--red-bg);
  border-color: var(--red-border);
}

/* ==========================================================================
   Modals
   ========================================================================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: var(--overlay-bg);
  backdrop-filter: blur(4px);
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.modal-overlay.open {
  display: flex;
  opacity: 1;
}

.modal {
  background: var(--surface-solid);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: 32px;
  max-width: 440px;
  width: 100%;
  text-align: center;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.9);
  transform: translateY(10px);
  transition: transform 0.2s ease;
  position: relative;
}

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

.modal h2 {
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 900;
  color: var(--text);
  text-transform: uppercase;
  margin-bottom: 12px;
  letter-spacing: 0.5px;
}

.modal p {
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 20px;
  line-height: 1.5;
}

.modal-cta {
  width: 100%;
  padding: 12px;
  background: var(--accent);
  border: 1px solid var(--accent-light);
  color: #ffffff;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 12px;
  cursor: pointer;
  transition: var(--transition-spring);
  text-transform: uppercase;
}

.modal-cta:hover {
  background: var(--accent-light);
  box-shadow: 0 0 10px var(--glow-accent);
}

.modal-close {
  font-size: 12px;
  color: var(--muted);
  cursor: pointer;
  background: none;
  border: none;
  font-weight: 600;
  text-decoration: underline;
  transition: var(--transition-fade);
}

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

/* ==========================================================================
   Admin Panel Management
   ========================================================================== */
#admin-panel {
  display: none;
}

#admin-panel.open {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
  gap: 24px;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 4px;
}

.stat-card {
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--border);
  padding: 14px 10px;
  text-align: center;
  box-shadow: var(--shadow-inset);
  transition: var(--transition-spring);
}

.stat-card:hover {
  border-color: var(--border-light);
  box-shadow: 0 5px 15px rgba(229, 26, 55, 0.1);
}

html[data-theme="light"] .stat-card {
  background: rgba(0, 0, 0, 0.02);
}

.stat-num {
  font-size: 24px;
  font-weight: 800;
  color: var(--accent-light);
  font-family: var(--font-mono);
}

.stat-lbl {
  font-size: 10px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  margin-top: 4px;
}

.field-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 4px;
  display: block;
}

/* Admin Pills */
.pill {
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  display: inline-block;
}

.pill-blue {
  background: var(--blue-bg);
  color: var(--blue-text);
  border: 1px solid var(--blue-border);
}

.pill-green {
  background: var(--green-bg);
  color: var(--green-text);
  border: 1px solid var(--green-border);
}

.pill-red {
  background: var(--red-bg);
  color: var(--red-text);
  border: 1px solid var(--red-border);
}

.pill-yellow {
  background: var(--yellow-bg);
  color: var(--yellow-text);
  border: 1px solid var(--yellow-border);
}

.bypass-badge {
  background: var(--green-bg);
  border: 1px dashed var(--green-border);
  padding: 12px;
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 700;
  color: var(--green-text);
  text-align: center;
}

.refresh-btn {
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  cursor: pointer;
  background: none;
  border: none;
  text-decoration: underline;
}

.refresh-btn:hover {
  color: var(--text);
}

.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--muted);
  margin-top: 16px;
  text-decoration: none;
}

.nav-link:hover {
  color: var(--text);
  text-decoration: underline;
}

.error-msg {
  background: var(--red-bg);
  border: 1px solid var(--red-border);
  color: var(--red-text);
  padding: 10px 14px;
  font-size: 12px;
  margin-bottom: 16px;
  display: none;
}

/* ==========================================================================
   Animations & Transitions
   ========================================================================== */
@keyframes spin-animation {
  to {
    transform: rotate(360deg);
  }
}

@keyframes pulse-animation {

  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }

  50% {
    opacity: 0.7;
    transform: scale(0.97);
  }
}

@keyframes pulse-dot-anim {
  0% {
    transform: scale(0.8);
    opacity: 0.5;
    box-shadow: 0 0 0 0 rgba(229, 26, 55, 0.7);
  }

  70% {
    transform: scale(1.2);
    opacity: 1;
    box-shadow: 0 0 0 6px rgba(229, 26, 55, 0);
  }

  100% {
    transform: scale(0.8);
    opacity: 0.5;
    box-shadow: 0 0 0 0 rgba(229, 26, 55, 0);
  }
}

.spinner {
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-top-color: var(--text);
  border-radius: 50%;
  animation: spin-animation 0.8s linear infinite;
  display: inline-block;
}

/* ==========================================================================
   Ekko Coin Badge Styling
   ========================================================================== */
.coin-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--surface-solid);
  border: 1px solid var(--border);
  padding: 4px 10px;
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--yellow-text);
  font-size: 12px;
  cursor: pointer;
  transition: var(--transition-spring);
}

.coin-badge:hover {
  border-color: var(--yellow-border);
  box-shadow: 0 0 8px rgba(245, 158, 11, 0.2);
}

.coin-icon {
  font-size: 14px;
}

.coin-amount {
  font-size: 12px;
  color: #ffffff;
  font-weight: 700;
}

.coin-name {
  font-size: 9px;
  opacity: 0.8;
}

html[data-theme="light"] .coin-amount {
  color: var(--text);
}

/* ==========================================================================
   Table Refresh Button
   ========================================================================== */
.refresh-btn-table {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px !important;
  font-size: 11px;
  background: var(--surface-solid);
  border: 1px solid var(--border);
  color: var(--muted);
  cursor: pointer;
  transition: var(--transition-spring);
  width: auto !important;
  flex: none;
}

.refresh-btn-table:hover {
  border-color: var(--border-light);
  color: var(--text);
  box-shadow: 0 0 8px rgba(229, 26, 55, 0.1);
}

.refresh-btn-table .refresh-icon-svg {
  width: 12px;
  height: 12px;
  stroke: currentColor;
}

/* Packages list */
.pkg-card {
  transition: var(--transition-spring);
  border-radius: var(--radius) !important;
}

.pkg-card:hover {
  background-color: rgba(229, 26, 55, 0.05) !important;
  border-color: var(--accent) !important;
  box-shadow: 0 0 10px rgba(229, 26, 55, 0.15);
}

/* Floating Toasts */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 10000;
  pointer-events: none;
}

.toast {
  background: var(--surface-solid);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 12px 18px;
  border-radius: var(--radius);
  font-size: 12px;
  font-weight: 700;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.7);
  transform: translateY(120%);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s;
  display: flex;
  align-items: center;
  gap: 8px;
  pointer-events: auto;
  opacity: 0;
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}

.toast.success {
  border-color: var(--green-border);
  color: var(--green-text);
}

.toast.error {
  border-color: var(--red-border);
  color: var(--red-text);
}