/* ==========================================================================
   FreeGamingTools - Master Stylesheet
   Theme: High-Performance Cyber Gaming (Dark & Light)
   Domain: https://techkiguide.online/
   Fully Responsive & Mobile-Optimized
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Root Variables & Color Schemes
   -------------------------------------------------------------------------- */
:root {
  /* Dark Gaming Theme (Default) */
  --bg-primary: #0a0b10;
  --bg-secondary: #121526;
  --bg-tertiary: #181c33;
  --bg-surface: #1e2442;
  --bg-card: rgba(18, 21, 38, 0.85);
  --bg-card-hover: rgba(26, 32, 58, 0.95);
  --bg-input: #121526;
  --bg-glass: rgba(18, 21, 38, 0.75);

  --border-color: rgba(0, 240, 255, 0.15);
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(0, 240, 255, 0.45);
  --border-pink: rgba(236, 72, 153, 0.3);

  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --text-inverse: #0a0b10;

  --neon-cyan: #00f0ff;
  --neon-blue: #3b82f6;
  --neon-purple: #a855f7;
  --neon-pink: #ec4899;
  --neon-green: #10b981;
  --neon-amber: #f59e0b;
  --neon-red: #ef4444;

  --gradient-neon: linear-gradient(135deg, #00f0ff 0%, #a855f7 50%, #ec4899 100%);
  --gradient-cyber: linear-gradient(135deg, #0f172a 0%, #1e1b4b 100%);
  --gradient-card: linear-gradient(180deg, rgba(255, 255, 255, 0.04) 0%, rgba(255, 255, 255, 0) 100%);

  --glow-cyan: 0 0 20px rgba(0, 240, 255, 0.35);
  --glow-pink: 0 0 20px rgba(236, 72, 153, 0.35);
  --glow-purple: 0 0 20px rgba(168, 85, 247, 0.35);
  --glow-gold: 0 0 20px rgba(245, 158, 11, 0.4);

  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.6);

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-full: 9999px;

  --font-sans: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: "Segoe UI", -apple-system, system-ui, sans-serif;

  --container-max: 1240px;
  --header-height: 70px;
  --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Light Mode Overrides */
[data-theme="light"] {
  --bg-primary: #f8fafc;
  --bg-secondary: #ffffff;
  --bg-tertiary: #f1f5f9;
  --bg-surface: #e2e8f0;
  --bg-card: rgba(255, 255, 255, 0.95);
  --bg-card-hover: #ffffff;
  --bg-input: #f8fafc;
  --bg-glass: rgba(255, 255, 255, 0.88);

  --border-color: rgba(2, 132, 199, 0.25);
  --border-subtle: #e2e8f0;
  --border-hover: rgba(2, 132, 199, 0.6);
  --border-pink: rgba(219, 39, 119, 0.4);

  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #64748b;
  --text-inverse: #ffffff;

  --neon-cyan: #0284c7;
  --neon-blue: #2563eb;
  --neon-purple: #7e22ce;
  --neon-pink: #db2777;

  --gradient-cyber: linear-gradient(135deg, #f8fafc 0%, #e0e7ff 100%);
  --glow-cyan: 0 4px 14px rgba(2, 132, 199, 0.2);
  --glow-pink: 0 4px 14px rgba(219, 39, 119, 0.2);
  --glow-purple: 0 4px 14px rgba(126, 34, 206, 0.2);
  --shadow-sm: 0 2px 6px rgba(15, 23, 42, 0.05);
  --shadow-md: 0 6px 18px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 12px 32px rgba(15, 23, 42, 0.12);
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  width: 100%;
  transition: background-color 0.3s ease, color 0.3s ease;
}

body.nav-locked {
  overflow: hidden !important;
}

/* Background Cyber Grid Pattern */
body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: 
    radial-gradient(circle at 15% 15%, rgba(0, 240, 255, 0.05) 0%, transparent 40%),
    radial-gradient(circle at 85% 85%, rgba(236, 72, 153, 0.05) 0%, transparent 40%),
    linear-gradient(rgba(255, 255, 255, 0.015) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.015) 1px, transparent 1px);
  background-size: 100% 100%, 100% 100%, 48px 48px, 48px 48px;
  pointer-events: none;
  z-index: -1;
}

[data-theme="light"] body::before {
  background-image: 
    radial-gradient(circle at 15% 15%, rgba(2, 132, 199, 0.05) 0%, transparent 40%),
    radial-gradient(circle at 85% 85%, rgba(219, 39, 119, 0.05) 0%, transparent 40%),
    linear-gradient(rgba(0, 0, 0, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 0, 0, 0.02) 1px, transparent 1px);
}

a {
  color: var(--neon-cyan);
  text-decoration: none;
  transition: var(--transition);
}

a:hover {
  color: var(--neon-pink);
}

img, svg {
  max-width: 100%;
  height: auto;
  vertical-align: middle;
}

button, input, select, textarea {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  border: none;
  background: none;
  touch-action: manipulation;
}

ul, ol {
  list-style: none;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.25;
  color: var(--text-primary);
}

h1 { font-size: clamp(1.85rem, 4vw + 1rem, 3.25rem); }
h2 { font-size: clamp(1.4rem, 2.5vw + 0.5rem, 2.25rem); }
h3 { font-size: clamp(1.15rem, 1.5vw + 0.25rem, 1.5rem); }

p {
  margin-bottom: 1rem;
  color: var(--text-secondary);
}

.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Accessibility */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

:focus-visible {
  outline: 2px solid var(--neon-cyan);
  outline-offset: 3px;
}

/* RTL Support */
[dir="rtl"] {
  direction: rtl;
  text-align: right;
}

[dir="rtl"] .breadcrumb li:not(:last-child)::after {
  content: "❮";
}

/* --------------------------------------------------------------------------
   3. Header & Navigation (Fully Responsive)
   -------------------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  width: 100%;
  height: var(--header-height);
  background-color: var(--bg-glass);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-color);
  z-index: 1000;
  transition: var(--transition);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  gap: 1rem;
}

.site-logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  flex-shrink: 0;
}

.site-logo img {
  height: 40px;
  width: auto;
  max-width: 210px;
  transition: transform 0.25s ease;
}

.site-logo:hover img {
  transform: scale(1.02);
}

/* Desktop Navigation */
.main-nav {
  display: flex;
  align-items: center;
}

.nav-list {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.nav-link {
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 0.95rem;
  padding: 0.5rem 0.25rem;
  position: relative;
  transition: var(--transition);
  white-space: nowrap;
}

.nav-link:hover, .nav-link.active {
  color: var(--neon-cyan);
}

.nav-link.active::after,
.nav-link:hover::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--gradient-neon);
  border-radius: var(--radius-full);
}

/* Nav Controls (Language, Theme, Mobile toggle) */
.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.lang-select-wrap {
  position: relative;
}

.lang-select {
  background-color: var(--bg-tertiary);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.45rem 1.8rem 0.45rem 0.75rem;
  font-size: 0.85rem;
  font-weight: 600;
  appearance: none;
  cursor: pointer;
  transition: var(--transition);
  max-width: 140px;
}

.lang-select:hover, .lang-select:focus {
  border-color: var(--neon-cyan);
  box-shadow: 0 0 10px rgba(0, 240, 255, 0.2);
}

.lang-select-wrap::after {
  content: "▼";
  font-size: 0.6rem;
  color: var(--neon-cyan);
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
}

[dir="rtl"] .lang-select-wrap::after {
  right: auto;
  left: 0.75rem;
}

.theme-toggle-btn {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-md);
  background-color: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  font-size: 1.1rem;
  cursor: pointer;
  flex-shrink: 0;
}

.theme-toggle-btn:hover {
  border-color: var(--neon-pink);
  color: var(--neon-pink);
  box-shadow: var(--glow-pink);
}

.mobile-nav-toggle {
  display: none;
  width: 38px;
  height: 38px;
  border-radius: var(--radius-md);
  background-color: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  cursor: pointer;
  flex-shrink: 0;
  transition: var(--transition);
}

/* Backdrop Overlay for Mobile Drawer */
.nav-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(5, 7, 12, 0.75);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 998;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.nav-backdrop.active {
  opacity: 1;
  pointer-events: auto;
}

/* Mobile & Tablet Drawer Breakpoint (<= 1080px) */
@media (max-width: 1080px) {
  .mobile-nav-toggle {
    display: inline-flex;
  }

  .main-nav {
    position: fixed;
    top: 0;
    right: 0;
    width: min(85vw, 340px);
    height: 100vh;
    height: 100dvh;
    background: rgba(14, 18, 36, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-left: 1px solid var(--border-color);
    box-shadow: -10px 0 40px rgba(0, 0, 0, 0.75);
    padding: calc(var(--header-height) + 1rem) 1.5rem 2.5rem;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
    z-index: 999;
  }

  [dir="rtl"] .main-nav {
    right: auto;
    left: 0;
    border-left: none;
    border-right: 1px solid var(--border-color);
    box-shadow: 10px 0 40px rgba(0, 0, 0, 0.75);
    transform: translateX(-100%);
  }

  .main-nav.open {
    transform: translateX(0);
  }

  .nav-list {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    gap: 0.5rem;
  }

  .nav-link {
    display: flex;
    align-items: center;
    font-size: 1.05rem;
    font-weight: 600;
    width: 100%;
    padding: 0.85rem 1rem;
    border-radius: var(--radius-md);
    border: 1px solid transparent;
    background-color: rgba(255, 255, 255, 0.02);
    transition: var(--transition);
  }

  .nav-link:hover, .nav-link.active {
    background-color: rgba(0, 240, 255, 0.08);
    border-color: var(--border-color);
    color: var(--neon-cyan);
    transform: translateX(4px);
  }

  [dir="rtl"] .nav-link:hover, [dir="rtl"] .nav-link.active {
    transform: translateX(-4px);
  }

  .nav-link.active::after, .nav-link:hover::after {
    display: none;
  }
}

/* --------------------------------------------------------------------------
   4. Buttons & Badges
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-md);
  transition: var(--transition);
  text-align: center;
  white-space: nowrap;
  min-height: 44px;
}

.btn-primary {
  background: var(--gradient-neon);
  color: #0a0b10;
  font-weight: 700;
  box-shadow: var(--glow-cyan);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 25px rgba(0, 240, 255, 0.6);
  color: #0a0b10;
}

.btn-outline {
  border: 1px solid var(--border-color);
  background-color: var(--bg-card);
  color: var(--text-primary);
}

.btn-outline:hover {
  border-color: var(--neon-cyan);
  color: var(--neon-cyan);
  box-shadow: var(--glow-cyan);
}

.btn-pink {
  background-color: var(--neon-pink);
  color: #ffffff;
}

.btn-pink:hover {
  background-color: #db2777;
  box-shadow: var(--glow-pink);
  color: #ffffff;
}

.btn-sm {
  padding: 0.45rem 0.9rem;
  font-size: 0.85rem;
  min-height: 36px;
}

.btn-block {
  width: 100%;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.badge-cyan {
  background-color: rgba(0, 240, 255, 0.12);
  color: var(--neon-cyan);
  border: 1px solid rgba(0, 240, 255, 0.3);
}

.badge-pink {
  background-color: rgba(236, 72, 153, 0.12);
  color: var(--neon-pink);
  border: 1px solid rgba(236, 72, 153, 0.3);
}

.badge-purple {
  background-color: rgba(168, 85, 247, 0.12);
  color: var(--neon-purple);
  border: 1px solid rgba(168, 85, 247, 0.3);
}

.badge-amber {
  background-color: rgba(245, 158, 11, 0.12);
  color: var(--neon-amber);
  border: 1px solid rgba(245, 158, 11, 0.3);
}

/* --------------------------------------------------------------------------
   5. Hero & Search Section
   -------------------------------------------------------------------------- */
.hero-section {
  padding: 4.5rem 0 3.5rem;
  text-align: center;
  position: relative;
}

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

.hero-headline {
  margin: 1.25rem 0 1rem;
  background: var(--gradient-neon);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 0 30px rgba(0, 240, 255, 0.15);
}

.hero-desc {
  font-size: 1.15rem;
  color: var(--text-secondary);
  margin-bottom: 2rem;
  line-height: 1.7;
}

.search-bar-wrap {
  position: relative;
  max-width: 580px;
  margin: 0 auto 2.5rem;
}

.search-input {
  width: 100%;
  padding: 1rem 1.25rem 1rem 3.25rem;
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  color: var(--text-primary);
  font-size: 1rem;
  transition: var(--transition);
  box-shadow: var(--shadow-md);
}

[dir="rtl"] .search-input {
  padding: 1rem 3.25rem 1rem 1.25rem;
}

.search-input:focus {
  border-color: var(--neon-cyan);
  box-shadow: var(--glow-cyan);
}

.search-icon {
  position: absolute;
  left: 1.25rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--neon-cyan);
  font-size: 1.2rem;
  pointer-events: none;
}

[dir="rtl"] .search-icon {
  left: auto;
  right: 1.25rem;
}

/* --------------------------------------------------------------------------
   6. Tool Cards & Grids
   -------------------------------------------------------------------------- */
.section {
  padding: 3.5rem 0;
}

.section-header {
  margin-bottom: 2.5rem;
  text-align: center;
}

.section-title {
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.section-subtitle {
  font-size: 1.05rem;
  color: var(--text-secondary);
  max-width: 640px;
  margin: 0 auto;
}

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

.tool-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 2rem;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(10px);
}

.tool-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: var(--gradient-neon);
  opacity: 0;
  transition: var(--transition);
}

.tool-card:hover {
  transform: translateY(-5px);
  border-color: var(--neon-cyan);
  box-shadow: var(--glow-cyan), var(--shadow-lg);
}

.tool-card:hover::before {
  opacity: 1;
}

.tool-card-icon {
  width: 58px;
  height: 58px;
  border-radius: var(--radius-md);
  background-color: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  margin-bottom: 1.25rem;
  color: var(--neon-cyan);
  transition: var(--transition);
}

.tool-card:hover .tool-card-icon {
  background-color: rgba(0, 240, 255, 0.1);
  border-color: var(--neon-cyan);
  transform: scale(1.08) rotate(3deg);
}

.tool-card-title {
  font-size: 1.35rem;
  margin-bottom: 0.75rem;
}

.tool-card-title a {
  color: var(--text-primary);
}

.tool-card-title a:hover {
  color: var(--neon-cyan);
}

.tool-card-desc {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 1.5rem;
  flex-grow: 1;
}

.tool-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 1rem;
  border-top: 1px solid var(--border-subtle);
  margin-top: auto;
}

.tool-card-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--neon-cyan);
}

.tool-card-link:hover {
  gap: 0.65rem;
  color: var(--neon-pink);
}

/* --------------------------------------------------------------------------
   7. Features & Value Props Section
   -------------------------------------------------------------------------- */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
}

.feature-box {
  background-color: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.75rem;
  transition: var(--transition);
}

.feature-box:hover {
  border-color: var(--border-color);
  transform: translateY(-3px);
}

.feature-icon {
  font-size: 2rem;
  color: var(--neon-pink);
  margin-bottom: 1rem;
}

.feature-title {
  font-size: 1.15rem;
  margin-bottom: 0.5rem;
}

/* --------------------------------------------------------------------------
   8. Steps / How It Works
   -------------------------------------------------------------------------- */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
  counter-reset: step-counter;
}

.step-card {
  position: relative;
  background-color: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 2rem 1.5rem;
  text-align: center;
}

.step-number {
  counter-increment: step-counter;
  width: 44px;
  height: 44px;
  margin: 0 auto 1.25rem;
  background: var(--gradient-neon);
  color: #0a0b10;
  font-weight: 900;
  font-size: 1.25rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* --------------------------------------------------------------------------
   9. AdSense Friendly Ad Slots
   -------------------------------------------------------------------------- */
.ad-slot-wrapper {
  margin: 2rem auto;
  text-align: center;
  max-width: 100%;
}

.ad-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 0.4rem;
  display: block;
}

.ad-slot {
  min-height: 90px;
  background-color: rgba(255, 255, 255, 0.02);
  border: 1px dashed var(--border-subtle);
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 0.85rem;
  padding: 1rem;
}

[data-theme="light"] .ad-slot {
  background-color: #f1f5f9;
}

/* --------------------------------------------------------------------------
   10. Breadcrumbs & Common Page Header
   -------------------------------------------------------------------------- */
.breadcrumb-nav {
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--border-subtle);
}

.breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  font-size: 0.875rem;
}

.breadcrumb li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.breadcrumb li:not(:last-child)::after {
  content: "›";
  color: var(--text-muted);
  font-size: 1rem;
}

.breadcrumb a {
  color: var(--text-secondary);
}

.breadcrumb a:hover {
  color: var(--neon-cyan);
}

.breadcrumb li[aria-current="page"] {
  color: var(--neon-cyan);
  font-weight: 600;
}

.page-header {
  padding: 2.5rem 0 2rem;
  text-align: center;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 2.5rem;
}

.page-title {
  margin-bottom: 0.75rem;
}

.page-subtitle {
  font-size: 1.1rem;
  color: var(--text-secondary);
  max-width: 760px;
  margin: 0 auto;
}

/* --------------------------------------------------------------------------
   11. Interactive Tool Containers & Elements
   -------------------------------------------------------------------------- */
.tool-stage {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 2.25rem;
  box-shadow: var(--shadow-lg);
  margin-bottom: 3rem;
  backdrop-filter: blur(12px);
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-label {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.form-control, .form-select {
  width: 100%;
  padding: 0.75rem 1rem;
  background-color: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 0.95rem;
  transition: var(--transition);
  min-height: 44px;
}

.form-control:focus, .form-select:focus {
  border-color: var(--neon-cyan);
  box-shadow: var(--glow-cyan);
  outline: none;
}

.form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
}

.tool-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 1.5rem;
  flex-wrap: wrap;
}

/* Alert Boxes / Disclaimers */
.alert-box {
  padding: 1.25rem;
  border-radius: var(--radius-md);
  border-left: 4px solid var(--neon-cyan);
  background-color: rgba(0, 240, 255, 0.05);
  margin: 1.5rem 0;
  font-size: 0.9rem;
  line-height: 1.6;
}

[dir="rtl"] .alert-box {
  border-left: none;
  border-right: 4px solid var(--neon-cyan);
}

.alert-box.alert-warning {
  border-color: var(--neon-amber);
  background-color: rgba(245, 158, 11, 0.08);
}

.alert-box.alert-pink {
  border-color: var(--neon-pink);
  background-color: rgba(236, 72, 153, 0.08);
}

/* --- Tool 1: PC Requirements Checker Specifics --- */
.gauge-card {
  text-align: center;
  padding: 2rem;
  border-radius: var(--radius-md);
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  margin-bottom: 1.5rem;
}

.score-display {
  font-size: 3.5rem;
  font-weight: 900;
  background: var(--gradient-neon);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1;
  margin: 0.5rem 0;
}

.progress-track {
  width: 100%;
  height: 12px;
  background-color: var(--bg-primary);
  border-radius: var(--radius-full);
  overflow: hidden;
  margin: 1rem 0;
  border: 1px solid var(--border-subtle);
}

.progress-bar-fill {
  height: 100%;
  background: var(--gradient-neon);
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.benchmarks-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem;
  margin-top: 1.5rem;
}

.benchmark-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  text-align: center;
}

.benchmark-card.highlight {
  border-color: var(--neon-cyan);
  box-shadow: var(--glow-cyan);
}

/* --- Tool 2: Character Name Generator Specifics --- */
.name-results-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr));
  gap: 1rem;
  margin: 1.75rem 0;
}

.name-badge-card {
  background-color: var(--bg-tertiary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  transition: var(--transition);
}

.name-badge-card:hover {
  border-color: var(--neon-cyan);
  transform: translateY(-2px);
}

.name-text {
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--text-primary);
  word-break: break-word;
}

.name-actions {
  display: flex;
  gap: 0.4rem;
  flex-shrink: 0;
}

.icon-btn {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  background-color: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  transition: var(--transition);
}

.icon-btn:hover {
  color: var(--neon-cyan);
  border-color: var(--neon-cyan);
}

.icon-btn.active {
  color: var(--neon-amber);
  border-color: var(--neon-amber);
}

.favorites-tray {
  margin-top: 2rem;
  padding: 1.5rem;
  background-color: var(--bg-surface);
  border-radius: var(--radius-md);
  border: 1px dashed var(--border-pink);
}

/* --- Tool 3: Wanted Level Simulator Specifics --- */
.stars-display {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(0.35rem, 2vw, 0.75rem);
  padding: 1.75rem 1rem;
  margin-bottom: 1.5rem;
  background-color: var(--bg-tertiary);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  width: 100%;
  overflow: hidden;
}

.star-icon {
  font-size: clamp(2rem, 7vw, 2.75rem);
  color: #334155;
  cursor: pointer;
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), color 0.2s ease;
  line-height: 1;
  user-select: none;
}

.star-icon.active {
  color: #facc15;
  text-shadow: 0 0 20px rgba(250, 204, 21, 0.7);
  animation: starPulse 1.2s infinite alternate;
}

@keyframes starPulse {
  0% { transform: scale(1); }
  100% { transform: scale(1.1); }
}

.siren-bar {
  height: 8px;
  width: 100%;
  border-radius: var(--radius-full);
  background: #334155;
  overflow: hidden;
  margin-bottom: 1.5rem;
}

.siren-bar.active {
  background: linear-gradient(90deg, #ef4444 0%, #3b82f6 50%, #ef4444 100%);
  background-size: 200% 100%;
  animation: sirenSweep 0.5s linear infinite;
}

@keyframes sirenSweep {
  0% { background-position: 0% 50%; }
  100% { background-position: 100% 50%; }
}

.police-scanner-box {
  background-color: #030712;
  border: 1px solid #1e293b;
  border-radius: var(--radius-md);
  padding: 1.25rem;
  font-family: monospace;
  color: #22c55e;
  min-height: 140px;
  max-height: 220px;
  overflow-y: auto;
  font-size: 0.85rem;
  line-height: 1.5;
  margin-top: 1.5rem;
}

/* --- Tool 4: Poster Maker Specifics --- */
.poster-workspace {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 2rem;
  align-items: start;
}

.canvas-preview-wrap {
  text-align: center;
  background-color: var(--bg-tertiary);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  border: 1px solid var(--border-color);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 380px;
}

#posterCanvas {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-sm);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7);
  display: block;
}

.controls-panel {
  background-color: var(--bg-surface);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  border: 1px solid var(--border-subtle);
  max-height: 600px;
  overflow-y: auto;
}

/* --- Tool 5: Quiz Specifics --- */
.quiz-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-subtle);
  flex-wrap: wrap;
  gap: 0.75rem;
}

.quiz-options-list {
  display: grid;
  gap: 0.85rem;
  margin: 1.75rem 0;
}

.quiz-option-btn {
  width: 100%;
  padding: 1.1rem 1.25rem;
  background-color: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  text-align: left;
  font-size: 1rem;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: space-between;
  word-break: break-word;
  min-height: 48px;
}

[dir="rtl"] .quiz-option-btn {
  text-align: right;
}

.quiz-option-btn:hover:not(:disabled) {
  background-color: rgba(0, 240, 255, 0.08);
  border-color: var(--neon-cyan);
}

.quiz-option-btn.correct {
  background-color: rgba(16, 185, 129, 0.15) !important;
  border-color: var(--neon-green) !important;
  color: var(--neon-green) !important;
  font-weight: 700;
}

.quiz-option-btn.wrong {
  background-color: rgba(239, 68, 68, 0.15) !important;
  border-color: var(--neon-red) !important;
  color: var(--neon-red) !important;
}

.quiz-feedback {
  padding: 1rem;
  border-radius: var(--radius-md);
  margin-top: 1rem;
  font-size: 0.95rem;
}

/* --- Tool 6: Money Calculator Specifics --- */
.finance-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1.25rem;
  margin-bottom: 2rem;
}

.stat-card {
  background-color: var(--bg-tertiary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  text-align: center;
}

.stat-label {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 0.35rem;
}

.stat-value {
  font-size: 1.75rem;
  font-weight: 800;
  line-height: 1.2;
}

.stat-value.positive { color: var(--neon-green); }
.stat-value.negative { color: var(--neon-red); }
.stat-value.neutral { color: var(--neon-cyan); }

.transactions-table-wrap {
  overflow-x: auto;
  margin: 1.5rem 0;
  -webkit-overflow-scrolling: touch;
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  min-width: 500px;
}

.table th, .table td {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--border-subtle);
  text-align: left;
}

[dir="rtl"] .table th, [dir="rtl"] .table td {
  text-align: right;
}

.table th {
  background-color: var(--bg-tertiary);
  color: var(--text-secondary);
  font-weight: 600;
}

/* --------------------------------------------------------------------------
   12. FAQ Accordion Component
   -------------------------------------------------------------------------- */
.faq-list {
  display: grid;
  gap: 1rem;
  max-width: 860px;
  margin: 0 auto;
}

.faq-item {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: var(--transition);
}

.faq-question {
  width: 100%;
  padding: 1.25rem 1.5rem;
  text-align: left;
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 50px;
}

[dir="rtl"] .faq-question {
  text-align: right;
}

.faq-question:hover {
  color: var(--neon-cyan);
}

.faq-icon {
  font-size: 1.25rem;
  color: var(--neon-cyan);
  transition: transform 0.25s ease;
  flex-shrink: 0;
}

.faq-item.active .faq-icon {
  transform: rotate(45deg);
  color: var(--neon-pink);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease, padding 0.35s ease;
  padding: 0 1.5rem;
}

.faq-item.active .faq-answer {
  max-height: 500px;
  padding: 0 1.5rem 1.25rem;
}

.faq-answer p {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.7;
}

/* --------------------------------------------------------------------------
   13. Content Pages (About, Policies, Contact)
   -------------------------------------------------------------------------- */
.prose {
  max-width: 860px;
  margin: 0 auto;
  font-size: 1.025rem;
  line-height: 1.8;
  color: var(--text-secondary);
}

.prose h2 {
  margin: 2.25rem 0 1rem;
  color: var(--text-primary);
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 0.5rem;
}

.prose h3 {
  margin: 1.75rem 0 0.75rem;
  color: var(--text-primary);
}

.prose ul, .prose ol {
  margin: 1rem 0 1.5rem 1.75rem;
  list-style: disc;
}

[dir="rtl"] .prose ul, [dir="rtl"] .prose ol {
  margin: 1rem 1.75rem 1.5rem 0;
}

.prose li {
  margin-bottom: 0.5rem;
}

.contact-card {
  max-width: 680px;
  margin: 0 auto;
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  box-shadow: var(--shadow-lg);
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  pointer-events: none;
}

[dir="rtl"] .toast-container {
  right: auto;
  left: 2rem;
}

.toast {
  background-color: var(--bg-secondary);
  color: var(--text-primary);
  border: 1px solid var(--neon-cyan);
  padding: 0.85rem 1.25rem;
  border-radius: var(--radius-md);
  box-shadow: var(--glow-cyan), var(--shadow-lg);
  font-size: 0.9rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  pointer-events: auto;
  animation: toastIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

/* --------------------------------------------------------------------------
   14. Footer
   -------------------------------------------------------------------------- */
.site-footer {
  margin-top: auto;
  background-color: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  padding: 4rem 0 2rem;
  position: relative;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1.2fr 1.2fr 1fr;
  gap: 2.5rem;
  margin-bottom: 3rem;
}

.footer-brand p {
  font-size: 0.9rem;
  line-height: 1.6;
  margin: 1rem 0 1.25rem;
}

.footer-heading {
  font-size: 1rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-primary);
  margin-bottom: 1.25rem;
  position: relative;
  display: inline-block;
}

.footer-heading::after {
  content: "";
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 28px;
  height: 2px;
  background: var(--neon-pink);
}

[dir="rtl"] .footer-heading::after {
  left: auto;
  right: 0;
}

.footer-links li {
  margin-bottom: 0.65rem;
}

.footer-links a {
  color: var(--text-secondary);
  font-size: 0.9rem;
  transition: var(--transition);
  display: inline-block;
}

.footer-links a:hover {
  color: var(--neon-cyan);
  transform: translateX(4px);
}

[dir="rtl"] .footer-links a:hover {
  transform: translateX(-4px);
}

.disclaimer-banner {
  background-color: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  font-size: 0.8rem;
  line-height: 1.6;
  color: var(--text-muted);
  margin-bottom: 2rem;
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-subtle);
  font-size: 0.85rem;
  color: var(--text-muted);
  flex-wrap: wrap;
  gap: 1rem;
}

/* --------------------------------------------------------------------------
   15. Advanced Responsive Breakpoints (Tablet & Mobile)
   -------------------------------------------------------------------------- */

/* Tablet Landscape & Compact Desktops (<= 992px) */
@media (max-width: 992px) {
  .poster-workspace {
    grid-template-columns: 1fr;
    gap: 1.75rem;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
  }
}

/* Standard Tablets & Large Phones (<= 768px) */
@media (max-width: 768px) {
  :root {
    --header-height: 64px;
  }

  .container {
    padding: 0 1.25rem;
  }

  .hero-section {
    padding: 3.5rem 0 2.5rem;
  }

  .contact-card {
    padding: 1.75rem;
  }

  .page-header {
    padding: 1.75rem 0 1.5rem;
    margin-bottom: 1.75rem;
  }

  .tool-stage {
    padding: 1.5rem;
    margin-bottom: 2rem;
  }
}

/* Standard Smartphones (<= 640px) */
@media (max-width: 640px) {
  .container {
    padding: 0 1rem;
  }

  .site-logo img {
    height: 32px;
    max-width: 155px;
  }

  .header-inner {
    gap: 0.4rem;
  }

  .nav-actions {
    gap: 0.35rem;
  }

  .lang-select {
    padding: 0.35rem 1.4rem 0.35rem 0.5rem;
    font-size: 0.78rem;
    max-width: 80px;
  }

  .theme-toggle-btn, .mobile-nav-toggle {
    width: 36px;
    height: 36px;
    font-size: 1rem;
  }

  .hero-section {
    padding: 2.75rem 0 2rem;
  }

  .hero-headline {
    font-size: clamp(1.75rem, 6vw, 2.25rem);
    margin: 1rem 0 0.75rem;
  }

  .hero-desc {
    font-size: 0.98rem;
    margin-bottom: 1.5rem;
  }

  .search-bar-wrap {
    margin-bottom: 1.75rem;
  }

  .search-input {
    padding: 0.8rem 1rem 0.8rem 2.75rem;
    font-size: 0.9rem;
  }

  [dir="rtl"] .search-input {
    padding: 0.8rem 2.75rem 0.8rem 1rem;
  }

  .tools-grid {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

  .tool-card {
    padding: 1.5rem;
  }

  .features-grid {
    grid-template-columns: 1fr;
  }

  .steps-grid {
    grid-template-columns: 1fr;
  }

  .form-row {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .tool-actions {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
  }

  .tool-actions .btn {
    width: 100%;
  }

  /* Tool 1: Requirements Checker */
  .benchmarks-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .score-display {
    font-size: 2.75rem;
  }

  /* Tool 2: Character Name Generator */
  .name-results-grid {
    grid-template-columns: 1fr;
  }

  .name-badge-card {
    padding: 0.85rem 1rem;
  }

  /* Tool 3: Wanted Level Simulator */
  .stars-display {
    padding: 1rem 0.35rem;
    gap: clamp(0.2rem, 1.8vw, 0.5rem);
  }

  .star-icon {
    font-size: clamp(1.8rem, 8vw, 2.5rem);
  }

  /* Tool 4: Poster Maker */
  .canvas-preview-wrap {
    padding: 0.75rem;
    min-height: 280px;
  }

  .controls-panel {
    padding: 1.25rem;
    max-height: none;
  }

  /* Tool 5: Quiz */
  .quiz-option-btn {
    padding: 0.9rem 1rem;
    font-size: 0.92rem;
  }

  /* Tool 6: Money Calculator */
  .finance-stats-grid {
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
  }

  .stat-card {
    padding: 0.85rem 0.5rem;
  }

  .stat-value {
    font-size: 1.25rem;
  }

  /* Footer */
  .site-footer {
    padding: 2.5rem 0 1.5rem;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
    gap: 0.75rem;
  }

  .toast-container {
    bottom: 1rem;
    right: 1rem;
    left: 1rem;
  }

  [dir="rtl"] .toast-container {
    left: 1rem;
    right: 1rem;
  }

  .toast {
    width: 100%;
    justify-content: center;
  }
}

/* Small Screen Smartphones (<= 380px) */
@media (max-width: 380px) {
  .site-logo img {
    height: 28px;
    max-width: 120px;
  }

  .lang-select {
    max-width: 66px;
    font-size: 0.72rem;
    padding: 0.25rem 1.1rem 0.25rem 0.35rem;
  }

  .star-icon {
    font-size: 1.6rem;
  }

  .finance-stats-grid {
    grid-template-columns: 1fr;
  }
}
