/* mi-progreso/styles.css — estilo fantasy premium coherente con DOFUS Touch Atlas */

:root {
  --dark-bg:        #0b1320;
  --panel-bg:       #152238;
  --panel-bg-alt:   #111e33;
  --border-subtle:  rgba(70, 92, 122, 0.45);
  --border-gold:    rgba(240, 210, 143, 0.30);
  --gold:           #f0d28f;
  --gold-hover:     #ffd700;
  --gold-dim:       #c9a55a;
  --text-light:     #e0e0e0;
  --text-muted:     #8f9aad;
  --text-bright:    #fff2c8;
  --radius-md:      12px;
  --radius-lg:      16px;
  --radius-pill:    999px;
  --shadow-card:    0 18px 38px rgba(0, 0, 0, 0.28);
  --shadow-card-hover: 0 24px 48px rgba(0, 0, 0, 0.42);
  --font-body:      'Inter', sans-serif;
  --font-title:     'Cinzel', serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--text-light);
  background:
    radial-gradient(ellipse at top, rgba(36, 60, 100, 0.42), transparent 60%),
    radial-gradient(ellipse at bottom, rgba(80, 50, 110, 0.18), transparent 65%),
    linear-gradient(180deg, #06101e 0%, #0b1320 100%);
  background-attachment: fixed;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image: url('../textura.png');
  background-size: 1024px 1024px;
  background-repeat: repeat;
  opacity: 0.05;
  pointer-events: none;
  z-index: 0;
}

.progress-page {
  position: relative;
  z-index: 1;
  max-width: 1280px;
  margin: 0 auto;
  padding: 24px 28px 80px;
}

/* ───── Breadcrumbs ───── */
.breadcrumbs {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 18px;
  letter-spacing: 0.04em;
}
.breadcrumbs a {
  color: var(--gold-dim);
  text-decoration: none;
  transition: color .15s ease;
}
.breadcrumbs a:hover { color: var(--gold); }

/* ───── HERO ───── */
.progress-hero {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-gold);
  background:
    linear-gradient(135deg, rgba(16, 41, 77, 0.78), rgba(8, 18, 36, 0.88)),
    radial-gradient(circle at 80% 20%, rgba(240, 210, 143, 0.10), transparent 55%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 22px 52px rgba(0, 0, 0, 0.45),
    0 0 32px rgba(240, 210, 143, 0.06);
  padding: 36px 38px 40px;
  margin-bottom: 28px;
}
.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 110%, rgba(80, 130, 200, 0.18), transparent 50%),
    radial-gradient(circle at 110% 0%, rgba(240, 210, 143, 0.10), transparent 50%);
  pointer-events: none;
}
.hero-particles {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    radial-gradient(1.5px 1.5px at 14% 32%, rgba(240, 210, 143, 0.6), transparent 60%),
    radial-gradient(1px 1px at 70% 18%, rgba(240, 210, 143, 0.4), transparent 60%),
    radial-gradient(1.5px 1.5px at 84% 70%, rgba(159, 212, 232, 0.45), transparent 60%),
    radial-gradient(1px 1px at 30% 80%, rgba(255, 255, 255, 0.35), transparent 60%),
    radial-gradient(1px 1px at 55% 50%, rgba(240, 210, 143, 0.3), transparent 60%);
  opacity: 0.85;
  animation: drift 18s linear infinite;
}
@keyframes drift {
  0%   { transform: translate3d(0,  0, 0); }
  50%  { transform: translate3d(8px, -6px, 0); }
  100% { transform: translate3d(0,  0, 0); }
}

.hero-content { position: relative; z-index: 1; }
.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
  padding: 5px 11px;
  border: 1px solid rgba(240, 210, 143, 0.32);
  border-radius: var(--radius-pill);
  background: rgba(240, 210, 143, 0.06);
  margin-bottom: 14px;
}
.progress-hero h1 {
  font-family: var(--font-title);
  font-size: clamp(28px, 3.8vw, 42px);
  font-weight: 800;
  margin: 0 0 6px;
  color: var(--text-bright);
  letter-spacing: 0.02em;
  text-shadow: 0 1px 0 rgba(0,0,0,0.55), 0 0 16px rgba(240, 210, 143, 0.15);
}
.hero-subtitle {
  color: var(--text-muted);
  max-width: 640px;
  margin: 0 0 26px;
  line-height: 1.55;
}

/* ── Stats del hero ── */
.hero-stats {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 32px;
  align-items: center;
}

/* Anillo de progreso */
.ring-container {
  position: relative;
  width: 160px;
  height: 160px;
}
.progress-ring {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}
.ring-bg, .ring-fg {
  fill: none;
  stroke-width: 10;
}
.ring-bg {
  stroke: rgba(70, 92, 122, 0.35);
}
.ring-fg {
  stroke: url(#ringGrad);
  stroke-linecap: round;
  stroke-dasharray: 377;
  stroke-dashoffset: 377;
  transition: stroke-dashoffset 0.6s cubic-bezier(.2,.7,.2,1);
  filter: drop-shadow(0 0 6px rgba(240, 210, 143, 0.4));
}
.ring-center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
}
.ring-pct {
  font-family: var(--font-title);
  font-size: 30px;
  font-weight: 800;
  color: var(--gold);
  text-shadow: 0 0 12px rgba(240, 210, 143, 0.35);
}
.ring-label {
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* Mini stats */
.hero-mini-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 12px;
}
.mini-stat {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  background:
    linear-gradient(135deg, rgba(21, 34, 56, 0.85), rgba(11, 19, 32, 0.82));
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.mini-stat:hover {
  transform: translateY(-2px);
  border-color: rgba(240, 210, 143, 0.45);
  box-shadow: 0 12px 24px rgba(0,0,0,0.32), 0 0 18px rgba(240, 210, 143, 0.08);
}
.mini-stat i {
  font-size: 22px;
  color: var(--gold);
  filter: drop-shadow(0 0 6px rgba(240, 210, 143, 0.25));
}
.mini-num {
  font-family: var(--font-title);
  font-size: 20px;
  font-weight: 800;
  color: var(--text-bright);
}
.mini-label {
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.streak-stat i {
  color: #ff8a3a;
  filter: drop-shadow(0 0 10px rgba(255, 138, 58, 0.5));
  animation: flicker 2.4s ease-in-out infinite;
}
@keyframes flicker {
  0%, 100% { transform: scale(1)   rotate(-2deg); opacity: 1;    }
  50%      { transform: scale(1.08) rotate(2deg); opacity: 0.92; }
}

/* Callouts del hero ("Te faltan X mazmorras") */
.hero-callouts {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}
.callout {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  font-size: 13px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-subtle);
  background: rgba(11, 19, 32, 0.6);
  color: var(--text-light);
}
.callout i { color: var(--gold); }
.callout.callout--success { border-color: rgba(126, 207, 106, 0.4); }
.callout.callout--success i { color: #7ecf6a; }

/* ───── TABS ───── */
.progress-tabs {
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-subtle);
  background: linear-gradient(180deg, rgba(21, 34, 56, 0.75), rgba(11, 19, 32, 0.78));
  box-shadow: var(--shadow-card);
  overflow: hidden;
  margin-bottom: 28px;
}
.tabs-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 12px 12px 0;
  border-bottom: 1px solid var(--border-subtle);
  background:
    linear-gradient(180deg, rgba(16, 28, 50, 0.92), rgba(11, 19, 32, 0.7));
}
.tab-btn {
  position: relative;
  border: 0;
  background: transparent;
  color: var(--text-muted);
  font: 600 13px/1 var(--font-body);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 12px 18px 14px;
  cursor: pointer;
  border-radius: 10px 10px 0 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: color .15s ease, background .15s ease;
}
.tab-btn i { font-size: 14px; }
.tab-btn:hover { color: var(--gold); background: rgba(240, 210, 143, 0.05); }
.tab-btn.is-active {
  color: var(--gold);
  background: rgba(240, 210, 143, 0.08);
  text-shadow: 0 0 10px rgba(240, 210, 143, 0.3);
}
.tab-btn.is-active::after {
  content: "";
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  box-shadow: 0 0 10px rgba(240, 210, 143, 0.6);
}

.tab-toolbar {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-subtle);
}
.tab-search {
  flex: 1 1 220px;
  min-height: 36px;
  padding: 8px 14px;
  border-radius: 8px;
  border: 1px solid var(--border-subtle);
  background: rgba(8, 16, 30, 0.75);
  color: var(--text-light);
  font-family: var(--font-body);
  outline: none;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.tab-search:focus {
  border-color: rgba(240, 210, 143, 0.45);
  box-shadow: 0 0 0 3px rgba(240, 210, 143, 0.08);
}
.tab-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.filter-chip {
  font-size: 12px;
  letter-spacing: 0.04em;
  border: 1px solid var(--border-subtle);
  background: rgba(11, 19, 32, 0.5);
  color: var(--text-muted);
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: all .15s ease;
}
.filter-chip:hover { color: var(--gold); border-color: var(--gold-dim); }
.filter-chip.is-active {
  color: var(--dark-bg);
  background: linear-gradient(180deg, #ffd994, #d8a957);
  border-color: var(--gold);
  box-shadow: 0 0 12px rgba(240, 210, 143, 0.35);
}

.tab-panels { padding: 18px; }
.tab-panel { display: none; }
.tab-panel.is-active { display: block; animation: fadeIn .25s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

/* Barra de progreso por categoría */
.progress-bar {
  height: 8px;
  border-radius: var(--radius-pill);
  background: rgba(70, 92, 122, 0.3);
  overflow: hidden;
  margin-bottom: 18px;
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.5);
}
.progress-bar-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #c9a55a, #f0d28f, #ffd700);
  background-size: 200% 100%;
  border-radius: var(--radius-pill);
  box-shadow: 0 0 12px rgba(240, 210, 143, 0.5);
  transition: width 0.6s cubic-bezier(.2,.7,.2,1);
  animation: shimmer 4s linear infinite;
}
@keyframes shimmer {
  from { background-position: 0% 50%; }
  to   { background-position: 200% 50%; }
}

/* ───── Grid de items ───── */
.items-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
}
.items-grid--oficios {
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}

.item-card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  background: linear-gradient(135deg, rgba(21, 34, 56, 0.82), rgba(11, 19, 32, 0.78));
  cursor: pointer;
  user-select: none;
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease, background .18s ease;
  overflow: hidden;
}
.item-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 30% 0%, rgba(240, 210, 143, 0.12), transparent 60%);
  opacity: 0;
  transition: opacity .2s ease;
  pointer-events: none;
}
.item-card:hover {
  transform: translateY(-2px);
  border-color: rgba(240, 210, 143, 0.45);
  box-shadow: var(--shadow-card-hover), 0 0 20px rgba(240, 210, 143, 0.08);
}
.item-card:hover::before { opacity: 1; }

.item-card.is-completed {
  border-color: rgba(126, 207, 106, 0.55);
  background:
    radial-gradient(circle at 100% 0%, rgba(126, 207, 106, 0.1), transparent 60%),
    linear-gradient(135deg, rgba(20, 42, 30, 0.7), rgba(11, 19, 32, 0.82));
  box-shadow: inset 0 0 0 1px rgba(126, 207, 106, 0.15), 0 0 18px rgba(126, 207, 106, 0.08);
}
.item-card.is-completed .item-check {
  background: linear-gradient(180deg, #7ecf6a, #4f9b3e);
  border-color: rgba(126, 207, 106, 0.7);
  color: #fff;
  box-shadow: 0 0 12px rgba(126, 207, 106, 0.5);
}

.item-check {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  background: rgba(11, 19, 32, 0.6);
  color: transparent;
  font-size: 14px;
  transition: all .18s ease;
}

.item-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.item-name {
  font-weight: 700;
  font-size: 14px;
  color: var(--text-bright);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.item-meta {
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}
.item-meta strong { color: var(--gold-dim); font-weight: 700; }

.item-link {
  flex-shrink: 0;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 13px;
  padding: 4px 8px;
  border-radius: 6px;
  transition: color .15s ease, background .15s ease;
}
.item-link:hover { color: var(--gold); background: rgba(240, 210, 143, 0.08); }

/* Card de Oficios: slider de nivel */
.oficio-level-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 6px;
}
.oficio-level-input {
  width: 60px;
  padding: 4px 6px;
  text-align: center;
  border-radius: 6px;
  border: 1px solid var(--border-subtle);
  background: rgba(8, 16, 30, 0.85);
  color: var(--gold);
  font-weight: 700;
  outline: none;
  font-family: var(--font-body);
}
.oficio-level-input:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(240, 210, 143, 0.1);
}
.oficio-level-bar {
  flex: 1;
  height: 6px;
  background: rgba(70, 92, 122, 0.3);
  border-radius: var(--radius-pill);
  overflow: hidden;
}
.oficio-level-fill {
  height: 100%;
  background: linear-gradient(90deg, #4aabcc, #f0d28f);
  border-radius: var(--radius-pill);
  transition: width 0.4s ease;
}
.item-card.items-grid--oficios .item-info,
.items-grid--oficios .item-info {
  width: 100%;
}

/* Empty state */
.empty-state {
  padding: 40px 20px;
  text-align: center;
  color: var(--text-muted);
  font-style: italic;
}

/* ───── HERRAMIENTAS ───── */
.progress-tools {
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-subtle);
  background: linear-gradient(180deg, rgba(21, 34, 56, 0.6), rgba(11, 19, 32, 0.78));
  padding: 24px 26px;
  box-shadow: var(--shadow-card);
}
.progress-tools h2 {
  font-family: var(--font-title);
  font-size: 20px;
  margin: 0 0 8px;
  color: var(--gold);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.tools-note { color: var(--text-muted); margin: 0 0 18px; font-size: 14px; }
.tools-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.btn {
  position: relative;
  border: 0;
  cursor: pointer;
  font-family: var(--font-body);
  font-weight: 700;
  letter-spacing: 0.04em;
  font-size: 14px;
  padding: 11px 18px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  transition: transform .15s ease, box-shadow .15s ease, filter .15s ease;
}
.btn:hover { transform: translateY(-1px); filter: brightness(1.05); }
.btn:active { transform: translateY(0); }
.btn-gold {
  color: #1a1a1a;
  background: linear-gradient(180deg, #ffd994 0%, #d8a957 100%);
  box-shadow: 0 6px 16px rgba(216, 169, 87, 0.3), inset 0 1px 0 rgba(255,255,255,0.3);
}
.btn-blue {
  color: #f0f4ff;
  background: linear-gradient(180deg, #3b6db5 0%, #234b86 100%);
  box-shadow: 0 6px 16px rgba(59, 109, 181, 0.3), inset 0 1px 0 rgba(255,255,255,0.15);
}
.btn-ghost {
  color: var(--text-muted);
  background: transparent;
  border: 1px solid var(--border-subtle);
}
.btn-ghost:hover { color: #ff6b6b; border-color: #ff6b6b; }

/* ───── FOOTER ───── */
.progress-footer {
  text-align: center;
  padding: 28px 16px;
  color: var(--text-muted);
  font-size: 12px;
  letter-spacing: 0.06em;
  border-top: 1px solid var(--border-subtle);
  margin-top: 40px;
}

/* ───── RESPONSIVE ───── */
@media (max-width: 720px) {
  .progress-page { padding: 16px 14px 60px; }
  .progress-hero { padding: 24px 20px 28px; }
  .hero-stats {
    grid-template-columns: 1fr;
    text-align: center;
    justify-items: center;
  }
  .hero-mini-stats { width: 100%; }
  .ring-container { width: 130px; height: 130px; }
  .ring-pct { font-size: 24px; }
}
