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

:root {
  --bg-primary: #0b0c10;
  --bg-secondary: #1f2833;
  --bg-card: rgba(31, 40, 51, 0.7);
  --accent-gold: #ffbd59;
  --accent-neon: #00ffcc;
  --accent-purple: #9d4edd;
  --accent-red: #ff3366;
  --text-main: #edf5e1;
  --text-muted: #c5c6c7;
  --border-glow: rgba(255, 189, 89, 0.4);
  --glass: rgba(255, 255, 255, 0.05);
  --font-main: 'Outfit', sans-serif;
  --font-heading: 'Space Grotesk', sans-serif;
}

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

body {
  background-color: var(--bg-primary);
  background-image: 
    radial-gradient(circle at 15% 20%, rgba(157, 78, 221, 0.15) 0%, transparent 40%),
    radial-gradient(circle at 85% 80%, rgba(255, 189, 89, 0.15) 0%, transparent 40%),
    radial-gradient(circle at 50% 50%, rgba(0, 255, 204, 0.08) 0%, transparent 60%);
  background-attachment: fixed;
  color: var(--text-main);
  font-family: var(--font-main);
  line-height: 1.6;
  overflow-x: hidden;
}

/* Header & Nav */
.header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(11, 12, 16, 0.85);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo-container {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
}

.logo-icon {
  font-size: 2.2rem;
  animation: beat pulse 1.5s infinite alternate;
}

.logo-text {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--accent-gold), var(--accent-neon));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.nav-links {
  display: flex;
  gap: 1.5rem;
  align-items: center;
}

.nav-link {
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  transition: all 0.3s ease;
  padding: 0.5rem 0.8rem;
  border-radius: 8px;
}

.nav-link:hover, .nav-link.active {
  color: var(--accent-gold);
  background: rgba(255, 189, 89, 0.1);
}

.auth-btn {
  background: linear-gradient(135deg, #ff9100, #ffbd59);
  color: #000;
  font-weight: 800;
  padding: 0.6rem 1.4rem;
  border-radius: 30px;
  border: none;
  cursor: pointer;
  box-shadow: 0 0 15px rgba(255, 189, 89, 0.4);
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.auth-btn:hover {
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 0 25px rgba(255, 189, 89, 0.7);
}

/* Hero Section */
.hero {
  text-align: center;
  padding: 4rem 1.5rem 3rem;
  position: relative;
  max-width: 1100px;
  margin: 0 auto;
}

.hero-badge {
  display: inline-block;
  background: rgba(157, 78, 221, 0.2);
  border: 1px solid var(--accent-purple);
  color: var(--accent-purple);
  padding: 0.4rem 1.2rem;
  border-radius: 20px;
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 1px;
  margin-bottom: 1.2rem;
  text-transform: uppercase;
}

.hero-title {
  font-family: var(--font-heading);
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 900;
  line-height: 1.1;
  margin-bottom: 1rem;
  text-transform: uppercase;
  background: linear-gradient(135deg, #fff 0%, var(--accent-gold) 50%, var(--accent-neon) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 0 30px rgba(255, 189, 89, 0.3);
}

.hero-subtitle {
  font-size: 1.2rem;
  color: var(--text-muted);
  max-width: 750px;
  margin: 0 auto 2.5rem;
}

.cta-group {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-gold), var(--accent-purple));
  color: #fff;
  font-weight: 700;
  padding: 0.8rem 2rem;
  border-radius: 12px;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  box-shadow: 0 4px 20px rgba(157, 78, 221, 0.4);
  transition: all 0.3s ease;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(157, 78, 221, 0.6);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  font-weight: 700;
  padding: 0.8rem 2rem;
  border-radius: 12px;
  cursor: pointer;
  font-size: 1rem;
  transition: all 0.3s ease;
  text-decoration: none;
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.18);
  border-color: var(--accent-neon);
  color: var(--accent-neon);
}

/* Sound & Countdown Banner */
.interactive-banner {
  max-width: 1100px;
  margin: 2rem auto;
  padding: 1.5rem;
  background: var(--bg-card);
  border: 1px solid rgba(255, 189, 89, 0.2);
  border-radius: 20px;
  backdrop-filter: blur(10px);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  align-items: center;
}

.sound-trigger-box {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: rgba(0, 0, 0, 0.3);
  padding: 1rem;
  border-radius: 14px;
}

.kentongan-btn {
  background: radial-gradient(circle, #8b4513 0%, #4a2507 100%);
  border: 2px solid var(--accent-gold);
  width: 60px;
  height: 60px;
  border-radius: 50%;
  font-size: 1.8rem;
  cursor: pointer;
  box-shadow: 0 0 15px rgba(255, 189, 89, 0.5);
  transition: transform 0.1s ease;
  display: flex;
  justify-content: center;
  align-items: center;
}

.kentongan-btn:active {
  transform: scale(0.9);
}

.countdown-box {
  background: rgba(0, 0, 0, 0.3);
  padding: 1rem;
  border-radius: 14px;
  text-align: center;
}

.countdown-timer {
  font-family: var(--font-heading);
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--accent-neon);
  text-shadow: 0 0 10px rgba(0, 255, 204, 0.5);
}

/* Section styling */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 3rem 1.5rem;
}

.section-title {
  font-family: var(--font-heading);
  font-size: 2.2rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
  text-align: center;
  color: #fff;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
}

.section-subtitle {
  text-align: center;
  color: var(--text-muted);
  margin-bottom: 3rem;
  font-size: 1.05rem;
}

/* Lore Cards Grid */
.lore-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
}

.lore-card {
  background: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  padding: 1.8rem;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.lore-card:hover {
  transform: translateY(-5px);
  border-color: var(--border-glow);
  box-shadow: 0 10px 30px rgba(255, 189, 89, 0.15);
}

.lore-card-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
  display: inline-block;
}

.lore-card h3 {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  margin-bottom: 0.8rem;
  color: var(--accent-gold);
}

.lore-card p {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 1rem;
}

.tag-list {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.tag {
  background: rgba(255, 255, 255, 0.06);
  padding: 0.2rem 0.6rem;
  border-radius: 6px;
  font-size: 0.75rem;
  color: var(--accent-neon);
  font-weight: 600;
}

/* Media & Loops Gallery */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
}

.media-item {
  background: #000;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
  position: relative;
  display: flex;
  flex-direction: column;
}

.media-container {
  position: relative;
  width: 100%;
  padding-top: 100%; /* 1:1 Aspect Ratio */
  background: #111;
  overflow: hidden;
}

.media-container img, .media-container iframe, .media-container svg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.media-caption {
  padding: 1rem;
  background: rgba(15, 17, 23, 0.95);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.media-caption h4 {
  font-size: 1.05rem;
  color: var(--accent-gold);
  margin-bottom: 0.3rem;
}

.media-caption p {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Chat Section */
.chat-wrapper {
  background: var(--bg-card);
  border: 1px solid rgba(255, 189, 89, 0.25);
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.5);
  display: grid;
  grid-template-rows: auto 1fr auto;
  height: 650px;
  max-width: 900px;
  margin: 0 auto;
}

.chat-header {
  background: rgba(15, 17, 23, 0.95);
  padding: 1rem 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.chat-status {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.status-dot {
  width: 10px;
  height: 10px;
  background: var(--accent-neon);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--accent-neon);
}

.online-users-badge {
  background: rgba(0, 255, 204, 0.15);
  color: var(--accent-neon);
  padding: 0.3rem 0.8rem;
  border-radius: 12px;
  font-size: 0.85rem;
  font-weight: 700;
}

.chat-messages {
  padding: 1.5rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  background: rgba(10, 11, 15, 0.7);
}

.chat-message {
  display: flex;
  gap: 0.8rem;
  align-items: flex-start;
  max-width: 80%;
}

.chat-avatar {
  font-size: 1.5rem;
  background: rgba(255, 255, 255, 0.1);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.message-body {
  background: rgba(31, 40, 51, 0.9);
  padding: 0.8rem 1.2rem;
  border-radius: 16px;
  border-top-left-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.message-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.3rem;
}

.message-user {
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--accent-gold);
}

.message-time {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.message-text {
  font-size: 0.95rem;
  color: #fff;
  word-break: break-word;
}

.chat-footer {
  background: rgba(15, 17, 23, 0.95);
  padding: 1rem 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.chat-input-form {
  display: flex;
  gap: 0.8rem;
}

.chat-input {
  flex: 1;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 0.8rem 1.2rem;
  border-radius: 12px;
  color: #fff;
  font-size: 0.95rem;
  font-family: inherit;
  outline: none;
  transition: all 0.3s ease;
}

.chat-input:focus {
  border-color: var(--accent-gold);
  background: rgba(255, 255, 255, 0.08);
}

.chat-send-btn {
  background: var(--accent-gold);
  color: #000;
  font-weight: 800;
  border: none;
  padding: 0 1.5rem;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.chat-send-btn:hover:not(:disabled) {
  transform: scale(1.05);
  box-shadow: 0 0 15px rgba(255, 189, 89, 0.5);
}

.chat-send-btn:disabled,
.chat-send-btn.disabled {
  background: #333940 !important;
  color: #88929e !important;
  cursor: not-allowed !important;
  transform: none !important;
  box-shadow: none !important;
  opacity: 0.8;
}

/* Chat Disclaimer */
.chat-disclaimer {
  max-width: 900px;
  margin: 0 auto 1.5rem auto;
  background: rgba(255, 189, 89, 0.08);
  border: 1px solid rgba(255, 189, 89, 0.35);
  border-radius: 16px;
  padding: 1.1rem 1.4rem;
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  color: #e2e8f0;
  font-size: 0.88rem;
  line-height: 1.55;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.chat-disclaimer .disclaimer-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
  margin-top: 0.1rem;
}

.chat-disclaimer strong {
  color: var(--accent-gold);
  display: block;
  margin-bottom: 0.3rem;
  font-size: 0.95rem;
  letter-spacing: 0.5px;
}

.chat-sub-disclaimer {
  margin-top: 0.75rem;
  font-size: 0.78rem;
  color: var(--text-muted);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  text-align: center;
}

.chat-alert-banner {
  background: rgba(255, 71, 87, 0.15);
  border: 1px solid rgba(255, 71, 87, 0.4);
  color: #ff6b81;
  padding: 0.65rem 1rem;
  border-radius: 10px;
  font-size: 0.88rem;
  margin-bottom: 0.8rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  animation: fadeInAlert 0.25s ease-out;
}

.chat-alert-banner.warning {
  background: rgba(255, 189, 89, 0.16);
  border-color: rgba(255, 189, 89, 0.45);
  color: var(--accent-gold);
}

@keyframes fadeInAlert {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

.chat-locked-overlay {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 3rem;
  gap: 1rem;
  color: var(--text-muted);
}

/* Modals */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(8px);
  z-index: 2000;
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.modal-backdrop.open {
  opacity: 1;
  pointer-events: all;
}

.modal-card {
  background: #151821;
  border: 1px solid var(--accent-gold);
  border-radius: 20px;
  width: 90%;
  max-width: 440px;
  padding: 2rem;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8);
  position: relative;
}

.modal-close {
  position: absolute;
  top: 1rem;
  right: 1.2rem;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  cursor: pointer;
}

.modal-tabs {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 0.5rem;
}

.modal-tab {
  background: none;
  border: none;
  color: var(--text-muted);
  font-weight: 700;
  font-size: 1.1rem;
  cursor: pointer;
  padding: 0.3rem 0.5rem;
}

.modal-tab.active {
  color: var(--accent-gold);
  border-bottom: 2px solid var(--accent-gold);
}

.form-group {
  margin-bottom: 1.2rem;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 0.4rem;
}

.form-input {
  width: 100%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 0.8rem 1rem;
  border-radius: 10px;
  color: #fff;
  font-size: 0.95rem;
  outline: none;
}

.form-input:focus {
  border-color: var(--accent-gold);
}

.avatar-selector {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.avatar-opt {
  font-size: 1.5rem;
  padding: 0.4rem;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  cursor: pointer;
  border: 1px solid transparent;
}

.avatar-opt.selected {
  border-color: var(--accent-gold);
  background: rgba(255, 189, 89, 0.2);
}

.security-badge {
  background: rgba(0, 255, 204, 0.08);
  border: 1px dashed var(--accent-neon);
  border-radius: 8px;
  padding: 0.6rem;
  font-size: 0.75rem;
  color: var(--accent-neon);
  margin-bottom: 1.2rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.form-error {
  color: var(--accent-red);
  font-size: 0.85rem;
  margin-bottom: 1rem;
  display: none;
}

/* Soundboard Grid */
.soundboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1rem;
}

.sound-btn {
  background: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 1.2rem 1rem;
  border-radius: 16px;
  color: #fff;
  font-weight: 700;
  cursor: pointer;
  text-align: center;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.sound-btn:hover {
  background: rgba(255, 189, 89, 0.15);
  border-color: var(--accent-gold);
  transform: translateY(-3px);
}

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

.sound-icon {
  font-size: 2rem;
}

/* Footer */
footer {
  text-align: center;
  padding: 3rem 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-muted);
  font-size: 0.9rem;
  background: rgba(10, 11, 15, 0.95);
}

footer a {
  color: var(--accent-gold);
  text-decoration: none;
}
