:root {
  --primary-color: #4361ee;
  --secondary-color: #3f37c9;
  --success-color: #4cc9f0;
  --danger-color: #f72585;
  --warning-color: #f8961e;
  --light-bg: #f8f9fa;
  --dark-bg: #212529;
  --border-color: #dee2e6;
  --text-color: #212529;
  --text-light: #6c757d;
  --card-bg: #ffffff;
  --hover-bg: #e9ecef;
}

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

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  margin: 0;
  padding: 20px;
  background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
  color: var(--text-color);
  min-height: 100vh;
}

.container {
  max-width: 1400px;
  margin: 0 auto;
}

h1 {
  color: var(--secondary-color);
  text-align: center;
  margin-bottom: 30px;
  font-size: 2.2rem;
  font-weight: 600;
  text-shadow: 1px 1px 2px rgba(0,0,0,0.1);
}

.header-actions {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-bottom: 25px;
  flex-wrap: wrap;
}

.btn {
  padding: 12px 24px;
  margin: 4px;
  cursor: pointer;
  background: var(--primary-color);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 500;
  transition: all 0.3s ease;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn:hover {
  background: var(--secondary-color);
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.btn:active {
  transform: translateY(0);
}

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

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

.btn-success {
  background: #2ecc71;
}

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

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

.btn-danger:hover {
  background: #d60a6d;
}

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

.btn-warning:hover {
  background: #e67e00;
}

table {
  border-collapse: collapse;
  width: 100%;
  margin-top: 10px;
  background: var(--card-bg);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0,0,0,0.08);
  margin-bottom: 25px;
}

th, td {
  border: 1px solid var(--border-color);
  padding: 14px 12px;
  text-align: left;
  transition: background-color 0.2s;
}

th {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
  color: white;
  font-weight: 600;
  text-align: center;
}

tr:nth-child(even) {
  background-color: #f8f9fa;
}

tr:hover {
  background: var(--hover-bg);
  transform: scale(1.01);
  transition: all 0.2s ease;
}

.status-active {
  color: #28a745;
  font-weight: bold;
}

.status-inactive {
  color: #dc3545;
}

/* 账号名称样式 */
.account-name {
  font-weight: 600;
  color: var(--secondary-color);
  background: rgba(67, 97, 238, 0.1);
  padding: 2px 8px;
  border-radius: 12px;
  display: inline-block;
  font-size: 0.9em;
}

.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.6);
  justify-content: center;
  align-items: center;
  z-index: 10000;
  backdrop-filter: blur(5px);
}

.modal-content {
  background: var(--card-bg);
  padding: 30px;
  border-radius: 12px;
  min-width: 450px;
  max-width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 10px 30px rgba(0,0,0,0.2);
  position: relative;
  animation: modalAppear 0.3s ease-out;
}

@keyframes modalAppear {
  from { opacity: 0; transform: scale(0.8); }
  to { opacity: 1; transform: scale(1); }
}

.modal input, .modal select {
  width: 100%;
  margin-bottom: 15px;
  padding: 12px;
  border: 2px solid var(--border-color);
  border-radius: 8px;
  box-sizing: border-box;
  font-size: 15px;
  transition: border-color 0.3s;
}

.modal input:focus, .modal select:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.2);
}

.modal button {
  width: auto;
  padding: 10px 20px;
  margin: 0 5px;
}

.modal-buttons {
  margin-top: 20px;
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.modal-content h3 {
  margin-top: 0;
  margin-bottom: 20px;
  color: var(--secondary-color);
  text-align: center;
  font-size: 1.5rem;
}

.modal-content label {
  display: block;
  margin: 15px 0 8px 0;
  font-weight: 600;
  color: var(--text-color);
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.help-text {
  margin-top: 20px;
  padding: 18px;
  background: #e7f5ff;
  border-left: 4px solid var(--primary-color);
  border-radius: 8px;
  font-size: 14px;
}

.help-text h4 {
  margin-top: 0;
  margin-bottom: 10px;
  color: var(--secondary-color);
  font-size: 1.1rem;
}

.help-text ul {
  padding-left: 20px;
  margin-bottom: 0;
}

.help-text li {
  margin-bottom: 8px;
  line-height: 1.5;
}

.card {
  background: var(--card-bg);
  border-radius: 12px;
  padding: 25px;
  margin-bottom: 25px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.08);
}

/* 登录模态框样式 */
.login-modal {
  display: flex;
}

.login-content {
  width: 420px;
  padding: 40px;
  position: relative; /* 为关闭按钮定位 */
}

.login-content h3 {
  text-align: center;
  margin-bottom: 25px;
  color: var(--secondary-color);
  font-size: 1.6rem;
}

.login-input {
  width: 100%;
  padding: 14px;
  margin-bottom: 20px;
  border: 2px solid var(--border-color);
  border-radius: 8px;
  font-size: 16px;
  transition: border-color 0.3s;
}

.login-input:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.2);
}

.remember-container {
  display: flex;
  align-items: center;
  margin-bottom: 20px;
  font-size: 15px;
}

.remember-container input {
  margin-right: 10px;
  width: auto; /* 确保复选框保持原始大小 */
}

.remember-container label {
  margin: 0;
  color: var(--text-color);
  cursor: pointer;
}

.login-btn {
  width: 100%;
  padding: 16px;
  background: var(--primary-color);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.3s;
  margin-bottom: 15px;
}

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

.login-btn:disabled {
  background: #cccccc;
  cursor: not-allowed;
}

.login-feedback {
  margin-top: 10px;
  text-align: center;
  min-height: 20px;
  color: #e74c3c;
  font-size: 14px;
}

/* 按钮大小优化 */
.btn {
  padding: 12px 24px;
  margin: 4px;
  cursor: pointer;
  background: var(--primary-color);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 500;
  transition: all 0.3s ease;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px; /* 确保按钮有最小高度 */
}

/* 模态框标题区域 */
.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.modal-header h3 {
  margin: 0;
  color: var(--secondary-color);
  flex-grow: 1; /* 让标题占据剩余空间 */
}

/* 模态框操作按钮容器 */
.modal-actions {
  display: flex;
  gap: 10px;
  margin-left: 15px; /* 与标题保持距离 */
}

/* 响应式设计 */
@media (max-width: 768px) {
  body {
    padding: 10px;
  }

  .header-actions {
    flex-direction: column;
    align-items: center;
  }

  .btn {
    width: 100%;
    margin: 5px 0;
  }

  table {
    font-size: 14px;
  }

  th, td {
    padding: 10px 6px;
  }

  .modal-content {
    min-width: 95%;
    padding: 20px;
  }

  .modal input, .modal select {
    padding: 10px;
  }
}