/* ============================================
   现代化宠物纪念网站 - 全新设计系统
   ============================================ */

/* 设计系统变量 - 温馨柔和的配色 */
:root {
  /* 主色调 - 柔和的绿色系（温馨、自然） */
  --primary-50: #f0fdf4;
  --primary-100: #dcfce7;
  --primary-200: #bbf7d0;
  --primary-300: #86efac;
  --primary-400: #4ade80;
  --primary-500: #22c55e;
  --primary-600: #16a34a;
  --primary-700: #15803d;
  --primary-800: #166534;
  --primary-900: #14532d;
  
  /* 辅助色 - 柔和的粉色系（温暖、纪念） */
  --accent-50: #fdf2f8;
  --accent-100: #fce7f3;
  --accent-200: #fbcfe8;
  --accent-300: #f9a8d4;
  --accent-400: #f472b6;
  --accent-500: #ec4899;
  --accent-600: #db2777;
  
  /* 中性色 */
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #111827;
  
  /* 语义色 */
  --success: var(--primary-500);
  --warning: #f59e0b;
  --error: #ef4444;
  --info: #3b82f6;
  
  /* 背景色 */
  --bg-primary: #ffffff;
  --bg-secondary: var(--gray-50);
  --bg-tertiary: var(--primary-50);
  
  /* 文字色 */
  --text-primary: var(--gray-900);
  --text-secondary: var(--gray-600);
  --text-tertiary: var(--gray-400);
  
  /* 阴影 */
  --shadow-xs: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
  --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  --shadow-colored: 0 10px 25px -5px rgba(34, 197, 94, 0.2);
  
  /* 圆角 */
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-2xl: 1.5rem;
  --radius-full: 9999px;
  
  /* 间距 */
  --spacing-xs: 0.5rem;
  --spacing-sm: 0.75rem;
  --spacing-md: 1rem;
  --spacing-lg: 1.5rem;
  --spacing-xl: 2rem;
  --spacing-2xl: 3rem;
  
  /* 字体 */
  --font-family-base: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --font-size-xs: 0.75rem;
  --font-size-sm: 0.875rem;
  --font-size-base: 1rem;
  --font-size-lg: 1.125rem;
  --font-size-xl: 1.25rem;
  --font-size-2xl: 1.5rem;
  --font-size-3xl: 1.875rem;
  --font-size-4xl: 2.25rem;
  
  /* 过渡 */
  --transition-fast: 150ms ease;
  --transition-base: 250ms ease;
  --transition-slow: 350ms ease;
}

/* ============================================
   全局样式重置
   ============================================ */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

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

.site-body {
  min-height: 100vh;
}

body {
  font-family: var(--font-family-base);
  font-size: var(--font-size-base);
  line-height: 1.6;
  color: var(--text-primary);
  background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-primary) 50%, var(--primary-50) 100%);
  background-attachment: fixed;
  min-height: 100vh;
  position: relative;
}

body.theme-dark {
  background: radial-gradient(circle at 20% 20%, rgba(34, 34, 34, 0.9), rgba(17, 17, 17, 0.95));
  color: #e5e7eb;
}

body.theme-dark .content-wrapper {
  background: rgba(15, 23, 42, 0.85);
  border-color: rgba(148, 163, 184, 0.08);
  box-shadow: 0 20px 40px rgba(15, 23, 42, 0.3);
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
  z-index: -9999;
}

.skip-link:focus {
  left: 50%;
  top: 12px;
  transform: translateX(-50%);
  width: auto;
  height: auto;
  padding: var(--spacing-sm) var(--spacing-lg);
  background: var(--primary-600);
  color: #fff;
  border-radius: var(--radius-full);
  z-index: 9999;
  box-shadow: var(--shadow-lg);
}

/* 背景装饰图案 */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: 
    radial-gradient(circle at 20% 50%, rgba(34, 197, 94, 0.05) 0%, transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(236, 72, 153, 0.05) 0%, transparent 50%),
    radial-gradient(circle at 40% 20%, rgba(34, 197, 94, 0.03) 0%, transparent 50%);
  pointer-events: none;
  z-index: 0;
}

/* ============================================
   容器和布局
   ============================================ */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--spacing-lg);
  position: relative;
  z-index: 1;
}

.content-wrapper {
  max-width: 1200px;
  margin: var(--spacing-xl) auto;
  padding: var(--spacing-2xl) var(--spacing-lg);
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(20px);
  border-radius: var(--radius-2xl);
  box-shadow: var(--shadow-xl);
  min-height: calc(100vh - 200px);
  border: 1px solid rgba(255, 255, 255, 0.8);
  position: relative;
  z-index: 1;
}

.content-wrapper--with-alert {
  margin-top: calc(var(--spacing-xl) + 80px);
}

/* ============================================
   导航栏 - 现代化设计
   ============================================ */
.navbar {
  background: #f0fdf4;
  border-bottom: 1px solid rgba(34, 197, 94, 0.18);
  padding: var(--spacing-md) 0;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 8px 18px -12px rgba(22, 163, 74, 0.25);
  margin-bottom: var(--spacing-xl);
}

.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.navbar-brand {
  font-size: var(--font-size-2xl);
  font-weight: 800;
  color: var(--primary-700);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  transition: transform var(--transition-base);
  background: linear-gradient(135deg, var(--primary-600), var(--primary-400));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.navbar-brand:hover {
  transform: scale(1.05);
}

.navbar-brand .logo-icon {
  font-size: var(--font-size-3xl);
  display: inline-block;
  animation: gentleBounce 2s ease-in-out infinite;
}

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

.navbar-nav {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-link {
  color: #4f4f4f;
  text-decoration: none;
  padding: var(--spacing-sm) var(--spacing-lg);
  border-radius: var(--radius-full);
  font-weight: 500;
  transition: all var(--transition-base);
  position: relative;
  display: flex;
  align-items: center;
  gap: var(--spacing-xs);
}

.nav-link::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%) scaleX(0);
  width: 80%;
  height: 2px;
  background: linear-gradient(90deg, var(--primary-500), var(--accent-500));
  border-radius: var(--radius-full);
  transition: transform var(--transition-base);
}

.nav-link:hover,
.nav-link.active {
  color: var(--primary-600);
  background: rgba(34, 197, 94, 0.12);
}

.nav-link:hover::before,
.nav-link.active::before {
  transform: translateX(-50%) scaleX(1);
}

.site-header .navbar-toggler {
  border: none;
}

.site-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--primary-600);
  font-weight: 600;
  font-size: 1.5rem;
  letter-spacing: 0.05em;
  text-decoration: none;
  background: none !important;
  -webkit-text-fill-color: currentColor;
  -webkit-background-clip: initial;
  background-clip: initial;
}

.site-logo .logo-icon {
  font-size: 1.9rem;
  filter: drop-shadow(0 6px 12px rgba(34, 197, 94, 0.25));
}

.site-nav-list .nav-link {
  font-size: 1rem;
  font-weight: 600;
  color: #333333;
}

.site-nav-list .nav-link i {
  font-size: 0.9rem;
  color: inherit;
}

.site-nav-actions .nav-link {
  font-weight: 600;
  color: var(--primary-700);
}

.site-nav-actions .dropdown-menu {
  border-radius: 16px;
  border: 1px solid rgba(34, 197, 94, 0.18);
  box-shadow: 0 18px 45px -20px rgba(22, 163, 74, 0.28);
}

/* ============================================
   按钮 - 现代化设计
   ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--spacing-xs);
  padding: var(--spacing-sm) var(--spacing-xl);
  font-size: var(--font-size-base);
  font-weight: 600;
  line-height: 1.5;
  text-align: center;
  text-decoration: none;
  border: none;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
  background: transparent;
}

.btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transition: left 0.5s ease;
}

.btn:hover::before {
  left: 100%;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary-500), var(--primary-600));
  color: white;
  box-shadow: var(--shadow-colored);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-xl);
  color: white;
}

.btn-secondary {
  background: var(--gray-100);
  color: var(--text-primary);
}

.btn-secondary:hover {
  background: var(--gray-200);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-success {
  background: linear-gradient(135deg, var(--primary-500), var(--primary-600));
  color: white;
  box-shadow: var(--shadow-colored);
}

.btn-success:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-xl);
  color: white;
}

.btn-info {
  background: linear-gradient(135deg, var(--info), #2563eb);
  color: white;
}

.btn-info:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  color: white;
}

.btn-sm {
  padding: var(--spacing-xs) var(--spacing-md);
  font-size: var(--font-size-sm);
}

.btn-lg {
  padding: var(--spacing-md) var(--spacing-2xl);
  font-size: var(--font-size-lg);
}

.btn-block {
  width: 100%;
}

/* ============================================
   卡片 - 现代化玻璃态设计
   ============================================ */
.card {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  border-radius: var(--radius-xl);
  border: 1px solid rgba(0, 0, 0, 0.05);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  transition: all var(--transition-base);
  position: relative;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-xl);
  border-color: rgba(34, 197, 94, 0.2);
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary-500), var(--accent-500));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--transition-base);
}

.card:hover::before {
  transform: scaleX(1);
}

.card-header {
  padding: var(--spacing-lg);
  background: linear-gradient(135deg, var(--primary-50), var(--accent-50));
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  font-weight: 700;
  color: var(--text-primary);
}

.card-body {
  padding: var(--spacing-lg);
}

.card-img-top {
  width: 100%;
  height: 250px;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

.card:hover .card-img-top {
  transform: scale(1.05);
}

/* ============================================
   表单 - 现代化设计
   ============================================ */
.form-group {
  margin-bottom: var(--spacing-lg);
}

.form-label {
  display: block;
  margin-bottom: var(--spacing-xs);
  font-weight: 600;
  color: var(--text-primary);
  font-size: var(--font-size-sm);
}

.form-control {
  width: 100%;
  padding: var(--spacing-sm) var(--spacing-md);
  font-size: var(--font-size-base);
  line-height: 1.5;
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.9);
  border: 2px solid var(--gray-200);
  border-radius: var(--radius-lg);
  transition: all var(--transition-base);
}

.form-control:focus {
  outline: none;
  border-color: var(--primary-500);
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.1);
  background: white;
}

.form-control::placeholder {
  color: var(--text-tertiary);
}

textarea.form-control {
  resize: vertical;
  min-height: 120px;
}

select.form-control {
  cursor: pointer;
  min-width: 100%;
  width: 100%;
  padding: var(--spacing-sm) var(--spacing-md);
  padding-right: 2.5rem; /* 为下拉箭头留出空间 */
  font-size: var(--font-size-base);
  line-height: 1.5;
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.9);
  border: 2px solid var(--gray-200);
  border-radius: var(--radius-lg);
  transition: all var(--transition-base);
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23333' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-size: 1rem;
  white-space: nowrap;
  overflow: visible;
  text-overflow: clip;
  box-sizing: border-box;
  position: relative;
  z-index: 1;
}

/* 自定义下拉菜单组件样式 */
.custom-select-wrapper {
  position: relative;
  width: 100%;
  display: block;
}

.custom-select {
  position: relative;
  width: 100%;
  padding: 0.875rem 2.5rem 0.875rem 1rem;
  font-size: 1rem;
  line-height: 1.5;
  color: var(--text-primary);
  background-color: rgba(255, 255, 255, 0.95);
  border: 2px solid var(--gray-200);
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all var(--transition-base);
  display: flex;
  align-items: center;
  min-height: 48px;
  box-sizing: border-box;
}

.custom-select:hover {
  border-color: var(--primary-500);
  background-color: var(--primary-50);
}

.custom-select:focus,
.custom-select.active {
  outline: none;
  border-color: var(--primary-500);
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.1);
  background-color: white;
}

.custom-select::after {
  content: '';
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  width: 0;
  height: 0;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-top: 8px solid var(--text-secondary);
  pointer-events: none;
  transition: transform var(--transition-base);
}

.custom-select.active::after {
  transform: translateY(-50%) rotate(180deg);
}

.custom-select-placeholder {
  color: var(--text-tertiary);
}

.custom-select-options {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: white;
  border: 2px solid var(--primary-500);
  border-top: none;
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  box-shadow: var(--shadow-xl);
  z-index: 1000;
  max-height: 300px;
  overflow-y: auto;
  display: none;
  margin-top: -2px;
}

.custom-select.active .custom-select-options {
  display: block;
}

.custom-select-option {
  padding: 0.75rem 1rem;
  font-size: 1rem;
  line-height: 1.5;
  color: var(--text-primary);
  cursor: pointer;
  transition: all var(--transition-base);
  border-bottom: 1px solid var(--gray-100);
  display: block;
  width: 100%;
  text-align: left;
  background: none;
  border-left: none;
  border-right: none;
  border-top: none;
}

.custom-select-option:last-child {
  border-bottom: none;
}

.custom-select-option:hover {
  background-color: var(--primary-50);
  color: var(--primary-700);
}

.custom-select-option.selected {
  background-color: var(--primary-100);
  color: var(--primary-700);
  font-weight: 600;
}

/* 隐藏原生select，但保留它以用于表单提交 */
.custom-select-wrapper select.native-select {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* 下拉菜单选项样式 - 移除所有padding和margin确保文字完整显示 */
select.form-control option {
  padding: 0 1rem !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  padding-left: 1rem !important;
  padding-right: 1rem !important;
  font-size: 1rem !important;
  line-height: 1.8 !important;
  color: var(--text-primary) !important;
  background-color: white !important;
  white-space: normal !important;
  word-wrap: break-word !important;
  word-break: break-word !important;
  min-height: auto !important;
  height: auto !important;
  display: block !important;
  width: auto !important;
  overflow: visible !important;
  text-overflow: clip !important;
  margin: 0 !important;
  margin-top: 0 !important;
  margin-bottom: 0 !important;
  border: none !important;
  vertical-align: baseline !important;
  /* 移除可能导致显示问题的样式 */
  -webkit-appearance: none;
  -moz-appearance: none;
}

/* 针对Chrome/Edge的特殊处理 */
select.form-control option {
  padding: 0 1rem !important;
  line-height: 1.8 !important;
}

/* 针对Firefox的特殊处理 */
@-moz-document url-prefix() {
  select.form-control option {
    padding: 0 1rem !important;
    line-height: 1.8 !important;
  }
}

/* 针对Safari的特殊处理 */
_::-webkit-full-page-media, _:future, :root select.form-control option {
  padding: 0.25rem 1rem !important;
  line-height: 1.8 !important;
}

/* 下拉菜单打开时的样式 - 确保有足够的空间 */
select.form-control:focus,
select.form-control:active {
  min-width: 100%;
  width: 100%;
  overflow: visible;
  z-index: 1000;
  position: relative;
}

/* 确保下拉菜单容器有足够宽度 */
.form-group select.form-control {
  min-width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.form-check {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  margin-bottom: var(--spacing-md);
}

.form-check-input {
  width: 1.25rem;
  height: 1.25rem;
  cursor: pointer;
  accent-color: var(--primary-500);
}

.form-text {
  display: block;
  margin-top: var(--spacing-xs);
  font-size: var(--font-size-sm);
  color: var(--text-tertiary);
}

/* ============================================
   徽章和标签
   ============================================ */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.75rem;
  font-size: var(--font-size-xs);
  font-weight: 600;
  line-height: 1;
  border-radius: var(--radius-full);
  background: var(--primary-100);
  color: var(--primary-700);
}

.badge-light {
  background: var(--gray-100);
  color: var(--text-secondary);
}

/* ============================================
   提示框 - 固定在顶部，不遮挡内容
   ============================================ */
.alert {
  position: fixed;
  top: 80px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  max-width: 600px;
  width: calc(100% - 2rem);
  padding: var(--spacing-md) var(--spacing-lg);
  margin: 0;
  border-radius: var(--radius-lg);
  border: 1px solid transparent;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--spacing-md);
  box-shadow: var(--shadow-xl);
  animation: slideDown 0.3s ease-out;
}

/* 页面内的alert应该使用相对定位 */
.content-wrapper .alert,
.auth-container .alert,
.card .alert {
  position: relative !important;
  top: auto !important;
  left: auto !important;
  transform: none !important;
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 0 var(--spacing-md) 0 !important;
  animation: none;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

.alert-success {
  background: var(--primary-50);
  border-color: var(--primary-200);
  color: var(--primary-800);
  border-left: 4px solid var(--primary-500);
}

.alert-danger {
  background: #fef2f2;
  border-color: #fecaca;
  color: #991b1b;
  border-left: 4px solid var(--error);
}

.alert-info {
  background: #eff6ff;
  border-color: #bfdbfe;
  color: #1e40af;
  border-left: 4px solid var(--info);
}

.alert .close {
  background: none;
  border: none;
  font-size: var(--font-size-2xl);
  line-height: 1;
  cursor: pointer;
  opacity: 0.5;
  transition: opacity var(--transition-base);
  padding: 0;
  margin-left: var(--spacing-md);
  flex-shrink: 0;
}

.alert .close:hover {
  opacity: 1;
}

.alert i {
  flex-shrink: 0;
}

.alert-message {
  flex: 1;
  margin: 0;
}

/* 自动关闭动画 */
.alert.fade {
  animation: fadeOut 0.3s ease-out forwards;
}

@keyframes fadeOut {
  from {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
  to {
    opacity: 0;
    transform: translateX(-50%) translateY(-20px);
  }
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.8;
  }
}

@media (max-width: 768px) {
  .alert {
    top: 70px;
    width: calc(100% - 1rem);
    padding: var(--spacing-sm) var(--spacing-md);
    font-size: var(--font-size-sm);
  }
}

/* ============================================
   头像
   ============================================ */
.avatar-small {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  object-fit: cover;
  border: 3px solid var(--primary-100);
  box-shadow: var(--shadow-sm);
}

.avatar-large {
  width: 150px;
  height: 150px;
  border-radius: var(--radius-full);
  object-fit: cover;
  border: 5px solid var(--primary-100);
  box-shadow: var(--shadow-lg);
}

/* ============================================
   标题样式
   ============================================ */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.2;
  color: var(--text-primary);
  margin-bottom: var(--spacing-md);
}

h1 { font-size: var(--font-size-4xl); }
h2 { font-size: var(--font-size-3xl); }
h3 { font-size: var(--font-size-2xl); }
h4 { font-size: var(--font-size-xl); }
h5 { font-size: var(--font-size-lg); }
h6 { font-size: var(--font-size-base); }

.page-title {
  position: relative;
  display: inline-block;
  background: linear-gradient(135deg, var(--primary-600), var(--accent-500));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: var(--spacing-xl);
  padding-bottom: var(--spacing-md);
}

.page-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 60px;
  height: 3px;
  background: linear-gradient(90deg, var(--primary-500), var(--accent-500));
  border-radius: var(--radius-full);
}

/* ============================================
   网格布局
   ============================================ */
.pet-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: var(--spacing-xl);
}

.row {
  display: flex;
  flex-wrap: wrap;
  margin: 0 calc(-1 * var(--spacing-md));
}

.col-md-3,
.col-md-4,
.col-md-6,
.col-md-8,
.col-md-12 {
  padding: 0 var(--spacing-md);
}

.col-md-3 { flex: 0 0 25%; max-width: 25%; }
.col-md-4 { flex: 0 0 33.333333%; max-width: 33.333333%; }
.col-md-6 { flex: 0 0 50%; max-width: 50%; }
.col-md-8 { flex: 0 0 66.666667%; max-width: 66.666667%; }
.col-md-12 { flex: 0 0 100%; max-width: 100%; }

/* ============================================
   轮播图
   ============================================ */
.carousel {
  position: relative;
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.carousel-item img {
  width: 100%;
  height: 500px;
  object-fit: cover;
  border-radius: var(--radius-xl);
}

@media (max-width: 768px) {
  .carousel-item img {
    height: 300px;
  }
}

.carousel-control-prev,
.carousel-control-next {
  width: 50px;
  height: 50px;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  border-radius: var(--radius-full);
  top: 50%;
  transform: translateY(-50%);
  opacity: 0.8;
  transition: all var(--transition-base);
}

.carousel-control-prev:hover,
.carousel-control-next:hover {
  opacity: 1;
  background: white;
}

/* ============================================
   留言板
   ============================================ */
.messages-container {
  max-height: 500px;
  overflow-y: auto;
  padding-right: var(--spacing-sm);
}

.messages-container::-webkit-scrollbar {
  width: 8px;
}

.messages-container::-webkit-scrollbar-track {
  background: var(--gray-100);
  border-radius: var(--radius-full);
}

.messages-container::-webkit-scrollbar-thumb {
  background: var(--primary-300);
  border-radius: var(--radius-full);
}

.messages-container::-webkit-scrollbar-thumb:hover {
  background: var(--primary-400);
}

.message-item {
  padding: var(--spacing-lg);
  margin-bottom: var(--spacing-md);
  background: var(--gray-50);
  border-radius: var(--radius-lg);
  border-left: 4px solid var(--primary-500);
  transition: all var(--transition-base);
}

.message-item:hover {
  background: var(--primary-50);
  transform: translateX(4px);
}

/* ============================================
   页脚
   ============================================ */
footer {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  padding: var(--spacing-2xl) 0;
  margin-top: var(--spacing-2xl);
  border-top: 1px solid rgba(0, 0, 0, 0.05);
  color: var(--text-secondary);
  position: relative;
  z-index: 1;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--spacing-xl);
  margin-bottom: var(--spacing-xl);
}

.footer-section h5 {
  color: var(--text-primary);
  margin-bottom: var(--spacing-md);
  font-size: var(--font-size-lg);
}

.footer-section p {
  color: var(--text-secondary);
  line-height: 1.6;
  font-size: var(--font-size-sm);
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-links li {
  margin-bottom: var(--spacing-sm);
}

.footer-links a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: all var(--transition-base);
  display: inline-flex;
  align-items: center;
  gap: var(--spacing-xs);
}

@media (min-width: 992px) {
  .footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-md);
  }

  .footer-links li {
    margin-bottom: 0;
  }
}

.footer-links a:hover {
  color: var(--primary-600);
  transform: translateX(4px);
}

.footer-links a::before {
  content: '→';
  opacity: 0;
  transition: opacity var(--transition-base);
}

.footer-links a:hover::before {
  opacity: 1;
}

.footer-bottom {
  text-align: center;
  padding-top: var(--spacing-xl);
  border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.footer-bottom p {
  margin: var(--spacing-xs) 0;
  color: var(--text-secondary);
}

.footer-icp a {
  color: var(--text-tertiary) !important;
  text-decoration: none;
  transition: all var(--transition-base);
}

.footer-icp a:hover {
  color: var(--primary-600) !important;
  text-decoration: underline;
}

/* ============================================
   动画
   ============================================ */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in {
  animation: fadeIn 0.6s ease-out;
}

.stagger-item {
  opacity: 0;
  animation: fadeIn 0.8s ease-out forwards;
}

.stagger-item:nth-child(1) { animation-delay: 0.1s; }
.stagger-item:nth-child(2) { animation-delay: 0.2s; }
.stagger-item:nth-child(3) { animation-delay: 0.3s; }
.stagger-item:nth-child(4) { animation-delay: 0.4s; }
.stagger-item:nth-child(5) { animation-delay: 0.5s; }

/* ============================================
   工具类
   ============================================ */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-left { text-align: left; }

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: var(--spacing-xs); }
.mb-2 { margin-bottom: var(--spacing-sm); }
.mb-3 { margin-bottom: var(--spacing-md); }
.mb-4 { margin-bottom: var(--spacing-lg); }
.mb-5 { margin-bottom: var(--spacing-xl); }
.mb-6 { margin-bottom: var(--spacing-2xl); }

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: var(--spacing-xs); }
.mt-2 { margin-top: var(--spacing-sm); }
.mt-3 { margin-top: var(--spacing-md); }
.mt-4 { margin-top: var(--spacing-lg); }
.mt-5 { margin-top: var(--spacing-xl); }
.mt-6 { margin-top: var(--spacing-2xl); }

.mr-2 { margin-right: var(--spacing-sm); }

.text-muted { color: var(--text-tertiary); }
.text-primary { color: var(--primary-600) !important; }
.text-danger { color: var(--error) !important; }
.text-sm { font-size: var(--font-size-sm); }
.text-xs { font-size: var(--font-size-xs); }
.text-white { color: white !important; }

.d-flex { display: flex; }
.justify-content-between { justify-content: space-between; }
.justify-content-center { justify-content: center; }
.align-items-center { align-items: center; }

.list-unstyled {
  list-style: none;
  padding: 0;
}

.h-100 { height: 100%; }
.flex-grow-1 { flex-grow: 1; }
.py-5 { padding-top: 3rem; padding-bottom: 3rem; }
.mb-0 { margin-bottom: 0; }

/* ============================================
   响应式设计
   ============================================ */
@media (max-width: 768px) {
  .container {
    padding: 0 var(--spacing-md);
  }
  
  .content-wrapper {
    padding: var(--spacing-lg) var(--spacing-md);
    margin: var(--spacing-lg) var(--spacing-md);
    border-radius: var(--radius-lg);
  }
  
  .content-wrapper--with-alert {
    margin-top: calc(var(--spacing-lg) + 60px);
  }
  
  .navbar-nav {
    flex-direction: column;
    width: 100%;
    margin-top: var(--spacing-md);
  }
  
  .pet-grid {
    grid-template-columns: 1fr;
  }
  
  .col-md-3,
  .col-md-4,
  .col-md-6,
  .col-md-8 {
    flex: 0 0 100%;
    max-width: 100%;
  }
  
  h1 { font-size: var(--font-size-3xl); }
  h2 { font-size: var(--font-size-2xl); }
  h3 { font-size: var(--font-size-xl); }
  
  .card-img-top,
  .carousel-item img {
    height: 200px !important;
  }
}

/* ============================================
   宠物类型主题
   ============================================ */
.cat-theme {
  border-left: 4px solid #f472b6;
  background: linear-gradient(90deg, rgba(244, 114, 182, 0.05) 0%, transparent 100%);
}

.dog-theme {
  border-left: 4px solid #3b82f6;
  background: linear-gradient(90deg, rgba(59, 130, 246, 0.05) 0%, transparent 100%);
}

.other-theme {
  border-left: 4px solid var(--primary-500);
  background: linear-gradient(90deg, rgba(34, 197, 94, 0.05) 0%, transparent 100%);
}

/* ============================================
   Bootstrap组件增强
   ============================================ */
.navbar-toggler {
  border: 2px solid var(--gray-300);
  border-radius: var(--radius-md);
  padding: 0.5rem 0.75rem;
  background: transparent;
  transition: all var(--transition-base);
}

.navbar-toggler:hover {
  border-color: var(--primary-500);
  background: var(--primary-50);
}

.navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='30' height='30' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%2834, 197, 94, 0.75%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

.dropdown-menu {
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(0, 0, 0, 0.05);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: var(--spacing-xs);
  margin-top: var(--spacing-xs);
}

.dropdown-item {
  padding: var(--spacing-sm) var(--spacing-md);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  transition: all var(--transition-base);
  display: flex;
  align-items: center;
}

.dropdown-item:hover {
  background: var(--primary-50);
  color: var(--primary-700);
}

.dropdown-item i {
  width: 20px;
  text-align: center;
}

.dropdown-divider {
  border-top: 1px solid var(--gray-200);
  margin: var(--spacing-xs) 0;
}

/* 文件上传样式 */
.form-control-file {
  display: block;
  width: 100%;
  padding: var(--spacing-sm) var(--spacing-md);
  font-size: var(--font-size-base);
  line-height: 1.5;
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.9);
  border: 2px dashed var(--gray-300);
  border-radius: var(--radius-lg);
  transition: all var(--transition-base);
  cursor: pointer;
  margin-bottom: var(--spacing-xs);
}

.form-control-file:hover {
  border-color: var(--primary-500);
  background: var(--primary-50);
}

.form-control-file:focus {
  outline: none;
  border-color: var(--primary-500);
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.1);
  background: white;
}

/* 确保文件上传后的说明文字不被遮挡 */
.form-group .form-text {
  display: block;
  margin-top: var(--spacing-sm);
  clear: both;
}

/* 图片缩略图 */
.img-thumbnail {
  border: 2px solid var(--gray-200);
  border-radius: var(--radius-md);
  padding: 2px;
  background: white;
  transition: all var(--transition-base);
}

.img-thumbnail:hover {
  border-color: var(--primary-500);
  transform: scale(1.05);
}

/* 空白状态 */
.bg-secondary.text-white {
  background: linear-gradient(135deg, var(--gray-200), var(--gray-300)) !important;
  color: var(--text-secondary) !important;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 200px;
}

.bg-secondary.text-white i {
  opacity: 0.5;
  margin-bottom: var(--spacing-md);
}