/* ====================================
   基本スタイル（全画面共通）
   ==================================== */
body {
    font-family: 'Arial', sans-serif;
    background-color: #002e00;
    color: #fff;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 10px;
    background-image: url('casino_table_background.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.game-container {
    background-color: rgba(0, 50, 0, 0.8);
    border-radius: 20px;
    padding: 20px;
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.8);
    border: 5px solid #d4af37;
}

h1 {
    color: #d4af37;
    text-shadow: 2px 2px 4px #000;
    margin-top: 0;
}

.player-info img, .dealer-info img {
    border-radius: 50%;
    border: 3px solid #d4af37;
    object-fit: cover;
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

.player-chips {
    display: flex;
    align-items: center;
    background-color: #333;
    padding: 3px 8px;
    border-radius: 15px;
}

#chip-stack {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 2px;
}

.chip-image {
    width: 20px;
    height: 20px;
}

.hand {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.card {
    background-color: #fff;
    border-radius: 8px;
    border: 2px solid #333;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 5px;
    box-shadow: 3px 3px 6px rgba(0, 0, 0, 0.4);
    color: #000;
    transition: transform 0.2s ease-in-out;
}

.card:hover {
    transform: translateY(-5px);
}

.card .rank {
    font-weight: bold;
}

.card.red {
    color: #cc0000;
}

.card.hidden {
    background-color: #333;
    background-image: url('card_back.png');
    background-size: cover;
    background-position: center;
}

.community .card {
    border: 3px solid #d4af37;
}

.controls {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 15px;
    flex-wrap: wrap;
}

.controls button, .controls input {
    border: none;
    border-radius: 20px;
    font-weight: bold;
    cursor: pointer;
    text-transform: uppercase;
}

#deal-button { background-color: #4CAF50; color: white; }
#fold-button { background-color: #f44336; color: white; }
#check-button { background-color: #2196F3; color: white; }
#bet-button { background-color: #FF9800; color: white; }
#bet-amount {
    background-color: #fff;
    color: #000;
    border: 2px solid #d4af37;
    text-align: center;
}

#game-log {
    background-color: rgba(0, 0, 0, 0.6);
    border-radius: 10px;
    overflow-y: auto;
    border: 1px dashed #d4af37;
}

/* ====================================
   PCモード
   ==================================== */
.pc-mode .game-container {
    width: 90%;
    max-width: 1000px;
}

.pc-mode h1 { font-size: 2rem; }

.pc-mode .players-and-cards {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
}

.pc-mode .dealer-area {
    display: flex;
    align-items: center;
    gap: 10px;
}

.pc-mode .player-area {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-direction: row-reverse;
}

.pc-mode .dealer-info img, .pc-mode .player-info img {
    width: 80px;
    height: 80px;
}

.pc-mode .player-chips img {
    width: 20px;
    height: 20px;
    margin-right: 5px;
}

.pc-mode .card {
    width: 70px;
    height: 100px;
    padding: 5px;
}
.pc-mode .card .rank { font-size: 24px; }
.pc-mode .card .suit { font-size: 20px; }

.pc-mode #community-cards {
    margin-top: -30px;
}

.pc-mode .controls button, .pc-mode .controls input {
    padding: 10px 20px;
    font-size: 16px;
}
.pc-mode #bet-amount { width: 70px; }

.pc-mode #game-log {
    padding: 15px;
    min-height: 80px;
    font-size: 0.9rem;
}

.pc-mode .chip-image {
    width: 20px;
    height: 20px;
}

/* ====================================
   スマホモード
   ==================================== */
.mobile-mode .game-container {
    width: 100%;
}

.mobile-mode h1 { font-size: 1.5rem; }

.mobile-mode .players-and-cards {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.mobile-mode .dealer-area, .mobile-mode .player-area {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.mobile-mode .dealer-info, .mobile-mode .player-info {
    flex-direction: row;
    gap: 10px;
}

.mobile-mode .dealer-info img, .mobile-mode .player-info img {
    width: 50px;
    height: 50px;
}

.mobile-mode .player-chips img {
    width: 15px;
    height: 15px;
    margin-right: 3px;
}

.mobile-mode .card {
    width: 45px;
    height: 65px;
    padding: 3px;
}
.mobile-mode .card .rank { font-size: 16px; }
.mobile-mode .card .suit { font-size: 14px; }

.mobile-mode .hand {
    gap: 5px;
}

.mobile-mode #community-cards {
    margin-top: 0;
}

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

.mobile-mode .controls button, .mobile-mode .controls input {
    width: 100%;
    padding: 8px;
    font-size: 0.9rem;
}
.mobile-mode #bet-amount { width: 100%; }

.mobile-mode #game-log {
    padding: 8px;
    min-height: 60px;
    font-size: 0.7rem;
}

.mobile-mode .chip-image {
    width: 15px;
    height: 15px;
}