/* styles.css - Versión mejorada y profesional */
:root {
  --bg: #0b1220;
  --bg2: #0e1730;
  --card: #0f1b33;
  --text: #e9eefc;
  --muted: #a9b4d0;
  --line: rgba(255, 255, 255, 0.10);
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 30px 80px rgba(0, 0, 0, 0.45);
  --primary: #7c5cff;
  --primary-hover: #8d6eff;
  --primary-light: rgba(124, 92, 255, 0.15);
  --primary2: #22c55e;
  --warn: #f59e0b;
  
  --radius: 18px;
  --radius2: 24px;
  --radius-sm: 12px;
  --max: 1120px;
  
  --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

html[data-theme="light"] {
  --bg: #f6f7fb;
  --bg2: #ffffff;
  --card: #ffffff;
  --text: #0b1220;
  --muted: #4b5563;
  --line: rgba(11, 18, 32, 0.12);
  --shadow: 0 20px 60px rgba(11, 18, 32, 0.12);
  --shadow-lg: 0 30px 80px rgba(11, 18, 32, 0.18);
  --primary-light: rgba(124, 92, 255, 0.08);
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
  background: 
    radial-gradient(1200px 600px at 20% -10%, rgba(124, 92, 255, 0.28), transparent 60%),
    radial-gradient(900px 500px at 80% 10%, rgba(34, 197, 94, 0.18), transparent 55%),
    linear-gradient(180deg, var(--bg), var(--bg2));
  background-attachment: fixed;
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: inherit;
  text-decoration: none;
  transition: var(--transition);
}

.wrap {
  width: min(var(--max), calc(100% - 40px));
  margin: 0 auto;
  padding: 0 20px;
}

.skip {
  position: absolute;
  left: -9999px;
  top: 10px;
  padding: 10px 16px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-weight: 600;
  z-index: 9999;
}

.skip:focus {
  left: 10px;
  z-index: 9999;
}

.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Topbar mejorado */
.topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.1));
  border-bottom: 1px solid var(--line);
  transition: var(--transition);
}

html[data-theme="light"] .topbar {
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
}

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

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 240px;
  transition: var(--transition);
}

.brand:hover {
  transform: translateX(2px);
}

.brand__logo {
  width: 42px;
  height: 42px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, rgba(124, 92, 255, 0.95), rgba(34, 197, 94, 0.7));
  box-shadow: 0 10px 30px rgba(124, 92, 255, 0.3);
  color: white;
  font-weight: 800;
  transition: var(--transition);
}

.brand__logo:hover {
  transform: scale(1.05);
  box-shadow: 0 12px 40px rgba(124, 92, 255, 0.4);
}

.brand__logo svg {
  width: 20px;
  height: 20px;
}

.brand__name {
  display: block;
  font-weight: 800;
  letter-spacing: 0.2px;
  font-size: 16px;
}

.brand__sub {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
}

.topbar__actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Botones mejorados */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  cursor: pointer;
  font-weight: 600;
  font-size: 14px;
  transition: var(--transition);
  white-space: nowrap;
}

.btn:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.12);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.btn:active {
  transform: translateY(0);
}

.btn--primary {
  border-color: transparent;
  background: linear-gradient(135deg, rgba(124, 92, 255, 0.95), rgba(124, 92, 255, 0.65));
  box-shadow: 0 14px 40px rgba(124, 92, 255, 0.25);
  color: white;
}

.btn--primary:hover {
  background: linear-gradient(135deg, rgba(124, 92, 255, 1), rgba(124, 92, 255, 0.8));
  box-shadow: 0 16px 50px rgba(124, 92, 255, 0.35);
}

.btn--ghost {
  background: rgba(255, 255, 255, 0.03);
}

.btn--ghost:hover {
  background: rgba(255, 255, 255, 0.08);
}

.icon {
  font-size: 16px;
  opacity: 0.95;
  display: inline-block;
}

.btn__text {
  font-weight: 600;
  font-size: 14px;
}

/* Hero section mejorado */
.hero {
  padding: 48px 0 32px;
}

.hero__inner {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 32px;
  align-items: stretch;
}

@media (max-width: 920px) {
  .hero__inner {
    grid-template-columns: 1fr;
  }
  .hero__panel {
    display: none;
  }
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.06);
  color: var(--muted);
  width: fit-content;
  margin: 0 0 16px 0;
  font-weight: 600;
  font-size: 13px;
  transition: var(--transition);
}

.pill:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-1px);
}

.pill__icon {
  font-size: 14px;
}

h1 {
  margin: 0 0 14px 0;
  font-size: clamp(32px, 5vw, 48px);
  letter-spacing: -0.8px;
  font-weight: 900;
  line-height: 1.2;
  background: linear-gradient(135deg, var(--text), var(--muted));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.lead {
  margin: 0 0 24px 0;
  color: var(--muted);
  line-height: 1.65;
  font-size: 17px;
  max-width: 65ch;
}

/* Controles de búsqueda mejorados */
.hero__controls {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding: 16px;
  border-radius: var(--radius2);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.05);
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.search,
.select {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.15);
  color: var(--text);
  outline: none;
  min-width: 220px;
  font-size: 14px;
  transition: var(--transition);
  flex: 1;
  min-width: 200px;
}

html[data-theme="light"] .search,
html[data-theme="light"] .select {
  background: rgba(11, 18, 32, 0.04);
}

.search:focus,
.select:focus {
  border-color: rgba(124, 92, 255, 0.7);
  box-shadow: 0 0 0 4px rgba(124, 92, 255, 0.2);
  background: rgba(0, 0, 0, 0.2);
}

.search::placeholder {
  color: var(--muted);
  opacity: 0.7;
}

.stats {
  margin-top: 20px;
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.stat {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: var(--transition);
}

.stat:hover {
  background: rgba(255, 255, 255, 0.08);
  transform: translateY(-2px);
}

.stat__num {
  font-weight: 900;
  font-size: 20px;
  display: block;
  background: linear-gradient(135deg, var(--primary), var(--primary2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.stat__label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}

/* Panel decorativo */
.hero__panel {
  display: flex;
  align-items: stretch;
}

.glass {
  width: 100%;
  border-radius: var(--radius2);
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.04));
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.glass__row {
  display: flex;
  gap: 8px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.1);
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.25);
}

.glass__content {
  padding: 20px;
  display: grid;
  gap: 14px;
}

.mock-card {
  height: 90px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: 
    radial-gradient(600px 180px at 0% 50%, rgba(124, 92, 255, 0.25), transparent 55%),
    radial-gradient(600px 180px at 100% 50%, rgba(34, 197, 94, 0.18), transparent 60%),
    rgba(0, 0, 0, 0.15);
  animation: pulse 3s ease-in-out infinite;
}

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

/* Lista de novedades */
.list {
  padding: 32px 0 60px;
}

.list__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.h2 {
  margin: 0;
  font-size: 26px;
  font-weight: 900;
  letter-spacing: -0.5px;
}

.muted {
  color: var(--muted);
  margin: 8px 0 0 0;
  font-size: 14px;
}

.grid {
  margin-top: 20px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

@media (max-width: 980px) {
  .grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .grid {
    grid-template-columns: 1fr;
  }
}

/* Cards mejoradas */
.card {
  position: relative;
  border-radius: var(--radius2);
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.03));
  box-shadow: var(--shadow);
  overflow: hidden;
  padding: 20px;
  transform: translateY(8px);
  opacity: 0;
  transition: var(--transition-slow);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.card.is-visible {
  transform: translateY(0);
  opacity: 1;
}

.card:hover {
  border-color: rgba(124, 92, 255, 0.4);
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.05));
}

.card__top {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.06);
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.badge--new {
  color: #fff;
  border-color: transparent;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.95), rgba(245, 158, 11, 0.65));
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

.badge--updated {
  color: #fff;
  border-color: transparent;
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.95), rgba(34, 197, 94, 0.65));
  box-shadow: 0 4px 12px rgba(34, 197, 94, 0.3);
}

.badge--beta {
  color: #fff;
  border-color: transparent;
  background: linear-gradient(135deg, rgba(124, 92, 255, 0.95), rgba(124, 92, 255, 0.65));
  box-shadow: 0 4px 12px rgba(124, 92, 255, 0.3);
}

.card__title {
  margin: 12px 0 8px;
  font-weight: 900;
  letter-spacing: -0.4px;
  font-size: 20px;
  line-height: 1.3;
}

.card__desc {
  margin: 0 0 16px;
  color: var(--muted);
  line-height: 1.6;
  min-height: 3.2em;
  font-size: 14px;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.tag {
  font-size: 11px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.15);
  color: var(--text);
  opacity: 0.9;
  font-weight: 500;
  transition: var(--transition);
}

html[data-theme="light"] .tag {
  background: rgba(11, 18, 32, 0.05);
}

.tag:hover {
  background: var(--primary-light);
  border-color: rgba(124, 92, 255, 0.3);
  transform: translateY(-1px);
}

.card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.when {
  font-size: 12px;
  color: var(--muted);
  font-weight: 500;
}

.actions {
  display: flex;
  gap: 10px;
}

.btn--link {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
  padding: 8px 14px;
  font-size: 13px;
}

.btn--link:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(124, 92, 255, 0.4);
}

/* Estado vacío mejorado */
.empty {
  margin-top: 24px;
  padding: 40px 24px;
  border-radius: var(--radius2);
  border: 2px dashed var(--line);
  background: rgba(255, 255, 255, 0.03);
  text-align: center;
}

.empty__icon {
  font-size: 48px;
  margin-bottom: 16px;
  opacity: 0.6;
}

.empty p {
  margin: 8px 0;
}

.empty strong {
  font-size: 18px;
  color: var(--text);
}

/* Footer mejorado */
.footer {
  border-top: 1px solid var(--line);
  padding: 32px 0;
  margin-top: 40px;
  background: rgba(0, 0, 0, 0.1);
}

.footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.footer__links {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.link {
  color: var(--muted);
  font-size: 14px;
  transition: var(--transition);
}

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

/* Animaciones y transiciones */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Mejoras de accesibilidad */
:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
  border-radius: 4px;
}

/* Scrollbar personalizado */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: var(--bg);
}

::-webkit-scrollbar-thumb {
  background: var(--line);
  border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.2);
}
