:root {
  --bg: #0a0a0f;
  --panel: #141423;
  --card: #1a1a2b;
  --pink: #ff2d8d;
  --pink-2: #ff7ab6;
  --text: #f5f6fb;
  --muted: #a6a8b8;
  --danger: #ff4d6d;
  --success: #3ddc97;
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  margin: 0;
}

body {
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial;
  color: var(--text);
  background-color: #000;
}

/* Mobile-first adjustments */
body {
  font-size: 16px;
  line-height: 1.5;
  padding: 0;
  margin: 0;
}

.hallow-trees {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url("/static/images/hallow_trees.png") no-repeat center center;
  background-size: cover;   /* fills the screen */
  z-index: -3;              /* sits behind stars/twinkling/clouds */
}

.pumpkin-logo {
  width: 30px;
  height: 30px;
  object-fit: contain;   /* keeps aspect ratio */
  margin-left: 3px;     /* space from the "JCard Shop" text */
}


.floating-key {
  position: absolute;
  width: 64px; /* adjust size */
  height: 64px;
  cursor: pointer;
  user-select: none;
  pointer-events: auto;
}

/* Navigation */
/* Nav container should be relative so we can absolutely place inside */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 20;
  background: linear-gradient(180deg, rgba(10, 10, 15, .95), rgba(10, 10, 15, .7));
  border-bottom: 1px solid rgba(255, 255, 255, .06);
  backdrop-filter: blur(10px);
}

.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 20px;
}


/* Both buttons occupy same spot */
.hamburger,
.menu-header .close {
  position: absolute;
  top: 14px;
  right: 20px;
  font-size: 28px;
  background: transparent;
  border: none;
  color: var(--text);
  cursor: pointer;
  z-index: 60;
}

.hamburger {
  z-index: 50;
  /* sits under the menu when open */
}

.menu-header .close {
  z-index: 70;
  /* sits above when menu is open */
}

/* Slide-in menu */
.menu {
  position: fixed;
  top: 0;
  right: -260px;
  width: 240px;
  height: 100%;
  background: var(--panel);
  box-shadow: -4px 0 20px rgba(0, 0, 0, 0.5);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: right 0.3s ease;
  z-index: 60;
  /* Above hamburger */
}

.menu.open {
  right: 0;
}

.menu-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.menu-header .brand {
  font-size: 24px;
}

.menu-header .close {
  font-size: 28px;
  background: transparent;
  border: none;
  color: var(--text);
  cursor: pointer;
}

.menu a {
  color: var(--text);
  text-decoration: none;
  font-size: 16px;
  padding: 8px 0;
}

.menu a:hover {
  color: var(--pink);
}

.menu hr {
  border: none;
  border-top: 1px solid rgba(255, 255, 255, .1);
  margin: 10px 0;
}

.menu .logout {
  color: var(--danger);
  font-weight: bold;
}

.brand {
  font-family: 'Great Vibes', cursive;
  font-size: 32px;
  letter-spacing: 2px;
  color: #ff4da6;
  /* Neon effect */
  text-shadow:
    0 0 3px #ff4da6,
    0 0 6px #ff4da6,
    0 0 12px rgba(255, 77, 166, 0.6),
    0 0 20px rgba(255, 77, 166, 0.4);
  background: linear-gradient(90deg, var(--pink), var(--pink-2));
  -webkit-background-clip: text;
  color: transparent;
}

.spacer {
  flex: 1;
}


/* Centered JCard balance */
.jcard-balance {
  display: flex;
  justify-content: center;
  margin-top: 10px;
}

.nav-username {
  font-size: 16px;
  font-weight: 600;
  color: var(--pink-2);
  margin-right: 16px;
  /* space before the hamburger */
  white-space: nowrap;
  /* prevents wrapping on narrow screens */
}

.user-info {
  height: 64px;
  display: flex;
  align-items: center;
  padding: 12px 20px 12px 36px;
  /* left padding makes room for the icon */
  font-weight: 600;
  font-size: 24px;
  position: relative;
  background: rgba(20, 20, 35, 0.6);
  border-radius: 999px;
  overflow: hidden;
  /* keep sparkles inside */
}

.jcard-symbol {
  height: 64px;
  display: flex;
  align-items: center;
  padding: 12px 20px 12px 36px;
  /* left padding makes room for the icon */
  font-weight: 600;
  font-size: 24px;
  position: relative;
  border-radius: 999px;
  overflow: hidden;
  /* keep sparkles inside */

  /* Add JC card as background icon */
  background-image: url("/static/images/jc.png");
  background-repeat: no-repeat;
  background-size: 32px 48px;
  background-position: 12px center;
}

/* Little twinkle dots */
.jcard-symbol::after {
  content: "✦";
  position: absolute;
  font-size: 14px;
  color: var(--pink-2);
  opacity: 0;
  animation: twinkle 4s infinite ease-in-out;
}

/* Random twinkling */
@keyframes twinkle {

  0%,
  100% {
    opacity: 0;
    transform: scale(0.5) translate(0, 0);
  }

  50% {
    opacity: 1;
    transform: scale(1.2) translate(5px, -5px);
  }
}

.jcard-pay-container {
  height: 32px;
  display: flex;
  align-items: center;
  /* vertical centering */
  justify-content: center;
  /* horizontal centering */
  gap: 12px;
  position: relative;
}

.jcard-pay-container strong {
  display: flex;
  /* make strong itself a flex container */
  align-items: center;
  /* center text + icon vertically */
  gap: 2px;
  /* space between number + icon */
}

.mini-jcard-symbol {
  display: block;
  height: 32px;
  width: 28px;
  font-weight: 600;
  position: relative;

  /* Add JC card as background icon */
  background-image: url("/static/images/jc.png");
  background-repeat: no-repeat;
  background-size: 16px 24px;
  background-position: 4px center;
}

/* Containers & cards */
.container {
  max-width: 1100px;
  margin: 215px auto;
  padding: 0 20px;
}

.card {
  background: linear-gradient(180deg, var(--card), #151527);
  border: 1px solid rgba(255, 255, 255, .06);
  border-radius: 16px;
  padding: 18px;
  margin-bottom: 16px;
  box-shadow: 0 8px 30px rgba(255, 45, 141, .06);
}

/* Grid */
.grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
}

/* Headings & text */
.h1 {
  font-size: 28px;
  margin: 8px 0;
}

.h2 {
  font-size: 18px;
  margin: 0;
}

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

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, .08);
  font-weight: 700;
  cursor: pointer;
  width: 100%;
}

.btn:hover {
  filter: brightness(1.05);
}

.btn-primary {
  background: linear-gradient(90deg, var(--pink), var(--pink-2));
  border: none;
  color: #0a0a0f;
}

.btn-ghost {
  background: transparent;
  border: 1px dashed rgba(255, 255, 255, .2);
  color: #fff;
}

.btn-danger {
  background: linear-gradient(90deg, #ff6b6b, #ff4d6d);
  border: none;
  color: #fff;
}

/* Form Inputs */
input[type="text"],
input[type="password"],
input[type="email"],
select {
  width: 100%;
  padding: 12px 14px;
  margin-top: 8px;
  margin-bottom: 16px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(20, 20, 35, 0.8);
  color: var(--text);
  font-size: 16px;
  transition: all 0.3s ease;
  outline: none;
}

/* Glow on focus */
input:focus,
select:focus {
  border-color: var(--pink);
  box-shadow: 0 0 8px var(--pink);
}

/* Labels */
label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 4px;
  color: var(--pink-2);
}


/* Filters */
.filters {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 10px 0;
}

.tag {
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .08);
  cursor: pointer;
}

.tag.active {
  border-color: rgba(255, 45, 141, .6);
  box-shadow: 0 0 0 2px rgba(255, 45, 141, .15) inset;
}

/* Tables */
.table {
  width: 100%;
  border-collapse: collapse;
}

.table th,
.table td {
  padding: 10px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, .08);
  text-align: left;
}

.table th {
  opacity: .7;
  font-size: 13px;
}

.neon-header {
  font-family: 'Great Vibes', cursive;
  font-size: 64px;
  font-weight: 400;
  text-align: center;
  color: #ff4da6;
  letter-spacing: 2px;

  /* Neon effect */
  text-shadow:
    0 0 3px #ff4da6,
    0 0 6px #ff4da6,
    0 0 12px rgba(255, 77, 166, 0.6),
    0 0 20px rgba(255, 77, 166, 0.4);

  /* Smooth glow animation */
  animation: neon-pulse 4s ease-in-out infinite;
}

.purchase-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.purchase-modal {
  background: var(--panel);
  border: 2px solid var(--pink);
  border-radius: 12px;
  padding: 24px;
  text-align: center;
  color: var(--text);
  box-shadow: 0 0 20px var(--pink);
}

.purchase-modal h2 {
  color: var(--pink-2);
  margin-bottom: 12px;
}

#fireworks {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: -1;
}

.tier-section {
  margin: 40px 0;
}

.tier-header {
  font-size: 24px;
  font-weight: 700;
  text-align: center;
  margin-bottom: 20px;
  color: var(--pink-2);
  text-shadow: 0 0 6px var(--pink), 0 0 12px var(--pink-2);
}


@keyframes neon-pulse {

  0%,
  100% {
    text-shadow:
      0 0 3px #ff4da6,
      0 0 6px #ff4da6,
      0 0 12px rgba(255, 77, 166, 0.6),
      0 0 20px rgba(255, 77, 166, 0.4);
  }

  50% {
    text-shadow:
      0 0 2px #ff4da6,
      0 0 5px #ff4da6,
      0 0 10px rgba(255, 77, 166, 0.5),
      0 0 16px rgba(255, 77, 166, 0.3);
  }
}

canvas {
  position: absolute;
  top: 1px;
  z-index: -1;
  width: 100%;
}

@keyframes move-twink-back {
from {background-position:0 0;}
to {background-position:-10000px 5000px;}
}
@-webkit-keyframes move-twink-back {
from {background-position:0 0;}
to {background-position:-10000px 5000px;}
}
@-moz-keyframes move-twink-back {
from {background-position:0 0;}
to {background-position:-10000px 5000px;}
}
@-ms-keyframes move-twink-back {
from {background-position:0 0;}
to {background-position:-10000px 5000px;}
}
@keyframes move-clouds-back {
from {background-position:0 0;}
to {background-position:10000px 0;}
}
@-webkit-keyframes move-clouds-back {
from {background-position:0 0;}
to {background-position:10000px 0;}
}
@-moz-keyframes move-clouds-back {
from {background-position:0 0;}
to {background-position:10000px 0;}
}
@-ms-keyframes move-clouds-back {
from {background-position: 0;}
to {background-position:10000px 0;}
}
.stars, .twinkling, .clouds {
  position: fixed;  /* instead of absolute */
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 100%;
}
.stars {
background:#000 url("/static/images/stars.png") repeat top center;
background-repeat: repeat;
height: 1300px;
z-index:-2;
}
.twinkling{
background:transparent url("/static/images/twinkling.png") repeat top center;
z-index:-1;
-moz-animation:move-twink-back 200s linear infinite;
-ms-animation:move-twink-back 200s linear infinite;
-o-animation:move-twink-back 200s linear infinite;
-webkit-animation:move-twink-back 200s linear infinite;
animation:move-twink-back 200s linear infinite;
height: 1300px;
}
.clouds{
background:transparent url("/static/images/clouds.png") repeat top center;
z-index:-1;
-moz-animation:move-clouds-back 200s linear infinite;
-ms-animation:move-clouds-back 200s linear infinite;
-o-animation:move-clouds-back 200s linear infinite;
-webkit-animation:move-clouds-back 200s linear infinite;
animation:move-clouds-back 200s linear infinite;
height: 1300px;
}

.ufo {
  position: fixed;
  top: -20%;      /* start slightly above screen */
  left: -20%;     /* start slightly left of screen */
  width: 300px;
  height: 260px;
  animation: driftDiagonal 120s linear infinite; /* slower drift */
  z-index: -1;
}

.triangle {
  width: 0;
  height: 0;
  border-left: 150px solid transparent;
  border-right: 150px solid transparent;
  border-bottom: 260px solid black;
  position: relative;
}

/* Corner lights */
.corner {
  position: absolute;
  width: 14px;
  height: 14px;
  background: #CCCFFF;
  border-radius: 50%;
  box-shadow: 0 0 10px #CCCFFF, 0 0 20px var(--pink-2);
  animation: pulseGlow 3s infinite ease-in-out;
}

/* Place each corner */
.corner-top {
  top: -4px;                  /* move slightly above */
  left: 48%;
  transform: translateX(-50%); /* centers exactly on tip */
}

.corner-left {
  bottom: -4px;
  left: -4px;
}

.corner-right {
  bottom: -4px;
  right: -4px;
}

/* Drift diagonally across */
@keyframes driftDiagonal {
  0% {
    top: -20%;
    left: -20%;
    transform: rotate(0deg);
  }
  25% {
    transform: rotate(2deg);
  }
  50% {
    top: 50%;
    left: 50%;
    transform: rotate(-1deg);
  }
  75% {
    transform: rotate(3deg);
  }
  100% {
    top: 120%;   /* off bottom */
    left: 120%;  /* off right */
    transform: rotate(0deg);
  }
}

/* Glow pulse */
@keyframes pulseGlow {
  0%, 100% {
    opacity: 0.7;
    transform: scale(1);
    box-shadow: 0 0 10px #CCCFFF, 0 0 20px var(--pink-2);
  }
  50% {
    opacity: 1;
    transform: scale(1.4);
    box-shadow: 0 0 20px #CCCFFF, 0 0 40px var(--pink-2);
  }
}



/* Responsive: Mobile adjustments */
@media (max-width: 768px) {
  .nav-inner {
    flex-wrap: wrap;
    justify-content: center;
    text-align: center;
  }

  .neon-header {
    font-size: 42px;
    /* shrink neon title */
  }

  .h1 {
    font-size: 22px;
  }

  .h2 {
    font-size: 16px;
  }

  .grid {
    grid-template-columns: 1fr;
    /* single column cards on mobile */
  }

  .card {
    padding: 14px;
  }

  .btn {
    width: 100%;
    /* full-width buttons for easy tapping */
    font-size: 16px;
    padding: 12px;
  }

  input,
  select {
    width: 100%;
    /* inputs expand full width */
    font-size: 16px;
  }
}

body.halloween-theme {
  background-color: #1a0d0d;
  color: #ff7518;
}

.leaf {
  position: fixed;
  top: -50px;
  width: 30px;
  height: 30px;
  background: url('/static/images/leaf.png') no-repeat center/contain;
  animation: fall linear forwards;
  pointer-events: none;
}

@keyframes fall {
  to { transform: translateY(110vh) rotate(360deg); }
}

.video-modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
}
