/* Нормальный покерный стол */
.poker-table {
    min-height: 100vh;
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 50%, #0a0a0a 100%);
    display: none;
    flex-direction: column;
    padding: 20px;
}

.poker-table.active {
    display: flex;
}

.table-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(145deg, #1a1a1a, #2a2a2a);
    border: 2px solid #ffd700;
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 8px 32px rgba(255, 215, 0, 0.3);
}

.leave-btn {
    background: linear-gradient(45deg, #ef4444, #dc2626);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.leave-btn:hover {
    background: linear-gradient(45deg, #dc2626, #b91c1c);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(239, 68, 68, 0.4);
}

.table-info {
    text-align: center;
}

#table-name {
    font-size: 1.5rem;
    font-weight: 700;
    color: #ffd700;
    margin-bottom: 5px;
}

#blinds-info {
    color: #ffed4e;
    font-size: 1rem;
}

.pot-info {
    text-align: right;
}

.pot-label {
    color: #ffed4e;
    font-size: 0.9rem;
    margin-bottom: 5px;
    display: block;
}

#pot-amount {
    font-size: 1.5rem;
    font-weight: 700;
    color: #ffd700;
}

/* Покерный стол */
.table-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    position: relative;
}

.table-felt {
    width: 100%;
    max-width: 800px;
    aspect-ratio: 2/1;
    background: radial-gradient(ellipse at center, #1a4d3a 0%, #0d2818 70%, #051008 100%);
    border: 6px solid #ffd700;
    border-radius: 50%;
    position: relative;
    box-shadow: 
        0 0 50px rgba(255, 215, 0, 0.3),
        inset 0 0 100px rgba(0, 0, 0, 0.6);
}

.table-felt::before {
    content: '';
    position: absolute;
    top: 15%;
    left: 15%;
    right: 15%;
    bottom: 15%;
    border: 2px dashed rgba(255, 215, 0, 0.3);
    border-radius: 50%;
}

/* Места игроков */
.seats-container {
    position: absolute;
    width: 100%;
    height: 100%;
}

.seat {
    position: absolute;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.seat[data-seat="0"] {
    top: 10%;
    left: 50%;
    transform: translateX(-50%);
}

.seat[data-seat="1"] {
    top: 30%;
    right: 5%;
}

.seat[data-seat="2"] {
    bottom: 30%;
    right: 5%;
}

.seat[data-seat="3"] {
    bottom: 10%;
    left: 50%;
    transform: translateX(-50%);
}

.seat[data-seat="4"] {
    bottom: 30%;
    left: 5%;
}

.seat[data-seat="5"] {
    top: 30%;
    left: 5%;
}

.seat.active {
    animation: seatPulse 1.5s infinite;
}

@keyframes seatPulse {
    0%, 100% {
        filter: drop-shadow(0 0 15px #ffd700);
    }
    50% {
        filter: drop-shadow(0 0 25px #ffd700);
    }
}

.player-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: 3px dashed #666;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.2rem;
    color: #666;
    transition: all 0.3s ease;
}

.player-avatar:not(.empty) {
    border-style: solid;
    border-color: #ffd700;
    color: white;
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.3);
}

.player-avatar.empty {
    cursor: pointer;
}

.player-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: #ffd700;
    text-align: center;
    max-width: 80px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.player-chips {
    font-size: 0.8rem;
    font-weight: 600;
    color: #ffed4e;
    text-align: center;
}

.player-action {
    background: rgba(255, 215, 0, 0.9);
    color: #000;
    padding: 4px 8px;
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: 600;
    opacity: 0;
    transition: opacity 0.3s ease;
    min-width: 50px;
    text-align: center;
}

/* Общие карты */
.community-cards {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    gap: 15px;
}

.card {
    width: 60px;
    height: 84px;
    background: linear-gradient(145deg, #ffffff, #f0f0f0);
    border: 2px solid #ddd;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.card.empty {
    background: rgba(255, 215, 0, 0.1);
    border: 2px dashed rgba(255, 215, 0, 0.5);
    color: transparent;
}

.card.red {
    color: #dc2626;
}

.card.black {
    color: #000;
}

.card-rank {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 2px;
}

.card-suit {
    font-size: 1.2rem;
}

/* Карты игрока */
.player-cards {
    display: flex;
    gap: 10px;
    margin: 20px 0;
}

.player-cards .card {
    width: 70px;
    height: 98px;
    cursor: pointer;
}

.player-cards .card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

/* Кнопки действий */
.player-actions {
    display: flex;
    gap: 15px;
    padding: 20px;
    background: linear-gradient(145deg, #1a1a1a, #2a2a2a);
    border: 2px solid #ffd700;
    border-radius: 15px;
    box-shadow: 0 8px 32px rgba(255, 215, 0, 0.3);
    margin-top: 20px;
}

.action-btn {
    flex: 1;
    padding: 15px 20px;
    border: none;
    border-radius: 10px;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    min-width: 100px;
}

.fold-btn {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.3);
}

.fold-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, #dc2626, #b91c1c);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(239, 68, 68, 0.4);
}

.call-btn {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}

.call-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, #059669, #047857);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(16, 185, 129, 0.4);
}

.raise-btn {
    background: linear-gradient(135deg, #ffd700, #ffed4e);
    color: #000;
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.3);
}

.raise-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, #ffed4e, #f4c430);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 215, 0, 0.4);
}

.action-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
    filter: grayscale(50%);
}

/* Горшок в центре стола */
.pot-display {
    position: absolute;
    top: 70%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.8);
    border: 2px solid #ffd700;
    border-radius: 20px;
    padding: 10px 20px;
    text-align: center;
    backdrop-filter: blur(10px);
}

.pot-text {
    color: #ffd700;
    font-weight: 700;
    font-size: 1.1rem;
}

/* Анимации */
@keyframes dealCard {
    0% {
        transform: translateY(-100px) rotateY(180deg);
        opacity: 0;
    }
    50% {
        transform: translateY(-20px) rotateY(90deg);
        opacity: 0.5;
    }
    100% {
        transform: translateY(0) rotateY(0deg);
        opacity: 1;
    }
}

.card.deal-animation {
    animation: dealCard 0.8s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

/* Адаптивность */
@media (max-width: 768px) {
    .table-header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .table-felt {
        aspect-ratio: 1.5/1;
    }
    
    .player-actions {
        flex-direction: column;
        gap: 10px;
    }
    
    .community-cards {
        gap: 8px;
    }
    
    .card {
        width: 45px;
        height: 63px;
        font-size: 0.7rem;
    }
    
    .player-cards .card {
        width: 55px;
        height: 77px;
    }
    
    .player-avatar {
        width: 45px;
        height: 45px;
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .seat[data-seat="1"], .seat[data-seat="2"], 
    .seat[data-seat="4"], .seat[data-seat="5"] {
        display: none; /* Скрываем боковые места на очень маленьких экранах */
    }
    
    .community-cards {
        gap: 5px;
    }
    
    .card {
        width: 35px;
        height: 49px;
        font-size: 0.6rem;
    }
}
