: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%, #f5e0c8 100%);
  color: var(--dark);
  overflow-x: hidden;
}

/* ===== NAV ===== */
nav {
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  transition:
    background 0.4s ease,
    box-shadow 0.4s ease;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 2.5rem;
  background: rgba(253, 246, 238, 0.95);
}

.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;
}

.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;
}

.nav-btn:hover {
  background: var(--brown);
}

.hamburger {
  display: none;
  background: none;
  border: none;
  font-size: 1.6rem;
  cursor: pointer;
  color: var(--brown);
}

/* ===== SWIPE ===== */
#swipe {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: 5rem;
}

.card-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

/* ===== FILTER ===== */
.filter-bar {
  width: 360px;
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.filter-select {
  flex: 1;
  padding: 0.5rem 0.4rem;
  border-radius: 12px;
  border: 1px solid var(--blush);
  background: white;
  font-family: "Heebo", sans-serif;
  font-size: 0.8rem;
  color: var(--brown);
  outline: none;
  cursor: pointer;
  text-align: center;
}

.filter-select:focus {
  border-color: var(--rose);
}

/* ===== DOG CARD ===== */
.dog-card {
  width: 360px;
  background: white;
  border-radius: 28px;
  box-shadow: 0 16px 60px rgba(122, 74, 58, 0.25);
  overflow: hidden;
  transition:
    transform 0.4s ease,
    opacity 0.4s ease;
}

.dog-card.swipe-right {
  transform: translateX(120%) rotate(20deg);
  opacity: 0;
}

.dog-card.swipe-left {
  transform: translateX(-120%) rotate(-20deg);
  opacity: 0;
}

.dog-image-wrapper {
  width: 100%;
  height: 380px;
  position: relative;
  background: var(--warm);
  display: flex;
  align-items: center;
  justify-content: center;
}

#dog-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: none;
}

.loading-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.8rem;
  color: var(--brown);
}

.loading-state span {
  font-size: 3rem;
  animation: pulse 1.2s ease-in-out infinite;
}

.loading-state p {
  font-size: 0.95rem;
  font-weight: 300;
}

@keyframes pulse {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.2);
  }
}

.error-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.8rem;
  color: var(--brown);
}

.error-state span {
  font-size: 3rem;
}
.error-state p {
  font-size: 0.95rem;
  font-weight: 300;
}

.dog-info {
  padding: 1.5rem;
}

.dog-header {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin-bottom: 0.4rem;
}

.dog-header h2 {
  font-family: "Secular One", sans-serif;
  font-size: 1.6rem;
  color: var(--dark);
}

.dog-age {
  background: var(--warm);
  color: var(--rose);
  font-size: 0.85rem;
  font-weight: 700;
  padding: 0.2rem 0.7rem;
  border-radius: 50px;
}

.dog-breed {
  font-size: 0.9rem;
  color: var(--rose);
  font-weight: 500;
  margin-bottom: 0.3rem;
}
.dog-gender {
  font-size: 0.85rem;
  color: var(--brown);
  font-weight: 300;
  margin-bottom: 0.3rem;
}
.dog-location {
  font-size: 0.85rem;
  color: var(--brown);
  font-weight: 300;
  margin-bottom: 0.8rem;
}
.dog-desc {
  font-size: 0.9rem;
  color: var(--brown);
  line-height: 1.6;
  font-weight: 300;
}

/* ===== SWIPE BUTTONS ===== */
.swipe-btns {
  display: flex;
  gap: 2rem;
  align-items: center;
}

.btn-skip {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: 2px solid #e0e0e0;
  background: white;
  font-size: 1.5rem;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.btn-skip:hover {
  border-color: #e05a5a;
  color: #e05a5a;
}

.btn-like {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  border: none;
  background: var(--rose);
  font-size: 1.8rem;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(201, 123, 99, 0.4);
}

.btn-like:hover {
  background: var(--brown);
}

/* ===== TOAST ===== */
.toast {
  position: fixed;
  bottom: 2.5rem;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  padding: 0.9rem 2rem;
  border-radius: 50px;
  font-family: "Heebo", sans-serif;
  font-size: 1rem;
  font-weight: 700;
  opacity: 0;
  transition:
    opacity 0.3s ease,
    transform 0.3s ease;
  pointer-events: none;
  white-space: nowrap;
  z-index: 200;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.toast-match {
  background: #f0faf0;
  color: #2d7a2d;
  border: 1px solid #a8d8a8;
}

.toast-no-match {
  background: var(--warm);
  color: var(--brown);
  border: 1px solid var(--blush);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 600px) {
  nav {
    padding: 1rem 1.2rem;
  }

  .nav-links {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%;
    right: 0;
    left: 0;
    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;
  }

  .dog-card {
    width: 320px;
  }
  .dog-image-wrapper {
    height: 320px;
  }
  .filter-bar {
    width: 320px;
  }
}

/* ===== צביעת כרטיס בסווייפ ===== */
.dog-card.card-like {
  background: #f0faf0;
  box-shadow: 0 8px 40px rgba(46, 160, 67, 0.25);
}

.dog-card.card-skip {
  background: #fff0f0;
  box-shadow: 0 8px 40px rgba(224, 90, 90, 0.25);
}

/* ===== קו תחתון נע בתפריט ===== */
.nav-links a {
  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;
}

/* ===== כפתור פועם ===== */
@keyframes pulse-btn {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.06);
  }
}

.nav-btn {
  animation: pulse-btn 2s ease-in-out infinite;
}

.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);
}



/* ===== לוגו + כפתור לילה ===== */
.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* ===== מצב לילה ===== */
.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);
}


.btn-surprise {
  background: var(--warm);
  border: 2px solid var(--blush);
  color: var(--brown);
  padding: 0.6rem 1.4rem;
  border-radius: 50px;
  font-family: 'Heebo', sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  margin-top: 0.5rem;
}

.btn-surprise:hover {
  border-color: var(--rose);
  color: var(--rose);
}

.toast-surprise {
  background: var(--warm);
  color: var(--brown);
  border: 1px solid var(--blush);
}