/* ========================================================
   BEACH ISLAND - LUXUS TROPICAL FIVEM THEME
   Inspired by Beach Island Logo & Panoramic Beach Banner
   ======================================================== */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;600;700;800;900&family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=Pacifico&display=swap');

:root {
  --color-ocean-dark: #020c17;
  --color-ocean-deep: #05162a;
  --color-ocean-surface: #0a2544;
  --color-lagoon: #06b6d4;
  --color-lagoon-light: #38bdf8;
  --color-sand: #f59e0b;
  --color-sand-light: #fbbf24;
  --color-sunset: #f97316;
  --color-coral: #f43f5e;
  --color-palm: #10b981;
  --glass-bg: rgba(6, 25, 46, 0.82);
  --glass-border: rgba(56, 189, 248, 0.25);
  --glass-glow: 0 12px 40px -10px rgba(6, 182, 212, 0.25);
}

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

html {
  scroll-behavior: smooth;
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  color: #f8fafc;
  background-color: var(--color-ocean-dark);
}

body {
  overflow-x: hidden;
  background: #020c17;
  min-height: 100vh;
  line-height: 1.6;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 9px;
}
::-webkit-scrollbar-track {
  background: #020c17;
}
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #06b6d4, #f59e0b);
  border-radius: 6px;
  border: 2px solid #020c17;
}
::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #38bdf8, #fbbf24);
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Outfit', sans-serif;
  letter-spacing: -0.02em;
}

.font-script {
  font-family: 'Pacifico', cursive;
}

/* Top Navbar Styling */
.navbar-glass {
  background: rgba(4, 21, 38, 0.88);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(56, 189, 248, 0.28);
  box-shadow: 0 16px 40px -10px rgba(0, 0, 0, 0.7), 0 0 25px rgba(6, 182, 212, 0.2);
}

.nav-item-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.38rem 0.65rem;
  border-radius: 9999px;
  font-size: 0.8rem;
  font-weight: 600;
  white-space: nowrap;
  color: #cbd5e1;
  background: rgba(15, 30, 52, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  text-decoration: none;
}

.nav-item-link:hover {
  color: #ffffff;
  background: rgba(6, 182, 212, 0.16);
  border-color: rgba(56, 189, 248, 0.45);
  box-shadow: 0 0 16px rgba(6, 182, 212, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.15);
  transform: translateY(-1.5px);
}

.nav-item-link:active {
  transform: translateY(0);
}

.badge-rules-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.15rem 0.55rem;
  border-radius: 9999px;
  font-size: 0.68rem;
  font-weight: 800;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.3) 0%, rgba(245, 158, 11, 0.25) 100%);
  border: 1px solid rgba(56, 189, 248, 0.5);
  color: #38bdf8;
  white-space: nowrap;
  box-shadow: 0 0 10px rgba(6, 182, 212, 0.3);
  letter-spacing: 0.03em;
}

/* Tropical Hero Background */
.hero-tropical-bg {
  position: relative;
  background-image: 
    linear-gradient(180deg, 
      rgba(2, 12, 23, 0.75) 0%, 
      rgba(4, 22, 38, 0.78) 50%, 
      rgba(2, 12, 23, 0.98) 100%),
    url('../assets/banner-wide.jpg');
  background-size: cover;
  background-position: center 30%;
  background-repeat: no-repeat;
}

.hero-tropical-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 20%, rgba(245, 158, 11, 0.2) 0%, transparent 65%);
  pointer-events: none;
}

/* Glassmorphism Cards */
.glass-panel {
  background: var(--glass-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-glow);
}

.glass-card {
  background: rgba(9, 34, 61, 0.65);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(56, 189, 248, 0.18);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.glass-card:hover {
  transform: translateY(-4px);
  border-color: rgba(56, 189, 248, 0.45);
  box-shadow: 0 18px 40px -10px rgba(6, 182, 212, 0.3);
}

/* Tropical Gradients */
.text-gradient-tropical {
  background: linear-gradient(135deg, #fef08a 0%, #fbbf24 35%, #f97316 75%, #f43f5e 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.text-gradient-ocean {
  background: linear-gradient(135deg, #38bdf8 0%, #06b6d4 50%, #2dd4bf 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.text-glow-sand {
  text-shadow: 0 0 25px rgba(245, 158, 11, 0.55);
}

/* Floating Animations */
@keyframes floatSlow {
  0%, 100% {
    transform: translateY(0px) rotate(0deg);
  }
  50% {
    transform: translateY(-12px) rotate(1.2deg);
  }
}

.animate-float {
  animation: floatSlow 5.5s ease-in-out infinite;
}

/* ========================================================
   HIGH-END BUTTONS & CONTROLS
   ======================================================== */

/* Tropical Primary CTA */
.btn-tropical {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  padding: 0.9rem 2.2rem;
  border-radius: 9999px;
  font-weight: 800;
  font-size: 1rem;
  color: #ffffff;
  white-space: nowrap;
  background: linear-gradient(135deg, #f59e0b 0%, #ea580c 45%, #f43f5e 100%);
  border: 1px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 10px 30px -5px rgba(245, 158, 11, 0.6), 0 0 30px rgba(244, 63, 94, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.4);
  overflow: hidden;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
}

.btn-tropical::before,
.btn-discord::before {
  content: '';
  position: absolute;
  top: 0;
  left: -120%;
  width: 70%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.35) 50%,
    transparent 100%
  );
  transform: skewX(-25deg);
  transition: left 0.75s ease;
}

.btn-tropical:hover::before,
.btn-discord:hover::before {
  left: 150%;
}

.btn-tropical:hover {
  transform: translateY(-2.5px) scale(1.02);
  box-shadow: 0 16px 40px -5px rgba(245, 158, 11, 0.85), 0 0 40px rgba(244, 63, 94, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.6);
  color: #ffffff;
}

.btn-tropical:active {
  transform: translateY(0) scale(0.99);
}

/* Discord AAA Button */
.btn-discord {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.45rem 1.25rem;
  border-radius: 9999px;
  font-weight: 800;
  font-size: 0.82rem;
  color: #ffffff;
  white-space: nowrap;
  background: linear-gradient(135deg, #5865F2 0%, #4338ca 50%, #06b6d4 100%);
  border: 1px solid rgba(255, 255, 255, 0.25);
  box-shadow: 0 4px 20px -2px rgba(88, 101, 242, 0.65), 0 0 25px rgba(6, 182, 212, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.35);
  overflow: hidden;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
}

.btn-discord:hover {
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 8px 30px -4px rgba(88, 101, 242, 0.9), 0 0 35px rgba(6, 182, 212, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.55);
  color: #ffffff;
}

.btn-discord:active {
  transform: translateY(0) scale(0.98);
}

.btn-discord i {
  transition: transform 0.3s ease;
}

.btn-discord:hover i {
  transform: scale(1.15) rotate(-8deg);
}

/* Sound Wave Equalizer Pill Button */
#soundToggleBtn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.38rem 0.8rem;
  border-radius: 9999px;
  background: rgba(8, 28, 52, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(56, 189, 248, 0.3);
  box-shadow: 0 4px 15px -3px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  color: #38bdf8;
  font-size: 0.73rem;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

#soundToggleBtn:hover {
  background: rgba(12, 42, 78, 0.95);
  border-color: rgba(56, 189, 248, 0.65);
  box-shadow: 0 0 20px rgba(6, 182, 212, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.2);
  transform: translateY(-1.5px);
  color: #ffffff;
}

#soundToggleBtn:active {
  transform: translateY(0);
}

#soundToggleBtn.sound-playing {
  border-color: rgba(16, 185, 129, 0.75);
  background: rgba(6, 36, 42, 0.9);
  color: #34d399;
  box-shadow: 0 0 22px rgba(16, 185, 129, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.sound-bars {
  display: flex;
  align-items: flex-end;
  gap: 2.5px;
  height: 14px;
}

.sound-bar {
  width: 2.5px;
  background: #38bdf8;
  border-radius: 2px;
  height: 4px;
  transition: height 0.2s ease, background-color 0.3s ease;
}

#soundToggleBtn.sound-playing .sound-bar {
  background: linear-gradient(180deg, #10b981, #38bdf8);
}

.sound-playing .sound-bar:nth-child(1) {
  animation: soundBarAnim 0.7s ease-in-out infinite alternate;
}
.sound-playing .sound-bar:nth-child(2) {
  animation: soundBarAnim 0.5s ease-in-out infinite 0.2s alternate;
}
.sound-playing .sound-bar:nth-child(3) {
  animation: soundBarAnim 0.8s ease-in-out infinite 0.4s alternate;
}
.sound-playing .sound-bar:nth-child(4) {
  animation: soundBarAnim 0.6s ease-in-out infinite 0.1s alternate;
}

@keyframes soundBarAnim {
  0% { height: 3px; }
  100% { height: 14px; }
}

/* Category Filter Pills */
.filter-pill {
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  border-radius: 9999px;
  border: 1px solid rgba(56, 189, 248, 0.2);
  background: rgba(9, 34, 61, 0.65);
  color: #cbd5e1;
  font-weight: 600;
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.filter-pill:hover {
  background: rgba(56, 189, 248, 0.22);
  color: #ffffff;
  border-color: rgba(56, 189, 248, 0.5);
  transform: translateY(-2px);
  box-shadow: 0 6px 18px -4px rgba(6, 182, 212, 0.35);
}

.filter-pill.active {
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.5) 0%, rgba(245, 158, 11, 0.4) 100%);
  color: #ffffff;
  border-color: #38bdf8;
  box-shadow: 0 0 22px rgba(6, 182, 212, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.25);
  transform: translateY(-1px);
}

/* Rule Card Accordion */
.rule-card {
  border-left: 4px solid #06b6d4;
  transition: all 0.25s ease;
}

.rule-card:hover {
  border-left-color: #f59e0b;
  background: rgba(13, 44, 78, 0.75);
}

/* Copy Rule Button */
.copy-rule-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: rgba(15, 30, 52, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #94a3b8;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.copy-rule-btn:hover {
  background: rgba(6, 182, 212, 0.25);
  border-color: rgba(56, 189, 248, 0.5);
  color: #38bdf8;
  transform: scale(1.12);
  box-shadow: 0 0 10px rgba(6, 182, 212, 0.35);
}

.copy-rule-btn:active {
  transform: scale(0.95);
}

/* Toast */
#toast {
  position: fixed;
  bottom: 28px;
  right: 28px;
  transform: translateY(120px);
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 9999;
}

#toast.show {
  transform: translateY(0);
  opacity: 1;
}

/* Responsive */
@media (max-width: 1400px) {
  .nav-item-link {
    padding: 0.32rem 0.52rem;
    font-size: 0.75rem;
    gap: 0.28rem;
  }
  .badge-rules-count {
    padding: 0.1rem 0.42rem;
    font-size: 0.62rem;
  }
  #soundToggleBtn {
    padding: 0.32rem 0.68rem;
    font-size: 0.7rem;
  }
  .btn-discord {
    padding: 0.38rem 1rem;
    font-size: 0.76rem;
  }
}

@media (max-width: 1024px) {
  .hero-tropical-bg {
    background-position: center top;
  }
}
