/*
Theme Name: teamBase 战队基地
Description: CS2 战队训练赛平台专用主题。含训练赛发布、审核、列表与筛选、高校认证徽章，以及 5 套可切换配色。
Author: teamBase
Version: 1.1.0
Requires PHP: 7.4
Text Domain: teambase
*/

/* ===== 配色方案（默认：CT 蓝 × T 橙）。切换：外观 → 自定义 → 配色方案 ===== */
:root,
body.tb-scheme-ctt {
	--bg: #0a111c;
	--bg2: #0f1826;
	--card: #111c2c;
	--line: #213048;
	--text: #e6eefb;
	--muted: #8798b3;
	--accent: #4aa3ff;          /* CT 蓝：主按钮、时间 */
	--accent-2: #f5a524;        /* T 橙：强调、徽章 */
	--on-accent: #06101c;
	--on-accent-2: #1a1205;
	--accent-rgb: 74, 163, 255;
	--header-bg: rgba(10, 17, 28, .92);
	--ok: #3ecf8e;
	--err: #ff6b6b;
	--radius: 10px;
	color-scheme: dark;
}
body.tb-scheme-orange {
	--bg: #0c1016; --bg2: #131a24; --card: #171f2b; --line: #263142; --text: #e8edf4; --muted: #8b98ab;
	--accent: #f5a524; --accent-2: #ffcf70; --on-accent: #1a1205; --on-accent-2: #1a1205;
	--accent-rgb: 245, 165, 36; --header-bg: rgba(12, 16, 22, .92);
}
body.tb-scheme-purple {
	--bg: #0b0d1f; --bg2: #10132b; --card: #141833; --line: #262c55; --text: #e9ebff; --muted: #8d93c4;
	--accent: #7c5cff; --accent-2: #22d3ee; --on-accent: #ffffff; --on-accent-2: #04222a;
	--accent-rgb: 124, 92, 255; --header-bg: rgba(11, 13, 31, .92);
}
body.tb-scheme-green {
	--bg: #0d120e; --bg2: #121a13; --card: #161e17; --line: #27352a; --text: #e6efe4; --muted: #8a9c8a;
	--accent: #9acd4a; --accent-2: #c5e88a; --on-accent: #10190a; --on-accent-2: #10190a;
	--accent-rgb: 154, 205, 74; --header-bg: rgba(13, 18, 14, .92);
}
body.tb-scheme-light {
	--bg: #f6f7f9; --bg2: #eceff4; --card: #ffffff; --line: #dfe3ea; --text: #1b2330; --muted: #617085;
	--accent: #ff6a00; --accent-2: #ff6a00; --on-accent: #ffffff; --on-accent-2: #ffffff;
	--accent-rgb: 255, 106, 0; --header-bg: rgba(255, 255, 255, .94);
	color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
	margin: 0;
	background: var(--bg);
	color: var(--text);
	font: 16px/1.7 -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Segoe UI", Roboto, sans-serif;
}
a { color: var(--accent); text-decoration: none; }
a:hover { filter: brightness(1.15); }
h1, h2, h3 { line-height: 1.3; margin: 0 0 .5em; }
img { max-width: 100%; height: auto; }

.tb-wrap { width: 100%; max-width: 1040px; margin: 0 auto; padding: 0 20px; }
.tb-narrow { max-width: 680px; }
.tb-muted { color: var(--muted); font-size: 14px; }
.tb-accent {
	background: linear-gradient(90deg, var(--accent), var(--accent-2));
	-webkit-background-clip: text; background-clip: text; color: transparent;
}

/* 顶栏 */
.tb-header {
	position: sticky; top: 0; z-index: 50;
	background: var(--header-bg);
	backdrop-filter: blur(8px);
	border-bottom: 1px solid var(--line);
}
.tb-header .tb-wrap { max-width: none; padding: 0 40px; }
.tb-header-in { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 60px; flex-wrap: wrap; }
.tb-brand { display: flex; align-items: center; gap: 10px; color: var(--text); }
.tb-brand:hover { color: var(--text); filter: none; }
.tb-logo {
	width: 26px; height: 26px; border-radius: 6px; position: relative;
	background: linear-gradient(135deg, var(--accent), var(--accent-2));
}
.tb-logo::after { content: ""; position: absolute; inset: 7px; border: 2px solid var(--bg); border-radius: 50%; }
.tb-brand-name { font-weight: 700; font-size: 18px; letter-spacing: .3px; }
.tb-brand-name small { margin-left: 8px; font-weight: 400; font-size: 13px; color: var(--muted); }
.tb-menu { list-style: none; display: flex; gap: 4px; margin: 0; padding: 0; flex-wrap: wrap; }
.tb-menu a { display: block; padding: 6px 12px; color: var(--muted); border-radius: 6px; font-size: 15px; }
.tb-menu a:hover, .tb-menu .current-menu-item a { color: var(--text); background: var(--bg2); filter: none; }

/* 按钮 */
.tb-btn {
	display: inline-block; cursor: pointer; border: 1px solid var(--accent);
	background: var(--accent); color: var(--on-accent); font-weight: 700; font-size: 15px;
	padding: 10px 22px; border-radius: 8px; line-height: 1.4; font-family: inherit;
	transition: filter .15s, transform .15s;
}
.tb-btn:hover { filter: brightness(1.12); color: var(--on-accent); transform: translateY(-1px); }
.tb-btn-ghost { background: transparent; color: var(--accent-2); border-color: var(--accent-2); }
.tb-btn-ghost:hover { background: rgba(var(--accent-rgb), .1); color: var(--accent-2); }

/* 首页 Hero */
.tb-hero {
	padding: 64px 0 0; text-align: center;
	background:
		radial-gradient(900px 340px at 22% 0, rgba(var(--accent-rgb), .22), transparent 72%),
		radial-gradient(800px 320px at 80% 0, rgba(245, 165, 36, .13), transparent 72%),
		var(--bg);
}
.tb-eyebrow { color: var(--accent); font-weight: 700; letter-spacing: 2px; font-size: 14px; margin: 0 0 14px; }
.tb-hero h1 { font-size: clamp(38px, 7.5vw, 76px); letter-spacing: 1px; margin-bottom: 18px; }
.tb-lead { color: var(--muted); font-size: 18px; max-width: 580px; margin: 0 auto 16px; }
.tb-cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

.tb-founder {
	display: inline-block; margin: 0 auto; padding: 8px 20px; font-size: 14px; font-weight: 600;
	color: var(--accent-2); background: rgba(245, 165, 36, .1); border: 1px solid rgba(245, 165, 36, .55); border-radius: 999px;
	transition: background .15s, border-color .15s;
}
.tb-founder span { margin-left: 4px; }
.tb-founder:hover { color: var(--accent-2); background: rgba(245, 165, 36, .18); border-color: var(--accent-2); filter: none; }

/* 区块 */
.tb-section { padding: 34px 0; }
.tb-hero + .tb-section { padding-top: 26px; }
.tb-alt { background: var(--bg2); }
.tb-section h2 { font-size: 34px; }
.tb-sec-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.tb-sec-head h1, .tb-sec-head h2 { margin: 0; }

.tb-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.tb-grid-3 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); margin-bottom: 16px; }

/* 训练赛卡片 */
.tb-card {
	background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
	padding: 18px; display: flex; flex-direction: column; gap: 10px;
	transition: border-color .15s, transform .15s;
}
.tb-card:hover { border-color: rgba(var(--accent-rgb), .6); transform: translateY(-2px); }
.tb-card-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.tb-card h3 { margin: 0; font-size: 18px; }
.tb-school { color: var(--muted); font-size: 13px; }
.tb-badge {
	display: inline-block; font-size: 12px; font-weight: 700; line-height: 1.6;
	padding: 0 9px; border-radius: 999px; background: var(--accent-2); color: var(--on-accent-2);
}
.tb-time { font-size: 20px; font-weight: 700; color: var(--accent); font-variant-numeric: tabular-nums; }
.tb-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.tb-tag { font-size: 12px; padding: 2px 10px; border-radius: 999px; background: var(--bg2); border: 1px solid var(--line); color: var(--text); }
.tb-tag-lv { color: var(--accent-2); border-color: var(--accent-2); }
.tb-note { margin: 0; color: var(--muted); font-size: 14px; }
.tb-contact { margin-top: auto; padding-top: 10px; border-top: 1px dashed var(--line); font-size: 14px; color: var(--muted); }
.tb-contact strong { color: var(--text); user-select: all; }

/* 步骤与说明框 */
.tb-steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; margin-top: 8px; }
.tb-step { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.tb-step span {
	display: inline-flex; width: 32px; height: 32px; align-items: center; justify-content: center;
	border-radius: 50%; background: var(--accent); color: var(--on-accent); font-weight: 800; margin-bottom: 10px;
}
.tb-step h3, .tb-box h3 { font-size: 17px; }
.tb-step p, .tb-box p { margin: 0; color: var(--muted); font-size: 15px; }
.tb-box { background: var(--card); border: 1px dashed var(--line); border-radius: var(--radius); padding: 20px; }

/* 两件事区块 */
.tb-two { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.tb-box-hl { border-style: solid; border-top: 2px solid var(--accent); position: relative; }
.tb-chip { display: inline-block; font-size: 12px; font-weight: 700; padding: 0 9px; border-radius: 999px; background: var(--accent-2); color: var(--on-accent-2); margin-bottom: 8px; }
.tb-link { display: inline-block; margin-top: 10px; font-weight: 700; }
.tb-content code { background: var(--bg2); border: 1px solid var(--line); padding: 1px 6px; border-radius: 5px; font-size: 14px; }

/* 高校认证横幅 */
.tb-verify {
	display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap;
	background: linear-gradient(90deg, rgba(var(--accent-rgb), .14), rgba(245, 165, 36, .12));
	border: 1px solid var(--line); border-radius: var(--radius); padding: 24px 28px;
}
.tb-verify h2 { margin: 0 0 6px; font-size: 22px; }
.tb-verify p { margin: 0; color: var(--muted); max-width: 620px; }

.tb-empty { text-align: center; padding: 40px 20px; background: var(--card); border: 1px dashed var(--line); border-radius: var(--radius); color: var(--muted); }

/* 首页：区块标题居中 */
.home .tb-section h2 { text-align: center; }
.home .tb-sec-head { position: relative; justify-content: center; }
.home .tb-sec-head > a { position: absolute; right: 0; top: 50%; transform: translateY(-50%); font-size: 14px; }
.home .tb-section > .tb-wrap > .tb-muted { text-align: center; }
.home .tb-left h2 { text-align: left; }
.home .tb-left .tb-sec-head { justify-content: space-between; }
.home .tb-left .tb-sec-head > a { position: static; transform: none; }
@media (max-width: 640px) {
	.home .tb-sec-head > a { position: static; transform: none; }
	.home .tb-sec-head { flex-direction: column; gap: 4px; }
}

/* 内页 */
.tb-page { padding-top: 40px; padding-bottom: 64px; }
.tb-h1 { font-size: 30px; }
.tb-content h2 { margin-top: 1.6em; font-size: 22px; }
.tb-content ul { padding-left: 1.2em; }
.tb-content li { margin: .3em 0; }

/* 表单 */
.tb-filter { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; margin-bottom: 22px; }
.tb-filter label, .tb-form label { display: flex; flex-direction: column; gap: 6px; font-size: 14px; color: var(--muted); }
.tb-form { display: flex; flex-direction: column; gap: 16px; margin-top: 20px; }
.tb-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.tb-form input, .tb-form select, .tb-form textarea, .tb-filter select {
	width: 100%; background: var(--card); color: var(--text); border: 1px solid var(--line);
	border-radius: 8px; padding: 10px 12px; font: inherit; font-size: 15px;
}
.tb-filter select { min-width: 140px; }
.tb-form input:focus, .tb-form select:focus, .tb-form textarea:focus, .tb-filter select:focus {
	outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(var(--accent-rgb), .2);
}
.tb-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.tb-msg { padding: 12px 16px; border-radius: 8px; margin: 16px 0; font-size: 15px; }
.tb-msg-ok { background: rgba(62, 207, 142, .12); border: 1px solid var(--ok); color: var(--ok); }
.tb-msg-err { background: rgba(255, 107, 107, .12); border: 1px solid var(--err); color: var(--err); }

/* 页脚 */
.tb-footer { border-top: 1px solid var(--line); padding: 32px 0; background: var(--bg2); text-align: center; }
.tb-footer p { margin: 4px 0; }

@media (max-width: 640px) {
	.tb-header .tb-wrap { padding: 0 20px; }
	.tb-hero { padding: 56px 0 48px; }
	.tb-row { grid-template-columns: 1fr; }
	.tb-brand-name small { display: none; }
	.tb-header-in { padding-top: 8px; padding-bottom: 8px; }
	.tb-verify { padding: 20px; }
}

/* 登录系统 */
.tb-auth { display: flex; align-items: center; gap: 12px; font-size: 15px; }
.tb-auth a:not(.tb-btn) { color: var(--muted); }
.tb-auth a:not(.tb-btn):hover { color: var(--text); filter: none; }
.tb-btn-sm { padding: 6px 16px; font-size: 14px; }
.tb-accept { margin-top: auto; padding-top: 12px; border-top: 1px dashed var(--line); }
.tb-accept form { margin: 0; }
.tb-server { margin-top: 8px; font-size: 14px; color: var(--muted); }
.tb-server strong { color: var(--text); user-select: all; }
.tb-h2 { font-size: 24px; margin: 36px 0 14px; }
.tb-form .tb-check { flex-direction: row; align-items: center; gap: 8px; }
.tb-form .tb-check input { width: auto; }
.tb-left-form { margin-left: 0; }
.tb-empty .tb-btn { margin: 4px 4px 0; }

/* Steam 登录 */
.tb-steam { display: block; text-align: center; padding: 12px 20px; margin: 20px 0 4px; border-radius: 8px; font-weight: 700; color: #fff; background: linear-gradient(90deg, #1b2838, #2a475e); border: 1px solid #3b6a8c; }
.tb-steam:hover { color: #fff; filter: brightness(1.15); }
.tb-or { text-align: center; color: var(--muted); font-size: 14px; margin: 14px 0 0; }

/* 首页大标题：蓝 + 橙，无渐变 */
.tb-h1-blue { color: var(--accent); }
.tb-h1-orange { color: var(--accent); }

/* 首页大标题白色部分用纯白 */
.tb-hero h1 { color: #fff; }

/* 首页大标题全白，不要渐变 */
.tb-hero h1 .tb-accent { background: none; -webkit-background-clip: border-box; background-clip: border-box; color: #fff; }

/* 首页大标题全橙 */
.tb-hero h1, .tb-hero h1 .tb-accent { color: var(--accent-2); }

/* 首页大标题：整行 蓝 → 橙 渐变 */
.tb-hero h1 {
	width: fit-content; max-width: 100%; margin-left: auto; margin-right: auto;
	background: linear-gradient(90deg, var(--accent), var(--accent-2));
	-webkit-background-clip: text; background-clip: text; color: transparent;
}
.tb-hero h1 .tb-accent { background: none; color: transparent; }

/* 首页大标题：只有“基地”渐变，其余纯白 */
.tb-hero h1 { background: none; -webkit-background-clip: border-box; background-clip: border-box; color: #fff; }
.tb-hero h1 .tb-accent { background: linear-gradient(90deg, var(--accent), var(--accent-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* 首页大标题：“基”蓝、“地”橙 */
.tb-hero h1 .tb-h1-blue { color: var(--accent); }
.tb-hero h1 .tb-h1-orange { color: var(--accent-2); }
