/* ========================
   CSS Variables & Tokens
   ======================== */
:root {
  /* Colors - Warm & Cozy */
  --color-cream: #FDF8F3;
  --color-cream-dark: #F5EBE0;
  --color-warm-white: #FFFDF9;
  --color-golden: #D4A574;
  --color-golden-light: #E8C9A8;
  --color-golden-dark: #B8865A;
  --color-brown: #6B4C3A;
  --color-brown-light: #8B6B52;
  --color-brown-dark: #4A3428;
  --color-accent: #E07B53;
  --color-accent-light: #F4A384;
  --color-success: #7CB587;
  --color-warning: #E9B872;
  --color-error: #D4766A;
  
  /* Typography */
  --font-primary: 'Nunito', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-heading: 'Quicksand', sans-serif;
  
  /* Spacing */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  
  /* Border Radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --radius-full: 9999px;
  
  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(107, 76, 58, 0.08);
  --shadow-md: 0 4px 16px rgba(107, 76, 58, 0.12);
  --shadow-lg: 0 8px 32px rgba(107, 76, 58, 0.16);
  --shadow-glow: 0 0 20px rgba(212, 165, 116, 0.3);
  
  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-normal: 250ms ease;
  --transition-slow: 400ms ease;
}

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

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

body {
  font-family: var(--font-primary);
  background: var(--color-cream);
  color: var(--color-brown-dark);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

/* ========================
   Typography
   ======================== */
h1, h2, h3 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
}

h1 { font-size: 3rem; }
h2 { font-size: 2.25rem; }
h3 { font-size: 1.75rem; }

a {
  color: var(--color-accent);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--color-golden-dark);
}

/* ========================
   App Container
   ======================== */
#app {
  min-height: 100vh;
}

.screen {
  display: none;
  min-height: 100vh;
}

.screen.active {
  display: flex;
  flex-direction: column;
}

/* ========================
   Login Screen
   ======================== */
#login-screen {
  background: linear-gradient(135deg, var(--color-cream) 0%, var(--color-cream-dark) 100%);
  justify-content: center;
  align-items: center;
  padding: var(--space-lg);
  position: relative;
  overflow: hidden;
}

.login-container {
  width: 100%;
  max-width: 380px;
  position: relative;
  z-index: 1;
}

.login-logo {
  text-align: center;
  margin-bottom: var(--space-xl);
  animation: fadeInDown 0.6s ease;
}

.paw-icon {
  width: 64px;
  height: 64px;
  color: var(--color-golden);
  margin-bottom: var(--space-md);
  animation: pawBounce 2s ease-in-out infinite;
}

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

.login-logo h1 {
  color: var(--color-brown-dark);
  font-size: 2.5rem;
  margin-bottom: var(--space-xs);
}

.login-tagline {
  color: var(--color-brown-light);
  font-size: 1.125rem;
  font-weight: 500;
}

.login-form {
  animation: fadeInUp 0.6s ease 0.2s both;
}

.input-wrapper {
  display: flex;
  gap: var(--space-sm);
  background: var(--color-warm-white);
  border-radius: var(--radius-lg);
  padding: var(--space-sm);
  box-shadow: var(--shadow-md);
  border: 2px solid transparent;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.input-wrapper:focus-within {
  border-color: var(--color-golden);
  box-shadow: var(--shadow-lg);
}

.input-wrapper input {
  flex: 1;
  border: none;
  background: transparent;
  padding: var(--space-md);
  font-size: 1rem;
  font-family: var(--font-primary);
  color: var(--color-brown-dark);
  outline: none;
}

.input-wrapper input::placeholder {
  color: var(--color-golden-light);
}

.input-wrapper button {
  width: 52px;
  height: 52px;
  border: none;
  background: var(--color-golden);
  color: white;
  border-radius: var(--radius-md);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition-fast), transform var(--transition-fast);
}

.input-wrapper button:hover {
  background: var(--color-golden-dark);
  transform: scale(1.05);
}

.input-wrapper button svg {
  width: 24px;
  height: 24px;
}

.error-msg {
  color: var(--color-error);
  text-align: center;
  margin-top: var(--space-md);
  font-size: 0.875rem;
  font-weight: 500;
}

.hidden {
  display: none !important;
}

/* Floating decorations */
.login-decorations {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.floating-bone {
  position: absolute;
  width: 20px;
  height: 50px;
  background: var(--color-golden-light);
  border-radius: 10px;
  opacity: 0.3;
}

.bone-1 {
  top: 20%;
  left: 10%;
  animation: floatBone 6s ease-in-out infinite;
}

.bone-2 {
  bottom: 30%;
  right: 15%;
  animation: floatBone 8s ease-in-out infinite 1s;
}

@keyframes floatBone {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-20px) rotate(10deg); }
}

/* Animations */
@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

/* ========================
   Main Screen - Header
   ======================== */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--color-warm-white);
  box-shadow: var(--shadow-sm);
  padding: var(--space-md) var(--space-lg);
}

.header-content {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  max-width: 800px;
  margin: 0 auto;
}

.header-left {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  flex-shrink: 0;
}

.paw-icon-small {
  width: 28px;
  height: 28px;
  color: var(--color-golden);
}

.header-title {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-brown-dark);
}

.search-wrapper {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
}

.search-icon {
  position: absolute;
  left: var(--space-md);
  width: 18px;
  height: 18px;
  color: var(--color-golden-light);
  pointer-events: none;
}

#search-input {
  width: 100%;
  padding: var(--space-sm) var(--space-md);
  padding-left: 2.75rem;
  padding-right: 2.5rem;
  border: 2px solid var(--color-cream-dark);
  border-radius: var(--radius-full);
  background: var(--color-cream);
  font-size: 0.9375rem;
  font-family: var(--font-primary);
  color: var(--color-brown-dark);
  transition: border-color var(--transition-fast), background var(--transition-fast);
}

#search-input:focus {
  outline: none;
  border-color: var(--color-golden);
  background: var(--color-warm-white);
}

#search-input::placeholder {
  color: var(--color-brown-light);
}

.clear-btn {
  position: absolute;
  right: var(--space-sm);
  width: 28px;
  height: 28px;
  border: none;
  background: transparent;
  color: var(--color-brown-light);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-full);
  transition: background var(--transition-fast), color var(--transition-fast);
}

.clear-btn:hover {
  background: var(--color-cream-dark);
  color: var(--color-brown-dark);
}

.clear-btn svg {
  width: 16px;
  height: 16px;
}

.logout-btn {
  width: 40px;
  height: 40px;
  border: 2px solid var(--color-cream-dark);
  background: var(--color-warm-white);
  color: var(--color-brown-light);
  border-radius: var(--radius-md);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color var(--transition-fast), color var(--transition-fast), background var(--transition-fast);
  flex-shrink: 0;
}

.logout-btn:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
  background: rgba(224, 123, 83, 0.1);
}

.logout-btn svg {
  width: 20px;
  height: 20px;
}

/* ========================
   Main Screen - Content
   ======================== */
.content {
  flex: 1;
  padding: var(--space-lg);
  padding-bottom: var(--space-2xl);
  max-width: 800px;
  margin: 0 auto;
  width: 100%;
}

.section {
  margin-bottom: var(--space-xl);
  opacity: 0;
  transform: translateY(20px);
  animation: sectionReveal 0.5s ease forwards;
}

@keyframes sectionReveal {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Section staggering */
#hero { animation-delay: 0.1s; }
#quick-facts { animation-delay: 0.2s; }
#emergency { animation-delay: 0.3s; }
#photos { animation-delay: 0.4s; }
#victor-content > section:nth-child(1) { animation-delay: 0.5s; }
#victor-content > section:nth-child(2) { animation-delay: 0.6s; }
#victor-content > section:nth-child(3) { animation-delay: 0.7s; }
#victor-content > section:nth-child(4) { animation-delay: 0.8s; }
#victor-content > section:nth-child(5) { animation-delay: 0.9s; }
#victor-content > section:nth-child(6) { animation-delay: 1s; }

/* Hidden by search filter */
.section.hidden {
  display: none;
}

/* ========================
   Hero Section
   ======================== */
.hero-section {
  background: linear-gradient(135deg, var(--color-warm-white) 0%, var(--color-cream-dark) 100%);
  border-radius: var(--radius-xl);
  padding: var(--space-xl);
  text-align: center;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.hero-content {
  position: relative;
  z-index: 1;
}

.hero-photo-wrapper {
  width: 160px;
  height: 160px;
  margin: 0 auto var(--space-lg);
  border-radius: 50%;
  overflow: hidden;
  border: 4px solid var(--color-golden);
  box-shadow: var(--shadow-glow);
}

.hero-photo-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--color-cream) 0%, var(--color-golden-light) 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--color-brown-light);
}

.hero-photo-placeholder svg {
  width: 48px;
  height: 48px;
  margin-bottom: var(--space-sm);
  opacity: 0.5;
}

.hero-photo-placeholder span {
  font-size: 0.75rem;
  text-align: center;
  padding: 0 var(--space-md);
}

.hero-name {
  font-size: 3rem;
  color: var(--color-brown-dark);
  margin-bottom: var(--space-xs);
}

.hero-tagline {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--color-brown-light);
  margin-bottom: var(--space-lg);
}

.hero-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-sm);
}

.badge {
  background: var(--color-golden);
  color: white;
  padding: var(--space-xs) var(--space-md);
  border-radius: var(--radius-full);
  font-size: 0.875rem;
  font-weight: 600;
  box-shadow: var(--shadow-sm);
}

.hero-decoration {
  position: absolute;
  top: -50px;
  right: -50px;
  width: 150px;
  height: 150px;
  background: radial-gradient(circle, var(--color-golden-light) 0%, transparent 70%);
  opacity: 0.3;
}

/* ========================
   Card Sections
   ======================== */
.card-section {
  background: var(--color-warm-white);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  box-shadow: var(--shadow-sm);
}

.section-header {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  margin-bottom: var(--space-lg);
  padding-bottom: var(--space-md);
  border-bottom: 2px dashed var(--color-cream-dark);
}

.section-icon {
  width: 40px;
  height: 40px;
  background: var(--color-golden);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  flex-shrink: 0;
}

.section-icon svg {
  width: 24px;
  height: 24px;
}

.section-header h3 {
  font-size: 1.5rem;
  color: var(--color-brown-dark);
}

/* Card grids */
.card-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-md);
}

.info-card {
  background: var(--color-cream);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.info-card.full-width {
  grid-column: span 2;
}

.info-card.important {
  grid-column: span 2;
  background: linear-gradient(135deg, var(--color-warm-white) 0%, rgba(233, 184, 114, 0.15) 100%);
  border: 2px solid var(--color-warning);
  flex-direction: row;
  align-items: flex-start;
  gap: var(--space-md);
}

.card-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-brown-light);
  font-weight: 600;
}

.card-value {
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-brown-dark);
}

.card-value.highlight {
  color: var(--color-success);
  font-size: 1.125rem;
}

.info-icon {
  width: 24px;
  height: 24px;
  color: var(--color-warning);
  flex-shrink: 0;
}

.info-content {
  flex: 1;
}

.vet-phone {
  font-size: 0.875rem;
  color: var(--color-accent);
  margin-top: var(--space-xs);
}

/* Friends/Enemies boxes */
.friends-enemies {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-md);
  margin-top: var(--space-md);
}

.friends-box, .enemies-box {
  padding: var(--space-md);
  border-radius: var(--radius-md);
  text-align: center;
}

.friends-box {
  background: rgba(124, 181, 135, 0.15);
  border: 2px solid var(--color-success);
}

.enemies-box {
  background: rgba(212, 118, 106, 0.15);
  border: 2px solid var(--color-error);
}

.fe-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: var(--space-xs);
  color: var(--color-brown-dark);
}

.fe-list {
  font-size: 0.875rem;
  color: var(--color-brown-light);
}

/* Emergency section */
.emergency-icon {
  background: var(--color-accent);
}

.contact-card {
  grid-column: span 2;
  display: flex;
  align-items: center;
  gap: var(--space-md);
  background: var(--color-cream);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  text-decoration: none;
  color: inherit;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.contact-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  color: inherit;
}

.contact-avatar {
  width: 48px;
  height: 48px;
  background: var(--color-golden);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 700;
  font-size: 1rem;
  flex-shrink: 0;
}

.contact-info {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.contact-name {
  font-weight: 700;
  color: var(--color-brown-dark);
}

.contact-label {
  font-size: 0.75rem;
  color: var(--color-brown-light);
}

.contact-phone {
  color: var(--color-accent);
  font-weight: 600;
}

.call-icon {
  width: 24px;
  height: 24px;
  color: var(--color-success);
}

/* Photos section */
.photos-icon {
  background: #4285F4;
}

.photos-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(135deg, #F8F9FA 0%, #E8F0FE 100%);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  text-decoration: none;
  color: inherit;
  border: 2px solid #E8F0FE;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.photos-link:hover {
  border-color: #4285F4;
  box-shadow: 0 4px 12px rgba(66, 133, 244, 0.2);
  color: inherit;
}

.photos-link-content {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.photos-icon {
  width: 48px;
  height: 48px;
  color: #4285F4;
}

.photos-text {
  display: flex;
  flex-direction: column;
}

.photos-title {
  font-weight: 700;
  color: var(--color-brown-dark);
}

.photos-subtitle {
  font-size: 0.875rem;
  color: var(--color-brown-light);
}

.external-icon {
  width: 24px;
  height: 24px;
  color: var(--color-brown-light);
}

.photos-note {
  margin-top: var(--space-md);
  text-align: center;
  font-size: 0.8125rem;
  color: var(--color-brown-light);
}

.photos-note code {
  background: var(--color-cream-dark);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.75rem;
}

/* ========================
   Victor Sections (Hidden by default)
   ======================== */
.victor-sections {
  display: flex;
  flex-direction: column;
  gap: var(--space-xl);
}

.victor-sections.hidden {
  display: none;
}

/* Timeline */
.timeline {
  position: relative;
  padding-left: var(--space-xl);
}

.timeline::before {
  content: '';
  position: absolute;
  left: 7px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--color-cream-dark);
}

.timeline-item {
  position: relative;
  padding-bottom: var(--space-lg);
}

.timeline-item:last-child {
  padding-bottom: 0;
}

.timeline-time {
  font-weight: 700;
  color: var(--color-golden-dark);
  font-size: 0.875rem;
  margin-bottom: var(--space-xs);
}

.timeline-dot {
  position: absolute;
  left: calc(-1 * var(--space-xl) + 3px);
  top: 4px;
  width: 12px;
  height: 12px;
  background: var(--color-golden);
  border-radius: 50%;
  border: 3px solid var(--color-warm-white);
  box-shadow: var(--shadow-sm);
}

.timeline-item.light .timeline-dot {
  background: var(--color-cream-dark);
}

.timeline-content {
  display: flex;
  flex-direction: column;
}

.timeline-title {
  font-weight: 600;
  color: var(--color-brown-dark);
}

.timeline-note {
  font-size: 0.875rem;
  color: var(--color-brown-light);
}

/* Feeding section */
.feeding-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-md);
  margin-bottom: var(--space-lg);
}

.feeding-card {
  background: var(--color-cream);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  text-align: center;
  border: 2px solid var(--color-cream-dark);
  transition: border-color var(--transition-fast), transform var(--transition-fast);
}

.feeding-card:hover {
  border-color: var(--color-golden);
  transform: translateY(-2px);
}

.feeding-icon-wrapper {
  width: 40px;
  height: 40px;
  background: var(--color-golden-light);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto var(--space-sm);
}

.feeding-icon-wrapper svg {
  width: 24px;
  height: 24px;
  color: var(--color-golden-dark);
}

.feeding-time {
  display: block;
  font-weight: 700;
  color: var(--color-brown-dark);
  margin-bottom: var(--space-xs);
}

.feeding-amount {
  display: block;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-golden-dark);
  margin-bottom: var(--space-xs);
}

.feeding-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-brown-light);
}

.subsection-title {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-family: var(--font-primary);
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-brown-dark);
  margin-bottom: var(--space-md);
  margin-top: var(--space-lg);
}

.subsection-title svg {
  width: 20px;
  height: 20px;
  color: var(--color-golden);
}

.treats-section {
  margin-top: var(--space-lg);
  padding-top: var(--space-lg);
  border-top: 2px dashed var(--color-cream-dark);
}

.treats-text {
  color: var(--color-brown-light);
  font-size: 0.9375rem;
}

/* Walk section */
.walk-cards {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.walk-card {
  background: var(--color-cream);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  border: 2px solid var(--color-cream-dark);
}

.walk-card.short {
  background: linear-gradient(135deg, var(--color-cream) 0%, rgba(212, 165, 116, 0.1) 100%);
}

.walk-card .walk-time-badge {
  align-self: flex-start;
}

.walk-card-top {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  flex-wrap: wrap;
}

.walk-details {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.walk-duration {
  font-weight: 700;
  color: var(--color-brown-dark);
}

.walk-distance {
  font-size: 0.875rem;
  color: var(--color-brown-light);
}

.walk-note {
  font-size: 0.8125rem;
  color: var(--color-brown-light);
}

.walk-behavior {
  font-size: 0.875rem;
  color: var(--color-brown-light);
  line-height: 1.5;
  margin-top: var(--space-xs);
  padding-top: var(--space-sm);
  border-top: 1px dashed var(--color-cream-dark);
}

.walk-time-badge {
  background: var(--color-golden);
  color: white;
  padding: var(--space-xs) var(--space-sm);
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
}

.walk-tip {
  display: flex;
  align-items: flex-start;
  gap: var(--space-md);
  background: rgba(212, 165, 116, 0.1);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  margin-top: var(--space-md);
}

.lightbulb-icon {
  width: 24px;
  height: 24px;
  color: var(--color-golden);
  flex-shrink: 0;
}

.walk-tip span {
  font-size: 0.875rem;
  color: var(--color-brown-light);
}

/* Social section */
.social-section {
  margin-bottom: var(--space-lg);
}

.social-section p {
  color: var(--color-brown-light);
  font-size: 0.9375rem;
}

.warning-box {
  display: flex;
  gap: var(--space-md);
  background: rgba(212, 118, 106, 0.1);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  border: 2px solid var(--color-error);
}

.warning-icon {
  width: 24px;
  height: 24px;
  color: var(--color-error);
  flex-shrink: 0;
}

.warning-content {
  display: flex;
  flex-direction: column;
}

.warning-title {
  font-weight: 700;
  color: var(--color-error);
  margin-bottom: var(--space-xs);
}

.warning-text {
  font-size: 0.875rem;
  color: var(--color-brown-dark);
}

/* Training section */
.commands-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-md);
  margin-bottom: var(--space-lg);
}

.command-card {
  background: var(--color-cream);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-sm);
  border: 2px solid var(--color-cream-dark);
  transition: border-color var(--transition-fast), transform var(--transition-fast);
}

.command-card:hover {
  border-color: var(--color-golden);
  transform: translateY(-2px);
}

.command-visual {
  width: 64px;
  height: 64px;
  background: linear-gradient(135deg, var(--color-golden-light) 0%, var(--color-golden) 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hand-icon svg, .down-icon svg {
  width: 32px;
  height: 32px;
  color: white;
}

.sit-icon, .stay-icon {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
  color: white;
  text-transform: uppercase;
}

.command-name {
  font-weight: 700;
  color: var(--color-brown-dark);
}

.command-desc {
  font-size: 0.8125rem;
  color: var(--color-brown-light);
}

/* Care notes section */
.care-notes-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.care-note {
  display: flex;
  gap: var(--space-md);
  padding: var(--space-md);
  background: var(--color-cream);
  border-radius: var(--radius-md);
}

.care-note-icon {
  width: 40px;
  height: 40px;
  background: var(--color-golden-light);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.care-note-icon svg {
  width: 24px;
  height: 24px;
  color: var(--color-golden-dark);
}

.care-note-content {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.care-note-title {
  font-weight: 700;
  color: var(--color-brown-dark);
  margin-bottom: var(--space-xs);
}

.care-note-text {
  font-size: 0.875rem;
  color: var(--color-brown-light);
  line-height: 1.5;
}

/* No results */
.no-results {
  text-align: center;
  padding: var(--space-2xl);
}

.no-results svg {
  width: 64px;
  height: 64px;
  color: var(--color-golden-light);
  margin-bottom: var(--space-md);
}

.no-results p {
  color: var(--color-brown-light);
  font-size: 1.125rem;
}

#search-query {
  color: var(--color-brown-dark);
  font-weight: 600;
}

/* ========================
   Footer
   ======================== */
.footer {
  text-align: center;
  padding: var(--space-lg);
  color: var(--color-brown-light);
  font-size: 0.875rem;
  background: var(--color-cream-dark);
}

/* ========================
   Responsive Adjustments
   ======================== */
@media (max-width: 480px) {
  .card-grid {
    grid-template-columns: 1fr;
  }
  
  .info-card.full-width,
  .info-card.important,
  .contact-card {
    grid-column: span 1;
  }
  
  .friends-enemies {
    grid-template-columns: 1fr;
  }
  
  .feeding-grid {
    grid-template-columns: 1fr;
  }
  
  .commands-grid {
    grid-template-columns: 1fr;
  }
  
  .hero-name {
    font-size: 2.5rem;
  }
  
  .header-title {
    display: none;
  }
}

@media (min-width: 768px) {
  .content {
    padding: var(--space-xl) var(--space-2xl);
  }
  
  .card-section {
    padding: var(--space-xl);
  }
  
  .hero-section {
    padding: var(--space-2xl);
  }
  
  .hero-photo-wrapper {
    width: 180px;
    height: 180px;
  }
}

@media (min-width: 1024px) {
  .content {
    padding: var(--space-2xl) var(--space-xl);
  }
  
  .card-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  
  .info-card.full-width {
    grid-column: span 3;
  }
  
  .info-card.important {
    grid-column: span 3;
  }
}

/* ========================
   Accessibility
   ======================== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Focus styles */
:focus-visible {
  outline: 3px solid var(--color-golden);
  outline-offset: 2px;
}

/* ========================
   Print Styles
   ======================== */
@media print {
  .header, .footer, .login-screen {
    display: none;
  }
  
  .section {
    break-inside: avoid;
  }
}