/* =========================================
   OCEAN BREEZE v2 — Fresh Coastal Design
   Complete visual transformation
   ========================================= */

:root {
  /* Ocean-inspired palette - completely different from previous */
  --ocean-deep: #0a1628;
  --ocean-mid: #1a2d4a;
  --ocean-surface: #243b5d;
  --ocean-light: #3d5a80;
  
  /* Coral & Sand accents */
  --coral-primary: #ff6b6b;
  --coral-light: #ff8e8e;
  --sand-gold: #f4d03f;
  --sand-cream: #fef9e7;
  
  /* Aqua & Teal highlights */
  --aqua-bright: #00d9ff;
  --aqua-soft: #7deeff;
  --teal-deep: #00b4a6;
  --teal-light: #5ce1e6;
  
  /* Sky gradients */
  --sky-dawn: #667eea;
  --sky-dusk: #764ba2;
  
  /* Neutral surfaces */
  --surface-1: rgba(255, 255, 255, 0.95);
  --surface-2: rgba(255, 255, 255, 0.08);
  --surface-3: rgba(255, 255, 255, 0.12);
  
  /* Borders */
  --border-subtle: rgba(255, 255, 255, 0.15);
  --border-medium: rgba(255, 255, 255, 0.25);
  --border-strong: rgba(255, 255, 255, 0.4);
  
  /* Text colors */
  --text-primary: #ffffff;
  --text-secondary: rgba(255, 255, 255, 0.75);
  --text-tertiary: rgba(255, 255, 255, 0.55);
  --text-dark: #1a1a2e;
  
  /* Typography - Modern geometric */
  --font-heading: 'Outfit', 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --font-body: 'Inter', 'DM Sans', system-ui, -apple-system, sans-serif;
  
  /* Spacing system */
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2.5rem;
  --space-xl: 4rem;
  --space-2xl: 6rem;
  
  /* Border radius - organic shapes */
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --radius-full: 9999px;
  
  /* Shadows - soft ambient */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.15);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.2);
  --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.25);
  --shadow-glow-coral: 0 0 40px rgba(255, 107, 107, 0.3);
  --shadow-glow-aqua: 0 0 40px rgba(0, 217, 255, 0.3);
  
  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-base: 300ms ease;
  --transition-slow: 500ms ease;
  
  /* Header */
  --header-height: 80px;
  --container-max: 1280px;
  
  /* Legacy aliases for compatibility */
  --ui-bg: var(--ocean-deep);
  --ui-surface: var(--surface-2);
  --ui-surface-2: var(--surface-3);
  --ui-border: var(--border-medium);
  --ui-border-soft: var(--border-subtle);
  --ui-text: var(--text-primary);
  --ui-muted: var(--text-secondary);
  --ui-faint: var(--text-tertiary);
  --ui-accent: var(--coral-primary);
  --ui-accent-2: var(--aqua-bright);
  --ui-accent-3: var(--teal-deep);
  --ui-accent-ink: var(--ocean-deep);
  --ui-glow-accent: var(--shadow-glow-coral);
  --ui-glow-cyan: var(--shadow-glow-aqua);
  --clr-primary: var(--coral-primary);
  --clr-secondary: var(--aqua-bright);
  --clr-bg: var(--ocean-deep);
  --clr-muted: var(--text-secondary);
  --clr-border: var(--border-subtle);
  --primary-color: var(--coral-primary);
  --border-color: var(--border-subtle);
  --bg-card: var(--surface-2);
  --text-main: var(--text-primary);
  --text-muted: var(--text-secondary);
  --bg-dark: var(--ocean-deep);
  --bg-pane: var(--surface-2);
  --bg-pane-hover: var(--surface-3);
  --border-light: var(--border-subtle);
  --border-hover: var(--border-medium);
  --glow-primary: var(--shadow-glow-coral);
  --clr-primary-glow: rgba(255, 107, 107, 0.35);
  --clr-secondary-glow: rgba(0, 217, 255, 0.35);
  --header-bg: rgba(10, 22, 40, 0.85);
}

*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-body);
  background: 
    radial-gradient(ellipse 80% 50% at 20% 40%, rgba(102, 126, 234, 0.15) 0%, transparent 50%),
    radial-gradient(ellipse 60% 40% at 80% 60%, rgba(118, 75, 162, 0.12) 0%, transparent 50%),
    radial-gradient(ellipse 50% 30% at 50% 100%, rgba(0, 217, 255, 0.08) 0%, transparent 40%),
    linear-gradient(180deg, var(--ocean-deep) 0%, var(--ocean-mid) 50%, var(--ocean-deep) 100%);
  background-attachment: fixed;
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  min-height: 100vh;
}

/* Animated gradient orbs */
body::before {
  content: "";
  position: fixed;
  top: 10%;
  right: -10%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(255, 107, 107, 0.12) 0%, transparent 70%);
  border-radius: 50%;
  filter: blur(80px);
  z-index: -1;
  animation: float-orb 20s ease-in-out infinite;
}

body::after {
  content: "";
  position: fixed;
  bottom: 10%;
  left: -5%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(0, 217, 255, 0.1) 0%, transparent 70%);
  border-radius: 50%;
  filter: blur(80px);
  z-index: -1;
  animation: float-orb 25s ease-in-out infinite reverse;
}

@keyframes float-orb {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(30px, -30px) scale(1.1); }
  66% { transform: translate(-20px, 20px) scale(0.9); }
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

a {
  text-decoration: none;
  color: inherit;
  transition: all var(--transition-base);
}

ul {
  list-style: none;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
  border-radius: var(--radius-md);
}

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.03);
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--coral-primary), var(--aqua-bright));
  border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, var(--coral-light), var(--aqua-soft));
}

.container {
  width: min(90%, var(--container-max));
  margin: 0 auto;
}

/* Ambient background for list/show/news pages */
.ambient-background {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
}

.ambient-background .orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.4;
}

.orb-1 {
  width: 400px;
  height: 400px;
  top: -100px;
  left: -100px;
  background: rgba(255, 107, 107, 0.25);
  animation: orb-drift 30s ease-in-out infinite;
}

.orb-2 {
  width: 350px;
  height: 350px;
  top: 20%;
  right: -50px;
  background: rgba(0, 217, 255, 0.2);
  animation: orb-drift 25s ease-in-out infinite reverse;
}

.orb-3 {
  width: 300px;
  height: 300px;
  bottom: 10%;
  left: 30%;
  background: rgba(0, 180, 166, 0.2);
  animation: orb-drift 35s ease-in-out infinite;
}

@keyframes orb-drift {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(50px, 30px); }
}

/* Header */
header, #main-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--header-height);
  display: flex;
  align-items: center;
  z-index: 1000;
  background: rgba(10, 22, 40, 0.75);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-subtle);
  transition: all var(--transition-base);
}

header.scrolled {
  background: rgba(10, 22, 40, 0.95);
  box-shadow: var(--shadow-lg);
}

.header-container {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--space-md);
}

.logo img {
  height: 42px;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.3));
}

.nav-list ul {
  display: flex;
  gap: var(--space-lg);
  align-items: center;
}

.nav-list a {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-secondary);
  position: relative;
  padding: 0.5rem 0;
}

.nav-list a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--coral-primary), var(--aqua-bright));
  transition: width var(--transition-base);
}

.nav-list a:hover,
.nav-list li.active a {
  color: var(--text-primary);
}

.nav-list a:hover::after {
  width: 100%;
}

.header-auth {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

/* Buttons */
.btn-login {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-full);
  border: 1.5px solid var(--border-medium);
  background: transparent;
  cursor: pointer;
  transition: all var(--transition-base);
}

.btn-login:hover {
  background: var(--surface-2);
  border-color: var(--coral-primary);
  transform: translateY(-2px);
}

.btn-signup {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, var(--coral-primary) 0%, var(--coral-light) 100%);
  color: white;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.95rem;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-full);
  border: none;
  box-shadow: var(--shadow-glow-coral);
  cursor: pointer;
  transition: all var(--transition-base);
}

.btn-signup:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 8px 30px rgba(255, 107, 107, 0.4);
}

/* Mobile menu toggle */
.mobile-menu-toggle {
  display: none;
  background: transparent;
  border: none;
  width: 48px;
  height: 48px;
  cursor: pointer;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.mobile-menu-toggle span {
  width: 26px;
  height: 2.5px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: all var(--transition-base);
}

.mobile-menu-toggle.active span:nth-child(1) {
  transform: translateY(8.5px) rotate(45deg);
}

.mobile-menu-toggle.active span:nth-child(2) {
  opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
  transform: translateY(-8.5px) rotate(-45deg);
}

.mobile-menu-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 22, 40, 0.9);
  backdrop-filter: blur(10px);
  z-index: 998;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-base);
}

.mobile-menu-overlay.active {
  opacity: 1;
  visibility: visible;
}

body.no-scroll {
  overflow: hidden;
}

/* Section utilities */
.section-title {
  font-size: clamp(2.2rem, 5vw, 3.5rem);
  margin-bottom: var(--space-md);
  text-align: center;
  font-weight: 800;
}

.section-prefix {
  display: inline-block;
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--coral-primary);
  margin-bottom: var(--space-sm);
  text-align: center;
}

.gradient-text {
  background: linear-gradient(135deg, var(--coral-primary) 0%, var(--aqua-bright) 50%, var(--teal-deep) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Footer */
footer, #main-footer {
  background: linear-gradient(180deg, rgba(26, 45, 74, 0.5) 0%, rgba(10, 22, 40, 0.9) 100%);
  border-top: 1px solid var(--border-subtle);
  padding: var(--space-2xl) 0 var(--space-lg);
  margin-top: var(--space-2xl);
}

.footer-top {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: var(--space-xl);
  margin-bottom: var(--space-xl);
}

.footer-brand p,
.footer-desc {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-top: var(--space-sm);
  max-width: 320px;
  line-height: 1.7;
}

.footer-nav h4,
.footer-contact h4 {
  font-size: 1.1rem;
  margin-bottom: var(--space-md);
  color: var(--text-primary);
  font-weight: 700;
}

.footer-nav ul {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.footer-nav a {
  color: var(--text-secondary);
  font-size: 0.95rem;
  transition: all var(--transition-fast);
}

.footer-nav a:hover {
  color: var(--coral-primary);
  padding-left: 5px;
}

.footer-bottom {
  border-top: 1px solid var(--border-subtle);
  padding-top: var(--space-md);
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--text-tertiary);
  font-size: 0.9rem;
  gap: var(--space-md);
}

.footer-links a {
  color: var(--coral-primary);
  font-weight: 600;
  transition: all var(--transition-fast);
}

.footer-links a:hover {
  color: var(--aqua-bright);
}

/* Utility classes */
.text-white { color: #fff !important; }
.text-center { text-align: center !important; }
.d-flex { display: flex !important; }
.gap-3 { gap: 1rem !important; }
.mb-5 { margin-bottom: 3rem !important; }
.mt-3 { margin-top: 1rem !important; }
.pt-3 { padding-top: 1rem !important; }
.me-2 { margin-right: 0.5rem !important; }
.ms-1 { margin-left: 0.25rem !important; }
.ms-2 { margin-left: 0.5rem !important; }
.border-top-dark { border-top: 1px solid var(--border-subtle) !important; }
.text-muted-light { color: var(--text-secondary) !important; }

/* Glass nav helper */
.glass-nav {
  border-radius: var(--radius-full);
  background: var(--surface-2);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-md);
}

/* Mobile bottom bar */
.mobile-bottom-bar {
  display: none;
}

/* Touch-friendly interactive elements */
@media (max-width: 768px) {
  .btn-login,
  .btn-signup,
  .btn-primary,
  .btn-secondary,
  .btn-play-game,
  .faq-question,
  .read-more,
  .mobile-bottom-bar a,
  .news-list-item,
  .tournament-card,
  .game-card-large,
  .step-card,
  .trust-card-v2,
  .testimonial-card,
  .vip-tier-horizontal,
  .why-card,
  .winner-testimonial,
  .news-preview-card {
    min-height: 44px;
  }

  .faq-question {
    min-height: 48px;
    display: flex;
    align-items: center;
  }

  .btn-primary,
  .btn-secondary,
  .btn-login,
  .btn-signup,
  .mobile-bottom-bar a {
    min-height: 48px;
    min-width: 48px;
  }
}

/* Extra small breakpoint for phones */
@media (max-width: 480px) {
  :root {
    --space-xs: 0.375rem;
    --space-sm: 0.75rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;
    --header-height: 70px;
  }

  .section-title {
    font-size: clamp(1.6rem, 8vw, 2.2rem);
    line-height: 1.2;
  }

  .section-prefix {
    font-size: 0.75rem;
    letter-spacing: 0.15em;
  }

  .container {
    width: min(95%, var(--container-max));
  }

  .logo img {
    height: 36px;
  }

  .badge {
    font-size: 0.7rem;
    padding: 8px 14px;
  }

  .gradient-text {
    word-break: break-word;
  }
}

/* Safe area support for notched devices */
@supports (padding-top: env(safe-area-inset-top)) {
  @media (max-width: 768px) {
    body {
      padding-top: env(safe-area-inset-top);
      padding-bottom: calc(80px + env(safe-area-inset-bottom));
    }

    #main-header {
      padding-top: env(safe-area-inset-top);
      height: calc(var(--header-height) + env(safe-area-inset-top));
    }

    .nav-list {
      top: calc(var(--header-height) + env(safe-area-inset-top));
      height: calc(100vh - var(--header-height) - env(safe-area-inset-top));
    }

    .mobile-bottom-bar {
      padding-bottom: calc(12px + env(safe-area-inset-bottom));
    }

    .footer-register-banner {
      padding-bottom: calc(var(--space-2xl) + env(safe-area-inset-bottom));
    }
  }
}

/* Responsive */
@media (max-width: 1024px) {
  .nav-list {
    position: fixed;
    top: var(--header-height);
    right: -100%;
    width: min(320px, 85%);
    height: calc(100vh - var(--header-height));
    background: rgba(10, 22, 40, 0.98);
    border-left: 1px solid var(--border-subtle);
    padding: var(--space-lg);
    display: flex;
    flex-direction: column;
    transition: right var(--transition-base);
    z-index: 999;
    overflow-y: auto;
  }

  .nav-list.active {
    right: 0;
  }

  .nav-list ul {
    flex-direction: column;
    gap: var(--space-md);
    align-items: flex-start;
  }

  .nav-list a {
    font-size: 1.1rem;
    padding: 0.75rem 0;
    display: block;
    width: 100%;
  }

  .header-auth .btn-signup {
    display: none;
  }

  .mobile-menu-toggle {
    display: flex;
  }

  .footer-top {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-lg);
  }

  .footer-nav h4,
  .footer-contact h4 {
    font-size: 1rem;
  }

  .footer-nav a,
  .footer-desc {
    font-size: 0.9rem;
  }
}

@media (max-width: 768px) {
  .footer-top {
    grid-template-columns: 1fr;
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }

  .mobile-bottom-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(10, 22, 40, 0.98);
    backdrop-filter: blur(14px);
    border-top: 1px solid var(--border-subtle);
    display: flex;
    padding: 12px;
    gap: 12px;
    z-index: 1000;
  }

  .mobile-bottom-bar a {
    flex: 1;
    text-align: center;
    padding: 14px;
    border-radius: var(--radius-full);
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.95rem;
  }

  .mobile-bottom-bar .btn-login {
    background: var(--surface-2);
    color: var(--text-primary);
    border: 1.5px solid var(--border-medium);
  }

  .mobile-bottom-bar .btn-register {
    background: linear-gradient(135deg, var(--coral-primary), var(--aqua-bright));
    color: white;
    border: none;
  }

  body {
    padding-bottom: 80px;
  }
}
