/* ================================================================
   CAT RESCUE SHELTER — style.css
   ================================================================ */

/* ---- Google Fonts ---- */
@import url('https://fonts.googleapis.com/css2?family=Fredoka+One&family=Nunito:wght@400;600;700;800&display=swap');

/* ---- CSS Variables ---- */
:root {
  /* Palette */
  --pink:       #FFB5C8;
  --pink-light: #FFD6E3;
  --pink-dark:  #E8809A;
  --lavender:   #C9B8FF;
  --lavender-light: #E5DEFF;
  --mint:       #B5EAD7;
  --mint-dark:  #7DD6B5;
  --peach:      #FFD9B5;
  --peach-dark: #FFBA7A;
  --cream:      #FFF8F0;
  --cream-dark: #F5EDE0;
  --purple:     #9D8FD4;

  /* Neutrals */
  --white:      #FFFFFF;
  --gray-100:   #F9F5FF;
  --gray-200:   #EEE8F8;
  --gray-300:   #D9D0EE;
  --gray-400:   #B0A3CC;
  --gray-600:   #7A6E9A;
  --gray-800:   #3D3560;

  /* Layout */
  --sidebar-w:  200px;
  --inspector-w: 280px;
  --header-h:   64px;

  /* Shadows */
  --shadow-sm:  0 2px 8px rgba(100,80,160,0.10);
  --shadow-md:  0 4px 16px rgba(100,80,160,0.15);
  --shadow-lg:  0 8px 32px rgba(100,80,160,0.20);

  /* Radii */
  --radius-sm:  8px;
  --radius-md:  14px;
  --radius-lg:  20px;
  --radius-xl:  28px;
}

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

body {
  font-family: 'Nunito', sans-serif;
  background: var(--gray-100);
  color: var(--gray-800);
  min-height: 100vh;
  overflow-x: hidden;
}

h1, h2, h3 { font-family: 'Fredoka One', cursive; }

button { cursor: pointer; border: none; background: none; font-family: 'Nunito', sans-serif; }

/* ---- Utilities ---- */
.hidden { display: none !important; }

/* ================================================================
   HEADER
   ================================================================ */
#app-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--header-h);
  background: linear-gradient(135deg, var(--pink), var(--lavender));
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  box-shadow: var(--shadow-md);
  z-index: 100;
}

.header-left { display: flex; align-items: center; gap: 10px; }
.header-logo { font-size: 28px; }
.header-title {
  font-family: 'Fredoka One', cursive;
  font-size: 26px;
  color: white;
  text-shadow: 0 2px 4px rgba(0,0,0,0.15);
}

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

.cat-count-badge {
  background: rgba(255,255,255,0.35);
  color: white;
  font-weight: 700;
  font-size: 14px;
  padding: 4px 12px;
  border-radius: 20px;
}

/* ================================================================
   LAYOUT
   ================================================================ */
#app-layout {
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr var(--inspector-w);
  grid-template-rows: 1fr;
  min-height: calc(100vh - var(--header-h));
  margin-top: var(--header-h);
}

/* ---- SIDEBAR ---- */
#sidebar {
  background: var(--white);
  border-right: 2px solid var(--gray-200);
  padding: 16px 12px;
  overflow-y: auto;
}

.sidebar-title {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--gray-400);
  margin-bottom: 10px;
  padding-left: 8px;
}

#room-nav { display: flex; flex-direction: column; gap: 6px; }

.room-btn {
  display: grid;
  grid-template-columns: 24px 1fr auto;
  align-items: center;
  gap: 8px;
  padding: 10px 10px;
  border-radius: var(--radius-md);
  background: transparent;
  color: var(--gray-600);
  font-size: 14px;
  font-weight: 600;
  transition: background 0.15s, color 0.15s;
  text-align: left;
}

.room-btn:hover {
  background: var(--lavender-light);
  color: var(--gray-800);
}

.room-btn.active {
  background: linear-gradient(135deg, var(--lavender), var(--pink-light));
  color: var(--gray-800);
  box-shadow: var(--shadow-sm);
}

.room-icon { font-size: 18px; }
.room-name { font-size: 13px; }

.room-count {
  font-size: 11px;
  background: var(--gray-200);
  color: var(--gray-600);
  padding: 2px 6px;
  border-radius: 10px;
  font-weight: 700;
}

.room-btn.active .room-count {
  background: rgba(255,255,255,0.5);
}

/* ---- MAIN VIEW ---- */
#main-view {
  padding: 24px;
  overflow-y: auto;
  background: var(--gray-100);
}

#room-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 2px solid var(--gray-200);
}

#room-header-icon { font-size: 32px; }

#room-header-name {
  font-size: 24px;
  color: var(--gray-800);
}

#room-header-desc {
  font-size: 13px;
  color: var(--gray-400);
  margin-left: auto;
}

#cat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 16px;
}

.empty-message {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 20px;
  color: var(--gray-400);
}

.empty-icon { font-size: 48px; display: block; margin-bottom: 12px; }
.empty-sub { font-size: 13px; margin-top: 6px; }

/* ---- INSPECTOR ---- */
#inspector {
  background: var(--white);
  border-left: 2px solid var(--gray-200);
  padding: 20px 16px;
  overflow-y: auto;
}

.inspector-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: var(--gray-300);
  gap: 12px;
  text-align: center;
}

.inspector-empty-icon { font-size: 48px; }

#inspector-cat-preview {
  display: flex;
  justify-content: center;
  margin-bottom: 12px;
}

#inspector-cat-name {
  font-size: 22px;
  text-align: center;
  color: var(--gray-800);
  margin-bottom: 4px;
}

.personality-badge {
  text-align: center;
  font-size: 13px;
  color: var(--purple);
  font-weight: 700;
  margin-bottom: 14px;
  background: var(--lavender-light);
  padding: 3px 10px;
  border-radius: 12px;
  display: inline-block;
  width: 100%;
}

/* Stat bars */
.stat-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; }

.stat-row {
  display: grid;
  grid-template-columns: 72px 1fr 36px;
  align-items: center;
  gap: 8px;
}

.stat-label { font-size: 12px; font-weight: 700; color: var(--gray-600); }
.stat-value { font-size: 12px; font-weight: 700; color: var(--gray-600); text-align: right; }

.stat-bar-wrap {
  background: var(--gray-200);
  border-radius: 6px;
  height: 10px;
  overflow: hidden;
}

.stat-bar {
  height: 100%;
  border-radius: 6px;
  transition: width 0.4s ease;
}

.hunger-bar  { background: linear-gradient(90deg, var(--peach-dark), var(--peach)); }
.thirst-bar  { background: linear-gradient(90deg, #74C0FC, #A5D8FF); }
.happy-bar   { background: linear-gradient(90deg, var(--pink-dark), var(--pink)); }
.energy-bar  { background: linear-gradient(90deg, var(--mint-dark), var(--mint)); }
.fur-bar     { background: linear-gradient(90deg, var(--purple), var(--lavender)); }

/* Inspector badges */
.inspector-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 14px;
  justify-content: center;
}

.badge {
  font-size: 12px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 12px;
  background: var(--lavender-light);
  color: var(--purple);
}

.badge-warn  { background: #FFF3CD; color: #856404; }
.badge-success { background: #D4EDDA; color: #155724; }

/* Inspector actions */
.action-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 14px;
}

.inspector-meta {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 12px;
  border-top: 1px solid var(--gray-200);
}

/* ================================================================
   BUTTONS
   ================================================================ */
.btn {
  padding: 10px 18px;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 700;
  font-family: 'Nunito', sans-serif;
  transition: transform 0.1s, box-shadow 0.1s, opacity 0.1s;
}

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

.btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none; }

.btn-primary {
  background: linear-gradient(135deg, var(--lavender), var(--pink));
  color: white;
  box-shadow: var(--shadow-sm);
}

.btn-primary:hover:not(:disabled) { box-shadow: var(--shadow-md); }

.btn-secondary {
  background: var(--gray-200);
  color: var(--gray-800);
}

.btn-secondary:hover:not(:disabled) { background: var(--gray-300); }

.btn-success {
  background: linear-gradient(135deg, var(--mint-dark), var(--mint));
  color: var(--gray-800);
  box-shadow: var(--shadow-sm);
}

.btn-success:hover:not(:disabled) { box-shadow: var(--shadow-md); }

.btn-danger {
  background: linear-gradient(135deg, #FF6B6B, #FF9999);
  color: white;
}

.btn-full { width: 100%; text-align: center; }

.btn-large { font-size: 18px; padding: 14px 28px; }

/* ================================================================
   CAT CARD
   ================================================================ */
.cat-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 16px 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s;
  border: 2px solid transparent;
  position: relative;
}

.cat-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.cat-card.selected {
  border-color: var(--lavender);
  box-shadow: 0 0 0 3px var(--lavender-light), var(--shadow-md);
}

.cat-card.is-asleep .cat-art { animation: sleepBob 3s ease-in-out infinite; }
.cat-card.is-sick { filter: saturate(0.4); }

.cat-card-name {
  font-weight: 800;
  font-size: 13px;
  color: var(--gray-800);
  text-align: center;
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cat-card-stats {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.mini-stat {
  display: flex;
  gap: 4px;
  align-items: center;
}

.mini-stat-bar-wrap {
  flex: 1;
  background: var(--gray-200);
  border-radius: 4px;
  height: 5px;
  overflow: hidden;
}

.mini-stat-bar {
  height: 100%;
  border-radius: 4px;
  transition: width 0.4s ease;
}

.cat-card-bed {
  font-size: 18px;
  position: absolute;
  bottom: 6px;
  right: 8px;
}

/* Sleep Zs */
.sleep-z {
  position: absolute;
  top: -4px; right: -4px;
  font-size: 13px;
  font-weight: 800;
  color: var(--lavender);
  animation: floatZ 2s ease-in-out infinite;
  pointer-events: none;
}

/* ================================================================
   CSS ART CAT
   ================================================================ */
.cat-art {
  --body-color: #F5C6C6;
  --pattern-color: #C97B7B;
  --eye-color: #4CAF50;
  --size-scale: 1;

  position: relative;
  width: calc(80px * var(--size-scale));
  height: calc(90px * var(--size-scale));
  transform-origin: bottom center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Cat head */
.cat-head {
  position: relative;
  width: calc(60px * var(--size-scale));
  height: calc(52px * var(--size-scale));
  background: var(--body-color);
  border-radius: 50% 50% 45% 45%;
  z-index: 2;
  margin-bottom: calc(-4px * var(--size-scale));
}

/* Ears */
.cat-ear {
  position: absolute;
  top: calc(-14px * var(--size-scale));
  width: 0; height: 0;
  border-style: solid;
}

.cat-ear-left {
  left: calc(6px * var(--size-scale));
  border-width: 0 calc(12px * var(--size-scale)) calc(18px * var(--size-scale)) calc(4px * var(--size-scale));
  border-color: transparent transparent var(--body-color) transparent;
}

.cat-ear-right {
  right: calc(6px * var(--size-scale));
  border-width: 0 calc(4px * var(--size-scale)) calc(18px * var(--size-scale)) calc(12px * var(--size-scale));
  border-color: transparent transparent var(--body-color) transparent;
}

/* Inner ears */
.cat-ear-inner {
  position: absolute;
  top: calc(-10px * var(--size-scale));
}

.cat-ear-inner-left {
  left: calc(9px * var(--size-scale));
  width: 0; height: 0;
  border-style: solid;
  border-width: 0 calc(7px * var(--size-scale)) calc(11px * var(--size-scale)) calc(3px * var(--size-scale));
  border-color: transparent transparent var(--pink-light) transparent;
}

.cat-ear-inner-right {
  right: calc(9px * var(--size-scale));
  width: 0; height: 0;
  border-style: solid;
  border-width: 0 calc(3px * var(--size-scale)) calc(11px * var(--size-scale)) calc(7px * var(--size-scale));
  border-color: transparent transparent var(--pink-light) transparent;
}

/* Eyes */
.cat-eyes {
  position: absolute;
  top: calc(16px * var(--size-scale));
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: calc(12px * var(--size-scale));
}

.cat-eye {
  width: calc(12px * var(--size-scale));
  height: calc(12px * var(--size-scale));
  background: var(--eye-color);
  border-radius: 50%;
  position: relative;
  border: calc(1.5px * var(--size-scale)) solid rgba(0,0,0,0.15);
}

.cat-eye::after {
  content: '';
  position: absolute;
  top: calc(1px * var(--size-scale));
  left: calc(1px * var(--size-scale));
  width: calc(5px * var(--size-scale));
  height: calc(5px * var(--size-scale));
  background: rgba(0,0,0,0.65);
  border-radius: 50%;
}

/* Sleeping eyes */
.cat-art.is-asleep .cat-eye {
  height: calc(3px * var(--size-scale));
  border-radius: 2px;
  background: var(--gray-800);
}

.cat-art.is-asleep .cat-eye::after { display: none; }

/* Nose */
.cat-nose {
  position: absolute;
  bottom: calc(16px * var(--size-scale));
  left: 50%;
  transform: translateX(-50%);
  width: 0; height: 0;
  border-style: solid;
  border-width: 0 calc(5px * var(--size-scale)) calc(5px * var(--size-scale)) calc(5px * var(--size-scale));
  border-color: transparent transparent var(--pink-dark) transparent;
}

/* Mouth */
.cat-mouth {
  position: absolute;
  bottom: calc(9px * var(--size-scale));
  left: 50%;
  transform: translateX(-50%);
  width: calc(16px * var(--size-scale));
  height: calc(6px * var(--size-scale));
  border: calc(1.5px * var(--size-scale)) solid var(--gray-600);
  border-top: none;
  border-radius: 0 0 8px 8px;
}

/* Whiskers */
.cat-whiskers {
  position: absolute;
  bottom: calc(12px * var(--size-scale));
  left: 50%;
  transform: translateX(-50%);
  width: calc(60px * var(--size-scale));
  pointer-events: none;
}

.cat-whisker {
  position: absolute;
  height: calc(1.5px * var(--size-scale));
  background: rgba(100,80,120,0.4);
  border-radius: 1px;
  top: 0;
}

.cat-whisker-l1 { width: calc(22px * var(--size-scale)); right: 50%; top: calc(-4px * var(--size-scale)); transform: rotate(10deg); transform-origin: right center; }
.cat-whisker-l2 { width: calc(22px * var(--size-scale)); right: 50%; transform: rotate(2deg); transform-origin: right center; }
.cat-whisker-l3 { width: calc(22px * var(--size-scale)); right: 50%; top: calc(4px * var(--size-scale)); transform: rotate(-7deg); transform-origin: right center; }
.cat-whisker-r1 { width: calc(22px * var(--size-scale)); left: 50%; top: calc(-4px * var(--size-scale)); transform: rotate(-10deg); transform-origin: left center; }
.cat-whisker-r2 { width: calc(22px * var(--size-scale)); left: 50%; transform: rotate(-2deg); transform-origin: left center; }
.cat-whisker-r3 { width: calc(22px * var(--size-scale)); left: 50%; top: calc(4px * var(--size-scale)); transform: rotate(7deg); transform-origin: left center; }

/* Cat body */
.cat-body {
  position: relative;
  width: calc(56px * var(--size-scale));
  height: calc(44px * var(--size-scale));
  background: var(--body-color);
  border-radius: 40% 40% 35% 35%;
  z-index: 1;
}

/* Paws */
.cat-paws {
  position: absolute;
  bottom: calc(-10px * var(--size-scale));
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: calc(8px * var(--size-scale));
}

.cat-paw {
  width: calc(16px * var(--size-scale));
  height: calc(12px * var(--size-scale));
  background: var(--body-color);
  border-radius: 50% 50% 40% 40%;
  border-bottom: calc(2px * var(--size-scale)) solid rgba(0,0,0,0.1);
}

/* Tail */
.cat-tail {
  position: absolute;
  right: calc(-16px * var(--size-scale));
  bottom: 0;
  width: calc(14px * var(--size-scale));
  height: calc(40px * var(--size-scale));
  background: var(--body-color);
  border-radius: 0 50% 50% 0;
  transform-origin: bottom left;
  animation: tailWag 3s ease-in-out infinite;
  z-index: 0;
}

/* Pattern overlay */
.cat-pattern {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  opacity: 0.55;
  pointer-events: none;
}

/* Pattern styles */
.cat-body .cat-pattern.tabby {
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent calc(6px * var(--size-scale)),
    var(--pattern-color) calc(6px * var(--size-scale)),
    var(--pattern-color) calc(8px * var(--size-scale))
  );
}

.cat-body .cat-pattern.tuxedo {
  background: linear-gradient(
    180deg,
    var(--pattern-color) 0%,
    var(--pattern-color) 40%,
    transparent 40%
  );
}

.cat-body .cat-pattern.calico {
  background:
    radial-gradient(ellipse 18px 14px at 20% 30%, var(--pattern-color) 100%, transparent 100%),
    radial-gradient(ellipse 14px 16px at 70% 60%, var(--pattern-color) 100%, transparent 100%),
    radial-gradient(ellipse 10px 10px at 45% 80%, var(--pattern-color) 100%, transparent 100%);
}

.cat-body .cat-pattern.spotted {
  background:
    radial-gradient(circle 7px at 25% 35%, var(--pattern-color) 100%, transparent 100%),
    radial-gradient(circle 6px at 65% 55%, var(--pattern-color) 100%, transparent 100%),
    radial-gradient(circle 5px at 45% 75%, var(--pattern-color) 100%, transparent 100%),
    radial-gradient(circle 4px at 75% 25%, var(--pattern-color) 100%, transparent 100%);
}

.cat-body .cat-pattern.solid { display: none; }

/* Head patterns */
.cat-head .cat-pattern.tabby {
  background:
    linear-gradient(90deg, var(--pattern-color) 2px, transparent 2px) 4px 12px / 8px 100% no-repeat,
    linear-gradient(90deg, var(--pattern-color) 2px, transparent 2px) calc(100% - 4px) 12px / 8px 100% no-repeat;
  opacity: 0.4;
}

.cat-head .cat-pattern.tuxedo {
  background: linear-gradient(180deg, var(--pattern-color) 0%, var(--pattern-color) 35%, transparent 35%);
  opacity: 0.3;
}

.cat-head .cat-pattern.calico {
  background: radial-gradient(ellipse 16px 12px at 70% 40%, var(--pattern-color) 100%, transparent 100%);
  opacity: 0.45;
}

.cat-head .cat-pattern.spotted {
  background: radial-gradient(circle 6px at 70% 60%, var(--pattern-color) 100%, transparent 100%);
  opacity: 0.45;
}

.cat-head .cat-pattern.solid { display: none; }

/* ---- Accessories ---- */
.cat-accessory-bow {
  position: absolute;
  top: calc(-4px * var(--size-scale));
  left: 50%;
  transform: translateX(-50%);
  font-size: calc(16px * var(--size-scale));
  pointer-events: none;
}

.cat-accessory-hat {
  position: absolute;
  top: calc(-22px * var(--size-scale));
  left: 50%;
  transform: translateX(-50%);
  font-size: calc(20px * var(--size-scale));
  pointer-events: none;
}

.cat-accessory-collar {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: calc(44px * var(--size-scale));
  height: calc(8px * var(--size-scale));
  background: var(--pink-dark);
  border-radius: 4px;
  pointer-events: none;
}

.cat-accessory-collar::after {
  content: '🔔';
  position: absolute;
  bottom: calc(-6px * var(--size-scale));
  left: 50%;
  transform: translateX(-50%);
  font-size: calc(10px * var(--size-scale));
}

/* ================================================================
   ANIMATIONS
   ================================================================ */
@keyframes tailWag {
  0%, 100% { transform: rotate(0deg); }
  30%       { transform: rotate(15deg); }
  70%       { transform: rotate(-10deg); }
}

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

@keyframes floatZ {
  0%         { opacity: 0; transform: translate(0, 0) scale(0.8); }
  50%        { opacity: 1; }
  100%       { opacity: 0; transform: translate(8px, -14px) scale(1.1); }
}

@keyframes brushShake {
  0%, 100%  { transform: rotate(0deg); }
  20%       { transform: rotate(-6deg); }
  40%       { transform: rotate(6deg); }
  60%       { transform: rotate(-4deg); }
  80%       { transform: rotate(4deg); }
}

@keyframes eatDip {
  0%, 100%  { transform: translateY(0); }
  40%       { transform: translateY(6px); }
}

@keyframes purrBob {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.03); }
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes toastSlide {
  0%   { transform: translateX(120%); opacity: 0; }
  15%  { transform: translateX(0);    opacity: 1; }
  75%  { transform: translateX(0);    opacity: 1; }
  100% { transform: translateX(120%); opacity: 0; }
}

.cat-art.brushing { animation: brushShake 0.4s ease-in-out; }
.cat-art.eating   { animation: eatDip 0.5s ease-in-out; }
.cat-art.purring  { animation: purrBob 1.5s ease-in-out infinite; }

/* ================================================================
   MODALS
   ================================================================ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(60, 40, 100, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  padding: 20px;
  animation: fadeInUp 0.2s ease;
}

.modal {
  background: var(--white);
  border-radius: var(--radius-xl);
  padding: 28px;
  width: 100%;
  max-width: 600px;
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  position: relative;
  animation: fadeInUp 0.25s ease;
}

.modal-sm { max-width: 400px; }

.modal-close {
  position: absolute;
  top: 16px; right: 16px;
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--gray-200);
  color: var(--gray-600);
  font-size: 14px;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.15s;
}

.modal-close:hover { background: var(--gray-300); }

.modal-title {
  font-size: 24px;
  color: var(--gray-800);
  margin-bottom: 20px;
}

.modal-subtitle {
  color: var(--gray-600);
  font-size: 14px;
  margin-bottom: 16px;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid var(--gray-200);
}

/* ---- Cat Editor Modal ---- */
.steps-indicator {
  display: flex;
  gap: 6px;
  margin-bottom: 20px;
  overflow-x: auto;
}

.step {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 700;
  background: var(--gray-200);
  color: var(--gray-400);
  white-space: nowrap;
  transition: background 0.15s, color 0.15s;
}

.step span {
  width: 20px; height: 20px;
  border-radius: 50%;
  background: var(--gray-300);
  display: flex; align-items: center; justify-content: center;
  font-size: 11px;
}

.step.active {
  background: var(--lavender-light);
  color: var(--purple);
}

.step.active span { background: var(--lavender); color: white; }

.step.completed {
  background: var(--mint);
  color: var(--gray-800);
}

.step.completed span { background: var(--mint-dark); color: white; }

.editor-layout {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 24px;
  align-items: start;
}

.editor-preview-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 20px;
  background: var(--gray-100);
  border-radius: var(--radius-lg);
  position: sticky;
  top: 0;
}

.preview-name {
  font-weight: 800;
  font-size: 14px;
  color: var(--gray-800);
  text-align: center;
}

.editor-step { display: none; }
.editor-step.active { display: block; animation: fadeInUp 0.2s ease; }

.editor-steps h3 {
  font-size: 16px;
  margin-bottom: 12px;
  color: var(--gray-800);
}

/* Color swatches */
.color-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;
  margin-bottom: 14px;
}

.color-swatch {
  width: 32px; height: 32px;
  border-radius: 50%;
  border: 3px solid transparent;
  cursor: pointer;
  transition: transform 0.1s, border-color 0.1s;
}

.color-swatch:hover { transform: scale(1.15); }
.color-swatch.selected { border-color: var(--purple); transform: scale(1.1); }

/* Pattern options */
.pattern-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.pattern-btn {
  padding: 7px 14px;
  border-radius: 20px;
  background: var(--gray-200);
  color: var(--gray-600);
  font-size: 13px;
  font-weight: 700;
  transition: background 0.15s, color 0.15s;
}

.pattern-btn:hover { background: var(--lavender-light); }
.pattern-btn.selected { background: var(--lavender); color: white; }

/* Size options */
.size-options {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.size-btn {
  flex: 1;
  padding: 12px;
  border-radius: var(--radius-md);
  background: var(--gray-200);
  color: var(--gray-600);
  font-size: 14px;
  font-weight: 700;
  transition: background 0.15s;
}

.size-btn:hover { background: var(--lavender-light); }
.size-btn.active { background: var(--lavender); color: white; }

/* Personality */
.personality-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.personality-btn {
  flex: 1;
  min-width: 100px;
  padding: 8px 12px;
  border-radius: 20px;
  background: var(--gray-200);
  color: var(--gray-600);
  font-size: 13px;
  font-weight: 700;
  transition: background 0.15s;
}

.personality-btn:hover { background: var(--lavender-light); }
.personality-btn.active { background: linear-gradient(135deg, var(--lavender), var(--pink)); color: white; }

/* Name input */
.text-input {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid var(--gray-300);
  border-radius: var(--radius-md);
  font-size: 16px;
  font-family: 'Nunito', sans-serif;
  font-weight: 700;
  color: var(--gray-800);
  outline: none;
  transition: border-color 0.15s;
}

.text-input:focus { border-color: var(--lavender); }

/* ---- Grooming Modal ---- */
#grooming-cat-display {
  display: flex;
  justify-content: center;
  margin-bottom: 20px;
}

#grooming-brush-section, #grooming-nails-section {
  margin-bottom: 20px;
}

#grooming-brush-section h3, #grooming-nails-section h3 {
  font-size: 17px;
  margin-bottom: 6px;
}

.grooming-hint {
  font-size: 13px;
  color: var(--gray-400);
  margin-bottom: 10px;
}

.progress-bar-wrap {
  background: var(--gray-200);
  border-radius: 8px;
  height: 14px;
  overflow: hidden;
  margin-bottom: 8px;
}

.progress-bar {
  height: 100%;
  border-radius: 8px;
  background: linear-gradient(90deg, var(--lavender), var(--pink));
  transition: width 0.3s ease;
  width: 0%;
}

.brush-count { font-size: 13px; font-weight: 700; color: var(--purple); margin-bottom: 12px; }

.paw-sequence {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 10px;
}

.paw-btn {
  padding: 10px;
  border-radius: var(--radius-md);
  background: var(--gray-200);
  color: var(--gray-600);
  font-size: 13px;
  font-weight: 700;
  transition: background 0.15s;
}

.paw-btn.active-paw { background: var(--lavender); color: white; animation: purrBob 0.5s ease-in-out infinite; }
.paw-btn.done-paw { background: var(--mint); color: var(--gray-800); }

.nails-status { font-size: 13px; color: var(--purple); font-weight: 700; }

.complete-msg {
  text-align: center;
  font-size: 18px;
  font-weight: 800;
  color: var(--mint-dark);
  padding: 16px;
  background: var(--mint);
  border-radius: var(--radius-md);
  animation: fadeInUp 0.3s ease;
}

/* ---- Move Room Modal ---- */
.move-room-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.move-room-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 14px;
  border-radius: var(--radius-md);
  background: var(--gray-100);
  border: 2px solid var(--gray-200);
  font-size: 13px;
  font-weight: 700;
  color: var(--gray-800);
  transition: background 0.15s, border-color 0.15s;
}

.move-room-btn:hover:not(:disabled) {
  background: var(--lavender-light);
  border-color: var(--lavender);
}

.move-room-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.move-room-btn.current-room { border-color: var(--lavender); background: var(--lavender-light); }

.move-room-btn .move-room-icon { font-size: 24px; }
.move-room-btn .move-room-count { font-size: 11px; color: var(--gray-400); }

/* ---- Bed Builder Modal ---- */
.bed-options-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.bed-option-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 16px;
  border-radius: var(--radius-md);
  background: var(--gray-100);
  border: 2px solid var(--gray-200);
  transition: background 0.15s, border-color 0.15s;
}

.bed-option-btn:hover {
  background: var(--peach);
  border-color: var(--peach-dark);
}

.bed-icon { font-size: 28px; }
.bed-name { font-size: 14px; font-weight: 800; color: var(--gray-800); }
.bed-desc { font-size: 12px; color: var(--gray-400); }

/* ================================================================
   TOAST NOTIFICATIONS
   ================================================================ */
#toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 1000;
  pointer-events: none;
}

.toast {
  background: var(--gray-800);
  color: white;
  padding: 10px 18px;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 600;
  box-shadow: var(--shadow-md);
  animation: toastSlide 3s ease forwards;
  pointer-events: none;
  max-width: 280px;
}

.toast-success { background: linear-gradient(135deg, var(--mint-dark), #4caf7e); }
.toast-warn    { background: linear-gradient(135deg, var(--peach-dark), #e08c45); }
.toast-error   { background: linear-gradient(135deg, #FF6B6B, #cc3333); }

/* ================================================================
   RESPONSIVE
   ================================================================ */
@media (max-width: 900px) {
  :root {
    --sidebar-w: 160px;
    --inspector-w: 220px;
  }

  .header-title { font-size: 20px; }
  .room-name { display: none; }
  .color-grid { grid-template-columns: repeat(5, 1fr); }
}

@media (max-width: 680px) {
  #app-layout {
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr auto;
  }

  #sidebar {
    border-right: none;
    border-bottom: 2px solid var(--gray-200);
    padding: 8px;
  }

  #room-nav { flex-direction: row; overflow-x: auto; gap: 6px; }
  .room-btn { flex-direction: column; min-width: 60px; padding: 8px 4px; font-size: 11px; }
  .room-count { display: none; }

  #inspector {
    border-left: none;
    border-top: 2px solid var(--gray-200);
  }

  .editor-layout { grid-template-columns: 1fr; }
  .editor-preview-wrap { position: static; }
}
