/* Cookie同意弹窗样式 - 基于quiz_app设计，适配2048主题 */

/* 小型右下角弹窗 */
.cookie-consent-modal {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: rgba(26, 31, 54, 0.95);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  z-index: 10000;
  width: 320px;
  max-width: calc(100vw - 40px);
  opacity: 1;
  transform: translateY(0);
  transition: all 0.3s ease;
  color: #fff;
}

/* 弹窗内容 - 紧凑版 */
.cookie-consent-content {
  padding: 16px;
}

/* 设置弹窗 - 居中大弹窗 */
.cookie-settings-content {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  bottom: auto;
  right: auto;
  width: 90%;
  max-width: 480px;
  background: rgba(26, 31, 54, 0.95);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
  max-height: 90vh;
  overflow-y: auto;
}

/* 简化版弹窗头部 - 只在设置页面显示 */
.cookie-consent-header {
  display: none;
}

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

.cookie-consent-header h3 {
  margin: 0;
  font-size: 18px;
  color: #fff;
  font-weight: 600;
}

.cookie-close-btn {
  background: none;
  border: none;
  font-size: 20px;
  color: rgba(255, 255, 255, 0.7);
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  transition: all 0.2s ease;
}

.cookie-close-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
}

/* 品牌标识区域 - 简版弹窗 */
.cookie-brand {
  display: flex;
  align-items: center;
  margin-bottom: 12px;
  gap: 8px;
}

.cookie-brand img {
  height: 24px;
  width: auto;
}

.cookie-brand span {
  font-size: 16px;
  font-weight: 600;
  color: #fff;
}

/* 弹窗主体 - 简化版 */
.cookie-consent-body {
  margin-bottom: 16px;
}

.cookie-consent-body p {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.8);
  line-height: 1.5;
  margin: 0 0 16px 0;
}

/* 隐私政策链接 - 简化版 */
.privacy-policy-note {
  margin-top: 12px;
  font-size: 12px;
}

.privacy-policy-note a {
  color: #a5b4fc;
  text-decoration: none;
}

.privacy-policy-note a:hover {
  text-decoration: underline;
}

/* 简化按钮布局 */
.cookie-consent-footer {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.cookie-btn {
  padding: 8px 16px;
  border: none;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.cookie-btn-primary {
  background: rgba(102, 126, 234, 0.2);
  color: #a5b4fc;
  border: 1px solid rgba(165, 180, 252, 0.3);
}

.cookie-btn-primary:hover {
  background: rgba(102, 126, 234, 0.3);
  border-color: rgba(165, 180, 252, 0.5);
}

.cookie-btn-secondary {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.cookie-btn-secondary:hover {
  background: rgba(255, 255, 255, 0.15);
}

.cookie-btn-customize {
  background: transparent;
  color: #a5b4fc;
  border: none;
  text-align: center;
  font-size: 12px;
  padding: 6px 0;
}

.cookie-btn-customize:hover {
  text-decoration: underline;
}

/* 设置页面样式 */
.cookie-settings-content .cookie-consent-body {
  padding: 0 20px 20px 20px;
}

/* Cookie分类 - 设置页面 */
.cookie-categories {
  margin: 16px 0;
}

.cookie-category {
  margin-bottom: 12px;
}

.cookie-category-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.cookie-category-label:hover {
  background: rgba(255, 255, 255, 0.05);
}

/* 分类信息 */
.category-info {
  flex: 1;
}

.category-info strong {
  display: block;
  color: #fff;
  font-size: 13px;
  margin-bottom: 2px;
}

.category-info small {
  color: rgba(255, 255, 255, 0.6);
  font-size: 11px;
  line-height: 1.4;
}

/* 开关样式 */
.category-toggle {
  position: relative;
  width: 44px;
  height: 24px;
}

.category-toggle input {
  display: none;
}

.toggle-slider {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 24px;
  transition: 0.3s;
}

.toggle-slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background: white;
  border-radius: 50%;
  transition: 0.3s;
}

input:checked + .toggle-slider {
  background: #a5b4fc;
}

input:checked + .toggle-slider:before {
  transform: translateX(20px);
}

input:disabled + .toggle-slider {
  opacity: 0.5;
  cursor: not-allowed;
}

/* 始终启用的开关样式 */
.category-toggle.always-enabled {
  opacity: 0.8;
  cursor: not-allowed;
}

.category-toggle.always-enabled .toggle-slider {
  background: #a5b4fc;
  border-color: #a5b4fc;
}

.category-toggle.always-enabled input:checked + .toggle-slider {
  background: #a5b4fc;
  border-color: #a5b4fc;
}

.category-toggle.always-enabled input:checked + .toggle-slider:before {
  transform: translateX(20px);
  background: white;
}

/* "Always Active" 标签 - 保留备用 */
.always-active {
  font-size: 11px;
  color: #a5b4fc;
  background: rgba(165, 180, 252, 0.2);
  padding: 2px 8px;
  border-radius: 12px;
}

/* 通知样式 */
.cookie-notification {
  opacity: 1;
  transition: opacity 0.3s ease;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .cookie-consent-content {
    width: 95%;
    margin: 20px;
    max-height: 90vh;
  }

  .cookie-consent-header,
  .cookie-consent-body,
  .cookie-consent-footer {
    padding-left: 20px;
    padding-right: 20px;
  }

  .cookie-consent-footer {
    flex-direction: column;
    gap: 10px;
  }

  .cookie-btn {
    width: 100%;
    flex: none;
  }

  .cookie-category-label {
    padding: 14px;
  }

  .cookie-consent-header h3 {
    font-size: 18px;
  }
}

@media (max-width: 480px) {
  .cookie-consent-content {
    width: 98%;
    margin: 10px;
    border-radius: 12px;
  }

  .cookie-consent-header,
  .cookie-consent-body,
  .cookie-consent-footer {
    padding-left: 16px;
    padding-right: 16px;
  }

  .cookie-category-label {
    padding: 12px;
    flex-direction: column;
    gap: 8px;
    text-align: center;
  }

  .checkmark {
    align-self: center;
  }
}

/* 滚动条样式 */
.cookie-consent-content::-webkit-scrollbar {
  width: 6px;
}

.cookie-consent-content::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 3px;
}

.cookie-consent-content::-webkit-scrollbar-thumb {
  background: #c1c1c1;
  border-radius: 3px;
}

.cookie-consent-content::-webkit-scrollbar-thumb:hover {
  background: #a1a1a1;
}

/* 深色模式支持 */
@media (prefers-color-scheme: dark) {
  .cookie-consent-content {
    background: #2d3748;
    color: #e2e8f0;
  }

  .cookie-consent-header h3 {
    color: #e2e8f0;
  }

  .cookie-consent-header {
    border-bottom-color: #4a5568;
  }

  .cookie-category-label {
    border-color: #4a5568;
    background: #4a5568;
  }

  .cookie-category-label:hover {
    border-color: #718096;
    background: #718096;
  }

  .category-info strong {
    color: #e2e8f0;
  }

  .cookie-consent-footer {
    background: #4a5568;
    border-top-color: #718096;
  }

  .privacy-policy-note {
    border-top-color: #4a5568;
  }
}