/* Общие стили */
body {
    font-family: 'Roboto', sans-serif;
    margin: 0;
    padding: 0;
    background-image: url('background.jpg'); /* Путь к изображению в той же папке */
    background-size: cover; /* Картинка будет растягиваться, чтобы покрыть весь экран */
    background-position: center center; /* Центрирует картинку */
    color: #fff;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}


.hidden {
    display: none;
}

.game-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
}

/* Главный экран */
.main-screen {
    text-align: center;
    animation: fadeIn 1s ease-out;
}

.main-screen h1 {
    font-size: 4em;
    margin-bottom: 30px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
    background: linear-gradient(to right, #ffd700, #f8b500);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

#start-game {
    background: linear-gradient(to bottom, #ffd700, #f8b500);
    color: #333;
    font-size: 1.5em;
    padding: 15px 40px;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    text-transform: uppercase;
    letter-spacing: 2px;
}

#start-game:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 8px rgba(0,0,0,0.15);
    background: linear-gradient(to bottom, #f8b500, #ffd700);
}

/* Игровой экран */
.game-screen {
    background: rgba(255,255,255,0.1);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
    animation: slideIn 0.5s ease-out;
    backdrop-filter: blur(10px);
}

.table-container {
    display: grid;
    grid-template-areas:
        "bot bot bot"
        "cards cards deck"
        "player player player";
    gap: 20px;
}

.card-table {
    grid-area: cards;
    background: radial-gradient(ellipse at center, #1a5c38 0%, #0a3d24 100%);
    border: 20px solid #8B4513;
    border-radius: 200px;
    padding: 40px;
    box-shadow: inset 0 0 50px rgba(0,0,0,0.5), 0 10px 20px rgba(0,0,0,0.3);
    position: relative;
    overflow: hidden;
}

.card-table::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0) 70%);
    animation: tableShin 10s linear infinite;
}

.bot-area, .player-area {
    grid-area: bot;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.bot-area:hover, .player-area:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 8px rgba(0,0,0,0.2);
}

.player-area {
    grid-area: player;
}

.deck-area {
    grid-area: deck;
    display: flex;
    justify-content: center;
    align-items: center;
}

.cards {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.card {
    width: 80px;
    height: 120px;
    border-radius: 10px;
    background: linear-gradient(135deg, #fff, #f0f0f0);
    border: 2px solid #ddd;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    color: #000;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.5em;
    font-family: 'Times New Roman', serif;
    position: relative;
    overflow: hidden;
    transition: transform 0.5s;
    transform-style: preserve-3d;
    animation: flipIn 0.5s ease-out;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.5) 0%, rgba(255,255,255,0) 50%);
    pointer-events: none;
}

.card:hover {
    transform: translateY(-5px) rotateY(10deg);
}

.card[data-suit="♠"], .card[data-suit="♣"] {
    color: black;
}

.card[data-suit="♥"], .card[data-suit="♦"] {
    color: red;
}

.card.flipped {
    transform: rotateY(180deg);
}

.player-actions button {
    padding: 10px 20px;
    background: linear-gradient(to bottom, #ffd700, #f8b500);
    border: none;
    color: #333;
    cursor: pointer;
    border-radius: 50px;
    font-size: 1em;
    margin: 5px;
    transition: all 0.3s ease;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.2);
}

.player-actions button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 8px rgba(0,0,0,0.3);
    background: linear-gradient(to bottom, #f8b500, #ffd700);
}

.player-actions button:active {
    transform: translateY(1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.pot {
    font-size: 1.2em;
    color: #ffd700;
    text-align: center;
    margin-top: 20px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

#bot-action, #player-action {
    font-size: 1.2em;
    margin-top: 20px;
    text-align: center;
    animation: fadeIn 0.5s ease-out;
}

#total-pot {
    font-size: 1.5em;
    color: #ffd700;
    text-shadow: 0 0 10px rgba(255,215,0,0.5);
}

.deck {
    width: 80px;
    height: 120px;
    background: linear-gradient(135deg, #b22222, #8b0000);
    border: 2px solid #800000;
    border-radius: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 2em;
    color: #fff;
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.deck:hover {
    transform: translateY(-5px) rotateY(10deg);
    box-shadow: 0 6px 12px rgba(0,0,0,0.4);
}

.deck::after {
    content: '♠♥♦♣';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 1.5em;
    opacity: 0.2;
    color: #fff;
}

.round-display {
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 1.2em;
    color: #ffd700;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
    background: rgba(0,0,0,0.5);
    padding: 5px 15px;
    border-radius: 20px;
    animation: fadeIn 0.5s ease-out;
}

.bot-speech-bubble { position: absolute; background: #fff; border-radius: .4em; padding: 15px; color: #333; top: -20%; left: 75%; transform: translateX(-50%); animation: popIn 0.3s ease-out; }

.bot-speech-bubble:after { content: ''; position: absolute; top: 117%; left: 50%; width: 0; height: 0; border: 20px solid transparent; transform: translateX(-50%) scaleY(-1); border-bottom-color: #fff; border-top: 0; margin-left: -120px; margin-top: -20px; }


/* Анимации */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideIn {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

@keyframes flipIn {
    from { transform: rotateY(90deg); opacity: 0; }
    to { transform: rotateY(0); opacity: 1; }
}

@keyframes popIn {
    from { transform: translateX(-50%) scale(0.8); opacity: 0; }
    to { transform: translateX(-50%) scale(1); opacity: 1; }
}

@keyframes fadeOutUp {
    from { opacity: 1; transform: translate(-50%, -50%); }
    to { opacity: 0; transform: translate(-50%, -100%); }
}

@keyframes shake {
    0% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    50% { transform: translateX(5px); }
    75% { transform: translateX(-5px); }
    100% { transform: translateX(0); }
}

@keyframes gradientBG {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes tableShin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Popup styles */
.popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: linear-gradient(135deg, #fff, #f0f0f0);
    border: 2px solid #ddd;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    z-index: 1000;
    text-align: center;
    animation: popIn 0.5s ease-out;
}

.popup h2 {
    color: #2c6e49;
    text-shadow: 0 1px 0 rgba(255,255,255,0.5);
    margin-bottom: 20px;
    font-size: 2em;
}

.popup p {
    color: #666;
    margin-bottom: 30px;
    font-size: 1.2em;
}

.popup button {
    background: linear-gradient(to bottom, #2c6e49, #1a5c38);
    color: #fff;
    border: none;
    padding: 15px 30px;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 1.1em;
    box-shadow: 0 4px 6px rgba(0,0,0,0.2);
}

.popup button:hover {
    background: linear-gradient(to bottom, #3a7a5a, #2c6e49);
    transform: translateY(-2px);
    box-shadow: 0 6px 8px rgba(0,0,0,0.3);
}

.copyright {
    position: fixed;
    bottom: 10px;
    right: 10px;
    font-size: 0.8em;
    color: rgba(255,255,255,0.5);
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}



.chip {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ffd700, #f8b500);
    display: inline-flex;
    justify-content: center;
    align-items: center;
    font-weight: bold;
    color: #333;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    margin: 0 5px;
    animation: chipSpin 2s linear infinite;
}

/* Card flip animation */
@keyframes flipCard {
    0% { transform: rotateY(0deg); }
    100% { transform: rotateY(180deg); }
}

.card.flipping {
    animation: flipCard 0.5s ease-out;
}

/* Winning animation */
@keyframes winningGlow {
    0% { box-shadow: 0 0 5px #ffd700; }
    50% { box-shadow: 0 0 20px #ffd700; }
    100% { box-shadow: 0 0 5px #ffd700; }
}

.winning-hand {
    animation: winningGlow 2s infinite;
}

/* Chip toss animation */
@keyframes chipToss {
    0% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-50px) rotate(180deg); }
    100% { transform: translateY(0) rotate(360deg); }
}

.tossing-chip {
    animation: chipToss 1s ease-in-out;
}

/* Card dealing animation */
@keyframes dealCard {
    0% { transform: translateX(100%) rotate(90deg); opacity: 0; }
    100% { transform: translateX(0) rotate(0deg); opacity: 1; }
}

.dealing {
    animation: dealCard 0.5s ease-out;
}

