body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: #f0f2f5;
    color: #333;
    min-height: 100vh;
    margin: 0;
    padding: 0;
}

.container {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 400px;
    text-align: center;
    margin: 2rem auto;
}

h1 {
    margin-top: 0;
    color: #1c1e21;
}

.form-group {
    margin-bottom: 1.5rem;
    text-align: left;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

input[type="number"] {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 6px;
    box-sizing: border-box;
}

button {
    width: 100%;
    padding: 0.75rem;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.2s;
}

button:hover {
    background-color: #0056b3;
}

p.error {
    color: #d93025;
    margin-top: 1rem;
}

.active-tables {
    margin-bottom: 30px;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 8px;
}

.tables-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.table-item {
    background: white;
    border: 1px solid #ddd;
    border-radius: 5px;
    padding: 15px;
}

.table-link {
    text-decoration: none;
    color: #333;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.table-link:hover {
    color: #007bff;
}

.table-occupancy {
    color: #666;
    font-size: 14px;
}

/* Table View Styles */
.table-container {
    width: 95%;
    margin: 1rem auto;
    padding: 1rem;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.poker-table {
    position: relative;
    width: 70%;
    height: 400px;
    background-color: #0a6b3a; /* Green felt */
    border: 20px solid #5d3a1a; /* Wood rail */
    border-radius: 200px; /* Elliptical shape */
    margin: 1rem auto;
    box-shadow: inset 0 0 20px rgba(0,0,0,0.5);
}

.seats-container {
    position: relative;
    width: 100%;
    height: 100%;
}

.seat {
    position: absolute;
    width: 120px;
    height: 120px;
    background-color: #666;
    border: 2px solid #444;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    font-size: 0.8rem;
    color: #ccc;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    transform: translate(-50%, -50%); /* Center on its coordinates */
}

.dealer-button {
    position: absolute;
    width: 25px;
    height: 25px;
    background-color: #fff;
    color: #333;
    border: 2px solid #555;
    border-radius: 50%;
    font-size: 0.7rem;
    font-weight: bold;
    display: flex;
    justify-content: center;
    align-items: center;
}

.seat.taken {
    background-color: #e4e6eb;
    border-color: #888;
}

.seat.active {
    background-color: #cce7ff;
    border-color: #007bff;
    border-width: 3px;
}

.seat.winner {
    background-color: #d4edda;
    border-color: #28a745;
    border-width: 3px;
}

.player-name {
    font-weight: bold;
    color: #333;
}

.player-chips {
    color: #555;
    font-size: 0.75rem;
}

.take-seat-btn {
    font-size: 0.7rem;
    padding: 4px 8px;
    width: auto;
    cursor: pointer;
}

.join-form {
    margin-top: 2rem;
    padding: 1.5rem;
    border: 1px solid #ddd;
    border-radius: 8px;
    background-color: #f9f9f9;
}

input[type="text"] {
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 6px;
    margin-right: 0.5rem;
}

.join-form button {
    width: auto;
}

.player-controls {
    margin-top: 2rem;
    padding: 1.5rem;
    border: 1px solid #ddd;
    border-radius: 8px;
    background-color: #f9f9f9;
}

.player-controls button {
    width: auto;
}


.player-cards {
    display: flex;
    gap: 2px;
    margin-top: 5px;
    justify-content: center;
}
                
.card {
    background: white;
    border: 1px solid #333;
    border-radius: 3px;
    padding: 2px 4px;
    font-size: 10px;
    font-family: monospace;
    min-width: 16px;
    text-align: center;
}

.card-back {
    background: #0066cc;
    color: white;
    font-size: 8px;
}

.center-area {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.pot-display {
    background: rgba(255, 255, 255, 0.9);
    padding: 10px 20px;
    border-radius: 20px;
    font-weight: bold;
    font-size: 1.2rem;
    color: #333;
    border: 2px solid #ffd700;
}

.community-cards {
    display: flex;
    gap: 5px;
    background: rgba(255, 255, 255, 0.1);
    padding: 10px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.community-card {
    width: 50px;
    height: 70px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.debug-panel {
    margin-top: 20px;
    padding: 10px;
    background-color: #f5f5f5;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.debug-panel h4 {
    margin-top: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#copy-debug-btn {
    width: auto;
    padding: 4px 8px;
    font-size: 12px;
    background-color: #6c757d;
}

#copy-debug-btn:hover {
    background-color: #545b62;
}

.debug-panel pre {
    background-color: white;
    padding: 10px;
    border-radius: 4px;
    overflow: auto;
    max-height: 300px;
    font-size: 12px;
}

.dealer-controls {
    margin-top: 15px;
    padding: 15px;
    border: 1px solid #ccc;
    border-radius: 6px;
    background-color: #f0f8ff;
}
#game-options {
    margin-top: 15px;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 6px;
    background-color: #f8f9fa;
}

#game-options h4 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #333;
}

.game-option {
    margin: 10px 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.game-option label {
    display: inline-block;
    width: 120px;
    margin: 0;
    font-weight: 600;
    color: #555;
}

.game-option input {
    width: 80px;
    padding: 6px 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 0.9rem;
}

.card-image {
    width: 48px;
    height: 68px;
    border-radius: 1px;
    margin: 0.5px;
}

/* Make current player's cards twice as big */
.player-cards[data-player] .card-image {
    width: 96px;
    height: 136px;
}

.upcards-row {
    display: flex;
    gap: 2px;
    justify-content: center;
    margin-bottom: 3px;
    position: relative;
    z-index: 2;
}

.hole-cards-row {
    display: flex;
    gap: 2px;
    justify-content: center;
    position: relative;
    z-index: 1;
}

.upcard {
    border: 3px solid #28a745;
    transform: translateY(-10px);
}



.action-controls {
    width: 100%;
}

.game-status-bar {
    background: #f8f9fa;
    padding: 10px;
    border-radius: 5px;
    margin-bottom: 15px;
    display: flex;
    justify-content: space-between;
    font-weight: bold;
    border: 1px solid #dee2e6;
}

.player-controls {
    margin-top: 2rem;
    padding: 1.5rem;
    border: 1px solid #ddd;
    border-radius: 8px;
    background-color: #f9f9f9;
}

.player-controls button {
    width: auto;
    min-width: 100px;
}

.table-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
    height: 60px;    gap: 20px;
}

.lobby-link {
    color: #007bff;
    text-decoration: none;
    font-weight: bold;
    flex-shrink: 0;
}

.lobby-link:hover {
    text-decoration: underline;
}

.table-name-section {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    flex: 1;
}

.table-title {
    margin: 0;
    font-size: 1.5rem;
}

.copy-link-btn {
    width: 30px;
    height: 30px;
    border-radius: 4px;
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.copy-link-btn:hover {
    background-color: #e9ecef;
}

.table-state-panel {
    font-size: 0.9rem;
    color: #666;
    text-align: right;
    line-height: 1.4;
    flex-shrink: 0;
    min-width: 200px;
}

.winning-card {
    border: 4px solid red !important;
}

.bet-controls {
    display: flex;
    align-items: center;
    justify-content: space-evenly;
    width: 100%;
    padding: 15px 0;
    gap: 10px;
    flex-wrap: nowrap;
}

.bet-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex-shrink: 0;
}

.minimum-bet {
    font-size: 1rem;
    font-weight: bold;
    color: #dc3545;
    margin-bottom: 2px;
}

.current-bet {
    font-size: 1.2rem;
    font-weight: bold;
    color: #28a745;
}

.chip-buttons {
    display: flex;
    justify-content: space-evenly;
    align-items: center;
    width: 100%;
}

.draw-controls {
    display: flex;
    align-items: center;
    justify-content: space-evenly;
    width: 100%;
    padding: 15px 0;
    gap: 10px;
    flex-wrap: wrap;
}

.draw-controls p {
    margin: 0;
    flex-basis: 100%;
    text-align: center;
    margin-bottom: 10px;
}

.showdown-controls {
    display: flex;
    align-items: center;
    justify-content: space-evenly;
    width: 100%;
    padding: 15px 0;
    gap: 10px;
}

.showdown-controls p {
    margin: 0;
    flex: 1;
    text-align: center;
}

.chip-btn {
    width: 60px !important;
    height: 60px;
    min-width: 60px !important;
    border-radius: 50%;
    border: 3px solid #333;
    font-weight: bold;
    font-size: 0.9rem;
    cursor: pointer;
    transition: transform 0.1s;
    padding: 0;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.chip-btn:hover {
    transform: scale(1.1);
}

.chip-btn.white {
    background-color: #fff;
    color: #333;
}

.chip-btn.red {
    background-color: #dc3545;
    color: #fff;
}

.chip-btn.blue {
    background-color: #007bff;
    color: #fff;
}

.call-btn {
    width: 60px !important;
    height: 60px;
    border-radius: 50%;
    background-color: #28a745;
    color: #fff;
    border: 2px solid #333;
    font-size: 0.8rem;
    cursor: pointer;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
}

.call-btn:hover {
    background-color: #218838;
}

.reset-btn {
    width: 60px !important;
    height: 60px;
    border-radius: 50%;
    background-color: #6c757d;
    color: #fff;
    border: 2px solid #333;
    font-size: 0.8rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.reset-btn:hover {
    background-color: #545b62;
}

.player-state-panel {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 10px 0;
    margin-bottom: 15px;
    border-bottom: 1px solid #ddd;
}

.player-chips {
    font-size: 1.2rem;
    font-weight: bold;
    color: #28a745;
}

.player-info {
    font-size: 1rem;
    font-weight: normal;
    color: #333;
    text-align: center;
}

.sort-cards-btn {
    background-color: #f8f9fa !important;
    color: #333 !important;
    border: 1px solid #ccc !important;
    font-size: 10px !important;
    padding: 2px 4px !important;
    border-radius: 3px !important;
    cursor: pointer !important;
}

.sort-cards-btn:hover {
    background-color: #e9ecef !important;
    color: #000 !important;
}