/* ==========================================
   Logic Studies - Main Styles
   Design System & Global Variables
   ========================================== */

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

/* ── Focus-visible ring ─────────────────────────────────────────────────────
   Mouse users: no visible outline (browser default suppressed).
   Keyboard users: clear 2px ring so every interactive element is reachable. */
:focus {
  outline: none;
}
:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

/* Design Tokens */
:root {
  /* Colors - Status */
  --color-confirmed: #10b981;
  --color-confirmed-bg: rgba(16, 185, 129, 0.15);
  --color-eliminated: #ef4444;
  --color-eliminated-bg: rgba(239, 68, 68, 0.15);
  --color-undefined: #6b7280;
  --color-undefined-bg: rgba(107, 114, 128, 0.15);
  --color-highlight: #3b82f6;
  --color-highlight-bg: rgba(59, 130, 246, 0.15);

  /* Colors - UI */
  --color-primary: #6366f1;
  --color-primary-hover: #4f46e5;
  --color-accent: #8b5cf6;
  --color-accent-hover: #7c3aed;

  /* Colors - Background */
  --bg-primary: #0f172a;
  --bg-secondary: #1e293b;
  --bg-tertiary: #334155;
  --bg-card: rgba(30, 41, 59, 0.8);
  --bg-card-hover: rgba(51, 65, 85, 0.9);

  /* Colors - Text */
  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;

  /* Colors - Borders */
  --border-subtle: rgba(148, 163, 184, 0.1);
  --border-default: rgba(148, 163, 184, 0.2);
  --border-strong: rgba(148, 163, 184, 0.3);

  /* Typography */
  --font-family:
    "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-size-xs: 0.75rem;
  --font-size-sm: 0.875rem;
  --font-size-base: 1rem;
  --font-size-lg: 1.125rem;
  --font-size-xl: 1.25rem;
  --font-size-2xl: 1.5rem;
  --font-size-3xl: 2rem;

  /* Spacing */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;

  /* Border Radius */
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-2xl: 1.5rem;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.3);
  --shadow-glow: 0 0 20px rgba(99, 102, 241, 0.3);

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-base: 250ms ease;
  --transition-slow: 350ms ease;
}

/* Base Styles */
html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-family);
  font-size: var(--font-size-base);
  line-height: 1.6;
  color: var(--text-primary);
  background: linear-gradient(
    135deg,
    var(--bg-primary) 0%,
    var(--bg-secondary) 100%
  );
  min-height: 100vh;
}

/* App Container */
.app-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: var(--space-6);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Header */
.header {
  text-align: center;
  padding: var(--space-8) 0;
  margin-bottom: var(--space-8);
  border-bottom: 1px solid var(--border-subtle);
}

.logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  margin-bottom: var(--space-2);
}

.logo-icon {
  font-size: var(--font-size-3xl);
}

.logo h1 {
  font-size: var(--font-size-3xl);
  font-weight: 700;
  background: linear-gradient(
    135deg,
    var(--color-primary) 0%,
    var(--color-accent) 100%
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.tagline {
  color: var(--text-secondary);
  font-size: var(--font-size-lg);
}

/* Main Content */
.main-content {
  flex: 1;
}

/* Screen Management */
.screen {
  display: none;
}

.screen.active {
  display: block;
  animation: fadeIn var(--transition-base);
}

/* Section Title */
.section-title {
  font-size: var(--font-size-2xl);
  font-weight: 600;
  margin-bottom: var(--space-6);
  color: var(--text-primary);
}

/* Footer */
.footer {
  text-align: center;
  padding: var(--space-6) 0;
  margin-top: var(--space-8);
  border-top: 1px solid var(--border-subtle);
  color: var(--text-muted);
  font-size: var(--font-size-sm);
}

/* Utility Classes */
.hidden {
  display: none !important;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* Responsive */
@media (max-width: 768px) {
  .app-container {
    padding: var(--space-4);
  }

  .header {
    padding: var(--space-6) 0;
  }

  .logo h1 {
    font-size: var(--font-size-2xl);
  }

  .tagline {
    font-size: var(--font-size-base);
  }
}

@media (max-width: 480px) {
  .logo-icon {
    font-size: var(--font-size-2xl);
  }

  .logo h1 {
    font-size: var(--font-size-xl);
  }
}
