/* ============================================================
   DANCHOUI v2 — Dark UI, clean, distinctive
   Inspirado en editoriales técnicas (Linear, Vercel, Raycast)
   - Fondo casi negro con un toque cálido
   - Acento: azul cobalto (no el azul típico de IA)
   - Tipografía con personalidad
   ============================================================ */

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

/* === DARK THEME (default) === */
:root, [data-theme="dark"] {
  --bg: #0B0F0D;
  --bg-elevated: #131815;
  --surface: #1A1F1C;
  --surface-2: #232924;
  --border: #2A3029;
  --border-strong: #3A4239;
  --text: #F2F5F2;
  --text-secondary: #B0B8B2;
  --text-muted: #6E7872;
  --text-dim: #4A5249;
  --accent: #4ADE80;
  --accent-hover: #6FE89A;
  --accent-soft: rgba(74, 222, 128, 0.10);
  --accent-line: rgba(74, 222, 128, 0.25);
  --gold: #E5B547;
  --gold-soft: rgba(229, 181, 71, 0.12);
  --green: #4ADE80;
  --green-soft: rgba(74, 222, 128, 0.12);
  --red: #F87171;
  --header-bg: rgba(11, 15, 13, 0.78);
  --code-bg: #131815;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.55);
}

/* === LIGHT THEME === */
[data-theme="light"] {
  --bg: #FAFCF9;
  --bg-elevated: #FFFFFF;
  --surface: #FFFFFF;
  --surface-2: #F2F7F1;
  --border: #E5EBE4;
  --border-strong: #D2DBD0;
  --text: #1A1F1D;
  --text-secondary: #4A5249;
  --text-muted: #8A938C;
  --text-dim: #B0B8B2;
  --accent: #16A34A;
  --accent-hover: #12833C;
  --accent-soft: rgba(22, 163, 74, 0.08);
  --accent-line: rgba(22, 163, 74, 0.22);
  --gold: #B8860B;
  --gold-soft: rgba(184, 134, 11, 0.10);
  --green: #16A34A;
  --green-soft: rgba(22, 163, 74, 0.10);
  --red: #DC2626;
  --header-bg: rgba(250, 252, 249, 0.82);
  --code-bg: #F2F7F1;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.12);
}

:root {
  --radius: 8px;
  --radius-sm: 5px;
  --radius-lg: 14px;
  --max-width: 1080px;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', 'SF Mono', Menlo, monospace;
}

/* Base */
html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.6;
  font-size: 15.5px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  transition: background-color 0.2s ease, color 0.2s ease;
  font-feature-settings: 'cv02', 'cv03', 'cv04', 'cv11';
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.15s ease;
}
a:hover { color: var(--accent-hover); }

img { max-width: 100%; display: block; }

::selection {
  background: var(--accent-soft);
  color: var(--accent);
}

/* Layout */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 28px;
}
.section { padding: 72px 0; }

/* === HEADER === */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--header-bg);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  border-bottom: 1px solid var(--border);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  color: var(--text);
  font-weight: 700;
  font-size: 16px;
  letter-spacing: -0.01em;
}

.brand-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  object-fit: cover;
  border: 1.5px solid var(--accent);
}

.brand-text { color: var(--text); }
.brand-text:hover { color: var(--accent); }

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

.nav a {
  color: var(--text-secondary);
  font-size: 13.5px;
  font-weight: 500;
  padding: 8px 0;
  position: relative;
  letter-spacing: -0.005em;
}

.nav a:hover { color: var(--text); }
.nav a.active { color: var(--text); }
.nav a.active::after {
  content: '';
  position: absolute;
  bottom: 2px;
  left: 0;
  right: 0;
  height: 1.5px;
  background: var(--accent);
  border-radius: 1px;
}

.header-controls {
  display: flex;
  align-items: center;
  gap: 6px;
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: inherit;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.icon-btn:hover {
  background: var(--surface);
  border-color: var(--border);
  color: var(--text);
}

.icon-btn svg {
  width: 16px;
  height: 16px;
}

.menu-btn {
  display: none;
  background: transparent;
  border: 1px solid transparent;
  color: var(--text);
  cursor: pointer;
  padding: 6px;
  border-radius: var(--radius-sm);
}
.menu-btn:hover { background: var(--surface); }
.menu-btn svg { width: 20px; height: 20px; }

/* === HERO === */
.hero {
  padding: 96px 0 80px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -150px;
  left: 50%;
  transform: translateX(-50%);
  width: 720px;
  height: 720px;
  background: radial-gradient(circle, var(--accent-soft) 0%, transparent 55%);
  pointer-events: none;
  z-index: -1;
  filter: blur(20px);
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px 5px 10px;
  background: var(--accent-soft);
  border: 1px solid var(--accent-line);
  color: var(--accent);
  border-radius: 100px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.01em;
  margin-bottom: 28px;
  font-family: var(--font-mono);
}

.hero-eyebrow::before {
  content: '';
  width: 6px;
  height: 6px;
  background: var(--accent);
  border-radius: 50%;
  display: inline-block;
}

.hero h1 {
  font-size: clamp(38px, 6vw, 60px);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.05;
  margin-bottom: 18px;
  color: var(--text);
}

.hero-subtitle {
  font-size: 17px;
  color: var(--text-secondary);
  max-width: 580px;
  margin: 0 auto 36px;
  line-height: 1.6;
}
.hero-subtitle strong { color: var(--text); font-weight: 600; }

.hero-stats {
  display: flex;
  justify-content: center;
  gap: 56px;
  margin-top: 56px;
  flex-wrap: wrap;
}

.stat { text-align: center; }
.stat-num {
  font-size: 32px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
  font-feature-settings: 'tnum';
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
}
.stat-lbl {
  font-size: 11.5px;
  color: var(--text-muted);
  letter-spacing: 0.02em;
  margin-top: 4px;
  font-weight: 500;
}

.stat-live-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  background: var(--green);
  border-radius: 50%;
  margin-left: 4px;
  position: relative;
  top: -2px;
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.85); }
}

.hero-cta {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 40px;
  flex-wrap: wrap;
}

.refresh-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 32px;
  font-size: 12px;
  color: var(--text-muted);
  font-family: var(--font-mono);
}
.refresh-bar button {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 11.5px;
  font-weight: 500;
  padding: 4px 10px;
  font-family: var(--font-mono);
  border-radius: var(--radius-sm);
  transition: all 0.15s ease;
}
.refresh-bar button:hover:not(:disabled) {
  background: var(--surface);
  color: var(--text);
  border-color: var(--border-strong);
}
.refresh-bar button:disabled { opacity: 0.5; cursor: not-allowed; }

/* === BUTTONS === */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 11px 18px;
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: inherit;
  letter-spacing: -0.005em;
}

.btn-primary {
  background: var(--accent);
  color: #FFFFFF;
  border-color: var(--accent);
}
.btn-primary:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  color: #FFFFFF;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px var(--accent-soft);
}

.btn-secondary {
  background: transparent;
  color: var(--text);
  border-color: var(--border-strong);
}
.btn-secondary:hover {
  background: var(--surface);
  border-color: var(--text-muted);
  color: var(--text);
}

/* === SECTION HEAD === */
.section-head {
  margin-bottom: 40px;
  text-align: center;
}
.section-head h2 {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 6px;
  letter-spacing: -0.025em;
  color: var(--text);
}
.section-head p {
  color: var(--text-muted);
  font-size: 14.5px;
}

/* === MOD CARDS === */
.mods-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.mod-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color 0.15s ease, transform 0.15s ease, background 0.15s ease;
  display: flex;
  flex-direction: column;
  position: relative;
  text-decoration: none;
  color: inherit;
}
.mod-card:hover {
  border-color: var(--border-strong);
  transform: translateY(-2px);
  background: var(--surface-2);
  text-decoration: none;
  color: inherit;
}
.mod-card:hover .mod-card-img { transform: scale(1.02); }

.mod-card-img-wrap {
  overflow: hidden;
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--border);
  aspect-ratio: 16 / 10;
}
.mod-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.25s ease;
}

.mod-card-body {
  padding: 14px 16px 14px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.mod-card-cat {
  display: inline-block;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 6px;
  font-family: var(--font-mono);
}

.mod-card-title {
  font-size: 14.5px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
  line-height: 1.3;
  letter-spacing: -0.01em;
  text-decoration: none;
}
.mod-card:hover .mod-card-title { color: var(--text); }

.mod-card-desc {
  font-size: 12.5px;
  color: var(--text-muted);
  line-height: 1.55;
  margin-bottom: 12px;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.mod-card-stats {
  display: flex;
  gap: 14px;
  font-size: 11.5px;
  color: var(--text-dim);
  padding-top: 11px;
  border-top: 1px solid var(--border);
  font-family: var(--font-mono);
  font-feature-settings: 'tnum';
}

.mod-card-stat {
  display: flex;
  align-items: center;
  gap: 4px;
}
.mod-card-stat strong {
  color: var(--text);
  font-weight: 600;
}
.mod-card-rating {
  color: var(--gold);
  font-weight: 600;
  margin-left: auto;
}

/* === FILTERS === */
.filters {
  display: flex;
  gap: 6px;
  justify-content: center;
  margin-bottom: 32px;
  flex-wrap: wrap;
}

.filter-btn {
  padding: 6px 14px;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-secondary);
  border-radius: 100px;
  font-size: 12.5px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: inherit;
}
.filter-btn:hover {
  border-color: var(--border-strong);
  color: var(--text);
}
.filter-btn.active {
  background: var(--text);
  border-color: var(--text);
  color: var(--bg);
}

/* === ABOUT PAGE === */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 48px;
  align-items: start;
}

.about-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px;
  text-align: center;
  position: sticky;
  top: 84px;
}

.about-avatar {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--accent);
  margin: 0 auto 16px;
}

.about-name {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 4px;
  letter-spacing: -0.02em;
  color: var(--text);
}
.about-alias {
  color: var(--accent);
  font-size: 13px;
  margin-bottom: 20px;
  font-family: var(--font-mono);
}

.about-meta {
  font-size: 12.5px;
  color: var(--text-muted);
  line-height: 1.9;
  text-align: left;
  font-family: var(--font-mono);
}
.about-meta strong {
  color: var(--text-secondary);
  display: inline-block;
  min-width: 110px;
}

.about-text h3 {
  font-size: 20px;
  margin-bottom: 12px;
  margin-top: 28px;
  color: var(--text);
  font-weight: 700;
  letter-spacing: -0.015em;
}
.about-text h3:first-child { margin-top: 0; }

.about-text p {
  color: var(--text-secondary);
  margin-bottom: 14px;
  line-height: 1.7;
  font-size: 15px;
}
.about-text strong { color: var(--text); font-weight: 600; }

/* === INFO CARDS === */
.info-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-top: 32px;
}

.info-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 22px 20px;
  transition: border-color 0.15s ease;
}
.info-card:hover { border-color: var(--border-strong); }

.info-card-icon {
  width: 32px;
  height: 32px;
  background: var(--accent-soft);
  color: var(--accent);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  margin-bottom: 12px;
}

.info-card h3 {
  font-size: 15px;
  margin-bottom: 5px;
  color: var(--text);
  font-weight: 600;
  letter-spacing: -0.01em;
}
.info-card p {
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.55;
}

/* === CONTACT PAGE === */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  margin-top: 32px;
}

.contact-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  text-align: center;
  transition: border-color 0.15s ease;
}
.contact-card:hover { border-color: var(--accent-line); }

.contact-card-icon {
  width: 42px;
  height: 42px;
  background: var(--accent-soft);
  color: var(--accent);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 14px;
  font-size: 20px;
}

.contact-card h3 {
  font-size: 15px;
  margin-bottom: 4px;
  color: var(--text);
  font-weight: 600;
}
.contact-card p {
  color: var(--text-muted);
  font-size: 13px;
  margin-bottom: 12px;
  line-height: 1.5;
}
.contact-card a {
  font-size: 13px;
  font-weight: 500;
  word-break: break-all;
}

/* === EMPTY STATE === */
.empty-state {
  text-align: center;
  padding: 56px 24px;
  color: var(--text-muted);
  font-size: 14px;
}

/* === FOOTER === */
.site-footer {
  background: var(--bg-elevated);
  border-top: 1px solid var(--border);
  padding: 32px 0;
  margin-top: 72px;
}

.site-footer .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.footer-text {
  color: var(--text-dim);
  font-size: 12.5px;
}

.footer-links {
  display: flex;
  gap: 18px;
}
.footer-links a {
  color: var(--text-muted);
  font-size: 12.5px;
}
.footer-links a:hover { color: var(--text); }

/* === PAGE HEAD === */
.page-head {
  padding: 72px 0 36px;
  text-align: center;
}

.page-head h1 {
  font-size: 36px;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 8px;
  color: var(--text);
}
.page-head p {
  color: var(--text-muted);
  font-size: 15px;
  max-width: 580px;
  margin: 0 auto;
  line-height: 1.6;
}

/* === LOADING === */
.loading {
  text-align: center;
  padding: 56px;
  color: var(--text-muted);
  font-size: 14px;
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
  .menu-btn { display: block; }
  .nav {
    display: none;
    position: absolute;
    top: 60px;
    left: 0;
    right: 0;
    background: var(--bg-elevated);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    padding: 12px 24px 16px;
    gap: 2px;
  }
  .nav.open { display: flex; }
  .nav a {
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
    font-size: 14px;
  }
  .nav a:last-child { border-bottom: none; }
  .nav a.active::after { display: none; }

  .hero { padding: 64px 0 56px; }
  .hero-stats { gap: 32px; }
  .stat-num { font-size: 26px; }

  .section { padding: 48px 0; }
  .about-grid { grid-template-columns: 1fr; gap: 24px; }
  .about-card { position: static; }
  .page-head { padding: 56px 0 28px; }
  .page-head h1 { font-size: 30px; }
  .section-head h2 { font-size: 24px; }

  .mod-detail { grid-template-columns: 1fr !important; }
  .mod-detail-cover img { max-height: 280px; }

  .site-footer .container {
    flex-direction: column;
    text-align: center;
  }
}

/* ============================================================
   MOD DETAIL PAGE (mod.html)
   ============================================================ */

.mod-page {
  padding-top: 32px;
  padding-bottom: 56px;
}

.back-link {
  display: inline-block;
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 24px;
  font-family: var(--font-mono);
  transition: color 0.15s ease;
}
.back-link:hover { color: var(--accent); }

.mod-detail {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 36px;
  margin-bottom: 56px;
  align-items: start;
}

.mod-detail-cover {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  position: sticky;
  top: 84px;
}
.mod-detail-cover img {
  width: 100%;
  height: auto;
  max-height: 380px;
  object-fit: cover;
  display: block;
}

.mod-detail-info {
  padding-top: 4px;
}

.modal-cat {
  display: inline-block;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 10px;
  font-family: var(--font-mono);
}

.mod-detail-title {
  font-size: 32px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.025em;
  line-height: 1.15;
  margin-bottom: 18px;
}

.mod-detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  font-size: 12.5px;
  color: var(--text-muted);
  font-family: var(--font-mono);
  padding: 14px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  margin-bottom: 22px;
  font-feature-settings: 'tnum';
}
.mod-detail-meta strong {
  color: var(--text-secondary);
  font-weight: 600;
}
.mod-detail-meta .rating-gold { color: var(--gold); }

.mod-detail-cta {
  display: inline-flex;
}

.mod-sections {
  display: grid;
  gap: 40px;
  margin-bottom: 56px;
}

.mod-section {
  /* una sección por bloque */
}

.section-h2 {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.015em;
  margin-bottom: 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

.subsection-h {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-top: 18px;
  margin-bottom: 10px;
  font-family: var(--font-mono);
}
.subsection-h:first-child { margin-top: 0; }

.prose {
  font-size: 14.5px;
  color: var(--text-secondary);
  line-height: 1.7;
}
.prose :last-child { margin-bottom: 0; }
.prose strong { color: var(--text); font-weight: 600; }
.prose code {
  background: var(--code-bg);
  border: 1px solid var(--border);
  padding: 1px 6px;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--accent);
}

.muted { color: var(--text-muted); font-size: 14px; }

.readme-block {
  background: var(--code-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--text-secondary);
  line-height: 1.65;
  white-space: pre-wrap;
  word-wrap: break-word;
  overflow-x: auto;
  max-height: 400px;
  overflow-y: auto;
}

.modal-files {
  background: var(--code-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-secondary);
  max-height: 240px;
  overflow-y: auto;
  line-height: 1.8;
}
.modal-files .file-row { display: flex; align-items: baseline; gap: 6px; }
.modal-files .file-name { color: var(--text); }

.modal-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.modal-tool {
  display: inline-block;
  padding: 4px 11px;
  background: var(--accent-soft);
  color: var(--accent);
  border: 1px solid var(--accent-line);
  border-radius: 100px;
  font-size: 11.5px;
  font-weight: 500;
  font-family: var(--font-mono);
}

.modal-tutorials {
  display: grid;
  gap: 8px;
}
.modal-tutorial {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: border-color 0.15s ease;
  color: var(--text);
}
.modal-tutorial:hover {
  border-color: var(--accent-line);
  color: var(--text);
}
.modal-tutorial-icon {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  background: var(--accent-soft);
  color: var(--accent);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
}
.modal-tutorial-body { flex: 1; min-width: 0; }
.modal-tutorial-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 2px;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.modal-tutorial-meta {
  font-size: 11px;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.mod-related {
  margin-top: 32px;
  padding-top: 32px;
  border-top: 1px solid var(--border);
}
.mod-related .section-h2 {
  margin-bottom: 20px;
}

.mod-notfound {
  text-align: center;
  padding: 80px 20px;
  color: var(--text-muted);
}
.mod-notfound h1 {
  font-size: 28px;
  color: var(--text);
  margin-bottom: 8px;
}

/* === GALLERY (mod page) === */
.mod-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 10px;
}
.mod-gallery-item {
  display: block;
  overflow: hidden;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  aspect-ratio: 16 / 10;
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.mod-gallery-item:hover {
  border-color: var(--accent-line);
  transform: translateY(-1px);
}
.mod-gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.2s ease;
}
.mod-gallery-item:hover img { transform: scale(1.04); }
