/* AK Campus 互动乐园：五子棋 / 你画我猜 */

.arc {
	max-width: 1000px;
	margin: 0 auto;
	padding: 0 0 40px;
	color: #1f2937;
}

/* ---------- 老师开关条 ---------- */
.arc-admin {
	display: flex;
	align-items: center;
	gap: 14px;
	margin: 12px 0 16px;
	padding: 12px 16px;
	border-radius: 14px;
	background: #f8fafc;
	border: 1px dashed #cbd5e1;
}
.arc-admin-t {
	flex: 1 1 auto;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 2px;
}
.arc-admin-t b {
	font-size: 13.5px;
	color: #334155;
}
.arc-admin-t span {
	font-size: 12px;
	color: #94a3b8;
}
.arc-switch {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 6px 12px 6px 8px;
	border: 1px solid #e2e8f0;
	border-radius: 999px;
	background: #fff;
	cursor: pointer;
	font-family: inherit;
	transition: all .18s ease;
}
.arc-switch i {
	width: 34px;
	height: 19px;
	border-radius: 999px;
	background: #cbd5e1;
	position: relative;
	transition: background .18s ease;
	flex: 0 0 auto;
}
.arc-switch i::after {
	content: '';
	position: absolute;
	top: 2px;
	left: 2px;
	width: 15px;
	height: 15px;
	border-radius: 50%;
	background: #fff;
	box-shadow: 0 1px 3px rgba(0, 0, 0, .2);
	transition: transform .18s ease;
}
.arc-switch em {
	font-style: normal;
	font-size: 12.5px;
	font-weight: 700;
	color: #64748b;
	min-width: 44px;
}
.arc-switch.is-on {
	background: #ecfdf5;
	border-color: #86efac;
}
.arc-switch.is-on i {
	background: #22c55e;
}
.arc-switch.is-on i::after {
	transform: translateX(15px);
}
.arc-switch.is-on em {
	color: #15803d;
}
.arc-switch:disabled {
	opacity: .6;
	cursor: wait;
}

/* ---------- 关闭态 ---------- */
.arc-closed {
	text-align: center;
	padding: 60px 24px 80px;
	border-radius: 18px;
	background: #f8fafc;
	border: 1px solid #eef2f6;
}
.arc-closed-ico {
	font-size: 44px;
	line-height: 1;
	margin-bottom: 14px;
}
.arc-closed h3 {
	margin: 0 0 8px;
	font-size: 18px;
	color: #334155;
}
.arc-closed p {
	margin: 0 0 18px;
	font-size: 13.5px;
	color: #94a3b8;
}

/* ---------- 大厅头部 ---------- */
.arc-hero {
	display: flex;
	align-items: center;
	gap: 16px;
	margin: 14px 0 18px;
	padding: 20px 22px;
	border-radius: 18px;
	background: linear-gradient(135deg, #f4f9ff 0%, #eef7ff 55%, #ecfeff 100%);
	border: 1px solid #e0e7ff;
}
.arc-hero-txt {
	flex: 1 1 auto;
	min-width: 0;
}
.arc-hero h2 {
	margin: 0 0 6px;
	font-size: 21px;
	letter-spacing: .5px;
	color: #312e81;
}
.arc-hero p {
	margin: 0;
	font-size: 13px;
	line-height: 1.6;
	color: #64748b;
}
.arc-hero-ico {
	font-size: 40px;
	line-height: 1;
	flex: 0 0 auto;
}

/* ---------- 卡片 ---------- */
.arc-cards {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 14px;
	margin-bottom: 20px;
}
.arc-card {
	padding: 20px;
	border-radius: 16px;
	background: #fff;
	border: 1px solid #e9eef5;
	box-shadow: 0 1px 2px rgba(15, 23, 42, .03);
	display: flex;
	flex-direction: column;
}
.arc-card.accent {
	background: linear-gradient(160deg, #fff 0%, #fbfdff 100%);
	border-color: #f0e2fb;
}
.arc-card-ico {
	font-size: 26px;
	line-height: 1;
	margin-bottom: 10px;
	letter-spacing: -2px;
}
.arc-card h3 {
	margin: 0 0 8px;
	font-size: 16px;
	color: #1f2937;
}
.arc-card p {
	margin: 0 0 14px;
	font-size: 12.8px;
	line-height: 1.65;
	color: #6b7280;
	flex: 1 1 auto;
}
.arc-form {
	display: flex;
	gap: 8px;
}
.arc-form input {
	flex: 1 1 auto;
	min-width: 0;
	padding: 9px 12px;
	border: 1px solid #dfe5ee;
	border-radius: 10px;
	font-size: 13.5px;
	font-family: inherit;
	color: #1f2937;
	background: #fbfcfe;
	outline: none;
	transition: border-color .15s, box-shadow .15s;
}
.arc-form input:focus {
	border-color: #a5b4fc;
	box-shadow: 0 0 0 3px rgba(129, 140, 248, .16);
	background: #fff;
}
.arc-form select {
	flex: 1 1 auto;
	min-width: 0;
	padding: 9px 12px;
	border: 1px solid #dfe5ee;
	border-radius: 10px;
	font-size: 13.5px;
	font-family: inherit;
	color: #1f2937;
	background: #fbfcfe;
	outline: none;
	cursor: pointer;
}
.arc-form select:focus {
	border-color: #a5b4fc;
	box-shadow: 0 0 0 3px rgba(129, 140, 248, .16);
	background: #fff;
}

/* ---------- 按钮 ---------- */
.arc-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 9px 18px;
	border: 0;
	border-radius: 10px;
	background: linear-gradient(135deg, #2563eb, #0ea5e9);
	color: #fff;
	font-size: 13.5px;
	font-weight: 700;
	font-family: inherit;
	text-decoration: none;
	cursor: pointer;
	transition: transform .15s ease, box-shadow .15s ease, opacity .15s;
	white-space: nowrap;
}
.arc-btn:hover {
	transform: translateY(-1px);
	box-shadow: 0 6px 16px rgba(37, 99, 235, .26);
	color: #fff;
}
.arc-btn:disabled {
	opacity: .55;
	cursor: not-allowed;
	transform: none;
	box-shadow: none;
}
.arc-btn.ghost {
	background: #fff;
	color: #64748b;
	border: 1px solid #dfe5ee;
}
.arc-btn.ghost:hover {
	color: #334155;
	box-shadow: 0 4px 12px rgba(15, 23, 42, .07);
}
.arc-btn.sm {
	padding: 6px 12px;
	font-size: 12.5px;
	border-radius: 9px;
}

/* ---------- 提示 ---------- */
.arc-tip {
	font-size: 12.5px;
	line-height: 1.5;
	color: #15803d;
	min-height: 18px;
	margin-top: 8px;
	opacity: 0;
	transition: opacity .2s;
}
.arc-tip.is-show {
	opacity: 1;
}
.arc-tip.is-bad {
	color: #dc2626;
}

/* ---------- 区块 ---------- */
.arc-sec {
	margin-bottom: 20px;
}
.arc-sec h3 {
	margin: 0 0 10px;
	font-size: 14px;
	font-weight: 700;
	color: #475569;
	letter-spacing: .3px;
}

/* ---------- 邀请卡 ---------- */
.arc-inv-list {
	display: flex;
	flex-direction: column;
	gap: 8px;
}
.arc-inv {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 12px 16px;
	border-radius: 12px;
	background: #fff7ed;
	border: 1px solid #fed7aa;
}
.arc-inv-n {
	font-weight: 700;
	font-size: 14px;
	color: #9a3412;
}
.arc-inv-t {
	flex: 1 1 auto;
	font-size: 12.5px;
	color: #b45309;
}

/* ---------- 列表行 ---------- */
.arc-rows {
	display: flex;
	flex-direction: column;
	gap: 8px;
}
.arc-row {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 12px 16px;
	border-radius: 12px;
	background: #fff;
	border: 1px solid #e9eef5;
	text-decoration: none;
	color: #1f2937;
	transition: border-color .15s, box-shadow .15s, transform .15s;
}
.arc-row:hover {
	border-color: #c7d2fe;
	box-shadow: 0 6px 16px rgba(79, 70, 229, .08);
	transform: translateY(-1px);
	color: #1f2937;
}
.arc-row-n {
	flex: 1 1 auto;
	font-size: 13.5px;
	font-weight: 600;
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}
.arc-row-m {
	font-size: 12px;
	color: #94a3b8;
	flex: 0 0 auto;
}
.arc-row-s {
	flex: 0 0 auto;
	font-size: 11.5px;
	font-weight: 700;
	padding: 3px 9px;
	border-radius: 999px;
}
.arc-row-s.live {
	background: #ecfdf5;
	color: #15803d;
}
.arc-row-s.wait {
	background: #fef9c3;
	color: #a16207;
}
.arc-empty {
	padding: 26px 18px;
	text-align: center;
	font-size: 13px;
	color: #94a3b8;
	background: #fbfcfe;
	border: 1px dashed #e2e8f0;
	border-radius: 12px;
}
.arc-empty.big {
	margin: 40px 0;
	padding: 50px 20px;
	font-size: 14px;
}
.arc-empty a {
	color: #4f7cf7;
	font-weight: 600;
}

/* ---------- 返回（做成明显的按钮，不再是灰色小字） ---------- */
.arc-back {
	margin: 14px 0 12px;
}
.arc-back a {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 8px 15px;
	border-radius: 999px;
	background: #fff;
	border: 1px solid #dbe3ee;
	box-shadow: 0 2px 8px rgba(15, 23, 42, .06);
	font-size: 13px;
	color: #334155;
	font-weight: 700;
	text-decoration: none;
	transition: color .15s ease, background .15s ease, border-color .15s ease, transform .15s ease;
}
.arc-back a:hover {
	color: #2563eb;
	background: #eff6ff;
	border-color: #93c5fd;
	transform: translateX(-2px);
}

/* ---------- 五子棋 ---------- */
.arc-board-wrap {
	display: grid;
	grid-template-columns: 240px minmax(0, 1fr);
	gap: 20px;
	align-items: start;
	margin-top: 8px;
}
.arc-side {
	display: flex;
	flex-direction: column;
	gap: 14px;
	padding: 16px;
	border-radius: 16px;
	background: #fff;
	border: 1px solid #e9eef5;
}
.arc-vs {
	display: flex;
	flex-direction: column;
	gap: 8px;
}
.arc-player {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 8px 10px;
	border-radius: 10px;
	background: #f8fafc;
	transition: background .18s, box-shadow .18s;
}
.arc-player.is-turn {
	background: #eef4ff;
	box-shadow: inset 0 0 0 1.5px #bfd3ff;
}
.arc-dot {
	width: 14px;
	height: 14px;
	border-radius: 50%;
	flex: 0 0 auto;
}
.arc-dot.black {
	background: radial-gradient(circle at 32% 30%, #6b6b6b, #0a0a0a);
}
.arc-dot.white {
	background: radial-gradient(circle at 32% 30%, #fff, #c9cdd4);
	border: 1px solid #cbd5e1;
}
.arc-player b {
	flex: 1 1 auto;
	font-size: 13.5px;
	font-weight: 600;
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}
.arc-player em {
	font-style: normal;
	font-size: 11px;
	color: #94a3b8;
}
.arc-status {
	padding: 10px 12px;
	border-radius: 10px;
	background: #f1f5f9;
	font-size: 13px;
	font-weight: 700;
	text-align: center;
	color: #475569;
}
.arc-status.you {
	background: #ecfdf5;
	color: #15803d;
}
.arc-status.wait {
	background: #f8fafc;
	color: #94a3b8;
}
.arc-status.done {
	background: #fef2f2;
	color: #b91c1c;
}
.arc-btns {
	display: flex;
	gap: 8px;
	flex-wrap: wrap;
}
.arc-hint {
	font-size: 11.5px;
	line-height: 1.6;
	color: #94a3b8;
}

#arc-board {
	display: block;
	width: 100%;
	max-width: 600px;
	border-radius: 12px;
	box-shadow: 0 10px 30px rgba(120, 82, 40, .18);
	cursor: pointer;
	touch-action: manipulation;
}

/* ---------- 等待态 ---------- */
.arc-wait {
	text-align: center;
	padding: 60px 20px;
	border-radius: 18px;
	background: #fbfcfe;
	border: 1px dashed #e2e8f0;
}
.arc-wait-ico {
	font-size: 38px;
	line-height: 1;
	margin-bottom: 12px;
}
.arc-wait h3 {
	margin: 0 0 8px;
	font-size: 17px;
	color: #334155;
}
.arc-wait p {
	margin: 0 0 6px;
	font-size: 13px;
	color: #64748b;
}
.arc-wait-btns {
	display: flex;
	gap: 10px;
	justify-content: center;
	margin-top: 16px;
}
.arc-dim {
	font-size: 12px !important;
	color: #94a3b8 !important;
	margin-top: 10px !important;
}

/* ---------- 你画我猜 ---------- */
.arc-draw {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 300px;
	gap: 16px;
	margin-top: 8px;
	align-items: start;
}
.arc-canvas-box {
	border-radius: 16px;
	background: #fff;
	border: 1px solid #e9eef5;
	padding: 12px;
	box-shadow: 0 1px 2px rgba(15, 23, 42, .03);
}
.arc-canvas-top {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	margin-bottom: 10px;
}
.arc-word {
	font-size: 14px;
	font-weight: 700;
	color: #475569;
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}
.arc-word.mine {
	color: #7c5cf7;
}
.arc-word.done {
	color: #b91c1c;
}
.arc-timer {
	flex: 0 0 auto;
	font-size: 15px;
	font-weight: 800;
	color: #4f7cf7;
	font-variant-numeric: tabular-nums;
	padding: 3px 10px;
	border-radius: 999px;
	background: #eff5ff;
}
.arc-timer.low {
	color: #dc2626;
	background: #fef2f2;
}
.arc-hint-line {
	margin: 0 0 10px;
	padding: 7px 12px;
	border-radius: 9px;
	background: #fffbeb;
	border: 1px dashed #fcd34d;
	color: #b45309;
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 3px;
	text-align: center;
}
.arc-hint-line[hidden] {
	display: none;
}

#arc-canvas {
	display: block;
	width: 100%;
	height: auto;
	border-radius: 10px;
	background: #fff;
	border: 1px solid #e5eaf2;
	touch-action: none;
	cursor: crosshair;
}

.arc-tools {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin-top: 10px;
}
.arc-tool {
	padding: 6px 11px;
	border: 1px solid #e2e8f0;
	border-radius: 8px;
	background: #fff;
	font-size: 12px;
	font-weight: 600;
	font-family: inherit;
	color: #475569;
	cursor: pointer;
	transition: all .14s;
	line-height: 1.2;
}
.arc-tool:hover {
	border-color: #c7d2fe;
	background: #f8fbff;
}
.arc-tool.is-on {
	border-color: #7c5cf7;
	background: #f3f0ff;
	color: #5b21b6;
}
.arc-tool.c[data-color="#d62b2b"] { color: #d62b2b; }
.arc-tool.c[data-color="#2563eb"] { color: #2563eb; }
.arc-tool.c[data-color="#16a34a"] { color: #16a34a; }

/* 右侧面板 */
.arc-chat-box {
	display: flex;
	flex-direction: column;
	gap: 10px;
	padding: 14px;
	border-radius: 16px;
	background: #fff;
	border: 1px solid #e9eef5;
	box-shadow: 0 1px 2px rgba(15, 23, 42, .03);
	max-height: 720px;
}
.arc-score-h {
	display: flex;
	align-items: center;
	justify-content: space-between;
	font-size: 12.5px;
	color: #475569;
}
.arc-score-h b {
	font-size: 13px;
}
.arc-score-h span {
	color: #94a3b8;
	font-size: 12px;
}
.arc-scores {
	display: flex;
	flex-direction: column;
	gap: 4px;
	max-height: 168px;
	overflow-y: auto;
	padding-right: 2px;
}
.arc-score-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	padding: 5px 9px;
	border-radius: 8px;
	background: #f8fafc;
	font-size: 12.5px;
}
.arc-score-row.is-me {
	background: #eef4ff;
	font-weight: 700;
}
.arc-score-row.is-drawer {
	box-shadow: inset 0 0 0 1.5px #ddd6fe;
}
.arc-score-row.is-drawer .arc-score-n::after {
	content: '✏️';
	margin-left: 4px;
	font-size: 10px;
}
.arc-score-n {
	flex: 1 1 auto;
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	color: #334155;
}
.arc-score-row b {
	flex: 0 0 auto;
	color: #4f7cf7;
	font-variant-numeric: tabular-nums;
}

.arc-msgs {
	flex: 1 1 auto;
	min-height: 180px;
	max-height: 320px;
	overflow-y: auto;
	display: flex;
	flex-direction: column;
	gap: 5px;
	padding: 8px;
	border-radius: 10px;
	background: #fbfcfe;
	border: 1px solid #f1f5f9;
}
.arc-msg {
	font-size: 12.5px;
	line-height: 1.55;
	color: #475569;
	padding: 4px 8px;
	border-radius: 7px;
	word-break: break-word;
}
.arc-msg.correct {
	background: #ecfdf5;
	color: #15803d;
	font-weight: 700;
}
.arc-msg.round {
	text-align: center;
	color: #7c5cf7;
	background: #f5f3ff;
	font-weight: 700;
}
.arc-msg.timeout {
	color: #b45309;
	background: #fffbeb;
}
.arc-msg.join {
	color: #94a3b8;
	font-size: 11.5px;
}
.arc-msg.win {
	background: #fef2f2;
	color: #b91c1c;
	font-weight: 700;
}
.arc-msg.ok {
	background: #ecfdf5;
	color: #15803d;
	font-weight: 700;
}
.arc-msg.warn {
	background: #fef2f2;
	color: #b91c1c;
}

.arc-input-row {
	display: flex;
	gap: 6px;
}
.arc-input-row input {
	flex: 1 1 auto;
	min-width: 0;
	padding: 9px 11px;
	border: 1px solid #dfe5ee;
	border-radius: 10px;
	font-size: 13px;
	font-family: inherit;
	background: #fbfcfe;
	outline: none;
	transition: border-color .15s, box-shadow .15s;
}
.arc-input-row input:focus {
	border-color: #a5b4fc;
	box-shadow: 0 0 0 3px rgba(129, 140, 248, .16);
	background: #fff;
}
.arc-input-row input:disabled {
	background: #f1f5f9;
	color: #94a3b8;
	cursor: not-allowed;
}
.arc-draw-btns {
	display: flex;
	gap: 8px;
	flex-wrap: wrap;
}

/* ---------- 全站邀战提醒 ---------- */
.arc-alert-layer {
	position: fixed;
	right: 18px;
	/* 让开右下角的悬浮按钮，不然「去看看」会被压住 */
	bottom: 86px;
	z-index: 99998;
	display: flex;
	flex-direction: column;
	gap: 10px;
	max-width: min(340px, calc(100vw - 36px));
}
.arc-alert-layer[hidden] {
	display: none;
}
.arc-toast {
	display: flex;
	flex-direction: column;
	gap: 10px;
	padding: 14px 16px;
	border-radius: 14px;
	background: #fff;
	border: 1px solid #e0e7ff;
	box-shadow: 0 12px 34px rgba(49, 46, 129, .18);
	animation: arcIn .26s cubic-bezier(.22, 1, .36, 1);
}
@keyframes arcIn {
	from { opacity: 0; transform: translateY(12px) scale(.97); }
	to { opacity: 1; transform: none; }
}
.arc-toast-txt {
	font-size: 13.5px;
	color: #334155;
	line-height: 1.5;
}
.arc-toast-txt b {
	color: #4338ca;
}
.arc-toast-acts {
	display: flex;
	gap: 8px;
}
.arc-toast-btn {
	flex: 1 1 auto;
	text-align: center;
	padding: 7px 12px;
	border: 0;
	border-radius: 9px;
	background: linear-gradient(135deg, #2563eb, #0ea5e9);
	color: #fff;
	font-size: 12.5px;
	font-weight: 700;
	font-family: inherit;
	text-decoration: none;
	cursor: pointer;
}
.arc-toast-btn:hover {
	color: #fff;
	opacity: .92;
}
.arc-toast-btn.ghost {
	background: #f1f5f9;
	color: #64748b;
	flex: 0 0 auto;
	padding: 7px 14px;
}
.arc-toast-btn.ghost:hover {
	color: #334155;
}

/* ---------- 未登录 ---------- */
.arc-guest {
	text-align: center;
	padding: 70px 24px;
	border-radius: 18px;
	background: linear-gradient(135deg, #eef6ff, #e0f2fe);
	border: 1px solid #e0e7ff;
}
.arc-guest h2 {
	margin: 0 0 8px;
	font-size: 20px;
	color: #312e81;
}
.arc-guest p {
	margin: 0 0 18px;
	font-size: 13.5px;
	color: #64748b;
}

/* ---------- 响应式 ---------- */
@media (max-width: 860px) {
	.arc-draw {
		grid-template-columns: minmax(0, 1fr);
	}
	.arc-chat-box {
		max-height: none;
	}
	.arc-msgs {
		max-height: 240px;
	}
}

@media (max-width: 760px) {
	.arc-cards {
		grid-template-columns: 1fr;
	}
	.arc-board-wrap {
		grid-template-columns: minmax(0, 1fr);
	}
	.arc-side {
		order: 2;
		flex-direction: row;
		flex-wrap: wrap;
		align-items: center;
		gap: 10px;
	}
	.arc-vs {
		flex: 1 1 100%;
		flex-direction: row;
		gap: 8px;
	}
	.arc-player {
		flex: 1 1 0;
	}
	.arc-status {
		flex: 1 1 100%;
	}
	.arc-hint {
		flex: 1 1 100%;
	}
	#arc-board {
		order: 1;
		max-width: 100%;
	}
}

@media (max-width: 460px) {
	.arc-hero {
		padding: 16px;
	}
	.arc-hero h2 {
		font-size: 18px;
	}
	.arc-hero-ico {
		font-size: 32px;
	}
	.arc-card {
		padding: 16px;
	}
	.arc-form {
		flex-direction: column;
	}
	.arc-form .arc-btn {
		width: 100%;
	}
	.arc-admin {
		flex-direction: column;
		align-items: flex-start;
		gap: 10px;
	}
	.arc-alert-layer {
		right: 12px;
		left: 12px;
		bottom: 78px;
		max-width: none;
	}
}

/* ---------- 画板占位提示 ---------- */
.arc-canvas-hold {
	position: relative;
}
.arc-canvas-tip {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 15px;
	font-weight: 600;
	color: #c7d2e0;
	letter-spacing: 2px;
	pointer-events: none;
	transition: opacity .25s ease;
}
.arc-canvas-tip.is-hide {
	opacity: 0;
}

/* ---------- 手机端触摸优化 ---------- */
@media (max-width: 560px) {
	.arc-canvas-box {
		padding: 8px;
	}
	.arc-canvas-top {
		margin-bottom: 8px;
		padding: 0 2px;
	}
	.arc-tool {
		padding: 8px 13px;
		font-size: 12.5px;
		min-height: 36px;
		min-width: 40px;
	}
	.arc-tools {
		gap: 5px;
		margin-top: 8px;
	}
	.arc-tool[data-color] {
		min-width: 34px;
	}
	.arc-input-row input {
		padding: 10px 12px;
		font-size: 14px;
	}
	.arc-btn.sm {
		padding: 9px 14px;
		font-size: 13px;
	}
}
