/* ============================================
   Kunsido · Estilos globales
   ============================================ */

/* Reset y base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  min-height: 100vh;
  color: #e0e0e0;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 2rem;
}

/* ============================================
   VARIABLES (temas)
   ============================================ */
:root {
  --bg-primary: #0d1117;
  --bg-secondary: #161b22;
  --bg-card: rgba(255,255,255,0.04);
  --border-color: rgba(255,255,255,0.06);
  --text-primary: #f0f6fc;
  --text-secondary: #8b949e;
  --text-muted: #556677;
  --gradient-main: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --gradient-games: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  --color-accent: #667eea;
  --color-accent-hover: #7c8cf5;
  --color-link: #58a6ff;
  --shadow-card: 0 4px 12px rgba(0, 0, 0, 0.03);
  --radius-card: 12px;
  --radius-btn: 8px;
  --transition: all 0.3s ease;
}

/* ============================================
   LAYOUTS
   ============================================ */
.container {
  max-width: 900px;
  width: 100%;
}

.container-narrow {
  max-width: 750px;
  width: 100%;
}

/* ============================================
   NAVBAR
   ============================================ */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.8rem 0;
  margin-bottom: 2rem;
  border-bottom: 1px solid var(--border-color);
  flex-wrap: wrap;
  gap: 0.5rem;
}

.nav-left {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.nav-logo {
  height: 36px;
  width: auto;
}

.nav-brand {
  font-size: 1.3rem;
  font-weight: 700;
  background: var(--gradient-main);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: -0.5px;
}

.nav-brand-games {
  background: var(--gradient-games);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.back-link {
  color: var(--color-link);
  text-decoration: none;
  font-size: 0.9rem;
  transition: var(--transition);
}

.back-link:hover {
  text-decoration: underline;
}

/* ============================================
   BADGES
   ============================================ */
.badge {
  display: inline-block;
  padding: 0.3rem 1.2rem;
  background: rgba(102, 126, 234, 0.15);
  border: 1px solid rgba(102, 126, 234, 0.25);
  border-radius: 20px;
  font-size: 0.8rem;
  color: #a0aec0;
  margin-bottom: 1.5rem;
  letter-spacing: 0.3px;
}

.badge strong {
  color: var(--color-accent);
}

.badge-games {
  background: rgba(245, 87, 108, 0.15);
  border-color: rgba(245, 87, 108, 0.25);
  color: #f5576c;
}

/* ============================================
   TIPOGRAFÍA
   ============================================ */
.logo-text {
  font-size: 3.5rem;
  font-weight: 800;
  background: var(--gradient-main);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 0.3rem;
  letter-spacing: -1px;
}

.logo-text-games {
  background: var(--gradient-games);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.tagline {
  font-size: 1.4rem;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
  font-weight: 300;
}

.subtext {
  font-size: 1.05rem;
  color: #8b949e;
  margin-bottom: 2.5rem;
  font-weight: 300;
  max-width: 550px;
  margin-left: auto;
  margin-right: auto;
}

h1 {
  font-size: 2rem;
  background: var(--gradient-main);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 0.3rem;
}

h1.games-title {
  background: var(--gradient-games);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.subtitle {
  color: var(--text-secondary);
  font-size: 1.05rem;
  margin-bottom: 0.5rem;
}

/* ============================================
   FLOW STEPS (Landing)
   ============================================ */
.flow {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.2rem;
  margin: 2rem auto 1rem;
  max-width: 650px;
}

.flow-step {
  background: var(--bg-card);
  padding: 1.2rem 0.8rem;
  border-radius: var(--radius-card);
  border: 1px solid var(--border-color);
  transition: var(--transition);
}

.flow-step:hover {
  transform: translateY(-3px);
  background: rgba(255,255,255,0.07);
  border-color: rgba(102, 126, 234, 0.2);
}

.flow-step .num {
  font-size: 0.65rem;
  color: var(--color-accent);
  font-weight: 600;
  letter-spacing: 1px;
}

.flow-step .icon {
  font-size: 1.8rem;
  margin: 0.2rem 0;
}

.flow-step h4 {
  color: var(--text-primary);
  font-size: 0.9rem;
}

.flow-step p {
  color: #8899aa;
  font-size: 0.75rem;
  margin-top: 0.2rem;
  line-height: 1.4;
}

.flow-note {
  font-size: 0.9rem;
  color: var(--color-accent);
  font-style: italic;
  margin: 0.5rem 0 2rem;
  opacity: 0.8;
  letter-spacing: 0.3px;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

/* ============================================
   BOTONES
   ============================================ */
.actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 2.5rem;
}

.btn-primary {
  display: inline-block;
  padding: 0.8rem 2.5rem;
  background: var(--gradient-main);
  color: white;
  text-decoration: none;
  border-radius: var(--radius-btn);
  font-weight: 600;
  transition: var(--transition);
  border: none;
  cursor: pointer;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(102, 126, 234, 0.35);
  color: white;
}

.btn-secondary {
  display: inline-block;
  padding: 0.8rem 2rem;
  background: transparent;
  color: var(--text-secondary);
  text-decoration: none;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--radius-btn);
  font-weight: 400;
  transition: var(--transition);
}

.btn-secondary:hover {
  background: rgba(255,255,255,0.05);
  border-color: rgba(255,255,255,0.2);
  color: var(--text-primary);
}

/* ============================================
   STEPS (App page)
   ============================================ */
.step {
  background: var(--bg-secondary);
  padding: 1.5rem;
  border-radius: var(--radius-card);
  border: 1px solid #30363d;
  margin-bottom: 1rem;
  transition: var(--transition);
}

.step:hover {
  border-color: var(--color-accent);
}

.step .num {
  font-size: 0.7rem;
  color: var(--color-accent);
  font-weight: 600;
  letter-spacing: 1px;
}

.step .icon-title {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin: 0.3rem 0 0.5rem;
}

.step .icon-title .icon {
  font-size: 1.8rem;
}

.step .icon-title h3 {
  color: var(--text-primary);
  font-size: 1.1rem;
}

.step ul {
  list-style: none;
  padding-left: 0.5rem;
}

.step ul li {
  color: var(--text-secondary);
  font-size: 0.9rem;
  padding: 0.2rem 0;
  padding-left: 1.2rem;
  position: relative;
}

.step ul li::before {
  content: "•";
  position: absolute;
  left: 0;
  color: var(--color-accent);
}

.step .note {
  margin-top: 0.5rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  font-style: italic;
}

/* ============================================
   GAME CARDS
   ============================================ */
.game-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-card);
  padding: 1.5rem;
  margin-bottom: 1rem;
  transition: var(--transition);
}

.game-card:hover {
  transform: translateX(4px);
  border-color: rgba(245, 87, 108, 0.2);
  background: rgba(255,255,255,0.06);
}

.game-card .icon-title {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.game-card .icon-title .icon {
  font-size: 1.8rem;
}

.game-card .icon-title h3 {
  color: var(--text-primary);
  font-size: 1.1rem;
}

.game-card p {
  color: #8899aa;
  font-size: 0.9rem;
  margin: 0.3rem 0 0.5rem 2.6rem;
  line-height: 1.5;
}

.game-card .coming {
  display: inline-block;
  margin-left: 2.6rem;
  padding: 0.15rem 0.7rem;
  background: rgba(245, 87, 108, 0.15);
  color: #f5576c;
  border-radius: 20px;
  font-size: 0.7rem;
  font-weight: 500;
}

/* ============================================
   FOOTNOTES
   ============================================ */
.footnote {
  margin-top: 2rem;
  padding: 1rem;
  background: rgba(102, 126, 234, 0.06);
  border-radius: var(--radius-card);
  border: 1px solid rgba(102, 126, 234, 0.1);
  text-align: center;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.footnote strong {
  color: var(--color-link);
}

.footnote-games {
  background: rgba(245, 87, 108, 0.06);
  border-color: rgba(245, 87, 108, 0.08);
}

.footnote-games strong {
  color: #f5576c;
}

/* ============================================
   USE CASES
   ============================================ */
.use-cases {
  margin-top: 2rem;
  padding: 1.5rem;
  background: rgba(255,255,255,0.03);
  border-radius: var(--radius-card);
  border: 1px solid var(--border-color);
}

.use-cases h3 {
  color: var(--text-primary);
  font-size: 1rem;
  margin-bottom: 0.8rem;
  text-align: center;
}

.use-cases-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6rem;
}

.use-cases-grid .case {
  color: var(--text-secondary);
  font-size: 0.85rem;
  padding: 0.4rem 0.6rem;
  background: rgba(255,255,255,0.03);
  border-radius: 6px;
  text-align: center;
  border: 1px solid rgba(255,255,255,0.04);
}

.use-cases-grid .case .icon {
  margin-right: 0.3rem;
}

/* ============================================
   MAIL INVITE
   ============================================ */
.mail-invite {
  margin-top: 2rem;
  padding: 1.2rem;
  background: rgba(255,255,255,0.03);
  border-radius: 10px;
  border: 1px solid var(--border-color);
  text-align: center;
}

.mail-invite p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 0.6rem;
}

.mail-invite a {
  color: var(--color-link);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
}

.mail-invite a:hover {
  text-decoration: underline;
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 1rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-color);
  text-align: center;
}

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

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

.footer .contact {
  color: #8899aa;
}

/* ============================================
   ENV BADGE
   ============================================ */
.env-badge {
  position: fixed;
  bottom: 1rem;
  right: 1rem;
  background: rgba(0,0,0,0.5);
  padding: 0.3rem 0.7rem;
  border-radius: 6px;
  font-size: 0.65rem;
  color: var(--text-muted);
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 650px) {
  .flow {
    grid-template-columns: 1fr 1fr;
    gap: 0.6rem;
  }
  .flow-step {
    padding: 0.8rem 0.5rem;
  }
  .flow-step .icon {
    font-size: 1.4rem;
  }
  .flow-step h4 {
    font-size: 0.8rem;
  }
  .flow-step p {
    font-size: 0.65rem;
  }
  .flow-note {
    font-size: 0.8rem;
  }
  .logo-text {
    font-size: 2.5rem;
  }
  .tagline {
    font-size: 1.1rem;
  }
  .actions {
    flex-direction: column;
    align-items: center;
  }
  .btn-primary,
  .btn-secondary {
    width: 100%;
    text-align: center;
  }
  .navbar {
    justify-content: center;
  }
  h1 {
    font-size: 1.5rem;
  }
  .step {
    padding: 1rem;
  }
  .use-cases-grid {
    grid-template-columns: 1fr;
  }
  .use-cases {
    padding: 1rem;
  }
}

@media (max-width: 400px) {
  .flow {
    grid-template-columns: 1fr;
    max-width: 260px;
  }
  .flow-step {
    padding: 0.6rem 0.4rem;
  }
  .flow-step .icon {
    font-size: 1.2rem;
  }
  .flow-step h4 {
    font-size: 0.75rem;
  }
  .flow-step p {
    font-size: 0.6rem;
  }
  .nav-brand {
    font-size: 1rem;
  }
}

/* ============================================
   STATS PAGE
   ============================================ */
.stats-container {
  max-width: 600px;
  width: 100%;
  background: var(--bg-secondary);
  border-radius: var(--radius-card);
  padding: 2rem;
  border: 1px solid #30363d;
}

.stats-container .badge {
  margin-bottom: 0.5rem;
}

.stats-container h1 {
  font-size: 1.5rem;
  margin-bottom: 0.25rem;
  -webkit-text-fill-color: var(--text-primary);
  background: none;
}

.stats-container .subtitle {
  margin-bottom: 1.5rem;
}

.stat-item {
  display: flex;
  justify-content: space-between;
  padding: 0.6rem 0;
  border-bottom: 1px solid #21262d;
  font-size: 0.9rem;
}

.stat-item:last-child {
  border-bottom: none;
}

.stat-name {
  color: var(--text-secondary);
}

.stat-count {
  color: var(--text-primary);
  font-weight: 500;
}

.total {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 2px solid #30363d;
  display: flex;
  justify-content: space-between;
  font-weight: 600;
  font-size: 1rem;
}

.error-box {
  background: rgba(245, 87, 108, 0.1);
  border: 1px solid rgba(245, 87, 108, 0.2);
  border-radius: var(--radius-card);
  padding: 1rem;
  color: #f5576c;
  margin-bottom: 1rem;
  font-size: 0.9rem;
}

.error-detail {
  color: var(--text-secondary);
  font-size: 0.8rem;
  margin: 0.5rem 0;
  font-family: monospace;
}

.q3 {
  color: var(--text-muted);
  font-size: 0.8rem;
  margin-top: 0.5rem;
}

.empty {
  color: var(--text-secondary);
  font-style: italic;
}

/* ============================================
   BONUS (Multi Translator link)
   ============================================ */
.bonus {
  margin-top: 2.5rem;
  padding: 1rem 1.5rem;
  background: rgba(255,255,255,0.03);
  border-radius: 10px;
  border: 1px dashed rgba(255,255,255,0.08);
  text-align: center;
}

.bonus span {
  color: var(--text-muted);
  font-size: 0.75rem;
  letter-spacing: 0.5px;
}

.bonus a {
  color: var(--color-link);
  text-decoration: none;
  font-size: 0.85rem;
  margin-left: 0.5rem;
}

.bonus a:hover {
  text-decoration: underline;
}