* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Microsoft YaHei', Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 10px;
}

.game-container {
    max-width: 1600px;
    width: 98%;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 15px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
}

.game-title {
    text-align: center;
    color: #764ba2;
    font-size: clamp(1.5em, 4vw, 2.5em);
    margin-bottom: 15px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.game-area {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
}

.main-game {
    display: flex;
    gap: 15px;
    align-items: flex-start;
    flex-wrap: nowrap;
    justify-content: center;
}

/* 控制面板和卡牌系统的容器 */
.side-panels {
    display: flex;
    flex-direction: column;
    gap: 15px;
    /* 宽度和控制面板一样 */
    max-width: 380px;
    min-width: 280px;
}

/* 棋盘 - 15x15正方形，外圈56格，中间空白81格 */
.board {
    display: grid;
    grid-template-columns: repeat(15, 1fr);
    grid-template-rows: repeat(15, 1fr);
    gap: 3px;
    background: #f0f0f0;
    border-radius: 10px;
    padding: 8px;
    box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.1);
    width: min(900px, 90vw);
    height: min(900px, 90vw);
    min-width: 610px;
    min-height: 610px;
}

.cell {
    border: 1px solid #ddd;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4px;
    font-size: 11px;
    text-align: center;
    position: relative;
    transition: all 0.2s ease;
    background: white;
    overflow: visible;
    word-break: break-all;
    cursor: pointer;
    min-width: 40px;
    min-height: 40px;
}

.cell.empty {
    border: none;
    background: transparent;
}

.cell .name {
    font-weight: bold;
    line-height: 1.2;
    font-size: 14px;
    white-space: normal;
    overflow: visible;
    text-align: center;
    padding: 2px 1px;
}

.cell .houses-display {
    font-size: 11px;
    margin-top: 1px;
    font-weight: bold;
    color: #e74c3c;
}

.cell .price {
    font-weight: bold;
    color: #666;
    margin-top: 2px;
    font-size: 12px;
    white-space: normal;
    overflow: visible;
    text-align: center;
    padding: 1px;
}

.cell .owner {
    font-size: 11px;
    margin-top: 2px;
    white-space: normal;
    overflow: visible;
    text-align: center;
    padding: 1px;
}

.cell:hover {
    transform: scale(1.08);
    z-index: 10;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.cell.empty:hover {
    transform: none;
    box-shadow: none;
}

.cell.property {
    border-left: 3px solid;
}

.cell.property .color-bar {
    width: 100%;
    height: 10px;
    margin-bottom: 2px;
    border-radius: 2px;
}

.cell.special {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    font-weight: bold;
}

.cell.corner {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: white;
    font-weight: bold;
}

.cell.bank {
    background: linear-gradient(135deg, #4CAF50 0%, #2E7D32 100%);
    color: white;
    font-weight: bold;
}

.cell.bank .name {
    font-size: 9px;
}

.player-marker {
    position: absolute;
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    z-index: 1000;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.cell .player-marker.ai-marker {
    border-radius: 50%;
    background: rgba(156, 39, 176, 0.3);
}

.control-panel {
    flex: 1 1 280px;
    min-width: 280px;
    max-width: 380px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.player-info {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    padding: 12px;
    color: white;
}

.player-card {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    padding: 10px;
    margin-bottom: 8px;
    transition: all 0.3s ease;
}

.player-card.active {
    background: rgba(255, 255, 255, 0.4);
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.5);
    transform: scale(1.02);
}

.player-card.ai-player {
    border: 2px dashed #9C27B0;
}

.player-card h3 {
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

.player-money {
    font-size: 13px;
    font-weight: bold;
    color: #ffd700;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

.player-properties {
    font-size: 11px;
    margin-top: 5px;
}

.controls {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.btn {
    padding: 10px 15px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
}

.btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-secondary {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
}

.btn-danger {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 100%);
    color: white;
}

.btn-success {
    background: linear-gradient(135deg, #00b894 0%, #00cec9 100%);
    color: white;
}

.btn-ai {
    background: linear-gradient(135deg, #9C27B0 0%, #7B1FA2 100%);
    color: white;
}

.dice-area {
    background: white;
    border-radius: 12px;
    padding: 15px;
    text-align: center;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

.dice {
    font-size: 3em;
    margin-bottom: 10px;
}

.dice.rolling {
    animation: shake 0.3s ease infinite;
}

@keyframes shake {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(-15deg); }
    75% { transform: rotate(15deg); }
}

.dice-result {
    font-size: 1.5em;
    font-weight: bold;
    color: #764ba2;
}

.game-log {
    background: white;
    border-radius: 12px;
    padding: 12px;
    max-height: 150px;
    overflow-y: auto;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

.game-log h3 {
    color: #764ba2;
    margin-bottom: 10px;
    font-size: 14px;
}

#logContent {
    font-size: 11px;
    line-height: 1.5;
}

#logContent p {
    padding: 5px;
    margin-bottom: 3px;
    border-radius: 4px;
    background: #f8f9fa;
}

#logContent p:nth-child(even) {
    background: #e9ecef;
}

.stock-market {
    background: white;
    border-radius: 12px;
    padding: 12px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    margin-top: 10px;
}

.stock-market h3 {
    color: #764ba2;
    margin-bottom: 10px;
    font-size: 14px;
}

#stockList {
    margin-bottom: 10px;
    font-size: 11px;
}

.stock-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 10px;
    margin-bottom: 5px;
    background: #f8f9fa;
    border-left: 3px solid;
}

.stock-item.up { border-left-color: #2ecc71; }
.stock-item.down { border-left-color: #e74c3c; }

.stock-name {
    font-weight: bold;
    flex: 1;
}

.stock-price {
    margin-right: 10px;
    font-weight: bold;
}

.stock-change {
    min-width: 50px;
    text-align: right;
}

.stock-change.positive {
    color: #2ecc71;
}

.stock-change.negative {
    color: #e74c3c;
}

/* 模态框 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 9999;
    justify-content: center;
    align-items: center;
}

.modal.show {
    display: flex;
}

.modal-content {
    background: white;
    padding: 25px;
    border-radius: 15px;
    max-width: 350px;
    width: 90%;
    text-align: center;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
}

.modal-content h2 {
    color: #764ba2;
    margin-bottom: 15px;
    font-size: 18px;
}

.modal-content p {
    margin-bottom: 15px;
    font-size: 14px;
    line-height: 1.5;
}

.modal-buttons {
    display: flex;
    gap: 8px;
    justify-content: center;
    flex-wrap: wrap;
}

/* 开始界面 */
.start-modal {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 40px;
    border-radius: 25px;
    box-shadow: 0 20px 60px rgba(102, 126, 234, 0.5);
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.game-logo {
    margin-bottom: 40px;
}

.logo-icon {
    font-size: 80px;
    margin-bottom: 10px;
    animation: bounce 2s ease infinite;
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

.logo-text {
    font-size: 48px;
    font-weight: bold;
    margin: 10px 0;
    text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.3);
    letter-spacing: 8px;
}

.logo-subtitle {
    font-size: 16px;
    letter-spacing: 10px;
    opacity: 0.9;
    margin-bottom: 30px;
    font-weight: 300;
}

.btn-start {
    padding: 18px 50px;
    font-size: 20px;
    font-weight: bold;
    border-radius: 50px;
    margin: 0 auto;
    display: block;
    width: 80%;
    max-width: 300px;
    animation: pulse 2s ease infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.btn-glow {
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    color: white;
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.5);
}

.btn-glow:hover {
    box-shadow: 0 0 30px rgba(255, 215, 0, 0.8);
    transform: translateY(-3px);
}

.footer-text {
    margin-top: 25px;
    font-size: 12px;
    opacity: 0.8;
    font-style: italic;
}

/* 模式选择界面 */
.mode-modal {
    background: white;
    padding: 40px 50px;
    border-radius: 25px;
    max-width: 900px;
    width: 95%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.mode-modal h2 {
    color: #764ba2;
    margin-bottom: 20px;
    font-size: 24px;
}

.mode-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 25px;
    background: #f0f0f0;
    padding: 5px;
    border-radius: 10px;
}

.tab-btn {
    flex: 1;
    padding: 12px;
    border: none;
    background: transparent;
    border-radius: 8px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #666;
}

.tab-btn.active {
    background: white;
    color: #764ba2;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.tab-btn:hover:not(.active) {
    background: rgba(255, 255, 255, 0.5);
}

.mode-content {
    margin-bottom: 20px;
}

.mode-options {
    display: none;
    justify-content: center;
    gap: 10px;
    flex-wrap: nowrap;
    align-items: stretch;
    width: 100%;
}

.mode-options.show {
    display: flex;
}

.mode-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.btn-mode {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 15px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 12px;
    text-align: left;
    transition: all 0.3s ease;
    flex: 0 0 auto;
    min-width: 100px;
    max-width: 130px;
    cursor: pointer;
    flex-direction: column;
}

/* 默认显示真人模式，隐藏AI模式 */
.human-mode {
    display: flex;
}

.ai-mode {
    display: none;
}

/* 当AI模式激活时，显示AI模式，隐藏真人模式 */
.mode-options.ai-mode .human-mode {
    display: none;
}

.mode-options.ai-mode .ai-mode {
    display: flex;
}

.btn-mode:hover {
    transform: translateX(5px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.3);
}

.mode-icon {
    font-size: 28px;
    width: 50px;
    text-align: center;
}

.mode-title {
    flex: 1;
    font-size: 16px;
    font-weight: bold;
}

.mode-desc {
    font-size: 12px;
    opacity: 0.9;
}

.btn-secondary {
    margin-top: 15px;
    width: 100%;
}

.stock-modal {
    max-width: 450px;
}

.stock-trade-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    margin-bottom: 8px;
    background: #f8f9fa;
    border-radius: 8px;
}

.stock-trade-info {
    flex: 1;
    text-align: left;
}

.stock-trade-info strong {
    display: block;
    margin-bottom: 4px;
}

.stock-trade-info div {
    font-size: 11px;
    margin: 2px 0;
}

.stock-trade-actions {
    display: flex;
    gap: 5px;
}

/* 卡牌系统 */
.card-system {
    margin: 0;
    padding: 20px;
    background: #fff;
    border: 2px solid #FFD700;
    border-radius: 10px;
    /* 宽度和股票市场一样 */
    width: 100%;
    box-sizing: border-box;
}

/* 卡牌系统内部使用 flex 布局 */
.card-system {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.card-system > * {
    width: 100%;
}

.card-system h3 {
    color: #B8860B;
    text-align: center;
    margin-bottom: 15px;
    font-size: 16px;
    width: 100%;
    flex: none;
}

.points-display {
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    color: white;
    padding: 10px 15px;
    border-radius: 6px;
    text-align: center;
    font-size: 14px;
    font-weight: bold;
    margin-bottom: 15px;
    width: 100%;
    box-sizing: border-box;
}

.my-cards {
    margin-bottom: 0;
    padding: 10px;
    background: #f9f9f9;
    border-radius: 6px;
    min-height: 150px;
}

.my-cards h4 {
    color: #666;
    margin-bottom: 8px;
    font-size: 12px;
}

.my-cards-list {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    min-height: 50px;
    margin-bottom: 8px;
    justify-content: center;
    align-items: center;
}

.my-card {
    width: 55px;
    height: 45px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 6px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 8px;
    cursor: pointer;
    transition: all 0.2s;
    padding: 3px;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    border: 2px solid #6a1b9a;
}

.my-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 3px 6px rgba(0,0,0,0.3);
}

.my-card.selected {
    border-color: #FFD700;
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    box-shadow: 0 0 8px rgba(255, 215, 0, 0.5);
}

.my-card .icon {
    font-size: 18px;
}

.my-card .name {
    font-weight: bold;
    font-size: 7px;
}

.my-card .rarity {
    font-size: 7px;
    margin-top: 2px;
    font-weight: bold;
}

.card-shop {
    margin-top: 0;
    padding: 12px;
    background: #fff5f5;
    border: 1px solid #ff69b4;
    border-radius: 6px;
    min-height: 150px;
}

.card-shop h4 {
    color: #ff69b4;
    margin-bottom: 8px;
    font-size: 12px;
    text-align: center;
}

.shop-cards {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: center;
}

.shop-card {
    width: 70px;
    height: 55px;
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    border-radius: 6px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 8px;
    cursor: pointer;
    transition: all 0.2s;
    padding: 4px;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.shop-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 3px 6px rgba(0,0,0,0.3);
}

.shop-card .icon {
    font-size: 20px;
}

.shop-card .name {
    font-weight: bold;
    margin: 2px 0;
    font-size: 9px;
}

.shop-card .desc {
    font-size: 6px;
    opacity: 0.9;
    margin-bottom: 3px;
}

.shop-card .price {
    background: rgba(0,0,0,0.3);
    padding: 2px 5px;
    border-radius: 3px;
    font-weight: bold;
    font-size: 8px;
}

.shop-card .rarity-badge {
    position: absolute;
    top: 2px;
    right: 2px;
    font-size: 7px;
    color: white;
    padding: 1px 3px;
    border-radius: 3px;
    font-weight: bold;
}

/* 规则按钮 */
.btn-rules {
    position: absolute;
    top: 15px;
    right: 15px;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: bold;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
    transition: all 0.2s ease;
    z-index: 1000;
}

.btn-rules:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

/* 规则模态框 */
.rules-modal {
    max-width: 800px;
    max-height: 85vh;
    overflow-y: auto;
    background: white;
    padding: 30px;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.rules-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid #764ba2;
}

.rules-header h2 {
    color: #764ba2;
    margin: 0;
    font-size: 28px;
}

.btn-close {
    width: 36px;
    height: 36px;
    border: none;
    background: #ff6b6b;
    color: white;
    font-size: 28px;
    font-weight: bold;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.btn-close:hover {
    background: #ee5a24;
    transform: rotate(90deg);
}

.rules-content {
    font-size: 14px;
    line-height: 1.8;
    color: #333;
}

.rules-content h3 {
    color: #764ba2;
    margin-top: 25px;
    margin-bottom: 10px;
    font-size: 18px;
    border-left: 4px solid #764ba2;
    padding-left: 10px;
}

.rules-content h3:first-child {
    margin-top: 0;
}

.rules-content p {
    margin-bottom: 10px;
}

.rules-content ul {
    margin: 0 0 15px 20px;
    padding: 0;
}

.rules-content li {
    margin-bottom: 6px;
}

.rules-content strong {
    color: #764ba2;
    font-weight: bold;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .rules-modal {
        max-width: 95%;
        padding: 20px;
    }

    .rules-header h2 {
        font-size: 22px;
    }

    .btn-rules {
        top: 10px;
        right: 10px;
        padding: 8px 15px;
        font-size: 12px;
    }
}
    .main-game {
        flex-direction: column;
        align-items: center;
        gap: 15px;
    }

    .side-panels {
        max-width: 100%;
        width: 100%;
    }

    .control-panel {
        max-width: 720px;
    }
}

@media (max-width: 600px) {
    body {
        padding: 5px;
    }
    .game-container {
        padding: 8px;
        border-radius: 10px;
    }
    .game-title {
        font-size: 1.3em;
        margin-bottom: 10px;
    }

    .board {
        width: min(480px, 90vw);
        height: min(480px, 90vw);
        min-width: 320px;
        min-height: 320px;
        gap: 1px;
    }

    .cell {
        min-width: auto;
        min-height: auto;
        max-width: none;
        max-height: none;
        font-size: 8px;
        padding: 2px;
        min-height: 35px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .cell .name {
        font-size: 7px;
        white-space: normal;
        overflow: visible;
        text-align: center;
        padding: 2px 1px;
        line-height: 1.2;
    }

    .cell.bank .name {
        font-size: 6px;
    }
    .cell .price {
        font-size: 6px;
        white-space: normal;
        overflow: visible;
        text-align: center;
        padding: 1px;
        margin-top: 2px;
    }
    .cell .owner {
        font-size: 6px;
        white-space: normal;
        overflow: visible;
        text-align: center;
        padding: 1px;
        margin-top: 2px;
    }
    .cell .houses-display {
        font-size: 8px;
        margin-top: 2px;
        font-weight: bold;
        color: #e74c3c;
        text-align: center;
    }
    .cell .color-bar {
        height: 8px;
    }

    .player-info {
        padding: 8px;
    }
    .player-card {
        padding: 8px;
        margin-bottom: 5px;
    }
    .player-card h3 {
        font-size: 12px;
    }
    .player-money {
        font-size: 10px;
    }

    .btn {
        padding: 8px 12px;
        font-size: 12px;
    }
    .dice {
        font-size: 2.5em;
    }
    .dice-result {
        font-size: 1.2em;
    }

    .my-card {
        width: 48px;
        height: 38px;
    }
    .shop-card {
        width: 60px;
        height: 48px;
    }

    .card-system {
        padding: 15px;
    }
}

/* 银行利息提示样式（动态添加） */
.notification {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #4CAF50 0%, #2E7D32 100%);
    color: white;
    padding: 15px 25px;
    border-radius: 10px;
    font-weight: bold;
    font-size: 16px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.3);
    z-index: 9999;
    animation: slideDown 0.5s ease;
}

@keyframes slideDown {
    from {
        transform: translateX(-50%) translateY(-100px);
        opacity: 0;
    }
    to {
        transform: translateX(-50%) translateY(0);
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        transform: translateX(-50%) translateY(0);
        opacity: 1;
    }
    to {
        transform: translateX(-50%) translateY(-100px);
        opacity: 0;
    }
}

/* 格子详细信息弹窗样式 */
.cell-detail-modal {
    max-width: 800px;
    background: linear-gradient(135deg, #fff 0%, #f8f9fa 100%);
}

.cell-detail-modal h2 {
    font-size: 20px;
    margin-bottom: 15px;
    color: #764ba2;
}

#cellDetailContent {
    text-align: left;
    font-size: 14px;
    line-height: 1.8;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 12px;
}

.cell-detail-section {
    margin-bottom: 0;
    padding: 12px 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #764ba2;
    height: fit-content;
}

.cell-detail-section h4 {
    color: #764ba2;
    margin-bottom: 8px;
    font-size: 15px;
    font-weight: 600;
}

.cell-detail-section p {
    margin: 4px 0;
    color: #333;
}

.cell-detail-section ul {
    margin: 0;
    padding-left: 20px;
}

.cell-detail-section ul li {
    margin: 3px 0;
    line-height: 1.5;
}

/* 特殊section占据整个宽度 */
.cell-detail-section:first-child,
.cell-detail-section:last-child {
    grid-column: 1 / -1;
}

.cell-detail-section {
    margin-bottom: 12px;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #764ba2;
}

.cell-detail-section h4 {
    color: #764ba2;
    margin-bottom: 5px;
    font-size: 15px;
}

.cell-detail-section p {
    margin: 3px 0;
    color: #333;
}

.cell-detail-price {
    font-weight: bold;
    color: #e74c3c;
    font-size: 16px;
}

.cell-detail-rent {
    color: #27ae60;
}

.cell-detail-owner {
    color: #8e44ad;
    font-weight: bold;
}

/* 角色选择界面 */
.character-modal {
    background: white;
    padding: 30px 20px;
    border-radius: 25px;
    max-width: 900px;
    width: 95%;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.character-modal h2 {
    color: #764ba2;
    margin-bottom: 15px;
    font-size: 28px;
    text-align: center;
}

.character-options {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    margin-bottom: 20px;
}

.character-card {
    padding: 10px 6px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 2px solid #dee2e6;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.character-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 3px 10px rgba(102, 126, 234, 0.3);
    border-color: #667eea;
}

.character-card.selected {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-color: #667eea;
    box-shadow: 0 0 10px rgba(102, 126, 234, 0.5);
}

.character-card .character-icon {
    font-size: 28px;
    margin-bottom: 2px;
}

.character-card .character-name {
    font-weight: bold;
    font-size: 11px;
    color: #333;
    margin-bottom: 2px;
    line-height: 1.1;
}

.character-card .character-bonus {
    font-size: 8px;
    color: #666;
    line-height: 1.2;
}

.character-card.selected .character-name {
    color: white;
}

.character-card.selected .character-bonus {
    color: rgba(255, 255, 255, 0.9);
}

/* 规则弹窗中的角色介绍 */
.character-intro {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 10px;
}

.character-intro-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 8px;
    border-left: 3px solid #764ba2;
    transition: all 0.3s ease;
}

.character-intro-item:hover {
    transform: translateX(5px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2);
}

.character-intro-icon {
    font-size: 40px;
    flex-shrink: 0;
}

.character-intro-info {
    flex: 1;
    min-width: 0;
}

.character-intro-info strong {
    display: block;
    color: #764ba2;
    font-size: 14px;
    margin-bottom: 4px;
}

.character-intro-info p {
    font-size: 12px;
    color: #666;
    line-height: 1.4;
    margin: 0;
}

/* 卡牌稀有度图例 */
.card-rarity-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 15px;
}

.legend-item {
    font-size: 12px;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 5px;
}

.legend-item.common { color: #999999; }
.legend-item.rare { color: #3498db; }
.legend-item.epic { color: #9b59b6; }
.legend-item.legendary { color: #f39c12; }

/* 规则中的卡牌列表 */
.rule-section h4 {
    color: #764ba2;
    margin-top: 15px;
    margin-bottom: 10px;
    font-size: 15px;
}

/* 格子详细信息中的颜色组概览 */
.cell-detail-section ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.cell-detail-section ul li {
    padding: 3px 0;
    line-height: 1.6;
}

/* 策略分析部分的高亮文字 */
.cell-detail-section p[style*="color:#27ae60"],
.cell-detail-section p[style*="color:#e74c3c"] {
    font-weight: 500;
    padding: 5px;
    border-radius: 4px;
    background: rgba(0, 0, 0, 0.03);
}

/* 租金明细部分的数字 */
.cell-detail-section p strong,
.cell-detail-section li strong {
    font-weight: 600;
}

/* 提示性文字的样式 */
.cell-detail-section p em {
    display: block;
    margin-top: 5px;
    padding-left: 10px;
    border-left: 2px solid #666;
}

/* 玩家角色选择信息 */
.player-selection-info {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: center;
    margin-bottom: 25px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 10px;
}

.player-character-selection {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 15px 20px;
    background: white;
    border: 2px solid #dee2e6;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.player-character-selection.highlighted {
    border-color: #667eea;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    transform: scale(1.05);
}

.player-character-selection .player-label {
    font-weight: bold;
    font-size: 14px;
    margin-bottom: 8px;
}

.player-character-selection .player-character {
    font-size: 40px;
    transition: all 0.3s ease;
}

.player-character-selection.highlighted .player-character {
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.2);
    }
}

/* 占位符角色显示 */
.player-character-selection .player-character {
    font-size: 40px;
    transition: all 0.3s ease;
}

/* 角色选择界面的按钮容器 */
.character-modal .modal-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 25px;
}

.character-modal .modal-buttons .btn {
    padding: 12px 30px;
    font-size: 16px;
}
