/* 亮色主题 */
:root {
  --bg-color: #f8fafc;
  --text-color: #1e293b;
  --primary-color: #3b82f6;
  --secondary-color: #6366f1;
  --accent-color: #ec4899;
  --border-color: #e2e8f0;
  --card-bg: #ffffff;
  --shadow-color: rgba(0, 0, 0, 0.08);
  --hover-bg: #f1f5f9;
  --success-color: #10b981;
  --warning-color: #f59e0b;
  --error-color: #ef4444;
}

/* 页脚样式 */
.footer {
    text-align: center;
    padding: 15px;
    margin-top: 30px;
    color: var(--text-color);
    opacity: 0.6;
    font-size: 14px;
    border-top: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.footer .copyright {
    font-size: 12px;
    opacity: 0.5;
}

/* 加载更多按钮 */
.load-more-btn {
  display: block;
  width: 100%;
  padding: 12px;
  margin: 20px 0;
  background: var(--primary-color);
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 16px;
  transition: all 0.2s;
}

.load-more-btn:hover {
  background: var(--secondary-color);
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.load-more-btn:active {
  transform: translateY(0);
}

/* 暗色主题 */
[data-theme="dark"] {
  --bg-color: #0f172a;
  --text-color: #f1f5f9;
  --primary-color: #60a5fa;
  --secondary-color: #8b5cf6;
  --accent-color: #f472b6;
  --border-color: #334155;
  --card-bg: #1e293b;
  --shadow-color: rgba(0, 0, 0, 0.3);
  --hover-bg: #334155;
  --success-color: #34d399;
  --warning-color: #fbbf24;
  --error-color: #f87171;
}

body {
  font-family: 'Inter', 'Roboto', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg-color);
  color: var(--text-color);
  margin: 0;
  padding: 20px;
  min-height: 100vh;
  line-height: 1.6;
  transition: all 0.3s ease;
}

/* 纯色背景 */
body:not([data-theme="dark"]) {
  background: var(--bg-color);
}

body[data-theme="dark"] {
  background: var(--bg-color);
}

.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 10px;
}


/* 主题切换动画 */
@keyframes themeTransition {
  0% { opacity: 1; }
  50% { opacity: 0.5; }
  100% { opacity: 1; }
}

.theme-transition {
  animation: themeTransition 0.8s ease;
}

.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 25px 30px;
  margin-bottom: 40px;
  min-height: 80px;
  position: relative;
  overflow: visible;
  background: var(--card-bg);
  border-radius: 20px;
  box-shadow: 0 4px 20px var(--shadow-color);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border-color);
  transition: all 0.3s ease;
}

.header:hover {
  box-shadow: 0 8px 30px var(--shadow-color);
}

.theme-toggle {
  justify-self: end;
}

.header h1 {
  color: var(--primary-color);
  font-size: 2.8rem;
  font-weight: 700;
  margin: 0;
  text-align: center;
  letter-spacing: -0.5px;
  flex: 1;
}


.theme-toggle {
  width: 40px;
  height: 40px;
  cursor: pointer;
  background: var(--primary-color);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 18px;
  transition: all 0.3s ease;
  border: none;
  outline: none;
  box-shadow: 0 2px 8px var(--shadow-color);
}

.theme-toggle:hover {
  transform: scale(1.1);
  box-shadow: 0 4px 15px var(--shadow-color);
  background: var(--secondary-color);
}

@keyframes pulse {
  0% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.1); opacity: 0.8; }
  100% { transform: scale(1); opacity: 1; }
}

/* 卡片式布局 */
.card {
  background: var(--card-bg);
  border-radius: 20px;
  padding: 30px;
  margin-bottom: 25px;
  box-shadow: 0 4px 20px var(--shadow-color);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border-color);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--primary-color);
  border-radius: 20px 20px 0 0;
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 30px var(--shadow-color);
  border-color: var(--primary-color);
}

/* 标签选择区域 */
.tag-selector {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 20px;
}

.tag-column {
  display: flex;
  flex-direction: column;
}

.tag-list {
  height: 300px;
  overflow-y: auto;
  background: rgba(0,0,0,0.2);
  border-radius: 8px;
  padding: 10px;
  margin-bottom: 15px;
}

.tag-item {
  display: inline-block;
  margin: 5px;
  padding: 8px 15px;
  background: var(--primary-color);
  color: white;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px var(--shadow-color);
  font-weight: 500;
}

.tag-item:hover {
  background: var(--secondary-color);
  transform: scale(1.05) translateY(-2px);
  box-shadow: 0 4px 15px var(--shadow-color);
}

.tag-item.disabled {
  background: var(--border-color);
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.weight-controls {
  display: inline-flex;
  align-items: center;
  margin-left: 8px;
}

.weight-btn {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: none;
  color: white;
  font-weight: bold;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  line-height: 1;
}

.weight-btn.plus {
  background: var(--success-color);
}

.weight-btn.minus {
  background: var(--error-color);
}

.weight-btn:hover {
  opacity: 0.8;
}

.weight-value {
  margin: 0 5px;
  font-size: 12px;
  min-width: 20px;
  text-align: center;
}

.selected-tags {
  min-height: 200px;
  background: var(--hover-bg);
  border-radius: 12px;
  padding: 15px;
  margin-bottom: 15px;
  border: 1px solid var(--border-color);
  transition: all 0.3s ease;
}

.selected-tags:hover {
  border-color: var(--primary-color);
}

.preset-info {
  background: var(--hover-bg);
  border-radius: 8px;
  padding: 12px;
  margin-top: 10px;
  font-size: 14px;
  color: var(--text-color);
  opacity: 0.8;
  border: 1px solid var(--border-color);
  transition: all 0.3s ease;
}

.preset-info:hover {
  border-color: var(--primary-color);
  opacity: 1;
}

.preset-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  font-weight: 600;
  color: var(--text-color);
}

.preset-edit-btn {
  background: none;
  border: none;
  color: var(--primary-color);
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 14px;
  transition: all 0.2s ease;
  opacity: 0.7;
}

.preset-edit-btn:hover {
  opacity: 1;
  background: var(--hover-bg);
  transform: scale(1.1);
}

.preset-content {
  color: var(--text-color);
  opacity: 0.8;
  line-height: 1.4;
  word-break: break-all;
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
  font-size: 13px;
}

.preset-edit-mode {
  display: none;
}

.preset-edit-mode.active {
  display: block;
}

.preset-edit-textarea {
  width: 100%;
  min-height: 60px;
  padding: 8px;
  border: 1px solid var(--primary-color);
  border-radius: 6px;
  background: var(--card-bg);
  color: var(--text-color);
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
  font-size: 13px;
  resize: vertical;
  margin-bottom: 8px;
}

.preset-edit-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.preset-save-btn, .preset-cancel-btn {
  padding: 6px 12px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  transition: all 0.2s ease;
}

.preset-save-btn {
  background: var(--success-color);
  color: white;
}

.preset-save-btn:hover {
  background: #059669;
  transform: translateY(-1px);
}

.preset-cancel-btn {
  background: var(--border-color);
  color: var(--text-color);
}

.preset-cancel-btn:hover {
  background: var(--error-color);
  color: white;
  transform: translateY(-1px);
}

/* 提示词展示区 */
.prompt-display {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.prompt-box {
  position: relative;
}

.prompt-box textarea {
  width: calc(100% - 30px);
  height: 150px;
  background: var(--hover-bg);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 15px;
  color: var(--text-color);
  font-size: 16px;
  resize: none;
  box-sizing: border-box;
  margin: 0 15px;
  transition: all 0.3s ease;
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
}

.prompt-box textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.copy-btn {
  position: absolute;
  right: 15px;
  top: 15px;
  padding: 8px 15px;
  background: var(--accent-color);
  color: white;
  border: none;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-weight: 600;
  box-shadow: 0 2px 8px var(--shadow-color);
}

.copy-btn:hover {
  background: var(--primary-color);
  transform: scale(1.05) translateY(-2px);
  box-shadow: 0 4px 15px var(--shadow-color);
}

/* 搜索框 */
.search-box {
  margin-bottom: 20px;
}

.search-box {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 8px;
    margin-bottom: 15px;
    position: relative;
}

/* 保存控制区域 */
.save-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    margin-bottom: 25px;
    padding: 25px 30px;
    background: var(--card-bg);
    border-radius: 20px;
    border: 1px solid rgba(255,255,255,0.1);
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.save-controls::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--success-color);
    border-radius: 20px 20px 0 0;
}

.save-controls:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(0,0,0,0.15);
}

/* 按钮样式 */
.save-btn, .manage-btn {
  height: 45px;
  padding: 0 25px;
  border: none;
  border-radius: 25px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
  position: relative;
  overflow: hidden;
}

.save-btn {
  background: var(--success-color);
  color: white;
}

.save-btn:hover {
  background: #059669;
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(16, 185, 129, 0.4);
}

.manage-btn {
  background: var(--warning-color);
  color: white;
}

.manage-btn:hover {
  background: #d97706;
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(245, 158, 11, 0.4);
}

.save-group {
    display: flex;
    gap: 10px;
    align-items: center;
    flex: 1;
}

#record-name {
    flex: 1;
    height: 45px;
    padding: 0 20px;
    border: 2px solid var(--border-color);
    border-radius: 25px;
    background: var(--bg-color);
    color: var(--text-color);
    font-size: 15px;
    font-weight: 500;
    transition: all 0.3s ease;
    max-width: 350px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

#record-name:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(66, 133, 244, 0.15), 0 4px 12px rgba(0,0,0,0.1);
    transform: translateY(-1px);
}

#record-name::placeholder {
    color: var(--text-color);
    opacity: 0.6;
    font-weight: 400;
}

.search-box input {
    flex: 1;
    height: 50px;
    width: 100%;
    padding: 0 25px;
    line-height: 50px;
    background: var(--card-bg);
    border: 2px solid var(--border-color);
    border-radius: 30px;
    color: var(--text-color);
    font-size: 16px;
    font-weight: 500;
    box-sizing: border-box;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px var(--shadow-color);
    margin: 0;
    vertical-align: middle;
    backdrop-filter: blur(10px);
}

.search-box input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.15), 0 8px 25px var(--shadow-color);
    transform: translateY(-2px);
}

.search-box .load-more-btn {
    width: auto;
    height: 50px;
    padding: 0 25px;
    font-size: 15px;
    font-weight: 600;
    white-space: nowrap;
    border-radius: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-color);
    color: white;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px var(--shadow-color);
    margin: 0;
    vertical-align: middle;
}

.search-box .load-more-btn:hover {
  background: var(--secondary-color);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px var(--shadow-color);
}

.search-loading {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 16px;
  animation: searchPulse 1.5s ease-in-out infinite;
  color: var(--primary-color);
  pointer-events: none;
}

@keyframes searchPulse {
  0%, 100% {
    opacity: 0.6;
    transform: translateY(-50%) scale(1);
  }
  50% {
    opacity: 1;
    transform: translateY(-50%) scale(1.1);
  }
}

.search-box .tag-count {
    padding: 12px 15px;
    color: var(--text-color);
    font-size: 14px;
    opacity: 0.8;
    align-self: center;
}

/* 删除确认弹窗 */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  animation: fadeIn 0.3s ease-out;
}

.modal-overlay.show {
  display: flex;
}

.modal-content {
  background: var(--card-bg);
  border-radius: 16px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
  max-width: 400px;
  width: 90%;
  max-height: 90vh;
  overflow: hidden;
  border: 1px solid var(--border-color);
  animation: slideInUp 0.3s ease-out;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-color);
  background: var(--hover-bg);
}

.modal-header h3 {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--text-color);
}

.modal-close {
  background: none;
  border: none;
  font-size: 24px;
  color: var(--text-color);
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  transition: all 0.2s ease;
  opacity: 0.7;
}

.modal-close:hover {
  opacity: 1;
  background: var(--error-color);
  color: white;
  transform: scale(1.1);
}

.modal-body {
  padding: 24px;
  text-align: center;
}

.delete-icon {
  font-size: 48px;
  margin-bottom: 16px;
  animation: bounce 0.6s ease-out;
}

.delete-message {
  font-size: 16px;
  color: var(--text-color);
  margin: 0 0 12px 0;
  line-height: 1.5;
}

.delete-message strong {
  color: var(--primary-color);
  font-weight: 600;
}

.delete-warning {
  font-size: 14px;
  color: var(--error-color);
  margin: 0;
  opacity: 0.8;
}

.modal-footer {
  display: flex;
  gap: 12px;
  padding: 20px 24px;
  border-top: 1px solid var(--border-color);
  background: var(--hover-bg);
  justify-content: flex-end;
}

.btn-cancel, .btn-delete {
  padding: 10px 20px;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  min-width: 80px;
}

.btn-cancel {
  background: var(--border-color);
  color: var(--text-color);
}

.btn-cancel:hover {
  background: var(--text-color);
  color: var(--card-bg);
  transform: translateY(-1px);
}

.btn-delete {
  background: var(--error-color);
  color: white;
}

.btn-delete:hover {
  background: #dc2626;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

/* 弹窗动画 */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(30px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* 响应式设计 */
@media (max-width: 1024px) {
  .container {
    padding: 0 15px;
  }
  
  .header {
    padding: 20px 25px;
    margin-bottom: 30px;
  }
  
  .header h1 {
    font-size: 2.4rem;
  }
  
  .card {
    padding: 25px;
    margin-bottom: 20px;
  }
}

@media (max-width: 768px) {
  body {
    padding: 15px;
  }
  
  .header {
    padding: 20px;
    margin-bottom: 25px;
    flex-direction: column;
    gap: 15px;
    text-align: center;
  }
  
  .header h1 {
    font-size: 2rem;
    text-align: center;
  }
  
  .theme-toggle {
    align-self: flex-end;
  }
  
  .tag-selector, .prompt-display {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  
  .prompt-box textarea {
    width: calc(100% - 30px);
    box-sizing: border-box;
  }

  .search-box {
    flex-direction: column;
    gap: 15px;
  }

  .search-box .load-more-btn {
    width: 100%;
    height: 50px;
  }
  
  .save-controls {
    flex-direction: column;
    gap: 20px;
    padding: 20px;
  }
  
  .save-group {
    flex-direction: column;
    gap: 15px;
    width: 100%;
  }
  
  #record-name {
    max-width: none;
    width: 100%;
    height: 45px;
    padding: 0 20px;
    font-size: 15px;
    font-weight: 500;
  }
  
  .save-btn, .manage-btn {
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 480px) {
  body {
    padding: 10px;
  }
  
  .header {
    padding: 15px;
    margin-bottom: 20px;
    flex-direction: column;
    gap: 12px;
    text-align: center;
  }
  
  .header h1 {
    font-size: 1.8rem;
    text-align: center;
  }
  
  .card {
    padding: 20px;
    margin-bottom: 15px;
  }
  
  .search-box input {
    height: 45px;
    padding: 0 20px;
    font-size: 15px;
  }
  
  .save-controls {
    padding: 15px;
  }
  
  .save-btn, .manage-btn {
    height: 45px;
    font-size: 15px;
    padding: 0 20px;
  }
  
  #record-name {
    height: 45px !important;
    padding: 0 20px !important;
    font-size: 15px !important;
    font-weight: 500 !important;
    min-height: 45px;
    box-sizing: border-box;
  }
}


/* 记录管理面板 */
.records-panel {
  margin-bottom: 20px;
  background: var(--card-bg);
  border-radius: 15px;
  border: 1px solid var(--border-color);
  overflow: hidden;
  animation: slideDown 0.3s ease-out;
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.records-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 25px;
  background: var(--primary-color);
  color: white;
}

.records-header h3 {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 600;
}

.close-btn {
  background: rgba(255,255,255,0.2);
  border: none;
  color: white;
  font-size: 16px;
  cursor: pointer;
  padding: 8px;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.close-btn:hover {
  background: rgba(255,255,255,0.3);
  transform: scale(1.1);
}

.records-stats {
  display: flex;
  justify-content: center;
  gap: 40px;
  padding: 20px 25px;
  background: rgba(0,0,0,0.02);
  border-bottom: 1px solid var(--border-color);
}

.stat-item {
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.stat-number {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--primary-color);
}

.stat-label {
  font-size: 13px;
  color: var(--text-color);
  opacity: 0.7;
  font-weight: 500;
}

.records-list {
  max-height: 350px;
  overflow-y: auto;
  padding: 15px 20px;
}

.record-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 20px;
  margin: 10px 0;
  background: rgba(0,0,0,0.02);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  transition: all 0.3s ease;
  cursor: pointer;
}

.record-item:hover {
  background: rgba(66, 133, 244, 0.08);
  border-color: var(--primary-color);
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.record-info {
  flex: 1;
  min-width: 0;
}

.record-name {
  font-weight: 600;
  color: var(--text-color);
  margin: 0 0 6px 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 15px;
}

.record-meta {
  font-size: 13px;
  color: var(--text-color);
  opacity: 0.6;
  display: flex;
  gap: 20px;
}

.record-actions {
  display: flex;
  gap: 10px;
  margin-left: 15px;
}

.record-action-btn {
  padding: 8px 16px;
  border: none;
  border-radius: 20px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  transition: all 0.3s ease;
  white-space: nowrap;
}

.load-action-btn {
  background: var(--primary-color);
  color: white;
}

.load-action-btn:hover {
  background: var(--secondary-color);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(66, 133, 244, 0.3);
}

.delete-action-btn {
  background: #ff6b6b;
  color: white;
}

.delete-action-btn:hover {
  background: #ff5252;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(255, 107, 107, 0.3);
}

.empty-state {
  text-align: center;
  padding: 50px 20px;
  color: var(--text-color);
  opacity: 0.6;
}

.empty-state p {
  margin: 0;
  font-size: 15px;
  font-weight: 500;
}

/* 响应式设计 - 保存控制 */
@media (max-width: 768px) {
  .save-controls {
    flex-direction: column;
    gap: 15px;
    align-items: stretch;
  }
  
  .save-group {
    flex-direction: column;
    gap: 10px;
  }
  
  #record-name {
    max-width: none;
    width: 100%;
    height: 45px;
    padding: 0 20px;
    font-size: 15px;
    font-weight: 500;
  }
  
  .save-btn, .manage-btn {
    width: 100%;
    justify-content: center;
  }
  
  .records-stats {
    flex-direction: column;
    gap: 15px;
    padding: 15px 20px;
  }
  
  .record-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 15px;
  }
  
  .record-actions {
    width: 100%;
    justify-content: flex-end;
    margin-left: 0;
    gap: 8px;
  }
  
  .record-action-btn {
    padding: 6px 12px;
    font-size: 11px;
  }
  
  .record-meta {
    flex-direction: column;
    gap: 4px;
  }
  
  .records-header {
    padding: 15px 20px;
  }
  
  .records-header h3 {
    font-size: 1.1rem;
  }
  
  .records-list {
    padding: 10px 15px;
  }
  
  .toast-container {
    top: 10px;
    right: 10px;
    left: 10px;
  }
  
  .toast {
    min-width: auto;
    max-width: none;
  }
}

/* 浮动消息样式 */
.toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.toast {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 16px 20px;
  box-shadow: 0 8px 32px var(--shadow-color);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 300px;
  max-width: 400px;
  pointer-events: auto;
  animation: slideInRight 0.3s ease-out;
  position: relative;
  overflow: hidden;
}

.toast::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--primary-color);
}

.toast.success::before {
  background: var(--success-color);
}

.toast.error::before {
  background: var(--error-color);
}

.toast.warning::before {
  background: var(--warning-color);
}

.toast.info::before {
  background: var(--primary-color);
}

.toast-icon {
  font-size: 20px;
  flex-shrink: 0;
}

.toast.success .toast-icon {
  color: var(--success-color);
}

.toast.error .toast-icon {
  color: var(--error-color);
}

.toast.warning .toast-icon {
  color: var(--warning-color);
}

.toast.info .toast-icon {
  color: var(--primary-color);
}

.toast-content {
  flex: 1;
  color: var(--text-color);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.4;
}

.toast-title {
  font-weight: 600;
  margin-bottom: 4px;
  color: var(--text-color);
}

.toast-message {
  color: var(--text-color);
  opacity: 0.8;
}

.toast-close {
  background: none;
  border: none;
  color: var(--text-color);
  opacity: 0.6;
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  transition: all 0.2s ease;
  font-size: 16px;
  line-height: 1;
  flex-shrink: 0;
}

.toast-close:hover {
  opacity: 1;
  background: var(--hover-bg);
}

/* 动画效果 */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes slideInRight {
  from { 
    opacity: 0; 
    transform: translateX(100%); 
  }
  to { 
    opacity: 1; 
    transform: translateX(0); 
  }
}

@keyframes slideOutRight {
  from { 
    opacity: 1; 
    transform: translateX(0); 
  }
  to { 
    opacity: 0; 
    transform: translateX(100%); 
  }
}

@keyframes slideInLeft {
  from { opacity: 0; transform: translateX(-30px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes slideInRight {
  from { opacity: 0; transform: translateX(30px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
  40% { transform: translateY(-10px); }
  60% { transform: translateY(-5px); }
}

.card {
  animation: fadeIn 0.6s ease-out;
}

.header {
  animation: slideInLeft 0.8s ease-out;
}

.search-box {
  animation: slideInRight 0.8s ease-out 0.2s both;
}

.save-controls {
  animation: slideInLeft 0.8s ease-out 0.4s both;
}

.tag-selector {
  animation: fadeIn 0.8s ease-out 0.6s both;
}

.prompt-display {
  animation: slideInRight 0.8s ease-out 0.8s both;
}

/* 标签项悬停动画 */
.tag-item {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.tag-item:hover {
  transform: scale(1.05) translateY(-2px);
  box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

/* 按钮点击动画 */
.save-btn:active, .manage-btn:active {
  transform: translateY(-1px) scale(0.98);
}

/* 输入框聚焦动画 */
#record-name:focus, .search-box input:focus {
  animation: bounce 0.6s ease;
}

/* 移动端弹窗样式 */
@media (max-width: 480px) {
  .modal-content {
    max-width: 95%;
    margin: 20px;
  }
  
  .modal-header {
    padding: 16px 20px;
  }
  
  .modal-header h3 {
    font-size: 1.1rem;
  }
  
  .modal-body {
    padding: 20px;
  }
  
  .delete-icon {
    font-size: 40px;
    margin-bottom: 12px;
  }
  
  .delete-message {
    font-size: 15px;
  }
  
  .delete-warning {
    font-size: 13px;
  }
  
  .modal-footer {
    padding: 16px 20px;
    flex-direction: column;
    gap: 10px;
  }
  
  .btn-cancel, .btn-delete {
    width: 100%;
    padding: 12px 20px;
    font-size: 15px;
  }
}
