/* ==========================================
   YZG ACADEMY MOBILE - ESTILOS PROFESIONALES
   ========================================== */

:root {
  --bg-main: #0b0f19;
  --bg-card: rgba(18, 24, 39, 0.7);
  --bg-card-hover: rgba(30, 41, 59, 0.8);
  --border-color: rgba(255, 255, 255, 0.08);
  --accent-blue: #3b82f6;
  --accent-glow: #60a5fa;
  --accent-purple: #8b5cf6;
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --font-family: 'Plus Jakarta Sans', sans-serif;
  --radius-lg: 20px;
  --radius-md: 14px;
}

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

body {
  background-color: var(--bg-main);
  color: var(--text-main);
  font-family: var(--font-family);
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  display: flex;
  justify-content: center;
}

/* App Container (Efecto Marco Móvil) */
#app {
  width: 100%;
  max-width: 480px; /* Tamaño máximo para simular o verse perfecto en teléfono */
  height: 100%;
  display: flex;
  flex-direction: column;
  position: relative;
  background-color: #070a12;
  border-left: 1px solid var(--border-color);
  border-right: 1px solid var(--border-color);
}

/* 1. TOP HEADER */
.top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  background: rgba(11, 15, 25, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  z-index: 10;
}

.user-profile {
  display: flex;
  align-items: center;
  gap: 12px;
}

.avatar-glow {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-blue), var(--accent-purple));
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 12px rgba(59, 130, 246, 0.4);
}

.avatar-letter {
  font-weight: 800;
  font-size: 1.1rem;
  color: #fff;
}

.user-name {
  font-size: 0.95rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 4px;
}

.badge-verify {
  color: var(--accent-glow);
  font-size: 0.75rem;
}

.user-rank {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.stats-container {
  display: flex;
  gap: 8px;
}

.stat-pill {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 6px 10px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
}

.stat-pill.streak { color: #f97316; }
.stat-pill.xp { color: #eab308; }

/* 2. ÁREA DE CONTENIDO (SCROLLABLE) */
.content-view {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  padding-bottom: 90px; /* Espacio para que el bottom nav no tape el contenido */
}

/* Ocultar barra de scroll pero mantener funcionalidad */
.content-view::-webkit-scrollbar { display: none; }

/* Hero Card */
.hero-card {
  background: linear-gradient(135deg, rgba(30, 58, 138, 0.4), rgba(88, 28, 135, 0.4));
  border: 1px solid rgba(99, 102, 241, 0.3);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-bottom: 24px;
  backdrop-filter: blur(10px);
}

.hero-tag {
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--accent-glow);
  display: inline-block;
  margin-bottom: 8px;
}

.hero-card h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 6px;
  line-height: 1.3;
}

.hero-card p {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.btn-primary-glow {
  width: 100%;
  padding: 12px;
  border-radius: var(--radius-md);
  border: none;
  background: linear-gradient(90deg, var(--accent-blue), var(--accent-purple));
  color: #fff;
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
  transition: transform 0.2s;
}

.btn-primary-glow:active {
  transform: scale(0.98);
}

/* Titles */
.section-title {
  margin-bottom: 12px;
}

.section-title h4 {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Materias Grid */
.subjects-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 24px;
}

.subject-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 12px 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: background 0.2s;
}

.subject-card:active {
  background: var(--bg-card-hover);
}

.subject-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
}

.math .subject-icon { background: rgba(239, 68, 68, 0.15); color: #ef4444; }
.physics .subject-icon { background: rgba(14, 165, 233, 0.15); color: #0ea5e9; }
.bio .subject-icon { background: rgba(34, 197, 94, 0.15); color: #22c55e; }
.history .subject-icon { background: rgba(245, 158, 11, 0.15); color: #f59e0b; }

.subject-card span {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-muted);
}

/* Tools List */
.tools-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.tool-item {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  cursor: pointer;
  transition: background 0.2s;
}

.tool-item:active {
  background: var(--bg-card-hover);
}

.tool-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-glow);
  font-size: 1.1rem;
}

.tool-info {
  flex: 1;
}

.tool-info h5 {
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 2px;
}

.tool-info p {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.arrow-icon {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* 3. BOTTOM NAVIGATION BAR */
.bottom-nav {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 70px;
  background: rgba(11, 15, 25, 0.92);
  backdrop-filter: blur(16px);
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding: 0 10px;
  z-index: 20;
}

.nav-button {
  background: none;
  border: none;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  flex: 1;
  transition: color 0.2s;
}

.nav-button .icon-wrapper {
  font-size: 1.1rem;
  transition: transform 0.2s;
}

.nav-button span {
  font-size: 0.65rem;
  font-weight: 600;
}

/* Estado Activo en Bottom Nav */
.nav-button.active {
  color: var(--accent-glow);
}

.nav-button.active .icon-wrapper {
  transform: translateY(-2px);
}
