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

body {
  font-family: 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
  background: linear-gradient(135deg, #81c784 0%, #66bb6a 100%);
  color: #2d3748;
  line-height: 1.6;
  min-height: 100vh;
}

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

.modal-content {
  background-color: #fff;
  padding: 30px;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  text-align: center;
  max-width: 400px;
  width: 90%;
}

.modal-content h3 {
  margin-top: 0;
  color: #333;
}

.modal-content p {
  margin-bottom: 20px;
  color: #666;
}

.modal-buttons {
  display: flex;
  justify-content: center;
  gap: 15px;
}

.modal-buttons button {
  padding: 8px 20px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 16px;
  transition: background-color 0.3s;
}

#modal-confirm {
  background: linear-gradient(135deg, #4caf50 0%, #43a047 100%);
  color: white;
}

#modal-confirm:hover {
  background: linear-gradient(135deg, #43a047 0%, #388e3c 100%);
}

#modal-cancel {
  background-color: #ccc;
  color: #333;
}

#modal-cancel:hover {
  background-color: #999;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 20px;
}

.section {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  padding: 40px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  transition: all 0.3s ease;
}

.section:hover {
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
  transform: translateY(-2px);
}

.hidden {
  display: none;
}

h1, h2, h3 {
  color: #2d3748;
  margin-bottom: 24px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

h1 {
  font-size: 2.5rem;
  background: linear-gradient(135deg, #43a047 0%, #388e3c 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

h2 {
  font-size: 2rem;
  color: #4a5568;
}

h3 {
  font-size: 1.5rem;
  color: #4a5568;
}

/* 登录方式选择样式 */
.login-type-selection {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 24px;
  padding: 20px;
  background: rgba(255, 255, 255, 0.8);
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(5px);
}

.login-type-selection label {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.5);
}

.login-type-selection label:hover {
  background: rgba(255, 255, 255, 1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transform: translateY(-1px);
}

.login-type-selection input[type="radio"] {
  width: 18px;
  height: 18px;
  accent-color: #4caf50;
}

/* 表单组样式 */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 24px;
}

.form-group input {
  width: 100%;
  padding: 16px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  font-size: 16px;
  background: rgba(255, 255, 255, 0.9);
  transition: all 0.3s ease;
  font-family: inherit;
}

.form-group input:focus {
  outline: none;
  border-color: #4caf50;
  box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.1);
  background: rgba(255, 255, 255, 1);
}

.form-group input::placeholder {
  color: #a0aec0;
}

/* 登录按钮区域样式 */
.login-buttons {
  display: flex;
  gap: 16px;
  margin-bottom: 20px;
}

.login-buttons button {
  flex: 1;
  padding: 16px;
  border: none;
  border-radius: 12px;
  font-size: 16px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-weight: 600;
  letter-spacing: 0.5px;
  position: relative;
  overflow: hidden;
}

.login-buttons button:first-child {
  background: linear-gradient(135deg, #4caf50 0%, #43a047 100%);
  color: white;
  box-shadow: 0 4px 15px rgba(76, 175, 80, 0.3);
}

.login-buttons button:first-child:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(76, 175, 80, 0.4);
}

.login-buttons button:last-child {
  background: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
  color: white;
  box-shadow: 0 4px 15px rgba(72, 187, 120, 0.3);
}

.login-buttons button:last-child:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(72, 187, 120, 0.4);
}

/* V2.0系统提示框样式 */
.system-notice {
  margin-bottom: 20px;
  padding: 20px;
  background: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 100%);
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(255, 107, 107, 0.3);
  border: 2px solid rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(5px);
}

.notice-content {
  text-align: center;
  color: white;
}

.notice-content h4 {
  margin: 0 0 12px 0;
  font-size: 18px;
  font-weight: 600;
  color: white;
}

.notice-content p {
  margin: 0 0 16px 0;
  font-size: 14px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.9);
}

.v1-system-button {
  background: rgba(255, 255, 255, 0.2);
  color: white;
  border: 2px solid rgba(255, 255, 255, 0.5);
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  backdrop-filter: blur(5px);
}

.v1-system-button:hover {
  background: rgba(255, 255, 255, 0.3);
  border-color: rgba(255, 255, 255, 0.8);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(255, 255, 255, 0.2);
}

/* 登录提示样式 */
.login-tip {
  font-size: 14px;
  color: #718096;
  line-height: 1.6;
  padding: 16px;
  background: rgba(255, 255, 255, 0.8);
  border-radius: 8px;
  text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(5px);
}

h1 {
  text-align: center;
  background: linear-gradient(135deg, #43a047 0%, #388e3c 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-size: 2.5em;
}

h2 {
  font-size: 2em;
  border-bottom: 2px solid #4caf50;
  padding-bottom: 10px;
}

h3 {
  font-size: 1.5em;
  color: #34495e;
}

.auth-form {
  max-width: 400px;
  margin: 0 auto;
  text-align: center;
}

input, select, textarea, button {
  width: 100%;
  padding: 12px;
  margin-bottom: 15px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 16px;
}

textarea {
  min-height: 100px;
  resize: vertical;
}

button {
  background: linear-gradient(135deg, #4caf50 0%, #43a047 100%);
  color: white;
  border: none;
  cursor: pointer;
  font-weight: bold;
  transition: all 0.3s;
}

button:hover {
  background: linear-gradient(135deg, #43a047 0%, #388e3c 100%);
}

button {
  transition: all 0.3s ease;
  font-family: inherit;
}

button:disabled {
  background-color: #a0aec0;
  cursor: not-allowed;
  opacity: 0.6;
  transform: none !important;
}

button:not(:disabled):hover {
  transform: translateY(-1px);
}

.role-selection {
  display: flex !important;
  gap: 40px;
  margin-bottom: 20px;
  align-items: center;
  justify-content: center;
  flex-wrap: nowrap;
  width: 100%;
}

.role-selection label {
  display: flex !important;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  margin: 0 !important;
  white-space: nowrap;
  flex-shrink: 0;
}

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

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

.copy-id-btn {
  padding: 4px 10px;
  background: linear-gradient(135deg, #4caf50, #43a047);
  color: white;
  border: none;
  border-radius: 4px;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.copy-id-btn:hover {
  background: linear-gradient(135deg, #66bb6a, #4caf50);
  transform: translateY(-1px);
  box-shadow: 0 2px 5px rgba(76, 175, 80, 0.3);
}

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

.user-id {
  font-size: 0.9em;
  color: #7f8c8d;
  font-family: monospace;
}

.tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
  flex-wrap: wrap;
  background: rgba(255, 255, 255, 0.8);
  padding: 8px;
  border-radius: 12px;
  backdrop-filter: blur(5px);
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.tab-btn {
  width: auto;
  padding: 12px 24px;
  background: transparent;
  color: #718096;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-weight: 500;
  position: relative;
}

.tab-btn:hover {
  background: rgba(255, 255, 255, 0.5);
  color: #4a5568;
}

.tab-btn.active {
  background: linear-gradient(135deg, #4caf50 0%, #43a047 100%);
  color: white;
  box-shadow: 0 4px 15px rgba(76, 175, 80, 0.3);
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

.card {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-radius: 16px;
  padding: 24px;
  margin-bottom: 24px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
}

.card:hover {
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
  transform: translateY(-2px);
}

.relationship-info {
  background-color: white;
  padding: 15px;
  border-radius: 4px;
  border-left: 4px solid #3498db;
}

.relationship-info p {
  margin-bottom: 10px;
}

.list-item {
  background: rgba(255, 255, 255, 0.95);
  padding: 20px;
  margin-bottom: 12px;
  border-radius: 12px;
  border-left: 6px solid #4caf50;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  backdrop-filter: blur(5px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
}

.list-item:hover {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  transform: translateY(-1px);
}

.list-item .content {
  flex: 1;
}

.list-item .actions {
  display: flex;
  gap: 10px;
}

.list-item .actions button {
  width: auto;
  padding: 8px 15px;
  font-size: 14px;
}

.task-item {
  border-left-color: #27ae60;
}

.task-item.pending {
  border-left-color: #f39c12;
}

.task-item.completed {
  border-left-color: #27ae60;
}

.task-item.missed {
  border-left-color: #e74c3c;
}

.rule-item {
  border-left-color: #9b59b6;
}

.punishment-item {
  border-left-color: #e67e22;
}

.punishment-item.confirmed {
  opacity: 0.7;
}

.task-status {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: bold;
}

.status-pending {
  background-color: #f39c12;
  color: white;
}

.status-completed {
  background: linear-gradient(135deg, #4caf50 0%, #43a047 100%);
  color: white;
}

.status-missed {
  background-color: #e74c3c;
  color: white;
}

.punishment-option {
  padding: 15px;
  margin-bottom: 10px;
  background-color: white;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.3s;
  border: 2px solid transparent;
}

.punishment-option:hover {
  border-color: #4caf50;
}

.punishment-option.selected {
  border-color: #4caf50;
  background-color: #f1f8e9;
}

.punishment-details {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.punishment-name {
  font-weight: bold;
}

.punishment-score {
  color: #4caf50;
  font-weight: bold;
}

.slave-score-display {
  background: linear-gradient(135deg, #4caf50 0%, #43a047 100%);
  color: white;
  padding: 8px 16px;
  border-radius: 20px;
  font-weight: bold;
  font-size: 1.1em;
  box-shadow: 0 4px 15px rgba(76, 175, 80, 0.3);
  display: inline-block;
  margin: 5px 0;
  border: 2px solid rgba(255, 255, 255, 0.3);
}

.slave-score-label {
  font-weight: bold;
  color: #2d3748;
  margin-right: 8px;
  font-size: 1.1em;
}

.task-deadline {
  font-size: 0.9em;
  color: #7f8c8d;
  margin-top: 5px;
}

.task-notes {
  margin-top: 10px;
  padding: 10px;
  background-color: #f8f9fa;
  border-radius: 4px;
  font-size: 0.9em;
}

@media (max-width: 768px) {
  .container {
    padding: 10px;
  }
  
  .section {
    padding: 20px;
  }
  
  .header {
    flex-direction: column;
    gap: 15px;
    text-align: center;
  }
  
  .tabs {
    justify-content: center;
  }
  
  .list-item {
    flex-direction: column;
    gap: 15px;
  }
  
  .list-item .actions {
    justify-content: center;
    flex-wrap: wrap;
  }
}