/* ==========================================================================
   eFootball™ Lab (efootball-lab.com) — Official Design System & Stylesheet
   Merging the acclaimed aesthetic of SKILLS_INFOGRAPHICS_GUIDE.html &
   STATS_INFOGRAPHICS_GUIDE.html with 100% Mobile Optimization and 18-Language Parity
   ========================================================================== */

:root {
  --bg-dark: #0a0d14;
  --bg-card: #111622;
  --bg-card-hover: #182032;
  --border-color: rgba(255, 255, 255, 0.08);
  --border-subtle: rgba(0, 242, 254, 0.15);
  --border-glow: rgba(0, 242, 254, 0.4);

  --accent-cyan: #06b6d4;
  --accent-purple: #a855f7;
  --accent-emerald: #10b981;
  --accent-rose: #f43f5e;
  --accent-amber: #f59e0b;
  --accent-blue: #3b82f6;

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

  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', Consolas, monospace;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-dark);
  color: var(--text-main);
  min-height: 100vh;
  overflow-x: hidden;
  background-image: 
    radial-gradient(circle at 15% 10%, rgba(6, 182, 212, 0.07) 0%, transparent 40%),
    radial-gradient(circle at 85% 60%, rgba(168, 85, 247, 0.07) 0%, transparent 40%),
    radial-gradient(circle at 50% 90%, rgba(16, 185, 129, 0.05) 0%, transparent 40%);
  background-attachment: fixed;
  line-height: 1.5;
}

.mono { font-family: var(--font-mono); }
.notranslate { translate: no; }

/* RTL Arabic Support */
html[dir="rtl"], body.rtl-mode {
  font-family: 'Noto Sans Arabic', 'Plus Jakarta Sans', sans-serif;
  direction: rtl;
  text-align: right;
}

html[dir="rtl"] .search-box input, body.rtl-mode .search-box input {
  padding: 0.85rem 2.85rem 0.85rem 1rem;
}
html[dir="rtl"] .search-icon, body.rtl-mode .search-icon {
  left: auto;
  right: 1rem;
}

/* RTL Family Borders */
body.rtl-mode .skill-card[data-family="Habilidades de tiro"] { border-left: 1px solid var(--border-color); border-right: 4px solid var(--accent-rose); }
body.rtl-mode .skill-card[data-family="Habilidades de pase"] { border-left: 1px solid var(--border-color); border-right: 4px solid var(--accent-emerald); }
body.rtl-mode .skill-card[data-family="Habilidades de regate"] { border-left: 1px solid var(--border-color); border-right: 4px solid var(--accent-cyan); }
body.rtl-mode .skill-card[data-family="Habilidades defensivas"] { border-left: 1px solid var(--border-color); border-right: 4px solid var(--accent-blue); }
body.rtl-mode .skill-card[data-family="Habilidades de portero"] { border-left: 1px solid var(--border-color); border-right: 4px solid var(--accent-amber); }
body.rtl-mode .skill-card[data-family="Habilidades de mentalidad"] { border-left: 1px solid var(--border-color); border-right: 4px solid var(--accent-purple); }
body.rtl-mode .condition-box { border-left: 1px solid rgba(6, 182, 212, 0.25); border-right: 3px solid var(--accent-cyan); }
body.rtl-mode .stat-summary-box { border-left: none; border-right: 3px solid var(--accent-cyan); }
body.rtl-mode .modal-close { right: auto; left: 1.5rem; }

/* ==========================================================================
   Top Header Navigation
   ========================================================================== */
.app-header {
  background: rgba(10, 13, 20, 0.96);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  padding: 1.5rem 1.5rem 1.25rem 1.5rem;
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-content {
  max-width: 1600px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 1rem;
}

.header-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
}

.header-logo-title-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.85rem;
  flex-wrap: wrap;
}

.brand-logo-wrap {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  filter: drop-shadow(0 0 12px rgba(0, 242, 254, 0.4));
}
.brand-logo-wrap:hover {
  transform: scale(1.08) rotate(3deg);
}

.brand-emblem-svg {
  width: 100%;
  height: 100%;
  display: block;
}

.brand-lab-badge {
  background: linear-gradient(135deg, #00f2fe 0%, #38bdf8 50%, #3b82f6 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: 950;
  letter-spacing: 0.05em;
  padding: 0 4px;
  position: relative;
  text-shadow: 0 0 20px rgba(0, 242, 254, 0.55);
}

.tm-sup {
  font-size: 0.52em;
  vertical-align: super;
  color: var(--accent-cyan);
  margin-left: 2px;
}

.brand-title {
  font-size: 2.15rem;
  font-weight: 900;
  letter-spacing: -0.025em;
  color: #fff;
  background: linear-gradient(135deg, #ffffff 30%, var(--accent-cyan) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin: 0;
  line-height: 1.2;
}

.brand-subtitle {
  font-size: 0.92rem;
  color: var(--text-muted);
  margin: 0;
  font-weight: 500;
  letter-spacing: 0.01em;
}

/* Module Nav Tabs */
.nav-container {
  display: flex;
  align-items: center;
  justify-content: center;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  list-style: none;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-color);
  border-radius: 9999px;
  padding: 4px;
}

.nav-tab-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  padding: 0.45rem 1.15rem;
  border-radius: 9999px;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  transition: all 0.2s;
  white-space: nowrap;
}

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

.nav-tab-btn.active {
  background: var(--accent-cyan);
  color: #000;
  box-shadow: 0 0 16px rgba(6, 182, 212, 0.35);
}

/* Header Controls Rows: Languages & Socials */
.header-controls-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.65rem;
  width: 100%;
}

.header-lang-row {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  width: 100%;
}

.quick-lang-group {
  display: flex;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 3px 6px;
  flex-wrap: wrap;
  gap: 3px;
  align-items: center;
  justify-content: center;
}

.flag-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 11px;
  border-radius: 2px;
  overflow: hidden;
  box-shadow: 0 0 1px rgba(0, 0, 0, 0.7), 0 1px 2px rgba(0, 0, 0, 0.4);
  flex-shrink: 0;
  line-height: 0;
  vertical-align: middle;
}
.flag-icon svg {
  width: 100%;
  height: 100%;
  display: block;
}

.quick-lang-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.22rem;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.2rem 0.35rem;
  border-radius: 5px;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
  flex-shrink: 0;
}
.quick-lang-btn:hover { color: #fff; background: rgba(255, 255, 255, 0.08); }
.quick-lang-btn.active {
  background: var(--accent-cyan);
  color: #000;
  font-weight: 800;
}
.quick-lang-btn.active .flag-icon {
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.4);
}

.header-actions-row {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.header-social-group {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
  justify-content: center;
}

.social-header-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.9rem;
  border-radius: 9999px;
  font-size: 0.78rem;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.2s ease;
  white-space: nowrap;
  border: 1px solid transparent;
}
.btn-tg-group {
  background: rgba(56, 189, 248, 0.15);
  color: #38bdf8;
  border-color: rgba(56, 189, 248, 0.35);
}
.btn-tg-group:hover {
  background: rgba(56, 189, 248, 0.28);
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(56, 189, 248, 0.25);
}
.btn-tg-user {
  background: rgba(96, 165, 250, 0.15);
  color: #93c5fd;
  border-color: rgba(96, 165, 250, 0.35);
}
.btn-tg-user:hover {
  background: rgba(96, 165, 250, 0.28);
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(96, 165, 250, 0.25);
}
.btn-paypal {
  background: rgba(0, 112, 186, 0.15);
  color: #60a5fa;
  border-color: rgba(0, 112, 186, 0.35);
}
.btn-paypal:hover {
  background: rgba(0, 112, 186, 0.28);
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(96, 165, 250, 0.3);
}

.btn-x {
  background: rgba(255, 255, 255, 0.08);
  color: #f8fafc;
  border-color: rgba(255, 255, 255, 0.22);
}
.btn-x:hover {
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.5);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(255, 255, 255, 0.18);
}

.social-icon {
  font-size: 0.88rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* ==========================================================================
   Module Header Banners
   ========================================================================== */
.module-header-banner {
  background: linear-gradient(135deg, rgba(14, 23, 42, 0.85) 0%, rgba(8, 14, 27, 0.95) 100%);
  border: 1px solid rgba(0, 242, 254, 0.18);
  border-left: 4px solid var(--accent-cyan);
  border-radius: 12px;
  padding: 1.25rem 1.75rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.45);
  position: relative;
  overflow: hidden;
}
.module-header-banner::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 280px;
  height: 100%;
  background: radial-gradient(circle at top right, rgba(0, 242, 254, 0.08) 0%, transparent 70%);
  pointer-events: none;
}
.module-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-cyan);
  margin-bottom: 0.35rem;
  font-family: var(--font-mono);
}
.pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent-cyan);
  box-shadow: 0 0 8px var(--accent-cyan);
  animation: pulseGlow 2s infinite ease-in-out;
}
@keyframes pulseGlow {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.85); }
}
.module-main-title {
  font-size: 1.45rem;
  font-weight: 900;
  color: #fff;
  letter-spacing: -0.02em;
  margin: 0 0 0.35rem 0;
  line-height: 1.25;
}
.module-lead-desc {
  font-size: 0.86rem;
  color: #94a3b8;
  margin: 0;
  line-height: 1.5;
  max-width: 1000px;
}

/* ==========================================================================
   Main Container & Section Modules
   ========================================================================== */
.app-main {
  max-width: 1600px;
  margin: 1.75rem auto 4rem auto;
  padding: 0 1.5rem;
}

.module-section {
  display: none;
  animation: fadeIn 0.24s ease-out;
}
.module-section.active {
  display: block;
}

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

/* Live Stats Summary Bar */
.stats-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.summary-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  backdrop-filter: blur(8px);
}

.summary-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  flex-shrink: 0;
}

.summary-val {
  font-size: 1.6rem;
  font-weight: 900;
  color: #fff;
  line-height: 1;
}

.summary-lbl {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

/* Filters & Toolbar */
.filters-bar, .toolbar-panel {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 1.25rem;
  margin-bottom: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  backdrop-filter: blur(8px);
}

.filters-top-row, .toolbar-row-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.search-box {
  flex: 1;
  min-width: 280px;
  position: relative;
}

.search-box input {
  width: 100%;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  padding: 0.85rem 1rem 0.85rem 2.85rem;
  color: #fff;
  font-size: 0.95rem;
  outline: none;
  transition: all 0.2s;
}

.search-box input:focus {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 16px rgba(6, 182, 212, 0.25);
}

.search-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 1.1rem;
  pointer-events: none;
}

.view-mode-toggle {
  display: inline-flex;
  background: rgba(30, 41, 59, 0.6);
  border: 1px solid var(--border-color);
  border-radius: 9999px;
  padding: 3px;
  gap: 2px;
}

.view-toggle-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  padding: 0.42rem 0.95rem;
  border-radius: 9999px;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: all 0.2s;
  white-space: nowrap;
}

.view-toggle-btn:hover {
  color: #fff;
}

.view-toggle-btn.active {
  background: var(--accent-cyan);
  color: #000;
  box-shadow: 0 0 14px rgba(6, 182, 212, 0.35);
}

.filter-pills-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.filter-btn, .filter-pill {
  background: rgba(30, 41, 59, 0.6);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  padding: 0.45rem 0.9rem;
  border-radius: 9999px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  transition: all 0.2s;
  white-space: nowrap;
}

.filter-btn:hover, .filter-pill:hover {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.2);
}

.filter-btn.active, .filter-pill.active {
  background: var(--accent-cyan);
  color: #000;
  font-weight: 800;
  border-color: var(--accent-cyan);
  box-shadow: 0 0 14px rgba(6, 182, 212, 0.35);
}

.filter-count {
  font-size: 0.7rem;
  padding: 0.1rem 0.45rem;
  border-radius: 9999px;
  background: rgba(0, 0, 0, 0.25);
  font-family: var(--font-mono);
}

.filter-btn.active .filter-count, .filter-pill.active .filter-count {
  background: rgba(0, 0, 0, 0.4);
  color: #fff;
}

/* ==========================================================================
   SKILLS CARDS GRID & COMPONENTS (Exact Match of SKILLS_INFOGRAPHICS_GUIDE.html)
   ========================================================================== */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 1.5rem;
}

.skill-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
}

.skill-card:hover {
  transform: translateY(-4px);
  background: var(--bg-card-hover);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
}

/* Family Accent Glow Borders */
.skill-card[data-family="Habilidades de tiro"] { border-left: 4px solid var(--accent-rose); }
.skill-card[data-family="Habilidades de pase"] { border-left: 4px solid var(--accent-emerald); }
.skill-card[data-family="Habilidades de regate"] { border-left: 4px solid var(--accent-cyan); }
.skill-card[data-family="Habilidades defensivas"] { border-left: 4px solid var(--accent-blue); }
.skill-card[data-family="Habilidades de portero"] { border-left: 4px solid var(--accent-amber); }
.skill-card[data-family="Habilidades de mentalidad"] { border-left: 4px solid var(--accent-purple); }

.card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
  gap: 0.5rem;
}

.family-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.35rem 0.65rem;
  border-radius: 8px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  line-height: 1.25;
}
.fam-tiro { background: rgba(244, 63, 94, 0.15); color: #fda4af; border: 1px solid rgba(244, 63, 94, 0.3); }
.fam-pase { background: rgba(16, 185, 129, 0.15); color: #6ee7b7; border: 1px solid rgba(16, 185, 129, 0.3); }
.fam-regate { background: rgba(6, 182, 212, 0.15); color: #67e8f9; border: 1px solid rgba(6, 182, 212, 0.3); }
.fam-defensivas { background: rgba(59, 130, 246, 0.15); color: #93c5fd; border: 1px solid rgba(59, 130, 246, 0.3); }
.fam-portero { background: rgba(245, 158, 11, 0.15); color: #fde68a; border: 1px solid rgba(245, 158, 11, 0.3); }
.fam-mentalidad { background: rgba(168, 85, 247, 0.15); color: #d8b4fe; border: 1px solid rgba(168, 85, 247, 0.3); }

.id-badge {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--accent-cyan);
  background: rgba(6, 182, 212, 0.15);
  border: 1px solid rgba(6, 182, 212, 0.3);
  padding: 0.2rem 0.5rem;
  border-radius: 6px;
}

.tier-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 0.3rem 0.7rem;
  border-radius: 6px;
  text-align: center;
}
.tier-st { background: linear-gradient(135deg, #eab308, #ca8a04); color: #000; }
.tier-std { background: rgba(100, 116, 139, 0.3); color: #cbd5e1; border: 1px solid rgba(100, 116, 139, 0.3); }
.tier-unreleased { background: linear-gradient(135deg, #475569, #334155); color: #f1f5f9; border: 1px solid rgba(255, 255, 255, 0.18); box-shadow: 0 0 10px rgba(71, 85, 105, 0.35); }
.tier-proto { background: rgba(14, 165, 233, 0.15); color: #38bdf8; border: 1px solid rgba(14, 165, 233, 0.35); }

.skill-thumb-banner {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  overflow: hidden;
  margin-top: 0.5rem;
  margin-bottom: 0.85rem;
  background: transparent;
  border: none;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
  position: relative;
}
.skill-banner-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border: none;
}

.skill-title-block {
  margin-bottom: 0.85rem;
}
.skill-name {
  font-size: 1.15rem;
  font-weight: 800;
  color: #fff;
  line-height: 1.25;
  margin-bottom: 0.2rem;
}
.skill-subname {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 0;
  font-family: var(--font-mono);
}

.condition-box {
  background: rgba(6, 182, 212, 0.08);
  border: 1px solid rgba(6, 182, 212, 0.25);
  border-left: 3px solid var(--accent-cyan);
  border-radius: 10px;
  padding: 0.65rem 0.85rem;
  margin-bottom: 0.75rem;
  font-size: 0.825rem;
  line-height: 1.45;
}
.condition-label {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.7rem;
  font-weight: 800;
  color: var(--accent-cyan);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.25rem;
}
.condition-text {
  color: #e2e8f0;
  font-weight: 500;
}

.desc-box {
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  padding: 0.85rem;
  margin-bottom: 0.75rem;
  font-size: 0.85rem;
  line-height: 1.5;
  color: #e2e8f0;
}

.tactical-box {
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.2);
  border-radius: 12px;
  padding: 0.85rem;
  margin-bottom: 0.75rem;
  font-size: 0.825rem;
  line-height: 1.45;
}
.tactical-label {
  font-size: 0.7rem;
  font-weight: 800;
  color: var(--accent-emerald);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.25rem;
}
.tactical-text { color: #cbd5e1; }

.effect-badge-row {
  margin-bottom: 1rem;
}
.effect-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: rgba(6, 182, 212, 0.12);
  border: 1px solid rgba(6, 182, 212, 0.3);
  color: #67e8f9;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 0.35rem 0.65rem;
  border-radius: 8px;
}

/* Forensic View Elements */
.tokens-pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.85rem;
}
.token-pill {
  font-size: 0.7rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 0.2rem 0.45rem;
  border-radius: 6px;
  color: #94a3b8;
  font-family: var(--font-mono);
}
.param-pill {
  font-size: 0.7rem;
  background: rgba(168, 85, 247, 0.1);
  border: 1px solid rgba(168, 85, 247, 0.25);
  padding: 0.2rem 0.45rem;
  border-radius: 6px;
  color: #d8b4fe;
  font-family: var(--font-mono);
}

.mech-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.2rem 0.55rem;
  border-radius: 6px;
  margin-bottom: 1rem;
}
.mech-STAT_INJECTION { background: rgba(6, 182, 212, 0.15); color: #67e8f9; border: 1px solid rgba(6, 182, 212, 0.3); }
.mech-KINEMATIC_PHYSICS { background: rgba(245, 158, 11, 0.15); color: #fde68a; border: 1px solid rgba(245, 158, 11, 0.3); }
.mech-BLEND_TREE_ANIMATION { background: rgba(16, 185, 129, 0.15); color: #6ee7b7; border: 1px solid rgba(16, 185, 129, 0.3); }
.mech-GAME_STATE_MODIFIER { background: rgba(168, 85, 247, 0.15); color: #d8b4fe; border: 1px solid rgba(168, 85, 247, 0.3); }
.mech-INTER_ACTOR_TAG { background: rgba(236, 72, 153, 0.15); color: #f472b6; border: 1px solid rgba(236, 72, 153, 0.3); }

.spec-box {
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  padding: 0.85rem;
  margin-bottom: 0.75rem;
  font-size: 0.825rem;
  line-height: 1.45;
}
.spec-label {
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.25rem;
}
.spec-text { color: #e2e8f0; }
.spec-formula {
  font-family: var(--font-mono);
  color: #67e8f9;
  font-size: 0.85rem;
  font-weight: 700;
  word-break: break-word;
}

.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 0.85rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  margin-top: auto;
}
.btn-card-detail {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.4rem 0.85rem;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-card-detail:hover {
  background: var(--accent-cyan);
  color: #000;
  box-shadow: 0 0 12px rgba(6, 182, 212, 0.4);
}

/* ==========================================================================
   STATS CARDS GRID & COMPONENTS (Exact Match of STATS_INFOGRAPHICS_GUIDE.html)
   ========================================================================== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.25rem;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
}

.stat-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-glow);
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0, 242, 254, 0.12);
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.category-badge {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding: 0.2rem 0.55rem;
  border-radius: 6px;
}
.category-attack { background: rgba(239, 68, 68, 0.15); color: #f87171; border: 1px solid rgba(239, 68, 68, 0.3); }
.category-defence { background: rgba(56, 189, 248, 0.15); color: #38bdf8; border: 1px solid rgba(56, 189, 248, 0.3); }
.category-strength { background: rgba(16, 185, 129, 0.15); color: #34d399; border: 1px solid rgba(16, 185, 129, 0.3); }

.target-badge {
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--accent-cyan);
  background: rgba(6, 182, 212, 0.1);
  border: 1px solid rgba(6, 182, 212, 0.25);
  padding: 0.2rem 0.55rem;
  border-radius: 6px;
  font-family: var(--font-mono);
}

.stat-identity {
  margin-bottom: 0.75rem;
}
.stat-name {
  font-size: 1.15rem;
  font-weight: 800;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 0.45rem;
}
.stat-token {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
  margin-top: 0.15rem;
}

.stat-summary-box {
  font-size: 0.82rem;
  color: #cbd5e1;
  background: rgba(7, 13, 25, 0.6);
  border-left: 3px solid var(--accent-cyan);
  padding: 0.55rem 0.75rem;
  border-radius: 4px;
  margin-bottom: 0.85rem;
  line-height: 1.45;
}

.stat-mechanic-box {
  font-size: 0.76rem;
  color: #94a3b8;
  display: flex;
  align-items: flex-start;
  gap: 0.4rem;
  margin-bottom: 1rem;
}

.btn-detail {
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.15), rgba(56, 189, 248, 0.25));
  border: 1px solid var(--accent-cyan);
  color: #fff;
  padding: 0.45rem 0.85rem;
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-detail:hover {
  background: var(--accent-cyan);
  color: #060b14;
  box-shadow: 0 0 12px rgba(6, 182, 212, 0.4);
}

/* ==========================================================================
   Comparative Tables View
   ========================================================================== */
.skills-table-wrap, .table-container, .table-responsive {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  overflow-x: auto;
  backdrop-filter: blur(8px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.skills-table, .forensic-table, .data-table {
  width: 100%;
  min-width: 900px;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.85rem;
}

body.rtl-mode .skills-table, body.rtl-mode .forensic-table, body.rtl-mode .data-table {
  text-align: right;
}

.skills-table th, .forensic-table th, .data-table th {
  background: rgba(15, 23, 42, 0.95);
  padding: 0.85rem 1rem;
  color: var(--accent-cyan);
  font-weight: 700;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 1px solid var(--border-color);
  white-space: nowrap;
}

.skills-table td, .forensic-table td, .data-table td {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  color: #e2e8f0;
  vertical-align: middle;
}

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

/* ==========================================================================
   Interactive Modals & Lightbox
   ========================================================================== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}
.modal-backdrop.show, .modal-backdrop.active {
  display: flex;
}

/* Skills Modal Box */
.modal-box {
  background: #0f172a;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 24px;
  max-width: 900px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  padding: 2rem;
  position: relative;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.6);
}

.modal-close {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  background: rgba(255, 255, 255, 0.05);
  border: none;
  color: #fff;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 1.25rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  z-index: 10;
}
.modal-close:hover { background: rgba(244, 63, 94, 0.3); color: #fda4af; }

/* Stats Modal Dialog */
.modal-dialog {
  background: #090f1d;
  border: 1px solid var(--border-glow);
  border-radius: 16px;
  width: 100%;
  max-width: 1100px;
  max-height: 92vh;
  overflow-y: auto;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8), 0 0 30px rgba(6, 182, 212, 0.2);
  display: flex;
  flex-direction: column;
}

.modal-header {
  background: rgba(15, 23, 42, 0.95);
  border-bottom: 1px solid var(--border-subtle);
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 10;
}

.modal-close-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.6rem;
  cursor: pointer;
  transition: all 0.2s;
  line-height: 1;
}
.modal-close-btn:hover {
  color: #fff;
  transform: scale(1.15);
}

.modal-body {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.modal-spec-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
}

.spec-card {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 1rem;
}
.spec-card-title {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 0.4rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.spec-card-content {
  font-size: 0.88rem;
  color: #e2e8f0;
}

/* Tactical Vector Diagram in Modal */
.modal-diagram-wrap {
  background: rgba(7, 13, 25, 0.95);
  border: 1px solid rgba(6, 182, 212, 0.3);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}
.modal-diagram-header {
  background: rgba(6, 182, 212, 0.08);
  border-bottom: 1px solid rgba(6, 182, 212, 0.15);
  padding: 0.75rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.modal-diagram-body {
  padding: 1rem;
  text-align: center;
  background: radial-gradient(circle at center, rgba(15, 23, 42, 0.6) 0%, rgba(6, 11, 20, 0.95) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow-x: auto;
}
.modal-diagram-body svg {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.7);
  display: block;
  margin: 0 auto;
}

/* 18-Language Matrix */
.trans-matrix {
  margin-top: 0.5rem;
}
.trans-matrix-title {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--accent-cyan);
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 0.65rem;
}
.trans-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 0.5rem;
  background: rgba(0, 0, 0, 0.35);
  padding: 1rem;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.06);
}
.trans-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.75rem;
}
.trans-flag {
  display: inline-flex;
  flex-shrink: 0;
}
.trans-lang { color: var(--text-muted); font-size: 0.7rem; width: 26px; }
.trans-val { color: #fff; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Stat Boost Grid (Super-sub, Momentum, etc.) */
.stat-boost-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 0.55rem;
  margin-top: 0.75rem;
}
.stat-boost-pill {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.25);
  border-radius: 8px;
  padding: 0.45rem 0.75rem;
  font-size: 0.8rem;
}
.stat-boost-name { color: #e2e8f0; font-weight: 600; }
.stat-boost-val {
  color: #34d399;
  font-weight: 800;
  font-family: var(--font-mono);
  background: rgba(16, 185, 129, 0.22);
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  font-size: 0.85rem;
}

/* Lightbox */
.lightbox-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.92);
  backdrop-filter: blur(12px);
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  flex-direction: column;
  cursor: zoom-out;
}
.lightbox-backdrop.show { display: flex; }
.lightbox-backdrop img {
  max-width: 95%;
  max-height: 85vh;
  object-fit: contain;
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8);
}
.lightbox-close-btn {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: #fff;
  font-size: 1.8rem;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.lightbox-caption {
  color: #e2e8f0;
  font-size: 0.9rem;
  margin-top: 1rem;
  font-weight: 600;
  text-align: center;
}

/* Radar Best Box */
.radar-best-box {
  background: rgba(6, 182, 212, 0.08);
  border: 1px solid var(--accent-cyan);
  padding: 8px 14px;
  border-radius: 10px;
}


/* Footer HUD */
.app-footer {
  border-top: 1px solid var(--border-color);
  padding: 2.5rem 1.5rem;
  text-align: center;
  margin-top: 4rem;
  background: rgba(10, 13, 20, 0.7);
}
.footer-btns {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.85rem;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}
.action-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 1rem;
  border-radius: 9999px;
  font-size: 0.8rem;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.2s;
}
.btn-tg {
  background: rgba(56, 189, 248, 0.15);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.3);
}
.btn-tg:hover { background: rgba(56, 189, 248, 0.25); transform: translateY(-1px); }
.footer-credits {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ==========================================================================
   MOBILE RESPONSIVENESS & TOUCH OPTIMIZATION (Mandatory Perfection)
   ========================================================================== */
@media (max-width: 768px) {
  .app-header {
    position: relative !important;
    top: auto !important;
    padding: 0.85rem 0.65rem 0.75rem 0.65rem !important;
  }
  .header-content {
    gap: 0.6rem !important;
  }
  .brand-title {
    font-size: 1.35rem !important;
  }
  .brand-subtitle {
    font-size: 0.72rem !important;
    line-height: 1.25 !important;
    padding: 0 0.25rem !important;
  }
  .logo-badge {
    width: 32px !important;
    height: 32px !important;
    font-size: 1rem !important;
    border-radius: 8px !important;
  }

  /* Horizontal swipeable 18-Language Flags Bar */
  .quick-lang-group {
    max-width: 100%;
    overflow-x: auto;
    flex-wrap: nowrap;
    justify-content: flex-start;
    padding: 4px 6px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    gap: 3px;
  }
  .quick-lang-group::-webkit-scrollbar {
    display: none;
  }
  .quick-lang-btn {
    padding: 0.2rem 0.35rem;
    font-size: 0.65rem;
  }

  .nav-container {
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .nav-container::-webkit-scrollbar {
    display: none;
  }
  .nav-links {
    flex-wrap: nowrap;
    gap: 0.35rem;
    padding: 3px 6px;
    width: auto;
  }
  .nav-tab-btn {
    padding: 0.35rem 0.75rem;
    font-size: 0.75rem;
    white-space: nowrap;
    flex-shrink: 0;
  }

  .header-actions-row {
    width: 100%;
    gap: 0.4rem;
  }
  .header-social-group {
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.35rem;
  }
  .social-header-btn {
    font-size: 0.7rem;
    padding: 0.3rem 0.6rem;
    border-radius: 9999px;
    white-space: nowrap;
  }

  .app-main {
    margin: 0.85rem auto 2.5rem auto;
    padding: 0 0.65rem;
  }

  /* Compact 2-column mobile stats counters (matching SKILLS_INFOGRAPHICS_GUIDE.html) */
  .stats-summary-grid {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 0.45rem !important;
    margin-bottom: 0.85rem !important;
  }
  .summary-card {
    padding: 0.6rem 0.75rem !important;
    gap: 0.6rem !important;
    border-radius: 12px !important;
  }
  .summary-icon {
    width: 34px !important;
    height: 34px !important;
    font-size: 1.1rem !important;
    border-radius: 8px !important;
    flex-shrink: 0 !important;
  }
  .summary-val {
    font-size: 1.25rem !important;
    line-height: 1 !important;
  }
  .summary-lbl {
    font-size: 0.65rem !important;
    margin-top: 0.15rem !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  /* Filter Toolbar Mobile Optimization */
  .filters-bar, .toolbar-panel {
    padding: 0.85rem;
    border-radius: 14px;
    margin-bottom: 1.25rem;
    gap: 0.75rem;
  }
  .filters-top-row, .toolbar-row-top {
    flex-direction: column;
    align-items: stretch;
    gap: 0.65rem;
  }
  .search-box {
    min-width: 100%;
  }
  .search-box input {
    padding: 0.68rem 0.85rem 0.68rem 2.45rem;
    font-size: 0.88rem;
    border-radius: 10px;
  }
  .search-icon {
    left: 0.85rem;
    font-size: 0.95rem;
  }

  /* Horizontal swipeable filters */
  .filter-pills-row {
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 4px;
    gap: 0.4rem;
    width: 100%;
  }
  .filter-pills-row::-webkit-scrollbar {
    display: none;
  }
  .filter-btn, .filter-pill {
    padding: 0.35rem 0.65rem;
    font-size: 0.72rem;
    flex-shrink: 0;
  }
  .filter-count {
    font-size: 0.65rem;
    padding: 0.05rem 0.35rem;
  }

  /* 1-COLUMN CLEAN CARDS ON MOBILE (SKILLS & STATS) */
  .skills-grid, .stats-grid {
    grid-template-columns: 1fr;
    gap: 0.95rem;
  }

  .skill-card, .stat-card {
    padding: 0.95rem;
    border-radius: 16px;
  }
  .skill-name, .stat-name {
    font-size: 1.05rem;
  }
  .skill-subname, .stat-token {
    font-size: 0.72rem;
  }
  .condition-box, .desc-box, .tactical-box, .spec-box, .stat-summary-box {
    padding: 0.55rem 0.75rem;
    margin-bottom: 0.5rem;
    font-size: 0.78rem;
    line-height: 1.4;
    border-radius: 8px;
  }
  .condition-label, .tactical-label, .spec-label {
    font-size: 0.65rem;
  }

  /* Mobile Modals */
  .modal-backdrop {
    padding: 0.65rem;
  }
  .modal-box, .modal-dialog {
    padding: 1.15rem 0.85rem;
    border-radius: 16px;
    max-height: 94vh;
    width: 100%;
  }
  .modal-header {
    padding: 0.85rem;
  }
  .modal-body {
    padding: 0.85rem;
    gap: 1rem;
  }
  .modal-close, .modal-close-btn {
    top: 0.75rem;
    right: 0.75rem;
    width: 32px;
    height: 32px;
    font-size: 1.25rem;
  }
  .modal-spec-grid {
    grid-template-columns: 1fr;
    gap: 0.65rem;
  }
  .trans-grid {
    grid-template-columns: 1fr;
    padding: 0.65rem;
    gap: 0.35rem;
  }
  .stat-boost-grid {
    grid-template-columns: 1fr 1fr;
    gap: 0.35rem;
  }
  .stat-boost-pill {
    padding: 0.35rem 0.55rem;
    font-size: 0.72rem;
  }
}

@media (max-width: 480px) {
  .brand-title {
    font-size: 1.25rem;
  }
  .stats-summary-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }
  .stat-boost-grid {
    grid-template-columns: 1fr 1fr;
  }
  .stitch-theme-panel {
    bottom: 16px;
    right: 16px;
  }
}
