/**
 * 三子项赛事主题变量
 * 通过 body[data-theme] 切换
 */

/* 主体赛 - 红色主题 */
body[data-theme="main"] {
  --primary: #f00;
  --primary-dark: #c41e3a;
  --primary-light: #e31837;
  --hero-bg: linear-gradient(135deg, #c41e3a 0%, #e31837 100%);
  --footer-bg: #C60506;
  --tab-active-bg: linear-gradient(135deg, #e31837 0%, #c41e3a 100%);
  --tab-border: #e31837;
  --table-header-bg: #f00;
  --process-bg: linear-gradient(135deg, #fdf5f5 0%, #fff 100%);
  --link-hover: #e31837;
}

/* 人工智能与机器人专项赛 - 蓝色主题 */
body[data-theme="ai"] {
  --primary: #0166ff;
  --primary-dark: #0d3d66;
  --primary-light: #4a9fd4;
  --hero-bg: linear-gradient(135deg, #0d3d66 0%, #1e5a8e 100%);
  --footer-bg: #0151CA;
  --tab-active-bg: linear-gradient(135deg, #1e5a8e 0%, #0d3d66 100%);
  --tab-border: #1e5a8e;
  --table-header-bg: #0166ff;
  --process-bg: linear-gradient(135deg, #f0f7fc 0%, #fff 100%);
  --link-hover: #1e5a8e;
}

/* 纺织服装分赛 - 黄/金色主题 */
body[data-theme="textile"] {
  --primary: #FFA200;
  --primary-dark: #b8860b;
  --primary-light: #f0c040;
  --footer-bg: #E69100;
  --tab-active-bg: linear-gradient(135deg, #daa520 0%, #b8860b 100%);
  --tab-border: #d4a017;
  --table-header-bg: #FFA200;
  --process-bg: linear-gradient(135deg, #fdf8e8 0%, #fff 100%);
  --link-hover: #b8860b;
}
body[data-theme="textile"] .banner-event-switch .banner-link--ai{left:-60px}
body[data-theme="textile"] .banner-event-switch .banner-link--main{left:-130px}
body[data-theme="textile"] .banner-event-switch .banner-link--textile{left:140px}

/* 主题变量应用 */
/* 顶栏白底：导航激活态、按钮、下划线随主题色 */
body[data-theme] .header-new .nav a.active {
  color: var(--primary) !important;
}

body[data-theme] .header-new .nav a.active::after {
  background: var(--primary);
}

body[data-theme] .header-new .nav a:hover {
  color: var(--primary) !important;
}

body[data-theme] .header-new .header-btn--ghost {
  color: var(--primary) !important;
  border-color: var(--primary);
}

body[data-theme] .header-new .header-btn--ghost:hover {
  background: #fafafa;
}

body[data-theme] .header-new .header-btn--solid {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff !important;
}

body[data-theme] .header-new .header-btn--solid:hover {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
}

/* bgbase 红底顶栏：覆盖上面的主题色导航/按钮，保持白字与白下划线 */
body[data-theme] .header-bg.header-new .nav a,
body[data-theme] .header-bg.header-new .nav a:hover {
  color: #fff !important;
}

body[data-theme] .header-bg.header-new .nav a.active {
  color: #fff !important;
}

body[data-theme] .header-bg.header-new .nav a.active::after {
  background: #fff !important;
}

body[data-theme] .header-bg .header-btn--ghost {
  color: #fff !important;
  border-color: #fff !important;
  background: transparent !important;
}

body[data-theme] .header-bg .header-btn--ghost:hover {
  background: rgba(255, 255, 255, 0.12) !important;
}

body[data-theme] .header-bg .header-btn--solid {
  background: #fff !important;
  color: var(--primary) !important;
  border-color: #fff !important;
}

body[data-theme] .header-bg .header-btn--solid:hover {
  background: rgba(255, 255, 255, 0.92) !important;
  border-color: rgba(255, 255, 255, 0.92) !important;
  color: var(--primary) !important;
}

/* 页脚统一为全宽红底（见 global.css），不按子赛主题变色 */

/* Banner 覆盖文字链：当前赛高亮 */
body[data-theme] .banner-event-switch .banner-link.active {
  color: #fff;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.45);
}

body[data-theme] .banner-event-switch .banner-link.active .banner-link__sub {
  color: rgba(255, 255, 255, 0.95);
}

body[data-theme] .banner-event-switch .banner-link:not(.active):hover {
  color: #fff;
  opacity: 1;
}

body[data-theme] .criteria-table thead {
  background: var(--table-header-bg);
}

body[data-theme="main"] .criteria-table tbody tr:hover { background: #fdf5f5; }
body[data-theme="ai"] .criteria-table tbody tr:hover { background: #f0f7fc; }
body[data-theme="textile"] .criteria-table tbody tr:hover { background: #fdf8e8; }

body[data-theme] .notice-title:hover {color: var(--link-hover);}
body[data-theme] .process-section {background: var(--process-bg);}

body[data-theme] .footer {background: var(--footer-bg);}
