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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #1a1a1a;
    color: #e0e0e0;
    height: 100vh;
    overflow: hidden;
}

.container {
    display: flex;
    height: 100vh;
}

/* Left Sidebar */
.sidebar {
    width: 280px;
    background: #252525;
    border-right: 2px solid #333;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.sidebar-header {
    padding: 20px;
    background: #2a2a2a;
    border-bottom: 2px solid #333;
}

.sidebar-header h2 {
    font-size: 18px;
    color: #fff;
    margin-bottom: 5px;
}

.sidebar-header p {
    font-size: 12px;
    color: #888;
}

.bot-list {
    flex: 1;
    overflow-y: auto;
    padding: 10px;
}

.bot-item {
    background: #2a2a2a;
    padding: 15px;
    margin-bottom: 8px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    border: 2px solid transparent;
}

.bot-item:hover {
    background: #333;
    border-color: #4a90e2;
}

.bot-item.selected {
    border-color: #4a90e2;
    background: #2d3a4a;
}

.bot-name {
    font-weight: 600;
    color: #fff;
    margin-bottom: 4px;
}

.bot-type {
    font-size: 11px;
    color: #888;
}

/* Main Content */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Navigation Tabs */
.nav-tabs {
    display: flex;
    background: #252525;
    border-bottom: 2px solid #333;
}

.nav-tab {
    padding: 15px 30px;
    cursor: pointer;
    background: transparent;
    border: none;
    color: #888;
    font-size: 14px;
    font-weight: 600;
    border-bottom: 3px solid transparent;
    transition: all 0.2s;
}

.nav-tab:hover {
    color: #fff;
    background: #2a2a2a;
}

.nav-tab.active {
    color: #4a90e2;
    border-bottom-color: #4a90e2;
}

/* Tab Content */
.tab-content {
    display: none;
    flex: 1;
    overflow: hidden;
}

.tab-content.active {
    display: flex;
    flex-direction: column;
}

/* Game View */
.game-view {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Controls */
.controls {
    background: #252525;
    padding: 15px 20px;
    border-bottom: 2px solid #333;
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.btn {
    padding: 10px 20px;
    background: #4a90e2;
    border: none;
    border-radius: 5px;
    color: #fff;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.2s;
}

.btn:hover {
    background: #5a9ff2;
}

.btn:disabled {
    background: #333;
    color: #666;
    cursor: not-allowed;
}

.btn-secondary {
    background: #555;
}

.btn-secondary:hover {
    background: #666;
}

.btn-danger {
    background: #e24a4a;
}

.btn-danger:hover {
    background: #f25a5a;
}

.speed-control {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: auto;
}

.speed-label {
    font-size: 12px;
    color: #888;
}

.speed-value {
    font-size: 14px;
    color: #4a90e2;
    min-width: 40px;
}

/* Poker Table */
.table-container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 20px;
    overflow: auto;
}

.poker-table {
    width: 70%;
    height: 80%;
    background: #1a4d2e;
    border-radius: 50px;
    border: 8px solid #8b4513;
    position: relative;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.table-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.pot-display {
    background: rgba(0, 0, 0, 0.3);
    padding: 10px 20px;
    border-radius: 20px;
    margin-bottom: 15px;
}

.pot-label {
    font-size: 12px;
    color: #aaa;
}

.pot-amount {
    font-size: 24px;
    font-weight: 700;
    color: #ffd700;
}

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

/* Player Positions */
.player-seat {
    position: absolute;
    width: 140px;
    text-align: center;
}

.player-seat.empty {
    opacity: 0.3;
}

/* 10 player positions around oval table -> top left counter clockwise */
.player-seat.pos-0 {
    top: -20%;
    left: 15%;
}

.player-seat.pos-1 {
    top: -20%;
    left: 50%;
    transform: translateX(-50%);
}

.player-seat.pos-2 {
    top: -20%;
    right: 15%;
}

.player-seat.pos-3 {
    top: 15%;
    right: -15%;
}

.player-seat.pos-4 {
    bottom: 15%;
    right: -15%;
}

.player-seat.pos-5 {
    bottom: -20%;
    right: 15%;
}

.player-seat.pos-6 {
    bottom: -20%;
    left: 50%;
    transform: translateX(-50%);
}

.player-seat.pos-7 {
    bottom: -20%;
    left: 15%;
}

.player-seat.pos-8 {
    bottom: 15%;
    left: -15%;
}

.player-seat.pos-9 {
    top: 15%;
    left: -15%;
}

/* 10 card positions around oval table */
.player-cards.pos-0 {
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
}

.player-cards.pos-1 {
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
}

.player-cards.pos-2 {
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
}

.player-cards.pos-3 {
    top: 20%;
    left: -65%;
}

.player-cards.pos-4 {
    bottom: 20%;
    left: -65%;
}

.player-cards.pos-5 {
    bottom: 110%;
    left: 50%;
    transform: translateX(-50%);
}

.player-cards.pos-6 {
    bottom: 110%;
    left: 50%;
    transform: translateX(-50%);
}

.player-cards.pos-7 {
    bottom: 110%;
    left: 50%;
    transform: translateX(-50%);
}

.player-cards.pos-8 {
    bottom: 20%;
    right: -65%;
}

.player-cards.pos-9 {
    top: 20%;
    right: -65%;
}

.player-info {
    background: #252525;
    border: 2px solid #333;
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 8px;
}

.player-info.active {
    border-color: #4a90e2;
    box-shadow: 0 0 10px rgba(74, 144, 226, 0.3);
}

.player-info.folded {
    opacity: 0.5;
}

.player-name {
    font-size: 10px;
    font-weight: 600;
    color: #fff;
    margin-bottom: 4px;
}

.player-chips {
    font-size: 12px;
    color: #ffd700;
}

.player-bet {
    font-size: 11px;
    color: #4a90e2;
    margin-top: 2px;
}

.player-cards {
    position: absolute;
    display: flex;
    gap: 4px;
    justify-content: center;
}

.card {
    width: 40px;
    height: 56px;
    background: #fff;
    border-radius: 4px;
    border: 1px solid #ccc;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 700;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.card.red {
    color: #e24a4a;
}

.card.black {
    color: #1a1a1a;
}

.card.back {
    background: linear-gradient(135deg, #4a90e2 25%, #5a9ff2 25%, #5a9ff2 50%, #4a90e2 50%, #4a90e2 75%, #5a9ff2 75%);
    background-size: 8px 8px;
}

/* Empty Table Message */
.empty-table {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: #666;
}

.empty-table h3 {
    font-size: 20px;
    margin-bottom: 10px;
}

.empty-table p {
    font-size: 14px;
}

/* Console */
.console-container {
    background: #1a1a1a;
    border-top: 2px solid #333;
    height: 180px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.console-header {
    background: #252525;
    padding: 8px 15px;
    border-bottom: 1px solid #333;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.console-header h3 {
    font-size: 12px;
    color: #888;
    font-weight: 600;
    text-transform: uppercase;
}

.console-clear {
    background: transparent;
    border: 1px solid #444;
    color: #888;
    padding: 4px 10px;
    border-radius: 3px;
    font-size: 11px;
    cursor: pointer;
    transition: all 0.2s;
}

.console-clear:hover {
    border-color: #666;
    color: #aaa;
}

.console-content {
    flex: 1;
    overflow-y: auto;
    padding: 10px;
    font-family: 'Courier New', monospace;
    font-size: 12px;
    line-height: 1.6;
}

.console-line {
    padding: 2px 0;
    color: #aaa;
}

.console-line.event-deal {
    color: #4a90e2;
}

.console-line.event-action {
    color: #88c;
}

.console-line.event-phase {
    color: #4a90e2;
    font-weight: 600;
}

.console-line.event-winner {
    color: #5ac;
    font-weight: 600;
}

.console-line.event-error {
    color: #e24a4a;
}

/* Statistics View */
.stats-view {
    flex: 1;
    padding: 30px;
    overflow: auto;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: #252525;
    border: 2px solid #333;
    border-radius: 8px;
    padding: 20px;
}

.stat-card h3 {
    font-size: 16px;
    color: #4a90e2;
    margin-bottom: 15px;
}

.stat-item {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #333;
}

.stat-item:last-child {
    border-bottom: none;
}

.stat-label {
    color: #aaa;
    font-size: 14px;
}

.stat-value {
    color: #fff;
    font-weight: 600;
    font-size: 14px;
}

.chart-container {
    background: #252525;
    border: 2px solid #333;
    border-radius: 8px;
    padding: 20px;
    height: 300px;
}

.chart-container h3 {
    font-size: 16px;
    color: #4a90e2;
    margin-bottom: 15px;
}

.status-bar {
    background: #252525;
    padding: 10px 20px;
    border-top: 2px solid #333;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: #888;
}

.status-item {
    display: flex;
    gap: 20px;
}

/* Resize handles */
.resize-handle {
    position: absolute;
    background: rgba(255, 255, 255, 0.1);
    z-index: 10;
}

.resize-handle.vertical {
    top: 0;
    right: 0;
    width: 6px;
    height: 100%;
    cursor: ew-resize;
}

.resize-handle.horizontal {
    top: 0;
    left: 0;
    width: 100%;
    height: 6px;
    cursor: ns-resize;
}

/* Make sure sidebar and console are positioned for handles */
.sidebar {
    position: relative;
}

.console-container {
    position: relative;
}


/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #1a1a1a;
}

::-webkit-scrollbar-thumb {
    background: #444;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
}