/* MIDI SURVIVOR — LANDING PAGE */

*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --white: #ffffff;
  --black: #0a0a0a;
  --gray: #d0d0d0;
  --dark-gray: #333333;
  --cyan: #0fc;
  --pink: #f36;
  --yellow: #fc0;
  --font-mono: 'Syne Mono', 'Courier New', Courier, monospace;
}

html, body {
  height: 100%;
}

body {
  background: var(--black);
  color: #efefef;
  font-family: var(--font-mono);
  font-size: 18px;
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* HERO SECTION */

.hero {
  position: relative;
  width: 100vw;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url('../game/assets/midi-survivor.png');
  background-size: cover;
  background-position: center;
  z-index: 0;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 560px;
  margin: auto;
  text-align: center;
  box-shadow: rgba(0, 255, 204, 0.15) 0px 0px 30px 0px;
  border: 4px solid rgba(0, 255, 204, 0.5);
  background-color: rgba(0, 20, 40, 0.9);
}

.hero-title {
  font-size: clamp(3rem, 5vw, 5rem);
  font-weight: 700;
  color: var(--white);
  padding: 20px 20px 10px;
  line-height: 1em;
  text-align: left;
  letter-spacing: 0.1em;
  text-shadow: 0 0 20px rgba(0, 255, 204, 0.4);
}

.hero-subtitle {
  font-size: clamp(1.1rem, 2.5vw, 1.4rem);
  color: #efefef;
  padding: 14px 20px;
  line-height: 1.4em;
  text-align: left;
  letter-spacing: 0.05em;
}

.hero-subtitle.accent {
  color: var(--cyan);
}

.scroll-indicator {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  color: var(--gray);
  font-size: 1rem;
  z-index: 2;
  animation: bounce 2s ease-in-out infinite;
}

@keyframes bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(-8px); }
}

/* CONTAINER */

.container {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 20px;
}

/* SECTIONS */

.section {
  padding: 50px 0;
  border-bottom: 1px solid var(--dark-gray);
}

.section:last-child {
  border-bottom: none;
}

.text-center {
  text-align: center;
}

/* TYPOGRAPHY */

h1, h2, h3 {
  letter-spacing: 0.1em;
  font-weight: 700;
  line-height: 1.2;
}

h2 {
  font-size: 2.2rem;
  color: var(--cyan);
  margin-bottom: 20px;
  font-weight: normal;
}

h3 {
  font-size: 20px;
  margin-bottom: 12px;
}

p {
  margin-bottom: 16px;
}

.text-gray {
  color: var(--gray);
}

/* PRICE */

.price {
  font-size: 64px;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--yellow);
  text-shadow: 0 0 20px rgba(255, 204, 0, 0.3);
}

.price-note {
  color: var(--gray);
  letter-spacing: 0.1em;
  font-size: 16px;
}

/* FEATURES LIST */

.features {
  list-style: none;
  padding: 0;
  max-width: 500px;
  margin: 0 auto;
}

.features li {
  padding: 16px 0;
  border-bottom: 1px solid var(--dark-gray);
  letter-spacing: 0.03em;
  font-size: 17px;
  line-height: 1.5;
  color: #efefef;
}

.features li:last-child {
  border-bottom: none;
}

.features li::before {
  content: '► ';
  color: var(--pink);
}

.features + .steps {
  margin-top: 30px;
  padding-top: 30px;
  border-top: 1px solid var(--dark-gray);
}

/* HOW IT WORKS */

.steps {
  list-style: none;
  padding: 0;
  max-width: 500px;
  margin: 0 auto;
  counter-reset: step;
}

.steps li {
  padding: 16px 0;
  border-bottom: 1px solid var(--dark-gray);
  letter-spacing: 0.03em;
  font-size: 17px;
  line-height: 1.5;
  color: #efefef;
  counter-increment: step;
}

.steps li:last-child {
  border-bottom: none;
}

.steps li::before {
  content: counter(step) '. ';
  color: var(--cyan);
  font-weight: 700;
}

/* GAME MODES */

.modes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  max-width: 700px;
  margin: 0 auto;
}

.mode-card {
  border: 2px solid rgba(0, 0, 255, 1.0);
  padding: 20px;
  text-align: center;
}

.mode-card h3 {
  color: var(--yellow);
  font-size: 18px;
  margin-bottom: 8px;
  font-weight: normal;
}

.mode-card p {
  color: #efefef;
  font-size: 15px;
  line-height: 1.5;
  margin-bottom: 0;
}

/* BUTTONS */

.btn {
  display: inline-block;
  padding: 16px 40px;
  background: var(--yellow);
  color: var(--black);
  font-family: var(--font-mono);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.1em;
  border: 2px solid var(--yellow);
  border-radius: 0;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s ease;
}

.btn:hover {
  background: transparent;
  color: var(--yellow);
  box-shadow: 0 0 20px rgba(255, 204, 0, 0.3);
}

.btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.btn--large {
  font-size: 24px;
  padding: 20px 60px;
}

/* LOADING / STATUS */

.status {
  padding: 40px 0;
  text-align: center;
  letter-spacing: 0.15em;
  font-size: 16px;
  color: var(--cyan);
}

.blink {
  animation: blink 1s step-end infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

/* GAME CONTAINER */

#game-container {
  flex: 1;
  position: relative;
}

#game-container iframe {
  width: 100%;
  height: 100%;
  border: none;
  position: absolute;
  top: 0;
  left: 0;
}

/* ACCESS DENIED */

.denied {
  padding: 80px 0;
  text-align: center;
}

.denied h1 {
  font-size: 36px;
  margin-bottom: 24px;
}

/* FOOTER */

.footer {
  padding: 30px 0;
  border-top: 1px solid var(--dark-gray);
  text-align: center;
  font-size: 16px;
  color: var(--gray);
  letter-spacing: 0.1em;
}

.footer a {
  color: #5b8af7;
  text-decoration: underline;
  text-underline-offset: 4px;
  transition: color 0.2s;
}

.footer a:hover {
  color: #7ba4ff;
}

.footer-links {
  margin-bottom: 16px;
}

.footer-links a {
  margin: 0 12px;
}

/* STICKY BAR */

.sticky-bar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: rgba(10, 10, 10, 0.95);
  border-bottom: 1px solid var(--dark-gray);
  padding: 12px 20px;
  text-align: center;
  z-index: 100;
  transform: translateY(-100%);
  transition: transform 0.3s ease;
}

.sticky-bar.visible {
  transform: translateY(0);
}

.sticky-bar .btn {
  font-size: 16px;
  padding: 10px 30px;
}

/* CLERK SIGN-UP */

#signin-state {
  display: flex;
  justify-content: center;
}

/* HIDDEN */

.hidden {
  display: none !important;
}

/* RESPONSIVE */

@media (max-width: 600px) {
  .hero-content {
    max-width: 90%;
  }

  .price {
    font-size: 48px;
  }

  .btn--large {
    font-size: 18px;
    padding: 16px 40px;
  }

  .modes-grid {
    grid-template-columns: 1fr;
  }

  .section {
    padding: 35px 0;
  }
}
