/* Cookie弹窗基础样式 */
.cookie-consent-container {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(0, 0, 0, 0.9);
  color: #fff;
  padding: 15px 20px;
  z-index: 9999;
  display: none;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.2);
}

.cookie-consent-container.active {
  display: block;
  animation: slideUp 0.5s ease-out;
}

.cookie-consent-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
}

.cookie-consent-text {
  flex: 1;
  min-width: 300px;
  padding-right: 20px;
  font-size: 14px;
  line-height: 1.5;
}

.cookie-consent-text a {
  color: #4dabf7;
  text-decoration: underline;
}

.cookie-consent-buttons {
  display: flex;
  gap: 10px;
  margin-top: 10px;
}

.cookie-consent-btn {
  padding: 8px 20px;
  border-radius: 4px;
  cursor: pointer;
  font-weight: bold;
  transition: all 0.3s;
  border: none;
}

.cookie-consent-accept {
  background-color: #4dabf7;
  color: white;
}

.cookie-consent-accept:hover {
  background-color: #339af0;
}

.cookie-consent-settings {
  background-color: transparent;
  color: #4dabf7;
  border: 1px solid #4dabf7;
}

.cookie-consent-settings:hover {
  background-color: rgba(77, 171, 247, 0.1);
}

/* 设置面板样式 */
.cookie-settings-container {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: #fff;
  color: #333;
  padding: 25px;
  max-width: 600px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
  z-index: 10000;
  border-radius: 8px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
  display: none;
}

.cookie-settings-container.active {
  display: block;
}

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

.cookie-settings-title {
  font-size: 20px;
  font-weight: bold;
  margin: 0;
}

.cookie-settings-close {
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: #666;
}

.cookie-settings-group {
  margin-bottom: 20px;
}

.cookie-settings-group-title {
  font-weight: bold;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.cookie-settings-group-description {
  font-size: 14px;
  color: #666;
  margin-bottom: 15px;
}

.cookie-settings-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid #eee;
}

.cookie-settings-item:last-child {
  border-bottom: none;
}

.cookie-settings-item-label {
  flex: 1;
}

.cookie-settings-item-switch {
  position: relative;
  display: inline-block;
  width: 50px;
  height: 24px;
}

.cookie-settings-item-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.cookie-settings-item-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  transition: 0.4s;
  border-radius: 24px;
}

.cookie-settings-item-slider:before {
  position: absolute;
  content: "";
  height: 16px;
  width: 16px;
  left: 4px;
  bottom: 4px;
  background-color: white;
  transition: 0.4s;
  border-radius: 50%;
}

input:checked + .cookie-settings-item-slider {
  background-color: #4dabf7;
}

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

.cookie-settings-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 20px;
}

.cookie-settings-save {
  padding: 8px 20px;
  background-color: #4dabf7;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-weight: bold;
}

/* 遮罩层 */
.cookie-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 9999;
  display: none;
  max-width: 1200px;
}

.cookie-overlay.active {
  display: block;
}

/* 动画效果 */
@keyframes slideUp {
  from {
    transform: translateY(100%);
  }
  to {
    transform: translateY(0);
  }
}

/* 响应式调整 */
@media (max-width: 768px) {
  .cookie-consent-content {
    flex-direction: column;
  }

  .cookie-consent-text {
    padding-right: 0;
    margin-bottom: 15px;
  }

  .cookie-consent-buttons {
    width: 100%;
    justify-content: center;
  }
}
