/* 通用样式 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: #f5f5f5;
  min-height: 100vh;
}

/* 统一的header样式 */
.header {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 12px 15px 15px;
  position: relative;
  max-width: 1280px;
  margin: 0 auto;
  width: 100%;
}

.header h1 {
  font-size: 20px;
  margin-bottom: 10px;
  padding-left: 70px;
}

.back-btn {
  position: absolute;
  top: 20px;
  left: 15px;
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: white;
  padding: 8px 15px;
  border-radius: 20px;
  cursor: pointer;
  font-size: 14px;
}

/* 统一的container样式 */
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 12px;
}

/* 通用卡片样式 */
.card {
  background: white;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 15px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.card-title {
  font-size: 18px;
  font-weight: 600;
  color: #333;
  margin-bottom: 15px;
}

/* 通用按钮样式 */
.btn {
  padding: 10px 20px;
  background: #667eea;
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.2s;
}

.btn:hover {
  background: #5a6fd8;
  transform: translateY(-1px);
}

/* 通用输入框样式 */
.input {
  width: 100%;
  padding: 12px 15px;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  font-size: 14px;
  margin-bottom: 10px;
}

.input:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.2);
}

/* 通用标签页样式 */
.tabs {
  display: flex;
  background: white;
  border-bottom: 1px solid #e0e0e0;
  overflow-x: auto;
  margin-bottom: 15px;
}

.tab {
  padding: 15px 20px;
  text-align: center;
  border: none;
  background: none;
  cursor: pointer;
  font-size: 14px;
  color: #666;
  white-space: nowrap;
}

.tab.active {
  color: #667eea;
  border-bottom: 2px solid #667eea;
  font-weight: 600;
}

/* 通用加载状态 */
.loading {
  text-align: center;
  padding: 40px 20px;
  color: #666;
}

.loading::after {
  content: '';
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid #667eea;
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-left: 10px;
  vertical-align: middle;
}

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

/* 通用错误状态 */
.error {
  text-align: center;
  padding: 20px;
  color: #f44336;
}

/* 通用空状态 */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: #999;
}

.empty-state .icon {
  font-size: 64px;
  margin-bottom: 20px;
}

/* 通用提示框 */
.toast {
  position: fixed;
  top: 20px;
  right: 20px;
  background: rgba(0, 0, 0, 0.8);
  color: white;
  padding: 12px 20px;
  border-radius: 8px;
  font-size: 14px;
  z-index: 1000;
  animation: toastFade 3s ease forwards;
}

@keyframes toastFade {
  0% { opacity: 0; transform: translateX(100%); }
  10% { opacity: 1; transform: translateX(0); }
  90% { opacity: 1; transform: translateX(0); }
  100% { opacity: 0; transform: translateX(100%); }
}

/* 通用模态框 */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  align-items: flex-end;
}

.modal.show {
  display: flex;
}

.modal-content {
  background: white;
  border-radius: 20px 20px 0 0;
  padding: 25px;
  max-height: 80vh;
  overflow-y: auto;
  width: 100%;
}

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

.modal-title {
  font-size: 18px;
  font-weight: 600;
}

.close-btn {
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: #999;
}

.modal-body {
  font-size: 14px;
  color: #666;
  line-height: 1.8;
}

/* 响应式设计 */
@media (max-width: 500px) {
  .header {
    padding: 10px 12px 12px;
  }
  
  .header h1 {
    font-size: 18px;
  }
  
  .container {
    padding: 10px;
  }
  
  .card {
    padding: 15px;
  }
  
  .card-title {
    font-size: 16px;
  }
}