/* 现代风格界面样式 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Microsoft YaHei', '微软雅黑', Arial, sans-serif;
}

:root {
  --primary-color: #ff7a7a; /* 粉色主色调 */
  --sidebar-bg: #ffffff;
  --main-bg: #ffffff;
  --text-color: #333;
  --text-color-light: #999;
  --border-color: #eeeeee;
  --card-border: #f0f0f0;
  --card-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  --btn-danger: #ff5c5c;
  --btn-danger-hover: #ff3c3c;
}

body {
  background-color: var(--main-bg);
  color: var(--text-color);
  height: 100vh;
  width: 100vw;
  overflow: hidden;
  font-size: 14px;
  user-select: none;
}

/* 主容器 */
.app-container {
  display: flex;
  width: 100%;
  height: 100%;
}

/* 侧边栏 */
.sidebar {
  width: 80px;
  height: 100%;
  background-color: var(--sidebar-bg);
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px 0;
}

.avatar-container {
  width: 60px;
  height: 60px;
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 30px;
  background-color: #f8f8f8;
  display: flex;
  justify-content: center;
  align-items: center;
}

.avatar-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.sidebar-menu {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
}

.menu-item {
  width: 48px;
  height: 48px;
  margin: 8px 0;
  border-radius: 12px;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  color: var(--text-color-light);
  font-size: 24px;
  transition: all 0.2s;
}

.menu-item:hover {
  background-color: #f5f5f5;
  color: var(--primary-color);
}

.menu-item.active {
  background-color: rgba(255, 122, 122, 0.1);
  color: var(--primary-color);
}

/* 主内容区域 */
.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 20px 30px;
  overflow: hidden;
}

/* 标题栏 */
.title-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 40px;
  margin-bottom: 10px;
  padding-right: 10px;
  -webkit-app-region: drag;
}

.window-controls {
  display: flex;
}

.window-control-btn {
  width: 30px;
  height: 30px;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-left: 5px;
  border-radius: 4px;
  cursor: pointer;
  -webkit-app-region: no-drag;
}

.window-control-btn:hover {
  background-color: rgba(0, 0, 0, 0.05);
}

.window-control-btn.close:hover {
  background-color: #ff5252;
  color: white;
}

/* 页面标题 */
.page-title {
  font-size: 24px;
  font-weight: 600;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
}

.page-title::after {
  content: "";
  display: inline-block;
  width: 5px;
  height: 24px;
  background-color: var(--primary-color);
  margin-left: 10px;
  border-radius: 3px;
}

.title-divider {
  color: #ddd;
  margin: 0 10px;
  font-weight: 300;
}

.subtitle {
  font-size: 14px;
  color: var(--text-color-light);
  margin-bottom: 20px;
}

/* 搜索框 */
.search-container {
  width: 100%;
  margin-bottom: 20px;
}

.search-input {
  width: 100%;
  height: 45px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 0 15px;
  font-size: 14px;
  outline: none;
  transition: all 0.3s;
}

.search-input:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 2px rgba(255, 122, 122, 0.2);
}

.search-input::placeholder {
  color: var(--text-color-light);
}

/* 宠物卡片容器 */
.pet-cards-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 20px;
  overflow-y: auto;
  padding-right: 5px;
  flex: 1;
}

/* 宠物卡片 */
.pet-card {
  background-color: white;
  border-radius: 12px;
  border: 1px solid var(--card-border);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px;
  transition: all 0.3s ease;
  position: relative;
}

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

.pet-image-container {
  width: 120px;
  height: 160px;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 15px;
}

.pet-image {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.pet-name {
  font-weight: 600;
  font-size: 18px;
  margin-bottom: 10px;
}

.pet-action-select {
  width: 100%;
  height: 36px;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  margin-bottom: 15px;
  padding: 0 10px;
  background-color: #f9f9f9;
  outline: none;
  cursor: pointer;
}

.pet-action-select:focus {
  border-color: var(--primary-color);
}

.delete-btn {
  width: 100%;
  height: 36px;
  background-color: white;
  border: 1px solid var(--btn-danger);
  color: var(--btn-danger);
  border-radius: 6px;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 14px;
}

.delete-btn i {
  margin-right: 5px;
  font-size: 16px;
}

.delete-btn:hover {
  background-color: var(--btn-danger);
  color: white;
}

/* 添加宠物卡片 */
.add-pet-card {
  background-color: #f9f9f9;
  border-radius: 12px;
  border: 2px dashed #ddd;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  min-height: 300px;
  cursor: pointer;
  transition: all 0.3s;
}

.add-pet-card:hover {
  border-color: var(--primary-color);
  background-color: rgba(255, 122, 122, 0.05);
}

.add-icon {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background-color: #f0f0f0;
  color: var(--text-color-light);
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 30px;
  margin-bottom: 15px;
}

.add-pet-card:hover .add-icon {
  background-color: var(--primary-color);
  color: white;
}

/* 底部工具栏 */
.bottom-tools {
  margin-top: 20px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  border-top: 1px solid var(--border-color);
  padding-top: 10px;
}

.theme-toggle {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  color: var(--text-color-light);
  transition: all 0.2s;
}

.theme-toggle:hover {
  background-color: #f0f0f0;
  color: var(--text-color);
}

/* 滚动条样式 */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: #ddd;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #ccc;
}

/* 窗口标题栏，使其可拖动 */
.header {
  -webkit-app-region: drag;
  height: 40px;
  width: 100%;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 100;
}

/* 暗黑模式样式 */
body.dark-mode {
  --primary-color: #ff7a7a;
  --sidebar-bg: #1f1f1f;
  --main-bg: #121212;
  --text-color: #e0e0e0;
  --text-color-light: #a0a0a0;
  --border-color: #2c2c2c;
  --card-border: #2c2c2c;
  --card-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  --btn-danger: #ff5c5c;
  --btn-danger-hover: #ff3c3c;
  
  background-color: var(--main-bg);
  color: var(--text-color);
}

body.dark-mode .main-content {
  background-color: var(--main-bg);
}

body.dark-mode .sidebar {
  background-color: var(--sidebar-bg);
  border-right-color: var(--border-color);
}

body.dark-mode .pet-card,
body.dark-mode .search-input,
body.dark-mode .pet-action-select {
  background-color: #232323;
  border-color: var(--card-border);
  color: var(--text-color);
}

body.dark-mode .search-input::placeholder {
  color: var(--text-color-light);
}

body.dark-mode .add-pet-card {
  background-color: #232323;
  border-color: #444;
}

body.dark-mode .add-pet-card:hover {
  border-color: var(--primary-color);
  background-color: rgba(255, 122, 122, 0.1);
}

body.dark-mode .window-control-btn {
  color: var(--text-color);
}

body.dark-mode .window-control-btn:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

body.dark-mode .window-control-btn.close:hover {
  background-color: #ff5252;
}

body.dark-mode .theme-toggle {
  color: #ffc107;
}

body.dark-mode ::-webkit-scrollbar-track {
  background: transparent;
}

body.dark-mode ::-webkit-scrollbar-thumb {
  background: #444;
}

body.dark-mode ::-webkit-scrollbar-thumb:hover {
  background: #555;
}

body.dark-mode .delete-btn {
  background-color: transparent;
}

/* 切换动画 */
body, body * {
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
} 