/* Base styles */
body {
    font-family: 'Arial', sans-serif;
    background-color: #f0f8ff;
    color: #333;
    margin: 0;
    padding: 20px;
}

.game-container {
    max-width: 900px;
    margin: 0 auto;
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    padding: 20px;
    position: relative;
}

.game-title {
    text-align: center;
    color: #2980b9;
    margin-bottom: 20px;
}

/* Game areas */
.opponent-area,
.player-area {
    background-color: #e8f4fc;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
    position: relative;
    min-height: 150px;
}

.opponent-area {
    border: 2px solid #7fb3d5;
}

.player-area {
    border: 2px solid #82e0aa;
}

.computer-avatar,
.player-avatar {
    width: 100px;
    height: 100px;
    position: absolute;
    right: 20px;
    top: 15px;
    transition: transform 0.3s ease;
}

/* Card styles */
.cards-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 10px;
    min-height: 120px;
    margin-right: 120px;
    /* Space for avatar */
}

.card {
    width: 70px;
    height: 100px;
    background-color: white;
    border-radius: 5px;
    border: 1px solid #ddd;
    box-shadow: 1px 1px 3px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 5px;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    position: relative;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 2px 4px 5px rgba(0, 0, 0, 0.2);
}

.card.selected {
    border: 2px solid #3498db;
    transform: translateY(-10px);
}

.card.red {
    color: #e74c3c;
}

.card.black {
    color: #333;
}

.card-rank {
    font-size: 20px;
    font-weight: bold;
    text-align: center;
}

.card-suit {
    font-size: 16px;
}

.card-suit.top {
    align-self: flex-start;
}

.card-suit.bottom {
    align-self: flex-end;
}

.computer-card {
    width: 70px;
    height: 100px;
    background: linear-gradient(135deg, #3498db, #2980b9);
    border-radius: 5px;
    box-shadow: 1px 1px 3px rgba(0, 0, 0, 0.2);
    position: relative;
    margin-right: 10px;
    display: inline-block;
}

.computer-card::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 50px;
    height: 80px;
    background: linear-gradient(135deg, #2980b9, #3498db);
    border-radius: 3px;
}

/* Pairs display */
.pairs-container {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 10px;
}

.pair {
    width: 40px;
    height: 40px;
    background-color: #2ecc71;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 16px;
    box-shadow: 0 2px 3px rgba(0, 0, 0, 0.1);
}

/* Deck area */
.deck-area {
    display: flex;
    justify-content: space-between;
    margin: 15px 0;
}

.deck {
    width: 80px;
    height: 110px;
    background: linear-gradient(135deg, #3498db, #2980b9);
    border-radius: 5px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: hidden;
}

.deck::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 90px;
    background: linear-gradient(135deg, #2980b9, #3498db);
    border-radius: 3px;
}

.deck-count {
    position: absolute;
    bottom: 5px;
    left: 0;
    right: 0;
    text-align: center;
    color: white;
    font-size: 12px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* Log container */
.log-container {
    flex: 1;
    height: 110px;
    overflow-y: auto;
    margin-left: 15px;
    background-color: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 5px;
    padding: 10px;
}

.log-entry {
    margin-bottom: 5px;
    padding: 3px 0;
    border-bottom: 1px solid #eee;
    font-size: 14px;
}

/* Game controls */
.game-controls {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 20px;
    position: relative;
    /* For bluff timer positioning */
}

button {
    padding: 10px 20px;
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    transition: background-color 0.2s;
}

button:hover {
    background-color: #2980b9;
}

button:disabled {
    background-color: #95a5a6;
    cursor: not-allowed;
}

/* Final showdown mode */
.final-showdown {
    background-color: #ffe0b2;
    border-color: #ff9800;
    animation: pulse 2s infinite;
}

@keyframes pulse {

    0%,
    100% {
        box-shadow: 0 0 0 rgba(255, 152, 0, 0.4);
    }

    50% {
        box-shadow: 0 0 20px rgba(255, 152, 0, 0.8);
    }
}

@keyframes flicker {
    0% {
        height: 20px;
        opacity: 0.8;
    }

    100% {
        height: 30px;
        opacity: 1;
    }
}

.flame-container {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 30px;
    overflow: hidden;
    z-index: 1;
}

.flame {
    position: absolute;
    bottom: 0;
    width: 10px;
    height: 30px;
    background: linear-gradient(to top, #ff9800, #f44336, transparent);
    border-radius: 50% 50% 0 0;
    transform-origin: center bottom;
    animation: flicker 0.5s infinite alternate;
}

@keyframes pulse {

    0%,
    100% {
        box-shadow: 0 0 0 rgba(255, 152, 0, 0.4);
    }

    50% {
        box-shadow: 0 0 20px rgba(255, 152, 0, 0.8);
    }
}

@keyframes flicker {
    0% {
        height: 20px;
        opacity: 0.8;
    }

    100% {
        height: 30px;
        opacity: 1;
    }
}

*/

/* Bluff timer */
.bluff-timer {
    height: 5px;
    background-color: #e74c3c;
    position: absolute;
    bottom: -10px;
    left: 0;
    border-radius: 2px;
}

/* Eye twitch animation */
@keyframes eye-twitch {

    0%,
    100% {
        transform: translateX(0);
    }

    10%,
    30%,
    50% {
        transform: translateX(1px);
    }

    20%,
    40% {
        transform: translateX(-1px);
    }
}

.suspicious {
    color: #e74c3c;
    font-weight: bold;
}

/* Responsive design for smaller screens */
@media (max-width: 768px) {
    .game-container {
        padding: 10px;
    }

    .computer-avatar,
    .player-avatar {
        width: 80px;
        height: 80px;
        right: 10px;
    }

    .cards-container {
        margin-right: 90px;
    }

    .card {
        width: 60px;
        height: 85px;
    }

    .computer-card {
        width: 60px;
        height: 85px;
    }

    .game-controls {
        flex-wrap: wrap;
    }
}

#debug-toggle-button {
    background-color: #e67e22;
}

#debug-toggle-button.active {
    background-color: #27ae60;
}
.game-title-block {
  text-align: center;
  margin-bottom: 20px;
}

.game-title {
  font-size: 2.5em;
  margin: 0;
  color: #2980b9;
}

.game-subtitle {
  font-size: 1.2em;
  color: #666;
  margin-top: 5px;
}