:root {
  --bg: #FDF8F3;
  --card-bg: #FFFFFF;
  --text-primary: #5D4E37;
  --text-secondary: #8B7355;
  --accent: #C4A77D;
  --accent-hover: #B8956A;

  /* Category colors */
  --cat-getting-to-know: #D4956A;
  --cat-deep-talk: #8B7BA8;
  --cat-future-plans: #6A9E8B;
  --cat-fun-playful: #D4A843;
  --cat-love-language: #C47A8A;
  --cat-wild-card: #7A9EC4;
}

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

body {
  background: var(--bg);
  color: var(--text-primary);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ── Screens ── */
.screen {
  display: none;
  width: 100%;
  min-height: 100vh;
  padding: 24px 20px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.screen.active {
  display: flex;
}

/* ── Landing ── */
#screen-landing {
  text-align: center;
  gap: 16px;
}

.app-title {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.5px;
}

.app-subtitle {
  font-size: 1rem;
  color: var(--text-secondary);
  max-width: 280px;
}

.btn-start {
  margin-top: 16px;
  padding: 16px 48px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 50px;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
}

.btn-start:hover {
  background: var(--accent-hover);
}

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

/* ── Category Selection ── */
#screen-category {
  gap: 20px;
  max-width: 480px;
  margin: 0 auto;
}

.screen-title {
  font-size: 1.4rem;
  font-weight: 700;
  text-align: center;
}

.screen-hint {
  font-size: 0.9rem;
  color: var(--text-secondary);
  text-align: center;
}

.category-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  width: 100%;
}

.btn-category {
  padding: 12px 20px;
  border: 2px solid transparent;
  border-radius: 50px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.15s, transform 0.1s, border-color 0.15s;
  color: #fff;
}

.btn-category:active {
  transform: scale(0.96);
}

.btn-category[data-cat="random"]           { background: var(--accent); }
.btn-category[data-cat="getting-to-know"]  { background: var(--cat-getting-to-know); }
.btn-category[data-cat="deep-talk"]        { background: var(--cat-deep-talk); }
.btn-category[data-cat="future-plans"]     { background: var(--cat-future-plans); }
.btn-category[data-cat="fun-playful"]      { background: var(--cat-fun-playful); }
.btn-category[data-cat="love-language"]    { background: var(--cat-love-language); }
.btn-category[data-cat="wild-card"]        { background: var(--cat-wild-card); }

/* ── Card View ── */
#screen-card {
  gap: 20px;
  position: relative;
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: 400px;
}

.btn-change-category {
  background: none;
  border: 1.5px solid var(--accent);
  color: var(--accent);
  border-radius: 50px;
  padding: 6px 14px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.btn-change-category:hover {
  background: var(--accent);
  color: #fff;
}

.card-area {
  width: 100%;
  max-width: 400px;
  position: relative;
  height: 280px;
  perspective: 1000px;
  overflow: hidden;
}

.card {
  position: absolute;
  inset: 0;
  background: var(--card-bg);
  border-radius: 20px;
  box-shadow: 0 4px 24px rgba(93, 78, 55, 0.12);
  padding: 32px 28px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  cursor: grab;
  user-select: none;
  transition: transform 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              opacity 0.35s ease;
  will-change: transform, opacity;
}

.card:active {
  cursor: grabbing;
}

.card.swipe-left {
  transform: translateX(-120%) rotate(-8deg);
  opacity: 0;
}

.card.swipe-right {
  transform: translateX(120%) rotate(8deg);
  opacity: 0;
}

.card.enter-from-right {
  transform: translateX(120%) rotate(8deg);
  opacity: 0;
}

.card.enter-from-left {
  transform: translateX(-120%) rotate(-8deg);
  opacity: 0;
}

.card.enter-active {
  transform: translateX(0) rotate(0);
  opacity: 1;
}

.card-category-chip {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 700;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  align-self: flex-start;
}

.chip-random           { background: var(--accent); }
.chip-getting-to-know  { background: var(--cat-getting-to-know); }
.chip-deep-talk        { background: var(--cat-deep-talk); }
.chip-future-plans     { background: var(--cat-future-plans); }
.chip-fun-playful      { background: var(--cat-fun-playful); }
.chip-love-language    { background: var(--cat-love-language); }
.chip-wild-card        { background: var(--cat-wild-card); }

.card-question {
  font-size: 1.2rem;
  font-weight: 500;
  line-height: 1.55;
  color: var(--text-primary);
  flex: 1;
  display: flex;
  align-items: center;
}

/* ── Nav buttons ── */
.card-nav {
  display: flex;
  gap: 16px;
  align-items: center;
}

.btn-nav {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 2px solid var(--accent);
  background: none;
  color: var(--accent);
  font-size: 1.3rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, color 0.15s, transform 0.1s;
}

.btn-nav:hover {
  background: var(--accent);
  color: #fff;
}

.btn-nav:active {
  transform: scale(0.93);
}

.btn-nav:disabled {
  opacity: 0.3;
  cursor: default;
  pointer-events: none;
}

.swipe-hint {
  font-size: 0.8rem;
  color: var(--text-secondary);
  text-align: center;
}

/* ── Responsive ── */
@media (min-width: 480px) {
  .app-title { font-size: 3rem; }
  .card-area { height: 300px; }
  .card-question { font-size: 1.3rem; }
}
