/* =============================================
   GAMESTORE — Sistema de diseño "Glass Blue"
   Negro azulado + azul + grises oscuros.
   Verde y rojo solo como señales de estado.
   ============================================= */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Space+Grotesk:wght@500;600;700&display=swap');

:root {
  /* --- Base: negro con temperatura azul --- */
  --void:       #04060b;
  --ink:        #070a11;
  --graphite:   #10141d;
  --graphite-2: #171d29;
  --graphite-3: #1f2836;

  /* --- Azul, color rector --- */
  --blue:       #2f6bff;
  --blue-hi:    #5d93ff;
  --blue-deep:  #1743b8;
  --blue-ice:   #a9c6ff;

  /* --- Señales --- */
  --green:      #17c964;
  --green-soft: rgba(23, 201, 100, 0.14);
  --red:        #ff3b4e;
  --red-soft:   rgba(255, 59, 78, 0.14);
  --amber:      #ffa62b;

  /* --- Cristal --- */
  --glass:      rgba(21, 27, 39, 0.58);
  --glass-hi:   rgba(31, 40, 56, 0.72);
  --glass-rail: rgba(7, 10, 17, 0.66);
  --blur:       blur(22px) saturate(160%);
  --blur-soft:  blur(14px) saturate(140%);

  /* --- Trazos --- */
  --line:       rgba(120, 165, 255, 0.13);
  --line-hi:    rgba(120, 165, 255, 0.32);
  --edge:       inset 0 1px 0 rgba(255, 255, 255, 0.055);

  /* --- Texto --- */
  --text:       #eef2fb;
  --text2:      #9aa6bd;
  --text3:      #5d6880;

  /* --- Métrica --- */
  --nav-h:      58px;
  --bottom-h:   64px;
  --r-xs:       8px;
  --r-sm:       12px;
  --r:          16px;
  --r-lg:       22px;
  --transition: 0.24s cubic-bezier(0.4, 0, 0.2, 1);

  --shadow-flat: 0 2px 10px rgba(0, 0, 0, 0.5);
  --shadow-lift: 0 18px 40px -18px rgba(0, 0, 0, 0.9);
  --shadow-blue: 0 10px 34px -12px rgba(47, 107, 255, 0.55);

  /* --- Alias heredados (páginas con estilos propios) --- */
  --bg:           var(--void);
  --bg2:          var(--ink);
  --card:         var(--glass);
  --card2:        var(--glass-hi);
  --card-hover:   var(--glass-hi);
  --card-bg:      var(--glass);
  --surface:      var(--graphite);
  --panel:        var(--glass);
  --black:        var(--void);
  --border:       var(--line);
  --border2:      var(--line-hi);
  --border-hover: var(--line-hi);
  --dark-bg:      var(--void);
  --dark-card:    var(--glass);
  --dark-text:    var(--text);
  --dark-border:  var(--line);
  --dark-blue:    var(--blue-deep);
  --accent:       var(--blue);
  --accent1:      var(--blue);
  --accent2:      var(--blue-hi);
  --accent3:      var(--blue-ice);
  --accent-glow:  rgba(47, 107, 255, 0.28);
  --glow:         rgba(47, 107, 255, 0.32);
  --primary:        var(--blue);
  --primary-color:  var(--blue);
  --primary-blue:   var(--blue);
  --primary-hover:  var(--blue-hi);
  --primary-light:  var(--blue-ice);
  --primary-dark:   var(--blue-deep);
  --secondary-color: var(--blue-hi);
  --text-secondary: var(--text2);
  --muted:        var(--text2);
  --success:       var(--green);
  --success-green: var(--green);
  --success-color: var(--green);
  --error-color:  var(--red);
  --yellow:       var(--amber);
  --radius:       var(--r);
  --radius-sm:    var(--r-sm);
  --rounded:      var(--r-sm);
  --rounded-lg:   var(--r);
  --gradient:     linear-gradient(135deg, var(--blue) 0%, var(--blue-deep) 100%);
  --blur-bg:      var(--glass);
  --shadow:       var(--shadow-lift);
  --shadow-card:  var(--shadow-flat);
  --shadow-glow:  var(--shadow-blue);
}

/* ===== Reset ===== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html {
  scroll-behavior: smooth;
  background: var(--void);
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--void);
  color: var(--text);
  line-height: 1.55;
  min-height: 100vh;
  padding-bottom: calc(var(--bottom-h) + 12px);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  position: relative;
}

/* Campo de luz fijo detrás de todo: es lo que hace que el
   desenfoque de los paneles tenga algo real que difuminar. */
body::before {
  content: '';
  position: fixed;
  inset: -20vh -20vw;
  z-index: -2;
  pointer-events: none;
  background:
    radial-gradient(46vw 46vw at 16% -6%, rgba(47, 107, 255, 0.34), transparent 62%),
    radial-gradient(38vw 38vw at 92% 12%, rgba(23, 67, 184, 0.30), transparent 66%),
    radial-gradient(30vw 30vw at 78% 88%, rgba(23, 201, 100, 0.11), transparent 68%),
    radial-gradient(26vw 26vw at 6% 92%,  rgba(255, 59, 78, 0.09),  transparent 70%);
  filter: blur(30px);
}

/* Trama fina que le da grano al cristal */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.5;
  background-image:
    linear-gradient(rgba(120, 165, 255, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(120, 165, 255, 0.045) 1px, transparent 1px);
  background-size: 74px 74px;
  -webkit-mask-image: radial-gradient(120vh 90vh at 50% 0%, #000 20%, transparent 78%);
  mask-image: radial-gradient(120vh 90vh at 50% 0%, #000 20%, transparent 78%);
}

h1, h2, h3,
.navbar-title, .hero-title, .detail-title, .stat-value {
  font-family: 'Space Grotesk', 'Inter', sans-serif;
  letter-spacing: -0.02em;
}

a { color: var(--blue-hi); }

:focus-visible {
  outline: 2px solid var(--blue-hi);
  outline-offset: 2px;
  border-radius: 6px;
}

/* ===== Scrollbar ===== */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: rgba(120, 165, 255, 0.22);
  border-radius: 5px;
}
::-webkit-scrollbar-thumb:hover { background: rgba(120, 165, 255, 0.4); }

::selection { background: rgba(47, 107, 255, 0.35); color: #fff; }

/* ===== Navbar ===== */
.navbar {
  position: sticky;
  top: 0;
  z-index: 900;
  height: var(--nav-h);
  background: var(--glass-rail);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  border-bottom: 1px solid var(--line);
  box-shadow: var(--edge);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  gap: 12px;
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.navbar-logo {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid var(--line);
}

.navbar-title {
  font-size: 19px;
  font-weight: 700;
  color: var(--text);
}

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

.navbar-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  object-fit: cover;
  border: 1.5px solid var(--blue);
  cursor: pointer;
  transition: var(--transition);
  background: var(--graphite);
}
.navbar-avatar:hover {
  border-color: var(--blue-hi);
  box-shadow: 0 0 0 4px rgba(47, 107, 255, 0.16);
}

/* ===== Buscador ===== */
.search-wrap { padding: 12px 14px 6px; }

.search-box {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--glass);
  backdrop-filter: var(--blur-soft);
  -webkit-backdrop-filter: var(--blur-soft);
  border: 1px solid var(--line);
  border-radius: 50px;
  padding: 10px 16px;
  box-shadow: var(--edge);
  transition: var(--transition);
}

.search-box:focus-within {
  border-color: var(--line-hi);
  background: var(--glass-hi);
  box-shadow: var(--edge), 0 0 0 4px rgba(47, 107, 255, 0.14);
}

.search-box svg { flex-shrink: 0; color: var(--text3); }
.search-box:focus-within svg { color: var(--blue-hi); }

.search-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text);
  font-size: 15px;
  font-family: inherit;
  min-width: 0;
}

.search-input::placeholder { color: var(--text3); }

.search-clear {
  background: none;
  border: none;
  color: var(--text3);
  cursor: pointer;
  padding: 2px;
  display: none;
  transition: var(--transition);
}
.search-clear:hover { color: var(--text); }
.search-clear.visible { display: flex; }

/* ===== Chips ===== */
.chips-wrap {
  padding: 10px 14px 12px;
  overflow-x: auto;
  scrollbar-width: none;
}
.chips-wrap::-webkit-scrollbar { display: none; }

.chips {
  display: flex;
  gap: 8px;
  width: max-content;
}

.chip {
  background: var(--glass);
  backdrop-filter: var(--blur-soft);
  -webkit-backdrop-filter: var(--blur-soft);
  border: 1px solid var(--line);
  color: var(--text2);
  padding: 6px 15px;
  border-radius: 50px;
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
  transition: var(--transition);
  font-family: inherit;
  user-select: none;
}

.chip:hover {
  border-color: var(--line-hi);
  color: var(--text);
}

.chip.active {
  background: linear-gradient(180deg, var(--blue) 0%, var(--blue-deep) 100%);
  border-color: rgba(160, 195, 255, 0.4);
  color: #fff;
  font-weight: 600;
  box-shadow: var(--shadow-blue);
}

/* ===== Encabezados de sección ===== */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 14px 10px;
}

.section-title {
  font-family: 'Space Grotesk', 'Inter', sans-serif;
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: 9px;
}

/* marca azul que ancla el título */
.section-title::before {
  content: '';
  width: 3px;
  height: 15px;
  border-radius: 2px;
  background: linear-gradient(180deg, var(--blue-hi), var(--blue-deep));
  flex-shrink: 0;
}

.section-count {
  font-size: 12px;
  color: var(--text3);
  font-weight: 500;
}

/* ===== Banner principal ===== */
.hero-banner {
  margin: 4px 14px 14px;
  border-radius: var(--r-lg);
  overflow: hidden;
  position: relative;
  background: var(--glass);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  border: 1px solid var(--line);
  box-shadow: var(--edge), var(--shadow-lift);
  cursor: pointer;
  transition: var(--transition);
}

.hero-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, rgba(47, 107, 255, 0.22) 0%, transparent 48%);
  pointer-events: none;
}

.hero-banner:hover {
  border-color: var(--line-hi);
  transform: translateY(-2px);
}

.hero-banner-inner {
  padding: 22px 20px;
  position: relative;
  z-index: 1;
}

.hero-badge {
  display: inline-block;
  background: var(--green-soft);
  color: var(--green);
  border: 1px solid rgba(23, 201, 100, 0.28);
  font-size: 11px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 50px;
  margin-bottom: 10px;
}

.hero-title {
  font-size: 21px;
  font-weight: 700;
  margin-bottom: 5px;
  line-height: 1.22;
}

.hero-sub {
  font-size: 13.5px;
  color: var(--text2);
  margin-bottom: 16px;
  max-width: 46ch;
}

.hero-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: linear-gradient(180deg, var(--blue) 0%, var(--blue-deep) 100%);
  color: #fff;
  font-size: 13.5px;
  font-weight: 600;
  padding: 9px 18px;
  border-radius: 50px;
  text-decoration: none;
  transition: var(--transition);
  border: 1px solid rgba(160, 195, 255, 0.32);
  box-shadow: var(--shadow-blue);
  cursor: pointer;
  font-family: inherit;
}
.hero-btn:hover { filter: brightness(1.14); }
.hero-btn:active { transform: scale(0.97); }

.hero-img {
  position: absolute;
  right: -14px;
  bottom: -14px;
  width: 130px;
  height: 130px;
  object-fit: cover;
  border-radius: 18px;
  opacity: 0.3;
  filter: blur(2px) saturate(120%);
}

/* ===== Rejilla de apps ===== */
.apps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px 14px;
  padding: 0 14px;
}

.app-card {
  display: flex;
  flex-direction: column;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  transition: var(--transition);
  border-radius: var(--r-sm);
  padding: 4px;
}

.app-card:active { transform: scale(0.94); }

.app-icon-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 1/1;
  margin-bottom: 9px;
}

.app-icon {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 24%;
  background: var(--graphite);
  display: block;
  border: 1px solid var(--line);
  transition: var(--transition);
}

.app-card:hover .app-icon {
  border-color: var(--line-hi);
  box-shadow: var(--shadow-blue);
}

.app-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: var(--blue);
  color: #fff;
  font-size: 8.5px;
  font-weight: 700;
  padding: 3px 6px;
  border-radius: 6px;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  border: 1px solid rgba(160, 195, 255, 0.35);
}

.app-name {
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text);
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 3px;
}

.app-meta {
  font-size: 11px;
  color: var(--text3);
  display: flex;
  align-items: center;
  gap: 5px;
}

.app-meta .star {
  display: inline-flex;
  align-items: center;
  color: var(--blue-ice);
}
.app-meta .star svg { width: 11px; height: 11px; display: block; }

/* ===== Videos ===== */
.video-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.video-card {
  cursor: pointer;
  transition: var(--transition);
  padding: 0 0 18px;
}

.video-thumb-wrap {
  width: 100%;
  aspect-ratio: 16/9;
  position: relative;
  overflow: hidden;
  background: var(--graphite);
}

.video-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: var(--transition);
}

.video-card:hover .video-thumb { transform: scale(1.03); }

.video-duration {
  position: absolute;
  bottom: 7px;
  right: 8px;
  background: rgba(4, 6, 11, 0.72);
  backdrop-filter: var(--blur-soft);
  -webkit-backdrop-filter: var(--blur-soft);
  border: 1px solid var(--line);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 6px;
}

.video-play-btn {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.88);
  width: 50px;
  height: 50px;
  background: rgba(4, 6, 11, 0.55);
  border: 1px solid var(--line-hi);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: var(--transition);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
}

.video-card:hover .video-play-btn {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.video-info {
  display: flex;
  gap: 11px;
  padding: 11px 14px 0;
}

.video-channel-icon {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  background: var(--graphite);
  border: 1px solid var(--line);
}

.video-text { flex: 1; min-width: 0; }

.video-title {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 3px;
}

.video-meta { font-size: 12px; color: var(--text3); }

/* ===== Modal de video ===== */
.video-modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(4, 6, 11, 0.78);
  backdrop-filter: blur(26px) saturate(150%);
  -webkit-backdrop-filter: blur(26px) saturate(150%);
  display: flex;
  flex-direction: column;
  animation: fadeIn 0.2s ease;
}

.video-modal-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}

.video-modal-close {
  background: var(--glass-hi);
  border: 1px solid var(--line);
  color: var(--text);
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  flex-shrink: 0;
}
.video-modal-close:hover { border-color: var(--line-hi); }

.video-modal-title {
  font-size: 15px;
  font-weight: 600;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.video-frame-wrap {
  width: 100%;
  aspect-ratio: 16/9;
  background: #000;
}

.video-frame-wrap iframe { width: 100%; height: 100%; border: none; }

.video-modal-body { flex: 1; overflow-y: auto; padding: 16px; }

.video-modal-desc {
  font-size: 14px;
  color: var(--text2);
  line-height: 1.7;
}

/* ===== Barra inferior ===== */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  height: var(--bottom-h);
  background: var(--glass-rail);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  border-top: 1px solid var(--line);
  box-shadow: var(--edge);
  display: flex;
  align-items: center;
  justify-content: space-around;
  z-index: 900;
  padding-bottom: env(safe-area-inset-bottom, 0);
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  color: var(--text3);
  text-decoration: none;
  font-size: 10.5px;
  font-weight: 500;
  padding: 7px 16px;
  border-radius: 14px;
  transition: var(--transition);
  position: relative;
  cursor: pointer;
  background: none;
  border: none;
  font-family: inherit;
}

.nav-item svg { width: 22px; height: 22px; transition: var(--transition); }

.nav-item:hover { color: var(--text2); }

.nav-item.active { color: var(--blue-ice); }
.nav-item.active svg { filter: drop-shadow(0 0 8px rgba(47, 107, 255, 0.75)); }

/* indicador superior del elemento activo */
.nav-item.active::before {
  content: '';
  position: absolute;
  top: -1px;
  left: 50%;
  transform: translateX(-50%);
  width: 26px;
  height: 2px;
  border-radius: 0 0 3px 3px;
  background: var(--blue-hi);
  box-shadow: 0 0 12px 1px var(--blue);
}

.nav-item .nav-dot {
  position: absolute;
  top: 5px;
  right: 12px;
  width: 6px;
  height: 6px;
  background: var(--green);
  border-radius: 50%;
  display: none;
  box-shadow: 0 0 8px var(--green);
}

.nav-item.has-dot .nav-dot { display: block; }

/* ===== Estado vacío ===== */
.empty-state {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 64px 20px;
  color: var(--text3);
  text-align: center;
  gap: 12px;
}

.empty-state svg { opacity: 0.28; }
.empty-state p { font-size: 15px; }

/* ===== Esqueleto de carga ===== */
.skeleton {
  background: linear-gradient(90deg,
    rgba(31, 40, 56, 0.5) 25%,
    rgba(47, 107, 255, 0.16) 50%,
    rgba(31, 40, 56, 0.5) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--r-sm);
}

@keyframes shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.skeleton-card { display: flex; flex-direction: column; gap: 8px; }
.skeleton-icon { width: 100%; aspect-ratio: 1/1; border-radius: 24%; }
.skeleton-line { height: 11px; border-radius: 6px; }
.skeleton-line.short { width: 60%; }

/* ===== Aviso flotante ===== */
.toast {
  position: fixed;
  bottom: calc(var(--bottom-h) + 18px);
  left: 50%;
  transform: translateX(-50%) translateY(18px);
  background: var(--glass-hi);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  border: 1px solid var(--line-hi);
  box-shadow: var(--edge), var(--shadow-lift);
  color: var(--text);
  font-size: 13.5px;
  font-weight: 500;
  padding: 11px 20px;
  border-radius: 50px;
  z-index: 3000;
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  white-space: nowrap;
  max-width: 90vw;
  text-align: center;
}

.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ===== Animaciones ===== */
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

.animate-in { animation: slideUp 0.32s ease both; }

.apps-grid .app-card:nth-child(1) { animation-delay: 0.03s; }
.apps-grid .app-card:nth-child(2) { animation-delay: 0.06s; }
.apps-grid .app-card:nth-child(3) { animation-delay: 0.09s; }
.apps-grid .app-card:nth-child(4) { animation-delay: 0.12s; }
.apps-grid .app-card:nth-child(5) { animation-delay: 0.15s; }
.apps-grid .app-card:nth-child(6) { animation-delay: 0.18s; }

/* ===== Ficha de detalle ===== */
.detail-page { min-height: 100vh; padding-bottom: 32px; }

.detail-nav {
  position: sticky;
  top: 0;
  z-index: 900;
  height: var(--nav-h);
  background: var(--glass-rail);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  border-bottom: 1px solid var(--line);
  box-shadow: var(--edge);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 14px;
}

.back-btn {
  background: var(--glass-hi);
  backdrop-filter: var(--blur-soft);
  -webkit-backdrop-filter: var(--blur-soft);
  border: 1px solid var(--line);
  color: var(--text);
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  flex-shrink: 0;
  text-decoration: none;
}
.back-btn:hover { border-color: var(--line-hi); color: var(--blue-ice); }

.detail-nav-title {
  font-size: 16px;
  font-weight: 600;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.detail-hero {
  padding: 22px 16px 18px;
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.detail-icon {
  width: 92px;
  height: 92px;
  border-radius: 22%;
  object-fit: cover;
  flex-shrink: 0;
  background: var(--graphite);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-lift);
}

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

.detail-title {
  font-size: 21px;
  font-weight: 700;
  margin-bottom: 5px;
}

.detail-author {
  font-size: 13px;
  color: var(--blue-ice);
  font-weight: 500;
  margin-bottom: 9px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.detail-tags { display: flex; flex-wrap: wrap; gap: 6px; }

.detail-tag {
  background: var(--glass);
  backdrop-filter: var(--blur-soft);
  -webkit-backdrop-filter: var(--blur-soft);
  border: 1px solid var(--line);
  color: var(--text2);
  font-size: 11.5px;
  padding: 3px 10px;
  border-radius: 50px;
}

.detail-stats {
  display: flex;
  margin: 0 16px 16px;
  padding: 4px 0;
  background: var(--glass);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  border: 1px solid var(--line);
  border-radius: var(--r);
  box-shadow: var(--edge);
}

.stat-item {
  flex: 1;
  text-align: center;
  padding: 12px 0;
  border-right: 1px solid var(--line);
}
.stat-item:last-child { border-right: none; }

.stat-value {
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
  display: block;
}

.stat-label {
  font-size: 11px;
  color: var(--text3);
  margin-top: 3px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}
.stat-label svg { width: 11px; height: 11px; color: var(--blue-ice); }

.detail-download-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  width: calc(100% - 32px);
  margin: 16px;
  padding: 15px;
  background: linear-gradient(180deg, var(--blue) 0%, var(--blue-deep) 100%);
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  border-radius: var(--r);
  text-decoration: none;
  transition: var(--transition);
  border: 1px solid rgba(160, 195, 255, 0.32);
  box-shadow: var(--shadow-blue);
  cursor: pointer;
  font-family: inherit;
  letter-spacing: -0.01em;
}

.detail-download-btn:hover { filter: brightness(1.14); transform: translateY(-2px); }
.detail-download-btn:active { transform: translateY(0); }

.detail-section { padding: 16px 16px 8px; }

.detail-section-title {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 11px;
  color: var(--text);
}

.detail-desc {
  font-size: 14px;
  color: var(--text2);
  line-height: 1.72;
}

.detail-desc.collapsed {
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.read-more-btn {
  background: none;
  border: none;
  color: var(--blue-hi);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  padding: 8px 0;
  font-family: inherit;
  transition: var(--transition);
}
.read-more-btn:hover { color: var(--blue-ice); }

/* ===== Hoja de compartir ===== */
.share-sheet {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  background: rgba(4, 6, 11, 0.6);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  animation: fadeIn 0.2s ease;
}

.share-sheet-inner {
  background: var(--glass-hi);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  border-radius: var(--r-lg) var(--r-lg) 0 0;
  padding: 20px 16px 34px;
  border-top: 1px solid var(--line-hi);
  box-shadow: var(--edge);
  animation: slideUp 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.share-handle {
  width: 38px;
  height: 4px;
  background: var(--line-hi);
  border-radius: 2px;
  margin: 0 auto 18px;
}

.share-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 18px;
  text-align: center;
}

.share-options {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.share-option {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  color: var(--text);
}

.share-option:hover { transform: translateY(-3px); }

.share-option-icon {
  width: 54px;
  height: 54px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--glass);
  border: 1px solid var(--line);
  backdrop-filter: var(--blur-soft);
  -webkit-backdrop-filter: var(--blur-soft);
}

.share-option-label { font-size: 11px; color: var(--text2); font-weight: 500; }

/* ===== Reseñas ===== */
.reviews-list { display: flex; flex-direction: column; gap: 12px; }

.review-card {
  background: var(--glass);
  backdrop-filter: var(--blur-soft);
  -webkit-backdrop-filter: var(--blur-soft);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 13px 15px;
  box-shadow: var(--edge);
}

.review-header {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 7px;
}

.review-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(180deg, var(--blue) 0%, var(--blue-deep) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}

.review-user { font-size: 13px; font-weight: 600; flex: 1; }

.review-stars {
  display: inline-flex;
  gap: 2px;
  align-items: center;
}
.review-stars svg { width: 12px; height: 12px; display: block; }
.review-stars .on  { color: var(--blue-ice); display: inline-flex; }
.review-stars .off { color: var(--text3); opacity: 0.55; display: inline-flex; }

.review-text { font-size: 13px; color: var(--text2); line-height: 1.6; }
.review-date { font-size: 11px; color: var(--text3); margin-top: 5px; }

/* ===== Formulario de reseña ===== */
.review-form {
  background: var(--glass);
  backdrop-filter: var(--blur-soft);
  -webkit-backdrop-filter: var(--blur-soft);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 15px;
  margin-top: 12px;
  box-shadow: var(--edge);
}

.star-picker { display: flex; gap: 8px; margin-bottom: 12px; }

.star-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text3);
  transition: var(--transition);
  padding: 0;
  line-height: 0;
}
.star-btn svg { width: 26px; height: 26px; }
.star-btn.active { color: var(--blue-hi); }
.star-btn:hover { transform: scale(1.15); color: var(--blue-ice); }

.review-textarea {
  width: 100%;
  background: rgba(4, 6, 11, 0.5);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  color: var(--text);
  font-size: 14px;
  font-family: inherit;
  padding: 11px 13px;
  resize: none;
  outline: none;
  transition: var(--transition);
  margin-bottom: 11px;
}

.review-textarea:focus {
  border-color: var(--line-hi);
  box-shadow: 0 0 0 3px rgba(47, 107, 255, 0.13);
}

.review-submit-btn {
  width: 100%;
  padding: 12px;
  background: linear-gradient(180deg, var(--blue) 0%, var(--blue-deep) 100%);
  color: #fff;
  border: 1px solid rgba(160, 195, 255, 0.28);
  border-radius: var(--r-sm);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: var(--transition);
}
.review-submit-btn:hover { filter: brightness(1.14); }

/* =============================================
   Compatibilidad: páginas con estilos propios
   (login, repo, imágenes, generadores)
   Reciben el cristal sin tocar su HTML.
   ============================================= */
.login-card,
.container .card,
.input-box,
.copy-box,
.back-nav,
.site-card {
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  box-shadow: var(--edge), var(--shadow-flat);
}

.back-nav {
  background: var(--glass-rail);
  border-bottom: 1px solid var(--line);
}

.btn-action,
.btn-login {
  background: linear-gradient(180deg, var(--blue) 0%, var(--blue-deep) 100%) !important;
  border: 1px solid rgba(160, 195, 255, 0.3) !important;
  box-shadow: var(--shadow-blue);
  transition: var(--transition);
}
.btn-action:hover,
.btn-login:hover { filter: brightness(1.14); }
.btn-action:disabled { filter: none; opacity: 0.45; box-shadow: none; }

.status-info {
  background: rgba(47, 107, 255, 0.1) !important;
  color: var(--blue-ice) !important;
  border: 1px solid var(--line);
}
.status-success {
  background: var(--green-soft) !important;
  color: var(--green) !important;
  border: 1px solid rgba(23, 201, 100, 0.28);
}
.status-error {
  background: var(--red-soft) !important;
  color: var(--red) !important;
  border: 1px solid rgba(255, 59, 78, 0.28);
}

.error-msg {
  background: var(--red-soft) !important;
  color: var(--red) !important;
  border: 1px solid rgba(255, 59, 78, 0.28);
}

.input-field:focus {
  border-color: var(--line-hi) !important;
  box-shadow: 0 0 0 4px rgba(47, 107, 255, 0.14) !important;
}

/* ===== Adaptable ===== */
@media (min-width: 480px) {
  .apps-grid { grid-template-columns: repeat(4, 1fr); }
}

@media (min-width: 768px) {
  .apps-grid { grid-template-columns: repeat(5, 1fr); gap: 20px 18px; padding: 0 20px; }
  .video-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; padding: 0 14px; }
  .video-card { padding: 0; border-radius: var(--r); overflow: hidden; }
  .video-info { padding: 11px 12px 14px; }
  .hero-banner { margin: 4px 20px 16px; }
  .hero-title { font-size: 26px; }
}

@media (min-width: 1024px) {
  .apps-grid { grid-template-columns: repeat(6, 1fr); }
  .video-list { grid-template-columns: repeat(3, 1fr); }
}

/* ===== Menos movimiento ===== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
