/* ============================================================
   SOLM8.AI Dashboard - Colorful Mosaic Theme
   Matches the vibrant landing page voice interface
   ============================================================ */

:root {
  /* Core Colors */
  --bg-black: #000000;
  --text-black: #000000;
  --white: #ffffff;

  /* Mosaic Colors */
  --mosaic-colors: #FF6B9D, #FEC860, #5DE6FF, #C06CFF, #90FF6A, #FF9F40, #4ECDC4, #FF6B6B, #95E1D3, #F38181;

  /* Layout */
  --header-height: 64px;
  --border-radius: 32px;
  --button-radius: 50px;

  /* Glass Effects */
  --glass-blur: blur(20px);
  --glass-bg: rgba(255, 255, 255, 0.1);
  --glass-border: rgba(255, 255, 255, 0.2);
}

/* Extras & Unlocks Styles */
.settings-checkbox.unlocked {
  opacity: 1 !important;
  cursor: pointer !important;
  border-color: rgba(255, 255, 255, 0.2) !important;
}

.settings-checkbox.unlocked:hover {
  background: rgba(255, 255, 255, 0.05) !important;
}

/* Locked checkboxes - prevent all interaction */
.settings-checkbox.locked {
  opacity: 0.6 !important;
  cursor: not-allowed !important;
  pointer-events: none !important;
}

.settings-checkbox.locked input[type="checkbox"] {
  pointer-events: none !important;
  cursor: not-allowed !important;
}

.locked-content.unlocked {
  opacity: 1 !important;
  pointer-events: auto !important;
}

.badge-lock.unlocked {
  display: none;
}

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg-black);
  color: var(--white);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Dashboard Wrapper */
.dashboard-wrapper {
  min-height: 100vh;
  background: var(--bg-black);
  position: relative;
}

/* Starfield Background */
.starfield {
  position: fixed;
  inset: 0;
  background: var(--bg-black);
  z-index: 1;
}

/* Main Content */
.main-content {
  position: relative;
  z-index: 2;
  padding-top: calc(var(--header-height) + 2rem);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.75rem;
  padding: 2rem;
}

/* Voice Chat Container */
.voice-chat-container {
  width: 100%;
  max-width: 800px;
  aspect-ratio: 16 / 10;
  position: relative;
}

/* Mosaic Panel */
.mosaic-panel {
  position: relative;
  width: 100%;
  height: 100%;
  background: #1a1a1a;
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

/* Mosaic Canvas */
.mosaic-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

/* Voice Content */
.voice-content {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3rem;
  z-index: 2;
}

/* AI Logo Container */
.ai-logo-container {
  position: relative;
  width: 180px;
  height: 100px;
}

.ai-logo {
  width: 100%;
  height: 100%;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ai-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 4px 20px rgba(0, 0, 0, 0.3));
  animation: logoHeartbeat 1.9s ease-in-out infinite;
  transform-origin: center;
}

/* Logo Heartbeat Animation - matches landing page */
@keyframes logoHeartbeat {
  0% {
    transform: scale(1);
  }

  28% {
    transform: scale(1.08);
  }

  45% {
    transform: scale(0.96);
  }

  65% {
    transform: scale(1.05);
  }

  100% {
    transform: scale(1);
  }
}

/* Additional pulse glow effect when active */
.ai-logo.active img {
  animation: logoHeartbeat 1.9s ease-in-out infinite, logoPulseGlow 4s ease-in-out infinite;
}

@keyframes logoPulseGlow {

  0%,
  100% {
    filter: drop-shadow(0 4px 20px rgba(0, 0, 0, 0.3));
  }

  40% {
    filter: drop-shadow(0 0 20px rgba(144, 255, 106, 0.6));
  }

  60% {
    filter: drop-shadow(0 0 25px rgba(92, 231, 255, 0.5));
  }
}

/* Talk Button */
.btn-talk-primary {
  padding: 1.25rem 4rem;
  font-size: 1.125rem;
  font-weight: 600;
  font-family: 'Inter', sans-serif;
  letter-spacing: 0.05em;
  color: var(--text-black);
  background: var(--white);
  border: none;
  border-radius: var(--button-radius);
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
  position: relative;
  overflow: visible;
}

/* Button pulse ring */
.btn-talk-primary::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  border: 1px solid rgba(255, 255, 255, 0.4);
  animation: buttonPulseRing 3s ease-in-out infinite;
  pointer-events: none;
}

@keyframes buttonPulseRing {
  0% {
    transform: scale(1);
    opacity: 0.8;
  }

  60% {
    transform: scale(1.15);
    opacity: 0;
  }

  100% {
    transform: scale(1.15);
    opacity: 0;
  }
}

.btn-talk-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.3);
}

.btn-talk-primary:active {
  transform: translateY(0);
}

.btn-talk-primary.active {
  background: #FF6B9D;
  color: white;
}

.btn-talk-primary.active::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  animation: ripple 0.6s ease-out;
}

@keyframes ripple {
  to {
    width: 300%;
    height: 300%;
    opacity: 0;
  }
}

/* Minimal Header */
.header-minimal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: var(--glass-blur);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.75rem;
  gap: 1rem;
}

.header-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.header-logo img {
  width: 32px;
  height: 32px;
}

.header-logo span {
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: 0.1em;
}

/* Header Navigation */
.header-nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  justify-content: center;
  flex: 1;
}

.header-nav a {
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  padding: 0.5rem 1rem;
  border-radius: 20px;
  transition: all 0.2s ease;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid transparent;
}

.header-nav a:hover,
.header-nav a.active {
  color: var(--white);
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.1);
  transform: translateY(-1px);
}

@media (max-width: 1100px) {
  .header-minimal {
    padding: 0 14px;
    gap: 0.6rem;
  }

  .header-logo span {
    display: none;
  }
}

@media (max-width: 900px) {
  .header-nav {
    gap: 0.9rem;
  }

  .header-nav a {
    font-size: 0.8rem;
  }

  .header-user {
    gap: 0.5rem;
  }

  .btn-logout {
    padding: 0.4rem 0.65rem;
    font-size: 0.8rem;
  }
}

/* User Menu */
.header-user {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-left: auto;
}

@media (max-width: 720px) {
  .header-minimal {
    display: grid;
    grid-template-columns: 1fr auto;
    grid-auto-rows: auto;
    align-items: center;
    row-gap: 0.45rem;
    column-gap: 0.75rem;
    padding: 12px 16px;
    height: auto;
    background: rgba(0, 0, 0, 0.95);
  }

  .header-logo {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin-bottom: 0;
  }

  .header-logo img {
    width: 34px;
    height: 34px;
  }

  .header-logo span {
    display: block;
    font-size: 1rem;
  }

  .header-user {
    grid-column: 2 / 3;
    grid-row: 1 / 2;
    justify-self: flex-end;
    margin-left: 0;
    gap: 0.5rem;
    padding-top: 0;
    border-top: none;
  }

  .header-nav {
    grid-column: 1 / -1;
    width: 100%;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.65rem;
    margin-top: 0.1rem;
  }

  .header-nav a {
    font-size: 0.85rem;
    padding: 0.55rem 1rem;
    background: rgba(255, 255, 255, 0.08);
    flex: 1;
    text-align: center;
    min-width: 90px;
  }

  .btn-logout {
    padding: 0.35rem 0.75rem;
    font-size: 0.85rem;
  }

  body .main-content {
    padding-top: 190px;
    padding-left: 1rem;
    padding-right: 1rem;
  }
}

.user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.2);
}

.btn-logout {
  padding: 0.5rem 1rem;
  background: transparent;
  color: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  font-size: 0.875rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-logout:hover {
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.4);
}

/* Voice Status */
.voice-status {
  position: absolute;
  top: 2rem;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.7);
  background: rgba(0, 0, 0, 0.5);
  padding: 0.5rem 1.5rem;
  border-radius: 20px;
  backdrop-filter: blur(10px);
}

.voice-status.active {
  color: #90FF6A;
}

/* Voice Timer */
.voice-timer {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.9);
  font-family: 'SF Mono', 'Monaco', monospace;
}

/* Loading Screen */
.loading-screen {
  position: fixed;
  inset: 0;
  background: var(--bg-black);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.loading-mosaic {
  width: 200px;
  height: 200px;
  border-radius: 24px;
  overflow: hidden;
  position: relative;
}

/* Modal Overlays */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(8px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 200;
}

.modal-overlay.active {
  display: flex;
}

.modal-content {
  background: #1a1a1a;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 24px;
  padding: 2rem;
  max-width: 500px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
  position: relative;
}

/* Settings Form */
.settings-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.settings-form label {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.settings-form input,
.settings-form select {
  padding: 0.75rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  color: white;
  font-size: 1rem;
}

.settings-form button {
  padding: 0.75rem 1.5rem;
  border-radius: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-save {
  background: #90FF6A;
  color: black;
  border: none;
}

.btn-cancel {
  background: transparent;
  color: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.15);
  transition: all 0.2s ease;
}

.btn-cancel:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.3);
}

.modal-footer {
  margin-top: 1.25rem;
  display: flex;
  justify-content: center;
}

.modal-footer--stack {
  flex-direction: column;
  gap: 0.75rem;
  width: 100%;
}

.btn-cancel--full {
  width: 100%;
}

.btn-save--full {
  width: 100%;
}

.global-status {
  position: relative;
  margin: 0 auto;
  margin-top: 70px;
  background: rgba(5, 7, 16, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  padding: 0.6rem 1.4rem;
  color: #fff;
  font-size: 0.85rem;
  max-width: 420px;
  text-align: center;
  opacity: 0;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.global-status.show {
  opacity: 1;
  transform: translateY(0);
}

.global-status[data-type="error"] {
  border-color: rgba(239, 68, 68, 0.4);
  color: #ffb4b4;
}

.global-status[data-type="success"] {
  border-color: rgba(16, 185, 129, 0.4);
  color: #93ffd2;
}

.global-status[data-type="info"] {
  border-color: rgba(79, 159, 255, 0.4);
  color: #b3d4ff;
}

.demo-limit-banner {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 158, 203, 0.35);
  border-radius: 22px;
  padding: 1.25rem 1.4rem;
  margin-bottom: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.35);
}

.demo-limit-banner[hidden] {
  display: none !important;
}

.demo-limit-content {
  display: flex;
  gap: 1rem;
  margin-left: auto;
  align-items: center;
}

.demo-limit-icon {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  background: rgba(255, 77, 158, 0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
}

.demo-limit-title {
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 0.2rem;
}

.demo-limit-copy {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.92rem;
}

.demo-limit-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.demo-limit-actions .btn-upgrade {
  border: none;
  border-radius: 999px;
  padding: 0.75rem 1.4rem;
  font-weight: 600;
  cursor: pointer;
  background: linear-gradient(135deg, #ff7acb, #ff9d6c);
  color: #0b0610;
  box-shadow: 0 12px 24px rgba(255, 122, 203, 0.35);
}

.demo-limit-actions .btn-outline {
  border-radius: 999px;
  padding: 0.75rem 1.4rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: rgba(255, 255, 255, 0.85);
  background: transparent;
}

.btn-talk-primary.limit-locked,
.btn-talk-primary.limit-locked:hover {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-locked {
  opacity: 0.6 !important;
  cursor: not-allowed !important;
  background: rgba(255, 255, 255, 0.1) !important;
  color: rgba(255, 255, 255, 0.5) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  box-shadow: none !important;
}

.form-status {
  margin-top: 0.75rem;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.75);
  min-height: 1rem;
}

.form-status[data-type="success"] {
  color: #89ffd9;
}

.form-status[data-type="error"] {
  color: #ffb2b2;
}

.form-status[data-type="warning"] {
  color: #ffd18a;
}

.account-avatar-card {
  display: flex;
  align-items: center;
  justify-content: center;
}


.avatar-stack {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  width: 100%;
  align-items: center;
  justify-content: center;
  position: relative;
}

.avatar-block {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  align-items: center;
  width: auto;
}

.avatar-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
}

.avatar-actions--stack {
  flex-direction: column;
  align-items: stretch;
}

.avatar-actions--stack .btn-outline {
  width: 200px;
}

.avatar-divider {
  display: none;
}

.account-avatar-preview {
  width: 116px;
  height: 116px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.03);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

.account-avatar-preview--user,
.account-avatar-preview--soulmate {
  margin: 0 auto;
  display: block;
}

.account-avatar-preview--user {
  transform: translateX(0);
}

.account-avatar-preview--soulmate {
  margin-top: -2.4rem;
  transform: translateX(0);
}

@media (min-width: 768px) {
  .avatar-stack {
    flex-direction: column;
    gap: 0.85rem;
  }

  .account-avatar-preview--soulmate {
    margin-top: -2rem;
  }
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 36px;
  height: 36px;
  border: none;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 50%;
  color: rgba(255, 255, 255, 0.6);
  font-size: 1.5rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  transition: all 0.2s ease;
  z-index: 10;
}

.modal-close:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  transform: rotate(90deg);
}

.voice-preview-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.voice-preview-btn {
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 999px;
  background: transparent;
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.75rem;
  padding: 0.35rem 0.9rem;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.voice-preview-btn:hover:not(.disabled) {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.45);
}

.voice-preview-btn.disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.spinner {
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Responsive Design */
@media (max-width: 768px) {
  .voice-chat-container {
    max-width: 100%;
    aspect-ratio: 1;
  }

  .btn-talk-primary {
    padding: 1rem 3rem;
    font-size: 1rem;
  }

  .ai-logo-container {
    width: 120px;
    height: 80px;
  }

  .header-nav {
    gap: 1rem;
    margin-left: auto;
  }

  .header-nav a {
    font-size: 0.8rem;
  }
}

/* Quick Stats (Hidden by default) */
.quick-stats {
  position: absolute;
  bottom: 1rem;
  right: 1rem;
  display: none;
  gap: 1rem;
  margin-left: auto;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.6);
}

/* Notification */
.notification {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  padding: 1rem 1.5rem;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  color: white;
  font-size: 0.875rem;
  opacity: 0;
  transform: translateY(1rem);
  transition: all 0.3s ease;
  z-index: 300;
}

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

.notification.success {
  border-color: #90FF6A;
}

.notification.error {
  border-color: #FF6B6B;
}

/* Hide elements from dark theme */
.sidebar-glass,
.stats-grid,
.dashboard-grid,
.card-glass,
.section-header,
.avatar-ring {
  display: none !important;
}

@media (max-width: 600px) {
  .modal-content {
    padding: 1.5rem;
    width: 95%;
  }

  .modal-close {
    top: 12px;
    right: 12px;
  }
}

/* ============================================================
   Enhanced Mobile Responsiveness
   ============================================================ */

/* Very small phones (320px - 380px) */
@media (max-width: 380px) {
  .voice-chat-container {
    max-width: 100%;
    aspect-ratio: 1;
  }

  .btn-talk-primary {
    padding: 0.875rem 2rem;
    font-size: 0.9rem;
  }

  .ai-logo-container {
    width: 100px;
    height: 70px;
  }

  .ai-logo img {
    max-width: 60px;
  }

  .voice-status {
    font-size: 0.85rem;
  }

  .voice-timer {
    font-size: 1.5rem;
  }

  .header-nav {
    gap: 0.5rem;
  }

  .header-nav a {
    font-size: 0.7rem;
    padding: 0.4rem 0.6rem;
  }

  /* Demo limit overlay */
  .demo-limit-overlay {
    padding: 1.25rem;
  }

  .demo-limit-icon {
    font-size: 2.5rem;
  }

  .demo-limit-title {
    font-size: 1.1rem;
  }

  .demo-limit-text {
    font-size: 0.85rem;
  }

  .demo-limit-actions {
    flex-direction: column;
    gap: 0.5rem;
  }

  .demo-limit-actions button {
    width: 100%;
    font-size: 0.85rem;
    padding: 0.75rem;
  }
}

/* Standard mobile adjustments */
@media (max-width: 480px) {
  .main-content {
    padding: 1.5rem 1rem;
  }

  .voice-content {
    gap: 0.75rem;
  }

  /* Quick actions at bottom */
  .quick-actions {
    padding: 0.5rem;
    gap: 0.25rem;
  }

  .quick-action-btn {
    padding: 0.5rem;
    font-size: 0.7rem;
  }

  .quick-action-btn svg {
    width: 18px;
    height: 18px;
  }
}