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

:root {
  /* Forastream Brand Theme */
  --fora-bg-dark: #090a0f;
  --fora-bg-surface: #10121a;
  --fora-bg-card: rgba(22, 25, 37, 0.7);
  --fora-bg-card-hover: rgba(30, 34, 52, 0.85);
  --fora-border: rgba(255, 255, 255, 0.08);
  --fora-border-glow: rgba(121, 40, 202, 0.4);

  /* Forastream Neon Accents */
  --fora-primary: #8a2be2;
  --fora-primary-light: #9d4edd;
  --fora-cyan: #00f2fe;
  --fora-pink: #ff007f;
  --fora-gradient-brand: linear-gradient(135deg, #7928ca 0%, #ff0080 50%, #00dfd8 100%);
  --fora-gradient-accent: linear-gradient(135deg, #8a2be2 0%, #4facfe 100%);
  --fora-gradient-card: linear-gradient(145deg, rgba(28, 32, 48, 0.6) 0%, rgba(16, 18, 26, 0.8) 100%);

  /* Status Colors */
  --fora-success: #10b981;
  --fora-warning: #f59e0b;
  --fora-danger: #ef4444;

  /* Typography */
  --font-main: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

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

body {
  background-color: var(--fora-bg-dark);
  color: #f1f5f9;
  font-family: var(--font-main);
  min-height: 100vh;
  line-height: 1.5;
  background-image: 
    radial-gradient(circle at 10% 20%, rgba(121, 40, 202, 0.12) 0%, transparent 40%),
    radial-gradient(circle at 90% 80%, rgba(0, 242, 254, 0.08) 0%, transparent 45%);
  background-attachment: fixed;
}

/* Container */
.dashboard-container {
  max-width: 1380px;
  margin: 0 auto;
  padding: 24px 28px 48px;
}

/* ---------------------------------------------------- */
/* FORASTREAM BRANDED HEADER                            */
/* ---------------------------------------------------- */
.header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
  background: var(--fora-gradient-card);
  backdrop-filter: blur(20px);
  border: 1px solid var(--fora-border);
  border-radius: 20px;
  margin-bottom: 24px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.brand-section {
  display: flex;
  align-items: center;
  gap: 16px;
}

.brand-logo-badge {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  background: var(--fora-gradient-brand);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 20px rgba(121, 40, 202, 0.6);
}

.brand-logo-badge svg {
  width: 26px;
  height: 26px;
  fill: #ffffff;
}

.brand-text h1 {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.5px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.brand-text h1 .brand-name {
  background: var(--fora-gradient-brand);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.pack-tag {
  background: rgba(138, 43, 226, 0.2);
  border: 1px solid rgba(138, 43, 226, 0.4);
  color: #c084fc;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 6px;
  text-transform: uppercase;
}

.brand-subtitle {
  font-size: 13px;
  color: #94a3b8;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.overlay-status-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.3);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  color: #34d399;
}

.status-indicator-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--fora-success);
  box-shadow: 0 0 8px var(--fora-success);
  animation: pulseDot 2s infinite;
}

@keyframes pulseDot {
  0% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.3); opacity: 0.6; }
  100% { transform: scale(1); opacity: 1; }
}

.btn-forastream-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 18px;
  background: var(--fora-gradient-accent);
  color: #ffffff;
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 700;
  border-radius: 12px;
  box-shadow: 0 4px 18px rgba(138, 43, 226, 0.4);
  transition: transform 0.2s, box-shadow 0.2s;
}

.btn-forastream-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(138, 43, 226, 0.6);
}

.btn-forastream-link svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

/* ---------------------------------------------------- */
/* PLATFORM MODE SELECTOR (MeetMe vs TikTok)            */
/* ---------------------------------------------------- */
.mode-selector-banner {
  background: var(--fora-bg-surface);
  border: 1px solid var(--fora-border);
  border-radius: 18px;
  padding: 16px 20px;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.mode-selector-lead {
  display: flex;
  flex-direction: column;
}

.mode-selector-lead h2 {
  font-size: 16px;
  font-weight: 700;
}

.mode-selector-lead p {
  font-size: 13px;
  color: #94a3b8;
}

.mode-switcher-pills {
  display: flex;
  background: #090a0f;
  border: 1px solid var(--fora-border);
  padding: 4px;
  border-radius: 14px;
  gap: 4px;
}

.mode-pill-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 20px;
  border-radius: 10px;
  border: none;
  background: transparent;
  color: #94a3b8;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.mode-pill-btn.active {
  background: var(--fora-bg-card-hover);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.5);
}

.mode-pill-btn.active[data-mode="meetme"] {
  background: linear-gradient(135deg, rgba(255, 107, 107, 0.25) 0%, rgba(255, 142, 83, 0.2) 100%);
  color: #ff9f43;
  border: 1px solid rgba(255, 159, 67, 0.4);
}

.mode-pill-btn.active[data-mode="tiktok"] {
  background: linear-gradient(135deg, rgba(0, 242, 254, 0.2) 0%, rgba(255, 0, 127, 0.2) 100%);
  color: #00f2fe;
  border: 1px solid rgba(0, 242, 254, 0.4);
}

.mode-pill-btn svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

/* ---------------------------------------------------- */
/* MAIN DASHBOARD GRID                                  */
/* ---------------------------------------------------- */
.dashboard-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

@media (max-width: 1100px) {
  .dashboard-grid {
    grid-template-columns: 1fr;
  }
}

/* Card Styling */
.dashboard-card {
  background: var(--fora-bg-card);
  backdrop-filter: blur(16px);
  border: 1px solid var(--fora-border);
  border-radius: 20px;
  padding: 24px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
  display: flex;
  flex-direction: column;
  gap: 18px;
}

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

.card-title-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.card-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: rgba(138, 43, 226, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #a855f7;
}

.card-icon svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.card-title-group h3 {
  font-size: 16px;
  font-weight: 700;
}

.card-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.card-badge.active {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: #34d399;
}

.card-badge.inactive {
  background: rgba(148, 163, 184, 0.12);
  border: 1px solid rgba(148, 163, 184, 0.25);
  color: #94a3b8;
}

/* ---------------------------------------------------- */
/* PLATFORM CONNECTION CARDS                            */
/* ---------------------------------------------------- */
.platform-config-view {
  display: none;
}

.platform-config-view.active {
  display: block;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}

.form-group label {
  font-size: 13px;
  font-weight: 600;
  color: #cbd5e1;
  display: flex;
  justify-content: space-between;
}

.form-input-row {
  display: flex;
  gap: 10px;
}

.fora-input {
  flex: 1;
  background: #090a0f;
  border: 1px solid var(--fora-border);
  border-radius: 12px;
  padding: 10px 14px;
  color: #ffffff;
  font-family: var(--font-main);
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s;
}

.fora-input:focus {
  border-color: var(--fora-primary-light);
  box-shadow: 0 0 0 2px rgba(138, 43, 226, 0.25);
}

.fora-input::placeholder {
  color: #64748b;
}

.btn-primary {
  background: var(--fora-primary);
  border: none;
  color: #ffffff;
  font-weight: 700;
  font-size: 13.5px;
  padding: 10px 20px;
  border-radius: 12px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s;
}

.btn-primary:hover {
  background: var(--fora-primary-light);
}

.btn-primary.danger {
  background: var(--fora-danger);
}

.btn-primary.danger:hover {
  background: #dc2626;
}

.connection-meta-box {
  background: rgba(9, 10, 15, 0.6);
  border: 1px solid var(--fora-border);
  border-radius: 12px;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
}

.meta-item {
  display: flex;
  align-items: center;
  gap: 8px;
}

.meta-label {
  color: #94a3b8;
}

.meta-value {
  font-weight: 700;
  color: #ffffff;
}

/* ---------------------------------------------------- */
/* POSITION & SCALE CONTROLS                            */
/* ---------------------------------------------------- */
.preset-buttons-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 16px;
}

.btn-preset {
  background: rgba(9, 10, 15, 0.7);
  border: 1px solid var(--fora-border);
  border-radius: 10px;
  padding: 8px 6px;
  font-size: 12px;
  font-weight: 600;
  color: #cbd5e1;
  cursor: pointer;
  text-align: center;
  transition: all 0.2s;
}

.btn-preset:hover, .btn-preset.active {
  background: rgba(138, 43, 226, 0.2);
  border-color: var(--fora-primary-light);
  color: #ffffff;
}

.slider-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 14px;
}

.slider-label-row {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: #cbd5e1;
}

.slider-val {
  font-family: var(--font-mono);
  font-size: 12px;
  color: #c084fc;
  font-weight: 600;
}

.fora-range {
  -webkit-appearance: none;
  width: 100%;
  height: 6px;
  background: #1e2230;
  border-radius: 4px;
  outline: none;
}

.fora-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--fora-primary-light);
  cursor: pointer;
  box-shadow: 0 0 10px rgba(138, 43, 226, 0.6);
  border: 2px solid #ffffff;
}

.toggles-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 8px;
}

.toggle-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(9, 10, 15, 0.6);
  border: 1px solid var(--fora-border);
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.toggle-switch {
  position: relative;
  display: inline-block;
  width: 38px;
  height: 20px;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background-color: #334155;
  transition: 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  border-radius: 20px;
}

.toggle-slider::before {
  position: absolute;
  content: "";
  height: 14px;
  width: 14px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  border-radius: 50%;
}

.toggle-switch input:checked + .toggle-slider {
  background-color: var(--fora-primary-light);
}

.toggle-switch input:checked + .toggle-slider::before {
  transform: translateX(18px);
}

/* ---------------------------------------------------- */
/* AUDIO CUSTOMIZATION (Uploads + Synthesizer)          */
/* ---------------------------------------------------- */
.audio-card-note {
  font-size: 12.5px;
  color: #94a3b8;
  background: rgba(138, 43, 226, 0.08);
  border: 1px dashed rgba(138, 43, 226, 0.3);
  padding: 10px 14px;
  border-radius: 10px;
  line-height: 1.4;
}

.audio-track-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.audio-track-item {
  background: rgba(9, 10, 15, 0.7);
  border: 1px solid var(--fora-border);
  border-radius: 14px;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.audio-track-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.audio-track-title {
  font-size: 14px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}

.audio-source-badge {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 10px;
  background: rgba(52, 199, 89, 0.15);
  color: #34d158;
  border: 1px solid rgba(52, 199, 89, 0.3);
}

.audio-source-badge.custom {
  background: rgba(0, 242, 254, 0.15);
  color: #00f2fe;
  border: 1px solid rgba(0, 242, 254, 0.3);
}

.audio-track-desc {
  font-size: 12px;
  color: #94a3b8;
}

.audio-actions-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-sound-action {
  background: #1e2230;
  border: 1px solid var(--fora-border);
  color: #f1f5f9;
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: all 0.2s;
}

.btn-sound-action:hover {
  background: #282e42;
  border-color: rgba(255, 255, 255, 0.2);
}

.btn-sound-action svg {
  width: 14px;
  height: 14px;
  fill: currentColor;
}

.hidden-file-input {
  display: none;
}

/* ---------------------------------------------------- */
/* INTERACTIVE ACTION & TEST DOCK                       */
/* ---------------------------------------------------- */
.quick-test-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.btn-test-action {
  background: rgba(9, 10, 15, 0.7);
  border: 1px solid var(--fora-border);
  border-radius: 12px;
  padding: 12px 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: #cbd5e1;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-test-action:hover {
  background: rgba(138, 43, 226, 0.2);
  border-color: var(--fora-primary-light);
  color: #ffffff;
  transform: translateY(-2px);
}

.btn-test-action svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
}

.btn-test-action.green:hover {
  background: rgba(52, 199, 89, 0.2);
  border-color: #34c759;
  color: #30d158;
}

.btn-test-action.red:hover {
  background: rgba(255, 59, 48, 0.2);
  border-color: #ff3b30;
  color: #ff453a;
}

/* Chat Simulator Row */
.chat-sim-row {
  display: flex;
  gap: 10px;
  margin-top: 6px;
}

/* ---------------------------------------------------- */
/* LIVE ACTIVITY & EVENT LOGGER                         */
/* ---------------------------------------------------- */
.log-console {
  background: #06070a;
  border: 1px solid var(--fora-border);
  border-radius: 14px;
  height: 190px;
  overflow-y: auto;
  padding: 12px;
  font-family: var(--font-mono);
  font-size: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.log-entry {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  line-height: 1.4;
}

.log-time {
  color: #64748b;
  flex-shrink: 0;
}

.log-tag {
  font-size: 10px;
  padding: 1px 6px;
  border-radius: 4px;
  font-weight: 700;
  text-transform: uppercase;
  flex-shrink: 0;
}

.log-tag.meetme { background: #ff9f43; color: #000; }
.log-tag.tiktok { background: #00f2fe; color: #000; }
.log-tag.cmd { background: #a855f7; color: #fff; }
.log-tag.gift { background: #ff9500; color: #000; }
.log-tag.system { background: #64748b; color: #fff; }
.log-tag.chat { background: #38bdf8; color: #05192d; font-weight: 700; }
.log-tag.join { background: #10b981; color: #022c22; font-weight: 700; }
.log-tag.box { background: #ec4899; color: #fff; font-weight: 700; }
.log-tag.raw { background: #1e293b; color: #7dd3fc; border: 1px solid #334155; font-family: monospace; font-size: 9px; }

.log-text {
  color: #cbd5e1;
  word-break: break-word;
}
