* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #1a1d3a;
    color: #ffffff;
    min-height: 100vh;
    padding-bottom: 70px;
    overflow-x: hidden;
}

.app-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: linear-gradient(135deg, #2a2d4a 0%, #1e213a 100%);
    border-bottom: 2px solid #3d4070;
}

.user-info { display: flex; align-items: center; gap: 12px; }

.avatar-wrapper {
    position: relative;
    width: 55px; height: 55px;
    border-radius: 50%;
    border: 3px solid #7c3aed;
    overflow: hidden;
    background: #2e3160;
}

.avatar { width: 100%; height: 100%; object-fit: cover; display: none; }
.avatar-wrapper.has-photo .avatar { display: block; }
.avatar-wrapper.has-photo .avatar-placeholder { display: none; }

.avatar-placeholder {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    font-size: 28px; font-weight: bold;
    color: #7c3aed;
}

.user-details { display: flex; flex-direction: column; }
.nickname { font-size: 18px; font-weight: 700; color: #ffffff; letter-spacing: 1px; }
.status { font-size: 12px; color: #10b981; font-weight: 500; }

.balance-box {
    background: linear-gradient(135deg, #7c3aed 0%, #5b21b6 100%);
    border-radius: 16px;    padding: 10px 18px;
    text-align: center;
    border: 2px solid #8b5cf6;
}

.balance-label { font-size: 11px; color: #c4b5fd; display: block; }
.balance-value { font-size: 20px; font-weight: 800; color: #fbbf24; }

.page-title {
    font-size: 28px; font-weight: 800;
    color: #a78bfa;
    padding: 20px 20px 15px;
}

.main-layout {
    display: flex;
    gap: 15px;
    padding: 0 20px;
    align-items: stretch;
    flex-direction: row !important;
}

.top-container {
    flex: 1;
    max-width: 48%;
    background: linear-gradient(135deg, #2a2d5a 0%, #1e2145 100%);
    border-radius: 16px;
    padding: 15px;
    border: 2px solid #3d4080;
}

.top-title {
    font-size: 20px; font-weight: 800;
    color: #a78bfa;
    margin-bottom: 10px;
}

.top-list { display: flex; flex-direction: column; gap: 6px; }

.top-item {
    display: flex; align-items: center;
    padding: 8px 10px;
    background: rgba(30, 36, 86, 0.6);
    border-radius: 10px;
    border: 1px solid #3d4080;
    transition: all 0.2s;
}

.top-place {
    font-size: 16px; font-weight: 800;    color: #fbbf24;
    width: 28px; text-align: center;
    margin-right: 8px;
}

.top-item:nth-child(1) .top-place { color: #ffd700; }
.top-item:nth-child(2) .top-place { color: #c0c0c0; }
.top-item:nth-child(3) .top-place { color: #cd7f32; }

.top-name {
    flex: 1;
    font-size: 12px; font-weight: 600;
    color: #e0e7ff;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.top-score { font-size: 13px; font-weight: 800; color: #10b981; }

.menu-buttons-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
    justify-content: flex-start;
    max-width: 48%;
}

.menu-btn {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
    border: none;
    border-radius: 14px;
    padding: 16px 20px;
    color: #ffffff;
    font-size: 16px; font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3);
    width: 100%;
}

.menu-btn:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(139, 92, 246, 0.5); }
.menu-btn:active { transform: translateY(0); }

.games-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;    padding: 0 20px 20px;
}

.game-card {
    background: linear-gradient(135deg, #2a2d5a 0%, #1e2145 100%);
    border-radius: 16px;
    padding: 20px;
    text-align: center;
    border: 2px solid #3d4080;
    transition: all 0.2s;
}

.game-card:hover { border-color: #7c3aed; transform: translateY(-3px); }
.game-icon { font-size: 40px; margin-bottom: 10px; }
.game-card h3 { font-size: 16px; font-weight: 700; margin-bottom: 5px; color: #e0e7ff; }
.game-card p { font-size: 12px; color: #9ca3af; margin-bottom: 15px; }

.game-action-btn {
    background: linear-gradient(135deg, #7c3aed 0%, #6d28d9 100%);
    border: none;
    border-radius: 10px;
    padding: 10px 16px;
    color: #ffffff;
    font-size: 14px; font-weight: 600;
    cursor: pointer;
    width: 100%;
    transition: all 0.2s;
}

.catalog-grid { display: flex; flex-direction: column; gap: 12px; padding: 0 20px 20px; }

.catalog-item {
    display: flex; align-items: center; gap: 15px;
    background: linear-gradient(135deg, #2a2d5a 0%, #1e2145 100%);
    border-radius: 16px;
    padding: 15px;
    border: 2px solid #3d4080;
}

.catalog-icon { font-size: 30px; width: 50px; text-align: center; }
.catalog-info h4 { font-size: 16px; font-weight: 700; color: #e0e7ff; margin-bottom: 3px; }
.catalog-info p { font-size: 12px; color: #9ca3af; margin-bottom: 5px; }
.catalog-price { font-size: 16px; font-weight: 800; color: #fbbf24; }

.transfer-form { padding: 0 20px 20px; }

.form-group { margin-bottom: 15px; }
.form-group label {
    display: block;
    font-size: 14px; font-weight: 600;    color: #c4b5fd;
    margin-bottom: 6px;
}

.form-group input, .form-group select {
    width: 100%;
    padding: 14px 16px;
    background: #2a2d5a;
    border: 2px solid #3d4080;
    border-radius: 12px;
    color: #ffffff;
    font-size: 16px;
    outline: none;
    transition: all 0.2s;
}

.form-group input:focus, .form-group select:focus {
    border-color: #7c3aed;
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.2);
}

.action-btn {
    background: linear-gradient(135deg, #7c3aed 0%, #6d28d9 100%);
    border: none;
    border-radius: 14px;
    padding: 16px 24px;
    color: #ffffff;
    font-size: 16px; font-weight: 700;
    cursor: pointer;
    width: 100%;
    transition: all 0.2s;
    box-shadow: 0 4px 15px rgba(124, 58, 237, 0.3);
}

.action-btn:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(124, 58, 237, 0.5); }

.profile-card { text-align: center; padding: 30px 20px; }

.profile-avatar-wrapper {
    position: relative;
    width: 100px; height: 100px;
    border-radius: 50%;
    border: 4px solid #7c3aed;
    margin: 0 auto 15px;
    overflow: hidden;
    background: #2e3160;
}

.profile-avatar { width: 100%; height: 100%; object-fit: cover; display: none; }
.profile-avatar-wrapper.has-photo .profile-avatar { display: block; }.profile-avatar-wrapper.has-photo .avatar-placeholder-large { display: none; }

.avatar-placeholder-large {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    font-size: 48px; font-weight: bold;
    color: #7c3aed;
}

.profile-name { font-size: 24px; font-weight: 800; color: #ffffff; margin-bottom: 10px; }
.profile-balance { font-size: 28px; font-weight: 800; color: #fbbf24; margin-bottom: 25px; }

.profile-stats { display: flex; flex-direction: column; gap: 12px; }

.stat-item {
    display: flex; justify-content: space-between; align-items: center;
    background: linear-gradient(135deg, #2a2d5a 0%, #1e2145 100%);
    border-radius: 14px;
    padding: 14px 20px;
    border: 2px solid #3d4080;
}

.stat-label { font-size: 15px; color: #c4b5fd; font-weight: 500; }
.stat-value { font-size: 18px; font-weight: 800; color: #ffffff; }

.bottom-nav {
    position: fixed;
    bottom: 0; left: 0; right: 0;
    display: flex;
    justify-content: space-around;
    background: linear-gradient(135deg, #2a2d4a 0%, #1e213a 100%);
    border-top: 2px solid #3d4070;
    padding: 10px 0;
    z-index: 100;
}

.bottom-nav.hidden { display: none; }

.nav-btn {
    background: none; border: none;
    color: #9ca3af;
    font-size: 10px; font-weight: 600;
    cursor: pointer;
    display: flex; flex-direction: column;
    align-items: center; gap: 3px;
    padding: 5px 10px;
    transition: all 0.2s;
}
.nav-btn span { font-size: 10px; }
.nav-btn.active { color: #a78bfa; }

.tab-content { display: none; }
.tab-content.active { display: block; }

.game-section { display: none; padding: 20px; }
.game-section.active { display: block; }

.game-header { display: flex; align-items: center; gap: 15px; margin-bottom: 20px; }

.back-btn {
    background: linear-gradient(135deg, #2a2d5a 0%, #1e2145 100%);
    border: 2px solid #3d4080;
    border-radius: 12px;
    padding: 10px 18px;
    color: #ffffff;
    font-size: 16px; font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.back-btn:hover { border-color: #7c3aed; }
.game-header h2 { font-size: 24px; font-weight: 800; color: #a78bfa; }

.bj-table {
    background: linear-gradient(135deg, #2a2d5a 0%, #1e2145 100%);
    border-radius: 20px;
    padding: 25px;
    margin-bottom: 20px;
    border: 2px solid #3d4080;
}

.hand-area { text-align: center; margin-bottom: 20px; }
.hand-label { font-size: 16px; font-weight: 700; color: #c4b5fd; margin-bottom: 10px; }

.cards-row {
    display: flex; justify-content: center; gap: 8px;
    min-height: 80px; flex-wrap: wrap;
}

.card {
    background: #ffffff;
    border-radius: 10px;
    padding: 12px 16px;
    font-size: 20px; font-weight: 700;
    min-width: 50px; text-align: center;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}
.card.red { color: #ef4444; }
.card.black { color: #1f2937; }
.card.hidden { background: #7c3aed; color: #ffffff; }

.game-controls { display: flex; flex-direction: column; gap: 12px; margin-bottom: 15px; }
#play-controls { flex-direction: row; }
.hit-btn { background: linear-gradient(135deg, #10b981 0%, #059669 100%); }
.stand-btn { background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%); }

.game-message {
    text-align: center;
    padding: 15px;
    border-radius: 12px;
    font-size: 16px; font-weight: 700;
    min-height: 50px;
}

.game-message.win { background: rgba(16, 185, 129, 0.2); color: #10b981; border: 2px solid #10b981; }
.game-message.lose { background: rgba(239, 68, 68, 0.2); color: #ef4444; border: 2px solid #ef4444; }
.game-message.draw { background: rgba(251, 191, 36, 0.2); color: #fbbf24; border: 2px solid #fbbf24; }

.slots-machine { display: flex; justify-content: center; gap: 15px; margin: 25px 0; }

.reel {
    background: linear-gradient(135deg, #2a2d5a 0%, #1e2145 100%);
    border: 3px solid #7c3aed;
    border-radius: 16px;
    width: 80px; height: 100px;
    display: flex; align-items: center; justify-content: center;
    font-size: 40px;
    box-shadow: 0 4px 15px rgba(124, 58, 237, 0.3);
}

.roulette-display {
    display: flex; justify-content: center; align-items: center;
    margin: 20px 0 30px;
}

.roulette-number {
    width: 180px; height: 180px;
    border-radius: 50%;
    background: linear-gradient(135deg, #7c3aed 0%, #5b21b6 100%);
    border: 4px solid #8b5cf6;
    display: flex; align-items: center; justify-content: center;
    font-size: 72px; font-weight: 800;
    color: #fbbf24;
    box-shadow: 0 8px 30px rgba(124, 58, 237, 0.5);
    transition: all 0.1s;
}
.roulette-number.spinning { animation: pulse 0.1s ease-in-out infinite; }

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.roulette-number.red { background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%); border-color: #f87171; }
.roulette-number.black { background: linear-gradient(135deg, #374151 0%, #1f2937 100%); border-color: #6b7280; }
.roulette-number.green { background: linear-gradient(135deg, #10b981 0%, #059669 100%); border-color: #34d399; }

.bet-buttons-row { display: flex; gap: 10px; margin: 15px 0; }

.bet-btn {
    flex: 1;
    padding: 16px 10px;
    border: none;
    border-radius: 14px;
    font-size: 14px; font-weight: 700;
    color: #ffffff;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
    line-height: 1.3;
}

.bet-btn:hover { transform: translateY(-2px); }
.bet-btn:active { transform: translateY(0); }
.bet-btn.red { background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%); }
.bet-btn.black { background: linear-gradient(135deg, #374151 0%, #1f2937 100%); }
.bet-btn.green { background: linear-gradient(135deg, #10b981 0%, #059669 100%); }

.poker-table {
    background: linear-gradient(135deg, #2a2d5a 0%, #1e2145 100%);
    border-radius: 20px;
    padding: 25px;
    margin: 20px 0;
    text-align: center;
    border: 2px solid #3d4080;
}

.community-cards { display: flex; justify-content: center; gap: 8px; margin: 15px 0; min-height: 80px; }
.pot-info { font-size: 20px; font-weight: 800; color: #fbbf24; margin: 15px 0; }
.player-hand { display: flex; justify-content: center; gap: 8px; margin: 15px 0; }
.poker-controls { display: flex; gap: 10px; justify-content: center; margin-top: 15px; }

@media (max-width: 768px) {
    .main-layout { flex-direction: column; }
    .top-container { max-width: 100%; }
    .menu-buttons-container { width: 100%; max-width: 100%; }}
/* === ПОКЕРНЫЙ СТОЛ === */
.poker-game-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 10px;
    max-width: 100%;
}

/* Оппоненты сверху */
.opponents-top {
    display: flex;
    justify-content: space-around;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 10px;
}

.opponent-seat {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: linear-gradient(135deg, #2a2d5a, #1e2145);
    border: 2px solid #3d4080;
    border-radius: 12px;
    padding: 8px;
    min-width: 70px;
    flex: 1;
    max-width: 100px;
}

.player-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #7c3aed, #5b21b6);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: bold;
    border: 2px solid #8b5cf6;
    margin-bottom: 4px;
}

.player-nick {
    font-size: 11px;
    font-weight: 600;
    color: #e0e7ff;
    text-align: center;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.player-action {
    font-size: 10px;
    color: #fbbf24;
    margin-top: 2px;
    min-height: 14px;
}

/* Игровой стол */
.poker-table-area {
    background: linear-gradient(135deg, #1e5128, #2d7a3e);
    border: 3px solid #4a7c59;
    border-radius: 20px;
    padding: 15px;
    text-align: center;
    box-shadow: 0 8px 32px rgba(0,0,0,0.4);
}

.pot-display {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.pot-label {
    font-size: 14px;
    font-weight: 600;
    color: #d4e4c9;
}

.pot-amount {
    font-size: 20px;
    font-weight: 800;
    color: #fbbf24;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.current-bet-display {
    font-size: 13px;
    color: #fff;
    margin-bottom: 10px;
    background: rgba(0,0,0,0.3);
    padding: 4px 12px;    border-radius: 12px;
    display: inline-block;
}

.current-bet-display span {
    font-weight: 700;
    color: #fbbf24;
}

.community-cards {
    display: flex;
    justify-content: center;
    gap: 6px;
    flex-wrap: wrap;
}

.card-placeholder {
    width: 40px;
    height: 56px;
    background: rgba(255,255,255,0.9);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

/* Карты игрока */
.my-cards-area {
    text-align: center;
    padding: 10px;
}

.cards-label {
    font-size: 14px;
    font-weight: 600;
    color: #c4b5fd;
    margin-bottom: 8px;
}

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

.my-cards .card {
    width: 50px;
    height: 70px;
    background: linear-gradient(135deg, #7c3aed, #5b21b6);
    border: 2px solid #8b5cf6;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    box-shadow: 0 4px 12px rgba(124,58,237,0.4);
}

.my-cards .card.revealed {
    background: #ffffff;
    border-color: #3d4080;
}

/* Панель управления */
.poker-controls-area { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    gap: 5px; 
    padding: 8px; 
    background: linear-gradient(135deg, #2a2d5a, #1e2145); 
    border-radius: 16px; 
    border: 2px solid #3d4080;
    flex-wrap: wrap;
}

.control-left, .control-right { 
    flex: 1; 
    display: flex; 
    gap: 5px; 
    justify-content: center;
    min-width: 0;
}

.control-center { 
    display: flex; 
    flex-direction: column; 
    align-items: center; 
    padding: 0 5px;
    flex-shrink: 0;
}

.my-avatar-small { 
    width: 40px; 
    height: 40px; 
    border-radius: 50%; 
    background: linear-gradient(135deg, #7c3aed, #5b21b6); 
    border: 3px solid #8b5cf6; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    font-size: 18px; 
    font-weight: bold; 
    margin-bottom: 2px;
}

.my-nick-small { 
    font-size: 10px; 
    font-weight: 600; 
    color: #e0e7ff;
}

.control-btn { 
    padding: 10px 12px; 
    border: none; 
    border-radius: 10px; 
    font-size: 12px; 
    font-weight: 700; 
    cursor: pointer; 
    transition: all 0.2s; 
    white-space: nowrap;
    flex: 1;
    max-width: 100px;
}

.raise-btn { background: linear-gradient(135deg, #f59e0b, #d97706); color: #fff; }
.call-btn { background: linear-gradient(135deg, #10b981, #059669); color: #fff; }
.fold-btn { background: linear-gradient(135deg, #ef4444, #dc2626); color: #fff; }

/* Модальное окно */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    backdrop-filter: blur(4px);
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: linear-gradient(135deg, #2a2d5a, #1e2145);
    border: 2px solid #3d4080;
    border-radius: 20px;
    width: 90%;
    max-width: 350px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 2px solid #3d4080;
}

.modal-header h3 {
    font-size: 18px;
    font-weight: 700;
    color: #fbbf24;
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    color: #9ca3af;
    font-size: 28px;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    color: #ef4444;
}

.modal-body {
    padding: 20px;
}

.raise-amount-display {
    font-size: 14px;
    color: #c4b5fd;
    margin-bottom: 15px;
    text-align: center;
}

.raise-amount-display span {
    font-weight: 700;
    color: #fbbf24;
}

.raise-input-group {
    margin-bottom: 15px;
}

.raise-input-group label {
    display: block;
    font-size: 13px;
    color: #c4b5fd;
    margin-bottom: 8px;
    font-weight: 600;
}

.raise-input-group input {
    width: 100%;
    padding: 12px;
    background: #1e2145;
    border: 2px solid #3d4080;
    border-radius: 10px;
    color: #fff;
    font-size: 18px;    font-weight: 700;
    text-align: center;
}

.raise-input-group input:focus {
    border-color: #7c3aed;
    outline: none;
}

.quick-raises {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin-bottom: 15px;
}

.quick-btn {
    padding: 10px;
    background: linear-gradient(135deg, #7c3aed, #5b21b6);
    border: none;
    border-radius: 8px;
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
}

.quick-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(124,58,237,0.4);
}

.total-raise-display {
    font-size: 16px;
    color: #fff;
    text-align: center;
    padding: 12px;
    background: rgba(124,58,237,0.2);
    border-radius: 10px;
    border: 2px solid #7c3aed;
}

.total-raise-display span {
    font-weight: 800;
    color: #fbbf24;
    font-size: 20px;
}

.modal-footer {    display: flex;
    gap: 10px;
    padding: 15px 20px;
    border-top: 2px solid #3d4080;
}

.modal-btn {
    flex: 1;
    padding: 14px;
    border: none;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
}

.cancel-btn {
    background: linear-gradient(135deg, #4b5563, #374151);
    color: #fff;
}

.confirm-btn {
    background: linear-gradient(135deg, #10b981, #059669);
    color: #fff;
}

.modal-btn:hover {
    transform: translateY(-2px);
}

/* Адаптация для маленьких экранов */
@media (max-width: 400px) {
    .opponent-seat {
        min-width: 60px;
        padding: 6px;
    }
    
    .player-avatar {
        width: 35px;
        height: 35px;
        font-size: 16px;
    }
    
    .player-nick {
        font-size: 10px;
    }
    
    .control-btn {
        padding: 10px 12px;
        font-size: 12px;
    }
    
    .my-cards .card {
        width: 45px;
        height: 63px;
    }
    }
/* === ПОКЕРНЫЙ СТОЛ === */
.poker-game-container { display: flex; flex-direction: column; gap: 10px; padding: 10px; }
.opponents-top { display: flex; justify-content: space-around; align-items: flex-start; gap: 10px; margin-bottom: 10px; }
.opponent-seat { display: flex; flex-direction: column; align-items: center; background: linear-gradient(135deg, #2a2d5a, #1e2145); border: 2px solid #3d4080; border-radius: 12px; padding: 8px; min-width: 70px; flex: 1; max-width: 100px; }
.player-avatar { width: 40px; height: 40px; border-radius: 50%; background: linear-gradient(135deg, #7c3aed, #5b21b6); display: flex; align-items: center; justify-content: center; font-size: 20px; font-weight: bold; border: 2px solid #8b5cf6; margin-bottom: 4px; }
.player-nick { font-size: 11px; font-weight: 600; color: #e0e7ff; text-align: center; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.player-action { font-size: 10px; color: #fbbf24; margin-top: 2px; min-height: 14px; }
.poker-table-area { background: linear-gradient(135deg, #1e5128, #2d7a3e); border: 3px solid #4a7c59; border-radius: 20px; padding: 15px; text-align: center; box-shadow: 0 8px 32px rgba(0,0,0,0.4); }
.pot-display { display: flex; justify-content: center; align-items: center; gap: 10px; margin-bottom: 8px; }
.pot-label { font-size: 14px; font-weight: 600; color: #d4e4c9; }
.pot-amount { font-size: 20px; font-weight: 800; color: #fbbf24; text-shadow: 0 2px 4px rgba(0,0,0,0.3); }
.current-bet-display { font-size: 13px; color: #fff; margin-bottom: 10px; background: rgba(0,0,0,0.3); padding: 4px 12px; border-radius: 12px; display: inline-block; }
.current-bet-display span { font-weight: 700; color: #fbbf24; }
.card-placeholder { width: 40px; height: 56px; background: rgba(255,255,255,0.9); border-radius: 6px; display: flex; align-items: center; justify-content: center; font-size: 24px; box-shadow: 0 2px 8px rgba(0,0,0,0.2); }
.my-cards-area { text-align: center; padding: 10px; }
.cards-label { font-size: 14px; font-weight: 600; color: #c4b5fd; margin-bottom: 8px; }
.my-cards { display: flex; justify-content: center; gap: 10px; }
.my-cards .card { width: 50px; height: 70px; background: linear-gradient(135deg, #7c3aed, #5b21b6); border: 2px solid #8b5cf6; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 28px; box-shadow: 0 4px 12px rgba(124,58,237,0.4); }
.my-cards .card.revealed { background: #ffffff; border-color: #3d4080; color: #000; }
.poker-controls-area { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px; background: linear-gradient(135deg, #2a2d5a, #1e2145); border-radius: 16px; border: 2px solid #3d4080; }
.control-left, .control-right { flex: 1; display: flex; gap: 8px; justify-content: center; }
.control-center { display: flex; flex-direction: column; align-items: center; padding: 0 15px; }
.my-avatar-small { width: 45px; height: 45px; border-radius: 50%; background: linear-gradient(135deg, #7c3aed, #5b21b6); border: 3px solid #8b5cf6; display: flex; align-items: center; justify-content: center; font-size: 22px; font-weight: bold; margin-bottom: 4px; }
.my-nick-small { font-size: 12px; font-weight: 600; color: #e0e7ff; }
.control-btn { padding: 12px 16px; border: none; border-radius: 10px; font-size: 13px; font-weight: 700; cursor: pointer; transition: all 0.2s; white-space: nowrap; }
.raise-btn { background: linear-gradient(135deg, #f59e0b, #d97706); color: #fff; }
.call-btn { background: linear-gradient(135deg, #10b981, #059669); color: #fff; }
.fold-btn { background: linear-gradient(135deg, #ef4444, #dc2626); color: #fff; }
.modal { display: none; position: fixed; z-index: 1000; left: 0; top: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.7); backdrop-filter: blur(4px); }
.modal.active { display: flex; align-items: center; justify-content: center; }
.modal-content { background: linear-gradient(135deg, #2a2d5a, #1e2145); border: 2px solid #3d4080; border-radius: 20px; width: 90%; max-width: 350px; }
.modal-header { display: flex; justify-content: space-between; align-items: center; padding: 15px 20px; border-bottom: 2px solid #3d4080; }
.modal-header h3 { font-size: 18px; font-weight: 700; color: #fbbf24; margin: 0; }
.modal-close { background: none; border: none; color: #9ca3af; font-size: 28px; cursor: pointer; }
.modal-body { padding: 20px; }
.raise-amount-display { font-size: 14px; color: #c4b5fd; margin-bottom: 15px; text-align: center; }
.raise-amount-display span { font-weight: 700; color: #fbbf24; }
.raise-input-group { margin-bottom: 15px; }
.raise-input-group label { display: block; font-size: 13px; color: #c4b5fd; margin-bottom: 8px; font-weight: 600; }
.raise-input-group input { width: 100%; padding: 12px; background: #1e2145; border: 2px solid #3d4080; border-radius: 10px; color: #fff; font-size: 18px; font-weight: 700; text-align: center; }
.quick-raises { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 15px; }
.quick-btn { padding: 10px; background: linear-gradient(135deg, #7c3aed, #5b21b6); border: none; border-radius: 8px; color: #fff; font-size: 13px; font-weight: 700; cursor: pointer; }
.total-raise-display { font-size: 16px; color: #fff; text-align: center; padding: 12px; background: rgba(124,58,237,0.2); border-radius: 10px; border: 2px solid #7c3aed; }
.total-raise-display span { font-weight: 800; color: #fbbf24; font-size: 20px; }
.modal-footer { display: flex; gap: 10px; padding: 15px 20px; border-top: 2px solid #3d4080; }
.modal-btn { flex: 1; padding: 14px; border: none; border-radius: 12px; font-size: 15px; font-weight: 700; cursor: pointer; }
.cancel-btn { background: linear-gradient(135deg, #4b5563, #374151); color: #fff; }
.confirm-btn { background: linear-gradient(135deg, #10b981, #059669); color: #fff; }

/* ── Покер: финальный экран ── */
.poker-result-overlay {
    position: absolute; inset: 0;
    background: rgba(10,10,30,0.92);
    display: flex; align-items: center; justify-content: center;
    z-index: 100; border-radius: 16px;
}
.poker-result-box {
    background: linear-gradient(135deg,#1e2145,#2a2d5a);
    border: 2px solid #7c3aed;
    border-radius: 16px; padding: 24px 20px;
    max-width: 340px; width: 90%; text-align: center;
}
.result-title   { font-size: 22px; font-weight: 700; color: #fff; margin-bottom: 8px; }
.result-pot     { font-size: 18px; color: #fbbf24; margin-bottom: 12px; }
.result-community { display: flex; justify-content: center; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.result-winner  { font-size: 17px; color: #4ade80; font-weight: 700; margin-bottom: 4px; }
.result-combo   { font-size: 13px; color: #c4b5fd; margin-bottom: 14px; }
.result-showdown { text-align: left; margin-bottom: 16px; }
.showdown-player {
    display: flex; align-items: center; gap: 6px;
    padding: 6px 0; font-size: 13px; color: #e2e8f0;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}
.showdown-player.winner { color: #fbbf24; font-weight: 700; }
.showdown-player .card  { width: 30px; height: 42px; font-size: 13px; border-radius: 5px; }

/* ── Карты: исправленный вид ── */
.card {
    display: inline-flex; align-items: center; justify-content: center;
    width: 40px; height: 56px;
    background: #fff; border-radius: 7px;
    font-size: 15px; font-weight: 700; line-height: 1;
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
    border: 1px solid #ddd;
}
.card.red    { color: #ef4444; background: #fff; }
.card.black  { color: #1f2937; background: #fff; }
.card.hidden { background: linear-gradient(135deg,#7c3aed,#5b21b6); color: #fff; border-color: #8b5cf6; }
.my-cards .card { width: 52px; height: 72px; font-size: 18px; }

/* ── Действие соперника ── */
.player-action { font-size: 11px; color: #fbbf24; margin-top: 3px; min-height: 15px; text-align: center; }

/* ── Лобби покерных столов ── */
.poker-table-item {
    display: flex; align-items: center; justify-content: space-between;
    padding: 12px 14px; margin-bottom: 8px;
    background: rgba(255,255,255,0.05); border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.08);
}
.poker-table-info { display: flex; gap: 14px; font-size: 14px; }
.poker-table-bet { color: #fbbf24; font-weight: 600; }
.poker-table-players { color: #94a3b8; }
