:root {
  --primary-color: #ff6f61; /* 主色调：橙色 */
  --secondary-color: #2ecc71; /* 绿色：收入、剩余 */
  --accent-color: #3498db; /* 蓝色：按钮、导航 */
  --text-color: #333; /* 主要文字颜色 */
  --background-color: #f1f5f9; /* 背景色 */
  --card-background: #fff; /* 卡片背景 */
  --shadow: 0 4px 12px rgba(0, 0, 0, 0.1); /* 阴影 */
  --transition: all 0.3s ease; /* 过渡动画 */
  --border-radius: 8px; /* 圆角 */
  --font-size-base: 16px; /* 基础字体大小 */
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Roboto', Arial, sans-serif;
  background-color: var(--background-color);
  color: var(--text-color);
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  overflow-x: hidden;
}

/* 内容容器 */
.content-container {
  width: 100%;
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  background: rgba(255, 255, 255, 0.8); /* 支持毛玻璃效果 */
}

/* 应用容器 */
.app-container {
  width: 100%;
  max-width: 420px;
  height: 100%;
  background: var(--card-background);
  box-shadow: var(--shadow);
  border-radius: 12px;
  overflow-y: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding: 10px;
  display: flex;
  flex-direction: column;
  position: relative;
  will-change: opacity, filter;
  background: radial-gradient(circle at center, rgba(255, 255, 255, 0.9) 0%, rgba(255, 255, 255, 0.7) 100%);
      background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    border-radius: 10px;
}

.app-container::-webkit-scrollbar {
  width: 0;
}

/* 通用按钮样式 */
.btn {
  padding: 10px 20px;
  border: none;
  border-radius: var(--border-radius);
  font-size: var(--font-size-base);
  cursor: pointer;
  transition: var(--transition);
  background-color: var(--primary-color);
  color: white;
}

.btn:hover {
  transform: scale(1.05);
  background-color: #e65a50;
}

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

.btn-secondary:hover {
  background-color: #27ae60;
}

.btn-accent {
  background-color: var(--accent-color);
}

.btn-accent:hover {
  background-color: #2980b9;
}

/* Hover 动画 */
.hover-scale {
  transition: transform 0.2s ease;
}

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

.hover-shadow {
  transition: box-shadow 0.2s ease;
}

.hover-shadow:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* 高级动画 */
@keyframes fadeIn {
  from { opacity: 0; transform: scale(0.98); filter: blur(10px); }
  to { opacity: 1; transform: scale(1); filter: blur(0); }
}

@keyframes fadeOut {
  from { opacity: 1; transform: scale(1); filter: blur(0); }
  to { opacity: 0; transform: scale(0.98); filter: blur(10px); }
}

@keyframes modalOpen {
  from { opacity: 0; transform: scale(0.9); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes modalClose {
  from { opacity: 1; transform: scale(1); }
  to { opacity: 0; transform: scale(0.9); }
}

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

.fade-in {
  animation: fadeIn 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.fade-out {
  animation: fadeOut 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.monthly-summary.fade-in,
.transaction-list.fade-in,
.statistics-container.fade-in,
.mine-container.fade-in,
.assets-container.fade-in {
  animation-delay: 0.1s;
  backdrop-filter: blur(2px);
}

.modal-open {
  animation: modalOpen 0.3s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.modal-close {
  animation: modalClose 0.3s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

/* 输入框样式 */
input, select {
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: var(--border-radius);
  font-size: var(--font-size-base);
  transition: border-color 0.3s ease, transform 0.2s ease;
}

input:focus, select:focus {
  outline: none;
  border-color: var(--primary-color);
  transform: scale(1.02);
}

/* 月度汇总 */
.monthly-summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #f9f9f9;
  /*padding: 12px 26px;*/
  border-radius: 10px;
  box-shadow: var(--shadow);
  margin: 10px 0;
}

.summary-left {
  position: relative;
  margin-right: 40px;
}

#budgetChart {
  width: 100px !important;
  height: 100px !important;
}

.remaining-percentage {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
}

#remaining-text {
  display: block;
  font-size: 16px;
  color: #666;
}

#remaining-percent {
  font-size: 22px;
  font-weight: bold;
  color: var(--secondary-color);
}

.summary-right {
  flex: 1;
  padding-left: 5px;
}

.summary-info {
  display: flex;
  flex-direction: column;
  gap: 0px;
}

.summary-item {
  display: flex;
  justify-content: space-between;
  padding: 4px 10px;
  background: #f9f9f9;
  border-radius: var(--border-radius);
  transition: var(--transition);
}

.summary-item:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.label {
  font-size: 15px;
  color: #666;
}

.value {
  font-size: 16px;
  font-weight: bold;
}

.budget-value { color: #333; }
.spent-value { color: var(--primary-color); }
.remaining-value { color: var(--secondary-color); }

/* 搜索框 */
.input-wrapper {
  /*margin: 10px 0;*/
}

#search-box {
  width: 100%;
  padding: 12px;
  border: 1px solid #ddd;
  border-radius: var(--border-radius);
  font-size: 13px;
}

.custom-hr {
  border: none;
  height: 1px;
  background: #e0e0e0;
  margin: 15px 0;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* 账单列表 */
.transaction-list {
  padding: 0 0px 100px;
}

.transaction-date-header {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  color: #666;
  font-weight: bold;
  padding: 10px 5px;
}

.transaction-date-summary {
  font-size: 14px;
  color: #888;
}

.transaction-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 20px;
  background: #fafafa;
  border-radius: var(--border-radius);
  margin: 2px 0;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
  cursor: pointer;
  transition: var(--transition);
}

.transaction-item:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.transaction-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.transaction-info svg {
  width: 24px;
  height: 24px;
}

.transaction-info span {
  font-size: 14px;
}

.transaction-amount {
  font-size: 14px;
  font-weight: bold;
  color: #e74c3c;
}

.transaction-amount.income {
  color: var(--secondary-color);
}

/* 统计页面 */
.statistics-container {
  padding: 5px 0px 80px;
}

.statistics-container h2 {
  font-size: 20px;
  margin-bottom: 10px;
  text-align: center;
}

.toggle-type {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-bottom: 15px;
}

.toggle-type button {
  flex: 1;
  max-width: 120px;
  padding: 10px;
  border: none;
  border-radius: var(--border-radius);
  font-size: var(--font-size-base);
  background: #e8e8e8;
  cursor: pointer;
  transition: var(--transition);
}

.toggle-type button:hover {
  background: #d0d0d0;
}

.toggle-type button.active {
  background: var(--secondary-color);
  color: white;
}

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

.statistics-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 15px;
  /*background: var(--card-background);*/
  border-bottom: 1px solid #f0f0f0;
  transition: var(--transition);
}

.statistics-list li:hover {
  background: #f5f5f5;
}

.statistics-list li .svg-icon {
  width: 25px;
  height: 25px;
  margin-right: 10px;
  fill: var(--primary-color);
}

.statistics-list li span:first-of-type {
  flex: 1;
  font-size: 16px;
}

.statistics-list li span:last-of-type {
  font-size: 16px;
  color: #666;
}

.canvasimg {
  padding: 15px;
  background: #fafafa;
  border-radius: 10px;
  margin-bottom: 15px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.canvasimg.zzt {
  display: flex;
  justify-content: center;
}

.statistics-chart {
  width: 100%;
  max-width: 300px;
  height: 200px;
}

.week-navigation {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 10px;
}

.week-nav-btn {
  padding: 10px 15px;
  background: var(--accent-color);
  color: white;
  border: none;
  border-radius: 5px;
  font-size: var(--font-size-base);
  cursor: pointer;
  transition: var(--transition);
}

.week-nav-btn:hover {
  background: #2980b9;
}

.week-nav-btn:disabled {
  background: #ccc;
  cursor: not-allowed;
}

/* 我的页面 */
.mine-container {
  padding: 20px 0px 80px;
}

.user-info {
  display: flex;
  align-items: center;
  margin-bottom: 20px;
  margin-left: 20px;
}

.user-avatar {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  margin-right: 15px;
  object-fit: cover;
}

.nickname {
  font-size: 18px;
  font-weight: bold;
}

.expiry-date {
  font-size: 14px;
  margin: 5px;
  color: #999;
}

.user-info button {
  padding: 6px 12px;
  background: #ebb93a;
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  transition: var(--transition);
}

.user-info button:hover {
  background: #c0392b;
}

.settings-section, .about-section {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 10px;
  background: var(--card-background);
  border-bottom: 1px solid #f0f0f0;
  cursor: pointer;
  border-radius: 10px;
    margin: 2px;
  transition: var(--transition);
}

.settings-section:hover, .about-section:hover {
  background: #f5f5f5;
}

.settings-section:hover .icon-wrapper .icon,
.about-section:hover .icon-wrapper .icon,
.settings-section:hover .arrow-icon,
.about-section:hover .arrow-icon {
  fill: #e65a50;
}

.settings-section:hover .icon-wrapper span,
.about-section:hover .icon-wrapper span {
  color: #222;
}

.icon-wrapper {
  display: flex;
  align-items: center;
}

.icon-wrapper .icon {
  width: 24px;
  height: 24px;
  margin-right: 10px;
  fill: var(--primary-color);
}

.icon-wrapper span {
  font-size: var(--font-size-base);
}

.arrow-icon {
  width: 16px;
  height: 16px;
  fill: var(--primary-color);
}

.settings-input, .data-import-container {
  display: none;
  flex-direction: column;
  gap: 10px;
  padding: 10px 20px;
  background: #f9f9f9;
}

.settings-input input, .data-import-container input {
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: var(--font-size-base);
}

.settings-input button, .data-import-container button {
  padding: 10px;
  background: var(--primary-color);
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: var(--transition);
}

.settings-input button:hover, .data-import-container button:hover {
  background: #e65a50;
}

/* 资产页面 */
.assets-container {
  padding: 20px 0px 80px;
  background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
  border-radius: 10px;
}

.assets-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.assets-header h2 {
  font-size: 20px;
  margin: 0;
}

.assets-header button {
  padding: 10px 20px;
  background: var(--accent-color);
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: var(--transition);
}

.assets-header button:hover {
  background: #2980b9;
}

.assets-summary {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: auto auto;
  gap: 12px;
  margin-bottom: 20px;
}

.assets-summary .summary-card:nth-child(1),
.assets-summary .summary-card:nth-child(2) {
  grid-column: auto;
}

.assets-summary .summary-card:nth-child(3) {
  grid-column: 1 / -1;
}

.summary-card {
  background: var(--card-background);
  padding: 15px;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  text-align: center;
  transition: var(--transition);
}

.summary-card:hover {
  transform: translateY(-2px);
}

.summary-card span {
  display: block;
  font-size: var(--font-size-base);
  color: #666;
}

.summary-card .highlight {
  font-size: 20px;
  font-weight: bold;
  color: var(--text-color);
  margin-top: 5px;
}

.progress-container {
  display: flex;
  align-items: center;
  margin-top: 5px;
}

.progress-bar {
  width: 0;
  height: 8px;
  background: var(--secondary-color);
  border-radius: 4px;
  margin-right: 10px;
  transition: width 0.3s ease;
}

.progress-container span {
  font-size: var(--font-size-base);
  font-weight: bold;
}

.asset-list {
  list-style: none;
  padding: 0;
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, 1fr);
}

.asset-card {
  background: var(--card-background);
  padding: 15px;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: var(--transition);
}

.asset-card:hover {
  transform: translateY(-2px);
}

.asset-card-content h3 {
  font-size: 16px;
  font-weight: normal;
  margin: 0 0 8px;
  color: var(--text-color);
}

.asset-card-content p {
  font-size: 14px;
  font-weight: normal;
  color: #666;
  margin: 0;
}

/* 弹窗 */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.modal-content {
  background: var(--card-background);
  padding: 10px 20px;
  width: 95%;
  height: 90%;
  max-width: 400px;
  border-radius: 20px;
  box-shadow: var(--shadow);
  overflow-y: auto;
  scrollbar-width: none;
  position: relative;
  top: -35px;
  transition: var(--transition);
  margin: auto;
}

.modal-content::-webkit-scrollbar {
  width: 0;
}

.modal-content h2 {
  font-size: 20px;
  text-align: center;
  margin: 5px;
}

.close-btn {
  position: absolute;
  top: 15px;
  right: 15px;
  font-size: 36px;
  color: #e74c3c;
  cursor: pointer;
  transition: var(--transition);
}

.close-btn:hover {
  animation: rotate 0.5s ease;
  color: var(--primary-color);
}

/* 账单弹窗 */
#transaction-modal .categories {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 2px;
  margin-bottom: 5px;
}

.category-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 4px;
  border-radius: var(--border-radius);
  cursor: pointer;
  transition: var(--transition);
}

.category-item:hover {
  background: rgba(255, 111, 97, 0.1);
}

.category-item svg {
  width: 32px;
  height: 32px;
  margin-bottom: 5px;
  transition: var(--transition);
}

.category-item span {
  font-size: 13px;
}

.category-item.selected {
  background: linear-gradient(135deg, #eeb9f1, #b7c775);
  color: white;
  transform: scale(1.1);
}

.category-item.selected svg {
  fill: white;
}

.category-item.selected span {
  color: white;
}

#asset-select, #notes {
  width: 100%;
  font-size: 13px;
  margin-bottom: 10px;
}

.quick-notes {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 5px;
}

.quick-notes button {
  padding: 6px 12px;
  background: #f0f0f0;
  border: 1px solid #ccc;
  border-radius: 5px;
  font-size: 13px;
  cursor: pointer;
  transition: var(--transition);
}

.quick-notes button:hover {
  background: #e0e0e0;
}

.display {
  text-align: right;
  font-size: 26px;
  font-weight: bold;
  color: var(--text-color);
  margin-bottom: 10px;
}

.num-pad {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 3px;
  margin-bottom: 10px;
}

.num-pad button {
  padding: 10px;
  font-size: 15px;
  border: none;
  border-radius: var(--border-radius);
  background: #e8e8e8;
  cursor: pointer;
  transition: var(--transition);
}

.num-pad button:hover {
  background: #d0d0d0;
}

.num-pad input[type="date"] {
  grid-column: span 2;
  padding: 8px;
  border: 1px solid #ccc;
  border-radius: var(--border-radius);
  font-size: var(--font-size-base);
}

#image-upload-form {
  margin-top: 10px;
  margin-bottom: 10px;
}

#image-upload-form input {
  margin-bottom: 10px;
}

#image-upload-form button {
  width: 100%;
  padding: 10px;
  background: var(--secondary-color);
  color: white;
  border: none;
  border-radius: var(--border-radius);
  cursor: pointer;
  transition: var(--transition);
}

#image-upload-form button:hover {
  background: #27ae60;
}

#ocr-results {
  display: none;
  max-height: 200px;
  overflow-y: auto;
  margin-top: 10px;
  padding: 10px;
  background: #f0f0f0;
  border-radius: var(--border-radius);
}

/* 资产管理弹窗 */
.asset-manage-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
}

.manage-btn {
  background: var(--primary-color);
  color: white;
  padding: 8px 12px;
  border-radius: 50%;
  font-size: 14px;
  cursor: pointer;
  transition: var(--transition);
}

.manage-btn:hover {
  transform: scale(1.1);
  background: #e65a50;
}

.manage-menu {
  position: absolute;
  top: 40px;
  right: 10px;
  background: var(--card-background);
  box-shadow: var(--shadow);
  border-radius: var(--border-radius);
  display: none;
  flex-direction: column;
  z-index: 10;
}

.manage-menu button {
  padding: 8px 16px;
  border: none;
  background: none;
  cursor: pointer;
  font-size: var(--font-size-base);
  transition: var(--transition);
}

.manage-menu button:hover {
  background: #f0f0f0;
}

.asset-records-list {
  /*max-height: 300px;*/
  overflow-y: auto;
  list-style: none;
  padding: 0;
}

.asset-records-list li {
  padding: 10px;
  border-bottom: 1px solid #eee;
  display: flex;
  justify-content: space-between;
}

/* 添加/编辑资产弹窗 */
#asset-form input {
  width: 100%;
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: var(--border-radius);
  font-size: var(--font-size-base);
  margin-bottom: 10px;
}

#asset-form button {
  width: 100%;
  padding: 12px;
  background: var(--secondary-color);
  color: white;
  border: none;
  border-radius: var(--border-radius);
  cursor: pointer;
  transition: var(--transition);
}

#asset-form button:hover {
  background: #27ae60;
}

/* 皮肤设置 */
.skin-settings-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--card-background);
  flex-direction: column;
  padding: 20px;
  z-index: 1000;
  overflow-y: auto;
}

.skin-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  margin-bottom: 20px;
}

.skin-header h2 {
  font-size: 20px;
  margin: 0;
}

.skin-header button {
  padding: 10px 15px;
  background: #e74c3c;
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  transition: var(--transition);
}

.skin-header button:hover {
  background: #c0392b;
}

.skin-effects-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-bottom: 20px;
}

.skin-effect-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 10px;
  background: #f0f0f0;
  border-radius: var(--border-radius);
  cursor: pointer;
  transition: var(--transition);
}

.skin-effect-item:hover {
  background: #e0e0e0;
}

.effect-preview {
  width: 80px;
  height: 60px;
  background: #d9e3f0;
  border-radius: var(--border-radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--font-size-base);
  margin-bottom: 10px;
}

.skin-effect-item input {
  margin-top: 5px;
}

#confirm-skin-btn, .save-color-btn {
  padding: 12px;
  background: var(--secondary-color);
  color: white;
  border: none;
  border-radius: var(--border-radius);
  cursor: pointer;
  width: 100%;
  max-width: 200px;
  transition: var(--transition);
}

#confirm-skin-btn:hover, .save-color-btn:hover {
  background: #27ae60;
}

.color-picker-label {
  font-size: var(--font-size-base);
  margin-bottom: 5px;
}

#bg-color-picker {
  width: 100%;
  height: 40px;
  border: none;
  border-radius: var(--border-radius);
  cursor: pointer;
}

/* 底部导航 */
footer {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 420px;
  background: var(--card-background);
  padding: 5px 0;
  display: flex;
  justify-content: space-around;
  box-shadow: 0 -2px 5px rgba(0, 0, 0, 0.1);
  z-index: 100;
}

footer a {
  display: flex;
  flex-direction: column;
  align-items: center;
  font-size: 14px;
  color: var(--text-color);
  text-decoration: none;
  transition: var(--transition);
  will-change: transform, color;
}

footer a:hover {
  color: var(--secondary-color);
  transform: scale(1.1);
}

footer a.active {
  color: var(--primary-color);
  transform: scale(1.05);
}

footer a svg {
  width: 26px;
  height: 26px;
  transition: fill 0.3s ease;
}

footer a:hover svg,
footer a.active svg {
  fill: var(--primary-color);
}

/* 添加按钮和回到顶部按钮 */
.add-btn {
  position: fixed;
  bottom: 80px;
  right: 15px;
  width: 45px;
  height: 45px;
  background: transparent;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  z-index: 999;
  transition: var(--transition);
}

.add-btn:hover {
  background: rgba(255, 111, 97, 0.2);
  transform: scale(1.15);
}

.add-btn .svg-icon {
  width: 36px;
  height: 36px;
  fill: white;
}

#backToTopButton {
  position: fixed;
  bottom: 130px;
  right: 15px;
  width: 45px;
  height: 45px;
  color: white;
  border-radius: 50%;
  display: none;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  box-shadow: var(--shadow);
  z-index: 998;
  transition: var(--transition);
}

#backToTopButton:hover {
  background: #2980b9;
  transform: scale(1.1);
}

#backToTopButton svg {
  width: 36px;
  height: 36px;
}

#backToTopButton span {
  display: none;
  position: absolute;
  right: 60px;
  background: var(--text-color);
  color: white;
  padding: 5px 10px;
  border-radius: 5px;
  font-size: 14px;
  white-space: nowrap;
}

#backToTopButton:hover span {
  display: block;
}

/* 登录提示 */
#login-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  display: none;
  z-index: 1000;
}

#login-alert {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: var(--card-background);
  padding: 20px;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  text-align: center;
  z-index: 1001;
  display: none;
}

#login-alert h2 {
  font-size: 20px;
  margin-bottom: 10px;
}

#login-alert p {
  font-size: var(--font-size-base);
  color: var(--text-color);
  margin-bottom: 15px;
}

#manual-login-btn {
  padding: 10px 20px;
  background: var(--secondary-color);
  color: white;
  border: none;
  border-radius: 5px;
  font-size: var(--font-size-base);
  cursor: pointer;
  transition: var(--transition);
}

#manual-login-btn:hover {
  background: #27ae60;
}

/* 媒体查询 - 大屏设备 */
@media (min-width: 768px) {
  .content-container {
    width: 375px;
    height: 812px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 40px;
    overflow: hidden;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
  }

  .app-container {
    width: 100%;
    height: 100%;
    border-radius: 0;
    margin: 0;
  }

  footer {
    max-width: 375px;
  }

  .add-btn {
    bottom: 90px;
    right: 20px;
  }

  .asset-list {
    grid-template-columns: repeat(2, 1fr);
  }

  #backToTopButton {
    bottom: 160px;
    right: 20px;
  }
}



.custom-hr {
  border: 0;
  border-top: 1px solid #eee;
  margin: 10px 0;
}

.custom-hr {
  height: 2px;
  background: linear-gradient(to right, #ff6b6b, #4ecdc4);
}
  
  /* 资产管理弹窗 */
#asset-manage-modal .modal-content {
  padding: 25px 15px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.98) 0%, rgba(195, 207, 226, 0.9) 100%); /* 与资产页面协调 */
}

.asset-manage-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  margin-top: 30px;
  position: relative;
}

#asset-manage-title {
  font-size: 20px;
  font-weight: 600;
  color: var(--text-color);
  letter-spacing: 0.5px;
}

.manage-btn {
  background: linear-gradient(135deg, var(--primary-color), #e65a50); /* 渐变按钮 */
  color: white;
  padding: 8px 16px;
  border-radius: 20px; /* 椭圆形按钮 */
  font-size: 14px;
  cursor: pointer;
  transition: var(--transition);
  border: none;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.manage-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  background: linear-gradient(135deg, #e65a50, var(--primary-color));
}

.manage-menu {
  position: absolute;
  top: 50px;
  right: 0;
  background: var(--card-background);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  border-radius: 12px;
  display: none;
  flex-direction: column;
  z-index: 20;
  overflow: hidden;
  animation: slideDown 0.3s ease forwards;
}

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

.manage-menu button {
  padding: 12px 20px;
  border: none;
  background: none;
  cursor: pointer;
  font-size: 15px;
  color: var(--text-color);
  transition: var(--transition);
}

.manage-menu button:hover {
  background: rgba(255, 111, 97, 0.1);
  color: var(--primary-color);
}


.asset-records-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 15px;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 8px;
  margin-bottom: 8px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
  transition: var(--transition);
}

.asset-records-list li:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.asset-records-list li span:first-child {
  font-size: 15px;
  color: var(--text-color);
  font-weight: 500;
}

.asset-records-list li span:last-child {
  font-size: 14px;
  color: #666;
  max-width: 150px;
  /*white-space: nowrap;*/
  overflow: hidden;
  text-overflow: ellipsis;
}
      /* 添加/编辑资产弹窗 */
#asset-modal .modal-content {
  padding: 25px;
  max-height: 500px; /* 限制高度，适配表单 */
}

#asset-form {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

#asset-form input {
  width: 100%;
  padding: 12px 15px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 15px;
  background: rgba(255, 255, 255, 0.9);
  transition: var(--transition);
  position: relative;
}

#asset-form input:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 8px rgba(255, 111, 97, 0.2);
  transform: scale(1.01);
}

#asset-form input::placeholder {
  color: #999;
}

#asset-form input[type="number"] {
  -webkit-appearance: none;
  -moz-appearance: textfield;
}

#asset-form label {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-color);
  margin-bottom: 5px;
  display: flex;
  align-items: center;
  gap: 5px;
}

#asset-form label::before {
  content: '';
  display: inline-block;
  width: 16px;
  height: 16px;
  background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="%23ff6f61"><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8zm0-14c-3.31 0-6 2.69-6 6s2.69 6 6 6 6-2.69 6-6-2.69-6-6-6z"/></svg>') no-repeat center;
  background-size: contain;
}

#asset-form button {
  width: 100%;
  padding: 14px;
  background: linear-gradient(135deg, var(--secondary-color), #27ae60); /* 渐变按钮 */
  color: white;
  border: none;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

#asset-form button:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  background: linear-gradient(135deg, #27ae60, var(--secondary-color));
}


.category-budget-input {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.category-budget-input label {
  flex: 1;
}

.category-budget-input input {
  flex: 2;
  padding: 5px;
  border: 1px solid #ccc;
  border-radius: 4px;
}

.category-budget-details {
  margin-top: 10px;
}

.category-budget-item {
  display: flex;
  justify-content: space-between;
  padding: 5px 0;
  border-bottom: 1px solid #eee;
}

.category-budget-item span {
  flex: 1;
}

/* 月度和年度统计 */
.summary-totals {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 15px 0;
}

/* 统计卡片 */
.stats-card {
  background-color: #fff;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  padding: 15px;
  transition: transform 0.2s, box-shadow 0.2s;
}

.stats-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
}

/* 卡片标题 */
.stats-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
}

.stats-header h3 {
  font-size: 16px;
  font-weight: 600;
  color: #333;
  margin: 0;
}

/* 月份和年份切换 */
.month-selector, .year-selector {
  display: flex;
  align-items: center;
  gap: 10px;
}

.month-selector button, .year-selector button {
  background-color: #f5f5f5;
  border: none;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color 0.3s, transform 0.1s;
}

.month-selector button:hover, .year-selector button:hover {
  background-color: #e0e0e0;
  transform: scale(1.1);
}

.month-selector button:active, .year-selector button:active {
  transform: scale(0.95);
}

.month-selector .arrow-icon, .year-selector .arrow-icon {
  width: 16px;
  height: 16px;
  fill: #666;
}

.month-selector span, .year-selector span {
  font-size: 15px;
  font-weight: 500;
  color: #333;
}

/* 数据展示 */
.stats-content {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.stats-item {
  flex: 1;
  background-color: #fafafa;
  border-radius: 8px;
  padding: 10px;
  text-align: center;
  transition: background-color 0.2s;
}

.stats-item:hover {
  background-color: #f0f0f0;
}

.stats-item .label {
  display: block;
  font-size: 14px;
  color: #666;
  margin-bottom: 5px;
}

.stats-item .value {
  display: block;
  font-size: 18px;
  font-weight: 600;
}

.stats-item .expense {
  color: #e74c3c; /* 支出为红色 */
}

.stats-item .income {
  color: #2ecc71; /* 收入为绿色 */
}

/* 分类统计表格 */
.statistics-table {
  background-color: #fff;
  border-radius: 8px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
  margin-bottom: 20px;
}

.statistics-header {
  display: grid;
  grid-template-columns: 40px 1fr 120px 100px;
  background-color: #f5f5f5;
  border-bottom: 1px solid #ddd;
  padding: 10px 15px;
  font-weight: 600;
  color: #333;
  border-top-left-radius: 8px;
  border-top-right-radius: 8px;
}

.header-item {
  font-size: 14px;
}

.header-item:nth-child(1) {
  text-align: left;
}

.header-item:nth-child(2) {
  text-align: left;
}

.header-item:nth-child(3),
.header-item:nth-child(4) {
  text-align: right;
}

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

.statistics-list li {
  display: grid;
  grid-template-columns: 40px 1fr 135px 100px;
  align-items: center;
  padding: 10px 15px;
  border-bottom: 1px solid #eee;
  transition: background-color 0.2s;
}

.statistics-list li:last-child {
  border-bottom: none;
}

.statistics-list li:hover {
  background-color: #f9f9f9;
}

.table-item {
  font-size: 14px;
  color: #333;
}

.table-item.icon-cell {
  display: flex;
  align-items: center;
}

.table-item:nth-child(2) {
  text-align: left;
}

.table-item:nth-child(3),
.table-item:nth-child(4) {
  text-align: right;
}

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

.table-item .budget {
  color: #888;
}

.table-item .over-budget {
  color: #e74c3c!important;
  font-weight: 600;
}

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.modal-content {
  background-color: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
  width: 90%;
  max-width: 600px;
  overflow-y: auto;
  position: relative;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 20px;
  border-bottom: 1px solid #eee;
  background-color: #f9f9f9;
  border-top-left-radius: 12px;
  border-top-right-radius: 12px;
}

.modal-header h3 {
  font-size: 18px;
  font-weight: 600;
  color: #333;
  margin: 0;
}

.modal-close-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 5px;
}

.modal-close-btn .icon {
  width: 20px;
  height: 20px;
  fill: #666;
}

.modal-close-btn:hover .icon {
  fill: #333;
}

.modal-body {
  /*padding: 20px;*/
  height: 80%;
}

.details-table {
  width: 100%;
  border-collapse: collapse;
}

.details-table th,
.details-table td {
  padding: 10px;
  text-align: left;
  border-bottom: 1px solid #eee;
}

.details-table th {
  background-color: #f5f5f5;
  font-weight: 600;
  color: #333;
  font-size: 14px;
}

.details-table td {
  font-size: 14px;
  color: #555;
}

.details-table .expense {
  color: #e74c3c;
  font-weight: 600;
}

.details-table .income {
  color: #2ecc71;
  font-weight: 600;
}

.no-data {
  text-align: center;
  color: #888;
  font-size: 14px;
  padding: 20px 0;
}

.modal-footer {
  padding: 15px 20px;
  border-top: 1px solid #eee;
  text-align: right;
  background-color: #f9f9f9;
  border-bottom-left-radius: 12px;
  border-bottom-right-radius: 12px;
}

.btn {
  padding: 8px 16px;
  border: none;
  border-radius: 20px;
  font-size: 14px;
  cursor: pointer;
  transition: background-color 0.3s;
}

.btn-secondary {
  background-color: #f0f0f0;
  color: #666;
}

.btn-secondary:hover {
  background-color: #e0e0e0;
}