:root {
  --bg-deep: #0b0d13;
  --bg-surface: #131722;
  --bg-elevated: #1a2030;
  --bg-card: rgba(24, 30, 44, 0.82);
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-glow: rgba(245, 158, 11, 0.38);
  --text-primary: #f5f3ef;
  --text-secondary: #a8b0c2;
  --text-muted: #6e778c;
  --accent-amber: #f59e0b;
  --accent-rose: #ec4899;
  --accent-emerald: #10b981;
  --accent-violet: #8b5cf6;
  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-pill: 999px;
  --shadow-soft: 0 20px 45px rgba(0, 0, 0, 0.45);
}

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

body {
  font-family: "Pretendard Variable", "Pretendard", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background:
    radial-gradient(circle at 12% 8%, rgba(245, 158, 11, 0.13), transparent 38%),
    radial-gradient(circle at 86% 14%, rgba(139, 92, 246, 0.14), transparent 42%),
    radial-gradient(circle at 50% 95%, rgba(236, 72, 153, 0.08), transparent 45%),
    var(--bg-deep);
  color: var(--text-primary);
  min-height: 100vh;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

.app-shell {
  max-width: 1220px;
  margin: 0 auto;
  padding: 28px 20px 80px;
}

/* Topbar */
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 26px;
  flex-wrap: wrap;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-badge {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.24), rgba(139, 92, 246, 0.28));
  border: 1px solid rgba(255, 255, 255, 0.14);
  display: grid;
  place-items: center;
  font-size: 1.4rem;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.brand h1 {
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.brand p {
  font-size: 0.84rem;
  color: var(--text-secondary);
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border-radius: var(--radius-pill);
  padding: 9px 16px;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid var(--border-subtle);
  background: var(--bg-elevated);
  color: var(--text-primary);
  transition: all 0.18s ease;
  text-decoration: none;
}

.btn:hover {
  transform: translateY(-1px);
  border-color: rgba(255, 255, 255, 0.24);
}

.btn-primary {
  background: linear-gradient(135deg, #f59e0b, #ea580c);
  color: #101218;
  border-color: transparent;
  font-weight: 700;
}

.btn-primary:hover {
  filter: brightness(1.07);
}

.status-pill {
  font-size: 0.78rem;
  color: var(--text-secondary);
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.28);
}

/* Moment Hero */
.hero-card {
  position: relative;
  border-radius: 24px;
  padding: 28px;
  background: linear-gradient(145deg, rgba(28, 34, 52, 0.92), rgba(17, 21, 33, 0.95));
  border: 1px solid rgba(255, 255, 255, 0.11);
  box-shadow: var(--shadow-soft);
  margin-bottom: 28px;
  overflow: hidden;
}

.hero-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.moment-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  font-weight: 700;
  color: #fbbf24;
  background: rgba(245, 158, 11, 0.14);
  border: 1px solid rgba(245, 158, 11, 0.3);
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  margin-bottom: 10px;
}

.hero-title {
  font-size: 1.55rem;
  font-weight: 800;
  letter-spacing: -0.025em;
  margin-bottom: 6px;
}

.hero-sub {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.moment-switcher {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.moment-chip {
  font-size: 0.78rem;
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-subtle);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.16s ease;
}

.moment-chip.active,
.moment-chip:hover {
  background: rgba(245, 158, 11, 0.18);
  color: #fde68a;
  border-color: rgba(245, 158, 11, 0.45);
}

.hero-picks {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.hero-pick-item {
  background: rgba(11, 13, 19, 0.58);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 16px;
  padding: 15px 16px;
  cursor: pointer;
  transition: all 0.18s ease;
}

.hero-pick-item:hover {
  border-color: var(--border-glow);
  transform: translateY(-2px);
}

.hero-pick-domain {
  font-size: 0.75rem;
  color: #fbbf24;
  font-weight: 700;
  margin-bottom: 4px;
}

.hero-pick-title {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.hero-pick-desc {
  font-size: 0.83rem;
  color: var(--text-secondary);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Filter Console (2-Axis) */
.filter-console {
  background: rgba(19, 23, 34, 0.78);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-bottom: 24px;
  backdrop-filter: blur(12px);
}

.filter-row-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.domain-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.domain-tab {
  padding: 8px 15px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-subtle);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-secondary);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.16s ease;
}

.domain-tab.active {
  background: var(--text-primary);
  color: var(--bg-deep);
  border-color: var(--text-primary);
}

.search-box {
  flex: 1;
  min-width: 230px;
  max-width: 360px;
  position: relative;
}

.search-box input {
  width: 100%;
  padding: 9px 14px 9px 36px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-subtle);
  background: rgba(9, 11, 17, 0.75);
  color: var(--text-primary);
  font-size: 0.88rem;
  outline: none;
}

.search-box input:focus {
  border-color: var(--accent-amber);
}

.search-icon {
  position: absolute;
  left: 13px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.85rem;
  opacity: 0.65;
}

.axis-label {
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 9px;
  font-weight: 700;
}

.mood-chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.mood-chip {
  padding: 7px 13px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-subtle);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-secondary);
  font-size: 0.83rem;
  cursor: pointer;
  transition: all 0.16s ease;
}

.mood-chip:hover {
  border-color: rgba(255, 255, 255, 0.22);
  color: var(--text-primary);
}

.mood-chip.active {
  background: rgba(139, 92, 246, 0.22);
  border-color: rgba(139, 92, 246, 0.6);
  color: #ede9fe;
  font-weight: 600;
}

.active-mood-banner {
  margin-top: 12px;
  padding: 10px 14px;
  border-radius: 12px;
  background: rgba(139, 92, 246, 0.11);
  border: 1px solid rgba(139, 92, 246, 0.26);
  font-size: 0.85rem;
  color: #ddd6fe;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

/* Cards Grid */
.results-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
  color: var(--text-secondary);
  font-size: 0.86rem;
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
  gap: 18px;
}

.taste-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.taste-card:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 255, 255, 0.22);
  box-shadow: var(--shadow-soft);
}

.card-meta-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.domain-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  font-size: 0.76rem;
  font-weight: 700;
}

.domain-music { background: rgba(245, 158, 11, 0.16); color: #fcd34d; }
.domain-movie { background: rgba(236, 72, 153, 0.16); color: #f9a8d4; }
.domain-book  { background: rgba(16, 185, 129, 0.16); color: #6ee7b7; }
.domain-bible { background: rgba(139, 92, 246, 0.18); color: #c4b5fd; }

.rating-stars {
  font-size: 0.8rem;
  color: #fbbf24;
  font-weight: 700;
}

.card-title {
  font-size: 1.18rem;
  font-weight: 800;
  letter-spacing: -0.015em;
  line-height: 1.35;
}

.card-creator {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: -6px;
}

.card-oneliner {
  font-size: 0.92rem;
  color: #e5e7eb;
}

.card-quote {
  font-size: 0.82rem;
  font-style: italic;
  color: var(--text-secondary);
  padding-left: 11px;
  border-left: 2px solid rgba(245, 158, 11, 0.45);
}

.card-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: auto;
  padding-top: 6px;
}

.mini-tag {
  font-size: 0.74rem;
  padding: 3px 9px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-secondary);
}

/* Modal / Drawer */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(4, 6, 12, 0.78);
  backdrop-filter: blur(6px);
  display: none;
  justify-content: center;
  align-items: center;
  padding: 20px;
  z-index: 100;
}

.modal-backdrop.open {
  display: flex;
}

.modal-panel {
  background: #141926;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 24px;
  max-width: 760px;
  width: 100%;
  max-height: 88vh;
  overflow-y: auto;
  padding: 30px;
  box-shadow: var(--shadow-soft);
  position: relative;
}

.modal-close {
  position: sticky;
  top: 0;
  float: right;
  background: rgba(255, 255, 255, 0.08);
  border: none;
  color: var(--text-primary);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.05rem;
}

.memory-box {
  margin: 16px 0;
  padding: 14px 16px;
  border-radius: 14px;
  background: rgba(245, 158, 11, 0.08);
  border: 1px solid rgba(245, 158, 11, 0.24);
  font-size: 0.88rem;
  color: #fde68a;
}

.markdown-body {
  margin-top: 18px;
  color: #dde2ee;
  font-size: 0.95rem;
}

.markdown-body h1,
.markdown-body h2,
.markdown-body h3 {
  color: #fff;
  margin: 20px 0 8px;
  font-size: 1.08rem;
}

.markdown-body p,
.markdown-body ul,
.markdown-body ol {
  margin-bottom: 12px;
}

.markdown-body ul,
.markdown-body ol {
  padding-left: 20px;
}

.markdown-body blockquote {
  padding: 10px 14px;
  border-left: 3px solid var(--accent-amber);
  background: rgba(255, 255, 255, 0.04);
  border-radius: 0 10px 10px 0;
  margin-bottom: 14px;
  color: #fef3c7;
}

.flow-banner {
  margin-top: 20px;
  padding: 14px 16px;
  border-radius: 14px;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.3);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

/* Form & Lounge Stream */
.form-grid {
  display: grid;
  gap: 14px;
  margin-top: 16px;
}

.form-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.form-field label {
  display: block;
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-bottom: 5px;
  font-weight: 600;
}

.form-field input,
.form-field select,
.form-field textarea {
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--border-subtle);
  background: rgba(8, 10, 16, 0.8);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.9rem;
}

.lounge-list {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.lounge-item {
  padding: 14px 16px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
}

.lounge-meta {
  font-size: 0.76rem;
  color: #fbbf24;
  margin-bottom: 4px;
}

.empty-state {
  text-align: center;
  padding: 50px 20px;
  color: var(--text-secondary);
  border: 1px dashed var(--border-subtle);
  border-radius: var(--radius-lg);
}

@media (max-width: 680px) {
  .hero-card { padding: 20px; }
  .hero-title { font-size: 1.28rem; }
  .cards-grid { grid-template-columns: 1fr; }
  .form-row-2 { grid-template-columns: 1fr; }
  .modal-panel { padding: 22px 18px; }
}
