/**
 * AbyssOJ 多主题样式
 * 提供多种主题选择
 */

/* 默认主题 */
.theme-default {
  --theme-primary: #165DFF;
  --theme-secondary: #4080FF;
  --theme-accent: #7B61FF;
  --theme-success: #00B42A;
  --theme-warning: #FF7D00;
  --theme-danger: #F53F3F;
}

/* 蓝色主题 */
.theme-blue {
  --theme-primary: #1E88E5;
  --theme-secondary: #64B5F6;
  --theme-accent: #0D47A1;
  --theme-success: #26A69A;
  --theme-warning: #FFA000;
  --theme-danger: #D32F2F;
}

/* 绿色主题 */
.theme-green {
  --theme-primary: #388E3C;
  --theme-secondary: #81C784;
  --theme-accent: #1B5E20;
  --theme-success: #66BB6A;
  --theme-warning: #FDD835;
  --theme-danger: #E53935;
}

/* 紫色主题 */
.theme-purple {
  --theme-primary: #7B1FA2;
  --theme-secondary: #BA68C8;
  --theme-accent: #4A148C;
  --theme-success: #66BB6A;
  --theme-warning: #FFB300;
  --theme-danger: #EF5350;
}

/* 橙色主题 */
.theme-orange {
  --theme-primary: #E65100;
  --theme-secondary: #FFB74D;
  --theme-accent: #BF360C;
  --theme-success: #43A047;
  --theme-warning: #FFC107;
  --theme-danger: #E53935;
}

/* 应用主题到全局变量 */
.theme-default {
  --primary-color: var(--theme-primary);
  --secondary-color: var(--theme-secondary);
  --success-color: var(--theme-success);
  --warning-color: var(--theme-warning);
  --danger-color: var(--theme-danger);
}

.theme-blue {
  --primary-color: var(--theme-primary);
  --secondary-color: var(--theme-secondary);
  --success-color: var(--theme-success);
  --warning-color: var(--theme-warning);
  --danger-color: var(--theme-danger);
}

.theme-green {
  --primary-color: var(--theme-primary);
  --secondary-color: var(--theme-secondary);
  --success-color: var(--theme-success);
  --warning-color: var(--theme-warning);
  --danger-color: var(--theme-danger);
}

.theme-purple {
  --primary-color: var(--theme-primary);
  --secondary-color: var(--theme-secondary);
  --success-color: var(--theme-success);
  --warning-color: var(--theme-warning);
  --danger-color: var(--theme-danger);
}

.theme-orange {
  --primary-color: var(--theme-primary);
  --secondary-color: var(--theme-secondary);
  --success-color: var(--theme-success);
  --warning-color: var(--theme-warning);
  --danger-color: var(--theme-danger);
}

/* 主题切换动画 */
body {
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* 公告栏样式 */
.announcement-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 49;
  white-space: nowrap;
  overflow: hidden;
}

.announcement-content {
  display: inline-block;
  animation: scroll 30s linear infinite;
}

@keyframes scroll {
  0% {
    transform: translateX(100%);
  }
  100% {
    transform: translateX(-100%);
  }
}

/* 维护通知样式 */
.maintenance-notice {
  font-weight: 500;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* 主题选择器样式 */
.theme-selector {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.theme-option {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all 0.2s ease;
}

.theme-option:hover {
  transform: scale(1.1);
}

.theme-option.active {
  border-color: #333;
}

/* 主题预览卡片样式 */
.theme-preview {
  padding: 15px;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  transition: all 0.3s ease;
}

.theme-preview:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

/* 暗黑模式下的主题适配 */
body.dark-theme.theme-default {
  --dark-primary-color: #4080FF;
  --dark-secondary-color: #69B1FF;
  --dark-success-color: #36D399;
  --dark-warning-color: #FBBD23;
  --dark-danger-color: #F87272;
}

body.dark-theme.theme-blue {
  --dark-primary-color: #64B5F6;
  --dark-secondary-color: #90CAF9;
  --dark-success-color: #80CBC4;
  --dark-warning-color: #FFD54F;
  --dark-danger-color: #EF5350;
}

body.dark-theme.theme-green {
  --dark-primary-color: #81C784;
  --dark-secondary-color: #A5D6A7;
  --dark-success-color: #66BB6A;
  --dark-warning-color: #FFEE58;
  --dark-danger-color: #E53935;
}

body.dark-theme.theme-purple {
  --dark-primary-color: #BA68C8;
  --dark-secondary-color: #CE93D8;
  --dark-success-color: #66BB6A;
  --dark-warning-color: #FFD54F;
  --dark-danger-color: #EF5350;
}

body.dark-theme.theme-orange {
  --dark-primary-color: #FFB74D;
  --dark-secondary-color: #FFCC80;
  --dark-success-color: #66BB6A;
  --dark-warning-color: #FFEE58;
  --dark-danger-color: #EF5350;
}