/* ═══════════════════════════════════════════════════════════
   SMM Platform — ПОЛНЫЙ РЕДИЗАЙН "Obsidian" v2
   Драматически новый визуал поверх существующих стилей
   ═══════════════════════════════════════════════════════════ */

/* ═══ ПЕРЕМЕННЫЕ ═══ */
:root {
  --bg-primary: #030408 !important;
  --bg-secondary: #080b14 !important;
  --bg-tertiary: #0c1020 !important;
  --bg-card: rgba(8, 12, 24, 0.9) !important;
  --bg-hover: rgba(255,255,255,0.03) !important;
  --bg-glass: rgba(6, 9, 18, 0.8) !important;

  --text-primary: #e8ecf6 !important;
  --text-secondary: #6b7394 !important;
  --text-muted: #333b58 !important;

  --accent: #7c6df0 !important;
  --accent-light: #a59cf5 !important;
  --accent-dark: #5b4dc7 !important;
  --accent-bg: rgba(124,109,240,0.06) !important;
  --accent-border: rgba(124,109,240,0.15) !important;
  --accent-glow: rgba(124,109,240,0.12) !important;

  --accent2: #3ecfb2 !important;
  --warm: #f0a050 !important;

  --telegram: #2AABEE !important;
  --vk: #0077ff !important;
  --max: #ff6b35 !important;
  --success: #3ecfb2 !important;
  --error: #f06880 !important;
  --warning: #f0a050 !important;

  --border: rgba(255,255,255,0.04) !important;
  --border-light: rgba(255,255,255,0.07) !important;

  --radius-xs: 8px !important;
  --radius-sm: 12px !important;
  --radius-md: 16px !important;
  --radius-lg: 22px !important;
  --radius-xl: 32px !important;

  --shadow-card: 0 4px 32px rgba(0,0,0,0.4), inset 0 1px 0 rgba(255,255,255,0.02) !important;
  --shadow-md: 0 12px 48px rgba(0,0,0,0.4) !important;
  --shadow-lg: 0 24px 80px rgba(0,0,0,0.6) !important;
  --shadow-glow: 0 0 32px rgba(124,109,240,0.15), 0 0 8px rgba(124,109,240,0.08) !important;

  --sidebar-width: 260px !important;
  --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

/* ═══ BACKGROUND — ANIMATED GRADIENT MESH ═══ */
body {
  background: #030408 !important;
  overflow-x: hidden !important;
}
body::before {
  content: '' !important;
  position: fixed !important; top: 0 !important; left: 0 !important;
  width: 100vw !important; height: 100vh !important;
  background:
    radial-gradient(ellipse 900px 700px at 5% 5%, rgba(124,109,240,0.06) 0%, transparent 65%),
    radial-gradient(ellipse 700px 600px at 90% 20%, rgba(62,207,178,0.04) 0%, transparent 60%),
    radial-gradient(ellipse 800px 600px at 40% 90%, rgba(240,160,80,0.03) 0%, transparent 60%),
    radial-gradient(ellipse 500px 400px at 70% 70%, rgba(124,109,240,0.03) 0%, transparent 50%) !important;
  z-index: 0 !important;
  pointer-events: none !important;
  animation: meshDrift 20s ease-in-out infinite !important;
}
@keyframes meshDrift {
  0%, 100% { opacity: 1; }
  50% { opacity: .7; }
}
#root { position: relative !important; z-index: 1 !important; }

/* ═══ SIDEBAR — GLASSMORPHISM REDESIGN ═══ */
.sidebar {
  background: rgba(4, 6, 14, 0.92) !important;
  backdrop-filter: blur(32px) saturate(200%) !important;
  -webkit-backdrop-filter: blur(32px) saturate(200%) !important;
  border-right: 1px solid rgba(124,109,240,0.06) !important;
}
.sidebar::before {
  content: '' !important;
  position: absolute !important; top: 0 !important; left: 0 !important; right: 0 !important;
  height: 300px !important;
  background: linear-gradient(180deg, rgba(124,109,240,0.08) 0%, rgba(62,207,178,0.02) 50%, transparent 100%) !important;
  pointer-events: none !important;
}

/* Logo Area */
.sidebar-logo {
  padding: 26px 22px !important;
  border-bottom: 1px solid rgba(124,109,240,0.06) !important;
  position: relative !important; z-index: 1 !important;
}
.sidebar-logo .logo-icon {
  width: 46px !important; height: 46px !important;
  border-radius: 15px !important;
  background: linear-gradient(135deg, #7c6df0 0%, #5b4dc7 40%, #3ecfb2 100%) !important;
  box-shadow: 0 4px 24px rgba(124,109,240,0.35), inset 0 1px 0 rgba(255,255,255,0.2) !important;
  animation: logoPulse 4s ease-in-out infinite !important;
}
@keyframes logoPulse {
  0%, 100% { box-shadow: 0 4px 24px rgba(124,109,240,0.3); transform: scale(1); }
  50% { box-shadow: 0 6px 36px rgba(124,109,240,0.45); transform: scale(1.03); }
}
.sidebar-logo h1 {
  font-size: 15px !important; font-weight: 700 !important;
  letter-spacing: -0.02em !important;
  background: linear-gradient(135deg, #e8ecf6, #a59cf5) !important;
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
}
.sidebar-logo h1 span {
  font-size: 9px !important; letter-spacing: 2.5px !important;
  -webkit-text-fill-color: #4a5270 !important;
}

/* Nav Items — Modern Pill Style */
.sidebar-nav { padding: 16px 10px !important; gap: 3px !important; }
.sidebar-section-label {
  font-size: 9px !important; letter-spacing: 2.5px !important;
  color: #333b58 !important; padding: 22px 16px 6px !important;
}
.sidebar-nav a, .sidebar-nav button {
  border-radius: 14px !important;
  padding: 12px 16px !important;
  font-size: 13.5px !important;
  font-weight: 500 !important;
  letter-spacing: -0.01em !important;
  border: 1px solid transparent !important;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
  position: relative !important;
  color: #6b7394 !important;
}
.sidebar-nav a:hover, .sidebar-nav button:hover {
  background: rgba(124,109,240,0.04) !important;
  color: #a59cf5 !important;
  transform: translateX(4px) !important;
  border-color: rgba(124,109,240,0.06) !important;
}
.sidebar-nav a.active, .sidebar-nav button.active {
  background: linear-gradient(135deg, rgba(124,109,240,0.1), rgba(62,207,178,0.04)) !important;
  color: #a59cf5 !important;
  border: 1px solid rgba(124,109,240,0.15) !important;
  box-shadow: 0 0 24px rgba(124,109,240,0.08), inset 0 0 16px rgba(124,109,240,0.03) !important;
}
.sidebar-nav a.active::before, .sidebar-nav button.active::before {
  content: '' !important;
  position: absolute !important; left: 0 !important; top: 8px !important; bottom: 8px !important;
  width: 3px !important;
  background: linear-gradient(180deg, #7c6df0, #3ecfb2) !important;
  border-radius: 0 4px 4px 0 !important;
  box-shadow: 0 0 10px rgba(124,109,240,0.5) !important;
}
.sidebar-nav a.active svg, .sidebar-nav button.active svg {
  color: #a59cf5 !important;
  filter: drop-shadow(0 0 6px rgba(124,109,240,0.4)) !important;
}

/* ═══ HEADER ═══ */
.page-header {
  background: rgba(3, 4, 8, 0.9) !important;
  backdrop-filter: blur(24px) saturate(180%) !important;
  -webkit-backdrop-filter: blur(24px) saturate(180%) !important;
  border-bottom: 1px solid rgba(124,109,240,0.04) !important;
  padding: 16px 32px !important;
}
.page-header h2 {
  font-size: 18px !important; font-weight: 800 !important;
  letter-spacing: -0.03em !important;
  background: linear-gradient(135deg, #e8ecf6 0%, #7c6df0 100%) !important;
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
}

/* ═══ CARDS — GRADIENT BORDER EFFECT ═══ */
.card {
  background: rgba(6, 9, 18, 0.88) !important;
  border: 1px solid rgba(124,109,240,0.05) !important;
  border-radius: 20px !important;
  backdrop-filter: blur(20px) !important;
  box-shadow: 0 4px 32px rgba(0,0,0,0.3), inset 0 1px 0 rgba(255,255,255,0.02) !important;
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1) !important;
  position: relative !important;
  overflow: visible !important;
}
.card::before {
  content: '' !important;
  position: absolute !important; top: 0 !important; left: 0 !important; right: 0 !important;
  height: 1px !important;
  background: linear-gradient(90deg, transparent, rgba(124,109,240,0.12), rgba(62,207,178,0.08), transparent) !important;
  border-radius: 20px 20px 0 0 !important;
}
.card:hover {
  border-color: rgba(124,109,240,0.12) !important;
  box-shadow: 0 12px 48px rgba(0,0,0,0.35), 0 0 0 1px rgba(124,109,240,0.06),
              0 0 40px rgba(124,109,240,0.04) !important;
  transform: translateY(-3px) !important;
}

/* ═══ BUTTONS — GLASS MORPHISM ═══ */
.btn {
  border-radius: 12px !important;
  font-weight: 600 !important;
  letter-spacing: -0.01em !important;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
}
.btn::after { display: none !important; }
.btn-primary {
  background: linear-gradient(135deg, #7c6df0 0%, #5b4dc7 50%, #3ecfb2 150%) !important;
  color: #fff !important;
  border: none !important;
  box-shadow: 0 4px 20px rgba(124,109,240,0.3), inset 0 1px 0 rgba(255,255,255,0.15) !important;
  text-shadow: 0 1px 2px rgba(0,0,0,0.2) !important;
}
.btn-primary:hover {
  background: linear-gradient(135deg, #a59cf5 0%, #7c6df0 50%, #3ecfb2 150%) !important;
  box-shadow: 0 6px 32px rgba(124,109,240,0.4), inset 0 1px 0 rgba(255,255,255,0.2) !important;
  transform: translateY(-2px) scale(1.02) !important;
}
.btn-secondary {
  background: rgba(124,109,240,0.05) !important;
  border: 1px solid rgba(124,109,240,0.1) !important;
  color: #a59cf5 !important;
}
.btn-secondary:hover {
  background: rgba(124,109,240,0.1) !important;
  border-color: rgba(124,109,240,0.2) !important;
  transform: translateY(-1px) !important;
}
.btn-ghost { color: #6b7394 !important; }
.btn-ghost:hover { background: rgba(124,109,240,0.05) !important; color: #a59cf5 !important; }

/* ═══ BADGES — GLOW PILLS ═══ */
.badge {
  border-radius: 10px !important;
  font-weight: 600 !important;
  backdrop-filter: blur(12px) !important;
  padding: 4px 12px !important;
}
.badge-success {
  color: #3ecfb2 !important;
  background: rgba(62,207,178,0.08) !important;
  border: 1px solid rgba(62,207,178,0.12) !important;
  box-shadow: 0 0 12px rgba(62,207,178,0.06) !important;
}
.badge-error {
  color: #f06880 !important;
  background: rgba(240,104,128,0.08) !important;
  border: 1px solid rgba(240,104,128,0.12) !important;
}
.badge-warning {
  color: #f0a050 !important;
  background: rgba(240,160,80,0.08) !important;
  border: 1px solid rgba(240,160,80,0.12) !important;
}
.badge-info {
  color: #7c6df0 !important;
  background: rgba(124,109,240,0.08) !important;
  border: 1px solid rgba(124,109,240,0.12) !important;
}

/* ═══ EDITOR ═══ */
.editor-toolbar {
  background: rgba(6,9,18,0.96) !important;
  border-radius: 20px 20px 0 0 !important;
  border-bottom: 1px solid rgba(124,109,240,0.05) !important;
  padding: 12px 18px !important;
}
.toolbar-btn {
  border-radius: 10px !important;
  width: 38px !important; height: 38px !important;
  transition: all 0.2s !important;
}
.toolbar-btn:hover {
  background: rgba(124,109,240,0.08) !important;
  color: #a59cf5 !important;
  transform: scale(1.1) !important;
}
.toolbar-btn.is-active {
  background: rgba(124,109,240,0.12) !important;
  color: #a59cf5 !important;
  border: 1px solid rgba(124,109,240,0.2) !important;
  box-shadow: 0 0 16px rgba(124,109,240,0.12) !important;
}
.toolbar-divider { background: rgba(124,109,240,0.08) !important; }

.editor-content .tiptap { font-size: 15px !important; line-height: 1.8 !important; }
.editor-footer {
  background: rgba(6,9,18,0.96) !important;
  border-radius: 0 0 20px 20px !important;
  border-top: 1px solid rgba(124,109,240,0.05) !important;
}

/* ═══ PREVIEW ═══ */
.preview-tabs {
  background: rgba(6,9,18,0.96) !important;
  border-radius: 20px 20px 0 0 !important;
}
.preview-tab {
  font-size: 11px !important; letter-spacing: 1.2px !important;
  padding: 14px 16px !important;
  transition: all 0.2s !important;
}
.preview-tab:hover { color: #a59cf5 !important; background: rgba(124,109,240,0.04) !important; }
.preview-tab.active {
  color: #7c6df0 !important;
  border-bottom: 2px solid #7c6df0 !important;
}
.preview-tab .platform-dot.tg { box-shadow: 0 0 8px #2AABEE !important; }
.preview-tab .platform-dot.vk { box-shadow: 0 0 8px #07f !important; }
.preview-tab .platform-dot.max { box-shadow: 0 0 8px #ff6b35 !important; }

.tg-preview {
  border-radius: 18px !important;
  background: linear-gradient(145deg, #080e18 0%, #0d1524 100%) !important;
  border: 1px solid rgba(42,171,238,0.06) !important;
}

/* ═══ PLATFORM TOGGLES ═══ */
.platform-toggle {
  border-radius: 16px !important;
  padding: 14px 18px !important;
  border: 1px solid rgba(255,255,255,0.03) !important;
  background: rgba(6,9,18,0.6) !important;
}
.platform-toggle:hover {
  background: rgba(124,109,240,0.03) !important;
  border-color: rgba(124,109,240,0.08) !important;
  transform: translateX(3px) !important;
}
.platform-toggle.checked {
  border-color: rgba(124,109,240,0.15) !important;
  background: linear-gradient(135deg, rgba(124,109,240,0.06), rgba(62,207,178,0.03)) !important;
  box-shadow: 0 0 24px rgba(124,109,240,0.06) !important;
}
.toggle-check { border-radius: 8px !important; border: 2px solid rgba(124,109,240,0.2) !important; }
.platform-toggle.checked .toggle-check {
  background: linear-gradient(135deg, #7c6df0, #3ecfb2) !important;
  border-color: #7c6df0 !important;
  box-shadow: 0 2px 12px rgba(124,109,240,0.4) !important;
}
.toggle-check svg { color: #fff !important; }

/* ═══ EMOJI PICKER ═══ */
.emoji-picker {
  border-radius: 22px !important;
  border: 1px solid rgba(124,109,240,0.08) !important;
  box-shadow: 0 24px 80px rgba(0,0,0,0.6), 0 0 0 1px rgba(124,109,240,0.04) !important;
}
.emoji-cell { border-radius: 12px !important; }
.emoji-cell:hover { background: rgba(124,109,240,0.08) !important; }
.emoji-tab.active { color: #7c6df0 !important; border-bottom-color: #7c6df0 !important; background: rgba(124,109,240,0.06) !important; }

/* ═══ TOAST ═══ */
.toast {
  border-radius: 16px !important;
  box-shadow: 0 12px 48px rgba(0,0,0,0.5) !important;
}
.toast-success {
  background: rgba(6,9,18,0.95) !important;
  border: 1px solid rgba(62,207,178,0.2) !important;
  color: #3ecfb2 !important;
}
.toast-error {
  background: rgba(6,9,18,0.95) !important;
  border: 1px solid rgba(240,104,128,0.2) !important;
  color: #f06880 !important;
}

/* ═══ DIALOG ═══ */
.link-dialog-overlay { background: rgba(3,4,8,0.85) !important; }
.link-dialog {
  border-radius: 28px !important;
  background: rgba(8,12,24,0.98) !important;
  border: 1px solid rgba(124,109,240,0.1) !important;
  box-shadow: 0 32px 100px rgba(0,0,0,0.6), 0 0 0 1px rgba(124,109,240,0.05) !important;
}
.link-dialog input {
  border-radius: 12px !important;
  border: 1px solid rgba(124,109,240,0.1) !important;
  background: rgba(3,4,8,0.8) !important;
}
.link-dialog input:focus {
  border-color: #7c6df0 !important;
  box-shadow: 0 0 0 3px rgba(124,109,240,0.1) !important;
}

/* ═══ SCROLLBAR ═══ */
::-webkit-scrollbar { width: 4px !important; }
::-webkit-scrollbar-track { background: transparent !important; }
::-webkit-scrollbar-thumb {
  background: rgba(124,109,240,0.15) !important;
  border-radius: 10px !important;
}
::-webkit-scrollbar-thumb:hover { background: rgba(124,109,240,0.25) !important; }

/* ═══ SMM PLATFORM TOGGLES (inline) ═══ */
.smm-pl-toggle {
  border-radius: 8px !important;
  border: 1.5px solid rgba(255,255,255,0.04) !important;
  transition: all 0.3s cubic-bezier(0.34,1.56,0.64,1) !important;
}
.smm-pl-toggle:hover { transform: scale(1.15) !important; }
.smm-pl-toggle.active {
  box-shadow: 0 0 14px color-mix(in srgb, var(--pl-color) 30%, transparent) !important;
}

/* ═══ POST CARD — READ STATE ═══ */
.card.is-read { opacity: 0.45 !important; }
.card.is-read:hover { opacity: 0.8 !important; }

/* ═══ CROSS NAV LINK ═══ */
.cross-nav-link {
  border-radius: 16px !important;
  background: linear-gradient(135deg, rgba(124,109,240,0.04), rgba(62,207,178,0.02)) !important;
  border: 1px solid rgba(124,109,240,0.06) !important;
}
.cross-nav-link:hover {
  border-color: rgba(124,109,240,0.15) !important;
  box-shadow: 0 4px 20px rgba(124,109,240,0.08) !important;
  color: #7c6df0 !important;
}

/* ═══ SELECTION ═══ */
::selection {
  background: rgba(124,109,240,0.25) !important;
  color: #fff !important;
}

/* ═══ BLOCKQUOTE ═══ */
.tiptap.ProseMirror p.tg-blockquote,
.tg-preview blockquote {
  border-left: 3px solid #7c6df0 !important;
  background: rgba(124,109,240,0.06) !important;
  border-radius: 0 10px 10px 0 !important;
}
