/* styles.css — versión limpia y bonita */

/* ------------------------- Reset y variables ------------------------- */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg: #0f1724;
  --card: #0b1220;
  --accent1: #ff4d4f;
  --accent2: #7c5cff;
  --glass: rgba(255,255,255,0.06);
  --muted: rgba(255,255,255,0.6);
  --glass-2: rgba(255,255,255,0.03);
  --radius: 14px;
  --card-radius: 18px;
}

/* ------------------------- Body ------------------------- */
body {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
  background: radial-gradient(1200px 600px at 10% 10%, rgba(124,92,255,0.08), transparent),
              linear-gradient(180deg,#071022 0%, #0b1320 100%);
  color: #e8eef8;
  min-height: 100vh;
}

.wrap {
  max-width: 1200px;
  margin: 32px auto;
  padding: 24px;
}

/* ------------------------- Header ------------------------- */
header {
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
}
.brand {
  display: flex;
  gap: 12px;
  align-items: center;
}
.logo {
  width: 300px;
  height: 200px;
  background-image: url('Logos/xocas.svg'); /* Ruta a la imagen del logo */
  background-size: cover;      /* Ajusta la imagen al contenedor */
  background-position: center; /* Centra la imagen */
  background-repeat: no-repeat;/* Evita que se repita */
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}


.brand h1 {
  font-size: 20px;
  letter-spacing: 0.4px;
}
.brand p {
  font-size: 12px;
  color: var(--muted);
}

.controls {
  display: flex;
  gap: 12px;
  align-items: center;
}
.search {
  position: relative;
}
.search input {
  width: 320px;
  padding: 10px 14px;
  padding-left: 40px;
  border-radius: 999px;
  border: 0;
  background: var(--glass);
  color: inherit;
  outline: none;
  box-shadow: inset 0 -1px 0 rgba(255,255,255,0.02);
}
.search svg {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  opacity: 0.8;
}
.btn {
  background: linear-gradient(90deg, var(--accent1), var(--accent2));
  padding: 10px 14px;
  border-radius: 10px;
  color: white;
  text-decoration: none;
  font-weight: 600;
  display: inline-flex;
  gap: 8px;
  align-items: center;
  box-shadow: 0 8px 30px rgba(0,0,0,0.45);
}

/* ------------------------- Grid de juegos ------------------------- */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 18px;
  margin-top: 22px;
}
.tile {
  background: linear-gradient(180deg, var(--card), rgba(11,17,28,0.7));
  border-radius: var(--card-radius);
  padding: 14px;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease;
}
.tile:hover {
  transform: translateY(-6px);
  box-shadow: 0 14px 40px rgba(2,6,23,0.6);
}
.thumb {
  height: 120px;
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0.01));
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.meta {
  padding-top: 10px;
}
.meta h3 {
  font-size: 16px;
  margin-bottom: 6px;
}
.meta p {
  font-size: 12px;
  color: var(--muted);
}
.play {
  position: absolute;
  right: 14px;
  bottom: 14px;
  background: rgba(0,0,0,0.45);
  backdrop-filter: blur(6px);
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.03);
  font-weight: 700;
}
.badges {
  position: absolute;
  left: 12px;
  top: 12px;
  display: flex;
  gap: 8px;
}
.badge {
  background: linear-gradient(90deg, var(--accent1), var(--accent2));
  padding: 6px 8px;
  border-radius: 8px;
  font-size: 11px;
  box-shadow: 0 8px 30px rgba(124,92,255,0.06);
}

/* ------------------------- Modal ------------------------- */
.modal {
  position: fixed;
  inset: 0;
  background: linear-gradient(rgba(2,6,23,0.6), rgba(2,6,23,0.86));
  display: none;
  align-items: center;
  justify-content: center;
  padding: 36px;
  z-index: 9999;
}
.modal.open {
  display: flex;
}
.iframe-wrap {
  width: 100%;
  max-width: 1200px;
  height: 80vh;
  background: var(--glass-2);
  border-radius: 16px;
  overflow: hidden;
  display: grid;
  grid-template-rows: auto 1fr;
}
.iframe-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: linear-gradient(180deg, rgba(255,255,255,0.02), transparent);
}
.iframe-top .title {
  font-weight: 700;
}
.iframe {
  width: 100%;
  border: 0;
  height: 100%;
}
.close {
  background: transparent;
  border: 0;
  color: var(--muted);
  font-weight: 700;
  padding: 8px 10px;
  border-radius: 8px;
}

/* ------------------------- Responsive ------------------------- */
@media (max-width: 720px) {
  .search input {
    width: 160px;
  }
  .thumb {
    height: 100px;
  }
}