/* style.css - 极雅浅色对局与摸鱼控制台双向视觉系统 */

:root {
    /* 默认浅色高颜值普通游戏模式变量 */
    --bg-base: #f5f7fa;
    --bg-aurora-glow: linear-gradient(135deg, #e0f2fe 0%, #faf5ff 100%);
    --primary: hsl(210, 100%, 46%);       /* 经典明亮蓝 */
    --primary-glow: rgba(0, 119, 255, 0.18);
    --secondary: hsl(260, 85%, 55%);     /* 优雅紫 */
    --danger: hsl(345, 100%, 50%);        /* 霓虹红 */
    --danger-glow: rgba(255, 0, 77, 0.15);
    
    --glass-bg: rgba(255, 255, 255, 0.75);
    --glass-border: rgba(0, 0, 0, 0.06);
    --glass-highlight: rgba(255, 255, 255, 0.6);
    
    --text-main: #1e293b;
    --text-muted: #64748b;
    --board-bg: #fdfefe;
    
    /* 棋子颜色（拟物立体浅色系） */
    --color-black-stone: radial-gradient(circle at 30% 30%, #475569 0%, #1e293b 65%, #0f172a 100%);
    --color-white-stone: radial-gradient(circle at 30% 30%, #ffffff 0%, #f8fafc 40%, #e2e8f0 85%, #cbd5e1 100%);
    
    --transition-smooth: all 0.25s cubic-bezier(0.25, 0.8, 0.25, 1);
    --font-monospace: 'Fira Code', 'Consolas', monospace;
}

/* ==========================================================================
   【摸鱼模式 (Stealth Mode)】全局样式覆盖
   ========================================================================== */
[data-theme="stealth"] {
    --bg-base: #f8fafc;                  /* 企业级极淡冷灰色 */
    --primary: #64748b;                  /* 置灰运行蓝 -> slate 中灰 */
    --primary-glow: rgba(100, 116, 139, 0.05);
    --secondary: #94a3b8;
    --danger: #94a3b8;                   /* 置灰警告红 -> slate 淡灰 */
    --danger-glow: rgba(148, 163, 184, 0.05);
    
    --glass-bg: #f8fafc;                 /* 消除背景对比，还原极度扁平的底色 */
    --glass-border: #cbd5e1;             /* 极细微的实线边框 */
    --text-main: #334155;                /* 冷灰色系统文字 */
    --text-muted: #64748b;
    --board-bg: #f1f5f9;                 /* 棋盘稍微深一点，呈若隐若现对比 */
    
    /* 核心摸鱼点：黑白棋子完美融于灰白底板，路人绝无法察觉下棋 */
    --color-black-stone: #cbd5e1;        /* 黑子(1) 变为：[禁用源/A-Blocker] 中灰色点 */
    --color-white-stone: #f8fafc;        /* 白子(2) 变为：[就绪源/B-Healthy] 极淡灰色点 */
}

/* 全局重置与排版 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    -webkit-font-smoothing: antialiased;
}

body {
    background-color: var(--bg-base);
    background-image: var(--bg-aurora-glow);
    color: var(--text-main);
    overflow-x: hidden;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    transition: var(--transition-smooth);
}

/* 摸鱼模式下，隐藏炫酷的极光特效 */
[data-theme="stealth"] .aurora-bg {
    display: none !important;
}

/* 动感极光背景片 (仅在游戏模式可见) */
.aurora-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    overflow: hidden;
    opacity: 0.7;
    pointer-events: none;
}

.aurora-bg::before,
.aurora-bg::after {
    content: "";
    position: absolute;
    width: 550px;
    height: 550px;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.35;
    animation: aurora-float 22s infinite alternate ease-in-out;
}

.aurora-bg::before {
    background: radial-gradient(circle, #bae6fd 0%, transparent 70%);
    top: -10%;
    left: 10%;
}

.aurora-bg::after {
    background: radial-gradient(circle, #f5d0fe 0%, transparent 70%);
    bottom: -10%;
    right: 15%;
    animation-delay: -11s;
}

@keyframes aurora-float {
    0% { transform: translate(0, 0) scale(1) rotate(0deg); }
    100% { transform: translate(60px, 40px) scale(1.1) rotate(30deg); }
}

/* 高雅毛玻璃通用卡片样式 */
.glass {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    box-shadow: 0 4px 20px 0 rgba(0, 0, 0, 0.04);
    transition: var(--transition-smooth);
}

[data-theme="stealth"] .glass {
    /* 摸鱼模式消除阴影和毛玻璃模糊，变为朴素的开发后台表单卡片 */
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    box-shadow: none !important;
    border-radius: 6px; /* 扁平化小圆角 */
}

.glass:hover {
    border-color: rgba(0, 0, 0, 0.1);
    box-shadow: 0 6px 24px 0 rgba(0, 0, 0, 0.06);
}

[data-theme="stealth"] .glass:hover {
    box-shadow: none !important;
}

/* 按钮通用样式 */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 9px 16px;
    font-size: 0.88rem;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    border: 1px solid transparent;
    transition: var(--transition-smooth);
    user-select: none;
}

[data-theme="stealth"] .btn {
    border-radius: 4px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), hsl(210, 100%, 40%));
    color: #fff;
    box-shadow: 0 2px 8px 0 var(--primary-glow);
}

[data-theme="stealth"] .btn-primary {
    background: var(--primary) !important;
    box-shadow: none !important;
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px 0 var(--primary-glow);
}

[data-theme="stealth"] .btn-primary:hover {
    transform: none;
}

.btn-secondary {
    background: rgba(0, 0, 0, 0.03);
    border: 1px solid rgba(0, 0, 0, 0.08);
    color: var(--text-main);
}

.btn-secondary:hover {
    background: rgba(0, 0, 0, 0.06);
    transform: translateY(-1px);
}

[data-theme="stealth"] .btn-secondary:hover {
    transform: none;
}

.btn-danger {
    background: linear-gradient(135deg, var(--danger), hsl(345, 100%, 40%));
    color: #fff;
    box-shadow: 0 2px 8px 0 var(--danger-glow);
}

[data-theme="stealth"] .btn-danger {
    background: var(--danger) !important;
    box-shadow: none !important;
}

.btn-danger:hover {
    transform: translateY(-1px);
}

[data-theme="stealth"] .btn-danger:hover {
    transform: none;
}

.btn-outline {
    background: transparent;
    border: 1px solid rgba(0, 0, 0, 0.12);
    color: var(--text-muted);
}

.btn-outline:hover {
    border-color: var(--text-main);
    color: var(--text-main);
}

.btn-outline.active {
    background: rgba(0, 0, 0, 0.04);
    border-color: var(--primary);
    color: var(--primary);
}

.btn-icon {
    padding: 8px;
    width: 38px;
    height: 38px;
    border-radius: 8px;
}

/* 文本输入框 */
.text-input {
    background: #ffffff;
    border: 1px solid var(--glass-border);
    color: var(--text-main);
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 0.88rem;
    transition: var(--transition-smooth);
    outline: none;
}

[data-theme="stealth"] .text-input {
    border-radius: 4px;
    font-family: var(--font-monospace);
}

.text-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow);
}

/* 主容器布局 */
.app-container {
    width: 100%;
    max-width: 1240px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* 头部样式 */
.game-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.logo-area h1 {
    font-family: 'Outfit', sans-serif;
    font-size: 1.9rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    color: #0f172a;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

[data-theme="stealth"] .logo-area h1 {
    font-family: var(--font-monospace) !important;
    font-weight: 700;
    letter-spacing: normal;
}

.logo-area .badge {
    font-size: 0.72rem;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 5px;
    background: rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.1);
    color: var(--text-muted);
    font-family: 'Inter', sans-serif;
}

[data-theme="stealth"] .badge {
    font-family: var(--font-monospace) !important;
    border-radius: 3px;
    background: #cbd5e1;
    color: #0f172a;
}

.logo-area .subtitle {
    font-size: 0.88rem;
    color: var(--text-muted);
    margin-top: 2px;
}

[data-theme="stealth"] .subtitle {
    font-family: var(--font-monospace);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* 隐蔽切换器设计：极淡透明，类似“日志联调接口配置” */
.stealth-mode-toggle {
    padding: 6px 12px;
    display: flex;
    align-items: center;
    background: transparent !important;
    box-shadow: none !important;
    border: 1px dashed rgba(0, 0, 0, 0.15) !important;
}

.btn-stealth-link {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 0.78rem;
    cursor: pointer;
    font-weight: 500;
    transition: var(--transition-smooth);
}

.btn-stealth-link:hover {
    color: var(--primary);
    text-decoration: underline;
}

[data-theme="stealth"] .btn-stealth-link {
    font-family: var(--font-monospace);
}

.room-panel {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 14px;
}

.room-info {
    display: flex;
    flex-direction: column;
}

.info-label {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
}

[data-theme="stealth"] .info-label {
    font-family: var(--font-monospace);
}

.info-value {
    font-family: 'Outfit', sans-serif;
    font-size: 1.02rem;
    font-weight: 600;
    color: var(--primary);
}

[data-theme="stealth"] .info-value {
    font-family: var(--font-monospace) !important;
}

/* 主内容双栏布局 */
.game-main {
    display: grid;
    grid-template-columns: 1fr 310px;
    gap: 20px;
    flex-grow: 1;
    align-items: start;
}

/* 左侧：棋盘和控制区 */
.game-core-section {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* 状态条 */
.status-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 18px;
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    font-size: 0.95rem;
}

[data-theme="stealth"] .status-indicator {
    font-family: var(--font-monospace);
}

.turn-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    transition: var(--transition-smooth);
}

/* 状态点指示器在普通和摸鱼模式下的色彩映射 */
.black-turn {
    background: #000;
    box-shadow: 0 0 6px rgba(0,0,0,0.3), 0 0 0 1px #fff;
}

.white-turn {
    background: #fff;
    box-shadow: 0 0 6px rgba(255,255,255,0.8), 0 0 0 1px #000;
}

[data-theme="stealth"] .black-turn {
    background: #cbd5e1; /* 禁用源 Slate 灰 */
    box-shadow: none;
}

[data-theme="stealth"] .white-turn {
    background: #f8fafc; /* 就绪源 极淡灰 */
    border: 1.5px solid #cbd5e1;
    box-shadow: none;
}

.room-players-count {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    color: var(--text-muted);
}

[data-theme="stealth"] .room-players-count {
    font-family: var(--font-monospace);
}

/* 15x15 棋盘设计 */
.board-outer-container {
    padding: 14px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.board-inner-wrapper {
    position: relative;
    width: 100%;
    max-width: 540px;
    aspect-ratio: 1 / 1;
    background: var(--board-bg);
    border-radius: 8px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.02), 0 2px 16px rgba(0,0,0,0.01);
}

[data-theme="stealth"] .board-inner-wrapper {
    border-radius: 4px;
    border-color: #cbd5e1;
}

/* 棋盘线底板 */
.board-grid-bg {
    position: absolute;
    top: 3.333%;
    left: 3.333%;
    width: 93.334%;
    height: 93.334%;
    pointer-events: none;
    z-index: 1;
    display: grid;
    grid-template-columns: repeat(14, 1fr);
    grid-template-rows: repeat(14, 1fr);
}

.board-grid-bg::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-right: 1px solid rgba(0, 0, 0, 0.08);
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

[data-theme="stealth"] .board-grid-bg::after {
    border-right: 1px solid #e2e8f0;
    border-bottom: 1px solid #e2e8f0;
}

.board-grid-bg > div {
    border-left: 1px solid rgba(0, 0, 0, 0.08);
    border-top: 1px solid rgba(0, 0, 0, 0.08);
}

[data-theme="stealth"] .board-grid-bg > div {
    border-left: 1px solid #e2e8f0;
    border-top: 1px solid #e2e8f0;
}

/* 棋盘星位点 */
.board-star-point {
    position: absolute;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: var(--text-muted);
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 2;
    opacity: 0.5;
}

/* 摸鱼模式下隐藏棋盘星位以防泄漏五子棋特征 */
[data-theme="stealth"] .board-star-point {
    display: none !important;
}

/* 响应落子的活跃层 */
.board-active-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 3;
    display: grid;
    grid-template-columns: repeat(15, 1fr);
    grid-template-rows: repeat(15, 1fr);
}

/* 棋盘单元格 */
.board-cell {
    position: relative;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 2px;
}

.board-cell:hover::after {
    content: "";
    position: absolute;
    width: 32%;
    height: 32%;
    border-radius: 50%;
    background-color: var(--primary-glow);
}

/* 棋棋子基本样式 */
.stone {
    position: absolute;
    width: 82%;
    height: 82%;
    border-radius: 50%;
    z-index: 4;
    user-select: none;
    pointer-events: none;
    animation: stone-drop 0.22s cubic-bezier(0.175, 0.885, 0.32, 1.15) forwards;
    transition: var(--transition-smooth);
}

/* 普通模式下的拟真 3D 珠光棋子 */
.stone-black {
    background: var(--color-black-stone);
    box-shadow: 
        inset 0 2px 3px rgba(255, 255, 255, 0.15),
        0 2px 5px rgba(0, 0, 0, 0.18);
}

.stone-white {
    background: var(--color-white-stone);
    box-shadow: 
        inset 0 -1px 3px rgba(0, 0, 0, 0.1),
        inset 0 2px 4px rgba(255, 255, 255, 0.9),
        0 2px 5px rgba(0, 0, 0, 0.15);
}

/* 摸鱼模式下的扁平化报警灯棋子覆盖 */
[data-theme="stealth"] .stone-black {
    background: var(--color-black-stone) !important;
    border: 1.5px solid #94a3b8; /* 极淡的中性灰边框 */
    box-shadow: none !important;
}

[data-theme="stealth"] .stone-white {
    background: var(--color-white-stone) !important;
    border: 1.5px solid #cbd5e1; /* 极薄的浅灰边框 */
    box-shadow: none !important;
}

/* 上次落子指示器 */
.stone-last-indicator {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background-color: var(--danger);
    z-index: 5;
    pointer-events: none;
    position: absolute;
}

[data-theme="stealth"] .stone-last-indicator {
    background-color: #64748b; /* 极不起眼的淡灰蓝色定位小点 */
    width: 3.5px;
    height: 3.5px;
}

/* 落落子落盘缩放动效 */
@keyframes stone-drop {
    0% { transform: scale(1.4); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

/* 落子波纹涟漪 */
.ripple {
    position: absolute;
    width: 100%;
    height: 100%;
    border: 2px solid var(--primary);
    border-radius: 50%;
    animation: stone-ripple 0.45s ease-out forwards;
    pointer-events: none;
    z-index: 3;
}

@keyframes stone-ripple {
    0% { transform: scale(0.6); opacity: 0.9; }
    100% { transform: scale(1.6); opacity: 0; }
}

/* 连珠获胜高亮闪烁效果 */
.stone-win {
    animation: stone-winner-glow 0.6s infinite alternate ease-in-out !important;
    z-index: 6;
}

@keyframes stone-winner-glow {
    0% {
        box-shadow: 0 0 4px 1px rgba(255, 170, 0, 0.4), 0 2px 5px rgba(0,0,0,0.15);
        filter: brightness(1);
    }
    100% {
        box-shadow: 0 0 16px 4px rgba(255, 170, 0, 0.8), 0 2px 8px rgba(0,0,0,0.15);
        filter: brightness(1.15);
    }
}

/* 摸鱼模式获胜，显示高危故障频闪 */
[data-theme="stealth"] .stone-win {
    animation: stealth-win-fade 0.8s infinite alternate ease-in-out !important;
    border: 2px dashed #64748b !important; /* 获胜仅显示极低对比度的虚线边框 */
}

@keyframes stealth-win-fade {
    0% {
        opacity: 0.6;
    }
    100% {
        opacity: 1.0;
    }
}

/* 控制面板 */
.control-panel {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 16px;
}

.identity-picker {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    border-bottom: 1px solid var(--glass-border);
    padding-bottom: 12px;
}

.nickname-setting {
    display: flex;
    align-items: center;
    gap: 8px;
}

.panel-label {
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--text-muted);
}

[data-theme="stealth"] .panel-label {
    font-family: var(--font-monospace);
}

.role-selector {
    display: flex;
    align-items: center;
    gap: 10px;
}

.role-buttons {
    display: flex;
    gap: 6px;
}

.role-btn {
    padding: 5px 10px;
    font-size: 0.82rem;
}

[data-theme="stealth"] .role-btn {
    font-family: var(--font-monospace);
}

.dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 4px;
}

.dot-black { background: #000; box-shadow: 0 0 2px #000, 0 0 0 1px #fff; }
.dot-white { background: #fff; box-shadow: 0 0 2px #fff, 0 0 0 1px #000; }
.dot-viewer { background: var(--text-muted); }

[data-theme="stealth"] .dot-black { background: #cbd5e1; box-shadow: none; }
[data-theme="stealth"] .dot-white { background: #f8fafc; border: 1px solid #cbd5e1; box-shadow: none; }

.action-buttons {
    display: flex;
    gap: 10px;
}

.action-btn {
    flex: 1;
}

[data-theme="stealth"] .action-btn {
    font-family: var(--font-monospace);
}

/* 右侧侧栏区 */
.game-sidebar-section {
    display: flex;
    flex-direction: column;
    gap: 16px;
    height: 100%;
}

.sidebar-box {
    display: flex;
    flex-direction: column;
    padding: 12px 16px;
    height: 180px;
}

.box-title {
    font-size: 0.95rem;
    font-weight: 700;
    font-family: 'Outfit', sans-serif;
    color: var(--text-main);
    border-bottom: 1px solid var(--glass-border);
    padding-bottom: 8px;
    margin-bottom: 10px;
    letter-spacing: 0.2px;
}

[data-theme="stealth"] .box-title {
    font-family: var(--font-monospace) !important;
}

/* 玩家列表 */
.player-list {
    list-style: none;
    overflow-y: auto;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.player-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.85rem;
    padding: 5px 8px;
    border-radius: 6px;
    background: rgba(0, 0, 0, 0.02);
}

[data-theme="stealth"] .player-item {
    font-family: var(--font-monospace);
    border: 1px solid #e2e8f0;
    background: #f8fafc;
}

.player-info {
    display: flex;
    align-items: center;
    gap: 6px;
}

.player-badge {
    font-size: 0.68rem;
    padding: 1px 4px;
    border-radius: 3px;
    font-weight: 600;
}

.badge-black { background: #e2e8f0; border: 1px solid #cbd5e1; color: #0f172a; }
.badge-white { background: #f8fafc; border: 1px solid #cbd5e1; color: #0f172a; }
.badge-viewer { background: rgba(0, 0, 0, 0.03); color: var(--text-muted); }

[data-theme="stealth"] .badge-black { background: #cbd5e1; border-color: #cbd5e1; color: #475569; }
[data-theme="stealth"] .badge-white { background: #f1f5f9; border-color: #cbd5e1; color: #475569; }

.player-name {
    font-weight: 500;
}

.player-name.me {
    color: var(--primary);
    font-weight: 600;
}

.loading-text {
    color: var(--text-muted);
    font-style: italic;
    justify-content: center;
    background: transparent;
}

/* 聊天盒子 - 摸鱼模式的核心，改造成终端日志打印输出 */
.chat-box {
    height: 380px;
    flex-grow: 1;
}

.chat-messages {
    flex-grow: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding-right: 4px;
    margin-bottom: 10px;
}

.chat-message {
    font-size: 0.82rem;
    line-height: 1.35;
    word-break: break-all;
    padding: 5px 8px;
    border-radius: 6px;
    background: rgba(0, 0, 0, 0.02);
}

[data-theme="stealth"] .chat-message {
    font-family: var(--font-monospace) !important;
    border-radius: 3px;
    border-left: 2px solid #cbd5e1;
    background: #f8fafc;
    color: #334155;
}

.system-msg {
    background: rgba(255, 170, 0, 0.05);
    border-left: 2px solid #ffaa00;
    color: #b45309;
}

[data-theme="stealth"] .system-msg {
    background: #fffbeb !important;
    border-left: 3px solid #d97706 !important;
    color: #b45309 !important;
}

.msg-sender {
    font-weight: 600;
    margin-right: 4px;
    color: #475569;
}

[data-theme="stealth"] .msg-sender {
    color: #475569 !important;
}

.msg-time {
    font-size: 0.65rem;
    color: var(--text-muted);
    float: right;
    margin-top: 1px;
}

.chat-input-area {
    display: flex;
    gap: 6px;
}

.chat-input-area input {
    flex-grow: 1;
}

/* 页脚 */
.game-footer {
    text-align: center;
    padding: 10px 0;
    font-size: 0.76rem;
    color: var(--text-muted);
    border-top: 1px solid var(--glass-border);
}

[data-theme="stealth"] .game-footer {
    font-family: var(--font-monospace);
    border-top-style: dashed;
}

/* Toast 提示框 */
.toast {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(0);
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid var(--primary);
    color: var(--text-main);
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 0.85rem;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    z-index: 1000;
    transition: opacity 0.25s, transform 0.25s;
    pointer-events: none;
}

[data-theme="stealth"] .toast {
    font-family: var(--font-monospace);
    border-radius: 3px;
    box-shadow: none;
    border-color: #cbd5e1;
}

.toast.hidden {
    opacity: 0;
    transform: translateX(-50%) translateY(15px);
}

/* 响应式调整 */
@media (max-width: 960px) {
    .game-main {
        grid-template-columns: 1fr;
    }
    
    .game-sidebar-section {
        flex-direction: row;
        height: auto;
    }
    
    .sidebar-box {
        flex: 1;
        height: 260px;
    }
}

@media (max-width: 600px) {
    .app-container {
        padding: 8px;
        gap: 10px;
    }
    
    .game-header {
        flex-direction: column;
        align-items: stretch;
    }
    
    .room-panel {
        justify-content: space-between;
    }
    
    .board-outer-container {
        padding: 8px;
    }
    
    .identity-picker {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }
    
    .role-buttons {
        width: 100%;
    }
    
    .role-btn {
        flex: 1;
    }
    
    .game-sidebar-section {
        flex-direction: column;
    }
    
    .sidebar-box {
        width: 100%;
        height: 220px;
    }
}
