/* ============================================
   FLAPPY DIVER LANDING PAGE STYLES
   8-Bit Retro Ocean Aesthetic
   ============================================ */

/* ============================================
   CSS CUSTOM PROPERTIES
   ============================================ */
:root {
  /* Color Palette (exact from game) */
  --ocean-blue: #5BA9B8;
  --deep-sea-blue: #2D5A6B;
  --wave-white: #FFFFFF;
  --coral-red: #C73E1D;
  --bright-cyan: #00D9FF;
  --light-foam: #E8F4F6;
  --gold: #FFD700;
  --black: #000000;

  /* Spacing System (8px base) */
  --spacing-xs: 8px;
  --spacing-sm: 16px;
  --spacing-md: 24px;
  --spacing-lg: 32px;
  --spacing-xl: 48px;
  --spacing-2xl: 64px;

  /* Typography */
  --font-pixel: 'Press Start 2P', monospace;
  --font-body: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;

  /* Borders & Shadows */
  --border-width: 3px;
  --shadow-hard: 4px 4px 0px;
  --shadow-pressed: 2px 2px 0px;
}

/* ============================================
   RESET & BASE STYLES
   ============================================ */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--deep-sea-blue);
  background: var(--light-foam);
  overflow-x: hidden;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  text-decoration: none;
  color: inherit;
}

button {
  font-family: inherit;
  cursor: pointer;
}

/* ============================================
   TYPOGRAPHY
   ============================================ */
h1, h2, h3 {
  font-family: var(--font-pixel);
  line-height: 1.2;
  text-transform: uppercase;
}

h1 {
  font-size: clamp(24px, 5vw, 48px);
}

h2 {
  font-size: clamp(20px, 4vw, 36px);
}

h3 {
  font-size: clamp(12px, 2vw, 16px);
}

/* ============================================
   LAYOUT CONTAINERS
   ============================================ */
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 var(--spacing-md);
}

.container-narrow {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 var(--spacing-md);
}

section {
  padding: var(--spacing-2xl) 0;
}

/* ============================================
   BUBBLE ANIMATION BACKGROUND
   ============================================ */
.bubble-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
  overflow: hidden;
}

.bubble {
  position: absolute;
  bottom: -50px;
  background: var(--bright-cyan);
  opacity: 0.3;
  animation: rise linear infinite;
}

.bubble:nth-child(1) { left: 5%; width: 12px; height: 12px; animation-duration: 12s; animation-delay: 0s; }
.bubble:nth-child(2) { left: 15%; width: 8px; height: 8px; animation-duration: 14s; animation-delay: 2s; }
.bubble:nth-child(3) { left: 25%; width: 16px; height: 16px; animation-duration: 10s; animation-delay: 1s; }
.bubble:nth-child(4) { left: 35%; width: 10px; height: 10px; animation-duration: 13s; animation-delay: 3s; }
.bubble:nth-child(5) { left: 45%; width: 14px; height: 14px; animation-duration: 11s; animation-delay: 0.5s; }
.bubble:nth-child(6) { left: 55%; width: 12px; height: 12px; animation-duration: 15s; animation-delay: 1.5s; }
.bubble:nth-child(7) { left: 65%; width: 8px; height: 8px; animation-duration: 12s; animation-delay: 2.5s; }
.bubble:nth-child(8) { left: 75%; width: 16px; height: 16px; animation-duration: 13s; animation-delay: 0.8s; }
.bubble:nth-child(9) { left: 85%; width: 10px; height: 10px; animation-duration: 14s; animation-delay: 1.8s; }
.bubble:nth-child(10) { left: 95%; width: 12px; height: 12px; animation-duration: 11s; animation-delay: 2.8s; }
.bubble:nth-child(11) { left: 10%; width: 14px; height: 14px; animation-duration: 12s; animation-delay: 4s; }
.bubble:nth-child(12) { left: 30%; width: 10px; height: 10px; animation-duration: 15s; animation-delay: 3.5s; }
.bubble:nth-child(13) { left: 50%; width: 8px; height: 8px; animation-duration: 13s; animation-delay: 4.5s; }
.bubble:nth-child(14) { left: 70%; width: 16px; height: 16px; animation-duration: 11s; animation-delay: 5s; }
.bubble:nth-child(15) { left: 90%; width: 12px; height: 12px; animation-duration: 14s; animation-delay: 5.5s; }

@keyframes rise {
  0% {
    bottom: -50px;
    opacity: 0;
  }
  10% {
    opacity: 0.3;
  }
  90% {
    opacity: 0.3;
  }
  100% {
    bottom: 110vh;
    opacity: 0;
  }
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--spacing-sm);
  padding: var(--spacing-sm) var(--spacing-lg);
  font-family: var(--font-pixel);
  font-size: 12px;
  text-transform: uppercase;
  border: var(--border-width) solid var(--deep-sea-blue);
  background: var(--coral-red);
  color: var(--wave-white);
  box-shadow: var(--shadow-hard) var(--deep-sea-blue);
  transition: all 150ms ease;
  text-align: center;
  line-height: 1.4;
}

.btn:hover:not(:disabled) {
  transform: translate(2px, 2px);
  box-shadow: var(--shadow-pressed) var(--deep-sea-blue);
}

.btn:active:not(:disabled) {
  transform: translate(4px, 4px);
  box-shadow: none;
}

.btn-primary {
  background: var(--coral-red);
}

.btn-secondary {
  background: var(--ocean-blue);
}

.btn-disabled {
  background: #999;
  cursor: not-allowed;
  opacity: 0.7;
}

.btn-large {
  padding: var(--spacing-md) var(--spacing-xl);
  font-size: 14px;
}

.btn-icon {
  font-size: 16px;
}

.btn-text {
  display: block;
}

/* ============================================
   SECTION TITLES
   ============================================ */
.section-title {
  text-align: center;
  color: var(--deep-sea-blue);
  margin-bottom: var(--spacing-xl);
  position: relative;
  z-index: 2;
}

.section-subtitle {
  text-align: center;
  font-family: var(--font-pixel);
  font-size: 12px;
  color: var(--deep-sea-blue);
  margin-bottom: var(--spacing-lg);
  line-height: 1.6;
}

/* ============================================
   HERO SECTION
   ============================================ */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: url('images/menu-background.png') center center / cover no-repeat;
  position: relative;
  padding: var(--spacing-2xl) var(--spacing-md);
  z-index: 2;
}

.hero-content {
  text-align: center;
  max-width: 800px;
  position: relative;
  z-index: 3;
}

.diver-animation {
  margin: 0 auto var(--spacing-lg);
  width: 200px;
  height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: float 2s ease-in-out infinite;
}

.diver-sprite {
  width: 100%;
  height: auto;
  image-rendering: pixelated;
  image-rendering: -moz-crisp-edges;
  image-rendering: crisp-edges;
}

@keyframes float {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-20px);
  }
}

.game-logo {
  margin-bottom: var(--spacing-lg);
}

.logo-image {
  max-width: 600px;
  width: 100%;
  height: auto;
  animation: pulse 2s ease-in-out infinite;
  filter: drop-shadow(4px 4px 0px var(--deep-sea-blue));
}

@keyframes pulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

.tagline {
  font-size: clamp(14px, 2vw, 18px);
  color: var(--deep-sea-blue);
  margin-bottom: var(--spacing-xl);
  font-weight: 600;
  letter-spacing: 0.5px;
}

.download-buttons {
  display: flex;
  gap: var(--spacing-md);
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: var(--spacing-lg);
}

.version-badge {
  font-size: 12px;
  color: var(--deep-sea-blue);
  opacity: 0.7;
  font-family: var(--font-pixel);
}

/* ============================================
   GAME PREVIEW SECTION
   ============================================ */
.game-preview {
  background: var(--ocean-blue);
  position: relative;
  z-index: 2;
}

.game-preview .section-title {
  color: var(--wave-white);
}

.carousel-container {
  max-width: 100%;
  margin: 0 auto var(--spacing-lg);
}

.device-frame {
  background: var(--deep-sea-blue);
  padding: var(--spacing-md);
  border: var(--border-width) solid var(--black);
  box-shadow: var(--shadow-hard) var(--black);
}

.carousel {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: var(--black);
}

.carousel-inner {
  display: flex;
  transition: transform 500ms ease-in-out;
  height: 100%;
}

.carousel-item {
  min-width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.carousel-item img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  image-rendering: pixelated;
  image-rendering: -moz-crisp-edges;
  image-rendering: crisp-edges;
}

.carousel-item.active {
  display: flex;
}

.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: var(--coral-red);
  border: var(--border-width) solid var(--black);
  color: var(--wave-white);
  font-family: var(--font-pixel);
  font-size: 16px;
  padding: var(--spacing-sm);
  cursor: pointer;
  box-shadow: var(--shadow-hard) var(--black);
  transition: all 150ms ease;
  z-index: 10;
}

.carousel-btn:hover {
  transform: translateY(-50%) translate(2px, 2px);
  box-shadow: var(--shadow-pressed) var(--black);
}

.carousel-prev {
  left: var(--spacing-sm);
}

.carousel-next {
  right: var(--spacing-sm);
}

.carousel-dots {
  display: flex;
  justify-content: center;
  gap: var(--spacing-sm);
  margin-top: var(--spacing-md);
}

.dot {
  width: 16px;
  height: 16px;
  background: var(--wave-white);
  border: var(--border-width) solid var(--deep-sea-blue);
  cursor: pointer;
  transition: all 150ms ease;
}

.dot:hover,
.dot.active {
  background: var(--coral-red);
}

/* ============================================
   FEATURES SECTION
   ============================================ */
.features {
  background: var(--light-foam);
  position: relative;
  z-index: 2;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--spacing-lg);
  max-width: 1200px;
  margin: 0 auto;
}

@media (min-width: 768px) {
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .features-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.feature-card {
  background: var(--wave-white);
  border: var(--border-width) solid var(--ocean-blue);
  padding: var(--spacing-lg);
  box-shadow: var(--shadow-hard) var(--ocean-blue);
  transition: all 150ms ease;
  text-align: center;
}

.feature-card:hover {
  border-color: var(--coral-red);
  transform: translateY(-4px);
}

.feature-icon {
  font-size: 48px;
  margin-bottom: var(--spacing-md);
}

.feature-title {
  color: var(--deep-sea-blue);
  margin-bottom: var(--spacing-sm);
  font-size: 12px;
}

.feature-desc {
  color: var(--deep-sea-blue);
  font-size: 14px;
  line-height: 1.6;
  opacity: 0.8;
}

/* ============================================
   NEWS SECTION
   ============================================ */
.news {
  background: var(--light-foam);
  position: relative;
  z-index: 2;
}

.news .section-title {
  color: var(--deep-sea-blue);
}

.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--spacing-lg);
  max-width: 1200px;
  margin: 0 auto;
}

.news-card {
  background: var(--wave-white);
  border: var(--border-width) solid var(--deep-sea-blue);
  padding: var(--spacing-lg);
  box-shadow: var(--shadow-hard) var(--black);
  transition: all 150ms ease;
}

.news-card:hover {
  transform: translateY(-4px);
}

.news-date {
  font-family: var(--font-pixel);
  font-size: 10px;
  color: var(--coral-red);
  margin-bottom: var(--spacing-sm);
}

.news-title {
  color: var(--deep-sea-blue);
  margin-bottom: var(--spacing-md);
  font-size: 14px;
}

.news-desc {
  color: var(--deep-sea-blue);
  font-size: 14px;
  line-height: 1.6;
  opacity: 0.8;
}

/* ============================================
   CONTACT SECTION
   ============================================ */
.contact {
  background: var(--deep-sea-blue);
  position: relative;
  z-index: 2;
  text-align: center;
}

.contact .section-title {
  color: var(--wave-white);
}

.contact-text {
  font-size: 18px;
  color: var(--wave-white);
  margin-bottom: var(--spacing-lg);
  line-height: 1.6;
}

.contact-btn {
  display: inline-block;
  text-decoration: none;
}

/* ============================================
   FORM STYLES
   ============================================ */
.form-group {
  margin-bottom: var(--spacing-md);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--spacing-md);
}

label {
  display: block;
  font-family: var(--font-pixel);
  font-size: 10px;
  color: var(--deep-sea-blue);
  margin-bottom: var(--spacing-xs);
  text-transform: uppercase;
}

input[type="text"],
input[type="email"],
textarea {
  width: 100%;
  padding: var(--spacing-sm);
  border: var(--border-width) solid var(--ocean-blue);
  background: var(--light-foam);
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--deep-sea-blue);
  transition: all 150ms ease;
}

input:focus,
textarea:focus {
  outline: none;
  border-color: var(--coral-red);
  box-shadow: var(--shadow-hard) var(--coral-red);
}

textarea {
  resize: vertical;
}

.privacy-note {
  font-size: 12px;
  color: var(--deep-sea-blue);
  opacity: 0.7;
  margin-top: var(--spacing-md);
  text-align: center;
}

/* ============================================
   ABOUT SECTION
   ============================================ */
.about {
  background: var(--light-foam);
  position: relative;
  z-index: 2;
}

.about-content {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: var(--spacing-2xl);
  align-items: center;
}

.about-text p {
  margin-bottom: var(--spacing-md);
  font-size: 16px;
  line-height: 1.8;
}

.about-text .btn {
  margin-top: var(--spacing-lg);
}

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

.about-logo img {
  max-width: 250px;
  margin: 0 auto;
  image-rendering: pixelated;
  image-rendering: -moz-crisp-edges;
  image-rendering: crisp-edges;
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
  background: var(--deep-sea-blue);
  color: var(--wave-white);
  padding: var(--spacing-2xl) 0 var(--spacing-lg);
  position: relative;
  z-index: 2;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--spacing-xl);
  margin-bottom: var(--spacing-xl);
}

.footer-logo {
  width: 80px;
  height: 80px;
  margin-bottom: var(--spacing-md);
  image-rendering: pixelated;
  image-rendering: -moz-crisp-edges;
  image-rendering: crisp-edges;
}

.footer-tagline {
  font-size: 14px;
  opacity: 0.8;
}

.footer-title {
  font-family: var(--font-pixel);
  font-size: 12px;
  margin-bottom: var(--spacing-md);
  color: var(--bright-cyan);
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: var(--spacing-sm);
}

.footer-links a {
  color: var(--wave-white);
  opacity: 0.8;
  transition: opacity 150ms ease;
}

.footer-links a:hover {
  opacity: 1;
  color: var(--bright-cyan);
}

.footer-links a.disabled-link {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

.social-links {
  display: flex;
  gap: var(--spacing-md);
}

.social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: var(--ocean-blue);
  border: var(--border-width) solid var(--bright-cyan);
  color: var(--wave-white);
  transition: all 150ms ease;
}

.social-link:hover {
  background: var(--bright-cyan);
  color: var(--deep-sea-blue);
}

.footer-bottom {
  text-align: center;
  padding-top: var(--spacing-lg);
  border-top: 2px solid var(--ocean-blue);
  font-size: 12px;
  opacity: 0.7;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */
@media (max-width: 768px) {
  .download-buttons {
    flex-direction: column;
    align-items: stretch;
  }

  .btn {
    width: 100%;
  }

  .logo-image {
    max-width: 90%;
  }

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

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

  .form-row {
    grid-template-columns: 1fr;
  }

  .about-content {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .carousel-btn {
    font-size: 12px;
    padding: var(--spacing-xs);
  }

  /* Hide some bubbles on mobile for performance */
  .bubble:nth-child(n+11) {
    display: none;
  }
}

@media (max-width: 480px) {
  .diver-animation {
    width: 150px;
    height: 150px;
  }

  .logo-image {
    max-width: 100%;
  }

  .carousel-btn {
    padding: 4px 8px;
  }

  section {
    padding: var(--spacing-xl) 0;
  }
}

/* ============================================
   ACCESSIBILITY & PRINT
   ============================================ */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

@media print {
  .bubble-container,
  .carousel-btn,
  .btn {
    display: none;
  }
}

/* ============================================
   UTILITY CLASSES
   ============================================ */
.text-center {
  text-align: center;
}

.mb-lg {
  margin-bottom: var(--spacing-lg);
}

.mt-lg {
  margin-top: var(--spacing-lg);
}
