: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 12% 12%, #254935 0%, #11251c 45%, #0a1411 100%); } #app { min-height: 100vh; } h1, h2, p { margin: 0; } .app-shell { min-height: 100vh; } .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(255, 255, 255, 0.16); background: rgba(8, 27, 20, 0.82); backdrop-filter: blur(8px); box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35); } .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(255, 255, 255, 0.15); background: linear-gradient(130deg, rgba(22, 57, 43, 0.9), rgba(10, 30, 22, 0.92)); } .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(255, 255, 255, 0.12); background: rgba(10, 30, 22, 0.85); } .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; border: 1px solid rgba(176, 216, 194, 0.35); border-radius: 8px; color: #d3efdf; background: rgba(17, 56, 40, 0.65); cursor: pointer; } .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 { width: 100%; max-width: none; min-height: 100vh; 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)); } .game-header { flex: 0 0 auto; } .game-table-panel { flex: 1 1 auto; display: flex; flex-direction: column; min-height: 0; } .room-brief { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; padding: 8px 10px; border-radius: 8px; border: 1px solid rgba(194, 226, 208, 0.2); background: rgba(7, 28, 20, 0.55); } .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; } .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 { margin-top: 10px; padding: 10px; border-radius: 8px; border: 1px solid rgba(176, 216, 194, 0.22); background: rgba(5, 24, 17, 0.58); } .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; max-height: 140px; 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; } .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)); } .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%; } }