/* FriendsNet — Private Friends Community & Media Hub */
:root {
  --bg-main: #090b12;
  --bg-elevated: rgba(19, 23, 38, 0.72);
  --bg-card: rgba(26, 31, 53, 0.65);
  --bg-card-hover: rgba(34, 41, 68, 0.85);
  --border-glass: rgba(255, 255, 255, 0.09);
  --border-highlight: rgba(139, 92, 246, 0.45);
  --text-primary: #f3f5ff;
  --text-secondary: #9ca6c9;
  --text-muted: #647096;
  --accent-indigo: #6366f1;
  --accent-violet: #8b5cf6;
  --accent-pink: #ec4899;
  --accent-emerald: #10b981;
  --accent-amber: #f59e0b;
  --grad-primary: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #ec4899 100%);
  --shadow-glow: 0 12px 40px -10px rgba(99, 102, 241, 0.35);
  --shadow-card: 0 16px 40px rgba(0, 0, 0, 0.45);
  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-sm: 10px;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Inter, Helvetica, Arial, sans-serif;
}

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

html, body {
  min-height: 100vh;
  background-color: var(--bg-main);
  color: var(--text-primary);
  font-family: var(--font-sans);
  line-height: 1.55;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Ambient Background Glows */
.ambient-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
}

.ambient-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(110px);
  opacity: 0.28;
}

.orb-1 {
  width: 480px;
  height: 480px;
  background: #6366f1;
  top: -120px;
  left: -100px;
}

.orb-2 {
  width: 520px;
  height: 520px;
  background: #ec4899;
  bottom: -150px;
  right: -120px;
}

.orb-3 {
  width: 360px;
  height: 360px;
  background: #06b6d4;
  top: 40%;
  left: 55%;
  opacity: 0.16;
}

/* Header & Navigation */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  background: rgba(9, 11, 18, 0.78);
  border-bottom: 1px solid var(--border-glass);
}

.nav-container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text-primary);
  font-weight: 800;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
}

.brand img {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  box-shadow: 0 4px 16px rgba(139, 92, 246, 0.4);
}

.brand-badge {
  font-size: 0.7rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(139, 92, 246, 0.18);
  border: 1px solid rgba(139, 92, 246, 0.4);
  color: #c4b5fd;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
  list-style: none;
  background: rgba(255, 255, 255, 0.03);
  padding: 5px;
  border-radius: 999px;
  border: 1px solid var(--border-glass);
}

.nav-link {
  text-decoration: none;
  color: var(--text-secondary);
  font-size: 0.92rem;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: 999px;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.nav-link:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.05);
}

.nav-link.active {
  color: #ffffff;
  background: var(--grad-primary);
  box-shadow: 0 4px 15px rgba(99, 102, 241, 0.35);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.online-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 13px;
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: #6ee7b7;
  font-size: 0.82rem;
  font-weight: 600;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-emerald);
  box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { box-shadow: 0 0 0 8px rgba(16, 185, 129, 0); }
  100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.92rem;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.2s ease;
  text-decoration: none;
  color: var(--text-primary);
  font-family: inherit;
}

.btn-primary {
  background: var(--grad-primary);
  color: #fff;
  box-shadow: var(--shadow-glow);
}

.btn-primary:hover {
  transform: translateY(-1px);
  filter: brightness(1.08);
}

.btn-glass {
  background: rgba(255, 255, 255, 0.06);
  border-color: var(--border-glass);
  color: var(--text-primary);
}

.btn-glass:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.2);
}

.btn-sm {
  padding: 7px 13px;
  font-size: 0.83rem;
}

/* Layout & Page Sections */
.main-container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 36px 24px 80px;
}

.page-section {
  display: none;
  animation: fadeIn 0.28s ease;
}

.page-section.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Hero & Grid */
.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 28px;
  align-items: stretch;
  margin-bottom: 36px;
}

.glass-card {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-card);
  transition: border-color 0.25s ease, transform 0.25s ease;
}

.glass-card:hover {
  border-color: rgba(255, 255, 255, 0.16);
}

.hero-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 38px;
  position: relative;
  overflow: hidden;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #a5b4fc;
  margin-bottom: 16px;
}

.hero-title {
  font-size: clamp(2rem, 3.5vw, 3rem);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.03em;
  margin-bottom: 18px;
}

.gradient-text {
  background: var(--grad-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  color: var(--text-secondary);
  font-size: 1.06rem;
  margin-bottom: 28px;
  max-width: 58ch;
}

.hero-cta-group {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 32px;
}

.stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  padding-top: 22px;
  border-top: 1px solid var(--border-glass);
}

.stat-item strong {
  display: block;
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--text-primary);
}

.stat-item span {
  font-size: 0.82rem;
  color: var(--text-secondary);
}

/* Live Room Widget */
.chat-box {
  display: flex;
  flex-direction: column;
  height: 100%;
}

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

.widget-title {
  font-size: 1.05rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}

.chat-messages {
  flex: 1;
  max-height: 260px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-right: 6px;
  margin-bottom: 14px;
}

.chat-msg {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 0.9rem;
}

.chat-msg-header {
  display: flex;
  justify-content: space-between;
  font-size: 0.76rem;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.chat-msg-author {
  font-weight: 700;
  color: #c4b5fd;
}

.chat-input-row {
  display: flex;
  gap: 8px;
}

.input-field {
  width: 100%;
  background: rgba(9, 11, 18, 0.65);
  border: 1px solid var(--border-glass);
  color: var(--text-primary);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.92rem;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s ease;
}

.input-field:focus {
  border-color: var(--accent-violet);
}

/* Cards Grid */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  margin-bottom: 32px;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  margin-bottom: 32px;
}

.feature-icon {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: rgba(139, 92, 246, 0.16);
  border: 1px solid rgba(139, 92, 246, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  margin-bottom: 16px;
}

.card-title {
  font-size: 1.18rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.card-desc {
  color: var(--text-secondary);
  font-size: 0.92rem;
  margin-bottom: 16px;
}

/* Poll Options */
.poll-option {
  margin-bottom: 12px;
  cursor: pointer;
}

.poll-label-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.9rem;
  margin-bottom: 5px;
}

.progress-track {
  height: 10px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 999px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: var(--grad-primary);
  border-radius: 999px;
  transition: width 0.35s ease;
}

/* FriendsDrop File Sharing */
.dropzone {
  border: 2px dashed rgba(139, 92, 246, 0.45);
  background: rgba(99, 102, 241, 0.05);
  border-radius: var(--radius-lg);
  padding: 40px 24px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-bottom: 20px;
}

.dropzone:hover, .dropzone.dragover {
  background: rgba(99, 102, 241, 0.12);
  border-color: var(--accent-pink);
}

.table-wrap {
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}

.data-table th, .data-table td {
  padding: 13px 14px;
  text-align: left;
  border-bottom: 1px solid var(--border-glass);
}

.data-table th {
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.code-tag {
  font-family: monospace;
  background: rgba(99, 102, 241, 0.18);
  color: #c4b5fd;
  padding: 3px 8px;
  border-radius: 6px;
  font-weight: 700;
}

/* Events & Badges */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 24px;
}

.tag {
  display: inline-block;
  font-size: 0.76rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-secondary);
}

.tag.offline {
  background: rgba(16, 185, 129, 0.15);
  color: #6ee7b7;
}

.tag.online {
  background: rgba(99, 102, 241, 0.18);
  color: #a5b4fc;
}

/* Watch-Together Mock Player */
.video-stage {
  background: radial-gradient(circle at center, #1e1b4b 0%, #090b12 100%);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-glass);
  height: 230px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  margin-bottom: 16px;
}

/* FAQ Accordion */
.faq-item {
  border-bottom: 1px solid var(--border-glass);
  padding: 14px 0;
}

.faq-question {
  width: 100%;
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 1rem;
  font-weight: 600;
  text-align: left;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  padding: 4px 0;
  font-family: inherit;
}

.faq-answer {
  display: none;
  color: var(--text-secondary);
  font-size: 0.92rem;
  padding-top: 10px;
}

.faq-item.open .faq-answer {
  display: block;
}

/* Modals & Toast */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(5, 7, 12, 0.78);
  backdrop-filter: blur(8px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 200;
  padding: 20px;
}

.modal-backdrop.open {
  display: flex;
}

.modal-window {
  background: #121626;
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  max-width: 440px;
  width: 100%;
  padding: 28px;
  box-shadow: var(--shadow-card);
}

.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 300;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toast {
  background: rgba(19, 23, 38, 0.95);
  border: 1px solid var(--border-highlight);
  color: var(--text-primary);
  padding: 12px 18px;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-card);
  font-size: 0.9rem;
  animation: fadeIn 0.25s ease;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border-glass);
  padding: 28px 24px;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.86rem;
}

@media (max-width: 960px) {
  .hero-grid, .grid-3, .grid-2 {
    grid-template-columns: 1fr;
  }
  .nav-container {
    flex-wrap: wrap;
  }
  .nav-links {
    order: 3;
    width: 100%;
    overflow-x: auto;
    justify-content: flex-start;
  }
}
