/**
 * Estilos canónicos Midnight Slate para Frases estoicas y guía diaria
 * Cumplimiento estricto: Inter (cuerpo), Outfit (títulos), JetBrains Mono (citas/meta)
 * Controles táctiles >= 40px, selects responsivos con elipsis, temas claro/oscuro
 */

:root {
  --bg-main: #0b0f17;
  --bg-card: #121826;
  --bg-card-hover: #172033;
  --bg-input: #161e30;
  --bg-surface: #1e293b;
  --border-color: #222f46;
  --border-hover: #334466;

  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;

  --gold-accent: #d4af37;
  --gold-glow: rgba(212, 175, 55, 0.18);
  --gold-light: #fef08a;

  --color-primary: #3b82f6;
  --color-primary-hover: #2563eb;
  --color-success: #10b981;
  --color-danger: #ef4444;

  --shadow-sm: 0 2px 6px rgba(0, 0, 0, 0.35);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.6);

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-full: 9999px;

  --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="light"] {
  --bg-main: #f8fafc;
  --bg-card: #ffffff;
  --bg-card-hover: #f1f5f9;
  --bg-input: #ffffff;
  --bg-surface: #e2e8f0;
  --border-color: #cbd5e1;
  --border-hover: #94a3b8;

  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #64748b;

  --gold-accent: #b45309;
  --gold-glow: rgba(180, 83, 9, 0.12);
  --gold-light: #78350f;

  --shadow-sm: 0 2px 6px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 8px 20px rgba(15, 23, 42, 0.1);
  --shadow-lg: 0 16px 36px rgba(15, 23, 42, 0.14);
}

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

body {
  overflow-x: clip;
  width: 100%;
  max-width: 100%;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-color: var(--bg-main);
  color: var(--text-primary);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Outfit', sans-serif;
  color: var(--text-primary);
  font-weight: 700;
  letter-spacing: -0.015em;
  text-transform: none;
}

.mono-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem;
}

/* Layout institucional canónico */
.tool-layout {
  max-width: 1200px;
  width: 100%;
  margin: 1.5rem auto 3.5rem;
  padding: 0 1rem;
  flex: 1 0 auto;
}

.tool-with-sidebar {
  display: flex;
  gap: 2rem;
  align-items: flex-start;
  width: 100%;
}

.tool-main-content {
  flex: 1 1 0%;
  min-width: 0;
  width: 100%;
}

/* ==========================================================================
   TARJETA HERO: ORÁCULO ESTOICO / CITA DEL DÍA
   ========================================================================== */
.stoic-hero-card {
  position: relative;
  background: linear-gradient(145deg, var(--bg-card) 0%, rgba(18, 24, 38, 0.8) 100%);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 2.2rem 2.2rem 1.8rem;
  margin-bottom: 2rem;
  box-shadow: var(--shadow-md);
  transition: var(--transition);
  overflow: hidden;
}

[data-theme="light"] .stoic-hero-card {
  background: linear-gradient(145deg, #ffffff 0%, #f8fafc 100%);
  border-color: #e2e8f0;
}

.stoic-hero-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #3b82f6 0%, var(--gold-accent) 50%, #10b981 100%);
}

.hero-top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.8rem;
  padding-bottom: 1.2rem;
  border-bottom: 1px solid var(--border-color);
}

.hero-badge-group {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.hero-pill-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background-color: var(--gold-glow);
  color: var(--gold-accent);
  border: 1px solid rgba(212, 175, 55, 0.3);
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.hero-mode-label {
  display: inline-block;
  font-size: 0.78rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
}

.hero-quick-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-tool-action {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background-color: var(--bg-surface);
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
  padding: 0.45rem 0.85rem;
  border-radius: var(--radius-md);
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  height: 38px;
}

.btn-tool-action:hover {
  background-color: var(--bg-card-hover);
  color: var(--text-primary);
  border-color: var(--border-hover);
  transform: translateY(-1px);
}

.btn-tool-action.active-fav {
  background-color: rgba(239, 68, 68, 0.15);
  color: #ef4444;
  border-color: rgba(239, 68, 68, 0.4);
}

.btn-tool-action.active-fav svg {
  fill: #ef4444;
}

.btn-tool-action.speaking {
  background-color: rgba(59, 130, 246, 0.18);
  color: #3b82f6;
  border-color: #3b82f6;
  animation: pulse-border 1.5s infinite;
}

@keyframes pulse-border {
  0%, 100% { box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.4); }
  50% { box-shadow: 0 0 0 5px rgba(59, 130, 246, 0); }
}

/* Cuerpo de la cita destacada */
.hero-quote-body {
  position: relative;
  padding: 0.5rem 1.5rem;
  margin-bottom: 1.8rem;
}

.hero-quote-decor {
  position: absolute;
  font-family: 'Outfit', serif;
  font-size: 5rem;
  line-height: 1;
  color: var(--gold-accent);
  opacity: 0.22;
  user-select: none;
  pointer-events: none;
}

.hero-quote-decor.left {
  top: -1.5rem;
  left: -0.8rem;
}

.hero-quote-decor.right {
  bottom: -3.5rem;
  right: -0.2rem;
}

.hero-quote-text {
  font-family: 'Outfit', sans-serif;
  font-size: 1.55rem;
  font-weight: 500;
  line-height: 1.48;
  color: var(--text-primary);
  letter-spacing: -0.01em;
  margin: 0;
  position: relative;
  z-index: 1;
}

@media (min-width: 768px) {
  .hero-quote-text {
    font-size: 1.85rem;
  }
}

/* Autor y metadatos */
.hero-quote-author-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.8rem;
  padding: 0.9rem 1.2rem;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
}

.author-avatar-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold-accent) 0%, #b45309 100%);
  color: #ffffff;
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 1rem;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

.author-meta-info {
  flex: 1;
  min-width: 0;
}

.author-name {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 0.15rem;
  color: var(--text-primary);
}

.author-subtext {
  font-size: 0.85rem;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Acordeón de contexto y práctica */
.hero-practice-accordion {
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  margin-bottom: 1.8rem;
  background-color: rgba(18, 24, 38, 0.5);
  overflow: hidden;
}

[data-theme="light"] .hero-practice-accordion {
  background-color: #f8fafc;
}

.practice-accordion-header {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem 1.2rem;
  background: none;
  border: none;
  color: var(--text-primary);
  font-family: 'Outfit', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
  transition: var(--transition);
}

.practice-accordion-header:hover {
  background-color: var(--bg-surface);
}

.accordion-title {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--gold-accent);
}

.accordion-arrow {
  color: var(--text-secondary);
  transition: transform 0.3s ease;
}

.practice-accordion-header[aria-expanded="false"] .accordion-arrow {
  transform: rotate(-90deg);
}

.practice-accordion-content {
  padding: 1.2rem;
  border-top: 1px solid var(--border-color);
  transition: max-height 0.3s ease;
}

.practice-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.2rem;
}

@media (min-width: 768px) {
  .practice-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.practice-col {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.practice-subheading {
  font-size: 0.88rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 700;
}

.practice-text {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.55;
}

.highlight-practice {
  background-color: rgba(59, 130, 246, 0.08);
  border-left: 3px solid #3b82f6;
  padding: 0.65rem 0.9rem;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: var(--text-primary);
}

/* Controles de la parte inferior de la hero card */
.hero-bottom-controls {
  display: flex;
  gap: 0.85rem;
  flex-wrap: wrap;
}

.btn-primary-stoic {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  color: #ffffff;
  border: 1px solid #3b82f6;
  padding: 0.75rem 1.4rem;
  border-radius: var(--radius-md);
  font-family: 'Outfit', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  min-height: 44px;
  transition: var(--transition);
  box-shadow: 0 2px 10px rgba(37, 99, 235, 0.3);
}

.btn-primary-stoic:hover {
  background: linear-gradient(135deg, #1d4ed8 0%, #1e40af 100%);
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(37, 99, 235, 0.45);
}

.btn-secondary-stoic {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background-color: var(--bg-surface);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  padding: 0.75rem 1.2rem;
  border-radius: var(--radius-md);
  font-family: 'Outfit', sans-serif;
  font-size: 0.92rem;
  font-weight: 500;
  cursor: pointer;
  min-height: 44px;
  transition: var(--transition);
}

.btn-secondary-stoic:hover {
  background-color: var(--bg-card-hover);
  border-color: var(--border-hover);
  transform: translateY(-1px);
}

.btn-danger-stoic {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background-color: #dc2626;
  color: #ffffff;
  border: 1px solid #ef4444;
  padding: 0.65rem 1.2rem;
  border-radius: var(--radius-md);
  font-weight: 600;
  cursor: pointer;
  min-height: 42px;
  transition: var(--transition);
}

.btn-danger-stoic:hover {
  background-color: #b91c1c;
}

/* ==========================================================================
   PESTAÑAS DE NAVEGACIÓN
   ========================================================================== */
.stoic-tabs-bar {
  display: flex;
  gap: 0.5rem;
  border-bottom: 2px solid var(--border-color);
  margin-bottom: 1.8rem;
  overflow-x: auto;
  padding-bottom: 1px;
}

.tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-secondary);
  font-family: 'Outfit', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  padding: 0.75rem 1.2rem;
  cursor: pointer;
  white-space: nowrap;
  transition: var(--transition);
  margin-bottom: -2px;
  height: 44px;
}

.tab-btn:hover {
  color: var(--text-primary);
}

.tab-btn.active {
  color: var(--gold-accent);
  border-bottom-color: var(--gold-accent);
}

.tab-count-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: var(--bg-surface);
  color: var(--text-muted);
  font-size: 0.75rem;
  font-family: 'JetBrains Mono', monospace;
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-full);
  min-width: 22px;
}

.tab-btn.active .tab-count-badge {
  background-color: var(--gold-glow);
  color: var(--gold-accent);
}

/* ==========================================================================
   PANEL DE FILTROS Y BÚSQUEDA
   ========================================================================== */
.stoic-filters-panel {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.2rem;
  margin-bottom: 1.8rem;
  box-shadow: var(--shadow-sm);
}

.filters-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin-bottom: 1rem;
}

@media (min-width: 768px) {
  .filters-row {
    grid-template-columns: 2fr 1.2fr 1.2fr;
  }
}

.filter-group-search {
  display: flex;
  flex-direction: column;
}

.search-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.search-icon {
  position: absolute;
  left: 0.85rem;
  color: var(--text-muted);
  pointer-events: none;
}

.stoic-input {
  width: 100%;
  height: 44px;
  padding: 0.6rem 2.4rem 0.6rem 2.5rem;
  background-color: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
  transition: var(--transition);
}

.stoic-input:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

.btn-clear-search {
  position: absolute;
  right: 0.75rem;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.3rem;
  line-height: 1;
  cursor: pointer;
  padding: 0.2rem;
}

.filter-group-select {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.filter-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Desplegables <select> conforme a normas estrictas del sistema */
.stoic-select {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  height: 44px;
  padding: 0 2.5rem 0 0.85rem;
  background-color: var(--bg-input);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-family: 'Inter', sans-serif;
  font-size: 0.88rem;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.85rem center;
  background-size: 16px;
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow: hidden;
  cursor: pointer;
  transition: var(--transition);
}

.stoic-select:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

.stoic-select option,
.stoic-select optgroup {
  background-color: var(--bg-card);
  color: var(--text-primary);
  padding: 0.5rem;
}

/* Píldoras de filtrado rápido */
.quick-pills-container {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  padding-top: 0.8rem;
  border-top: 1px solid var(--border-color);
}

.quick-pill-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 500;
}

.quick-pill {
  background-color: var(--bg-surface);
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  padding: 0.3rem 0.75rem;
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  height: 32px;
}

.quick-pill:hover {
  color: var(--text-primary);
  border-color: var(--border-hover);
}

.quick-pill.active {
  background-color: #2563eb;
  color: #ffffff;
  border-color: #3b82f6;
}

/* ==========================================================================
   CUADRÍCULA DE CITAS DE LA BIBLIOTECA
   ========================================================================== */
.stoic-quotes-grid-section {
  margin-bottom: 3rem;
}

.grid-status-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.2rem;
  padding: 0 0.2rem;
}

.grid-status-text {
  font-size: 0.88rem;
  color: var(--text-muted);
  font-weight: 500;
}

.btn-text-link {
  background: none;
  border: none;
  color: #3b82f6;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  text-decoration: underline;
  padding: 0.2rem;
}

.stoic-quotes-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.2rem;
}

@media (min-width: 640px) {
  .stoic-quotes-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .stoic-quotes-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Tarjeta individual de la cuadrícula */
.quote-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.4rem;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.quote-card:hover {
  border-color: var(--border-hover);
  background-color: var(--bg-card-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

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

.quote-card-cat-badge {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--gold-accent);
  background-color: var(--gold-glow);
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 75%;
}

.quote-card-fav-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: var(--transition);
}

.quote-card-fav-btn:hover {
  color: #ef4444;
}

.quote-card-fav-btn.is-fav {
  color: #ef4444;
}

.quote-card-fav-btn.is-fav svg {
  fill: #ef4444;
}

.quote-card-body {
  flex: 1;
  margin-bottom: 1.2rem;
}

.quote-card-text {
  font-family: 'Outfit', sans-serif;
  font-size: 1.05rem;
  line-height: 1.5;
  color: var(--text-primary);
  font-weight: 500;
}

.quote-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  padding-top: 0.9rem;
  border-top: 1px solid var(--border-color);
  gap: 0.8rem;
}

.quote-card-author-box {
  flex: 1;
  min-width: 0;
}

.quote-card-author {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.quote-card-source {
  font-size: 0.78rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.quote-card-actions {
  display: flex;
  gap: 0.35rem;
  flex-shrink: 0;
}

.btn-card-action {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  background-color: var(--bg-surface);
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
}

.btn-card-action:hover {
  background-color: var(--bg-card-hover);
  color: var(--text-primary);
  border-color: var(--border-hover);
}

/* Estado vacío */
.empty-state-card {
  text-align: center;
  padding: 3.5rem 1.5rem;
  background-color: var(--bg-card);
  border: 1px dashed var(--border-color);
  border-radius: var(--radius-md);
  margin: 1rem 0;
}

.empty-state-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.empty-state-title {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}

.empty-state-desc {
  font-size: 0.92rem;
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
  max-width: 440px;
  margin-left: auto;
  margin-right: auto;
}

/* ==========================================================================
   SECCIÓN DE PILARES DEL ESTOICISMO (TAB)
   ========================================================================== */
.stoic-pillars-section {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 2rem;
  margin-bottom: 2.5rem;
}

.pillars-main-title {
  font-size: 1.6rem;
  margin-bottom: 0.8rem;
  color: var(--text-primary);
}

.pillars-intro {
  font-size: 0.98rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 2rem;
  max-width: 800px;
}

.pillars-cards-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

@media (min-width: 768px) {
  .pillars-cards-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.pillar-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  transition: var(--transition);
}

.pillar-card:hover {
  border-color: var(--gold-accent);
  transform: translateY(-2px);
}

.pillar-icon {
  font-size: 2rem;
  margin-bottom: 0.8rem;
}

.pillar-card-title {
  font-size: 1.18rem;
  margin-bottom: 0.6rem;
  color: var(--gold-accent);
}

.pillar-card-desc {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.55;
}

/* ==========================================================================
   MODALES (CANVAS PÓSTER Y CONFIRMACIÓN)
   ========================================================================== */
.stoic-modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(5, 8, 14, 0.78);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.stoic-modal-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 720px;
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: modal-pop 0.25s ease-out;
}

.stoic-modal-card.modal-sm {
  max-width: 440px;
}

@keyframes modal-pop {
  0% { transform: scale(0.95); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.2rem 1.5rem;
  border-bottom: 1px solid var(--border-color);
}

.modal-title {
  font-size: 1.25rem;
  color: var(--text-primary);
}

.btn-modal-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.8rem;
  line-height: 1;
  cursor: pointer;
  padding: 0.2rem 0.5rem;
  transition: var(--transition);
}

.btn-modal-close:hover {
  color: var(--text-primary);
}

.modal-body {
  padding: 1.5rem;
  overflow-y: auto;
  flex: 1;
}

.modal-intro {
  font-size: 0.88rem;
  color: var(--text-secondary);
  margin-bottom: 1.2rem;
}

.poster-config-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin-bottom: 1.4rem;
}

@media (min-width: 600px) {
  .poster-config-row {
    grid-template-columns: 1fr 1fr;
  }
}

.config-item {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.config-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
}

.poster-preview-wrapper {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 260px;
}

.poster-canvas {
  max-width: 100%;
  max-height: 380px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
  border-radius: 4px;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 0.8rem;
  padding: 1.2rem 1.5rem;
  border-top: 1px solid var(--border-color);
  background-color: rgba(18, 24, 38, 0.4);
}

/* ==========================================================================
   TOAST DE NOTIFICACIÓN
   ========================================================================== */
.stoic-toast {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background-color: #1e293b;
  color: #ffffff;
  border: 1px solid #3b82f6;
  padding: 0.75rem 1.2rem;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  font-size: 0.88rem;
  font-weight: 500;
  z-index: 10000;
  transform: translateY(100px);
  opacity: 0;
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.3s ease;
  pointer-events: none;
}

.stoic-toast.show {
  transform: translateY(0);
  opacity: 1;
}

/* ==========================================================================
   ADAPTACIÓN RESPONSIVE PARA MÓVIL
   ========================================================================== */
@media (max-width: 767px) {
  .stoic-hero-card {
    padding: 1.4rem 1.2rem;
  }

  .hero-quote-text {
    font-size: 1.35rem;
  }

  .hero-quick-actions {
    width: 100%;
    justify-content: space-between;
  }

  .btn-text-responsive {
    display: none;
  }

  .btn-tool-action {
    flex: 1;
    justify-content: center;
    padding: 0.45rem 0.5rem;
  }

  .hero-bottom-controls .btn-primary-stoic,
  .hero-bottom-controls .btn-secondary-stoic {
    width: 100%;
  }

  .author-subtext {
    white-space: normal;
  }

  .stoic-toast {
    left: 1rem;
    right: 1rem;
    bottom: 1.5rem;
    text-align: center;
  }
}
