/* ── Variables ──────────────────────────────────────────────────────────────── */
:root {
  --bg-deep:    #080810;
  --bg-main:    #0d0d1a;
  --bg-card:    #13132a;
  --bg-card2:   #1a1a35;
  --border:     #2a2a50;
  --gold:       #c9a84c;
  --gold-light: #e8c76a;
  --gold-dark:  #8b6914;
  --gold-glow:  rgba(201,168,76,.25);
  --text:       #d4c9a8;
  --text-muted: #7a7060;
  --text-dim:   #a09070;
  --red:        #9b2020;
  --green:      #1e6e30;
  --green-light:#2ecc71;
  --radius:     6px;
  --shadow:     0 4px 24px rgba(0,0,0,.6);
  --transition: .2s ease;
}

/* ── Reset ───────────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Crimson Text', Georgia, serif;
  font-size: 18px;
  background: var(--bg-deep);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}
img { max-width: 100%; display: block; }
a { color: var(--gold); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--gold-light); }

/* ── Typography ──────────────────────────────────────────────────────────────── */
h1, h2, h3, h4 {
  font-family: 'Cinzel', 'Times New Roman', serif;
  font-weight: 700;
  line-height: 1.2;
  color: var(--gold-light);
  letter-spacing: .04em;
}
h1 { font-size: clamp(1.8rem, 4vw, 3rem); }
h2 { font-size: clamp(1.4rem, 3vw, 2rem); }
h3 { font-size: 1.2rem; }

/* ── Layout ──────────────────────────────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: 1140px;
  margin-inline: auto;
  padding-inline: 1.25rem;
}

/* ── Buttons ─────────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .6rem 1.4rem;
  border-radius: var(--radius);
  font-family: 'Cinzel', serif;
  font-size: .85rem;
  font-weight: 600;
  letter-spacing: .06em;
  cursor: pointer;
  border: none;
  transition: all var(--transition);
  text-transform: uppercase;
}
.btn-gold {
  background: linear-gradient(135deg, var(--gold-dark), var(--gold));
  color: #0d0d1a;
}
.btn-gold:hover {
  background: linear-gradient(135deg, var(--gold), var(--gold-light));
  color: #080810;
  box-shadow: 0 0 18px var(--gold-glow);
}
.btn-outline {
  background: transparent;
  border: 1px solid var(--gold);
  color: var(--gold);
}
.btn-outline:hover {
  background: var(--gold-glow);
  color: var(--gold-light);
}
.btn-lg { padding: .85rem 2rem; font-size: 1rem; }

/* ── Header ──────────────────────────────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(8,8,16,.92);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(10px);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  gap: 1rem;
}
.logo {
  display: flex;
  align-items: center;
  gap: .5rem;
  color: var(--text);
}
.logo:hover { color: var(--gold-light); }
.logo-icon { font-size: 1.5rem; }
.logo-text {
  font-family: 'Cinzel', serif;
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: .08em;
}
.gold { color: var(--gold); }

.main-nav {
  display: flex;
  align-items: center;
  gap: .25rem;
}
.nav-link {
  padding: .4rem .75rem;
  border-radius: var(--radius);
  font-family: 'Cinzel', serif;
  font-size: .8rem;
  letter-spacing: .06em;
  color: var(--text-dim);
  transition: all var(--transition);
}
.nav-link:hover, .nav-link.active {
  color: var(--gold-light);
  background: rgba(201,168,76,.08);
}
.nav-cta { margin-left: .5rem; }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: .5rem;
}
.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--gold);
  border-radius: 2px;
  transition: all var(--transition);
}

/* ── Hero ────────────────────────────────────────────────────────────────────── */
.hero {
  position: relative;
  min-height: 88vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  background: var(--bg-deep);
}
.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 50% 40%, rgba(201,168,76,.07) 0%, transparent 70%),
    linear-gradient(180deg, rgba(8,8,16,0) 60%, var(--bg-deep) 100%);
  z-index: 1;
}
.hero-bg-img {
  position: absolute;
  inset: 0;
  background-image: url('/assets/img/hero-bg.jpg');
  background-size: cover;
  background-position: center;
  opacity: .18;
  z-index: 0;
}
.hero-content {
  position: relative;
  z-index: 2;
  max-width: 680px;
}
.hero-badge {
  display: inline-block;
  padding: .3rem .9rem;
  background: rgba(201,168,76,.12);
  border: 1px solid var(--gold-dark);
  border-radius: 99px;
  font-family: 'Cinzel', serif;
  font-size: .75rem;
  letter-spacing: .1em;
  color: var(--gold);
  margin-bottom: 1.5rem;
  text-transform: uppercase;
}
.hero-title { margin-bottom: 1rem; }
.hero-subtitle {
  font-size: 1.15rem;
  color: var(--text-dim);
  max-width: 500px;
  margin-bottom: 2rem;
}
.hero-actions { display: flex; gap: 1rem; flex-wrap: wrap; }
.hero-status {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  margin-top: 2.5rem;
  padding: .5rem 1rem;
  background: rgba(255,255,255,.04);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: .9rem;
  color: var(--text-dim);
}
.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #555;
}
.status-dot.online { background: var(--green-light); box-shadow: 0 0 6px var(--green-light); animation: pulse 2s infinite; }
.status-dot.offline { background: var(--red); }
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:.5} }

/* ── Section ─────────────────────────────────────────────────────────────────── */
.section { padding: 5rem 0; }
.section-header { text-align: center; margin-bottom: 3rem; }
.section-header h2 { margin-bottom: .5rem; }
.section-header p { color: var(--text-muted); }
.section-divider {
  width: 60px;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  margin: 1rem auto;
}

/* ── Cards ───────────────────────────────────────────────────────────────────── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.card:hover {
  border-color: var(--gold-dark);
  box-shadow: 0 0 20px rgba(201,168,76,.08);
}

/* ── News grid ───────────────────────────────────────────────────────────────── */
.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}
.news-card { display: flex; flex-direction: column; }
.news-card-img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-radius: var(--radius) var(--radius) 0 0;
  background: var(--bg-card2);
}
.news-card-img-placeholder {
  width: 100%;
  height: 180px;
  background: linear-gradient(135deg, var(--bg-card2), var(--bg-deep));
  border-radius: var(--radius) var(--radius) 0 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  color: var(--border);
}
.news-card-body { flex: 1; padding: 1.25rem; }
.news-meta {
  font-size: .8rem;
  color: var(--text-muted);
  margin-bottom: .5rem;
  display: flex;
  gap: 1rem;
}
.news-meta .gold { font-size: .8rem; }
.news-card-body h3 { margin-bottom: .5rem; font-size: 1.05rem; }
.news-card-body p { font-size: .95rem; color: var(--text-dim); }

/* ── Ranking table ───────────────────────────────────────────────────────────── */
.rank-tabs {
  display: flex;
  gap: .5rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}
.rank-tab {
  padding: .4rem 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-family: 'Cinzel', serif;
  font-size: .78rem;
  letter-spacing: .06em;
  color: var(--text-dim);
  cursor: pointer;
  transition: all var(--transition);
  text-transform: uppercase;
}
.rank-tab.active, .rank-tab:hover {
  border-color: var(--gold-dark);
  color: var(--gold-light);
  background: rgba(201,168,76,.08);
}
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
thead th {
  font-family: 'Cinzel', serif;
  font-size: .75rem;
  letter-spacing: .08em;
  color: var(--gold);
  text-align: left;
  padding: .75rem 1rem;
  border-bottom: 1px solid var(--border);
  text-transform: uppercase;
  white-space: nowrap;
}
tbody td {
  padding: .75rem 1rem;
  border-bottom: 1px solid rgba(42,42,80,.5);
  font-size: .95rem;
  color: var(--text);
  white-space: nowrap;
}
tbody tr:hover { background: rgba(201,168,76,.04); }
tbody tr:last-child td { border-bottom: none; }
.rank-pos {
  font-family: 'Cinzel', serif;
  font-weight: 700;
  color: var(--text-muted);
}
.rank-pos.top1 { color: #ffd700; }
.rank-pos.top2 { color: #c0c0c0; }
.rank-pos.top3 { color: #cd7f32; }
.badge-clase {
  display: inline-block;
  padding: .2rem .6rem;
  background: rgba(201,168,76,.1);
  border: 1px solid var(--gold-dark);
  border-radius: 99px;
  font-size: .75rem;
  color: var(--gold);
  font-family: 'Cinzel', serif;
}

/* ── Store ───────────────────────────────────────────────────────────────────── */
.store-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.5rem;
}
.store-card {
  display: flex;
  flex-direction: column;
  text-align: center;
}
.store-card-img {
  width: 100%;
  height: 160px;
  object-fit: contain;
  background: var(--bg-deep);
  border-radius: var(--radius) var(--radius) 0 0;
  padding: 1rem;
}
.store-card-img-placeholder {
  width: 100%;
  height: 160px;
  background: var(--bg-deep);
  border-radius: var(--radius) var(--radius) 0 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4rem;
}
.store-card-body { padding: 1.25rem; flex: 1; display: flex; flex-direction: column; gap: .75rem; }
.store-card-body h3 { font-size: 1rem; }
.store-card-body p { font-size: .9rem; color: var(--text-muted); flex: 1; }
.store-price {
  font-family: 'Cinzel', serif;
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--gold);
}
.store-price span { font-size: .75rem; color: var(--text-muted); }

/* ── Features ────────────────────────────────────────────────────────────────── */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1.5rem;
}
.feature-card { text-align: center; }
.feature-icon { font-size: 2.5rem; margin-bottom: 1rem; }
.feature-card h3 { margin-bottom: .5rem; font-size: 1rem; }
.feature-card p { font-size: .9rem; color: var(--text-muted); }

/* ── Download section ────────────────────────────────────────────────────────── */
.download-section {
  background: linear-gradient(135deg, var(--bg-card), var(--bg-card2));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 3rem;
  text-align: center;
}
.download-section h2 { margin-bottom: 1rem; }
.download-section p { color: var(--text-dim); margin-bottom: 2rem; }
.download-meta { display: flex; justify-content: center; gap: 2rem; flex-wrap: wrap; margin-top: 1.5rem; }
.download-meta span { font-size: .85rem; color: var(--text-muted); }

/* ── Footer ──────────────────────────────────────────────────────────────────── */
.site-footer {
  background: var(--bg-deep);
  border-top: 1px solid var(--border);
  margin-top: 4rem;
}
.footer-inner {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 2rem;
  padding: 3rem 1.25rem;
}
.footer-brand .logo-text { display: block; font-size: 1.1rem; margin-bottom: .5rem; }
.footer-tagline { font-size: .9rem; color: var(--text-muted); margin-top: .5rem; }
.footer-nav { display: flex; flex-direction: column; gap: .5rem; }
.footer-nav h4 {
  font-family: 'Cinzel', serif;
  font-size: .75rem;
  letter-spacing: .1em;
  color: var(--gold);
  text-transform: uppercase;
  margin-bottom: .5rem;
}
.footer-nav a { font-size: .9rem; color: var(--text-muted); }
.footer-nav a:hover { color: var(--gold-light); }
.footer-status h4 {
  font-family: 'Cinzel', serif;
  font-size: .75rem;
  letter-spacing: .1em;
  color: var(--gold);
  text-transform: uppercase;
  margin-bottom: .75rem;
}
.status-indicator { display: flex; align-items: center; gap: .5rem; }
.status-text { font-size: .9rem; }
.online-count { font-size: .85rem; color: var(--text-muted); margin-top: .5rem; }
.footer-bottom {
  border-top: 1px solid var(--border);
  padding: 1rem 1.25rem;
  text-align: center;
  font-size: .8rem;
  color: var(--text-muted);
}

/* ── Alert / Flash ───────────────────────────────────────────────────────────── */
.alert {
  padding: .85rem 1.25rem;
  border-radius: var(--radius);
  margin-bottom: 1.25rem;
  font-size: .95rem;
  border-left: 3px solid;
}
.alert-error   { background: rgba(155,32,32,.15); border-color: var(--red);   color: #e88; }
.alert-success { background: rgba(30,110,48,.15);  border-color: var(--green); color: #6e8; }
.alert-info    { background: rgba(201,168,76,.1);  border-color: var(--gold);  color: var(--gold-light); }

/* ── Forms ───────────────────────────────────────────────────────────────────── */
.form-group { display: flex; flex-direction: column; gap: .4rem; margin-bottom: 1.25rem; }
label {
  font-family: 'Cinzel', serif;
  font-size: .78rem;
  letter-spacing: .06em;
  color: var(--gold);
  text-transform: uppercase;
}
input[type="text"],
input[type="password"],
input[type="email"] {
  width: 100%;
  padding: .7rem 1rem;
  background: rgba(255,255,255,.04);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-family: inherit;
  font-size: 1rem;
  transition: border-color var(--transition);
  outline: none;
}
input:focus { border-color: var(--gold-dark); }

/* ── Login page ──────────────────────────────────────────────────────────────── */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  background:
    radial-gradient(ellipse 60% 60% at 50% 50%, rgba(201,168,76,.06) 0%, transparent 70%),
    var(--bg-deep);
}
.login-box {
  width: 100%;
  max-width: 420px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2.5rem;
  box-shadow: var(--shadow);
}
.login-logo { text-align: center; margin-bottom: 2rem; }
.login-logo .logo-icon { font-size: 2.5rem; display: block; margin-bottom: .5rem; }

/* ── Panel layout ────────────────────────────────────────────────────────────── */
.panel-body { background: var(--bg-main); }
.panel-layout { display: flex; min-height: 100vh; }

.panel-sidebar {
  width: 240px;
  min-height: 100vh;
  background: var(--bg-deep);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  padding: 1.5rem 1rem;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  flex-shrink: 0;
}
.panel-logo { margin-bottom: 1.5rem; }
.panel-logo a { display: flex; align-items: center; gap: .5rem; }

.panel-user-info {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .75rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 1.5rem;
}
.panel-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold-dark), var(--gold));
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Cinzel', serif;
  font-weight: 700;
  font-size: 1rem;
  color: #0d0d1a;
  flex-shrink: 0;
}
.panel-username { font-size: .9rem; font-weight: 600; color: var(--gold-light); }
.panel-role { font-size: .75rem; color: var(--text-muted); }

.panel-nav { display: flex; flex-direction: column; gap: .25rem; flex: 1; }
.panel-nav-link {
  display: flex;
  align-items: center;
  gap: .6rem;
  padding: .6rem .85rem;
  border-radius: var(--radius);
  font-size: .9rem;
  color: var(--text-dim);
  transition: all var(--transition);
}
.panel-nav-link:hover, .panel-nav-link.active {
  background: rgba(201,168,76,.1);
  color: var(--gold-light);
}
.nav-icon { font-size: 1rem; width: 20px; text-align: center; }
.panel-logout {
  display: flex;
  align-items: center;
  gap: .5rem;
  padding: .6rem .85rem;
  border-radius: var(--radius);
  font-size: .85rem;
  color: var(--text-muted);
  transition: all var(--transition);
  margin-top: 1rem;
  border-top: 1px solid var(--border);
  padding-top: 1rem;
}
.panel-logout:hover { color: #e88; }

.panel-content { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.panel-topbar {
  background: var(--bg-deep);
  border-bottom: 1px solid var(--border);
  padding: 1rem 1.5rem;
}
.panel-page-title { font-size: 1.1rem; color: var(--gold-light); }
.panel-main { padding: 1.5rem; flex: 1; }

/* ── Stats grid ──────────────────────────────────────────────────────────────── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.1rem;
  text-align: center;
}
.stat-icon { font-size: 1.5rem; margin-bottom: .4rem; }
.stat-value {
  font-family: 'Cinzel', serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--gold-light);
}
.stat-label { font-size: .78rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: .06em; }

/* ── Panel grid ──────────────────────────────────────────────────────────────── */
.panel-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

/* ── Table in panel ──────────────────────────────────────────────────────────── */
.panel-table { width: 100%; }
.panel-table th {
  font-family: 'Cinzel', serif;
  font-size: .72rem;
  letter-spacing: .08em;
  color: var(--gold);
  text-transform: uppercase;
  padding: .65rem .85rem;
  border-bottom: 1px solid var(--border);
  text-align: left;
}
.panel-table td {
  padding: .65rem .85rem;
  font-size: .9rem;
  border-bottom: 1px solid rgba(42,42,80,.5);
  color: var(--text);
}
.panel-table tr:last-child td { border-bottom: none; }
.panel-table tr:hover td { background: rgba(201,168,76,.03); }

/* Estado badges */
.badge {
  display: inline-block;
  padding: .15rem .6rem;
  border-radius: 99px;
  font-size: .75rem;
  font-family: 'Cinzel', serif;
}
.badge-ok      { background: rgba(30,110,48,.25); color: #6e8; border: 1px solid #1e6e30; }
.badge-pending { background: rgba(201,168,76,.15); color: var(--gold); border: 1px solid var(--gold-dark); }
.badge-fail    { background: rgba(155,32,32,.2);  color: #e88; border: 1px solid var(--red); }

/* ── Loading / Skeleton ──────────────────────────────────────────────────────── */
.skeleton {
  background: linear-gradient(90deg, var(--bg-card) 25%, var(--bg-card2) 50%, var(--bg-card) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
  border-radius: var(--radius);
}
@keyframes shimmer { 0%{background-position:200% 0} 100%{background-position:-200% 0} }

/* ── Responsive ──────────────────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .panel-grid   { grid-template-columns: 1fr; }
}
@media (max-width: 700px) {
  .main-nav { display: none; flex-direction: column; position: absolute; top: 64px; left: 0; right: 0; background: rgba(8,8,16,.98); border-bottom: 1px solid var(--border); padding: 1rem; gap: .25rem; }
  .main-nav.open { display: flex; }
  .nav-toggle { display: flex; }
  .site-header { position: relative; }
  .footer-inner { grid-template-columns: 1fr; }
  .panel-sidebar { display: none; }
  .panel-layout { flex-direction: column; }
  .hero { min-height: 70vh; }
  .download-section { padding: 2rem 1.25rem; }
}
@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .hero-actions { flex-direction: column; }
}
