/* 基础样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
    overflow-x: hidden;
}

/* 主游戏容器 */
.game-container {
    display: flex;
    min-height: 100vh;
    gap: 20px;
    padding: 20px;
}

/* 左侧状态区域 */
.status-section {
    width: 300px;
    display: flex;
    flex-direction: column;
}

/* 中间棋盘区域 */
.board-section {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

.board-container {
    position: relative;
    width: 800px;
    height: 800px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    padding: 20px;
}

/* 棋盘样式 */
.board {
    width: 100%;
    height: 100%;
    display: grid;
    grid-template-columns: repeat(15, 1fr);
    grid-template-rows: repeat(17, 1fr);
    gap: 2px;
    /* border-radius: 15px; */
    overflow: hidden;
}

.board-cell {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 500;
    position: relative;
    transition: all 0.3s ease;
    cursor: pointer;
    border: 1px solid #000;
}

/* 格子类型样式 */
.cell-white {
    background: #f8f9fa;
    color: #495057;
}

.cell-blue {
    background: linear-gradient(135deg, #74b9ff, #0984e3);
    color: white;
}

.cell-pink {
    background: linear-gradient(135deg, #fd79a8, #e84393);
    color: white;
}

.cell-star {
    background: linear-gradient(135deg, #fdcb6e, #e17055);
    color: white;
    position: relative;
}

.cell-star::before {
    content: '⭐';
    position: absolute;
    top: 2px;
    right: 2px;
    font-size: 10px;
}

.cell-rest {
    background: linear-gradient(135deg, #a29bfe, #6c5ce7);
    color: white;
}

.cell-event {
    background: linear-gradient(135deg, #55efc4, #00b894);
    color: white;
}

/* 新增格子类型 */
.cell-empty {
    background: transparent;
    border: 1px solid #000;
}

.cell-normal {
    background: #f8f9fa;
    color: #495057;
}

/* 起始点 */
.cell-start-blue {
    background: linear-gradient(135deg, #74b9ff, #0984e3);
    color: white;
    border: 3px solid #0984e3;
    font-weight: bold;
}

.cell-start-pink {
    background: linear-gradient(135deg, #fd79a8, #e84393);
    color: white;
    border: 3px solid #e84393;
    font-weight: bold;
}

/* 固定颜色格子 */
.cell-blue-fixed {
    background: linear-gradient(135deg, #74b9ff, #0984e3);
    color: white;
    position: relative;
}

.cell-blue-fixed::before {
    /* content: '🛡️'; */
    position: absolute;
    top: 2px;
    right: 2px;
    font-size: 10px;
}

.cell-pink-fixed {
    background: linear-gradient(135deg, #fd79a8, #e84393);
    color: white;
    position: relative;
}

.cell-pink-fixed::before {
    /* content: '🛡️'; */
    position: absolute;
    top: 2px;
    right: 2px;
    font-size: 10px;
}

.cell-green-fixed {
    background: linear-gradient(135deg, #00b894, #00a085);
    color: white;
    position: relative;
}

.cell-green-fixed::before {
    /* content: '✨'; */
    position: absolute;
    top: 2px;
    right: 2px;
    font-size: 10px;
}

/* 黄色箭头格子 */
.cell-arrow-yellow {
    background: linear-gradient(135deg, #fdcb6e, #e17055);
    color: white;
    position: relative;
}

.cell-arrow-yellow::before {
    /* content: '➡️'; */
    position: absolute;
    top: 2px;
    right: 2px;
    font-size: 10px;
}

/* 中心爱心区域 */
/* .cell-center-heart {
    background: linear-gradient(135deg, #948d8d, #dbb1b1);
    color: white;
    position: relative;
    border: 3px solid #965454;
    font-weight: bold;
} */

.cell-center-heart::before {
    content: '💞';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 40px;
}

/* 任务格子颜色 */
.cell-task-blue {
    background: linear-gradient(135deg, #0de2d0, #13d1eb);
    color: white;
}

.cell-task-orange {
    background: linear-gradient(135deg, #8b23bb, #7f0583);
    color: white;
}

.cell-task-purple {
    background: linear-gradient(135deg, #a29bfe, #6c5ce7);
    color: white;
}

.cell-task-red {
    background: linear-gradient(135deg, #ff7675, #d63031);
    color: white;
}

.cell-task-dark {
    background: linear-gradient(135deg, #636e72, #2d3436);
    color: white;
}

.cell-task-challenge {
    background: linear-gradient(135deg, #bdc3c7, #95a5a6);
    color: white;
}

/* 箭头装饰元素 */
.cell-decoration {
    background: transparent;
    color: #666;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
}

.cell-arrow {
    background: rgba(255, 255, 255, 0.1);
    color: #333;
    font-size: 20px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: cursive;
}

/* 箭头颜色样式 */
.blue-arrow {
    color: #0984e3;
}

.pink-arrow {
    color: #e84393;
}

.yellow-arrow {
    color: #fdcb6e;
}

.green-arrow {
    color: #00b894;
}

/* 爱心中心特殊样式 */
.cell-center-heart {
    background: #f5b1b1;
    color: white;
    position: relative;
    border: 2px solid #d63031;
    border-radius: 20px;
    font-weight: bold;
    font-size: 20px;
    animation: heartbeat 2s ease-in-out infinite;
    /* box-shadow: 0 0 20px rgba(255, 118, 117, 0.6); */
}

@keyframes heartbeat {
    0%, 100% { 
        transform: scale(1); 
        box-shadow: 0 0 20px rgba(255, 118, 117, 0.6);
    }
    50% { 
        transform: scale(1.05); 
        box-shadow: 0 0 30px rgba(255, 118, 117, 0.8);
    }
}

/* 调整格子字体大小 */
.board-cell {
    font-size: 20px;
    min-height: 25px;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .board-cell {
        font-size: 8px;
        min-height: 20px;
    }
    
    .cell-center-heart {
        font-size: 16px;
    }
}

/* 格子悬停效果 */
.board-cell:hover {
    transform: scale(1.05);
    z-index: 2;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* 高亮效果 */
.cell-highlight {
    animation: pulse 1s infinite;
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.6);
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

/* 棋子样式 */
.pieces {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.piece {
    position: absolute;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 16px;
    color: white;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 10;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.piece-inner {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
}

.player-a {
    background: linear-gradient(135deg, #74b9ff, #0984e3);
}

.player-b {
    background: linear-gradient(135deg, #fd79a8, #e84393);
}

/* 相遇指示器 */
.meeting-indicator {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: none;
    align-items: center;
    justify-content: center;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    z-index: 20;
}

.meeting-glow {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 215, 0, 0.3), transparent);
    animation: glow 2s ease-in-out infinite alternate;
}

.meeting-text {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    z-index: 1;
}

@keyframes glow {
    from { transform: scale(1); opacity: 0.7; }
    to { transform: scale(1.2); opacity: 0.3; }
}

/* 右侧控制面板 */
.control-panel {
    width: 320px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* 状态面板 */
.status-panel {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

.panel-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 20px;
    color: #333;
}

/* 全局心动值区域 */
.global-charm-status {
    background: linear-gradient(135deg, rgba(255, 182, 193, 0.3), rgba(173, 216, 230, 0.3));
    border-radius: 15px;
    padding: 15px;
    margin-bottom: 20px;
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 105, 180, 0.4);
    text-align: center;
}

.global-charm-status label {
    font-size: 16px;
    font-weight: bold;
    color: #ff69b4;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* 玩家状态 */
.player-status {
    margin-bottom: 20px;
    padding: 15px;
    border-radius: 12px;
    background: rgba(248, 249, 250, 0.8);
}

.player-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

.player-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 14px;
    color: white;
}

.player-a-avatar {
    background: linear-gradient(135deg, #74b9ff, #0984e3);
}

.player-b-avatar {
    background: linear-gradient(135deg, #fd79a8, #e84393);
}

.player-name {
    font-weight: 500;
    color: #333;
}

/* 状态条 */
.status-item {
    margin-bottom: 12px;
}

.status-item label {
    display: block;
    font-size: 12px;
    font-weight: 500;
    color: #666;
    margin-bottom: 4px;
}

.progress-bar {
    position: relative;
    height: 20px;
    background: #e9ecef;
    border-radius: 10px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    border-radius: 10px;
    transition: width 0.5s ease;
    position: relative;
}

.miss-progress {
    background: linear-gradient(90deg, #a29bfe, #6c5ce7);
}

.charm-progress {
    background: linear-gradient(90deg, #fd79a8, #e84393);
}

.progress-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 11px;
    font-weight: 600;
    color: #333;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.8);
}

/* 情感等级显示 */
.level-display {
    padding: 15px;
    background: linear-gradient(135deg, #ffecd2, #fcb69f);
    border-radius: 12px;
    margin-bottom: 20px;
}

.level-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.level-label {
    font-weight: 600;
    color: #333;
}

.level-badge {
    background: rgba(255, 255, 255, 0.9);
    color: #333;
    padding: 4px 12px;
    border-radius: 20px;
    font-weight: bold;
    font-size: 14px;
}

.level-dots {
    display: flex;
    gap: 8px;
    justify-content: center;
}

.level-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    transition: all 0.3s ease;
}

.level-dot.active {
    background: #333;
    transform: scale(1.2);
}



/* 掷骰区域 */
.dice-section {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.current-player {
    margin-bottom: 20px;
}

.current-player-label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: #666;
    margin-bottom: 8px;
}

.current-player-indicator {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.dice-container {
    margin-bottom: 15px;
}

.dice {
    width: 60px;
    height: 60px;
    background: white;
    border: 2px solid #ddd;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.dice.rolling {
    animation: roll 0.8s ease-in-out;
}

@keyframes roll {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(90deg); }
    50% { transform: rotate(180deg); }
    75% { transform: rotate(270deg); }
}

.dice-face {
    font-size: 24px;
    font-weight: bold;
    color: #333;
}

.dice-button {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 25px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.dice-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.dice-button:active {
    transform: translateY(0);
}

.dice-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.dice-shortcut {
    display: block;
    font-size: 11px;
    opacity: 0.8;
    margin-top: 2px;
}

.extra-roll-indicator {
    background: linear-gradient(135deg, #fdcb6e, #e17055);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    animation: bounce 1s infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-4px); }
}

/* 游戏日志 */
.game-log {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
    max-height: 500px;
}

.log-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 15px;
    color: #333;
}

.log-content {
    flex: 1;
    min-height: 200px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #ddd transparent;
}

.log-content::-webkit-scrollbar {
    width: 4px;
}

.log-content::-webkit-scrollbar-track {
    background: transparent;
}

.log-content::-webkit-scrollbar-thumb {
    background: #ddd;
    border-radius: 2px;
}

.log-entry {
    display: flex;
    gap: 10px;
    margin-bottom: 8px;
    font-size: 13px;
    line-height: 1.4;
}

.log-time {
    color: #666;
    font-weight: 500;
    min-width: 40px;
}

.log-message {
    color: #333;
    flex: 1;
}

/* 控制按钮 */
.control-buttons {
    display: flex;
    gap: 10px;
}

.control-btn {
    flex: 1;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid #ddd;
    padding: 10px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    color: #333;
    cursor: pointer;
    transition: all 0.3s ease;
}

.control-btn:hover {
    background: white;
    color: #333;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.safety-btn {
    background: linear-gradient(135deg, #ff6b6b, #ee5a52);
    color: white;
    border: none;
}

.safety-btn:hover {
    background: linear-gradient(135deg, #ee5a52, #c44569);
}

/* 重新开始游戏按钮 */
.restart-game-btn {
    width: 100%;
    background: linear-gradient(135deg, #ff6b6b, #ee5a52);
    color: white;
    border: none;
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 15px;
    box-shadow: 0 4px 12px rgba(255, 107, 107, 0.3);
}

.restart-game-btn:hover {
    background: linear-gradient(135deg, #ee5a52, #c44569);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 107, 107, 0.4);
}

.restart-game-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(255, 107, 107, 0.3);
}

/* 模态框样式 */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(4px);
}

.modal {
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 90vw;
    max-height: 90vh;
    overflow: hidden;
    animation: modalEnter 0.3s ease-out;
}

@keyframes modalEnter {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid #eee;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
}

.modal-body {
    padding: 24px;
    max-height: 60vh;
    overflow-y: auto;
}

.modal-footer {
    padding: 20px 24px;
    border-top: 1px solid #eee;
    background: #f8f9fa;
}

/* 任务弹窗 */
.task-modal {
    width: 500px;
}

.task-type-badge,
.task-level-badge {
    background: #667eea;
    color: white;
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: 600;
}

.task-level-badge {
    background: #764ba2;
}

.explicit-indicator {
    background: linear-gradient(135deg, #ff6b6b, #ee5a52);
    color: white;
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: 600;
}

.task-content {
    margin-bottom: 20px;
}

.task-text {
    font-size: 16px;
    line-height: 1.6;
    color: #333;
    margin-bottom: 15px;
}

.task-fallback {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 12px;
    border-left: 4px solid #fdcb6e;
}

.fallback-header {
    margin-bottom: 8px;
}

.fallback-label {
    font-size: 12px;
    font-weight: 600;
    color: #e17055;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.fallback-text {
    font-size: 14px;
    color: #666;
    line-height: 1.5;
}

.task-actions {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.task-btn {
    padding: 10px 16px;
    border: none;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
}

.complete-btn {
    background: linear-gradient(135deg, #00b894, #55efc4);
    color: white;
}

.complete-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 184, 148, 0.3);
}

.incomplete-btn {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: white;
}

.incomplete-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(231, 76, 60, 0.3);
}

.fallback-btn {
    background: linear-gradient(135deg, #fdcb6e, #e17055);
    color: white;
}

.yellow-light-btn {
    background: linear-gradient(135deg, #f39c12, #e67e22);
    color: white;
}

.red-light-btn {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: white;
}

.safety-reminder {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 8px;
    padding: 12px;
}

.safety-text {
    font-size: 12px;
    color: #856404;
    text-align: center;
    margin: 0;
}

/* 剧情弹窗 */
.story-modal {
    width: 480px;
}

.story-type-badge,
.story-level-badge {
    background: #fdcb6e;
    color: #333;
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: 600;
}

.story-level-badge {
    background: #e17055;
    color: white;
}

.story-text {
    font-size: 16px;
    line-height: 1.6;
    color: #333;
}

.story-btn {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
}

.story-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

/* 掷骰子弹窗样式 */
.dice-modal {
    max-width: 400px;
    width: 90%;
}

.dice-title {
    font-size: 20px;
    font-weight: 700;
    color: #333;
    margin-bottom: 8px;
    text-align: center;
}

.dice-subtitle {
    font-size: 14px;
    color: #666;
    text-align: center;
    margin: 0;
}

.dice-modal-content {
    text-align: center;
    padding: 20px;
}

.dice-modal-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.dice-modal-dice {
    width: 80px;
    height: 80px;
    background: white;
    border: 3px solid #667eea;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.3);
    transition: transform 0.3s ease;
}

.dice-modal-dice.rolling {
    animation: modalRoll 1s ease-in-out;
}

@keyframes modalRoll {
    0%, 100% { transform: rotate(0deg) scale(1); }
    25% { transform: rotate(90deg) scale(1.1); }
    50% { transform: rotate(180deg) scale(1.2); }
    75% { transform: rotate(270deg) scale(1.1); }
}

.dice-modal-face {
    font-size: 32px;
    font-weight: bold;
    color: #667eea;
}

.dice-modal-text {
    font-size: 14px;
    color: #666;
    text-align: center;
    line-height: 1.5;
    margin: 0;
}

.dice-modal-btn {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 25px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
    font-size: 16px;
}

.dice-modal-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.dice-modal-btn:active {
    transform: translateY(0);
}

.dice-modal-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* 奖励弹窗 */
.reward-modal {
    width: 600px;
}

.reward-title {
    font-size: 24px;
    color: #333;
    margin: 0;
}

.reward-subtitle {
    font-size: 14px;
    color: #666;
    margin: 5px 0 0 0;
}

.reward-options {
    display: grid;
    gap: 15px;
}

.reward-option {
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: left;
}

.reward-option:hover {
    border-color: #667eea;
    background: #f0f4ff;
}

.reward-option.selected {
    border-color: #667eea;
    background: linear-gradient(135deg, #f0f4ff, #e8f2ff);
}

.reward-text {
    font-size: 16px;
    color: #333;
    line-height: 1.5;
    margin: 0;
}

.reward-btn {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
}

.reward-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.reward-btn:not(:disabled):hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

/* 设置弹窗 */
.settings-modal {
    width: 600px;
}

.settings-title {
    font-size: 20px;
    color: #333;
    margin: 0;
}

.close-btn {
    background: none;
    border: none;
    font-size: 24px;
    color: #999;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.close-btn:hover {
    background: #f0f0f0;
    color: #333;
}

.settings-content {
    max-height: 500px;
    overflow-y: auto;
}

.settings-section {
    margin-bottom: 30px;
}

.section-title {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin-bottom: 15px;
}

.section-description {
    font-size: 14px;
    color: #666;
    margin-bottom: 15px;
    line-height: 1.5;
}

.setting-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #f0f0f0;
}

.setting-item:last-child {
    border-bottom: none;
}

.setting-label {
    font-size: 14px;
    font-weight: 500;
    color: #333;
}

.toggle-switch {
    width: 44px;
    height: 24px;
    background: #ddd;
    border-radius: 12px;
    position: relative;
    cursor: pointer;
    transition: background 0.3s ease;
}

.toggle-switch.active {
    background: #4CAF50;
}

.toggle-slider {
    width: 20px;
    height: 20px;
    background: white;
    border-radius: 50%;
    position: absolute;
    top: 2px;
    left: 2px;
    transition: transform 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.toggle-switch.active .toggle-slider {
    transform: translateX(20px);
}

/* 舒适区设置 */
.consent-zones {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.zone-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.zone-checkbox {
    width: 16px;
    height: 16px;
    accent-color: #667eea;
}

.zone-label {
    font-size: 14px;
    color: #333;
    cursor: pointer;
}

/* 3列布局样式 */
.zones-container {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 20px;
    margin-top: 20px;
}

.zone-column {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 15px;
    border: 2px solid #e9ecef;
}

.zone-column h4 {
    margin: 0 0 15px 0;
    font-size: 16px;
    font-weight: 600;
    text-align: center;
    padding-bottom: 10px;
    border-bottom: 2px solid;
}

.zone-column.basic h4 {
    color: #667eea;
    border-bottom-color: #667eea;
}

.zone-column.advanced h4 {
    color: #764ba2;
    border-bottom-color: #764ba2;
}

.zone-column.sensitive h4 {
    color: #fd79a8;
    border-bottom-color: #fd79a8;
}

.zone-column.sensitive.disabled {
    opacity: 0.5;
    pointer-events: none;
}

@media (max-width: 768px) {
    .zones-container {
        grid-template-columns: 1fr;
        gap: 15px;
    }
}

/* 成人模式设置 */
.adult-mode-warning {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
}

.warning-text {
    font-size: 14px;
    font-weight: 600;
    color: #856404;
    margin: 0 0 5px 0;
}

.warning-subtext {
    font-size: 13px;
    color: #856404;
    margin: 0;
}

.age-confirmation {
    margin-bottom: 20px;
}

.confirmation-item {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}

.confirm-checkbox {
    width: 16px;
    height: 16px;
    accent-color: #667eea;
}

.confirm-label {
    font-size: 14px;
    color: #333;
    cursor: pointer;
}

.settings-btn {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
}

.settings-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.task-btn {
    background: linear-gradient(135deg, #f093fb, #f5576c);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
}

.task-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(240, 147, 251, 0.3);
}

/* 帮助弹窗 */
.help-modal {
    width: 600px;
}

.help-title {
    font-size: 20px;
    color: #333;
    margin: 0;
}

.help-content {
    max-height: 500px;
    overflow-y: auto;
}

.help-section {
    margin-bottom: 25px;
}

.help-section h3 {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin-bottom: 10px;
}

.help-section p {
    font-size: 14px;
    color: #666;
    line-height: 1.6;
    margin-bottom: 10px;
}

.help-section ul {
    list-style: none;
    padding: 0;
}

.help-section li {
    font-size: 14px;
    color: #666;
    line-height: 1.6;
    margin-bottom: 8px;
    padding-left: 20px;
    position: relative;
}

.help-section li::before {
    content: '•';
    color: #667eea;
    font-weight: bold;
    position: absolute;
    left: 0;
}

.help-color {
    display: inline-block;
    width: 16px;
    height: 16px;
    border-radius: 3px;
    margin-right: 8px;
    vertical-align: middle;
}

.help-color.white { background: #f8f9fa; border: 1px solid #ddd; }
.help-color.task-blue { background: linear-gradient(135deg, #74b9ff, #0984e3); }
.help-color.task-orange { background: linear-gradient(135deg, #fd79a8, #e84393); }
.help-color.task-purple { background: linear-gradient(135deg, #a29bfe, #6c5ce7); }
.help-color.task-red { background: linear-gradient(135deg, #ff7675, #d63031); }
.help-color.task-dark { background: linear-gradient(135deg, #636e72, #2d3436); }
.help-color.task-challenge { background: linear-gradient(135deg, #95a5a6, #7f8c8d); }
.help-color.blue-fixed { background: linear-gradient(135deg, #74b9ff, #0984e3); }
.help-color.pink-fixed { background: linear-gradient(135deg, #fd79a8, #e84393); }
.help-color.green-fixed { background: linear-gradient(135deg, #00b894, #00a085); }
.help-color.yellow-arrow { background: linear-gradient(135deg, #fdcb6e, #e17055); }

/* 安全词弹窗 */
.safety-modal {
    width: 450px;
}

.safety-title {
    font-size: 20px;
    color: #333;
    margin: 0;
}

.safety-description {
    font-size: 16px;
    color: #666;
    line-height: 1.6;
    margin-bottom: 20px;
}

.safety-options {
    display: grid;
    gap: 15px;
    margin-bottom: 20px;
}

.safety-option {
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 15px;
    text-align: left;
}

.safety-option:hover {
    border-color: #667eea;
    background: #f0f4ff;
}

.safety-icon {
    font-size: 24px;
}

.safety-info h4 {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin: 0 0 5px 0;
}

.safety-info p {
    font-size: 14px;
    color: #666;
    margin: 0;
}

.safety-reminder {
    background: #e8f5e8;
    border: 1px solid #c3e6c3;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
}

.safety-reminder p {
    font-size: 14px;
    color: #2d5a2d;
    margin: 0;
    text-align: center;
    line-height: 1.5;
}

.close-safety {
    background: #6c757d;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
}

.close-safety:hover {
    background: #5a6268;
}

/* 响应式设计 */
@media (max-width: 1200px) {
    .game-container {
        flex-direction: column;
        padding: 15px;
    }
    
    .status-section {
        width: 100%;
        order: 1;
    }
    
    .board-section {
        order: 2;
    }
    
    .control-panel {
        width: 100%;
        order: 3;
    }
    
    .board-container {
        width: 800px;
        height: 800px;
    }
}

@media (max-width: 768px) {
    .board-container {
        width: 400px;
        height: 415px;
    }
    
    /* 移动端棋子大小调整 */
    .piece {
        width: 20px;
        height: 20px;
        font-size: 12px;
    }
    
    .piece-inner {
        width: 16px;
        height: 16px;
    }
    
    .status-section {
        margin-bottom: 20px;
    }
    
    .modal {
        width: 95vw;
        margin: 10px;
    }
    
    .task-modal,
    .story-modal,
    .reward-modal,
    .settings-modal,
    .help-modal,
    .safety-modal {
        width: 100%;
    }
    
    .consent-zones {
        grid-template-columns: 1fr;
    }
    
    .task-actions {
        flex-direction: column;
    }
    
    .control-buttons {
        flex-direction: column;
    }
}

/* 无障碍支持 */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* 高对比度模式 */
@media (prefers-contrast: high) {
    .board-cell {
        border: 2px solid #000;
    }
    
    .piece {
        border: 2px solid #000;
    }
    
    .modal {
        border: 2px solid #000;
    }
}

/* 焦点样式 */
button:focus,
input:focus,
.board-cell:focus {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

/* 打印样式 */
@media print {
    .modal-overlay,
    .control-panel {
        display: none !important;
    }
    
    .board-section {
        width: 100%;
    }
}