/* ==========================================================================
   STARNOVA DESIGN SYSTEM
   Developer-Focused, Dark Premium, Minimalist, High Density
   ========================================================================== */

:root {
  /* Color Palette - Dark Obsidian Charcoal */
  --bg-main: #0b0d10;
  --bg-surface: #111317;
  --bg-elevated: #16181e;
  --bg-hover: #1b1e25;
  --bg-active: #20242d;
  
  /* Borders */
  --border-subtle: #21252d;
  --border-default: #2a2f3a;
  --border-focus: #38bdf8;
  --border-hover: #384152;

  /* Typography */
  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-tertiary: #64748b;
  --text-muted: #475569;

  /* Accents */
  --accent-cyan: #38bdf8;
  --accent-cyan-dim: rgba(56, 189, 248, 0.12);
  --accent-cyan-border: rgba(56, 189, 248, 0.3);
  
  --accent-emerald: #10b981;
  --accent-emerald-dim: rgba(16, 185, 129, 0.12);
  --accent-emerald-border: rgba(16, 185, 129, 0.3);

  --accent-amber: #f59e0b;
  --accent-amber-dim: rgba(245, 158, 11, 0.12);
  --accent-amber-border: rgba(245, 158, 11, 0.3);

  --accent-purple: #a855f7;
  --accent-purple-dim: rgba(168, 85, 247, 0.12);
  --accent-purple-border: rgba(168, 85, 247, 0.3);

  --accent-red: #ef4444;
  --accent-red-dim: rgba(239, 68, 68, 0.12);
  --accent-red-border: rgba(239, 68, 68, 0.3);

  /* Geometry & Physics */
  --radius-sm: 4px;
  --radius-md: 6px;
  --radius-lg: 8px;
  --radius-pill: 9999px;

  /* Elevation */
  --shadow-subtle: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-card: 0 4px 12px rgba(0, 0, 0, 0.35);
  --shadow-dropdown: 0 10px 25px rgba(0, 0, 0, 0.5);

  /* Fonts */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', 'SF Mono', Menlo, Consolas, monospace;

  /* Transitions */
  --transition-fast: 120ms ease;
  --transition-normal: 180ms ease;
}

/* Reset & Base */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  background-color: var(--bg-main);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-color: var(--bg-main);
  color: var(--text-primary);
}

/* Typography Utilities */
.monospace {
  font-family: var(--font-mono) !important;
}

.text-emerald { color: var(--accent-emerald) !important; }
.text-cyan { color: var(--accent-cyan) !important; }
.text-amber { color: var(--accent-amber) !important; }
.text-red { color: var(--accent-red) !important; }
.text-magenta { color: #f472b6 !important; }
.text-purple { color: #c084fc !important; }
.font-bold { font-weight: 600 !important; }

/* Focus States */
:focus-visible {
  outline: 2px solid var(--accent-cyan);
  outline-offset: 2px;
}

/* ==========================================================================
   TOP NAVIGATION
   ========================================================================== */

.navbar {
  position: sticky;
  top: 0;
  z-index: 50;
  height: 52px;
  background-color: rgba(11, 13, 16, 0.94);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border-subtle);
}

.nav-container {
  max-width: 1280px;
  margin: 0 auto;
  height: 100%;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-left {
  display: flex;
  align-items: center;
  gap: 32px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--text-primary);
  letter-spacing: 0.04em;
  user-select: none;
}

.brand-glyph {
  color: var(--accent-cyan);
}

.brand-text {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.brand-badge {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  padding: 1px 6px;
  border-radius: var(--radius-sm);
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--accent-cyan);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-item {
  position: relative;
}

.nav-btn {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: color var(--transition-fast), background-color var(--transition-fast);
}

.nav-btn:hover {
  color: var(--text-primary);
  background-color: var(--bg-hover);
}

.nav-btn.active {
  color: var(--text-primary);
}

.chevron {
  transition: transform var(--transition-fast);
}

.nav-item.open .chevron {
  transform: rotate(180deg);
}

/* Dropdown Menu */
.dropdown-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  width: 280px;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-dropdown);
  padding: 6px;
  display: none;
  flex-direction: column;
  gap: 2px;
  z-index: 100;
}

.nav-item.open .dropdown-menu {
  display: flex;
}

.dropdown-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 8px 10px;
  background: none;
  border: none;
  border-radius: var(--radius-sm);
  text-align: left;
  cursor: pointer;
  color: var(--text-secondary);
  transition: all var(--transition-fast);
}

.dropdown-item:hover {
  background-color: var(--bg-hover);
  color: var(--text-primary);
}

.dropdown-item.active {
  background-color: var(--bg-elevated);
  color: var(--accent-cyan);
}

.dropdown-item svg {
  margin-top: 2px;
  flex-shrink: 0;
}

.dropdown-text {
  display: flex;
  flex-direction: column;
}

.dropdown-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
}

.dropdown-item.active .dropdown-title {
  color: var(--accent-cyan);
}

.dropdown-desc {
  font-size: 11px;
  color: var(--text-tertiary);
  margin-top: 2px;
}

/* Status Pill */
.engine-status {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 10px;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-pill);
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-secondary);
}

.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: var(--accent-emerald);
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.4);
}

/* ==========================================================================
   APP MAIN & VIEWS
   ========================================================================== */

.app-main {
  flex: 1;
  max-width: 1280px;
  width: 100%;
  margin: 0 auto;
  padding: 32px 20px 60px;
}

.tool-view {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

/* ==========================================================================
   HERO SECTION
   ========================================================================== */

.hero-section {
  padding: 8px 0 4px;
}

.hero-inner {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--accent-cyan);
  padding: 3px 8px;
  background-color: var(--accent-cyan-dim);
  border: 1px solid var(--accent-cyan-border);
  border-radius: var(--radius-sm);
}

.badge-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background-color: var(--accent-cyan);
}

.badge-dot.dot-cyan {
  background-color: var(--accent-cyan);
}

.hero-title {
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  line-height: 1.15;
}

.hero-subtitle {
  font-size: 16px;
  font-weight: 500;
  color: var(--text-secondary);
}

.hero-desc {
  font-size: 13.5px;
  color: var(--text-tertiary);
  max-width: 680px;
  line-height: 1.5;
}

/* Quick Presets */
.preset-group {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
  flex-wrap: wrap;
}

.preset-label {
  font-size: 12px;
  color: var(--text-tertiary);
  font-weight: 500;
}

.preset-pills {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.preset-pill {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-family: var(--font-mono);
  font-size: 12px;
  padding: 3px 8px;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.preset-pill:hover {
  background-color: var(--bg-hover);
  border-color: var(--border-hover);
  color: var(--text-primary);
}

/* ==========================================================================
   COOKIE CHECKER TOOL (URL INPUT)
   ========================================================================== */

.tool-section {
  width: 100%;
}

.tool-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  padding: 16px;
  box-shadow: var(--shadow-subtle);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.url-form {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
}

.input-wrapper {
  flex: 1;
  display: flex;
  align-items: center;
  background-color: var(--bg-main);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-sm);
  padding: 0 12px;
  height: 42px;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.input-wrapper:focus-within {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 1px var(--accent-cyan-border);
}

.input-prefix {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 13px;
  user-select: none;
  padding-right: 8px;
  border-right: 1px solid var(--border-subtle);
}

.url-input {
  flex: 1;
  background: none;
  border: none;
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 13.5px;
  padding-left: 10px;
  outline: none;
}

.url-input::placeholder {
  color: var(--text-muted);
}

.clear-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  transition: color var(--transition-fast);
}

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

/* Primary Button */
.primary-btn {
  height: 42px;
  padding: 0 18px;
  background-color: var(--accent-cyan);
  color: #04131f;
  border: none;
  border-radius: var(--radius-sm);
  font-family: var(--font-sans);
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  transition: background-color var(--transition-fast), transform 80ms ease, opacity var(--transition-fast);
  user-select: none;
}

.primary-btn:hover {
  background-color: #7dd3fc;
}

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

.primary-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.btn-spinner {
  display: none;
  animation: spin 700ms linear infinite;
}

.primary-btn.loading .btn-spinner {
  display: block;
}

.primary-btn.loading .btn-text,
.primary-btn.loading .kbd-hint {
  display: none;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.kbd-hint {
  font-family: var(--font-mono);
  font-size: 11px;
  opacity: 0.75;
  background: rgba(0, 0, 0, 0.15);
  padding: 1px 4px;
  border-radius: 3px;
}

/* Secondary & Text Buttons */
.secondary-btn {
  height: 34px;
  padding: 0 12px;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-default);
  color: var(--text-primary);
  border-radius: var(--radius-sm);
  font-size: 12.5px;
  font-weight: 500;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all var(--transition-fast);
}

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

.text-btn {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 12.5px;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color var(--transition-fast);
}

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

/* Loading State Hairline Strip */
.loading-state {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 4px;
}

.loading-bar-track {
  height: 2px;
  width: 100%;
  background-color: var(--bg-elevated);
  border-radius: 1px;
  overflow: hidden;
  position: relative;
}

.loading-bar-indeterminate {
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: 40%;
  background-color: var(--accent-cyan);
  animation: indeterminate 1.2s infinite ease-in-out;
}

@keyframes indeterminate {
  0% { left: -40%; width: 40%; }
  50% { left: 30%; width: 60%; }
  100% { left: 100%; width: 40%; }
}

.loading-details {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-tertiary);
}

/* ==========================================================================
   STATE PANELS (EMPTY, ERROR)
   ========================================================================== */

.state-panel {
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  background-color: var(--bg-surface);
  padding: 40px 24px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.state-icon-box {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background-color: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-tertiary);
}

.state-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
}

.state-desc {
  font-size: 13px;
  color: var(--text-secondary);
  max-width: 480px;
  line-height: 1.5;
}

/* Error State */
.error-state {
  border-color: var(--accent-red-border);
  background-color: rgba(239, 68, 68, 0.03);
  text-align: left;
  align-items: flex-start;
  padding: 24px;
  gap: 16px;
}

.error-header {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.error-icon-box {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background-color: var(--accent-red-dim);
  border: 1px solid var(--accent-red-border);
  color: var(--accent-red);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.error-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
}

.error-message {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 2px;
}

.error-causes {
  font-size: 12.5px;
  color: var(--text-secondary);
  padding-left: 50px;
}

.causes-title {
  font-weight: 500;
  color: var(--text-primary);
  display: block;
  margin-bottom: 6px;
}

.causes-list {
  padding-left: 18px;
  color: var(--text-tertiary);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.error-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-left: 50px;
  margin-top: 4px;
}

/* ==========================================================================
   RESULTS: SUMMARY METRICS CARDS
   ========================================================================== */

.success-state {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 10px;
}

@media (max-width: 1024px) {
  .summary-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 640px) {
  .summary-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.summary-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.summary-label {
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-tertiary);
}

.summary-value {
  font-family: var(--font-mono);
  font-size: 24px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.1;
}

.summary-sub {
  font-size: 11px;
  color: var(--text-muted);
}

.summary-card-score {
  border-color: var(--accent-cyan-border);
  background: linear-gradient(180deg, var(--bg-surface) 0%, rgba(56, 189, 248, 0.04) 100%);
}

.score-row {
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.score-grade {
  font-family: var(--font-mono);
  font-size: 26px;
  font-weight: 700;
  color: var(--accent-cyan);
}

.score-meta {
  display: flex;
  flex-direction: column;
}

.score-number {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
}

.score-status {
  font-size: 11px;
  color: var(--accent-emerald);
}

/* Target Metadata Strip */
.meta-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 8px 14px;
  font-size: 12px;
  gap: 12px;
  flex-wrap: wrap;
}

.meta-left {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}

.meta-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.meta-key {
  color: var(--text-tertiary);
}

.meta-val {
  color: var(--text-primary);
  font-weight: 500;
}

.meta-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.meta-btn {
  background: none;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 11.5px;
  font-weight: 500;
  padding: 4px 8px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: all var(--transition-fast);
}

.meta-btn:hover {
  background-color: var(--bg-hover);
  color: var(--text-primary);
  border-color: var(--border-hover);
}

/* ==========================================================================
   TOOLBAR & FILTERS
   ========================================================================== */

.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 4px;
}

.toolbar-left {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  flex: 1;
}

.search-box {
  position: relative;
  display: flex;
  align-items: center;
  width: 280px;
}

.search-box svg {
  position: absolute;
  left: 10px;
  color: var(--text-tertiary);
  pointer-events: none;
}

.search-box input {
  width: 100%;
  height: 32px;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-sm);
  padding: 0 64px 0 30px;
  font-family: var(--font-sans);
  font-size: 12.5px;
  color: var(--text-primary);
  outline: none;
  transition: border-color var(--transition-fast);
}

.search-box input:focus {
  border-color: var(--border-focus);
}

.search-count {
  position: absolute;
  right: 8px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--text-tertiary);
}

/* Category Filter Pills */
.category-tabs {
  display: flex;
  align-items: center;
  gap: 4px;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 2px;
}

.cat-pill {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 500;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all var(--transition-fast);
}

.cat-pill:hover {
  color: var(--text-primary);
  background-color: var(--bg-hover);
}

.cat-pill.active {
  background-color: var(--bg-elevated);
  color: var(--text-primary);
}

.cat-pill-count {
  font-family: var(--font-mono);
  font-size: 10.5px;
  padding: 0 4px;
  background-color: rgba(255, 255, 255, 0.06);
  border-radius: 2px;
  color: var(--text-secondary);
}

.indicator-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

.dot-essential { background-color: var(--accent-emerald); }
.dot-analytics { background-color: var(--accent-cyan); }
.dot-functional { background-color: var(--accent-purple); }
.dot-advertising { background-color: var(--accent-amber); }
.dot-unknown { background-color: var(--text-tertiary); }

/* Sort Toolbar */
.toolbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.sort-label {
  font-size: 12px;
  color: var(--text-tertiary);
}

.sort-select {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 12px;
  height: 32px;
  padding: 0 8px;
  outline: none;
  cursor: pointer;
}

/* ==========================================================================
   COOKIE RESULTS TABLE
   ========================================================================== */

.table-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  overflow: hidden;
}

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

.cookie-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 12.5px;
}

.cookie-table thead {
  background-color: var(--bg-elevated);
  border-bottom: 1px solid var(--border-default);
  user-select: none;
}

.cookie-table th {
  padding: 8px 12px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-secondary);
  white-space: nowrap;
  letter-spacing: 0.02em;
}

.cookie-table th.sortable {
  cursor: pointer;
}

.cookie-table th.sortable:hover {
  color: var(--text-primary);
}

.cookie-table td {
  padding: 9px 12px;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-primary);
  vertical-align: middle;
}

.cookie-table tbody tr.cookie-row {
  transition: background-color var(--transition-fast);
}

.cookie-table tbody tr.cookie-row:hover {
  background-color: var(--bg-hover);
}

.cookie-table tbody tr.cookie-row.expanded {
  background-color: var(--bg-elevated);
  border-bottom: none;
}

/* Column Widths & Layout */
.col-expand { width: 32px; text-align: center; }
.col-name { min-width: 170px; }
.col-cat { width: 110px; }
.col-domain { min-width: 140px; }
.col-path { width: 70px; }
.col-exp { min-width: 130px; }
.col-flag { width: 75px; text-align: center; }
.col-samesite { width: 90px; text-align: center; }
.col-value { min-width: 160px; }
.col-actions { width: 70px; text-align: right; }

/* Table Elements */
.cookie-name-cell {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-weight: 500;
}

.name-copy-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 2px;
  opacity: 0;
  transition: opacity var(--transition-fast), color var(--transition-fast);
}

.cookie-row:hover .name-copy-btn {
  opacity: 1;
}

.name-copy-btn:hover {
  color: var(--accent-cyan);
}

/* Category Badges */
.badge-cat {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 500;
  padding: 2px 7px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
}

.badge-cat.cat-Essential {
  background-color: var(--accent-emerald-dim);
  border-color: var(--accent-emerald-border);
  color: var(--accent-emerald);
}

.badge-cat.cat-Analytics {
  background-color: var(--accent-cyan-dim);
  border-color: var(--accent-cyan-border);
  color: var(--accent-cyan);
}

.badge-cat.cat-Functional {
  background-color: var(--accent-purple-dim);
  border-color: var(--accent-purple-border);
  color: var(--accent-purple);
}

.badge-cat.cat-Advertising {
  background-color: var(--accent-amber-dim);
  border-color: var(--accent-amber-border);
  color: var(--accent-amber);
}

.badge-cat.cat-Unknown {
  background-color: rgba(148, 163, 184, 0.08);
  border-color: rgba(148, 163, 184, 0.2);
  color: var(--text-secondary);
}

/* Boolean Flags */
.flag-badge {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: var(--radius-sm);
}

.flag-badge.yes {
  color: var(--accent-emerald);
  background-color: var(--accent-emerald-dim);
}

.flag-badge.no {
  color: var(--text-muted);
  background-color: rgba(255, 255, 255, 0.04);
}

.flag-badge.samesite {
  color: var(--text-secondary);
  background-color: var(--bg-hover);
  border: 1px solid var(--border-subtle);
}

/* Value Cell with Masked Reveal */
.value-cell {
  display: flex;
  align-items: center;
  gap: 6px;
}

.value-masked {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--text-secondary);
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.btn-icon {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 3px;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: color var(--transition-fast);
}

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

.expand-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform var(--transition-fast), color var(--transition-fast);
}

.cookie-row.expanded .expand-btn {
  transform: rotate(90deg);
  color: var(--accent-cyan);
}

/* Expanded Detail Row */
.cookie-detail-row {
  background-color: #0e1014;
  border-bottom: 1px solid var(--border-default);
}

.cookie-detail-box {
  padding: 14px 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.detail-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 16px;
}

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

.detail-header-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.detail-card-title {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-tertiary);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.raw-header-code {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--accent-cyan);
  background-color: var(--bg-main);
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  word-break: break-all;
  white-space: pre-wrap;
  line-height: 1.4;
  border: 1px solid var(--border-subtle);
}

.audit-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.4;
}

.audit-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  margin-top: 5px;
  flex-shrink: 0;
}

.table-empty {
  padding: 30px;
  text-align: center;
  color: var(--text-tertiary);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

/* ==========================================================================
   SESSION VALIDATOR VIEW (checker.py ENGINE)
   ========================================================================== */

.session-card {
  gap: 16px;
}

.session-mode-switch {
  display: flex;
  align-items: center;
  gap: 6px;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 10px;
}

.mode-tab {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.mode-tab:hover {
  color: var(--text-primary);
  background-color: var(--bg-hover);
}

.mode-tab.active {
  background-color: var(--bg-elevated);
  color: var(--accent-cyan);
}

.session-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.form-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-label {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-primary);
}

.label-desc {
  font-weight: 400;
  font-size: 11.5px;
  color: var(--text-tertiary);
  margin-left: 4px;
}

.form-textarea {
  width: 100%;
  background-color: var(--bg-main);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  color: var(--text-primary);
  font-size: 12.5px;
  outline: none;
  resize: vertical;
}

.form-textarea:focus {
  border-color: var(--border-focus);
}

.form-input {
  width: 100%;
  height: 36px;
  background-color: var(--bg-main);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-sm);
  padding: 0 10px;
  color: var(--text-primary);
  font-size: 12.5px;
  outline: none;
}

.form-input:focus {
  border-color: var(--border-focus);
}

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

.form-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

@media (max-width: 768px) {
  .form-grid-3, .form-grid-2 {
    grid-template-columns: 1fr;
  }
}

.form-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 4px;
}

.file-drop-area {
  border: 1px dashed var(--border-hover);
  border-radius: var(--radius-sm);
  padding: 24px;
  text-align: center;
  background-color: var(--bg-main);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--text-secondary);
  transition: all var(--transition-fast);
}

.file-drop-area:hover {
  border-color: var(--accent-cyan);
  color: var(--text-primary);
}

.file-input-hidden {
  display: none;
}

/* Session Result Display */
.account-card {
  background-color: var(--bg-main);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.account-header {
  display: flex;
  align-items: center;
  gap: 14px;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 12px;
}

.account-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background-color: var(--bg-elevated);
  border: 1px solid var(--border-default);
  object-fit: cover;
}

.account-titles {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  gap: 2px;
}

.account-name {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.account-meta {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-tertiary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

@media (max-width: 768px) {
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.stat-box {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.stat-label {
  font-size: 11px;
  text-transform: uppercase;
  color: var(--text-tertiary);
}

.stat-value {
  font-family: var(--font-mono);
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
}

.badge-status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
}

.badge-status.valid {
  color: var(--accent-emerald);
  background-color: var(--accent-emerald-dim);
  border: 1px solid var(--accent-emerald-border);
}

.badge-status.invalid {
  color: var(--accent-red);
  background-color: var(--accent-red-dim);
  border: 1px solid var(--accent-red-border);
}

.bulk-table-wrap {
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  background-color: var(--bg-surface);
  overflow-x: auto;
  margin-top: 8px;
}

.bulk-accounts-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
  text-align: left;
}

.bulk-accounts-table th {
  padding: 10px 14px;
  background-color: var(--bg-elevated);
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-bottom: 1px solid var(--border-subtle);
}

.bulk-accounts-table td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-primary);
  vertical-align: middle;
}

.bulk-accounts-table tr:hover td {
  background-color: var(--bg-hover);
}

.collectibles-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}

.collectible-tag {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 3px 8px;
  font-size: 11px;
  color: var(--text-secondary);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.collectible-rap {
  font-family: var(--font-mono);
  color: var(--accent-emerald);
  font-weight: 600;
}

/* ==========================================================================
   MODALS / DRAWERS (DOCS & ABOUT)
   ========================================================================== */

.modal-backdrop {
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-backdrop.open {
  display: flex;
}

.modal-dialog {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  width: 100%;
  max-width: 640px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-dropdown);
}

.modal-dialog-sm {
  max-width: 460px;
}

.modal-header {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-title-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.modal-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}

.modal-close-btn {
  background: none;
  border: none;
  color: var(--text-tertiary);
  font-size: 14px;
  cursor: pointer;
  padding: 4px;
  border-radius: var(--radius-sm);
  transition: color var(--transition-fast);
}

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

.modal-body {
  padding: 18px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
}

.doc-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.doc-heading {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 4px;
}

.doc-card {
  background-color: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.doc-card h4 {
  font-size: 12.5px;
  color: var(--text-primary);
}

.doc-card ul {
  padding-left: 18px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12px;
}

.inline-code {
  font-family: var(--font-mono);
  font-size: 12px;
  background-color: var(--bg-main);
  padding: 1px 5px;
  border-radius: 3px;
  color: var(--accent-cyan);
}

.doc-code {
  background-color: var(--bg-main);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--accent-emerald);
}

/* ==========================================================================
   TOAST NOTIFICATIONS
   ========================================================================== */

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

.toast {
  pointer-events: auto;
  background-color: var(--bg-elevated);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-sm);
  padding: 8px 14px;
  font-size: 12px;
  font-family: var(--font-mono);
  color: var(--text-primary);
  box-shadow: var(--shadow-card);
  animation: slideUp 180ms ease;
}

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

/* ==========================================================================
   FOOTER
   ========================================================================== */

.footer {
  border-top: 1px solid var(--border-subtle);
  padding: 20px 0;
  margin-top: auto;
  background-color: var(--bg-main);
}

.footer-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.footer-copy {
  font-size: 12px;
  color: var(--text-tertiary);
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 16px;
}

.footer-link {
  background: none;
  border: none;
  color: var(--text-tertiary);
  font-size: 12px;
  cursor: pointer;
  text-decoration: none;
  transition: color var(--transition-fast);
}

.footer-link:hover {
  color: var(--text-primary);
}

/* ==========================================================================
   COOKIE DETECTED BADGE & BANNER
   ========================================================================== */

.cookie-detected-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(90deg, rgba(56, 189, 248, 0.1) 0%, rgba(16, 185, 129, 0.08) 100%);
  border: 1px solid var(--accent-cyan-border);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  margin-top: 4px;
  animation: fadeInDown 200ms ease;
}

.detected-badge-inner {
  display: flex;
  align-items: center;
  gap: 8px;
}

.detected-icon {
  font-size: 16px;
  line-height: 1;
}

.detected-count {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 700;
  color: var(--accent-cyan);
}

.detected-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
}

.detected-meta {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--text-tertiary);
}

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

/* ==========================================================================
   REAL-TIME TERMINAL PROGRESS DASHBOARD (checker.py Style)
   ========================================================================== */

.terminal-dashboard {
  background-color: #0d0f14;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  box-shadow: var(--shadow-card);
  animation: fadeInDown 200ms ease;
}

.terminal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 10px;
}

.terminal-title-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.terminal-badge {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--accent-cyan);
  background: var(--accent-cyan-dim);
  border: 1px solid var(--accent-cyan-border);
  padding: 2px 7px;
  border-radius: var(--radius-sm);
  text-transform: uppercase;
}

.terminal-title {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-primary);
}

.terminal-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.stop-btn {
  background-color: var(--accent-red-dim);
  border: 1px solid var(--accent-red-border);
  color: var(--accent-red);
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 600;
  padding: 5px 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all var(--transition-fast);
}

.stop-btn:hover {
  background-color: var(--accent-red);
  color: #fff;
}

/* ASCII Progress Bar & Speed */
.progress-speed-box {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.progress-speed-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--accent-cyan);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.progress-bar-track-outer {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.progress-bar-track {
  height: 8px;
  background-color: var(--bg-main);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-pill);
  overflow: hidden;
  position: relative;
}

.progress-bar-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #38bdf8 0%, #10b981 100%);
  border-radius: var(--radius-pill);
  transition: width 150ms ease-out;
  box-shadow: 0 0 8px rgba(56, 189, 248, 0.4);
}

.ascii-progress-line {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.ascii-bar {
  color: var(--accent-emerald);
  letter-spacing: 1px;
}

.speed-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--text-secondary);
  border-top: 1px solid var(--border-subtle);
  padding-top: 8px;
}

.speed-meta-item {
  display: flex;
  align-items: center;
  gap: 4px;
}

.speed-val {
  color: var(--text-primary);
  font-weight: 600;
}

.speed-val-gold {
  color: var(--accent-amber);
  font-weight: 600;
}

/* Live Activity Strip */
.live-activity-strip {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 11.5px;
  gap: 12px;
  overflow: hidden;
}

.activity-left {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex: 1;
  overflow: hidden;
}

.activity-pulse {
  width: 6px;
  height: 6px;
  min-width: 6px;
  border-radius: 50%;
  background-color: var(--accent-cyan);
  box-shadow: 0 0 6px var(--accent-cyan);
  animation: pulse 1s infinite alternate;
  flex-shrink: 0;
}

@keyframes pulse {
  from { transform: scale(0.8); opacity: 0.6; }
  to { transform: scale(1.3); opacity: 1; }
}

.activity-user {
  color: var(--text-primary);
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 260px;
}

.activity-status {
  color: var(--text-tertiary);
  white-space: nowrap;
  flex-shrink: 0;
}

.activity-latest-valid {
  color: var(--accent-emerald);
  white-space: nowrap;
  font-weight: 500;
}

/* ==========================================================================
   CHECKED ACCOUNTS LIST BOX (Format: Avatar, Username, Status Valid)
   ========================================================================== */

.checked-accounts-box {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  margin-top: 14px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.checked-box-header {
  padding: 12px 18px;
  background-color: var(--bg-elevated);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

.checked-box-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-primary);
}

.checked-counter-pill {
  font-family: var(--font-mono);
  font-size: 11px;
  background-color: var(--bg-main);
  border: 1px solid var(--border-subtle);
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  color: var(--accent-cyan);
}

.checked-filter-group {
  display: flex;
  align-items: center;
  gap: 4px;
}

.filter-chip {
  background: none;
  border: 1px solid transparent;
  color: var(--text-tertiary);
  font-family: var(--font-sans);
  font-size: 11.5px;
  font-weight: 500;
  padding: 3px 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.filter-chip:hover {
  color: var(--text-primary);
  background-color: var(--bg-hover);
}

.filter-chip.active {
  color: var(--accent-cyan);
  background-color: var(--bg-main);
  border-color: var(--border-subtle);
}

.checked-accounts-scrollbox {
  max-height: 520px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 4px 0;
}

.checked-accounts-scrollbox::-webkit-scrollbar {
  width: 6px;
}

.checked-accounts-scrollbox::-webkit-scrollbar-thumb {
  background: var(--border-default);
  border-radius: var(--radius-pill);
}

/* Individual Checked Account Row */
.checked-account-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-subtle);
  gap: 16px;
  transition: background-color var(--transition-fast);
  animation: fadeInRow 180ms ease;
  min-width: 0;
  width: 100%;
  box-sizing: border-box;
}

.checked-account-row:hover {
  background-color: var(--bg-hover);
}

.checked-account-row.is-valid {
  border-left: 4px solid var(--accent-emerald);
}

.checked-account-row.is-invalid {
  border-left: 4px solid var(--border-subtle);
}

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

.account-head-avatar {
  width: 44px;
  height: 44px;
  min-width: 44px;
  border-radius: 50%;
  overflow: hidden;
  background-color: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
}

.account-head-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.account-user-info {
  display: flex;
  flex-direction: column;
  flex: 1 1 0%;
  min-width: 0;
  overflow: hidden;
  gap: 4px;
}

.account-username-line {
  display: flex;
  align-items: baseline;
  gap: 8px;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
}

.account-username {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
  max-width: 100%;
  display: inline-block;
  line-height: 1.3;
}

.account-displayname-sub {
  font-size: 11.5px;
  color: var(--text-tertiary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex-shrink: 1;
}

.account-sub-details {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 12px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--text-tertiary);
  margin-top: 2px;
  min-width: 0;
}

.account-sub-robux {
  color: var(--accent-cyan);
  font-weight: 600;
}

.account-sub-rap {
  color: var(--accent-emerald);
  font-weight: 600;
}

.account-status-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  flex-wrap: wrap;
  justify-content: flex-end;
}

@media (max-width: 768px) {
  .checked-account-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 14px;
  }
  .account-user-info {
    width: 100%;
  }
  .account-status-wrap {
    width: 100%;
    justify-content: flex-start;
    padding-top: 8px;
    border-top: 1px dashed var(--border-subtle);
  }
}

.terminal-metrics-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

@media (max-width: 640px) {
  .terminal-metrics-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 380px) {
  .terminal-metrics-grid {
    grid-template-columns: 1fr;
  }
}

.account-item-wrapper {
  display: flex;
  flex-direction: column;
  border-bottom: 1px solid var(--border-subtle);
}

.account-details-inline {
  display: none;
  background-color: var(--bg-main);
  border-top: 1px dashed var(--border-subtle);
  padding: 12px 14px;
  flex-direction: column;
  gap: 10px;
  animation: fadeInDown 150ms ease;
}

.account-details-inline.open {
  display: flex;
}

/* Game History Card & Badge Preview */
.game-history-preview {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
  margin-top: 4px;
}

.game-history-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: border-color var(--transition-fast);
}

.game-history-card.is-played {
  border-color: rgba(16, 185, 129, 0.4);
  background-color: rgba(16, 185, 129, 0.04);
}

.game-history-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.game-history-card-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.game-history-status-pill {
  font-size: 10px;
  font-family: var(--font-mono);
  font-weight: 600;
  padding: 1px 6px;
  border-radius: var(--radius-pill);
}

.game-history-status-pill.played {
  background-color: rgba(16, 185, 129, 0.15);
  color: var(--accent-emerald);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.game-history-status-pill.not-played {
  background-color: var(--bg-elevated);
  color: var(--text-tertiary);
  border: 1px solid var(--border-subtle);
}

.game-history-items-box {
  font-size: 11px;
  color: var(--text-secondary);
  font-family: var(--font-mono);
  line-height: 1.4;
  word-break: break-word;
}

.account-details-toggle {
  background: none;
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  padding: 4px 7px;
  cursor: pointer;
  font-size: 11px;
  font-family: var(--font-sans);
  display: flex;
  align-items: center;
  gap: 4px;
  transition: all var(--transition-fast);
}

.account-details-toggle:hover {
  background-color: var(--bg-hover);
  color: var(--text-primary);
  border-color: var(--border-hover);
}

.copy-pill-btn {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition-fast);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.copy-pill-btn:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
  border-color: var(--border-hover);
}

.full-cookie-box {
  background-color: #08090d;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1.45;
  color: var(--accent-cyan);
  word-break: break-all;
  white-space: pre-wrap;
  max-height: 120px;
  overflow-y: auto;
  user-select: all;
}

/* ==========================================================================
   COMPLETION & DOWNLOADABLE CARD
   ========================================================================== */

.completion-card {
  background: linear-gradient(180deg, rgba(16, 185, 129, 0.08) 0%, rgba(17, 19, 23, 0.95) 100%);
  border: 1px solid var(--accent-emerald-border);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  animation: fadeInDown 240ms ease;
}

.completion-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 10px;
}

.completion-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--accent-emerald);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.05em;
}

.completion-time {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-secondary);
}

.download-actions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 10px;
  margin-top: 4px;
}

.download-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 40px;
  font-size: 12.5px;
  font-weight: 600;
  border-radius: var(--radius-sm);
  cursor: pointer;
  text-decoration: none;
  transition: all var(--transition-fast);
}


/* ==========================================================================
   MOBILE RESPONSIVE SYSTEM (All Devices & Screen Sizes)
   ========================================================================== */

html, body {
  max-width: 100vw;
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
}

.mobile-menu-btn {
  display: none;
  background: none;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  cursor: pointer;
  padding: 6px;
  align-items: center;
  justify-content: center;
  transition: background-color var(--transition-fast);
}

.mobile-menu-btn:hover {
  background-color: var(--bg-hover);
}

.mobile-nav-dropdown {
  display: none;
  background-color: var(--bg-surface);
  border-bottom: 1px solid var(--border-default);
  box-shadow: var(--shadow-dropdown);
  padding: 8px 14px;
}

.mobile-nav-dropdown.open {
  display: block;
  animation: fadeInDown 160ms ease;
}

.mobile-nav-inner {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-width: 1280px;
  margin: 0 auto;
}

.mobile-nav-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: none;
  border: none;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-family: var(--font-sans);
  font-size: 13.5px;
  font-weight: 500;
  cursor: pointer;
  text-align: left;
  transition: all var(--transition-fast);
}

.mobile-nav-item:hover, .mobile-nav-item.active {
  background-color: var(--bg-elevated);
  color: var(--accent-cyan);
}

.mode-text-short {
  display: none;
}

/* Tablets & Small Desktops (<= 1024px) */
@media (max-width: 1024px) {
  .nav-left {
    gap: 16px;
  }
}

/* Mobile & Tablets (<= 768px) */
@media (max-width: 768px) {
  .desktop-nav {
    display: none !important;
  }

  .mobile-menu-btn {
    display: flex !important;
  }

  .nav-container {
    padding: 0 14px;
  }

  .app-main {
    padding: 18px 14px 40px;
  }

  .hero-title {
    font-size: 26px;
  }

  .hero-subtitle {
    font-size: 14.5px;
  }

  /* Prevent auto-zoom in iOS Safari */
  .form-input, .form-textarea, input, textarea {
    font-size: 16px !important;
  }

  .session-mode-switch {
    width: 100%;
    gap: 4px;
  }

  .mode-tab {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 12px;
    padding: 8px 6px;
    text-align: center;
  }

  .mode-text-full {
    display: none;
  }

  .mode-text-short {
    display: inline;
  }

  .form-actions {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    gap: 8px;
  }

  .form-actions .primary-btn,
  .form-actions .secondary-btn,
  .form-actions .text-btn {
    width: 100%;
    justify-content: center;
    height: 42px;
  }

  .modal-dialog {
    max-width: 95vw;
    margin: 10px auto;
  }

  .modal-body {
    padding: 14px;
  }
}

/* Standard Mobile Devices (<= 540px) */
@media (max-width: 540px) {
  .brand-badge {
    display: none !important;
  }

  .status-text {
    display: none !important;
  }

  .engine-status {
    padding: 6px;
  }

  .ascii-bar {
    display: none !important;
  }

  .speed-meta-row {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 8px;
  }

  .stats-grid {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 8px;
  }

  .stat-box {
    padding: 8px;
  }

  .stat-value {
    font-size: 14px;
    word-break: break-word;
  }

  .stat-label {
    font-size: 10px;
  }

  .live-activity-strip {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 4px !important;
    padding: 8px 10px;
  }

  .checked-box-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .checked-filter-group {
    width: 100%;
    justify-content: flex-start;
  }

  .checked-account-row {
    padding: 8px 10px;
    gap: 8px;
  }

  .account-head-avatar {
    width: 32px;
    height: 32px;
    min-width: 32px;
  }

  .account-username {
    font-size: 12px;
  }

  .account-sub-details {
    font-size: 10px;
    gap: 4px;
  }

  .account-status-wrap {
    gap: 4px;
  }

  .badge-status {
    font-size: 10px;
    padding: 2px 6px;
  }

  .download-actions-grid {
    grid-template-columns: 1fr !important;
  }

  .download-btn {
    width: 100%;
    justify-content: center;
    font-size: 12px;
    height: 42px;
  }

  .cookie-detected-banner {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }

  .account-header {
    flex-wrap: wrap;
    gap: 8px;
  }

  .account-header > div:last-child {
    width: 100%;
    margin-left: 0 !important;
    display: flex;
    justify-content: flex-start;
  }

  .detail-card-title {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }

  .detail-card-title > div {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
  }

  .detail-card-title .meta-btn {
    flex: 1;
    justify-content: center;
  }

  .footer-container {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 10px;
  }

  .footer-links {
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
  }
}

/* Extra Small Phones (<= 380px) */
@media (max-width: 380px) {
  .app-main {
    padding: 12px 8px 30px;
  }

  .tool-card {
    padding: 10px;
  }

  .hero-title {
    font-size: 22px;
  }

  .stats-grid {
    gap: 6px;
  }

  .stat-box {
    padding: 6px;
  }

  .stat-value {
    font-size: 12.5px;
  }
}
