/* 模块定位：独立游戏大厅样式。核心职责：卡片、实时棋盘、操作区与嵌入窗口。
 * 方法清单：大厅布局 / 游戏舞台 / 全屏 / 移动端 / 只读嵌入。
 * 拆分理由：游戏展示不改变环境规则，也不影响大脑首页的外观偏好。 */
:root { color-scheme: light; font: 16px/1.65 Inter, "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", system-ui, sans-serif; color: #273a49; background: #f4f7fa; --muted: #657887; --line: #dce5ea; --accent: #317c6f; }
* { box-sizing: border-box; } [hidden] { display: none !important; }
body { margin: 0; } a { color: inherit; text-decoration: none; } button, input { font: inherit; } button, .button-link { cursor: pointer; border: 1px solid var(--line); border-radius: 11px; background: #fff; color: inherit; padding: 10px 17px; } button:hover:not(:disabled), a:hover { color: var(--accent); border-color: #8cb6ad; } button:disabled { cursor: not-allowed; opacity: .45; } button:focus-visible, a:focus-visible, canvas:focus-visible { outline: 3px solid #6dada0; outline-offset: 4px; }
.site-header { max-width: 1400px; margin: auto; padding: 26px 44px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); } .brand { font-size: 23px; font-weight: 750; } .brand span { font-size: 16px; font-weight: 400; color: var(--muted); margin-left: 14px; } nav { display: flex; gap: 28px; }
main { max-width: 1300px; margin: auto; padding: 0 32px; } .intro { padding: 68px 0 50px; position: relative; } .eyebrow { letter-spacing: .12em; font-size: 13px; font-weight: 650; color: var(--accent); margin: 0 0 15px; } h1 { font-size: clamp(38px, 4.3vw, 60px); font-weight: 800; line-height: 1.23; letter-spacing: -.03em; margin: 0 0 22px; } .intro > p:not(.eyebrow) { color: var(--muted); font-size: 18px; } .watch-brain { position: absolute; right: 0; bottom: 90px; border: 1px solid #c9ded7; background: #e9f3ee; padding: 18px 22px; border-radius: 16px; display: flex; gap: 14px; align-items: center; } .live-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #60af91; margin-right: 4px; }
h2, h3, p { margin-top: 0; } h2 { font-size: 27px; margin-bottom: 0; } h3 { font-size: 22px; margin-bottom: 12px; } .section-title, .play-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 22px; } .section-title > span { color: var(--muted); font-size: 14px; }
.game-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; } .game-card { text-align: left; padding: 24px; border-radius: 18px; position: relative; min-height: 170px; transition: border-color .15s, transform .15s; } .game-card:hover { transform: translateY(-2px); } .game-card[aria-pressed="true"] { border: 2px solid #659e8e; padding: 23px; background: #f4fbf6; } .game-icon { font-size: 28px; display: block; margin-bottom: 12px; } .game-card strong { font-size: 20px; display: block; margin-bottom: 4px; } .game-card small { font-size: 15px; color: var(--muted); display: block; } .card-arrow { position: absolute; top: 25px; right: 24px; color: #96aaa8; }
.play-section { margin-top: 52px; padding-top: 30px; border-top: 1px solid var(--line); scroll-margin-top: 20px; } .play-heading .eyebrow { margin-bottom: 5px; } .toolbar { display: flex; align-items: center; gap: 16px; font-size: 14px; } .play-layout { display: grid; grid-template-columns: minmax(0, 1fr) 310px; border: 1px solid var(--line); border-radius: 20px; overflow: hidden; background: #fff; } .board-panel { background: #eef3f4; min-width: 0; padding: 20px; display: flex; flex-direction: column; } .board-top { display: flex; justify-content: space-between; font-size: 14px; color: #586f79; } canvas { display: block; width: 100%; height: auto; aspect-ratio: 7/5; max-height: 67vh; object-fit: contain; outline: none; border-radius: 13px; margin: 12px auto; touch-action: manipulation; } .legend { margin-top: auto; text-align: center; font-size: 14px; color: #617780; padding: 10px 0 2px; } .controls-panel { padding: 26px; border-left: 1px solid var(--line); } .controls-panel p { font-size: 15px; color: var(--muted); } .field { display: grid; gap: 6px; font-size: 15px; margin-bottom: 14px; } input { border: 1px solid var(--line); padding: 9px 12px; border-radius: 9px; min-width: 0; width: 100%; background: #fff; color: inherit; } .primary { background: #317c6f; border-color: #317c6f; color: #fff; width: 100%; font-weight: 650; } .primary:hover:not(:disabled) { background: #286a5e; color: #fff; } .help { margin-top: 20px; } .action-buttons { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; } .action-buttons button { padding: 10px 3px; } .action-buttons button:first-child:nth-last-child(3) { grid-column: 1/-1; } .secondary-actions { display: flex; gap: 8px; margin-top: 16px; } .secondary-actions button { padding: 8px 10px; font-size: 14px; flex: 1; } .feedback { display: grid; gap: 5px; margin-top: 28px; border-top: 1px solid var(--line); padding-top: 18px; } .feedback span { color: var(--muted); font-size: 13px; } .feedback strong { font-size: 18px; margin-bottom: 8px; overflow-wrap: anywhere; } .feedback p { margin-bottom: 0; } #message { font-size: 14px; margin: 20px 0 0; overflow-wrap: anywhere; } #message.error { color: #b34e44; } .boundary { color: var(--muted); font-size: 14px; margin-top: 16px; } .button-link { display: block; text-align: center; margin: 12px 0; }
.api-guide { padding: 24px; margin: 40px 0; border: 1px solid var(--line); border-radius: 16px; color: var(--muted); } summary { cursor: pointer; color: #334c59; font-weight: 600; } .api-guide p { margin-top: 18px; } pre { overflow-x: auto; font-size: 14px; padding: 16px; background: #eaf0f3; border-radius: 8px; } footer { max-width: 1300px; padding: 28px 32px 40px; margin: auto; font-size: 14px; color: var(--muted); display: flex; justify-content: space-between; }
.is-fullscreen { background: #f4f7fa; padding: 20px; margin: 0; overflow: auto; } .is-fullscreen .play-layout { min-height: calc(100vh - 140px); } .is-fullscreen canvas { max-height: 76vh; }
body.watching .intro, body.watching .catalog, body.watching #manual-controls { display: none; } body.watching .play-section { border: 0; margin-top: 25px; } body.embedded .site-header, body.embedded .intro, body.embedded .catalog, body.embedded .api-guide, body.embedded footer, body.embedded .boundary, body.embedded .controls-panel, body.embedded .legend { display: none; } body.embedded main { padding: 10px; max-width: none; } body.embedded .play-section { margin: 0; padding: 0; border: 0; } body.embedded .play-heading { margin-bottom: 10px; } body.embedded .play-heading h2 { font-size: 20px; } body.embedded .eyebrow { font-size: 11px; } body.embedded .play-layout { display: block; border-radius: 12px; } body.embedded .board-panel { padding: 10px; } body.embedded canvas { max-height: calc(100vh - 120px); margin: 6px 0 0; } body.embedded .toolbar { font-size: 12px; gap: 8px; } body.embedded .toolbar button { padding: 6px 10px; }
@media (max-width: 900px) { .site-header { padding: 20px 24px; } .brand span { display: none; } .watch-brain { position: static; width: fit-content; margin-top: 25px; } .intro { padding: 40px 0; } .play-layout { grid-template-columns: minmax(0, 1fr) 270px; } .controls-panel { padding: 20px; } .game-card { padding: 18px; } .game-card[aria-pressed="true"] { padding: 17px; } }
@media (max-width: 680px) { main { padding: 0 18px; } .site-header { padding: 16px 18px; } .brand { font-size: 20px; } nav { gap: 12px; font-size: 13px; } nav a:first-child { display: none; } .game-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } .game-card { min-height: 165px; padding: 16px; } .game-card[aria-pressed="true"] { padding: 15px; } .game-card strong { font-size: 18px; } .game-card small { font-size: 14px; } .section-title { align-items: flex-start; } .section-title > span { max-width: 100px; text-align: right; } .section-title h2 { font-size: 24px; } .play-layout { grid-template-columns: 1fr; } .controls-panel { border-left: 0; border-top: 1px solid var(--line); } .board-panel { padding: 12px; } .toolbar { gap: 8px; flex-wrap: wrap; justify-content: flex-end; max-width: 155px; } .play-heading h2 { font-size: 23px; } .legend { font-size: 12px; } .is-fullscreen { padding: 10px; } footer { padding: 24px 18px; } }
