:root {
  --cream: #fdf6ee;
  --warm: #f5e6d3;
  --blush: #e8b4a0;
  --rose: #c97b63;
  --brown: #7a4a3a;
  --dark: #2d1a14;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Heebo", sans-serif;
  background: linear-gradient(180deg, #fdf6ee 0%, #f5ddd0 100%);
  min-height: 100vh;
  color: var(--dark);
  overflow-x: hidden;
}

/* ===== NAV ===== */
nav {
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 2.5rem;
  background: rgba(253, 246, 238, 0.95);
  border-bottom: 1px solid rgba(232, 180, 160, 0.3);
  transition: background 0.4s ease;
}

.nav-logo {
  font-family: "Secular One", sans-serif;
  font-size: 1.5rem;
  color: var(--rose);
  text-decoration: none;
}

.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
}

.nav-links a {
  text-decoration: none;
  color: var(--brown);
  font-size: 0.95rem;
  font-weight: 500;
  position: relative;
  padding-bottom: 4px;
}

.nav-links a::after {
  content: "";
  position: absolute;
  bottom: 0;
  right: 0;
  width: 0;
  height: 2px;
  background: var(--rose);
  transition: width 0.3s ease;
}

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
  left: 0;
  right: auto;
}

.nav-links a:hover {
  color: var(--rose);
}

.nav-links a.active {
  color: var(--rose);
  font-weight: 700;
  pointer-events: none;
}

.nav-btn {
  background: var(--rose);
  color: white;
  border: none;
  padding: 0.55rem 1.4rem;
  border-radius: 50px;
  font-family: "Heebo", sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  animation: pulse-btn 2s ease-in-out infinite;
}

.nav-btn:hover {
  background: var(--brown);
}

@keyframes pulse-btn {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.06);
  }
}

.hamburger {
  display: none;
  background: none;
  border: none;
  font-size: 1.6rem;
  cursor: pointer;
  color: var(--brown);
}

/* ===== QUIZ PAGE ===== */
#quiz-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6rem 2rem 3rem;
}

/* ===== INTRO ===== */
.quiz-intro {
  text-align: center;
  max-width: 500px;
}

.intro-icon {
  font-size: 4rem;
  margin-bottom: 1rem;
  animation: bounce 1.5s ease-in-out infinite;
}

@keyframes bounce {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-12px);
  }
}

.intro-title {
  font-family: "Secular One", sans-serif;
  font-size: 2.5rem;
  color: var(--dark);
  margin-bottom: 0.8rem;
}

.intro-sub {
  font-size: 1rem;
  color: var(--brown);
  font-weight: 300;
  margin-bottom: 2rem;
  line-height: 1.7;
}

.btn-start {
  background: var(--rose);
  color: white;
  border: none;
  padding: 1rem 3rem;
  border-radius: 50px;
  font-family: "Heebo", sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(201, 123, 99, 0.35);
}

.btn-start:hover {
  background: var(--brown);
}

/* ===== QUIZ LAYOUT ===== */
.quiz-layout {
  display: flex;
  gap: 2rem;
  align-items: flex-start;
  max-width: 960px;
  width: 100%;
}

/* ===== SIDE PANEL ===== */
.side-panel {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  width: 210px;
  min-width: 210px;
  position: sticky;
  top: 6rem;
}

/* ===== PREVIEW CARD ===== */
.preview-card {
  background: linear-gradient(135deg, #c97b63 0%, #7a4a3a 100%);
  border-radius: 20px;
  padding: 1.3rem;
  box-shadow: 0 8px 24px rgba(122, 74, 58, 0.25);
}

.preview-card-title {
  font-family: "Secular One", sans-serif;
  font-size: 0.9rem;
  color: white;
  margin-bottom: 0.8rem;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.25);
}

.preview-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0;
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.9);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  animation: slideIn 0.4s ease;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(-8px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.preview-empty {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.5);
  text-align: center;
  font-weight: 300;
  font-style: italic;
}

/* ===== TIP CARD ===== */
.tip-card {
  background: linear-gradient(135deg, #f5e6d3 0%, #e8c4a8 100%);
  border-radius: 20px;
  padding: 1.3rem;
  box-shadow: 0 8px 24px rgba(122, 74, 58, 0.12);
  border: 1px solid rgba(232, 180, 160, 0.4);
}

.tip-card-title {
  font-family: "Secular One", sans-serif;
  font-size: 0.9rem;
  color: var(--brown);
  margin-bottom: 0.6rem;
}

.tip-text {
  font-size: 0.85rem;
  color: var(--brown);
  line-height: 1.6;
  font-weight: 400;
  transition: opacity 0.4s ease;
}

.tip-text.fade {
  opacity: 0;
}

/* ===== QUIZ MAIN ===== */
.quiz-main {
  flex: 1;
}

.progress-bar {
  background: var(--warm);
  border-radius: 50px;
  height: 8px;
  margin-bottom: 0.6rem;
  overflow: hidden;
}

.progress-fill {
  background: linear-gradient(90deg, var(--blush), var(--rose));
  height: 100%;
  border-radius: 50px;
  transition: width 0.4s ease;
}

.progress-text {
  font-size: 0.85rem;
  color: var(--brown);
  margin-bottom: 1.5rem;
  font-weight: 300;
}

.question-card {
  background: white;
  border-radius: 28px;
  padding: 2.5rem 2rem;
  box-shadow: 0 8px 40px rgba(122, 74, 58, 0.12);
  text-align: center;
}

.question-emoji {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.question-text {
  font-family: "Secular One", sans-serif;
  font-size: 1.4rem;
  color: var(--dark);
  margin-bottom: 1.8rem;
  line-height: 1.4;
}

.options {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.option-btn {
  background: var(--cream);
  border: 2px solid var(--blush);
  color: var(--dark);
  padding: 0.9rem 1.5rem;
  border-radius: 50px;
  font-family: "Heebo", sans-serif;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  text-align: right;
  transition: all 0.2s;
}

.option-btn:hover {
  border-color: var(--rose);
  background: var(--warm);
  transform: translateX(-4px);
}

.option-btn.selected {
  border-color: var(--rose);
  border-width: 3px;
  background: var(--warm);
  color: var(--rose);
  font-weight: 700;
}

/* ===== RESULT ===== */
.quiz-result {
  width: 100%;
  max-width: 800px;
}

.result-card {
  background: white;
  border-radius: 28px;
  overflow: hidden;
  box-shadow: 0 8px 40px rgba(122, 74, 58, 0.15);
  display: flex;
}

.result-card img {
  width: 320px;
  min-width: 320px;
  height: 400px;
  object-fit: cover;
}

.result-info {
  padding: 2.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  justify-content: center;
}

.result-tag {
  background: var(--warm);
  color: var(--rose);
  font-size: 0.85rem;
  font-weight: 700;
  padding: 0.3rem 0.9rem;
  border-radius: 50px;
  display: inline-block;
}

.result-info h2 {
  font-family: "Secular One", sans-serif;
  font-size: 2rem;
  color: var(--dark);
}

.result-breed {
  font-size: 0.95rem;
  color: var(--rose);
  font-weight: 500;
}
.result-location {
  font-size: 0.9rem;
  color: var(--brown);
  font-weight: 300;
}
.result-desc {
  font-size: 0.95rem;
  color: var(--brown);
  line-height: 1.6;
  font-weight: 300;
}

.result-btns {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.btn-swipe {
  background: var(--rose);
  color: white;
  padding: 0.7rem 1.5rem;
  border-radius: 50px;
  text-decoration: none;
  font-family: "Heebo", sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
}

.btn-swipe:hover {
  background: var(--brown);
}

.btn-retry {
  background: var(--warm);
  color: var(--brown);
  border: 1px solid var(--blush);
  padding: 0.7rem 1.5rem;
  border-radius: 50px;
  font-family: "Heebo", sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
}

.btn-retry:hover {
  border-color: var(--rose);
  color: var(--rose);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 700px) {
  nav {
    padding: 1rem 1.2rem;
  }

  .nav-links {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%;
    right: 0;
    left: 0;
    z-index: 9998;
    background: rgba(253, 246, 238, 0.85);
    padding: 1rem 1.5rem;
    gap: 1rem;
    border-bottom: 1px solid rgba(232, 180, 160, 0.3);
    backdrop-filter: blur(8px);
    opacity: 0;
    transform: translateY(-12px);
    pointer-events: none;
    transition:
      opacity 0.3s ease,
      transform 0.3s ease;
  }

  .nav-links.open {
    opacity: 1;
    transform: translateY(0);
    pointer-events: all;
  }

  .nav-btn {
    display: none;
  }
  .hamburger {
    display: block;
  }

  .quiz-layout {
    flex-direction: column;
  }

  .side-panel {
    width: 100%;
    min-width: unset;
    position: static;
    flex-direction: row;
  }

  .preview-card,
  .tip-card {
    flex: 1;
  }

  .result-card {
    flex-direction: column;
  }
  .result-card img {
    width: 100%;
    min-width: unset;
    height: 250px;
  }
  .result-info {
    padding: 1.5rem;
  }
}

/* ===== כלב רץ ===== */
.running-dog {
  position: fixed;
  bottom: 1.5rem;
  font-size: 2rem;
  opacity: 0;
  pointer-events: none;
  z-index: 999;
  transition: none;
}

.running-dog.run-right {
  animation: runRight 1.8s ease forwards;
}

.running-dog.run-left {
  animation: runLeft 1.8s ease forwards;
}

@keyframes runRight {
  0% {
    right: -60px;
    opacity: 1;
    transform: scaleX(1);
  }
  100% {
    right: 110%;
    opacity: 1;
    transform: scaleX(1);
  }
}

@keyframes runLeft {
  0% {
    left: -60px;
    opacity: 1;
    transform: scaleX(-1);
  }
  100% {
    left: 110%;
    opacity: 1;
    transform: scaleX(-1);
  }
}

/* ===== מצב לילה ===== */
.dark-mode-btn {
  position: fixed;
  bottom: 2rem;
  left: 2rem;
  z-index: 9999;
  background: white;
  border: 1px solid var(--blush);
  border-radius: 50%;
  width: 44px;
  height: 44px;
  font-size: 1.2rem;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(122, 74, 58, 0.2);
  transition: all 0.2s;
}

.dark-mode-btn:hover {
  background: var(--warm);
}

body.dark {
  --cream: #2d1f18;
  --warm: #3a2820;
  --blush: #7a4a3a;
  --rose: #c97b63;
  --brown: #e8b4a0;
  --dark: #fdf6ee;
  background: linear-gradient(180deg, #2d1f18 0%, #3a2820 100%);
}

body.dark nav {
  background: rgba(45, 31, 24, 0.95);
  border-bottom-color: rgba(122, 74, 58, 0.4);
}

body.dark .step,
body.dark .review-card,
body.dark .why-card,
body.dark .why-card,
body.dark .dog-card,
body.dark .question-card,
body.dark .result-card,
body.dark .matches-list,
body.dark .match-item,
body.dark .chat-header,
body.dark .chat-input,
body.dark .profile-card {
  background: #3a2820;
  color: var(--dark);
}

body.dark .message.received {
  background: #4a3028;
  color: var(--dark);
}

body.dark .option-btn {
  background: #4a3028;
  color: var(--dark);
  border-color: var(--blush);
}
