/* 基础样式 */
body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
  margin: 0;
  padding: 20px;
  min-height: 100vh;
}

.container {
  max-width: 800px;
  margin: 0 auto;
  background: white;
  padding: 30px;
  border-radius: 12px;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

h1 {
  color: #2c3e50;
  text-align: center;
  margin-bottom: 30px;
  font-weight: 600;
}

/* 表单样式 */
.controls {
  margin-bottom: 30px;
}

.inline-form {
  max-width: 600px;
  margin: 0 auto;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 15px;
  align-items: center;
}

.time-inputs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.form-row button {
  height: 100%;
  white-space: nowrap;
}

/* 删除原time-inputs样式 */

.form-row input {
  padding: 12px;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  font-size: 16px;
  transition: border-color 0.3s ease;
}

.form-row input:focus {
  outline: none;
  border-color: #3498db;
}

.form-row button {
  background-color: #3498db;
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 16px;
  font-weight: 500;
  transition: all 0.3s ease;
}

.form-row button:hover {
  background-color: #2980b9;
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* 倒计时列表 */
.countdowns-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.countdown-item {
  background: white;
  padding: 20px;
  border-radius: 8px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 20px;
  border: 2px solid #e0e0e0;
  transition: all 0.3s ease;
}

.countdown-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.countdown-item h3 {
  margin: 0;
  color: #2c3e50;
  font-size: 18px;
}

.time-left {
  font-size: 24px;
  font-weight: 600;
  color: #3498db;
}

.countdown-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

.countdown-actions button {
  padding: 8px 16px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.3s ease;
}

.timer-btn {
  background-color: #2ecc71;
  color: white;
}

.timer-btn:hover {
  background-color: #27ae60;
}

.edit-btn {
  background-color: #f1c40f;
  color: white;
}

.edit-btn:hover {
  background-color: #f39c12;
}

.delete-btn {
  background-color: #e74c3c;
  color: white;
}

.delete-btn:hover {
  background-color: #c0392b;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .form-row {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .time-inputs {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
  }

  .form-row input {
    width: 100%;
    box-sizing: border-box;
  }

  .form-row button {
    width: 100%;
    margin-top: 10px;
  }

  .countdown-item {
    grid-template-columns: 1fr;
    text-align: center;
    padding: 15px;
  }

  .countdown-actions {
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
  }

  .countdown-actions button {
    flex: 1 1 45%;
    padding: 10px;
    font-size: 13px;
  }
}

@media (max-width: 480px) {
  .time-inputs {
    grid-template-columns: 1fr;
  }

  .countdown-actions button {
    flex: 1 1 100%;
  }
}
