/* ==========================================================================
   VillaTech English Coach - Estilos Responsive Modernos
   Inspirado en diseño de domótica de alta gama (Lutron/Crestron) y Duolingo
   ========================================================================== */

:root {
  --bg-primary: #0b0f19;
  --bg-secondary: #131b2e;
  --bg-card: rgba(26, 36, 61, 0.75);
  --bg-card-hover: rgba(36, 50, 84, 0.85);
  --border-color: rgba(255, 255, 255, 0.1);
  --border-highlight: rgba(14, 165, 233, 0.35);
  
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;

  --accent-cyan: #06b6d4;
  --accent-cyan-glow: rgba(6, 182, 212, 0.25);
  --accent-blue: #3b82f6;
  --accent-emerald: #10b981;
  --accent-amber: #f59e0b;
  --accent-rose: #f43f5e;
  --accent-purple: #8b5cf6;

  --font-main: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;

  --shadow-glow: 0 0 25px rgba(6, 182, 212, 0.15);
  --shadow-card: 0 10px 30px -5px rgba(0, 0, 0, 0.4);
}

/* Modo claro opcional */
[data-theme="light"] {
  --bg-primary: #f1f5f9;
  --bg-secondary: #ffffff;
  --bg-card: rgba(255, 255, 255, 0.85);
  --bg-card-hover: rgba(241, 245, 249, 0.95);
  --border-color: rgba(0, 0, 0, 0.08);
  --border-highlight: rgba(14, 165, 233, 0.4);
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;
  --shadow-card: 0 10px 25px -5px rgba(0, 0, 0, 0.07);
}

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

body {
  font-family: var(--font-main);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  min-height: -webkit-fill-available;
  line-height: 1.5;
  overflow-x: hidden;
}

/* Contenedor principal de la aplicación */
.app-container {
  display: flex;
  height: 100vh;
  height: -webkit-fill-available;
  max-width: 1600px;
  margin: 0 auto;
  position: relative;
  overflow: hidden;
}

/* Barra lateral / Navegación Desktop & Tablet */
.sidebar {
  width: 280px;
  background-color: var(--bg-secondary);
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  transition: all 0.3s ease;
  z-index: 40;
}

.brand-header {
  padding: 1.5rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  border-bottom: 1px solid var(--border-color);
}

.brand-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-blue));
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.35rem;
  box-shadow: 0 4px 15px var(--accent-cyan-glow);
}

.brand-title {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  background: linear-gradient(to right, #ffffff, #94a3b8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand-subtitle {
  font-size: 0.75rem;
  color: var(--accent-cyan);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.nav-menu {
  padding: 1rem 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  flex: 1;
  overflow-y: auto;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.8rem 1rem;
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 1px solid transparent;
}

.nav-item:hover {
  background: var(--bg-card);
  color: var(--text-primary);
}

.nav-item.active {
  background: linear-gradient(90deg, rgba(6, 182, 212, 0.15), rgba(59, 130, 246, 0.05));
  border-color: var(--border-highlight);
  color: var(--accent-cyan);
  font-weight: 600;
}

.nav-item .badge {
  margin-left: auto;
  padding: 0.15rem 0.55rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 700;
  background: rgba(245, 158, 11, 0.2);
  color: var(--accent-amber);
}

.user-quick-profile {
  padding: 1rem 1.25rem;
  border-top: 1px solid var(--border-color);
  background: rgba(0, 0, 0, 0.15);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.profile-info {
  display: flex;
  flex-direction: column;
}

.profile-name {
  font-size: 0.9rem;
  font-weight: 600;
}

.profile-level {
  font-size: 0.75rem;
  color: var(--accent-emerald);
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

/* Área de Contenido Principal */
.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  position: relative;
  background: radial-gradient(circle at top right, rgba(6, 182, 212, 0.05), transparent 40%),
              radial-gradient(circle at bottom left, rgba(59, 130, 246, 0.04), transparent 40%);
}

/* Cabecera superior para móvil y título contextual */
.top-navbar {
  height: 64px;
  padding: 0 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-color);
  background: rgba(19, 27, 46, 0.8);
  backdrop-filter: blur(12px);
  z-index: 30;
}

.top-nav-title {
  font-size: 1.1rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.top-nav-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.stat-pill {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-full);
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  font-size: 0.85rem;
  font-weight: 600;
}

.stat-pill.streak {
  color: var(--accent-amber);
  border-color: rgba(245, 158, 11, 0.3);
}

.stat-pill.points {
  color: var(--accent-cyan);
  border-color: rgba(6, 182, 212, 0.3);
}

/* Secciones / Pestañas */
.tab-pane {
  display: none;
  flex: 1;
  height: calc(100% - 64px);
  overflow-y: auto;
  position: relative;
}

.tab-pane.active {
  display: flex;
  flex-direction: column;
}

/* ==========================================================================
   SECCIÓN DE CONVERSACIÓN / CHAT INTERACTIVO
   ========================================================================== */
.chat-container {
  display: flex;
  flex-direction: column;
  height: 100%;
  position: relative;
}

.chat-scenario-banner {
  padding: 0.85rem 1.25rem;
  background: linear-gradient(90deg, rgba(6, 182, 212, 0.12), rgba(19, 27, 46, 0.9));
  border-bottom: 1px solid var(--border-highlight);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}

.scenario-header-text {
  display: flex;
  flex-direction: column;
}

.scenario-tag {
  font-size: 0.7rem;
  color: var(--accent-cyan);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.scenario-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
}

.scenario-persona {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  scroll-behavior: smooth;
}

/* Burbujas de mensaje */
.message-row {
  display: flex;
  flex-direction: column;
  max-width: 82%;
  animation: fadeIn 0.25s ease forwards;
}

.message-row.user {
  align-self: flex-end;
  align-items: flex-end;
}

.message-row.assistant {
  align-self: flex-start;
  align-items: flex-start;
}

.message-bubble {
  padding: 1rem 1.15rem;
  border-radius: var(--radius-lg);
  font-size: 0.98rem;
  line-height: 1.55;
  position: relative;
  word-break: break-word;
}

.message-row.user .message-bubble {
  background: linear-gradient(135deg, #0284c7, #2563eb);
  color: #ffffff;
  border-bottom-right-radius: 4px;
  box-shadow: 0 4px 15px rgba(37, 99, 235, 0.25);
}

.message-row.assistant .message-bubble {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  border-bottom-left-radius: 4px;
  box-shadow: var(--shadow-card);
}

/* Palabras interactivas (Tap-to-Translate) */
.trans-word {
  cursor: pointer;
  border-bottom: 1px dotted rgba(255, 255, 255, 0.4);
  transition: all 0.15s ease;
  display: inline;
}

.trans-word:hover {
  background: rgba(6, 182, 212, 0.25);
  border-radius: 3px;
  border-bottom-color: var(--accent-cyan);
}

.message-time {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-top: 0.35rem;
  padding: 0 0.25rem;
}

.message-speaker-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-color);
  color: var(--accent-cyan);
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  margin-left: 0.5rem;
  vertical-align: middle;
  transition: all 0.2s;
}

.message-speaker-btn:hover {
  background: var(--accent-cyan);
  color: white;
  transform: scale(1.05);
}

/* Tarjeta de Corrección Pedagógica y Modo Nativo */
.correction-card {
  margin-top: 0.65rem;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: var(--radius-md);
  padding: 0.85rem 1rem;
  font-size: 0.88rem;
  width: 100%;
}

.correction-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  color: var(--accent-amber);
  margin-bottom: 0.5rem;
  font-size: 0.85rem;
}

.error-item {
  margin-bottom: 0.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.08);
}

.error-item:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.bad-text {
  color: var(--accent-rose);
  text-decoration: line-through;
  margin-right: 0.5rem;
}

.good-text {
  color: var(--accent-emerald);
  font-weight: 600;
}

.error-reason {
  color: var(--text-secondary);
  font-size: 0.8rem;
  margin-top: 0.2rem;
}

.native-box {
  margin-top: 0.6rem;
  padding: 0.6rem 0.85rem;
  background: rgba(16, 185, 129, 0.1);
  border-left: 3px solid var(--accent-emerald);
  border-radius: 4px;
}

.native-box-title {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--accent-emerald);
  text-transform: uppercase;
  margin-bottom: 0.25rem;
}

.native-text {
  font-style: italic;
  font-weight: 500;
  color: var(--text-primary);
}

.quick-tip {
  margin-top: 0.5rem;
  font-size: 0.78rem;
  color: #38bdf8;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

/* Sugerencias de respuesta rápida */
.suggested-chips {
  padding: 0.5rem 1.25rem;
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  flex-shrink: 0;
  background: rgba(11, 15, 25, 0.95);
  border-top: 1px solid var(--border-color);
}

.suggested-chip {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  padding: 0.4rem 0.85rem;
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.2s;
}

.suggested-chip:hover {
  border-color: var(--accent-cyan);
  color: var(--text-primary);
  background: rgba(6, 182, 212, 0.15);
}

/* Barra de entrada de Chat y Micrófono */
.chat-input-bar {
  padding: 0.85rem 1.25rem;
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
  position: relative;
}

.chat-input-field {
  flex: 1;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  padding: 0.75rem 1.25rem;
  color: var(--text-primary);
  font-size: 0.95rem;
  outline: none;
  font-family: inherit;
  transition: all 0.2s ease;
}

.chat-input-field:focus {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.2);
}

.btn-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-full);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 1.1rem;
}

.btn-send {
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-blue));
  color: white;
}

.btn-send:hover:not(:disabled) {
  transform: scale(1.05);
  box-shadow: 0 4px 15px var(--accent-cyan-glow);
}

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

.btn-mic:hover {
  color: var(--accent-rose);
  border-color: rgba(244, 63, 94, 0.4);
}

.btn-mic.recording {
  background: var(--accent-rose);
  color: white;
  border-color: var(--accent-rose);
  animation: pulseMic 1.5s infinite;
}

@keyframes pulseMic {
  0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(244, 63, 94, 0.7); }
  70% { transform: scale(1.08); box-shadow: 0 0 0 12px rgba(244, 63, 94, 0); }
  100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(244, 63, 94, 0); }
}

/* Modo Voz Flotante para Pantalla Completa en Móvil */
.voice-mode-overlay {
  position: absolute;
  inset: 0;
  background: rgba(11, 15, 25, 0.96);
  backdrop-filter: blur(20px);
  z-index: 50;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  text-align: center;
}

.voice-mode-overlay.active {
  display: flex;
}

.voice-status-title {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.voice-status-subtitle {
  font-size: 0.9rem;
  color: var(--text-secondary);
  max-width: 400px;
  margin-bottom: 2rem;
}

.voice-mic-hero {
  width: 110px;
  height: 110px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, #0284c7, #2563eb);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  color: white;
  box-shadow: 0 0 40px rgba(14, 165, 233, 0.4);
  cursor: pointer;
  transition: all 0.3s ease;
}

.voice-mic-hero.listening {
  background: linear-gradient(135deg, #f43f5e, #e11d48);
  box-shadow: 0 0 60px rgba(244, 63, 94, 0.6);
  animation: pulseMicHero 1.8s infinite;
}

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

.voice-transcript-box {
  margin-top: 2rem;
  min-height: 70px;
  max-width: 500px;
  width: 100%;
  padding: 1rem 1.25rem;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  font-size: 1.05rem;
  color: var(--text-primary);
  font-style: italic;
}

/* ==========================================================================
   SECCIONES: ESCENARIOS, VOCABULARIO, REPASO, EJERCICIOS Y LECCIONES
   ========================================================================== */
.content-padding {
  padding: 1.5rem;
  max-width: 1100px;
  margin: 0 auto;
  width: 100%;
}

.section-header {
  margin-bottom: 1.5rem;
}

.section-title {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.section-desc {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-top: 0.25rem;
}

/* Rejilla de tarjetas */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.25rem;
}

.interactive-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  cursor: pointer;
  transition: all 0.25s ease;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-card);
}

.interactive-card:hover {
  transform: translateY(-3px);
  border-color: var(--border-highlight);
  background: var(--bg-card-hover);
  box-shadow: var(--shadow-glow);
}

.card-badge {
  align-self: flex-start;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-full);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 0.75rem;
  background: rgba(6, 182, 212, 0.15);
  color: var(--accent-cyan);
}

.card-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  line-height: 1.3;
}

.card-desc {
  font-size: 0.88rem;
  color: var(--text-secondary);
  flex: 1;
  margin-bottom: 1rem;
  line-height: 1.45;
}

.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 0.82rem;
  color: var(--text-muted);
}

/* Tarjeta SRS de Repaso */
.srs-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 480px;
  max-width: 600px;
  margin: 0 auto;
  width: 100%;
}

.flashcard {
  width: 100%;
  min-height: 280px;
  perspective: 1000px;
  cursor: pointer;
  margin-bottom: 1.5rem;
}

.flashcard-inner {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 280px;
  text-align: center;
  transition: transform 0.6s;
  transform-style: preserve-3d;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
}

.flashcard.flipped .flashcard-inner {
  transform: rotateY(180deg);
}

.flashcard-front, .flashcard-back {
  position: absolute;
  inset: 0;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  background: var(--bg-card);
}

.flashcard-back {
  transform: rotateY(180deg);
  background: linear-gradient(135deg, rgba(26, 36, 61, 0.95), rgba(15, 23, 42, 0.95));
  border-color: var(--border-highlight);
}

.flashcard-word {
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.flashcard-phonetic {
  font-size: 1rem;
  color: var(--accent-cyan);
  font-family: monospace;
}

.srs-rating-buttons {
  display: flex;
  gap: 0.75rem;
  width: 100%;
}

.srs-btn {
  flex: 1;
  padding: 0.85rem;
  border-radius: var(--radius-md);
  border: none;
  font-weight: 700;
  cursor: pointer;
  font-size: 0.95rem;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
}

.srs-btn span.sub {
  font-size: 0.75rem;
  font-weight: 400;
  opacity: 0.8;
}

.srs-btn.hard {
  background: rgba(244, 63, 94, 0.15);
  color: var(--accent-rose);
  border: 1px solid rgba(244, 63, 94, 0.3);
}

.srs-btn.hard:hover {
  background: var(--accent-rose);
  color: white;
}

.srs-btn.good {
  background: rgba(59, 130, 246, 0.15);
  color: var(--accent-blue);
  border: 1px solid rgba(59, 130, 246, 0.3);
}

.srs-btn.good:hover {
  background: var(--accent-blue);
  color: white;
}

.srs-btn.easy {
  background: rgba(16, 185, 129, 0.15);
  color: var(--accent-emerald);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.srs-btn.easy:hover {
  background: var(--accent-emerald);
  color: white;
}

/* ==========================================================================
   MODAL FLOTANTE DE TRADUCCIÓN (TAP-TO-TRANSLATE)
   ========================================================================== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(8px);
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.modal-backdrop.active {
  display: flex;
}

.translate-modal {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 480px;
  padding: 1.5rem;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
  position: relative;
  animation: modalScale 0.2s ease-out;
}

@keyframes modalScale {
  from { transform: scale(0.92); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.modal-close-btn {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.4rem;
  cursor: pointer;
}

.trans-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
  padding-right: 1.5rem;
}

.trans-modal-word {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--text-primary);
}

.trans-modal-phonetic {
  font-size: 0.95rem;
  color: var(--accent-cyan);
  margin-top: 0.15rem;
}

.trans-modal-translation {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--accent-emerald);
  margin-bottom: 0.75rem;
}

.trans-modal-def {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 1rem;
  line-height: 1.45;
}

.trans-modal-example {
  padding: 0.75rem 1rem;
  background: var(--bg-primary);
  border-left: 3px solid var(--accent-cyan);
  border-radius: 4px;
  margin-bottom: 1.25rem;
}

.trans-example-en {
  font-style: italic;
  font-size: 0.95rem;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
}

.trans-example-es {
  font-size: 0.82rem;
  color: var(--text-secondary);
}

.btn-primary {
  width: 100%;
  padding: 0.85rem;
  border-radius: var(--radius-md);
  border: none;
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-blue));
  color: white;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: all 0.2s ease;
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 15px var(--accent-cyan-glow);
}

/* ==========================================================================
   NAVEGACIÓN MÓVIL (BOTTOM NAVIGATION BAR)
   ========================================================================== */
.bottom-nav {
  display: none;
  height: 65px;
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 45;
  justify-content: space-around;
  align-items: center;
  padding: 0 0.5rem;
}

.bottom-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  font-size: 0.68rem;
  font-weight: 600;
  gap: 0.25rem;
  text-decoration: none;
  flex: 1;
  height: 100%;
  cursor: pointer;
  transition: all 0.15s ease;
}

.bottom-nav-item i {
  font-size: 1.25rem;
}

.bottom-nav-item.active {
  color: var(--accent-cyan);
}

/* ==========================================================================
   RESPONSIVE MEDIA QUERIES
   ========================================================================== */
@media (max-width: 900px) {
  .sidebar {
    display: none;
  }
  .bottom-nav {
    display: flex;
  }
  .tab-pane {
    height: calc(100% - 64px - 65px);
  }
  .content-padding {
    padding: 1rem 1rem 5rem 1rem;
  }
  .message-row {
    max-width: 92%;
  }
  .cards-grid {
    grid-template-columns: 1fr;
  }
}

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