:root {
  --bg: #030208;
  --card: #0d0819;
  --border: #1d153b;
  
  --neon-blue: #002eff;
  --neon-blue-bright: #335eff;
  --neon-blue-glow: #6685ff;
  
  --neon-cyan: #00f0ff;
  --neon-cyan-bright: #52f6ff;
  --neon-cyan-glow: #80f8ff;

  --cherry-red: #D2042D;
  --cherry-red-bright: #ff1a43;
  --cherry-red-glow: #ff2b56;

  --neon-pink: #ff007f;
  --neon-pink-bright: #ff3399;
  --neon-pink-glow: #ff66b2;
  
  --neon-offwhite: #f4f6ff;
  --neon-offwhite-glow: #ffffff;
  
  --text: #b8b3d6;
  --text-bright: #ffffff;
  --muted: #534b7a;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Poppins', 'Inter', sans-serif !important;
}

body {
  background-color: var(--bg);
  color: var(--text);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  width: 100%;
  position: relative;
  overflow-x: hidden;
  height: 100%;

  background-image: 
    radial-gradient(circle at 10% 20%, rgba(0, 240, 255, 0.22) 0%, transparent 40%),
    radial-gradient(circle at 90% 15%, rgba(255, 0, 127, 0.18) 0%, transparent 45%),
    radial-gradient(circle at 80% 80%, rgba(0, 46, 255, 0.22) 0%, transparent 45%),
    radial-gradient(circle at 20% 85%, rgba(255, 0, 127, 0.16) 0%, transparent 40%),
    radial-gradient(circle at 50% 50%, rgba(0, 240, 255, 0.12) 0%, transparent 50%);
  background-size: 200% 200%;
  animation: neonBurst 16s ease-in-out infinite alternate;
}

@keyframes neonBurst {
  0% {
    background-position: 0% 0%;
  }
  50% {
    background-position: 100% 100%;
  }
  100% {
    background-position: 0% 100%;
  }
}

nav {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  padding: 0.35rem 1.5rem;
  border-bottom: none;
  background: transparent;
}

.logo img {
  height: 36px;
  width: auto;
  object-fit: contain;
  filter: drop-shadow(0 0 8px rgba(0, 240, 255, 0.7)) drop-shadow(0 0 14px rgba(0, 46, 255, 0.5));
}

.hero {
  text-align: center;
  padding: 3rem 1rem 1rem 1rem;
  max-width: 900px;
  margin: 0 auto 2rem auto;
  width: 100%;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(0, 240, 255, 0.10);
  border: 1px solid rgba(0, 240, 255, 0.5);
  color: var(--neon-cyan-glow);
  padding: 6px 14px;
  border-radius: 12px;
  font-size: 0.8rem;
  margin-bottom: 1rem;
  box-shadow: 0 0 14px rgba(0, 240, 255, 0.35);
}

.badge-dot {
  width: 6px;
  height: 6px;
  background-color: var(--cherry-red);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--cherry-red-glow);
}

.hero h1 {
  font-size: 2.7rem;
  color: var(--text-bright);
  margin-bottom: 0.8rem;
  font-weight: 800;
  line-height: 1.2;
}

.neon-text {
  color: var(--neon-cyan-glow);
  text-shadow: 0 0 14px rgba(0, 240, 255, 0.9), 0 0 28px rgba(0, 46, 255, 0.8), 0 0 40px rgba(255, 0, 127, 0.5);
}

.hero-sub {
  color: var(--text);
  font-size: 1rem;
  line-height: 1.6;
  margin-bottom: 2rem;
}

.concept-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  text-align: left;
  margin-top: 1.5rem;
}

.concept-card {
  background: var(--card);
  border: 1px solid rgba(0, 240, 255, 0.25);
  padding: 1.4rem;
  border-radius: 10px;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.concept-card:hover {
  border-color: var(--neon-cyan);
  box-shadow: 0 0 20px rgba(0, 240, 255, 0.4), 0 0 30px rgba(255, 0, 127, 0.25);
}

.concept-title {
  color: var(--neon-cyan-glow);
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.concept-desc {
  font-size: 0.85rem;
  color: var(--text);
  line-height: 1.5;
}

.section-wrap {
  flex: 1;
  max-width: 700px;
  width: 100%;
  margin: 2rem auto;
  padding: 0 1rem;
}

.event-card {
  background: var(--card);
  border: 1px solid rgba(0, 240, 255, 0.25);
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 10px 35px rgba(0, 0, 0, 0.8), 0 0 25px rgba(0, 240, 255, 0.15);
  position: relative;
  backdrop-filter: blur(12px);
  width: 100%;
}

.card-top-bar {
  height: 4px;
  background: linear-gradient(90deg, var(--neon-cyan), var(--neon-blue), var(--neon-pink), var(--cherry-red));
  box-shadow: 0 0 14px rgba(0, 240, 255, 0.9);
}

.card-body {
  padding: 1.5rem;
}

.status-notice {
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
  line-height: 1.4;
}

.agreement-box {
  margin-bottom: 1.5rem;
}

.checkbox-container {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
}

a, 
.agreement-text a, 
.terms-subtext a {
  color: var(--neon-offwhite) !important;
  text-decoration: none;
  font-weight: 500;
  text-shadow: 0 0 6px rgba(244, 246, 255, 0.6), 0 0 12px rgba(0, 240, 255, 0.4);
  transition: all 0.2s ease;
  border-bottom: 1px dashed rgba(244, 246, 255, 0.4);
}

a:hover, 
.agreement-text a:hover, 
.terms-subtext a:hover {
  color: var(--neon-offwhite-glow) !important;
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.9), 0 0 20px rgba(0, 240, 255, 0.8);
  border-bottom-color: var(--neon-cyan);
}

.btn {
  padding: 12px 22px;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.25s ease;
}

.btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  box-shadow: none !important;
}

.btn-primary {
  background: var(--cherry-red);
  color: #ffffff;
  box-shadow: 0 0 18px rgba(210, 4, 45, 0.7);
}

.btn-primary:hover:not(:disabled) {
  background: var(--cherry-red-bright);
  box-shadow: 0 0 28px rgba(210, 4, 45, 1);
}

.btn-compact {
  width: auto !important;
  min-width: 150px;
  padding: 0.55rem 1.4rem !important;
  font-size: 0.88rem !important;
  font-weight: 600;
  letter-spacing: 0.5px;
  border-radius: 20px !important;
  margin: 0 auto 1rem auto;
  display: inline-block;
  cursor: pointer;
}

.btn-danger-ghost {
  background: transparent;
  color: var(--cherry-red-glow);
  border: 1px solid var(--cherry-red);
  box-shadow: 0 0 10px rgba(210, 4, 45, 0.3);
}

.btn-danger-ghost:hover {
  background: rgba(210, 4, 45, 0.15);
  box-shadow: 0 0 18px rgba(210, 4, 45, 0.6);
}

.btn-ghost {
  background: transparent;
  color: var(--text-bright);
  border: 1px solid var(--border);
}

.btn-ghost:hover:not(:disabled) {
  border-color: var(--neon-cyan);
  color: var(--neon-cyan-glow);
  box-shadow: 0 0 12px rgba(0, 240, 255, 0.5);
}

.chat-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--border);
}

.chat-header-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.status-orb {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--muted);
}

.status-connected {
  background: var(--neon-cyan-bright);
  box-shadow: 0 0 12px var(--neon-cyan);
}

.status-searching {
  background: var(--cherry-red);
  box-shadow: 0 0 12px var(--cherry-red-glow);
}

.partner-name {
  color: var(--text-bright);
  font-size: 1rem;
  font-weight: 700;
}

.partner-meta {
  font-size: 0.8rem;
  color: var(--muted);
}

#messages {
  height: 380px;
  overflow-y: auto;
  padding: 1rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 14px;
  background: rgba(5, 4, 13, 0.6);
}

.msg-wrapper {
  display: flex;
  flex-direction: column;
  max-width: 75% !important;
}

.msg-wrapper.me {
  align-self: flex-end;
}

.msg-wrapper.stranger {
  align-self: flex-start;
}

.msg-capsule {
  background: rgba(13, 8, 25, 0.85);
  border: 1px solid var(--border);
  padding: 10px 14px;
  border-radius: 10px;
}

.me .msg-capsule {
  background: rgba(0, 240, 255, 0.12);
  border-color: rgba(0, 240, 255, 0.45);
  box-shadow: 0 0 14px rgba(0, 240, 255, 0.25);
}

.stranger .msg-capsule {
  background: rgba(210, 4, 45, 0.1);
  border-color: rgba(210, 4, 45, 0.35);
  box-shadow: 0 0 12px rgba(210, 4, 45, 0.15);
}

.msg-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.72rem;
  color: var(--muted);
  margin-bottom: 4px;
}

.me .msg-author {
  color: var(--neon-cyan-glow);
  font-weight: 600;
}

.stranger .msg-author {
  color: var(--cherry-red-glow);
  font-weight: 600;
}

.msg-body {
  font-size: 0.92rem;
  color: var(--text-bright);
  word-break: break-word;
}

.msg-body img,
.msg-capsule img {
  max-width: 100%;
  max-height: 240px;
  width: auto;
  height: auto;
  display: block;
  border-radius: 6px;
  margin-top: 6px;
  object-fit: contain;
}

.msg.system {
  align-self: center;
  font-size: 0.78rem;
  color: var(--neon-cyan-glow);
  border: 1px solid rgba(0, 240, 255, 0.4);
  background: rgba(0, 240, 255, 0.12);
  padding: 4px 14px;
  border-radius: 12px;
  text-transform: lowercase;
  letter-spacing: 0.5px;
  box-shadow: 0 0 10px rgba(0, 240, 255, 0.2);
}

.genre-filter {
  display: flex;
  gap: 8px;
  padding: 10px 1.5rem;
  overflow-x: auto;
  border-top: 1px solid var(--border);
  background: rgba(13, 8, 25, 0.4);
}

.genre-pill {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
  padding: 5px 12px;
  border-radius: 16px;
  font-size: 0.75rem;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.2s ease;
}

.genre-pill:hover {
  border-color: var(--neon-cyan);
  color: var(--neon-cyan-glow);
  box-shadow: 0 0 12px rgba(0, 240, 255, 0.4);
}

.card-footer {
  display: flex;
  gap: 10px;
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border);
}

.md-textarea {
  flex: 1;
  background: rgba(5, 4, 13, 0.6);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 14px;
  color: var(--text-bright);
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.md-textarea:focus {
  border-color: var(--neon-cyan);
  box-shadow: 0 0 14px rgba(0, 240, 255, 0.4);
}

#typing-indicator {
  display: none;
  align-self: flex-start;
  gap: 5px;
  padding: 8px;
}

#typing-indicator .dot {
  width: 6px;
  height: 6px;
  background: var(--neon-cyan-bright);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--neon-cyan-glow);
  animation: bounce 1.2s infinite ease-in-out;
}

#typing-indicator .dot:nth-child(2) { 
  animation-delay: 0.2s; 
}

#typing-indicator .dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes bounce {
  0%, 80%, 100% { transform: scale(0); }
  40% { transform: scale(1); }
}

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(3, 2, 8, 0.9);
  backdrop-filter: blur(10px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-content {
  background: var(--card);
  border: 1px solid var(--neon-cyan);
  box-shadow: 0 0 35px rgba(0, 240, 255, 0.35);
  border-radius: 12px;
  max-width: 600px;
  width: 100%;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
}

.modal-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-header h3 {
  color: var(--neon-cyan-glow);
}

.modal-close {
  background: none;
  border: none;
  color: var(--text);
  font-size: 24px;
  cursor: pointer;
}

.modal-close:hover {
  color: var(--cherry-red);
}

.modal-body {
  padding: 20px;
  overflow-y: auto;
  font-size: 14px;
  line-height: 1.6;
  color: var(--text);
}

.modal-body h4 {
  margin-bottom: 12px;
  color: var(--neon-cyan-glow);
}

.modal-body p {
  margin-bottom: 14px;
}

footer {
  text-align: center;
  padding: 0.8rem 1rem;
  font-size: 0.8rem;
  color: var(--muted);
  border-top: none;
  letter-spacing: 0.5px;
}

@media (max-width: 768px) {
  nav {
    padding: 0.5rem 1rem;
  }
  
  .hero {
    padding: 1.5rem 1rem 0.5rem 1rem;
    margin-bottom: 1rem;
  }
  
  .hero h1 {
    font-size: 1.8rem;
  }
  
  .hero-sub {
    font-size: 0.9rem;
    margin-bottom: 1.2rem;
  }
  
  .concept-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  .section-wrap {
    margin: 0.5rem auto;
    padding: 0 0.5rem;
  }
  
  .card-body {
    padding: 1rem;
  }
  
  #messages {
    height: 320px;
    padding: 0.8rem 1rem;
    gap: 10px;
  }
  
  .msg-wrapper {
    max-width: 88% !important;
  }
  
  .chat-header {
    padding: 0.8rem 1rem;
  }
  
  .genre-filter {
    padding: 8px 1rem;
  }
  
  .card-footer {
    padding: 0.8rem 1rem;
    gap: 8px;
  }
  
  .btn {
    padding: 10px 16px;
    font-size: 0.9rem;
  }
  
  .modal-content {
    max-height: 90vh;
  }
}