/* =============================================================
   Контент-Движок — Design System
   Dark theme with coral/magenta gradient accents
   ============================================================= */

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

/* ===== TOKENS ===== */
:root {
  /* Colors */
  --bg-primary: #0A0A0F;
  --bg-secondary: #12121A;
  --bg-card: rgba(22, 22, 32, 0.7);
  --bg-card-hover: rgba(30, 30, 45, 0.85);
  --bg-glass: rgba(255, 255, 255, 0.04);
  --bg-glass-hover: rgba(255, 255, 255, 0.08);

  --text-primary: #F0EEF6;
  --text-secondary: #9B97A8;
  --text-tertiary: #6B6780;
  --text-accent: #FF6B8A;

  --accent-1: #FF6B6B;
  --accent-2: #FF3CAC;
  --accent-gradient: linear-gradient(135deg, #FF6B6B 0%, #FF3CAC 50%, #784BA0 100%);
  --accent-gradient-subtle: linear-gradient(135deg, rgba(255,107,107,0.15) 0%, rgba(255,60,172,0.15) 50%, rgba(120,75,160,0.08) 100%);
  --accent-glow: 0 0 40px rgba(255, 60, 172, 0.2);

  --border-subtle: rgba(255, 255, 255, 0.06);
  --border-accent: rgba(255, 107, 107, 0.3);

  --success: #4ECDC4;
  --warning: #F7DC6F;

  /* Typography */
  --font-primary: 'Onest', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Spacing */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-2xl: 48px;
  --space-3xl: 64px;

  /* Radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  /* Transitions */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --duration-fast: 150ms;
  --duration-normal: 300ms;
  --duration-slow: 500ms;
}

/* ===== RESET & BASE ===== */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-primary);
  background: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.6;
}

/* Background mesh gradient */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background:
    radial-gradient(ellipse at 20% 0%, rgba(255, 107, 107, 0.08) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 20%, rgba(120, 75, 160, 0.06) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 80%, rgba(255, 60, 172, 0.04) 0%, transparent 50%);
  pointer-events: none;
  z-index: 0;
}

/* Noise texture overlay */
body::after {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0.02;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 0;
}

/* ===== APP CONTAINER ===== */
#app {
  position: relative;
  z-index: 1;
  min-height: 100vh;
}

/* ===== SCREENS ===== */
.screen {
  display: none;
  min-height: 100vh;
  animation: fadeIn var(--duration-slow) var(--ease-out);
}

.screen.active {
  display: flex;
  flex-direction: column;
}

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

/* ===== ONBOARDING ===== */
.onboarding {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  min-height: 100vh;
  padding: var(--space-xl) var(--space-lg);
  padding-top: clamp(40px, 8vh, 100px);
  padding-bottom: 100px;
  overflow-y: auto;
}

.onboarding__logo {
  font-size: 2.5rem;
  font-weight: 800;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: var(--space-sm);
  letter-spacing: -0.03em;
}

.onboarding__subtitle {
  color: var(--text-secondary);
  font-size: 1rem;
  margin-bottom: var(--space-3xl);
  text-align: center;
  max-width: 400px;
  line-height: 1.5;
}

.onboarding__progress {
  display: flex;
  gap: var(--space-sm);
  margin-bottom: var(--space-2xl);
}

.onboarding__dot {
  width: 32px;
  height: 4px;
  border-radius: var(--radius-full);
  background: var(--border-subtle);
  transition: all var(--duration-normal) var(--ease-out);
}

.onboarding__dot.active {
  background: var(--accent-gradient);
  width: 48px;
}

.onboarding__dot.completed {
  background: var(--accent-1);
  opacity: 0.5;
}

.onboarding__question {
  font-size: 1.5rem;
  font-weight: 600;
  text-align: center;
  margin-bottom: var(--space-sm);
  letter-spacing: -0.02em;
  animation: slideUp var(--duration-normal) var(--ease-out);
}

.onboarding__hint {
  font-size: 0.85rem;
  color: var(--text-tertiary);
  text-align: center;
  margin-bottom: var(--space-lg);
  animation: slideUp var(--duration-normal) var(--ease-out);
}

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

.onboarding__options {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-sm);
  width: 100%;
  max-width: 440px;
  animation: slideUp var(--duration-normal) var(--ease-out);
  animation-delay: 100ms;
  animation-fill-mode: backwards;
}

.onboarding__footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 440px;
  margin-top: var(--space-sm);
}

.onboarding__skip {
  margin-top: var(--space-md);
  background: none;
  border: none;
  color: var(--text-tertiary);
  font-family: var(--font-primary);
  font-size: 0.85rem;
  cursor: pointer;
  transition: color var(--duration-fast);
  padding: var(--space-sm) var(--space-md);
}

.onboarding__skip:hover {
  color: var(--text-secondary);
}

/* Custom niche text input */
.custom-input {
  width: 100%;
  padding: var(--space-md) var(--space-lg);
  background: var(--bg-card);
  border: 1px solid var(--border-accent);
  border-radius: var(--radius-lg);
  color: var(--text-primary);
  font-family: var(--font-primary);
  font-size: 0.95rem;
  font-weight: 500;
  outline: none;
  transition: all var(--duration-fast) var(--ease-out);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
}

.custom-input::placeholder {
  color: var(--text-tertiary);
}

.custom-input:focus {
  border-color: var(--accent-1);
  box-shadow: var(--accent-glow);
}

.option-btn {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-sm) var(--space-lg);
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  color: var(--text-primary);
  font-family: var(--font-primary);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--duration-normal) var(--ease-out);
  text-align: left;
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
}

.option-btn:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-accent);
  transform: translateY(-1px);
}

.option-btn.selected {
  background: var(--accent-gradient-subtle);
  border-color: var(--accent-1);
  box-shadow: var(--accent-glow);
}

.option-btn__icon {
  font-size: 1.3rem;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-glass);
  border-radius: var(--radius-md);
  flex-shrink: 0;
}

/* ===== MAIN SCREEN (GENERATOR) ===== */
.main-screen {
  padding: var(--space-lg);
  padding-bottom: 100px;
  max-width: 720px;
  margin: 0 auto;
  width: 100%;
}

/* Header */
.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-md) 0;
  margin-bottom: var(--space-lg);
}

.header__logo {
  font-size: 1.3rem;
  font-weight: 700;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.03em;
}

.header__actions {
  display: flex;
  gap: var(--space-sm);
}

.icon-btn {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-glass);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-size: 1.1rem;
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease-out);
}

.icon-btn:hover {
  background: var(--bg-glass-hover);
  color: var(--text-primary);
  border-color: var(--border-accent);
}

.icon-btn.active {
  background: var(--accent-gradient-subtle);
  border-color: var(--accent-1);
  color: var(--accent-1);
}

/* Profile badge */
.profile-badge {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-md) var(--space-lg);
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  margin-bottom: var(--space-xl);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
}

.profile-badge__info {
  flex: 1;
}

.profile-badge__niche {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-accent);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.profile-badge__platform {
  font-size: 0.8rem;
  color: var(--text-tertiary);
  margin-top: 2px;
}

.profile-badge__reset {
  font-size: 0.75rem;
  color: var(--text-tertiary);
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font-primary);
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color var(--duration-fast);
}

.profile-badge__reset:hover {
  color: var(--text-secondary);
}

/* Categories */
.categories {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-md);
  margin-bottom: var(--space-xl);
}

.category-card {
  position: relative;
  padding: var(--space-lg);
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all var(--duration-normal) var(--ease-out);
  overflow: hidden;
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
}

.category-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--cat-color, var(--accent-gradient));
  opacity: 0;
  transition: opacity var(--duration-normal);
}

.category-card:hover {
  transform: translateY(-3px);
  border-color: var(--border-accent);
  box-shadow: 0 8px 32px rgba(0,0,0,0.3);
}

.category-card:hover::before {
  opacity: 1;
}

.category-card.selected {
  border-color: var(--border-accent);
  background: var(--accent-gradient-subtle);
}

.category-card.selected::before {
  opacity: 1;
}

.category-card__icon {
  font-size: 1.8rem;
  margin-bottom: var(--space-sm);
}

.category-card__name {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: var(--space-xs);
}

.category-card__desc {
  font-size: 0.75rem;
  color: var(--text-tertiary);
  line-height: 1.4;
}

/* Subcategories */
.subcategories {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  margin-bottom: var(--space-xl);
  animation: slideUp var(--duration-normal) var(--ease-out);
}

.subcategory-chip {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  padding: var(--space-sm) var(--space-md);
  background: var(--bg-glass);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  font-family: var(--font-primary);
  font-size: 0.85rem;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease-out);
  white-space: nowrap;
}

.subcategory-chip:hover {
  background: var(--bg-glass-hover);
  color: var(--text-primary);
  border-color: var(--border-accent);
}

.subcategory-chip.selected {
  background: var(--accent-gradient-subtle);
  border-color: var(--accent-1);
  color: var(--text-accent);
}

.subcategory-chip__icon {
  font-size: 1rem;
}

/* Generate button */
.generate-section {
  margin-bottom: var(--space-xl);
}

.generate-btn {
  width: 100%;
  padding: var(--space-md) var(--space-xl);
  background: var(--accent-gradient);
  border: none;
  border-radius: var(--radius-lg);
  color: white;
  font-family: var(--font-primary);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--duration-normal) var(--ease-out);
  position: relative;
  overflow: hidden;
  letter-spacing: -0.01em;
}

.generate-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 200%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
  transition: left 0.6s ease;
}

.generate-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(255, 60, 172, 0.3);
}

.generate-btn:hover::before {
  left: 100%;
}

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

.generate-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.generate-btn:disabled:hover {
  box-shadow: none;
}

/* Platform switcher */
.platform-switcher {
  display: flex;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: var(--space-xs);
  margin-bottom: var(--space-xl);
  gap: var(--space-xs);
}

.platform-tab {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-md);
  background: transparent;
  border: none;
  border-radius: var(--radius-md);
  color: var(--text-tertiary);
  font-family: var(--font-primary);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease-out);
}

.platform-tab:hover {
  color: var(--text-secondary);
  background: var(--bg-glass);
}

.platform-tab.active {
  background: var(--bg-glass-hover);
  color: var(--text-primary);
  box-shadow: inset 0 0 0 1px var(--border-accent);
}

.platform-tab__icon {
  font-size: 1.1rem;
}

/* Generated post card */
.post-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: var(--space-xl);
  margin-bottom: var(--space-lg);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  animation: postAppear var(--duration-slow) var(--ease-spring);
  position: relative;
  overflow: hidden;
}

.post-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--accent-gradient);
}

@keyframes postAppear {
  from {
    opacity: 0;
    transform: translateY(30px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.post-card__meta {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-md);
  flex-wrap: wrap;
}

.post-card__tag {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  padding: 3px 10px;
  background: var(--bg-glass);
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.post-card__content {
  font-size: 0.95rem;
  line-height: 1.75;
  color: var(--text-primary);
  white-space: pre-wrap;
  word-break: break-word;
}

.post-card__content .highlight {
  color: var(--text-accent);
  font-weight: 600;
}

.post-card__actions {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin-top: var(--space-lg);
  padding-top: var(--space-md);
  border-top: 1px solid var(--border-subtle);
}

.post-card__action {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  padding: var(--space-sm) var(--space-md);
  background: var(--bg-glass);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-family: var(--font-primary);
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease-out);
}

.post-card__action:hover {
  background: var(--bg-glass-hover);
  color: var(--text-primary);
  border-color: var(--border-accent);
}

.post-card__action.favorited {
  background: rgba(255, 107, 107, 0.1);
  border-color: var(--accent-1);
  color: var(--accent-1);
}

.post-card__char-count {
  margin-left: auto;
  font-size: 0.75rem;
  color: var(--text-tertiary);
  font-family: var(--font-mono);
}

/* Typewriter effect */
.typewriter {
  overflow: hidden;
}

.typewriter .cursor {
  display: inline-block;
  width: 2px;
  height: 1em;
  background: var(--accent-1);
  margin-left: 2px;
  animation: blink 0.8s infinite;
  vertical-align: text-bottom;
}

@keyframes blink {
  0%, 50% { opacity: 1; }
  51%, 100% { opacity: 0; }
}

/* ===== HISTORY / FAVORITES SCREEN ===== */
.history-screen {
  padding: var(--space-lg);
  padding-bottom: 100px;
  max-width: 720px;
  margin: 0 auto;
  width: 100%;
}

.history-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-xl);
  padding: var(--space-md) 0;
}

.history-header__title {
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.history-header__back {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  background: none;
  border: none;
  color: var(--text-secondary);
  font-family: var(--font-primary);
  font-size: 0.9rem;
  cursor: pointer;
  transition: color var(--duration-fast);
}

.history-header__back:hover {
  color: var(--text-primary);
}

.history-tabs {
  display: flex;
  gap: var(--space-sm);
  margin-bottom: var(--space-xl);
}

.history-tab {
  padding: var(--space-sm) var(--space-lg);
  background: var(--bg-glass);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  color: var(--text-secondary);
  font-family: var(--font-primary);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease-out);
}

.history-tab:hover {
  background: var(--bg-glass-hover);
  color: var(--text-primary);
}

.history-tab.active {
  background: var(--accent-gradient-subtle);
  border-color: var(--accent-1);
  color: var(--text-accent);
}

.history-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--space-3xl);
  color: var(--text-tertiary);
  text-align: center;
}

.history-empty__icon {
  font-size: 3rem;
  margin-bottom: var(--space-md);
  opacity: 0.5;
}

.history-empty__text {
  font-size: 0.9rem;
  line-height: 1.5;
}

/* ===== BOTTOM NAV ===== */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-xl);
  padding: var(--space-md) var(--space-lg);
  background: rgba(10, 10, 15, 0.85);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  border-top: 1px solid var(--border-subtle);
  z-index: 100;
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-xs);
  background: none;
  border: none;
  color: var(--text-tertiary);
  font-family: var(--font-primary);
  font-size: 0.65rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--duration-fast);
  padding: var(--space-xs) var(--space-md);
}

.nav-item__icon {
  font-size: 1.3rem;
}

.nav-item:hover {
  color: var(--text-secondary);
}

.nav-item.active {
  color: var(--text-accent);
}

/* ===== TOAST ===== */
.toast {
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  padding: var(--space-md) var(--space-xl);
  background: var(--bg-card);
  border: 1px solid var(--border-accent);
  border-radius: var(--radius-lg);
  color: var(--text-primary);
  font-size: 0.85rem;
  font-weight: 500;
  z-index: 200;
  opacity: 0;
  transition: all var(--duration-normal) var(--ease-spring);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  white-space: nowrap;
}

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

/* ===== LOADING SHIMMER ===== */
.shimmer {
  background: linear-gradient(90deg, var(--bg-card) 25%, var(--bg-card-hover) 50%, var(--bg-card) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-md);
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.loading-skeleton {
  padding: var(--space-xl);
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  margin-bottom: var(--space-lg);
}

.skeleton-line {
  height: 14px;
  margin-bottom: var(--space-md);
  border-radius: var(--radius-sm);
}

.skeleton-line:nth-child(1) { width: 85%; }
.skeleton-line:nth-child(2) { width: 95%; }
.skeleton-line:nth-child(3) { width: 70%; }
.skeleton-line:nth-child(4) { width: 90%; }
.skeleton-line:nth-child(5) { width: 60%; }

/* ===== RESPONSIVE ===== */
@media (max-width: 520px) {
  .onboarding__logo {
    font-size: 2rem;
  }

  .onboarding__question {
    font-size: 1.25rem;
  }

  .categories {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-sm);
  }

  .category-card {
    padding: var(--space-md);
  }

  .category-card__icon {
    font-size: 1.4rem;
  }

  .category-card__name {
    font-size: 0.85rem;
  }

  .category-card__desc {
    display: none;
  }

  .post-card {
    padding: var(--space-lg);
  }

  .platform-tab {
    font-size: 0.75rem;
    padding: var(--space-sm);
  }

  .main-screen, .history-screen {
    padding: var(--space-md);
    padding-bottom: 100px;
  }
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--border-subtle);
  border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-tertiary);
}

/* ===== SELECTION ===== */
::selection {
  background: rgba(255, 60, 172, 0.3);
  color: var(--text-primary);
}

/* ===== TODAY SCREEN ===== */
.today {
  padding: var(--space-lg) var(--space-md);
  padding-bottom: 100px;
  max-width: 480px;
  margin: 0 auto;
  animation: fadeInUp 0.5s ease;
}

.today__header {
  text-align: center;
  margin-bottom: var(--space-lg);
}

.today__date {
  font-size: 14px;
  color: var(--text-secondary);
  text-transform: capitalize;
  margin-bottom: var(--space-xs);
}

.today__greeting {
  font-size: 28px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.today__card {
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  margin-bottom: var(--space-lg);
  border: 1px solid var(--border-subtle);
  animation: fadeInUp 0.6s ease 0.1s both;
}

.today__card-category {
  font-size: 20px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: var(--space-sm);
}

.today__card-subcategory {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: var(--space-md);
}

.today__education {
  background: rgba(255, 255, 255, 0.03);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  margin-bottom: var(--space-md);
}

.today__education-why {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: var(--space-sm);
}

.today__education-trigger,
.today__education-effect {
  font-size: 13px;
  color: var(--text-tertiary);
  padding: var(--space-xs) 0;
}

.today__generate-btn {
  width: 100%;
  padding: var(--space-md) var(--space-lg);
  background: var(--accent-gradient);
  color: white;
  border: none;
  border-radius: var(--radius-md);
  font-size: 16px;
  font-weight: 600;
  font-family: var(--font-primary);
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: var(--accent-glow);
}

.today__generate-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 60px rgba(255, 60, 172, 0.3);
}

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

/* Week grid */
.today__week {
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  border-radius: var(--radius-lg);
  padding: var(--space-md);
  margin-bottom: var(--space-md);
  border: 1px solid var(--border-subtle);
  animation: fadeInUp 0.6s ease 0.2s both;
}

.today__week-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: var(--space-sm);
  text-align: center;
}

.today__week-grid {
  display: flex;
  justify-content: space-between;
  gap: var(--space-xs);
  margin-bottom: var(--space-sm);
}

.week-day {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: var(--space-sm) var(--space-xs);
  border-radius: var(--radius-md);
  flex: 1;
  transition: all 0.2s;
}

.week-day__name {
  font-size: 11px;
  color: var(--text-tertiary);
  font-weight: 500;
}

.week-day__icon {
  font-size: 20px;
}

.week-day--today {
  background: var(--accent-gradient-subtle);
  border: 1px solid var(--border-accent);
}

.week-day--today .week-day__name {
  color: var(--text-accent);
  font-weight: 700;
}

.today__week-legend {
  font-size: 11px;
  color: var(--text-tertiary);
  text-align: center;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: var(--space-xs);
}

.today__custom-btn {
  width: 100%;
  padding: var(--space-md);
  background: var(--bg-glass);
  color: var(--text-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 500;
  font-family: var(--font-primary);
  cursor: pointer;
  transition: all 0.2s;
  animation: fadeInUp 0.6s ease 0.3s both;
}

.today__custom-btn:hover {
  background: var(--bg-glass-hover);
  color: var(--text-primary);
  border-color: var(--border-accent);
}

/* ===== POST CARD EDUCATION BLOCK ===== */
.post-card__education {
  margin: var(--space-sm) 0;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--border-subtle);
  background: rgba(255, 255, 255, 0.02);
}

.post-card__edu-header {
  padding: var(--space-sm) var(--space-md);
  font-size: 13px;
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: color 0.2s;
  user-select: none;
}

.post-card__edu-header:hover {
  color: var(--text-primary);
}

.post-card__edu-arrow {
  transition: transform 0.3s;
  font-size: 12px;
}

.post-card__education.expanded .post-card__edu-arrow {
  transform: rotate(90deg);
}

.post-card__edu-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
  padding: 0 var(--space-md);
}

.post-card__education.expanded .post-card__edu-body {
  max-height: 300px;
  padding: var(--space-sm) var(--space-md) var(--space-md);
}

.post-card__edu-why {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: var(--space-xs);
}

.post-card__edu-trigger,
.post-card__edu-effect {
  font-size: 12px;
  color: var(--text-tertiary);
  padding: 2px 0;
}

/* ===== ANIMATION ===== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
