/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Microsoft YaHei', '微软雅黑', Arial, sans-serif;
    background-color: #1a1a1a;
    color: #fff;
    line-height: 1.6;
}

.game-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
}

h1 {
    text-align: center;
    margin-bottom: 20px;
    color: #ffd700;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

/* 游戏桌面 */
.game-table {
    background-color: #006400;
    border-radius: 50%;
    padding: 40px;
    margin-bottom: 20px;
    position: relative;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
    min-height: 500px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* 玩家区域 */
.opponent-area, .player-area {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 10px;
}

.opponent-area {
    flex-direction: column;
}

.player-area {
    flex-direction: column-reverse;
}

.player-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 10px;
    background-color: rgba(0, 0, 0, 0.5);
    padding: 10px;
    border-radius: 10px;
    min-width: 150px;
}

.player-name {
    font-weight: bold;
    font-size: 1.2em;
    margin-bottom: 5px;
}

.player-chips {
    color: #ffd700;
}

/* 卡牌样式 */
.cards-container {
    display: flex;
    gap: 10px;
    margin: 10px 0;
}

.card {
    width: 80px;
    height: 120px;
    background-color: #fff;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 24px;
    color: #000;
    position: relative;
    transition: all 0.3s ease;
}

.card:empty {
    background-color: rgba(255, 255, 255, 0.2);
}

.card-back {
    background-color: #b22222;
    background-image: linear-gradient(45deg, #b22222 25%, transparent 25%, transparent 50%, #b22222 50%, #b22222 75%, transparent 75%, transparent);
    background-size: 10px 10px;
}

/* 公共牌区域 */
.community-cards {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin: 20px 0;
}

/* 底池 */
.pot-container {
    text-align: center;
    margin: 10px 0;
}

.pot {
    display: inline-block;
    background-color: rgba(0, 0, 0, 0.5);
    padding: 10px 20px;
    border-radius: 20px;
    font-size: 1.2em;
}

#pot-amount {
    color: #ffd700;
    font-weight: bold;
}

/* 控制区域 */
.controls {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
}

.betting-controls, .game-controls {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

button {
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.2s ease;
    font-family: 'Microsoft YaHei', '微软雅黑', Arial, sans-serif;
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

button:active {
    transform: translateY(0);
    box-shadow: none;
}

#btn-check, #btn-call {
    background-color: #4caf50;
    color: white;
}

#btn-raise {
    background-color: #ff9800;
    color: white;
}

#btn-fold {
    background-color: #f44336;
    color: white;
}

#btn-start, #btn-next {
    background-color: #2196f3;
    color: white;
    padding: 12px 24px;
    font-size: 1.1em;
}

#btn-rules {
    background-color: #9c27b0;
    color: white;
}

button:disabled {
    background-color: #cccccc;
    color: #666666;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* 滑块样式 */
#bet-slider {
    width: 150px;
    margin: 0 10px;
}

#bet-amount {
    background-color: #333;
    padding: 5px 10px;
    border-radius: 5px;
    min-width: 40px;
    text-align: center;
}

/* 游戏状态 */
.game-status {
    background-color: rgba(0, 0, 0, 0.7);
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 20px;
    text-align: center;
}

#status-message {
    font-size: 1.1em;
}

/* 模态框样式 */
.modal {
    display: none;
    position: fixed;
    z-index: 1;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.7);
}

.modal-content {
    background-color: #2a2a2a;
    margin: 10% auto;
    padding: 20px;
    border-radius: 10px;
    width: 80%;
    max-width: 700px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
    animation: modalopen 0.4s;
}

@keyframes modalopen {
    from {opacity: 0; transform: translateY(-50px);}
    to {opacity: 1; transform: translateY(0);}
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover,
.close:focus {
    color: #fff;
    text-decoration: none;
}

.rules-content {
    margin-top: 20px;
}

.rules-content h3 {
    margin-top: 15px;
    margin-bottom: 10px;
    color: #ffd700;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .game-table {
        padding: 20px;
    }
    
    .card {
        width: 60px;
        height: 90px;
        font-size: 18px;
    }
    
    .betting-controls, .game-controls {
        flex-direction: column;
        align-items: center;
    }
    
    button {
        width: 100%;
        max-width: 200px;
    }
}

/* 扑克牌花色和点数样式 */
.card::before, .card::after {
    position: absolute;
    font-size: 16px;
}

.card::before {
    top: 5px;
    left: 5px;
}

.card::after {
    bottom: 5px;
    right: 5px;
    transform: rotate(180deg);
}

.card.hearts::before, .card.hearts::after,
.card.diamonds::before, .card.diamonds::after {
    color: red;
}

.card.spades::before, .card.spades::after,
.card.clubs::before, .card.clubs::after {
    color: black;
}