/* SecretMsg Dynamic Color System & Shared Styles */
:root {
  --bg-color: #0B0E14;
  --surface-dim: #10131A;
  --surface-card: #151B26;
  --text-main: #FFFFFF;
  --text-muted: #94A3B8;
  --border-hairline: rgba(255, 255, 255, 0.12);
  --glass-bg: rgba(21, 27, 38, 0.72);
  --glass-border: rgba(255, 255, 255, 0.12);
  --glass-hover-bg: rgba(28, 36, 50, 0.85);
  --nav-bg: rgba(11, 14, 20, 0.92);
  --primary-btn-bg: #FFFFFF;
  --primary-btn-text: #0B0E14;
  --pill-inactive-text: #94A3B8;
}

html.light {
  --bg-color: #F8FAFC;
  --surface-dim: #F1F5F9;
  --surface-card: #FFFFFF;
  --text-main: #0F172A;
  --text-muted: #64748B;
  --border-hairline: rgba(15, 23, 42, 0.08);
  --glass-bg: rgba(255, 255, 255, 0.88);
  --glass-border: rgba(15, 23, 42, 0.08);
  --glass-hover-bg: #FFFFFF;
  --nav-bg: rgba(255, 255, 255, 0.94);
  --primary-btn-bg: #0F172A;
  --primary-btn-text: #FFFFFF;
  --pill-inactive-text: #64748B;
}

body {
  background-color: var(--bg-color);
  color: var(--text-main);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color 0.25s cubic-bezier(0.16, 1, 0.3, 1), color 0.25s ease;
}

/* Mobile Frame Container for Desktop Preview */
.mobile-viewport {
  max-width: 440px;
  min-height: 100vh;
  margin: 0 auto;
  position: relative;
  background-color: var(--bg-color);
  box-shadow: 0 0 50px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  transition: background-color 0.25s ease, box-shadow 0.25s ease;
}

html.light .mobile-viewport {
  box-shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.1), 0 0 0 1px rgba(0, 0, 0, 0.06);
}

.glass-panel {
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 0.5px solid var(--glass-border);
  transition: background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.glass-panel-hover {
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.glass-panel-hover:hover {
  background: var(--glass-hover-bg);
  border-color: rgba(99, 102, 241, 0.35);
  transform: translateY(-2px);
}

html.light .glass-panel {
  box-shadow: 0 4px 20px -2px rgba(15, 23, 42, 0.04);
}

html.light .glass-panel-hover:hover {
  box-shadow: 0 10px 30px -4px rgba(15, 23, 42, 0.08);
}

.hairline-border {
  border: 0.5px solid var(--border-hairline);
}

/* Specific Light Mode Color Adaptations */
html.light .text-white {
  color: #0F172A !important;
}

html.light .text-slate-200,
html.light .text-slate-300 {
  color: #334155 !important;
}

html.light .text-slate-400 {
  color: #64748B !important;
}

html.light .text-slate-500 {
  color: #94A3B8 !important;
}

html.light .bg-\[\#0B0E14\] {
  background-color: #F8FAFC !important;
}

html.light .bg-\[\#10131A\],
html.light .bg-\[\#151B26\] {
  background-color: #F1F5F9 !important;
}

html.light .bg-white\/5 {
  background-color: rgba(15, 23, 42, 0.04) !important;
}

html.light .bg-white\/10 {
  background-color: rgba(15, 23, 42, 0.06) !important;
}

html.light .border-white\/10,
html.light .border-white\/15,
html.light .border-white\/20 {
  border-color: rgba(15, 23, 42, 0.08) !important;
}

html.light .bg-white {
  background-color: #0F172A !important;
  color: #FFFFFF !important;
}

html.light .text-\[\#0B0E14\] {
  color: #FFFFFF !important;
}

html.light header,
html.light nav {
  background-color: var(--nav-bg) !important;
  border-color: var(--border-hairline) !important;
}

html.light input,
html.light textarea {
  color: #0F172A !important;
}

html.light input::placeholder,
html.light textarea::placeholder {
  color: #94A3B8 !important;
}

/* Theme Selector Buttons */
.theme-btn-active {
  background-color: #FFFFFF !important;
  color: #0B0E14 !important;
  font-weight: 700 !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15) !important;
}

html.light .theme-btn-active {
  background-color: #0F172A !important;
  color: #FFFFFF !important;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.2) !important;
}

.no-scrollbar::-webkit-scrollbar {
  display: none;
}

.no-scrollbar {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.pb-safe {
  padding-bottom: max(16px, env(safe-area-inset-bottom));
}

/* Toast notification */
.toast-notice {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%) translateY(-100px);
  background: var(--primary-btn-bg);
  color: var(--primary-btn-text);
  font-weight: 600;
  font-size: 13px;
  padding: 10px 20px;
  border-radius: 9999px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.25);
  z-index: 9999;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
  display: flex;
  align-items: center;
  gap: 8px;
}

.toast-notice.show {
  transform: translateX(-50%) translateY(0);
}
