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

body {
  font-family: 'Arial', sans-serif;
  background-color: #f5f5f5;
  color: #333;
  line-height: 1.6;
}

/* 弹窗样式 */
.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-color: #4CAF50;
  color: white;
}

#modal-confirm:hover {
  background-color: #45a049;
}

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

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

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

.section {
  background-color: white;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  padding: 30px;
}

.hidden {
  display: none;
}

h1, h2, h3 {
  color: #2c3e50;
  margin-bottom: 20px;
}

h1 {
  text-align: center;
  color: #e74c3c;
  font-size: 2.5em;
}

h2 {
  font-size: 2em;
  border-bottom: 2px solid #e74c3c;
  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-color: #e74c3c;
  color: white;
  border: none;
  cursor: pointer;
  font-weight: bold;
  transition: background-color 0.3s;
}

button:hover {
  background-color: #c0392b;
}

button:disabled {
  background-color: #95a5a6;
  cursor: not-allowed;
}

.role-selection {
  display: flex;
  gap: 20px;
  margin-bottom: 15px;
  justify-content: center;
}

.role-selection label {
  display: flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
}

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

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

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

.tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.tab-btn {
  width: auto;
  padding: 10px 20px;
  background-color: #ecf0f1;
  color: #2c3e50;
}

.tab-btn.active {
  background-color: #e74c3c;
  color: white;
}

.tab-content {
  display: none;
}

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

.card {
  background-color: #f8f9fa;
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 20px;
  border: 1px solid #e9ecef;
}

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

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

.list-item {
  background-color: white;
  padding: 15px;
  margin-bottom: 10px;
  border-radius: 4px;
  border-left: 4px solid #3498db;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.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-color: #27ae60;
  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: #e74c3c;
}

.punishment-option.selected {
  border-color: #e74c3c;
  background-color: #fef5f5;
}

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

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

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

.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;
  }
}