:root {
  --primary-color: #3498db;
  --primary-light: #e7f2fa;
  --secondary-color: #2980b9;
  --text-color: #2c3e50;
  --light-gray: #f5f7fa;
  --border-color: #dce6f0;
  --success-color: #2ecc71;
  --danger-color: #e74c3c;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

body {
  background-color: #f0f7ff;
  color: var(--text-color);
  line-height: 1.6;
}

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

header {
  background: linear-gradient(
    135deg,
    var(--primary-color),
    var(--secondary-color)
  );
  color: white;
  padding: 20px;
  border-radius: 10px;
  margin-bottom: 30px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
}

h1 {
  font-size: 28px;
  font-weight: 600;
}

.theme-toggle {
  background-color: rgba(255, 255, 255, 0.2);
  border: none;
  color: white;
  padding: 8px 15px;
  border-radius: 20px;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.3s;
}

.theme-toggle:hover {
  background-color: rgba(255, 255, 255, 0.3);
}

.card {
  background-color: white;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  padding: 25px;
  margin-bottom: 25px;
}

.card-title {
  font-size: 20px;
  margin-bottom: 20px;
  color: var(--secondary-color);
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.card-title span {
  font-size: 16px;
  color: var(--primary-color);
  font-weight: normal;
}

.form-group {
  margin-bottom: 20px;
}

label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
}

input[type="text"] {
  width: 100%;
  padding: 12px 15px;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  font-size: 16px;
  transition: border 0.3s;
}

input[type="text"]:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

button {
  background-color: var(--primary-color);
  color: white;
  border: none;
  padding: 12px 20px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 16px;
  font-weight: 500;
  transition: background-color 0.3s;
}

button:hover {
  background-color: var(--secondary-color);
}

.locations-list {
  list-style: none;
}

.location-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px;
  border-bottom: 1px solid var(--border-color);
  transition: background-color 0.3s;
}

.location-item:hover {
  background-color: var(--primary-light);
}

.location-info {
  display: flex;
  align-items: center;
}

.location-name {
  font-weight: 500;
  margin-right: 15px;
}

.location-status {
  font-size: 14px;
  padding: 4px 10px;
  border-radius: 12px;
  background-color: var(--light-gray);
}

.status-active {
  background-color: rgba(46, 204, 113, 0.2);
  color: var(--success-color);
}

.status-inactive {
  background-color: rgba(231, 76, 60, 0.2);
  color: var(--danger-color);
}

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

.btn-toggle,
.btn-delete {
  padding: 8px 15px;
  font-size: 14px;
  border-radius: 6px;
}

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

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

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

.empty-state {
  text-align: center;
  padding: 40px 0;
  color: #7f8c8d;
}

.empty-state p {
  margin-top: 10px;
  font-size: 16px;
}

/* 广告开关样式 */
.toggle-group {
  display: flex;
  align-items: center;
  gap: 15px;
}

.toggle-label {
  font-weight: 500;
  font-size: 16px;
}

#adStatus {
  font-size: 14px;
  padding: 4px 10px;
  border-radius: 12px;
}

/* 开关样式 */
.switch {
  position: relative;
  display: inline-block;
  width: 50px;
  height: 24px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  transition: 0.4s;
}

.slider:before {
  position: absolute;
  content: "";
  height: 16px;
  width: 16px;
  left: 4px;
  bottom: 4px;
  background-color: white;
  transition: 0.4s;
}

input:checked + .slider {
  background-color: var(--success-color);
}

input:checked + .slider:before {
  transform: translateX(26px);
}

.slider.round {
  border-radius: 24px;
}

.slider.round:before {
  border-radius: 50%;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .header-content {
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
  }

  .location-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
  }

  .location-actions {
    align-self: flex-end;
  }

  .card {
    padding: 20px;
  }
}

@media (max-width: 480px) {
  h1 {
    font-size: 24px;
  }

  .location-info {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .location-actions {
    width: 100%;
    justify-content: space-between;
  }

  .btn-toggle,
  .btn-delete {
    flex: 1;
  }
}


/* 新增的复选框组样式 - 添加到文件末尾 */
.checkbox-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 20px;
}

.checkbox-label {
  display: flex;
  align-items: center;
  cursor: pointer;
  font-weight: 500;
  position: relative;
  padding-left: 35px;
  margin-bottom: 12px;
  font-size: 16px;
  user-select: none;
}

.checkbox-label input {
  position: absolute;
  opacity: 0;
  cursor: pointer;
  height: 0;
  width: 0;
}

.checkmark {
  position: absolute;
  top: 0;
  left: 0;
  height: 22px;
  width: 22px;
  background-color: var(--light-gray);
  border-radius: 6px;
  transition: all 0.3s;
}

.checkbox-label:hover input ~ .checkmark {
  background-color: #e1e9f0;
}

.checkbox-label input:checked ~ .checkmark {
  background-color: var(--primary-color);
}

.checkmark:after {
  content: "";
  position: absolute;
  display: none;
}

.checkbox-label input:checked ~ .checkmark:after {
  display: block;
}

.checkbox-label .checkmark:after {
  left: 8px;
  top: 4px;
  width: 5px;
  height: 10px;
  border: solid white;
  border-width: 0 3px 3px 0;
  transform: rotate(45deg);
}

.save-btn {
  background-color: var(--secondary-color);
  margin-top: 10px;
}

.save-btn:hover {
  background-color: #2472a4;
}

#infinityShowDelay{
  padding: 8px 15px;
  font-size: 14px;
  border-radius: 6px;
  border: 1px solid #ccc;
  
}