/* MineMoon Network - Estilos globales */

:root {
  --mm-red: #ef4444;      /* rojo navidad */
  --mm-green: #22c55e;    /* verde navidad */
  --mm-gold: #facc15;     /* dorado */
  --mm-blue: #60a5fa;     /* azul frío de apoyo */
  --mm-bg-dark: #020617;
  --mm-bg-card: rgba(15, 23, 42, 0.95);
  --mm-text: #e5e7eb;
  --mm-accent: #22d3ee;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background:
    radial-gradient(circle at 0% 0%, rgba(239, 68, 68, 0.25), transparent 55%),
    radial-gradient(circle at 100% 0%, rgba(34, 197, 94, 0.2), transparent 55%),
    radial-gradient(circle at 0% 100%, rgba(96, 165, 250, 0.25), transparent 55%),
    linear-gradient(160deg, #020617 0%, #020617 40%, #0b1120 75%, #1f2937 100%);
  color: var(--mm-text);
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(circle at 10% -10%, rgba(250, 250, 250, 0.16), transparent 55%),
    radial-gradient(circle at 90% 110%, rgba(248, 250, 252, 0.1), transparent 55%);
  mix-blend-mode: screen;
  opacity: 0.6;
  pointer-events: none;
  z-index: -1;
}

.page-wrapper {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.container {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 1.25rem;
}

/* Navbar */

.navbar {
  position: sticky;
  top: 0.75rem;
  z-index: 40;
}

.navbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1.25rem;
  border-radius: 999px;
  background:
    radial-gradient(circle at 0 0, rgba(239, 68, 68, 0.45), transparent 55%),
    radial-gradient(circle at 100% 100%, rgba(34, 197, 94, 0.5), transparent 55%),
    linear-gradient(90deg, rgba(15, 23, 42, 0.96), rgba(15, 23, 42, 0.95));
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.9);
  backdrop-filter: blur(22px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.brand-logo {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  position: relative;
  background: radial-gradient(circle at 30% 20%, #f9fafb, #e5e7eb 40%, #9ca3af 60%, #020617 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 30px rgba(56, 189, 248, 0.9);
}

.brand-logo::after {
  content: "";
  position: absolute;
  inset: 5px 2px 5px 12px;
  border-radius: 999px;
  background: #020617;
}

.brand-logo span {
  position: relative;
  font-size: 1rem;
  color: #facc15;
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-text-title {
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.8rem;
}

.brand-text-subtitle {
  font-size: 0.7rem;
  text-transform: uppercase;
  color: #9ca3af;
  letter-spacing: 0.18em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.nav-links a {
  font-size: 0.85rem;
  text-decoration: none;
  color: #e5e7eb;
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  position: relative;
  overflow: hidden;
}

.nav-links a::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, rgba(239, 68, 68, 0.8), rgba(248, 250, 252, 0.9), rgba(34, 197, 94, 0.8));
  opacity: 0;
  transition: opacity 0.18s ease-out;
}

.nav-links a span {
  position: relative;
  z-index: 1;
}

.nav-links a:hover::before,
.nav-links a.active::before {
  opacity: 0.45;
}

.nav-cta {
  border-radius: 999px;
  background:
    radial-gradient(circle at 0 0, rgba(239, 68, 68, 0.9), transparent 55%),
    radial-gradient(circle at 100% 100%, rgba(34, 197, 94, 0.9), transparent 55%);
  color: #f9fafb;
  padding: 0.4rem 1.1rem;
  font-size: 0.85rem;
  font-weight: 600;
  border: 1px solid rgba(248, 250, 252, 0.18);
  box-shadow: 0 12px 30px rgba(30, 64, 175, 0.8);
}

.nav-cta:hover {
  filter: brightness(1.05);
}

.nav-profile {
  position: relative;
  display: inline-flex;
}

.nav-profile-avatar {
  width: 26px;
  height: 26px;
  border-radius: 999px;
  overflow: hidden;
  background: conic-gradient(from 180deg, var(--mm-red), var(--mm-accent), var(--mm-blue), var(--mm-red));
  padding: 1px;
}

.nav-profile-avatar img {
  width: 100%;
  height: 100%;
  border-radius: inherit;
  display: block;
}

.nav-profile-name {
  font-size: 0.78rem;
  color: #e5e7eb;
}

.nav-profile-main {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.25rem 0.7rem;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.4);
  cursor: pointer;
  border: none;
}

.nav-profile-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 0.4rem);
  min-width: 150px;
  padding: 0.4rem;
  border-radius: 0.75rem;
  background: rgba(15, 23, 42, 0.98);
  border: 1px solid rgba(148, 163, 184, 0.35);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.96);
  z-index: 50;
}

.nav-profile-menu button {
  width: 100%;
  text-align: left;
  padding: 0.45rem 0.55rem;
  border-radius: 0.55rem;
  border: none;
  background: transparent;
  font-size: 0.8rem;
  color: #e5e7eb;
  cursor: pointer;
}

.nav-profile-menu button:hover {
  background: rgba(248, 113, 113, 0.18);
  color: #fecaca;
}

.nav-toggle {
  display: none;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  margin-bottom: 4px;
  background: linear-gradient(90deg, var(--mm-red), var(--mm-blue));
}

@media (max-width: 768px) {
  .nav-links {
    display: none;
  }

  .nav-links.mobile-open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 3.2rem;
    right: 0.75rem;
    padding: 0.8rem;
    border-radius: 1rem;
    background: rgba(15, 23, 42, 0.98);
    box-shadow: 0 20px 45px rgba(15, 23, 42, 0.95);
  }

  .nav-toggle {
    display: block;
  }
}

.hidden {
  display: none !important;
}

/* Hero index */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1.3fr);
  gap: 2.5rem;
  align-items: center;
  margin-top: 3.5rem;
}

.hero-title {
  font-size: clamp(2.4rem, 3.2vw + 1.6rem, 3.4rem);
  font-weight: 800;
  line-height: 1.1;
}

.hero-title span {
  background: linear-gradient(120deg, var(--mm-red), var(--mm-gold), var(--mm-green));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-subtitle {
  margin-top: 1rem;
  color: #9ca3af;
  max-width: 30rem;
}

.hero-buttons {
  margin-top: 1.75rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
}

.btn-primary,
.btn-secondary {
  border-radius: 999px;
  padding: 0.7rem 1.4rem;
  font-size: 0.9rem;
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
}

.btn-primary {
  background: linear-gradient(120deg, var(--mm-red), var(--mm-gold), var(--mm-green));
  color: #f9fafb;
  box-shadow: 0 18px 45px rgba(59, 130, 246, 0.7);
}

.btn-secondary {
  background: rgba(15, 23, 42, 0.9);
  border-color: rgba(148, 163, 184, 0.35);
  color: #e5e7eb;
}

.hero-card {
  position: relative;
  border-radius: 1.5rem;
  padding: 1.1rem;
  background:
    radial-gradient(circle at 0 0, rgba(239, 68, 68, 0.55), transparent 55%),
    radial-gradient(circle at 100% 100%, rgba(34, 197, 94, 0.55), transparent 55%),
    rgba(15, 23, 42, 0.98);
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.98);
}

.hero-card-inner {
  border-radius: 1.1rem;
  padding: 1.1rem;
  background: radial-gradient(circle at 30% 0, rgba(248, 250, 252, 0.16), transparent 60%),
              rgba(15, 23, 42, 0.97);
  border: 1px solid rgba(148, 163, 184, 0.25);
}

.hero-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.9rem;
}

.status-pill {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: #a5b4fc;
}

.hero-server-ip {
  font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace;
  font-size: 0.85rem;
  padding: 0.45rem 0.75rem;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.96);
  border: 1px solid rgba(148, 163, 184, 0.3);
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.hero-server-ip button {
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  background: linear-gradient(120deg, rgba(255, 0, 60, 0.9), rgba(0, 123, 255, 0.9));
  color: #f9fafb;
  font-size: 0.7rem;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.8rem;
  margin-top: 0.75rem;
}

.hero-stat {
  padding: 0.7rem 0.75rem;
  border-radius: 0.9rem;
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid rgba(148, 163, 184, 0.28);
}

.hero-stat-label {
  font-size: 0.7rem;
  color: #9ca3af;
}

.hero-stat-value {
  font-size: 1rem;
  font-weight: 700;
}

.hero-footnote {
  margin-top: 0.8rem;
  font-size: 0.75rem;
  color: #9ca3af;
}

/* Secciones genéricas */

.section {
  margin-top: 3rem;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.section-title {
  font-size: 1.15rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #9ca3af;
}

.section-subtitle {
  font-size: 0.9rem;
  color: #6b7280;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 1.2rem;
}

.card {
  border-radius: 1rem;
  padding: 1rem;
  background: rgba(15, 23, 42, 0.94);
  border: 1px solid rgba(148, 163, 184, 0.28);
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.95);
  transition: transform 0.18s ease-out, box-shadow 0.18s ease-out, border-color 0.18s ease-out;
}

.card-title {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
}

.card-meta {
  font-size: 0.75rem;
  color: #9ca3af;
  margin-bottom: 0.4rem;
}

.card-text {
  font-size: 0.85rem;
  color: #d1d5db;
}

.hero,
.card-grid .card {
  animation: mm-float 12s ease-in-out infinite alternate;
}

/* Login */

.auth-layout {
  display: flex;
  justify-content: center;
  align-items: center;
  flex: 1;
  padding: 3rem 1.25rem;
}

.auth-card {
  width: 100%;
  max-width: 420px;
  border-radius: 1.5rem;
  padding: 1.2rem;
  background: radial-gradient(circle at 0 0, rgba(255, 0, 60, 0.55), transparent 55%),
              radial-gradient(circle at 100% 100%, rgba(0, 123, 255, 0.6), transparent 55%),
              rgba(15, 23, 42, 0.98);
  box-shadow: 0 28px 70px rgba(15, 23, 42, 0.98);
}

.auth-card-inner {
  border-radius: 1.1rem;
  padding: 1.2rem;
  background: rgba(15, 23, 42, 0.96);
  border: 1px solid rgba(148, 163, 184, 0.35);
}

.auth-title {
  font-size: 1.25rem;
  font-weight: 700;
}

.auth-subtitle {
  margin-top: 0.4rem;
  font-size: 0.85rem;
  color: #9ca3af;
}

.form-field {
  margin-top: 1.1rem;
}

.form-label {
  font-size: 0.8rem;
  color: #9ca3af;
  margin-bottom: 0.3rem;
  display: block;
}

.form-input {
  width: 100%;
  border-radius: 0.9rem;
  border: 1px solid rgba(148, 163, 184, 0.45);
  background: rgba(15, 23, 42, 0.95);
  color: #e5e7eb;
  padding: 0.65rem 0.8rem;
  font-size: 0.9rem;
}

.form-input:focus {
  outline: none;
  border-color: rgba(59, 130, 246, 0.9);
  box-shadow: 0 0 0 1px rgba(59, 130, 246, 0.6);
}

.form-helper {
  margin-top: 0.35rem;
  font-size: 0.75rem;
  color: #6b7280;
}

.auth-footer {
  margin-top: 1.1rem;
  font-size: 0.8rem;
  color: #6b7280;
}

.auth-footer a {
  color: #93c5fd;
  text-decoration: none;
}

.auth-footer a:hover {
  text-decoration: underline;
}

.alert {
  margin-top: 0.7rem;
  padding: 0.55rem 0.7rem;
  border-radius: 0.75rem;
  font-size: 0.8rem;
}

.alert-error {
  background: rgba(185, 28, 28, 0.15);
  border: 1px solid rgba(248, 113, 113, 0.6);
  color: #fecaca;
}

.alert-success {
  background: rgba(22, 163, 74, 0.16);
  border: 1px solid rgba(74, 222, 128, 0.65);
  color: #bbf7d0;
}

/* Tienda */

.shop-layout {
  flex: 1;
  padding: 2.5rem 0 3rem;
}

.shop-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-bottom: 1.5rem;
}

.shop-filter-pill {
  border-radius: 999px;
  padding: 0.45rem 0.9rem;
  font-size: 0.8rem;
  border: 1px solid rgba(148, 163, 184, 0.5);
  background: rgba(15, 23, 42, 0.96);
  cursor: pointer;
}

.shop-filter-pill.active {
  border-color: rgba(248, 250, 252, 0.9);
  background:
    radial-gradient(circle at 0 0, rgba(239, 68, 68, 0.7), transparent 55%),
    radial-gradient(circle at 100% 100%, rgba(34, 197, 94, 0.8), transparent 55%);
}

.product-price {
  margin-top: 0.6rem;
  font-weight: 700;
  font-size: 0.95rem;
}

.product-actions {
  margin-top: 0.7rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.6rem;
}

.product-actions button {
  border-radius: 999px;
  border: none;
  cursor: pointer;
  padding: 0.5rem 0.9rem;
  font-size: 0.8rem;
  font-weight: 600;
  background: linear-gradient(120deg, var(--mm-red), var(--mm-gold));
  color: #f9fafb;
}

/* Equipo */

.team-layout {
  flex: 1;
  padding: 2.5rem 0 3rem;
}

.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 1.2rem;
}

.team-avatar {
  width: 52px;
  height: 52px;
  border-radius: 999px;
  background: conic-gradient(from 180deg, var(--mm-red), var(--mm-accent), var(--mm-blue), var(--mm-red));
  padding: 2px;
}

.team-avatar-inner {
  width: 100%;
  height: 100%;
  border-radius: inherit;
  background: #020617;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}

.team-role {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: #9ca3af;
}

.team-meta {
  margin-top: 0.3rem;
  font-size: 0.78rem;
  color: #6b7280;
}

/* Footer */

.footer {
  margin-top: auto;
  padding: 1.6rem 0 1.2rem;
  font-size: 0.78rem;
  color: #6b7280;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.8rem;
}

.footer-links {
  display: flex;
  gap: 0.9rem;
}

.footer-links a {
  color: #6b7280;
  text-decoration: none;
}

.footer-links a:hover {
  color: #e5e7eb;
}

@media (max-width: 900px) {
  .hero {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero-card {
    order: -1;
  }

  .section {
    margin-top: 2.5rem;
  }
}

@media (max-width: 640px) {
  .hero-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }
}

@keyframes mm-float {
  0% {
    transform: translate3d(0, 0, 0);
  }
  50% {
    transform: translate3d(0, -6px, 0);
  }
  100% {
    transform: translate3d(0, 3px, 0);
  }
}

@keyframes snow-fall {
  0% {
    transform: translate3d(var(--mm-snow-x, 0), -10vh, 0) rotate(0deg);
    opacity: 0;
  }
  10% {
    opacity: 1;
  }
  100% {
    transform: translate3d(var(--mm-snow-x, 0), 110vh, 0) rotate(360deg);
    opacity: 0;
  }
}

.snowflake {
  position: fixed;
  top: -10vh;
  left: 0;
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: #f9fafb;
  box-shadow: 0 0 12px rgba(248, 250, 252, 0.85);
  pointer-events: none;
  opacity: 0;
  animation-name: snow-fall;
  animation-timing-function: linear;
  animation-iteration-count: infinite;
  z-index: 5;
}
