
:root {
  color-scheme: dark;
  --night: #171426;
  --purple: #28203d;
  --pink: #f5c8e0;
  --lavender: #d8c8ff;
  --text: #fff6ff;
  --muted: #d1c6dd;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--night);
  color: var(--text);
  font-family: "Segoe UI", sans-serif;
  line-height: 1.7;
}

a {
  color: inherit;
  text-decoration: none;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  padding: 20px 8%;
  background: #10091d;
  border-bottom: 1px solid #ffffff16;
}

.brand {
  display: block;
  width: clamp(120px, 15vw, 190px);
  flex: 0 0 auto;
  line-height: 0;
}

.brand img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 4px;
}

nav {
  display: flex;
  gap: 22px;
  font-size: 0.9rem;
}

nav a:hover {
  color: var(--pink);
}

.hero {
  min-height: 620px;
  padding: 100px 8%;
  display: flex;
  justify-content: center;
  background:
    linear-gradient(90deg, #170a25f2 0%, #170a25d9 36%, #170a2580 60%, #170a2510 100%),
    linear-gradient(0deg, var(--night) 0%, transparent 28%),
    url("imagenes/mother-star-cover.png") center 42% / cover no-repeat;
}

.hero-content {
  width: min(100%, 900px);
}

.stars {
  color: var(--lavender);
  font-size: 1.7rem;
  letter-spacing: 8px;
}

.eyebrow {
  color: var(--pink);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 3px;
}

h1 {
  margin: 14px 0;
  font-family: Georgia, serif;
  font-size: clamp(2.6rem, 7vw, 5rem);
  line-height: 1.12;
}

.intro,
.about > p:last-child {
  max-width: 760px;
  color: var(--muted);
}

.hero .intro {
  color: #f0e7f5;
}

.button {
  display: inline-block;
  margin-top: 20px;
  padding: 12px 24px;
  border: 1px solid var(--pink);
  border-radius: 999px;
  background: var(--pink);
  color: #27182d;
  font-weight: 700;
}

.button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px #f5c8e044;
}

.tiny {
  color: #b8a8c9;
  font-size: 0.85rem;
}

.game {
  display: grid;
  grid-template-columns: minmax(220px, 0.8fr) 1.2fr;
  align-items: center;
  gap: 55px;
  max-width: 1000px;
  margin: auto;
  padding: 90px 30px;
}

.game-art {
  min-height: 330px;
  border: 1px solid #d8c8ff55;
  border-radius: 180px 180px 24px 24px;
  overflow: hidden;
  box-shadow: 0 18px 45px #09061266;
}

.game-art img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 330px;
  object-fit: cover;
  object-position: center;
}

h2 {
  font-family: Georgia, serif;
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.2;
}

.game-info > p:not(.eyebrow) {
  color: var(--muted);
}

.coming {
  font-size: 0.9rem;
}

.download-button {
  text-align: center;
}

.about {
  padding: 75px 20px;
  text-align: center;
  background: var(--purple);
}

.about > p:last-child {
  margin: auto;
}

.section-wrap {
  width: min(100% - 48px, 1000px);
  margin: 0 auto;
}

.gallery,
.comments {
  padding-top: 80px;
  padding-bottom: 80px;
}

.gallery h2,
.comments h2,
.links-section h2 {
  margin: 0 0 10px;
}

.section-lead,
.empty-state {
  color: var(--muted);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 14px;
  margin-top: 30px;
}

.gallery-card {
  position: relative;
  min-width: 0;
  overflow: hidden;
  border: 1px solid #d8c8ff38;
  border-radius: 14px;
  background: #21182f;
  transition: border-color 180ms ease, transform 180ms ease;
}

.gallery-card:hover {
  transform: translateY(-3px);
  border-color: #d8c8ff99;
}

.gallery-open {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  overflow: hidden;
  border: 0;
  background: transparent;
  cursor: zoom-in;
}

.gallery-card img {
  display: block;
  width: 100%;
  height: 145px;
  object-fit: cover;
  transition: transform 250ms ease;
}

.gallery-open:hover img {
  transform: scale(1.06);
}

.gallery-zoom {
  position: absolute;
  right: 8px;
  bottom: 8px;
  padding: 4px 8px;
  border-radius: 999px;
  background: #10091dcc;
  color: white;
  font-size: 0.7rem;
  opacity: 0;
  transition: opacity 180ms ease;
}

.gallery-open:hover .gallery-zoom,
.gallery-open:focus-visible .gallery-zoom {
  opacity: 1;
}

.gallery-card figcaption {
  padding: 8px 11px;
  color: var(--muted);
  font-size: 0.9rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.image-lightbox {
  position: fixed;
  inset: 0;
  width: 100%;
  max-width: none;
  height: 100%;
  max-height: none;
  padding: 64px 72px 30px;
  border: 0;
  background: #090711f2;
  color: var(--text);
}

.image-lightbox::backdrop {
  background: #090711ed;
}

.lightbox-figure {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  margin: 0;
}

.lightbox-figure img {
  display: block;
  max-width: 100%;
  max-height: calc(100% - 45px);
  object-fit: contain;
}

.lightbox-figure figcaption {
  padding-top: 12px;
  color: var(--muted);
  text-align: center;
}

.lightbox-close,
.lightbox-nav {
  position: absolute;
  display: grid;
  place-items: center;
  border: 1px solid #ffffff55;
  border-radius: 50%;
  background: #171426cc;
  color: white;
  cursor: pointer;
}

.lightbox-close {
  top: 18px;
  right: 20px;
  width: 42px;
  height: 42px;
  font-size: 1.8rem;
}

.lightbox-nav {
  top: 50%;
  width: 48px;
  height: 48px;
  transform: translateY(-50%);
  font-size: 2rem;
}

.lightbox-previous {
  left: 18px;
}

.lightbox-next {
  right: 18px;
}

.lightbox-close:hover,
.lightbox-nav:hover {
  border-color: var(--pink);
  background: #392846;
}

.links-section {
  padding: 70px 0;
  background: linear-gradient(135deg, #28203d, #21182f);
}

.links-list {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 26px;
}

.featured-link {
  margin-top: 22px;
}

.featured-link h3 {
  margin: 0 0 10px;
  color: var(--pink);
  font-size: 1.1rem;
}

.link-item {
  display: flex;
  align-items: center;
  gap: 8px;
}

.external-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 11px 17px;
  border: 1px solid #d8c8ff55;
  border-radius: 999px;
  color: var(--text);
  transition: background 180ms ease, border-color 180ms ease;
}

.external-link:hover {
  border-color: var(--pink);
  background: #f5c8e01a;
}

.comment-form,
.account-form,
.admin-form,
.admin-login {
  display: grid;
  gap: 10px;
  max-width: 620px;
}

.account-area {
  margin-top: 28px;
  padding: 22px;
  border: 1px solid #d8c8ff30;
  border-radius: 16px;
  background: #ffffff06;
}

.account-forms {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px;
}

.account-form h3 {
  margin: 0 0 4px;
  color: var(--text);
}

.account-form label span {
  color: #9d91ab;
  font-size: 0.8rem;
}

.account-form input {
  width: 100%;
  padding: 11px 13px;
  border: 1px solid #d8c8ff47;
  border-radius: 10px;
  background: #100d1b;
  color: var(--text);
  font: inherit;
}

.account-form .button {
  justify-self: start;
  cursor: pointer;
  font: inherit;
}

.button-outline {
  border-color: #d8c8ff80;
  background: transparent;
  color: var(--text);
}

.account-session {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 18px;
}

.profile-heading {
  display: flex;
  align-items: center;
  gap: 13px;
  min-width: 0;
}

.profile-avatar {
  width: 58px;
  height: 58px;
  flex: 0 0 auto;
  border: 2px solid #d8c8ff80;
  border-radius: 50%;
  background: #21182f;
  object-fit: cover;
}

.profile-heading p {
  margin: 0;
  color: var(--muted);
}

.profile-heading strong {
  color: var(--pink);
}

.profile-heading span {
  display: block;
  color: #9d91ab;
  font-size: 0.82rem;
}

.profile-settings {
  position: relative;
  flex: 1 1 100%;
  padding: 12px 0 0 71px;
  border-top: 1px solid #ffffff18;
}

.profile-settings summary {
  width: fit-content;
  color: var(--lavender);
  cursor: pointer;
}

.profile-form {
  display: grid;
  gap: 9px;
  max-width: 500px;
  margin-top: 14px;
}

.profile-form label {
  color: var(--muted);
  font-size: 0.9rem;
}

.profile-form label span,
.field-note {
  color: #9d91ab;
  font-size: 0.8rem;
}

.profile-form input:not([type="file"]) {
  width: 100%;
  padding: 11px 13px;
  border: 1px solid #d8c8ff47;
  border-radius: 10px;
  background: #100d1b;
  color: var(--text);
  font: inherit;
}

.profile-form input[type="file"] {
  max-width: 100%;
  color: var(--muted);
  font: inherit;
}

.profile-form .button {
  justify-self: start;
  cursor: pointer;
  font: inherit;
}

.field-note {
  margin: -5px 0 4px;
}

.comment-form {
  margin-top: 28px;
}

.comment-form label,
.account-form label,
.admin-form label,
.admin-login label {
  color: var(--muted);
  font-size: 0.9rem;
}

.comment-form input,
.comment-form textarea,
.account-form input,
.admin-panel input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #d8c8ff47;
  border-radius: 10px;
  background: #100d1b;
  color: var(--text);
  font: inherit;
}

.comment-form textarea {
  resize: vertical;
}

.comment-form .button,
.admin-panel .button {
  justify-self: start;
  cursor: pointer;
  font: inherit;
}

.comment-list {
  display: grid;
  gap: 14px;
  margin-top: 32px;
}

.comment-card {
  display: flex;
  align-items: flex-start;
  gap: 13px;
  padding: 18px 20px;
  border-left: 2px solid var(--pink);
  border-radius: 0 12px 12px 0;
  background: #ffffff09;
}

.comment-avatar {
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  border: 1px solid #d8c8ff55;
  border-radius: 50%;
  background: #21182f;
  object-fit: cover;
}

.comment-content {
  min-width: 0;
}

.comment-card h3 {
  margin: 0 0 5px;
  color: var(--pink);
  font-size: 1rem;
}

.comment-card p {
  margin: 0;
  color: var(--muted);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.comment-card time {
  display: block;
  margin-top: 9px;
  color: #9d91ab;
  font-size: 0.78rem;
}

.item-delete {
  padding: 7px 10px;
  border: 1px solid #f5c8e077;
  border-radius: 999px;
  background: #171426;
  color: var(--pink);
  cursor: pointer;
  font: inherit;
  font-size: 0.8rem;
}

.form-status[data-error] {
  color: #ffb8c0;
}

.form-status {
  min-height: 1.5em;
  color: var(--lavender);
}

.admin-area {
  padding: 0 24px 42px;
}

.admin-panel {
  width: min(100%, 1000px);
  margin: 0 auto;
  color: #b8a8c9;
  font-size: 0.85rem;
}

.admin-panel summary {
  width: fit-content;
  cursor: pointer;
}

.admin-login,
.admin-tools {
  margin-top: 18px;
  padding: 22px;
  border: 1px solid #d8c8ff30;
  border-radius: 14px;
  background: #100d1b;
}

.admin-login p,
.admin-tools > p {
  margin-top: 0;
}

.admin-form {
  padding: 20px 0;
  border-top: 1px solid #ffffff18;
}

.admin-form h3 {
  margin: 0 0 5px;
  color: var(--text);
}

.admin-logout {
  padding: 8px 12px;
  border: 1px solid #ffffff55;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

[hidden] {
  display: none !important;
}

footer {
  padding: 30px 20px;
  color: var(--muted);
  text-align: center;
  font-size: 0.85rem;
}

@media (max-width: 650px) {
  .topbar {
    padding: 18px;
    gap: 12px;
  }

  nav {
    gap: 14px;
    font-size: 0.82rem;
  }

  .brand {
    width: clamp(100px, 29vw, 140px);
  }

  .hero {
    min-height: 560px;
    padding: 75px 24px;
    background:
      linear-gradient(90deg, #170a25ed 0%, #170a25c9 58%, #170a2570 100%),
      linear-gradient(0deg, var(--night) 0%, transparent 30%),
      url("imagenes/mother-star-cover.png") 61% center / cover no-repeat;
  }

  .hero-content {
    text-align: left;
  }

  .game {
    grid-template-columns: 1fr;
    gap: 25px;
    padding: 55px 24px;
  }

  .game-art {
    min-height: 280px;
  }

  .game-art img {
    min-height: 280px;
  }

  .section-wrap {
    width: min(100% - 36px, 1000px);
  }

  .gallery,
  .comments {
    padding-top: 55px;
    padding-bottom: 55px;
  }

  .links-section {
    padding: 55px 0;
  }

  .account-forms {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .account-area {
    padding: 18px;
  }

  .profile-settings {
    padding-left: 0;
  }

  .gallery-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .gallery-card img {
    height: 120px;
  }

  .gallery-card figcaption {
    font-size: 0.8rem;
  }

  .image-lightbox {
    padding: 64px 48px 24px;
  }

  .lightbox-previous {
    left: 6px;
  }

  .lightbox-next {
    right: 6px;
  }
}

/* =========================================
   ODYSSHINE GAMES — COSMIC STARFIELD
   ========================================= */

#cosmos-canvas {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    display: block;
    pointer-events: none;
    z-index: 0;
}

/* Mantiene el contenido de la web por encima
   de las estrellas sin bloquear los clics. */
body > *:not(#cosmos-canvas) {
    position: relative;
    z-index: 1;
}

/* Evita que las estrellas tapen la página
   y conserva el fondo cósmico. */
body {
    background-color: #08091b;
}

/* En móviles dejamos un poco más de espacio
   visual para el contenido. */
@media (max-width: 700px) {
    #cosmos-canvas {
        opacity: 0.7;
    }
}

/* Respeta la preferencia del usuario por
   reducir las animaciones. */
@media (prefers-reduced-motion: reduce) {
    #cosmos-canvas {
        opacity: 0.45;
    }
}

