:root {
  --cream: #FDF6EE;
  --warm-white: #FFFBF7;
  --apricot: #E8C4A0;
  --caramel: #C4956A;
  --chocolate: #5C3D2E;
  --deep-brown: #3E2723;
  --gold: #D4A853;
  --gold-light: #F0D78C;
  --soft-blue: #A8D4E6;
  --shadow: rgba(92, 61, 46, 0.12);
  --shadow-deep: rgba(92, 61, 46, 0.22);
  --glass: rgba(255, 251, 247, 0.72);
  --glass-border: rgba(255, 255, 255, 0.6);
  --radius-sm: 16px;
  --radius-md: 24px;
  --radius-lg: 32px;
  --radius-full: 9999px;
  --font-serif: 'Noto Serif SC', 'Songti SC', serif;
  --font-sans: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, sans-serif;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: var(--font-sans);
  background: var(--cream);
  color: var(--chocolate);
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ── Background Orbs ── */
.bg-orbs {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.45;
  animation: float 8s ease-in-out infinite;
}

.orb-1 {
  width: 280px;
  height: 280px;
  background: var(--apricot);
  top: -80px;
  right: -60px;
}

.orb-2 {
  width: 220px;
  height: 220px;
  background: var(--gold-light);
  bottom: 30%;
  left: -80px;
  animation-delay: -3s;
}

.orb-3 {
  width: 180px;
  height: 180px;
  background: var(--soft-blue);
  bottom: -40px;
  right: 20%;
  animation-delay: -5s;
  opacity: 0.3;
}

@keyframes float {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-20px) scale(1.05); }
}

/* ── Layout ── */
.app {
  position: relative;
  z-index: 1;
  max-width: 480px;
  margin: 0 auto;
  min-height: 100dvh;
}

/* ── Header ── */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  background: var(--glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--glass-border);
}

.logo {
  display: flex;
  align-items: center;
  gap: 8px;
}

.logo-icon {
  font-size: 22px;
  line-height: 1;
}

.logo-text {
  font-family: var(--font-serif);
  font-size: 18px;
  font-weight: 600;
  color: var(--deep-brown);
  letter-spacing: 0.05em;
}

.logo-sub {
  font-size: 10px;
  color: var(--caramel);
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

/* ── Hero ── */
.hero {
  position: relative;
  margin: 16px 16px 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 3 / 4;
  box-shadow: 0 20px 60px var(--shadow-deep);
}

.hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 20%;
  display: block;
  transform: scale(1.02);
  transition: transform 6s ease;
}

.hero:hover .hero-image {
  transform: scale(1.06);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(62, 39, 35, 0.75) 0%,
    rgba(62, 39, 35, 0.2) 45%,
    transparent 70%
  );
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 28px 24px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: var(--radius-full);
  padding: 5px 14px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.9);
  letter-spacing: 0.08em;
  width: fit-content;
  margin-bottom: 12px;
}

.hero-name {
  font-family: var(--font-serif);
  font-size: 42px;
  font-weight: 700;
  color: #fff;
  line-height: 1.1;
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
  letter-spacing: 0.08em;
}

.hero-tagline {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.85);
  margin-top: 6px;
  letter-spacing: 0.05em;
}

.hero-breed {
  font-size: 12px;
  color: var(--gold-light);
  margin-top: 4px;
  letter-spacing: 0.06em;
}

/* ── Animal Tabs ── */
.animal-tabs {
  display: flex;
  gap: 10px;
  padding: 20px 16px 0;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.animal-tabs::-webkit-scrollbar { display: none; }

.animal-tab {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px 8px 8px;
  border-radius: var(--radius-full);
  border: 2px solid transparent;
  background: var(--warm-white);
  box-shadow: 0 4px 16px var(--shadow);
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: var(--font-sans);
  font-size: 14px;
  color: var(--chocolate);
}

.animal-tab.active {
  border-color: var(--caramel);
  background: linear-gradient(135deg, #FFF8F0, #FDE8D0);
  box-shadow: 0 6px 24px rgba(196, 149, 106, 0.3);
}

.hero-video {
  object-fit: cover;
  background: var(--deep-brown);
}

.animal-tab-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--apricot);
  flex-shrink: 0;
}

.gallery-item-video {
  width: 180px;
  position: relative;
}

.gallery-item-video video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.video-play-badge {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.85);
  color: var(--deep-brown);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  box-shadow: 0 4px 16px var(--shadow-deep);
  pointer-events: none;
}

.video-label {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 20px 10px 8px;
  background: linear-gradient(to top, rgba(62, 39, 35, 0.7), transparent);
  color: #fff;
  font-size: 11px;
  letter-spacing: 0.05em;
  pointer-events: none;
}

.lightbox-video {
  display: none;
  max-width: 92vw;
  max-height: 85dvh;
  border-radius: var(--radius-md);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.5);
  background: #000;
}

.lightbox.open .lightbox-video {
  transform: scale(1);
}

.animal-tab.coming-soon {
  opacity: 0.55;
  cursor: default;
}

/* ── Section ── */
.section {
  padding: 24px 16px 0;
}

.section-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}

.section-line {
  flex: 1;
  height: 1px;
  background: linear-gradient(to right, var(--apricot), transparent);
}

.section-title {
  font-family: var(--font-serif);
  font-size: 20px;
  font-weight: 600;
  color: var(--deep-brown);
  letter-spacing: 0.06em;
  white-space: nowrap;
}

.section-icon {
  font-size: 18px;
}

/* ── Description Card ── */
.desc-card {
  background: var(--warm-white);
  border-radius: var(--radius-md);
  padding: 24px;
  box-shadow: 0 8px 32px var(--shadow);
  border: 1px solid rgba(232, 196, 160, 0.4);
  position: relative;
  overflow: hidden;
}

.desc-card::before {
  content: '"';
  position: absolute;
  top: -10px;
  left: 16px;
  font-family: var(--font-serif);
  font-size: 80px;
  color: var(--apricot);
  opacity: 0.3;
  line-height: 1;
}

.desc-text {
  font-size: 15px;
  color: var(--chocolate);
  line-height: 1.85;
  position: relative;
  z-index: 1;
}

/* ── Trait Grid ── */
.trait-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.trait-card {
  background: var(--warm-white);
  border-radius: var(--radius-sm);
  padding: 18px 16px;
  box-shadow: 0 4px 20px var(--shadow);
  border: 1px solid rgba(232, 196, 160, 0.3);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.trait-card:active {
  transform: scale(0.97);
}

.trait-icon {
  font-size: 28px;
  margin-bottom: 8px;
  display: block;
}

.trait-title {
  font-family: var(--font-serif);
  font-size: 15px;
  font-weight: 600;
  color: var(--deep-brown);
  margin-bottom: 4px;
}

.trait-desc {
  font-size: 12px;
  color: var(--caramel);
  line-height: 1.5;
}

/* ── Stats ── */
.stats-card {
  background: linear-gradient(135deg, var(--deep-brown) 0%, #6B4C3B 100%);
  border-radius: var(--radius-md);
  padding: 24px;
  box-shadow: 0 12px 40px var(--shadow-deep);
}

.stats-title {
  font-family: var(--font-serif);
  font-size: 16px;
  color: var(--gold-light);
  letter-spacing: 0.1em;
  margin-bottom: 20px;
  text-align: center;
}

.stat-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.stat-row:last-child { margin-bottom: 0; }

.stat-label {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.75);
  width: 36px;
  flex-shrink: 0;
}

.stat-bar-wrap {
  flex: 1;
  height: 8px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.stat-bar {
  height: 100%;
  border-radius: var(--radius-full);
  background: linear-gradient(90deg, var(--caramel), var(--gold-light));
  width: 0;
  transition: width 1.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.stat-value {
  font-size: 13px;
  font-weight: 600;
  color: var(--gold-light);
  width: 32px;
  text-align: right;
  flex-shrink: 0;
}

/* ── Gallery ── */
.gallery-scroll {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding: 4px 16px 8px;
  margin: 0 -16px;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.gallery-scroll::-webkit-scrollbar { display: none; }

.gallery-item {
  flex-shrink: 0;
  width: 140px;
  aspect-ratio: 3 / 4;
  border-radius: var(--radius-sm);
  overflow: hidden;
  scroll-snap-align: start;
  box-shadow: 0 8px 24px var(--shadow);
  cursor: pointer;
  position: relative;
  transition: transform 0.3s ease;
}

.gallery-item:active {
  transform: scale(0.96);
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.gallery-item::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(62,39,35,0.3), transparent);
  opacity: 0;
  transition: opacity 0.3s;
}

.gallery-item:active::after { opacity: 1; }

/* ── Fun Facts ── */
.facts-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.fact-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: var(--warm-white);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  box-shadow: 0 4px 16px var(--shadow);
  border-left: 3px solid var(--caramel);
}

.fact-num {
  font-family: var(--font-serif);
  font-size: 20px;
  font-weight: 700;
  color: var(--apricot);
  line-height: 1;
  flex-shrink: 0;
  margin-top: 2px;
}

.fact-text {
  font-size: 14px;
  color: var(--chocolate);
  line-height: 1.6;
}

/* ── Footer ── */
.footer {
  text-align: center;
  padding: 32px 16px calc(24px + var(--safe-bottom));
  margin-top: 32px;
}

.footer-heart {
  font-size: 24px;
  animation: heartbeat 1.5s ease-in-out infinite;
  display: block;
  margin-bottom: 8px;
}

@keyframes heartbeat {
  0%, 100% { transform: scale(1); }
  15% { transform: scale(1.2); }
  30% { transform: scale(1); }
  45% { transform: scale(1.15); }
}

.footer-text {
  font-size: 12px;
  color: var(--caramel);
  letter-spacing: 0.08em;
}

/* ── Lightbox ── */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(30, 15, 10, 0.92);
  backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.lightbox.open {
  opacity: 1;
  pointer-events: all;
}

.lightbox-img {
  max-width: 92vw;
  max-height: 85dvh;
  border-radius: var(--radius-md);
  object-fit: contain;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.5);
  transform: scale(0.9);
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.lightbox.open .lightbox-img {
  transform: scale(1);
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #fff;
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.lightbox-close:active {
  background: rgba(255, 255, 255, 0.3);
}

.lightbox-nav {
  position: absolute;
  bottom: calc(24px + var(--safe-bottom));
  display: flex;
  gap: 8px;
}

.lightbox-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.35);
  border: none;
  cursor: pointer;
  transition: all 0.3s;
  padding: 0;
}

.lightbox-dot.active {
  background: var(--gold-light);
  width: 24px;
  border-radius: 4px;
}

/* ── Animations ── */
.fade-up {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── Scroll hint ── */
.scroll-hint {
  text-align: center;
  font-size: 11px;
  color: var(--caramel);
  letter-spacing: 0.1em;
  padding: 8px 0 0;
  opacity: 0.7;
}
