/*
 * Reverie Design System
 * Inter / deep purple / jewel tone moods
 */

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

/* ─────────────────────────────────────────────────────────────────────────────
   DESIGN TOKENS
   ───────────────────────────────────────────────────────────────────────────── */
:root {
  /* Backgrounds */
  --bg:          #0e0a14;
  --bg-card:     #1a1425;
  --bg-elevated: #221830;
  --bg-section:  #140f1e;

  /* Borders */
  --border:      rgba(255, 255, 255, 0.07);
  --separator:   rgba(255, 255, 255, 0.07);

  /* Text */
  --text:           #f0ece8;
  --text-muted:     #8a7f8d;
  --text-secondary: #8a7f8d;
  --text-tertiary:  #5a4f5e;

  /* Accent — soft purple */
  --accent:       #c084fc;
  --accent-hover: #d09afe;
  --accent-glow:  rgba(192, 132, 252, 0.2);

  /* Semantic */
  --destructive: #f87171;
  --success:     #4ade80;

  /* Mood colours — borders / labels / glows ONLY, never backgrounds */
  --mood-nostalgic:   #9b59b6;
  --mood-peaceful:    #1abc9c;
  --mood-warm:        #e67e22;
  --mood-euphoric:    #3498db;
  --mood-pumped:      #e74c3c;
  --mood-melancholic: #5b8dd9;
  --mood-restless:    #7f8c8d;
  --mood-brooding:    #8e44ad;

  /* Legacy compatibility */
  --glass-bg:       rgba(255, 255, 255, 0.04);
  --glass-bg-hover: rgba(255, 255, 255, 0.07);
  --surface:        rgba(255, 255, 255, 0.04);
  --surface-solid:  #1a1425;

  /* Diary */
  --diary-paper: #1a1425;
  --diary-lines: rgba(192, 132, 252, 0.07);
  --diary-text:  #f0ece8;
}

/* ─────────────────────────────────────────────────────────────────────────────
   RESET
   ───────────────────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background-color: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-size: 16px;
  line-height: 1.6;
}

/* ─────────────────────────────────────────────────────────────────────────────
   TYPOGRAPHY
   ───────────────────────────────────────────────────────────────────────────── */
.serif { font-family: 'Inter', sans-serif; font-weight: 600; }

.diary-font {
  font-family: 'Inter', sans-serif;
  font-size: 1rem;
  line-height: 2;
  font-weight: 400;
}

/* ─────────────────────────────────────────────────────────────────────────────
   GLASS / CARD PANEL
   ───────────────────────────────────────────────────────────────────────────── */
.glass-panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
}

/* ─────────────────────────────────────────────────────────────────────────────
   BUTTONS
   ───────────────────────────────────────────────────────────────────────────── */
.btn-primary {
  background: var(--accent);
  color: #0e0a14;
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 15px;
  padding: 11px 24px;
  border: none;
  border-radius: 980px;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.1s ease, box-shadow 0.2s ease;
  text-decoration: none;
  display: inline-block;
  text-align: center;
  line-height: 1.3;
  white-space: nowrap;
  letter-spacing: -0.01em;
}

.btn-primary:hover {
  background: var(--accent-hover);
  box-shadow: 0 0 20px rgba(192, 132, 252, 0.3);
}

.btn-primary:active { transform: scale(0.97); }

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  font-size: 15px;
  padding: 11px 24px;
  border: 1px solid var(--border);
  border-radius: 980px;
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
  text-decoration: none;
  display: inline-block;
  text-align: center;
  line-height: 1.3;
  white-space: nowrap;
}

.btn-ghost:hover {
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.04);
}

.btn-spotify {
  background: #1DB954;
  color: #fff;
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 15px;
  padding: 12px 24px;
  border: none;
  border-radius: 980px;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.1s ease;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-align: center;
  white-space: nowrap;
}

.btn-spotify:hover { background: #1ed760; }
.btn-spotify:active { transform: scale(0.97); }

/* ─────────────────────────────────────────────────────────────────────────────
   INPUTS
   ───────────────────────────────────────────────────────────────────────────── */
.input-glass {
  width: 100%;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  color: var(--text);
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  padding: 12px 16px;
  border-radius: 10px;
  outline: none;
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
  -webkit-appearance: none;
  appearance: none;
}

.input-glass:focus {
  border-color: var(--accent);
  background: rgba(255, 255, 255, 0.06);
  box-shadow: 0 0 0 3px rgba(192, 132, 252, 0.1);
}

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

select.input-glass {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%238a7f8d' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
  background-position: right 12px center;
  background-repeat: no-repeat;
  background-size: 16px;
  padding-right: 40px;
  cursor: pointer;
}

/* ─────────────────────────────────────────────────────────────────────────────
   DIARY
   ───────────────────────────────────────────────────────────────────────────── */
.diary-container {
  background-color: var(--diary-paper);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 2rem 2.5rem 2rem 3.5rem;
  position: relative;
  background-image: repeating-linear-gradient(
    transparent, transparent 31px,
    var(--diary-lines) 31px, var(--diary-lines) 32px
  );
  background-attachment: local;
}

.diary-container::before {
  content: '';
  position: absolute;
  top: 0; bottom: 0; left: 2.2rem;
  width: 2px;
  background: rgba(192, 132, 252, 0.15);
  z-index: 1;
}

.diary-textarea {
  width: 100%;
  min-height: 200px;
  background: transparent;
  border: none;
  outline: none;
  resize: vertical;
  color: var(--diary-text);
  font-family: 'Inter', sans-serif;
  font-size: 1rem;
  position: relative;
  z-index: 2;
  line-height: 32px;
  padding-top: 6px;
}

/* ─────────────────────────────────────────────────────────────────────────────
   REVEAL ANIMATIONS
   ───────────────────────────────────────────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(10px);
  transition:
    opacity  0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94),
    transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.reveal.visible { opacity: 1; transform: translateY(0); }

/* ─────────────────────────────────────────────────────────────────────────────
   CARD HOVER — accent glow
   ───────────────────────────────────────────────────────────────────────────── */
.card-hover {
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.card-hover:hover {
  border-color: rgba(192, 132, 252, 0.22);
  box-shadow: 0 0 0 1px rgba(192, 132, 252, 0.07), 0 4px 24px rgba(192, 132, 252, 0.07);
}

/* ─────────────────────────────────────────────────────────────────────────────
   UTILS
   ───────────────────────────────────────────────────────────────────────────── */
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.text-accent  { color: var(--accent); }
.text-muted   { color: var(--text-muted); }
