/* ==========================================================================
   DEWINDOWER - Modern Linux Gaming Readiness Scanner
   Design System & Theme
   ========================================================================== */

:root {
  --bg-main: #07090e;
  --bg-card: rgba(16, 22, 34, 0.75);
  --bg-card-hover: rgba(22, 30, 46, 0.9);
  --bg-elevated: #151d2c;
  --bg-input: rgba(10, 14, 22, 0.8);
  --border-color: rgba(255, 255, 255, 0.08);
  --border-color-focus: rgba(6, 182, 212, 0.6);
  --border-glow: rgba(6, 182, 212, 0.2);

  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;

  --accent-cyan: #06b6d4;
  --accent-cyan-glow: rgba(6, 182, 212, 0.3);
  --accent-emerald: #10b981;
  --accent-gold: #f59e0b;
  --accent-rose: #f43f5e;
  --accent-purple: #a855f7;

  /* Proton Tiers */
  --tier-native: #10b981;
  --tier-platinum: #06b6d4;
  --tier-gold: #f59e0b;
  --tier-silver: #94a3b8;
  --tier-bronze: #f97316;
  --tier-borked: #f43f5e;
  --tier-unrated: #64748b;

  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-heading: 'Outfit', 'Inter', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --radius-pill: 9999px;

  --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.6);
  --shadow-glow: 0 0 30px rgba(6, 182, 212, 0.15);

  --transition-fast: 0.15s ease;
  --transition-normal: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-smooth: 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
  scroll-behavior: smooth;
  color-scheme: dark;
}

body {
  background-color: var(--bg-main);
  color: var(--text-main);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.6;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Background Ambient Glow & Grid */
.bg-effects {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.glow-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.35;
  will-change: transform;
}

.glow-orb-1 {
  width: 600px;
  height: 600px;
  top: -150px;
  left: 10%;
  background: radial-gradient(circle, #06b6d4 0%, rgba(6, 182, 212, 0) 70%);
  animation: orb-pulse-1 12s ease-in-out infinite alternate;
}

.glow-orb-2 {
  width: 500px;
  height: 500px;
  top: 30%;
  right: 5%;
  background: radial-gradient(circle, #10b981 0%, rgba(16, 185, 129, 0) 70%);
  animation: orb-pulse-2 15s ease-in-out infinite alternate;
}

.glow-grid {
  position: absolute;
  inset: 0;
  background-image: 
    linear-gradient(to right, rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 40px 40px;
  mask-image: radial-gradient(ellipse 80% 50% at 50% 0%, #000 70%, transparent 100%);
}

@keyframes orb-pulse-1 {
  0% { transform: scale(1) translate(0, 0); }
  100% { transform: scale(1.15) translate(40px, 30px); }
}

@keyframes orb-pulse-2 {
  0% { transform: scale(1) translate(0, 0); }
  100% { transform: scale(1.2) translate(-50px, -20px); }
}

/* Layout Container */
.app-wrapper {
  position: relative;
  z-index: 1;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 24px 80px 24px;
}

/* Header */
.site-header {
  padding: 24px 0;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 40px;
}

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

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

.brand-icon {
  width: 44px;
  height: 44px;
  background: rgba(6, 182, 212, 0.1);
  border: 1px solid rgba(6, 182, 212, 0.3);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 20px rgba(6, 182, 212, 0.2);
}

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

.brand-title {
  font-family: var(--font-heading);
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 1px;
  color: #fff;
  background: linear-gradient(135deg, #ffffff 40%, #06b6d4 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand-badge {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--accent-emerald);
}

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

/* Hero Section */
.hero-section {
  text-align: center;
  margin-bottom: 48px;
}

.hero-content {
  max-width: 800px;
  margin: 0 auto 36px auto;
}

.hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  background: rgba(6, 182, 212, 0.08);
  border: 1px solid rgba(6, 182, 212, 0.25);
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 600;
  color: var(--accent-cyan);
  margin-bottom: 20px;
  letter-spacing: 0.4px;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  background-color: var(--accent-emerald);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--accent-emerald);
  animation: pulse-glow 2s infinite;
}

@keyframes pulse-glow {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.85); }
}

.hero-title {
  font-family: var(--font-heading);
  font-size: clamp(30px, 4.5vw, 48px);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.5px;
  margin-bottom: 18px;
}

.gradient-text {
  background: linear-gradient(135deg, #06b6d4 0%, #10b981 60%, #a855f7 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  font-size: clamp(15px, 2vw, 17px);
  color: var(--text-muted);
  max-width: 720px;
  margin: 0 auto;
}

.hero-subtitle strong {
  color: #fff;
  font-weight: 600;
}

/* Scanner Card & Tabs Navigation */
.scanner-card {
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: 24px;
  box-shadow: var(--shadow-lg), var(--shadow-glow);
  max-width: 960px;
  margin: 0 auto;
}

/* Responsive Grid Navigation - 100% visible, no horizontal scrollbars */
.input-tabs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  background: var(--bg-main);
  padding: 6px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  margin-bottom: 24px;
  overflow: visible;
}

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

@media (max-width: 520px) {
  .input-tabs {
    grid-template-columns: 1fr;
  }
}

.tab-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  transition: all var(--transition-normal);
  line-height: 1.3;
}

.tab-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.04);
}

.tab-btn.active {
  background: var(--bg-elevated);
  color: #fff;
  border: 1px solid rgba(6, 182, 212, 0.3);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
}

.tab-tag {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  background: rgba(16, 185, 129, 0.15);
  color: var(--accent-emerald);
  padding: 2px 6px;
  border-radius: var(--radius-pill);
  margin-left: 4px;
}

.tab-pane {
  display: none;
  animation: fadeIn 0.3s ease;
}

.tab-pane.active {
  display: block;
}

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

/* Input Form Controls */
.input-group {
  display: flex;
  align-items: center;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 6px 8px 6px 16px;
  gap: 12px;
  transition: all var(--transition-normal);
}

@media (max-width: 640px) {
  .input-group {
    flex-direction: column;
    align-items: stretch;
    padding: 12px;
  }
}

.input-group:focus-within {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.2);
}

.input-icon {
  color: var(--text-dim);
  display: flex;
  align-items: center;
}

.text-input {
  flex: 1;
  background: transparent;
  border: none;
  color: #fff;
  font-family: var(--font-sans);
  font-size: 15px;
  outline: none;
  padding: 10px 0;
  width: 100%;
}

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

.input-hint {
  margin-top: 14px;
  font-size: 12.5px;
  color: var(--text-dim);
  line-height: 1.5;
  text-align: left;
}

.input-hint strong {
  color: var(--text-muted);
}

.input-hint code {
  font-family: var(--font-mono);
  background: rgba(255, 255, 255, 0.08);
  padding: 2px 5px;
  border-radius: 4px;
  color: var(--accent-emerald);
}

/* Buttons */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: linear-gradient(135deg, #06b6d4 0%, #0284c7 100%);
  color: #fff;
  border: none;
  border-radius: var(--radius-md);
  padding: 12px 24px;
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.3px;
  cursor: pointer;
  transition: all var(--transition-normal);
  box-shadow: 0 4px 16px rgba(6, 182, 212, 0.35);
  white-space: nowrap;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 22px rgba(6, 182, 212, 0.5);
  filter: brightness(1.1);
}

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

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--bg-elevated);
  color: var(--text-main);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 10px 20px;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.15);
  color: #fff;
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.15);
}

.btn-sm {
  padding: 7px 14px;
  font-size: 12.5px;
}

/* VDF Dropzone */
.vdf-dropzone {
  border: 2px dashed rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-lg);
  padding: 36px 20px;
  text-align: center;
  background: rgba(0, 0, 0, 0.2);
  cursor: pointer;
  transition: all var(--transition-normal);
  position: relative;
}

.vdf-dropzone:hover, .vdf-dropzone.dragover {
  border-color: var(--accent-cyan);
  background: rgba(6, 182, 212, 0.05);
  box-shadow: 0 0 20px rgba(6, 182, 212, 0.15);
}

.file-hidden-input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.dropzone-icon {
  color: var(--accent-cyan);
  margin-bottom: 12px;
}

.dropzone-title {
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 8px;
}

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

.dropzone-desc code, .tools-item code {
  font-family: var(--font-mono);
  background: rgba(255, 255, 255, 0.08);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 12px;
  color: var(--accent-emerald);
}

.vdf-paste-container {
  margin-top: 18px;
}

.paste-details {
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  background: rgba(0, 0, 0, 0.2);
}

.paste-summary {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
}

.paste-inner {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.code-textarea {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 13px;
  padding: 12px;
  resize: vertical;
  outline: none;
}

.code-textarea:focus {
  border-color: var(--accent-cyan);
}

/* Presets Grid */
.presets-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

.preset-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 20px;
  cursor: pointer;
  transition: all var(--transition-normal);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  text-align: left;
}

.preset-card:hover {
  border-color: var(--accent-cyan);
  background: var(--bg-card-hover);
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5), 0 0 20px rgba(6, 182, 212, 0.2);
}

.preset-title {
  font-family: var(--font-heading);
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 6px;
}

.preset-desc {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 14px;
}

.preset-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  font-weight: 600;
  color: var(--accent-cyan);
}

.skeleton-card {
  height: 130px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.03) 25%, rgba(255, 255, 255, 0.08) 50%, rgba(255, 255, 255, 0.03) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Search Box & Autocomplete Results */
.search-results-grid {
  margin-top: 18px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 12px;
  max-height: 420px;
  overflow-y: auto;
}

.search-item-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 8px;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.search-item-card:hover {
  border-color: var(--accent-cyan);
  background: var(--bg-card-hover);
}

.search-item-banner {
  width: 90px;
  height: 42px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  background: #000;
}

.search-item-info {
  flex: 1;
  overflow: hidden;
}

.search-item-name {
  font-size: 13.5px;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.search-item-appid {
  font-size: 11px;
  font-family: var(--font-mono);
  color: var(--text-dim);
}

/* Progress Overlay */
.scan-progress-container {
  margin: 32px auto;
  max-width: 900px;
}

.progress-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  box-shadow: var(--shadow-md);
}

.progress-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 14px;
}

.progress-spinner {
  width: 24px;
  height: 24px;
  border: 3px solid rgba(6, 182, 212, 0.2);
  border-top-color: var(--accent-cyan);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

.progress-meta {
  flex: 1;
}

.progress-title {
  font-family: var(--font-heading);
  font-size: 16px;
  font-weight: 700;
  color: #fff;
}

.progress-status {
  font-size: 13px;
  color: var(--text-muted);
}

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

.progress-bar-bg {
  width: 100%;
  height: 8px;
  background: var(--bg-main);
  border-radius: var(--radius-pill);
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #06b6d4, #10b981);
  border-radius: var(--radius-pill);
  transition: width 0.3s ease;
}

/* Results Dashboard Header */
.results-section {
  margin-top: 48px;
  animation: fadeIn 0.4s ease;
}

.dashboard-header-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 16px 24px;
  margin-bottom: 24px;
}

.user-profile-badge {
  display: flex;
  align-items: center;
  gap: 14px;
}

.user-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 2px solid var(--accent-cyan);
  box-shadow: 0 0 12px rgba(6, 182, 212, 0.4);
}

.user-submeta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 2px;
}

.user-steam-id {
  font-size: 12px;
  font-family: var(--font-mono);
  color: var(--text-dim);
}

.scan-timestamp {
  font-size: 11px;
  font-weight: 600;
  color: var(--accent-emerald);
  background: rgba(16, 185, 129, 0.12);
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(16, 185, 129, 0.25);
}

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

/* KPI Scoreboard Grid */
.kpi-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr 1fr;
  gap: 18px;
  margin-bottom: 24px;
}

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

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

.kpi-card {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 22px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}

.kpi-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
}

.icon-cyan { background: rgba(6, 182, 212, 0.15); color: var(--accent-cyan); }
.icon-emerald { background: rgba(16, 185, 129, 0.15); color: var(--accent-emerald); }
.icon-rose { background: rgba(244, 63, 94, 0.15); color: var(--accent-rose); }

.kpi-value {
  font-family: var(--font-heading);
  font-size: 28px;
  font-weight: 800;
  line-height: 1.1;
  color: #fff;
  margin-bottom: 6px;
}

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

.kpi-subtitle {
  font-size: 12px;
  color: var(--text-dim);
  margin-top: 4px;
}

.text-emerald { color: var(--accent-emerald) !important; }

/* Big Readiness Gauge */
.readiness-gauge-card {
  flex-direction: row;
  align-items: center;
  gap: 20px;
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.1) 0%, rgba(16, 22, 34, 0.8) 100%);
  border-color: rgba(6, 182, 212, 0.25);
}

.gauge-ring-wrapper {
  position: relative;
  width: 100px;
  height: 100px;
  flex-shrink: 0;
}

.gauge-svg {
  transform: rotate(-90deg);
  width: 100%;
  height: 100%;
}

.gauge-bg-circle {
  stroke: rgba(255, 255, 255, 0.08);
}

.gauge-fg-circle {
  stroke: var(--accent-cyan);
  stroke-linecap: round;
  transition: stroke-dashoffset 1s ease-out;
}

.gauge-center-text {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.gauge-percent {
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 900;
  color: #fff;
  line-height: 1;
}

.gauge-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--accent-emerald);
  letter-spacing: 0.5px;
}

.gauge-info {
  flex: 1;
}

.gauge-title {
  font-family: var(--font-heading);
  font-size: 17px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 4px;
}

.gauge-desc {
  font-size: 12.5px;
  color: var(--text-muted);
  line-height: 1.4;
}

/* Tier Segmented Bar */
.tier-bar-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-bottom: 24px;
}

.tier-bar-title {
  font-family: var(--font-heading);
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 12px;
}

.tier-segmented-bar {
  height: 14px;
  background: var(--bg-main);
  border-radius: var(--radius-pill);
  display: flex;
  overflow: hidden;
  margin-bottom: 14px;
}

.tier-segment {
  height: 100%;
  transition: width 0.5s ease;
  position: relative;
}

.tier-segment:hover {
  filter: brightness(1.25);
}

.tier-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 12px;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text-muted);
}

.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

/* Toolbar & Filters */
.filter-toolbar {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 24px;
}

.search-filter-wrapper {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 8px 14px;
  color: var(--text-dim);
}

.search-filter-wrapper:focus-within {
  border-color: var(--accent-cyan);
}

.filter-search-input {
  flex: 1;
  background: transparent;
  border: none;
  color: #fff;
  font-size: 14px;
  outline: none;
}

.btn-clear-search {
  background: rgba(255, 255, 255, 0.08);
  border: none;
  color: var(--text-muted);
  width: 22px;
  height: 22px;
  border-radius: 50%;
  font-size: 13px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
  line-height: 1;
  padding: 0;
  flex-shrink: 0;
}

.btn-clear-search:hover {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
}

.filter-pills {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.filter-pill {
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-color);
  background: var(--bg-elevated);
  color: var(--text-muted);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.filter-pill:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.filter-pill.active {
  background: #fff;
  color: #000;
  border-color: #fff;
}

.pill-native.active { background: var(--tier-native); color: #fff; border-color: var(--tier-native); }
.pill-platinum.active { background: var(--tier-platinum); color: #000; border-color: var(--tier-platinum); }
.pill-gold.active { background: var(--tier-gold); color: #000; border-color: var(--tier-gold); }
.pill-silver.active { background: var(--tier-silver); color: #000; border-color: var(--tier-silver); }
.pill-bronze.active { background: var(--tier-bronze); color: #fff; border-color: var(--tier-bronze); }
.pill-borked.active { background: var(--tier-borked); color: #fff; border-color: var(--tier-borked); }
.pill-unrated.active { background: var(--tier-unrated); color: #fff; border-color: var(--tier-unrated); }
.pill-deck.active { background: var(--accent-emerald); color: #000; border-color: var(--accent-emerald); }
.pill-ac.active { background: var(--accent-rose); color: #fff; border-color: var(--accent-rose); }

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

.sort-wrapper {
  display: flex;
  align-items: center;
  gap: 8px;
}

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

.select-input {
  background: var(--bg-elevated);
  border: 1px solid var(--border-color);
  color: #fff;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  outline: none;
  cursor: pointer;
}

.view-toggle {
  display: flex;
  background: var(--bg-elevated);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.view-btn {
  background: transparent;
  border: none;
  color: var(--text-dim);
  padding: 6px 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.view-btn.active {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

/* Games Grid */
.games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 18px;
}

.game-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  position: relative;
  cursor: pointer;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: geometricPrecision;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.game-card:hover {
  border-color: rgba(6, 182, 212, 0.6);
  background: var(--bg-card-hover);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6), 0 0 25px rgba(6, 182, 212, 0.2);
}

.game-banner-wrap {
  position: relative;
  width: 100%;
  height: 130px;
  background: #0d111a;
  overflow: hidden;
}

.game-banner-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: filter 0.25s ease;
}

.game-card:hover .game-banner-img {
  filter: brightness(1.08);
}

.game-card-badges {
  position: absolute;
  top: 10px;
  left: 10px;
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  z-index: 2;
  pointer-events: none;
  user-select: none;
}

.badge-tier {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 3px 8px;
  border-radius: var(--radius-pill);
  color: #fff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.2);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: geometricPrecision;
  pointer-events: none;
  line-height: 1.4;
}

.badge-tier-native { background: #10b981; color: #fff; }
.badge-tier-platinum { background: #06b6d4; color: #000; }
.badge-tier-gold { background: #f59e0b; color: #000; }
.badge-tier-silver { background: #94a3b8; color: #000; }
.badge-tier-bronze { background: #f97316; color: #fff; }
.badge-tier-borked { background: #ef4444; color: #fff; }
.badge-tier-unrated { background: #64748b; color: #fff; }

.badge-deck {
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: var(--radius-pill);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(10, 14, 22, 0.94);
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.7);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: geometricPrecision;
  pointer-events: none;
  line-height: 1.4;
}

.badge-deck.verified { color: #10b981; border-color: rgba(16, 185, 129, 0.5); }
.badge-deck.playable { color: #f59e0b; border-color: rgba(245, 158, 11, 0.5); }
.badge-deck.unsupported { color: #ef4444; border-color: rgba(244, 63, 94, 0.5); }

.game-body {
  padding: 16px;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.game-title {
  font-family: var(--font-heading);
  font-size: 15.5px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 6px;
  line-height: 1.3;
}

.game-playtime {
  font-size: 12px;
  color: var(--text-dim);
  margin-bottom: 12px;
}

.game-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--border-color);
  padding-top: 12px;
  font-size: 12px;
}

.game-verdict-tag {
  font-weight: 600;
}

.badge-ac-alert {
  font-size: 11px;
  font-weight: 700;
  color: var(--accent-rose);
  background: rgba(244, 63, 94, 0.12);
  padding: 2px 6px;
  border-radius: var(--radius-pill);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* Games Table View */
.table-container {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow-x: auto;
}

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

.games-table th {
  background: var(--bg-elevated);
  color: var(--text-muted);
  font-weight: 700;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-color);
}

.games-table td {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-color);
  vertical-align: middle;
}

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

.table-game-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.table-game-banner {
  width: 60px;
  height: 28px;
  object-fit: cover;
  border-radius: 4px;
  background: #000;
}

/* Empty Filter State */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  background: var(--bg-card);
  border: 1px dashed var(--border-color);
  border-radius: var(--radius-lg);
  margin-top: 20px;
}

.empty-icon {
  font-size: 40px;
  margin-bottom: 14px;
}

/* Distros Guide Section */
.distros-section {
  margin-top: 80px;
  border-top: 1px solid var(--border-color);
  padding-top: 60px;
}

.section-header {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 48px auto;
}

.section-tag {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--accent-cyan);
  margin-bottom: 8px;
}

.section-title {
  font-family: var(--font-heading);
  font-size: 32px;
  font-weight: 800;
  color: #fff;
  margin-bottom: 12px;
}

.section-subtitle {
  color: var(--text-muted);
  font-size: 15px;
}

.distros-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
  margin-bottom: 36px;
}

.distro-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 28px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all var(--transition-normal);
}

.distro-card:hover {
  border-color: var(--accent-cyan);
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.distro-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}

.distro-logo-badge {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
}

.badge-cachy { background: rgba(6, 182, 212, 0.15); color: var(--accent-cyan); border: 1px solid rgba(6, 182, 212, 0.3); }
.badge-steamos { background: rgba(16, 185, 129, 0.15); color: var(--accent-emerald); border: 1px solid rgba(16, 185, 129, 0.3); }
.badge-nobara { background: rgba(168, 85, 247, 0.15); color: var(--accent-purple); border: 1px solid rgba(168, 85, 247, 0.3); }

.distro-type {
  font-size: 11.5px;
  color: var(--text-dim);
}

.distro-name {
  font-family: var(--font-heading);
  font-size: 20px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 10px;
}

.distro-desc {
  font-size: 13.5px;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 18px;
}

.distro-feature-list {
  list-style: none;
  margin-bottom: 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 12.5px;
  color: var(--text-main);
}

.distro-link {
  color: var(--accent-cyan);
  text-decoration: none;
  font-weight: 700;
  font-size: 13.5px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: gap var(--transition-fast);
}

.distro-link:hover {
  gap: 10px;
  text-decoration: underline;
}

/* Tools Card */
.tools-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 24px;
}

.tools-title {
  font-family: var(--font-heading);
  font-size: 17px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 18px;
}

.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

.tool-item {
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.tool-item strong {
  font-size: 13.5px;
  color: var(--accent-cyan);
}

.tool-item span {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.4;
}

/* Modals */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeIn 0.2s ease;
}

.modal-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: 28px;
  position: relative;
  width: 100%;
  max-width: 680px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
}

.modal-sm { max-width: 480px; }
.modal-md { max-width: 620px; }

.modal-close-btn {
  position: absolute;
  top: 18px;
  right: 18px;
  background: rgba(255, 255, 255, 0.08);
  border: none;
  color: var(--text-muted);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}

.modal-close-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
}

.modal-header-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-md);
  background: rgba(6, 182, 212, 0.12);
  color: var(--accent-cyan);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}

.modal-title {
  font-family: var(--font-heading);
  font-size: 20px;
  font-weight: 800;
  color: #fff;
  margin-bottom: 8px;
}

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

.form-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 20px;
}

.api-key-input-wrapper {
  display: flex;
  align-items: center;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 2px 10px 2px 14px;
  gap: 8px;
}

.api-key-input-wrapper:focus-within {
  border-color: var(--accent-cyan);
}

.masked-key-input {
  flex: 1;
  -webkit-text-security: disc;
  font-family: var(--font-mono);
  background: transparent;
  border: none;
  color: #fff;
  padding: 10px 0;
  font-size: 14px;
  outline: none;
}

.masked-key-input.revealed {
  -webkit-text-security: none;
}

.btn-toggle-mask {
  background: transparent;
  border: none;
  cursor: pointer;
  font-size: 14px;
  padding: 4px;
  color: var(--text-muted);
  transition: opacity var(--transition-fast);
}

.btn-toggle-mask:hover {
  opacity: 0.8;
}

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

.field-hint {
  font-size: 11.5px;
  color: var(--text-dim);
  line-height: 1.4;
}

.field-hint a {
  color: var(--accent-cyan);
  text-decoration: underline;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

/* Game Details Modal Body */
.game-modal-header {
  display: flex;
  gap: 16px;
  margin-bottom: 20px;
}

.game-modal-banner {
  width: 180px;
  height: 84px;
  object-fit: cover;
  border-radius: var(--radius-md);
}

.game-modal-title {
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 800;
  color: #fff;
  margin-bottom: 6px;
}

.game-modal-badges {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.detail-section {
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-bottom: 16px;
}

.detail-section-title {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--accent-cyan);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.launch-command-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-main);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  gap: 10px;
}

.launch-command-code {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--accent-emerald);
  overflow-x: auto;
  white-space: nowrap;
}

.btn-copy-sm {
  background: var(--bg-elevated);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  border-radius: 4px;
  padding: 4px 8px;
  font-size: 11px;
  cursor: pointer;
}

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

/* Footer */
.site-footer {
  margin-top: 80px;
  border-top: 1px solid var(--border-color);
  padding-top: 30px;
  text-align: center;
  color: var(--text-dim);
  font-size: 13px;
}

.footer-sub {
  margin-top: 6px;
  font-size: 12px;
}

.footer-sub a {
  color: var(--accent-cyan);
  text-decoration: none;
}

.footer-sub a:hover {
  text-decoration: underline;
}

/* Toast */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--bg-elevated);
  border: 1px solid var(--accent-cyan);
  color: #fff;
  padding: 12px 20px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  z-index: 200;
  font-size: 13.5px;
  font-weight: 600;
  animation: slideUp 0.25s ease;
}

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

.hidden {
  display: none !important;
}
