/* ============================================================
   BREEDSNAP — Production Design System & Styling
   ============================================================ */

:root {
  /* Theme Palette */
  --bg-deep:         hsl(232, 28%, 7%);
  --bg-surface:      hsl(232, 22%, 11%);
  --bg-glass:        hsla(232, 22%, 14%, 0.72);
  --bg-glass-card:   hsla(232, 20%, 18%, 0.55);
  --border-glass:    hsla(0, 0%, 100%, 0.09);
  --border-subtle:   hsla(0, 0%, 100%, 0.05);

  --accent:          hsl(34, 98%, 54%);
  --accent-light:    hsl(36, 100%, 65%);
  --accent-glow:     hsla(34, 98%, 54%, 0.35);
  --coral:           hsl(12, 85%, 62%);
  --emerald:         hsl(158, 64%, 48%);
  --emerald-glow:    hsla(158, 64%, 48%, 0.35);
  --sky:             hsl(204, 88%, 62%);
  --lavender:        hsl(268, 60%, 68%);

  --text-primary:    hsl(0, 0%, 97%);
  --text-secondary:  hsl(232, 12%, 70%);
  --text-muted:      hsl(232, 12%, 48%);

  /* Typography */
  --font-display:    'Outfit', system-ui, -apple-system, sans-serif;
  --font-body:       'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;

  /* Geometry & Radii */
  --radius-xs: 6px;
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;

  /* Curves */
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-out:    cubic-bezier(0.16, 1, 0.3, 1);
}

/* -- Reset & Global --------------------------------------------------- */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  background: var(--bg-deep);
  color: var(--text-primary);
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    url('hero-bg.jpg') center/cover no-repeat,
    radial-gradient(ellipse at 80% 20%, hsla(34, 98%, 54%, 0.12), transparent 50%),
    radial-gradient(ellipse at 20% 80%, hsla(268, 60%, 68%, 0.08), transparent 50%),
    var(--bg-deep);
  opacity: 0.4;
  z-index: 0;
  pointer-events: none;
}

/* -- Paw Particles ---------------------------------------------------- */
.paw-particles {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.paw-particle {
  position: absolute;
  font-size: 1.2rem;
  opacity: 0;
  animation: floatPaw 14s linear infinite;
}

@keyframes floatPaw {
  0% {
    opacity: 0;
    transform: translateY(110vh) rotate(0deg) scale(0.6);
  }
  10% { opacity: 0.16; }
  90% { opacity: 0.16; }
  100% {
    opacity: 0;
    transform: translateY(-10vh) rotate(360deg) scale(1.1);
  }
}

/* -- Main App Container ----------------------------------------------- */
.app {
  position: relative;
  z-index: 1;
  max-width: 760px;
  margin: 0 auto;
  padding: 24px 20px 80px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* -- Header ----------------------------------------------------------- */
.header {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 28px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border-subtle);
}

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

.header__mascot-wrap {
  position: relative;
}

.header__mascot {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--accent);
  box-shadow: 0 0 20px var(--accent-glow);
  display: block;
}

.header__mascot-badge {
  position: absolute;
  bottom: -2px;
  right: -4px;
  background: var(--bg-surface);
  border: 1px solid var(--border-glass);
  border-radius: 50%;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
}

.header__title {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  line-height: 1.1;
}

.header__title--accent {
  background: linear-gradient(135deg, var(--accent), var(--coral));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.header__tagline {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 600;
  letter-spacing: 0.6px;
  text-transform: uppercase;
}

.header__actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* -- Server Status Pill ----------------------------------------------- */
.server-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-glass);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-glass);
  padding: 6px 14px;
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-secondary);
  letter-spacing: 0.3px;
}

.server-status__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: hsl(45, 90%, 50%);
  animation: statusPulse 2s ease-in-out infinite;
}

.server-status.connected .server-status__dot {
  background: var(--emerald);
  box-shadow: 0 0 10px var(--emerald-glow);
}

.server-status.connected {
  color: hsl(158, 70%, 75%);
  border-color: hsla(158, 64%, 48%, 0.25);
}

@keyframes statusPulse {
  0%, 100% { opacity: 0.6; transform: scale(0.95); }
  50% { opacity: 1; transform: scale(1.1); }
}

/* -- Buttons & Icon Buttons ------------------------------------------- */
.icon-btn {
  background: var(--bg-glass);
  border: 1px solid var(--border-glass);
  color: var(--text-primary);
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
  transition: all 0.25s var(--ease-out);
}

.icon-btn:hover {
  background: var(--bg-glass-card);
  border-color: var(--accent);
  transform: translateY(-2px);
  color: var(--accent-light);
}

.icon-btn__badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: var(--accent);
  color: white;
  font-size: 0.65rem;
  font-weight: 700;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 26px;
  border: none;
  border-radius: var(--radius-md);
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s var(--ease-out);
  position: relative;
}

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

.btn--primary {
  background: linear-gradient(135deg, var(--accent), var(--coral));
  color: white;
  box-shadow: 0 4px 20px var(--accent-glow);
}

.btn--primary:hover {
  box-shadow: 0 6px 28px var(--accent-glow);
  transform: translateY(-2px);
}

.btn--secondary {
  background: var(--bg-glass);
  backdrop-filter: blur(12px);
  color: var(--text-primary);
  border: 1px solid var(--border-glass);
}

.btn--secondary:hover {
  border-color: hsla(0, 0%, 100%, 0.25);
  transform: translateY(-2px);
  background: var(--bg-glass-card);
}

.btn--accent {
  background: linear-gradient(135deg, var(--accent), hsl(25, 95%, 48%));
  color: white;
  box-shadow: 0 4px 25px var(--accent-glow);
}

.btn--accent:hover {
  box-shadow: 0 8px 36px var(--accent-glow);
  transform: translateY(-3px);
}

.btn--large {
  padding: 16px 36px;
  font-size: 1.05rem;
  border-radius: var(--radius-lg);
}

.btn-text {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 0.82rem;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: var(--radius-xs);
  transition: color 0.2s;
}

.btn-text:hover { color: var(--coral); }

/* -- Upload Zone ------------------------------------------------------ */
.upload-zone {
  width: 100%;
  animation: fadeSlideUp 0.5s var(--ease-out) both;
}

.upload-zone__inner {
  background: var(--bg-glass);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  border: 2px dashed hsla(0, 0%, 100%, 0.12);
  border-radius: var(--radius-xl);
  padding: 44px 28px;
  text-align: center;
  transition: all 0.35s var(--ease-out);
  cursor: pointer;
}

.upload-zone__inner:hover,
.upload-zone__inner.dragover {
  border-color: var(--accent);
  background: hsla(34, 40%, 14%, 0.6);
  transform: scale(1.01);
  box-shadow: 0 0 45px var(--accent-glow);
}

.upload-zone__icon-glow {
  display: inline-flex;
  margin-bottom: 18px;
}

.upload-zone__icon {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  background: linear-gradient(135deg, hsla(34, 98%, 54%, 0.18), hsla(12, 85%, 62%, 0.12));
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid hsla(34, 98%, 54%, 0.2);
  animation: iconBob 3.5s ease-in-out infinite;
}

@keyframes iconBob {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-7px); }
}

.upload-zone__heading {
  font-family: var(--font-display);
  font-size: 1.55rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.upload-zone__sub {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 26px;
}

.upload-zone__actions {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

/* -- Sample Dog Chips ------------------------------------------------- */
.sample-dogs {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding-top: 22px;
  border-top: 1px solid var(--border-subtle);
}

.sample-dogs__label {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

.sample-dogs__chips {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
}

.sample-chip {
  background: hsla(232, 20%, 22%, 0.5);
  border: 1px solid var(--border-glass);
  border-radius: 100px;
  padding: 8px 16px;
  font-family: var(--font-body);
  font-size: 0.86rem;
  font-weight: 500;
  color: var(--text-primary);
  cursor: pointer;
  transition: all 0.25s var(--ease-out);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.sample-chip:hover {
  background: hsla(34, 98%, 54%, 0.18);
  border-color: var(--accent);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 4px 18px var(--accent-glow);
}

/* -- Preview ---------------------------------------------------------- */
.preview {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  animation: fadeSlideUp 0.4s var(--ease-spring) both;
}

.preview__image-wrap {
  position: relative;
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: 0 12px 50px hsla(0, 0%, 0%, 0.5);
  border: 2px solid var(--border-glass);
}

.preview__image {
  display: block;
  max-width: 100%;
  max-height: 400px;
  object-fit: cover;
  border-radius: var(--radius-xl);
}

.preview__clear {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: hsla(0, 0%, 0%, 0.65);
  backdrop-filter: blur(8px);
  border: 1px solid hsla(0, 0%, 100%, 0.15);
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s var(--ease-out);
}

.preview__clear:hover {
  background: hsl(0, 75%, 52%);
  transform: scale(1.1);
}

/* -- Loading State ---------------------------------------------------- */
.loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 60px 0;
  text-align: center;
  animation: fadeSlideUp 0.4s var(--ease-out) both;
}

.loading__spinner {
  width: 88px;
  height: 88px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle, hsla(34, 98%, 54%, 0.2), transparent 70%);
}

.loading__paw {
  font-size: 3rem;
  animation: pawBounce 0.9s ease-in-out infinite;
}

@keyframes pawBounce {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50%      { transform: translateY(-18px) rotate(18deg); }
}

.loading__title {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 700;
}

.loading__text {
  font-size: 0.92rem;
  color: var(--text-secondary);
  max-width: 420px;
}

/* -- Results Card ----------------------------------------------------- */
.results {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  animation: fadeSlideUp 0.6s var(--ease-spring) both;
}

.results__card {
  width: 100%;
  background: var(--bg-glass);
  backdrop-filter: blur(32px);
  -webkit-backdrop-filter: blur(32px);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-xl);
  padding: 36px 32px;
  box-shadow: 0 16px 60px hsla(0, 0%, 0%, 0.4);
}

/* Breed Banner */
.breed-banner {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.breed-banner__main {
  display: flex;
  align-items: center;
  gap: 16px;
}

.breed-banner__emoji {
  font-size: 3.2rem;
  line-height: 1;
  animation: emojiPop 0.5s var(--ease-spring) both;
}

@keyframes emojiPop {
  0%   { transform: scale(0) rotate(-20deg); opacity: 0; }
  100% { transform: scale(1) rotate(0deg); opacity: 1; }
}

.breed-banner__name {
  font-family: var(--font-display);
  font-size: 2.1rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--accent-light), var(--coral));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.15;
}

.breed-banner__origin {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.breed-banner__meta {
  display: flex;
  align-items: center;
  gap: 10px;
}

.confidence-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: hsla(158, 64%, 48%, 0.15);
  color: hsl(158, 70%, 75%);
  border: 1px solid hsla(158, 64%, 48%, 0.3);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 100px;
}

.confidence-pill__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--emerald);
  box-shadow: 0 0 8px var(--emerald-glow);
}

.btn-pronounce {
  background: var(--bg-glass-card);
  border: 1px solid var(--border-glass);
  color: var(--text-primary);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-pronounce:hover {
  background: var(--accent);
  color: white;
  transform: scale(1.08);
}

/* Temperament Tags */
.temperament-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.tag {
  background: hsla(34, 98%, 54%, 0.14);
  color: var(--accent-light);
  border: 1px solid hsla(34, 98%, 54%, 0.25);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 100px;
  letter-spacing: 0.3px;
}

.results__summary {
  font-size: 0.98rem;
  line-height: 1.65;
  color: var(--text-secondary);
  margin-bottom: 26px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border-subtle);
}

/* -- Rating Meters ---------------------------------------------------- */
.ratings-section {
  margin-bottom: 26px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--border-subtle);
}

.section-subtitle {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-muted);
  margin-bottom: 14px;
}

.ratings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
}

.rating-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.rating-item__header {
  display: flex;
  justify-content: space-between;
  font-size: 0.82rem;
  font-weight: 600;
}

.rating-item__label { color: var(--text-secondary); }
.rating-item__score { color: var(--accent-light); }

.rating-item__bar {
  height: 7px;
  background: hsla(232, 20%, 25%, 0.6);
  border-radius: 10px;
  overflow: hidden;
}

.rating-item__fill {
  height: 100%;
  border-radius: 10px;
  background: linear-gradient(90deg, var(--accent), var(--coral));
  transition: width 0.8s var(--ease-out);
}

/* -- Care & Guidance Matrix ------------------------------------------- */
.care-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
  margin-bottom: 26px;
}

.care-card {
  background: var(--bg-glass-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 16px;
  transition: all 0.25s var(--ease-out);
}

.care-card:hover {
  border-color: hsla(0, 0%, 100%, 0.18);
  transform: translateY(-2px);
}

.care-card__header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.care-card__icon { font-size: 1.2rem; }

.care-card__title {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-muted);
  font-weight: 700;
}

.care-card__content {
  font-size: 0.88rem;
  color: var(--text-primary);
  line-height: 1.45;
}

/* Health Alert Card */
.health-card {
  background: hsla(12, 85%, 62%, 0.08);
  border: 1px solid hsla(12, 85%, 62%, 0.25);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-bottom: 26px;
}

.health-card__title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--coral);
  margin-bottom: 6px;
}

.health-card__content {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.45;
}

/* -- Fun Facts -------------------------------------------------------- */
.fun-facts {
  padding-top: 16px;
}

.fun-facts__title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.fun-fact-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid hsla(0, 0%, 100%, 0.04);
}

.fun-fact-item:last-child { border-bottom: none; }

.fun-fact-item__number {
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--coral));
  color: white;
  font-size: 0.75rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.fun-fact-item__text {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* -- Footer Actions --------------------------------------------------- */
.results__footer-actions {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
  width: 100%;
}

/* -- History Modal / Drawer ------------------------------------------- */
.history-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  justify-content: flex-end;
}

.history-modal__backdrop {
  position: absolute;
  inset: 0;
  background: hsla(0, 0%, 0%, 0.6);
  backdrop-filter: blur(4px);
}

.history-modal__drawer {
  position: relative;
  width: 100%;
  max-width: 420px;
  background: var(--bg-surface);
  border-left: 1px solid var(--border-glass);
  height: 100%;
  padding: 24px;
  display: flex;
  flex-direction: column;
  z-index: 1;
  animation: drawerSlide 0.35s var(--ease-out) both;
}

@keyframes drawerSlide {
  0%   { transform: translateX(100%); }
  100% { transform: translateX(0); }
}

.history-modal__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 16px;
}

.history-modal__title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
}

.history-modal__actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.history-modal__list {
  overflow-y: auto;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.history-item {
  background: var(--bg-glass-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 12px;
  display: flex;
  gap: 12px;
  align-items: center;
  cursor: pointer;
  transition: all 0.2s var(--ease-out);
}

.history-item:hover {
  border-color: var(--accent);
  transform: translateX(-3px);
}

.history-item__thumb {
  width: 50px;
  height: 50px;
  border-radius: var(--radius-sm);
  object-fit: cover;
}

.history-item__name {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
}

.history-item__time {
  font-size: 0.74rem;
  color: var(--text-muted);
}

.history-empty {
  text-align: center;
  color: var(--text-muted);
  padding: 40px 0;
  font-size: 0.9rem;
}

/* -- Toast ------------------------------------------------------------ */
.toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: hsl(232, 25%, 16%);
  border: 1px solid var(--accent);
  color: white;
  padding: 14px 28px;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  font-weight: 500;
  box-shadow: 0 10px 40px hsla(0, 0%, 0%, 0.6);
  z-index: 2000;
  opacity: 0;
  transition: all 0.35s var(--ease-out);
  max-width: 90vw;
  text-align: center;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* -- Keyframe Animations ---------------------------------------------- */
@keyframes fadeSlideUp {
  0%   { opacity: 0; transform: translateY(20px); }
  100% { opacity: 1; transform: translateY(0); }
}

/* -- Responsive Tweaks ------------------------------------------------ */
@media (max-width: 600px) {
  .header {
    flex-direction: column;
    align-items: flex-start;
  }

  .header__actions {
    width: 100%;
    justify-content: space-between;
  }

  .upload-zone__inner {
    padding: 32px 18px;
  }

  .results__card {
    padding: 24px 18px;
  }

  .breed-banner__name {
    font-size: 1.6rem;
  }

  .ratings-grid, .care-grid {
    grid-template-columns: 1fr;
  }

  .btn--large {
    width: 100%;
    justify-content: center;
  }
}

/* -- Inline Spinner --------------------------------------------------- */
.spinner-inline {
  width: 16px;
  height: 16px;
  border: 2px solid hsla(0, 0%, 100%, 0.3);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  display: inline-block;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ============================================================
   OFFICIAL PDF REPORT DOCUMENT STYLES
   (Used for html2pdf rendering and high-res export)
   ============================================================ */
.pdf-report-document {
  position: absolute;
  left: -9999px;
  top: 0;
  width: 790px;
  background: #ffffff;
  color: #1e293b;
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  padding: 32px 36px;
  box-sizing: border-box;
  line-height: 1.45;
}

/* PDF Header */
.pdf-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 2px solid #ea580c;
  padding-bottom: 16px;
  margin-bottom: 20px;
}

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

.pdf-logo-icon {
  font-size: 32px;
  line-height: 1;
}

.pdf-title {
  font-family: 'Outfit', sans-serif;
  font-size: 26px;
  font-weight: 800;
  color: #0f172a;
  margin: 0;
  letter-spacing: -0.5px;
}

.pdf-title-accent {
  color: #ea580c;
}

.pdf-subtitle {
  font-size: 11px;
  color: #64748b;
  margin: 2px 0 0 0;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  font-weight: 600;
}

.pdf-meta {
  text-align: right;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 3px;
}

.pdf-badge {
  background: #fff7ed;
  color: #c2410c;
  border: 1px solid #ffedd5;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.pdf-date {
  font-size: 11px;
  color: #475569;
  font-weight: 500;
}

.pdf-model {
  font-size: 10px;
  color: #94a3b8;
}

/* PDF Hero / Dog Profile */
.pdf-hero {
  display: flex;
  gap: 20px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 20px;
}

.pdf-photo-wrap {
  flex-shrink: 0;
  width: 140px;
  height: 140px;
  border-radius: 10px;
  overflow: hidden;
  border: 2px solid #ea580c;
  background: #0f172a;
}

.pdf-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.pdf-hero-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.pdf-match-row {
  display: flex;
  gap: 10px;
  margin-bottom: 6px;
  flex-wrap: wrap;
}

.pdf-confidence-badge {
  background: #ecfdf5;
  color: #047857;
  border: 1px solid #a7f3d0;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 6px;
}

.pdf-origin-badge {
  background: #f1f5f9;
  color: #334155;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 6px;
}

.pdf-breed-name {
  font-family: 'Outfit', sans-serif;
  font-size: 24px;
  font-weight: 800;
  color: #0f172a;
  margin: 0 0 8px 0;
}

.pdf-temperaments {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}

.pdf-pill {
  background: #ffedd5;
  color: #9a3412;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 12px;
}

.pdf-summary {
  font-size: 12px;
  color: #334155;
  line-height: 1.5;
  margin: 0;
}

/* PDF Section */
.pdf-section {
  margin-bottom: 18px;
}

.pdf-section-title {
  font-family: 'Outfit', sans-serif;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.7px;
  color: #475569;
  margin: 0 0 10px 0;
  border-bottom: 1px solid #e2e8f0;
  padding-bottom: 4px;
}

/* Ratings */
.pdf-ratings-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 18px;
}

.pdf-rating-row {
  display: flex;
  align-items: center;
  font-size: 11px;
}

.pdf-rating-label {
  width: 170px;
  color: #1e293b;
  font-size: 11px;
}

.pdf-rating-bar-wrap {
  flex: 1;
  height: 6px;
  background: #e2e8f0;
  border-radius: 6px;
  overflow: hidden;
  margin: 0 10px;
}

.pdf-rating-bar {
  height: 100%;
  background: #ea580c;
  border-radius: 6px;
}

.pdf-rating-score {
  width: 70px;
  text-align: right;
  font-weight: 700;
  color: #0f172a;
  font-size: 10px;
}

.pdf-stars {
  color: #f59e0b;
}

/* Care Grid */
.pdf-care-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.pdf-care-box {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 8px 10px;
}

.pdf-care-title {
  font-size: 11px;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 3px;
}

.pdf-care-text {
  font-size: 11px;
  color: #475569;
  line-height: 1.4;
  margin: 0;
}

/* Health Box */
.pdf-health-box {
  background: #fef2f2;
  border: 1px solid #fee2e2;
  border-left: 4px solid #ef4444;
  border-radius: 8px;
  padding: 10px 12px;
  margin-bottom: 16px;
}

.pdf-health-title {
  font-size: 11px;
  font-weight: 700;
  color: #991b1b;
  margin-bottom: 3px;
}

.pdf-health-text {
  font-size: 11px;
  color: #7f1d1d;
  line-height: 1.4;
  margin: 0;
}

/* Fun Facts List */
.pdf-facts-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.pdf-fact-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 11px;
  line-height: 1.4;
}

.pdf-fact-num {
  background: #ea580c;
  color: #ffffff;
  font-weight: 700;
  font-size: 10px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
}

.pdf-fact-text {
  color: #334155;
  flex: 1;
}

/* PDF Footer */
.pdf-footer {
  margin-top: 20px;
  padding-top: 12px;
  border-top: 1px dashed #cbd5e1;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.pdf-footer-note {
  font-size: 10px;
  color: #64748b;
  max-width: 520px;
}

.pdf-footer-stamp {
  font-family: 'Outfit', sans-serif;
  font-size: 10px;
  font-weight: 700;
  color: #ea580c;
  background: #fff7ed;
  border: 1px solid #ffedd5;
  padding: 4px 8px;
  border-radius: 6px;
}

/* ============================================================
   PRINT STYLES (@media print)
   ============================================================ */
@media print {
  body {
    background: #ffffff !important;
    color: #000000 !important;
  }
  
  body::before,
  .paw-particles,
  .header,
  .upload-zone,
  .loading,
  .results__footer-actions,
  .history-modal,
  .toast {
    display: none !important;
  }

  .app {
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  .results {
    display: block !important;
  }

  .results__card {
    background: #ffffff !important;
    color: #000000 !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
  }

  .breed-banner__name {
    color: #000000 !important;
  }

  .btn-pronounce {
    display: none !important;
  }
}
