/* =========================
   Base
========================= */
:root{
  --bg: #0b1020;
  --surface: #0f1730;
  --card: #111c38;
  --card2: #0e1833;
  --border: rgba(255,255,255,.08);
  --text: rgba(255,255,255,.92);
  --muted: rgba(255,255,255,.72);
  --muted2: rgba(255,255,255,.60);
  --link: #8ab4ff;

  --green: #28c76f;
  --orange: #ff8a4c;
  --red: #ff5a5f;

  --shadow: 0 10px 30px rgba(0,0,0,.35);
  --radius: 14px;
}

*{ box-sizing: border-box; }
html, body{ height: 100%; }
body{
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  background: radial-gradient(900px 500px at 20% 0%, rgba(138,180,255,.15), transparent 60%),
              radial-gradient(900px 600px at 80% 10%, rgba(255,138,76,.12), transparent 65%),
              var(--bg);
  color: var(--text);
  line-height: 1.5;
}

a{
  color: var(--link);
  text-decoration: none;
}
a:hover{ text-decoration: underline; }

.container{
  max-width: 980px;
  margin: 0 auto;
  padding: 0 18px;
}

/* =========================
   Topbar
========================= */
.topbar{
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(11,16,32,.75);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.topbar__inner{
  display: flex;
  gap: 14px;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
}

.topbar__left{
  display: flex;
  gap: 10px;
  align-items: center;
  min-width: 0;
}

.topbar__text{
  font-size: 12.5px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.topbar__right{
  display: flex;
  gap: 8px;
  align-items: center;
  font-size: 12.5px;
  color: var(--muted);
}

.topbar__muted{ color: var(--muted2); }

/* Connection status */
.connection-status{
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 8px;
  background: rgba(255,255,255,.04);
  font-size: 11.5px;
  font-weight: 600;
  border: 1px solid var(--border);
}

.connection-dot{
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--muted);
  animation: pulse 2s infinite;
}

.connection-status.online .connection-dot{
  background: var(--green);
  box-shadow: 0 0 8px rgba(40,199,111,.5);
}

.connection-status.offline .connection-dot{
  background: var(--orange);
  box-shadow: 0 0 8px rgba(255,138,76,.5);
  animation: none;
}

.connection-text{
  color: var(--muted);
}
.connection-status.online .connection-text{ color: var(--green); }
.connection-status.offline .connection-text{ color: var(--orange); }

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* =========================
   Header
========================= */
.header{
  border-bottom: 1px solid var(--border);
  background: transparent;
}

.header__inner{
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0;
}

.brand{
  display: flex;
  gap: 10px;
  align-items: center;
  color: var(--text);
}

.brand__mark{
  font-size: 22px;
  filter: drop-shadow(0 10px 16px rgba(0,0,0,.35));
}

.brand__text{
  display: grid;
  gap: 1px;
}

.brand__title{
  font-weight: 700;
  font-size: 15px;
  letter-spacing: .2px;
}

.brand__subtitle{
  font-size: 12px;
  color: var(--muted);
}

.nav{
  display: flex;
  gap: 14px;
  align-items: center;
}

.nav__link{
  font-size: 12.5px;
  color: var(--muted);
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid transparent;
}
.nav__link:hover{
  color: var(--text);
  border-color: var(--border);
  background: rgba(255,255,255,.04);
  text-decoration: none;
}

.header__actions{
  display: flex;
  gap: 10px;
  align-items: center;
}

/* =========================
   Buttons / Badges
========================= */
.button{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 36px;
  padding: 0 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,.04);
  color: var(--text);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  user-select: none;
}
.button:hover{
  background: rgba(255,255,255,.07);
  text-decoration: none;
}

.button--primary{
  background: linear-gradient(180deg, rgba(138,180,255,.18), rgba(138,180,255,.08));
  border-color: rgba(138,180,255,.35);
}

.badge{
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  border: 1px solid var(--border);
  background: rgba(255,255,255,.04);
}

.badge--verified{
  border-color: rgba(40,199,111,.40);
  background: rgba(40,199,111,.10);
  color: rgba(40,199,111,.95);
}

/* =========================
   Main / Hero
========================= */
.main{
  padding: 18px 0 42px;
}

.hero{
  padding: 18px 0 8px;
}

.hero__title{
  margin: 0;
  font-size: 22px;
  line-height: 1.25;
  letter-spacing: -0.2px;
}

.hero__lead{
  margin: 10px 0 0;
  font-size: 14px;
  color: var(--muted);
  max-width: 70ch;
}

.hero__panel{
  margin-top: 14px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  padding: 14px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(255,255,255,.04), rgba(255,255,255,.02));
  box-shadow: var(--shadow);
}

.hero__panel-title{
  font-size: 12px;
  font-weight: 700;
  color: rgba(255,255,255,.88);
  margin-bottom: 4px;
}

.hero__panel-text{
  font-size: 12.5px;
  color: var(--muted);
}

/* =========================
   Sections / Cards
========================= */
.section{
  margin-top: 18px;
}

.section__header{
  display: flex;
  gap: 14px;
  align-items: flex-end;
  justify-content: space-between;
  margin: 18px 0 12px;
}

.section__title{
  margin: 0;
  font-size: 16px;
  letter-spacing: .1px;
}

.section__subtitle{
  margin: 6px 0 0;
  font-size: 12.5px;
  color: var(--muted);
  max-width: 80ch;
}

.section__meta{
  display: flex;
  align-items: center;
  gap: 10px;
}

.hint{
  font-size: 12px;
  color: var(--muted2);
}

.card{
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(255,255,255,.03), rgba(255,255,255,.015));
  box-shadow: var(--shadow);
  overflow: hidden;
}

.grid{
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.item{
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(17,28,56,.9), rgba(14,24,51,.9));
  box-shadow: var(--shadow);
  padding: 14px;
}

.item h3{
  margin: 0 0 6px;
  font-size: 14px;
}

.item .muted{
  font-size: 12.5px;
  color: var(--muted);
}

.kv{
  margin-top: 8px;
  font-size: 12.5px;
  color: rgba(255,255,255,.86);
}

.list{
  padding: 6px 14px;
}

.list .row{
  padding: 12px 0;
  border-top: 1px solid var(--border);
}
.list .row:first-child{ border-top: none; }

.small{ font-size: 12px; }
.muted{ color: var(--muted); }

/* =========================
   Tabs
========================= */
.tabs{
  display: flex;
  gap: 8px;
  padding: 0 0 0;
  margin: 20px 0 0;
  border-bottom: 2px solid var(--border);
  overflow-x: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}

.tabs::-webkit-scrollbar{ height: 4px; }
.tabs::-webkit-scrollbar-track{ background: transparent; }
.tabs::-webkit-scrollbar-thumb{ background: var(--border); border-radius: 2px; }

.tab{
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 18px;
  border: none;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border-bottom: 3px solid transparent;
  transition: all 0.2s ease;
  white-space: nowrap;
  user-select: none;
  font-family: inherit;
}

.tab:hover{
  color: var(--text);
  background: rgba(255,255,255,.03);
}

.tab.active{
  color: var(--link);
  border-bottom-color: var(--link);
  background: rgba(138,180,255,.08);
}

.tab__icon{
  font-size: 16px;
  filter: grayscale(0.3);
}

.tab.active .tab__icon{
  filter: grayscale(0);
}

.tab__text{
  font-size: 13px;
}

/* Tab Panels */
.tab-panels{
  margin-top: 0;
}

.tab-panel{
  display: none;
  animation: fadeIn 0.3s ease;
}

.tab-panel.active{
  display: block;
}

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

.tab-panel .section{
  margin-top: 18px;
}

.tab-panel .section__header{
  margin-top: 8px;
}

/* =========================
   Search
========================= */
.search{
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(255,255,255,.04);
  min-width: 320px;
}

.search__icon{
  opacity: .8;
}

.search input{
  width: 100%;
  border: none;
  outline: none;
  background: transparent;
  color: var(--text);
  font-size: 12.5px;
}
.search input::placeholder{ color: rgba(255,255,255,.55); }

/* =========================
   Links
========================= */
.links{
  margin: 0;
  padding: 12px 18px;
}
.links li{
  margin: 8px 0;
}

/* =========================
   Offline Notice
========================= */
.offline-notice{
  margin: 18px 0;
  padding: 14px 16px;
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(255,138,76,.12), rgba(255,138,76,.06));
  border: 1px solid rgba(255,138,76,.30);
  box-shadow: var(--shadow);
}

.offline-notice__content{
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.offline-notice__icon{
  font-size: 24px;
  filter: grayscale(0.3);
}

.offline-notice strong{
  display: block;
  font-size: 13px;
  color: rgba(255,138,76,.95);
  margin-bottom: 4px;
}

.offline-notice p{
  margin: 0;
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.4;
}

/* =========================
   Footer
========================= */
.footer{
  margin-top: 26px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
}

.footer__inner{
  padding: 10px 0 0;
}

/* =========================
   Responsive
========================= */
@media (max-width: 960px){
  .grid{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero__panel{ grid-template-columns: 1fr; }
  .search{ min-width: 260px; }
  .nav{ display: none; } /* móvil: menos ruido */
  .connection-status{ padding: 4px 8px; }
  .connection-text{ display: none; }
  .tab__text{ font-size: 12px; }
  .tab{ padding: 10px 14px; }
}

@media (max-width: 560px){
  .header__actions{ display:none; }
  .topbar__text{ display:none; }
  .grid{ grid-template-columns: 1fr; }
  .topbar__right{ flex-direction: column; gap: 4px; align-items: flex-end; }
  .offline-notice__content{ flex-direction: column; gap: 8px; }
  .tab{ padding: 10px 12px; gap: 6px; }
  .tab__icon{ font-size: 14px; }
  .tab__text{ font-size: 11px; }
}

/* =========================
   Loading & Animations
========================= */
.loading {
  display: inline-block;
  width: 12px;
  height: 12px;
  border: 2px solid rgba(255,255,255,.2);
  border-top-color: var(--link);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Smooth transitions */
.item, .card, .row {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.item:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 35px rgba(0,0,0,.45);
}

/* Focus states para accesibilidad */
button:focus-visible,
a:focus-visible,
input:focus-visible {
  outline: 2px solid var(--link);
  outline-offset: 2px;
}
 