html, body, #app { height: 100%; overflow: hidden; } :root { font-family: 'PingFang SC', 'Microsoft YaHei', sans-serif; line-height: 1.5; font-weight: 400; color: #f7f0dc; font-synthesis: none; text-rendering: optimizeLegibility; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; } * { box-sizing: border-box; } body { margin: 0; min-width: 320px; background: radial-gradient(circle at top, rgba(219, 171, 91, 0.16), transparent 22%), linear-gradient(180deg, #442621 0%, #24110e 100%); } #app { min-height: 100vh; min-height: 100dvh; } h1, h2, p { margin: 0; } .app-shell { min-height: 100vh; min-height: 100dvh; overflow: hidden; } .auth-page { display: grid; place-items: center; min-height: 100vh; padding: 24px; } .auth-card { width: min(440px, 100%); padding: 28px 24px; border-radius: 16px; border: 1px solid rgba(246, 212, 139, 0.18); background: linear-gradient(180deg, rgba(62, 33, 26, 0.96), rgba(26, 14, 11, 0.96)), radial-gradient(circle at top, rgba(255, 214, 134, 0.08), transparent 40%); backdrop-filter: blur(10px); box-shadow: 0 18px 40px rgba(0, 0, 0, 0.42); } .auth-card h1 { font-size: 30px; text-align: center; } .sub-title { margin-top: 8px; color: #c0ddce; font-size: 14px; } .auth-card .sub-title { margin-bottom: 18px; text-align: center; } .mode-tabs { display: flex; gap: 10px; margin-bottom: 16px; } .tab-btn, button, input, select { font: inherit; } .tab-btn { flex: 1; height: 40px; border: 1px solid #568e73; border-radius: 10px; color: #d9eddf; background: transparent; cursor: pointer; } .tab-btn.active { border-color: #d9be73; background: #61491c; } .form { display: flex; flex-direction: column; gap: 12px; } .field { display: flex; flex-direction: column; gap: 6px; font-size: 14px; } .field input, .field select, .join-line input { height: 42px; padding: 0 12px; border: 1px solid rgba(208, 229, 218, 0.45); border-radius: 8px; color: #ebfff3; background: rgba(0, 0, 0, 0.22); } .field input::placeholder, .join-line input::placeholder { color: #9cbba9; } .primary-btn, .ghost-btn, .danger-btn { height: 42px; border: 0; border-radius: 8px; font-weight: 700; cursor: pointer; } .primary-btn { padding: 0 16px; color: #1d311f; background: linear-gradient(135deg, #f8df9e, #e9c76c); } .ghost-btn { padding: 0 14px; color: #daf3e5; border: 1px solid rgba(156, 196, 176, 0.45); background: transparent; } .danger-btn { padding: 0 14px; color: #fff1f1; background: rgba(156, 44, 44, 0.8); } button:disabled { cursor: not-allowed; opacity: 0.6; } .hall-page { display: flex; flex-direction: column; gap: 16px; width: min(1200px, 100%); margin: 0 auto; padding: 22px; } .hall-wood-bg { position: relative; } .hall-wood-bg::before { content: ''; position: absolute; inset: 0; z-index: -1; border-radius: 14px; background: linear-gradient(25deg, rgba(138, 99, 57, 0.24), rgba(76, 52, 31, 0.22)), repeating-linear-gradient( -8deg, rgba(255, 255, 255, 0.02) 0, rgba(255, 255, 255, 0.02) 2px, rgba(0, 0, 0, 0.03) 2px, rgba(0, 0, 0, 0.03) 6px ); } .hall-header { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 18px; border-radius: 14px; border: 1px solid rgba(244, 210, 140, 0.14); background: linear-gradient(180deg, rgba(62, 33, 26, 0.94), rgba(30, 15, 12, 0.92)), radial-gradient(circle at top, rgba(255, 214, 134, 0.08), transparent 42%); } .hall-topbar { min-height: 88px; } .brand-block { display: flex; align-items: center; gap: 12px; } .hall-logo { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 8px; background: #1e6b4c; color: #f7f0dc; font-size: 24px; font-weight: 700; box-shadow: 0 8px 18px rgba(5, 17, 12, 0.4); } .hall-header h1 { font-size: 24px; } .header-actions { display: flex; gap: 10px; } .user-chip { min-width: 180px; padding: 10px 14px; border-radius: 8px; border: 1px solid rgba(255, 255, 255, 0.2); background: rgba(2, 20, 12, 0.36); } .user-chip p { font-size: 12px; color: #acd3be; } .user-chip strong { display: inline-block; margin-top: 4px; font-size: 16px; } .user-chip small { display: block; margin-top: 4px; color: #c7e5d5; font-size: 12px; } .text-btn { margin-left: 6px; padding: 0; border: 0; background: transparent; color: #f6de9d; font-size: 12px; cursor: pointer; } .hall-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 16px; } .hall-grid-8-4 { grid-template-columns: 8fr 4fr; } .panel { padding: 18px; border-radius: 14px; border: 1px solid rgba(244, 210, 140, 0.12); background: rgba(40, 21, 17, 0.8); } .panel h2 { margin-bottom: 12px; font-size: 20px; } .create-panel { display: flex; flex-direction: column; gap: 14px; } .join-line { display: grid; grid-template-columns: 1fr auto; gap: 10px; } .room-panel { min-height: 340px; } .room-panel-header { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 12px; } .room-panel-header p { color: #b5d8c4; font-size: 13px; } .icon-btn { width: 34px; height: 34px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid rgba(176, 216, 194, 0.35); border-radius: 8px; color: #d3efdf; background: rgba(17, 56, 40, 0.65); cursor: pointer; } .icon-btn-image { width: 18px; height: 18px; display: block; } .icon-btn:disabled .icon-btn-image { opacity: 0.65; } .room-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; } .room-card { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 12px; border-radius: 8px; border: 1px solid rgba(158, 198, 178, 0.28); background: rgba(12, 45, 32, 0.65); box-shadow: 0 10px 18px rgba(0, 0, 0, 0.2); } .room-name { font-size: 17px; font-weight: 700; } .room-tags { margin-top: 4px; display: flex; gap: 8px; color: #c4e4d3; font-size: 13px; } .room-tags span { padding: 2px 8px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, 0.18); } .room-tags .owner-tag { color: #f7e4b0; border-color: rgba(247, 228, 176, 0.45); background: rgba(30, 107, 76, 0.38); } .room-id { margin-top: 4px; font-size: 12px; color: #8db59f; word-break: break-all; } .room-actions-footer { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; } .wide-btn { width: 100%; } .side-panel { display: flex; flex-direction: column; gap: 10px; } .side-panel h3 { margin: 8px 0 2px; font-size: 16px; } .hint-text { font-size: 14px; color: #c8e5d6; } .empty-state { display: grid; place-items: center; min-height: 180px; color: #b5cfbf; border-radius: 10px; border: 1px dashed rgba(181, 207, 191, 0.45); } .table-panel { padding: 18px; border-radius: 14px; border: 1px solid rgba(255, 255, 255, 0.12); background: rgba(10, 30, 22, 0.85); } .game-page { display: grid; grid-template-rows: auto auto minmax(0, 1fr); gap: 12px; width: 100%; max-width: none; height: 100vh; height: 100dvh; min-height: 100vh; min-height: 100dvh; margin: 0; padding-top: max(12px, env(safe-area-inset-top)); padding-right: max(12px, env(safe-area-inset-right)); padding-bottom: max(12px, env(safe-area-inset-bottom)); padding-left: max(12px, env(safe-area-inset-left)); overflow: hidden; } .game-header { display: grid; grid-template-columns: minmax(260px, 1fr) minmax(320px, auto) minmax(280px, 1fr); align-items: center; min-height: 96px; padding: 14px 18px; border-radius: 22px; border: 1px solid rgba(233, 199, 108, 0.16); background: linear-gradient(180deg, rgba(20, 47, 35, 0.86), rgba(8, 24, 18, 0.82)), radial-gradient(circle at top, rgba(255, 219, 123, 0.08), transparent 38%); backdrop-filter: blur(10px); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 16px 36px rgba(0, 0, 0, 0.28); } .game-header > div:first-child { min-width: 0; } .topbar-left { display: flex; align-items: center; gap: 14px; min-width: 0; } .topbar-back-btn { flex: 0 0 auto; min-width: 108px; } .topbar-room-meta { min-width: 0; } .eyebrow { color: #f7e4b0; font-size: 12px; letter-spacing: 2px; text-transform: uppercase; } .topbar-room-name { margin-top: 4px; color: #f6edd5; font-size: 20px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .game-header h1 { font-size: 28px; font-weight: 800; letter-spacing: 1px; color: #f7e4b0; } .game-header .sub-title { margin-top: 4px; color: #d7eadf; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .game-table-panel { display: flex; align-items: center; min-height: 60px; padding: 10px 14px; overflow: hidden; } .room-brief { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 0; padding: 4px 2px; border-radius: 8px; border: 0; background: transparent; overflow: hidden; } .room-brief-title { flex: 0 0 auto; padding: 4px 8px; border-radius: 6px; color: #f7e4b0; background: rgba(30, 107, 76, 0.42); font-size: 12px; font-weight: 700; } .room-brief-item { min-width: 0; display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: #cee5d8; } .room-brief-item em { font-style: normal; opacity: 0.85; } .room-brief-item strong { font-size: 13px; color: #f4f0dc; font-weight: 600; } .room-brief-id { flex: 1 1 auto; } .room-brief-id strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .topbar-center { display: flex; justify-content: center; min-width: 0; } .title-stack { padding: 10px 18px; border-radius: 18px; text-align: center; border: 1px solid rgba(255, 255, 255, 0.08); background: rgba(7, 24, 17, 0.36); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04); } .game-title { font-size: 30px; font-weight: 700; line-height: 1.1; letter-spacing: 2px; color: #f6edd5; } .game-subtitle { margin-top: 6px; color: #c4ddd0; font-size: 13px; } .topbar-right { display: flex; justify-content: flex-end; align-items: center; gap: 10px; } .status-chip { display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 12px; border-radius: 999px; border: 1px solid rgba(198, 223, 209, 0.18); background: rgba(5, 24, 17, 0.42); font-size: 13px; } .wifi-dot { width: 10px; height: 10px; border-radius: 50%; background: #9a6b6b; box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.06); } .wifi-dot.is-connected { background: #62d78f; } .wifi-dot.is-connecting { background: #f0c46b; } .wifi-dot.is-disconnected { background: #d86f6f; } .header-btn { height: 36px; } .table-shell { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 12px; min-height: 0; height: 100%; overflow: hidden; align-items: center; } .table-desk { display: block; grid-column: 1; grid-row: 1; width: min(100%, calc((100dvh - 220px) * 16 / 9)); max-width: 100%; height: auto; aspect-ratio: 16 / 9; justify-self: center; align-self: center; border-radius: 28px; object-fit: contain; object-position: center; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04), 0 20px 42px rgba(0, 0, 0, 0.32); } .table-felt { grid-column: 1; grid-row: 1; position: relative; min-height: 0; width: min(100%, calc((100dvh - 220px) * 16 / 9)); height: auto; aspect-ratio: 16 / 9; max-width: 100%; max-height: 100%; justify-self: center; align-self: center; border-radius: 28px; border: 1px solid rgba(255, 255, 255, 0.06); background: radial-gradient(circle at center, rgba(30, 126, 70, 0.12), transparent 42%), linear-gradient(180deg, rgba(0, 0, 0, 0.03), rgba(0, 0, 0, 0.12)); overflow: hidden; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04); } .table-felt::before { content: ''; position: absolute; inset: 22px; border-radius: 24px; background: radial-gradient(circle at center, rgba(35, 121, 68, 0.14), transparent 55%); pointer-events: none; } .felt-frame { position: absolute; inset: 20px; border-radius: 24px; border: 1px solid rgba(255, 255, 255, 0.08); pointer-events: none; } .felt-frame.inner { inset: 38px; border-color: rgba(255, 255, 255, 0.06); border-style: solid; } .center-deck { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); display: grid; grid-template-columns: repeat(2, 42px); gap: 6px; align-items: center; justify-items: center; padding: 12px 16px; border-radius: 18px; background: rgba(8, 27, 20, 0.82); border: 1px solid rgba(244, 222, 163, 0.28); box-shadow: 0 12px 28px rgba(0, 0, 0, 0.18); } .center-deck strong { grid-column: 1 / -1; font-size: 16px; color: #f7e4b0; } .wind { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; background: rgba(255, 255, 255, 0.08); font-weight: 700; } .table-tip { margin-top: 4px; color: #c1dfcf; font-size: 14px; } .mahjong-table { position: relative; margin-top: 14px; height: 360px; border-radius: 16px; border: 2px solid rgba(233, 199, 108, 0.45); background: radial-gradient(circle at 35% 25%, #2f6d4f, #184332 58%, #113628 100%); overflow: hidden; } .game-mahjong-table { flex: 1 1 auto; min-height: 520px; height: auto; } .mahjong-table.active { box-shadow: inset 0 0 0 2px rgba(250, 224, 149, 0.38); } .seat { position: absolute; min-width: 78px; padding: 8px 10px; text-align: center; display: inline-flex; flex-direction: column; align-items: center; gap: 2px; border-radius: 8px; border: 1px solid rgba(255, 255, 255, 0.2); background: rgba(11, 27, 20, 0.68); } .seat strong { font-size: 13px; font-weight: 700; color: #f4f0dc; } .seat small { font-size: 11px; color: #cbe4d6; } .seat.occupied { border-color: rgba(244, 222, 163, 0.45); } .seat.seat-me { border-color: rgba(244, 222, 163, 0.9); box-shadow: 0 0 0 1px rgba(244, 222, 163, 0.4); } .seat.seat-turn { background: rgba(36, 86, 64, 0.88); } .turn-indicator { display: inline-block; margin-top: 2px; padding: 1px 8px; border-radius: 999px; font-size: 10px; color: #1c2d23; background: #f4d685; } .seat-top { top: 16px; left: 50%; transform: translateX(-50%); } .seat-right { right: 16px; top: 50%; transform: translateY(-50%); } .seat-bottom { bottom: 16px; left: 50%; transform: translateX(-50%); } .seat-left { left: 16px; top: 50%; transform: translateY(-50%); } .table-center { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(300px, 80%); padding: 14px; border-radius: 10px; text-align: center; border: 1px solid rgba(245, 224, 166, 0.55); background: rgba(29, 62, 46, 0.82); } .table-center p:last-child { margin-top: 6px; color: #f8de9d; font-size: 13px; word-break: break-all; } .ws-panel { grid-column: 2; grid-row: 1; display: flex; flex-direction: column; min-height: 0; height: 100%; margin-top: 0; padding: 10px; border-radius: 8px; border: 1px solid rgba(176, 216, 194, 0.22); background: rgba(5, 24, 17, 0.58); overflow: hidden; } .ws-log { min-height: 0; } .ws-panel-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; } .ws-actions { display: flex; align-items: center; gap: 8px; } .ws-state { padding: 2px 8px; border-radius: 999px; font-size: 12px; border: 1px solid rgba(255, 255, 255, 0.18); } .ws-state.is-connected { color: #d6ffdf; background: rgba(35, 121, 68, 0.45); } .ws-state.is-connecting { color: #fff0c2; background: rgba(128, 99, 40, 0.45); } .ws-state.is-disconnected { color: #ffd3d3; background: rgba(124, 45, 45, 0.45); } .ws-reconnect { height: 30px; } .ws-log { margin-top: 8px; flex: 1 1 auto; min-height: 0; overflow: auto; padding: 8px; border-radius: 8px; background: rgba(0, 0, 0, 0.28); } .ws-line { font-size: 12px; color: #cfe7da; line-height: 1.4; } .ws-line + .ws-line { margin-top: 6px; } .ws-empty { font-size: 12px; color: #a9c4b5; } .message { margin-top: 12px; font-size: 14px; } .message.error { color: #ffbcbc; } .message.success { color: #caf3d6; } .modal-mask { position: fixed; inset: 0; z-index: 30; display: grid; place-items: center; padding: 24px; background: rgba(4, 14, 10, 0.72); backdrop-filter: blur(2px); } .modal-card { width: min(600px, 100%); border-radius: 8px; border: 1px solid rgba(255, 255, 255, 0.18); background: linear-gradient(145deg, rgba(16, 46, 34, 0.96), rgba(7, 24, 17, 0.98)); box-shadow: 0 20px 42px rgba(0, 0, 0, 0.5); padding: 20px; } .modal-600 { max-width: 600px; } .modal-card h2 { margin-bottom: 14px; } .modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 8px; } .radio-group { border: 1px solid rgba(190, 222, 204, 0.25); border-radius: 8px; margin: 0; padding: 12px; } .radio-group legend { padding: 0 4px; color: #cfe8da; } .radio-group label { margin-right: 16px; } .copy-line { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px; border-radius: 8px; border: 1px solid rgba(190, 222, 204, 0.2); background: rgba(3, 23, 15, 0.35); margin-bottom: 10px; } .copy-line span { font-size: 13px; color: #cfe8da; word-break: break-all; } .toast { position: fixed; right: 16px; bottom: 16px; z-index: 20; max-width: min(560px, calc(100% - 32px)); margin: 0; padding: 10px 14px; border-radius: 8px; font-size: 14px; } .toast.error { color: #ffd7d7; background: rgba(128, 38, 38, 0.9); } .toast.success { color: #d8ffe3; background: rgba(28, 95, 52, 0.9); } @media (max-width: 980px) { .hall-grid { grid-template-columns: 1fr; } .room-actions-footer { grid-template-columns: 1fr; } .hall-header { flex-direction: column; align-items: flex-start; } .game-header { grid-template-columns: 1fr; justify-items: stretch; } .topbar-left { flex-wrap: wrap; } .topbar-center, .topbar-right { justify-content: flex-start; } .table-shell { grid-template-columns: 1fr; } .table-desk, .table-felt, .ws-panel { grid-column: auto; grid-row: auto; } .ws-panel { min-height: 180px; } .header-actions { width: 100%; display: grid; grid-template-columns: 1fr 1fr; } } @media (max-width: 640px) { .hall-page, .auth-page { padding: 14px; } .mahjong-table { height: 300px; } .game-page { padding-top: max(8px, env(safe-area-inset-top)); padding-right: max(8px, env(safe-area-inset-right)); padding-bottom: max(8px, env(safe-area-inset-bottom)); padding-left: max(8px, env(safe-area-inset-left)); height: auto; min-height: 100vh; overflow: visible; } .game-mahjong-table { min-height: 360px; } .seat { min-width: 62px; padding: 6px 8px; font-size: 12px; } .join-line { grid-template-columns: 1fr; } .room-brief { flex-wrap: wrap; gap: 8px; } .room-brief-id { flex-basis: 100%; } }