* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f4f4f4;
    padding: 10px;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

h1 {
    text-align: center;
    margin-bottom: 20px;
    color: #2c3e50;
}

.settings {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
}

.setting-group {
    margin-bottom: 15px;
}

label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

select, input {
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    width: 100%;
}

.players-container {
    margin-bottom: 20px;
}

.player-input {
    background-color: rgba(0, 0, 0, 0.8);
    padding: 8px;
    border-radius: 6px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
    text-align: center;
}

.player-input h3 {
    margin-bottom: 3px;
    color: white;
    font-size: 12px;
    text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.5);
}

.card-inputs {
    display: flex;
    justify-content: center;
    gap: 4px;
    margin: 0 auto;
}

.card-input {
    position: relative;
}

.card-input label {
    position: absolute;
    top: -25px;
    left: 0;
    color: white;
    text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.5);
}

.card-input input {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.actions {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
    position: relative;
    z-index: 3;
    margin-top: 20px;
}

button {
    background-color: #3498db;
    color: white;
    border: none;
    padding: 10px 20px;
    cursor: pointer;
    border-radius: 4px;
    font-size: 16px;
    transition: background-color 0.3s;
}

button:hover {
    background-color: #2980b9;
}

button:disabled {
    background-color: #95a5a6;
    cursor: not-allowed;
}

button.secondary-button {
    background-color: #373439;
    margin-right: 10px;
}

button.secondary-button:hover {
    background-color: #000000;
}

button.tertiary-button {
    background-color: #307e56;
    margin-right: 10px;
}

button.tertiary-button:hover {
    background-color: #1f5137;
}

button.tertiary-button:disabled {
    background-color: #4ab67e;
    cursor: not-allowed;
}

.loading {
    display: flex;
    align-items: center;
    font-weight: bold;
    color: #3498db;
}

.hidden {
    display: none;
}

.results-container {
    margin-top: 30px;
}

.text-results {
    margin-bottom: 20px;
    line-height: 1.8;
}

.chart-container {
    height: 400px;
}

.player-result {
    padding: 10px;
    margin-bottom: 5px;
    border-radius: 4px;
    background-color: #f9f9f9;
}

.card {
    display: inline-block;
    padding: 2px 6px;
    margin: 0 2px;
    border-radius: 3px;
    font-weight: bold;
    background-color: white;
    border: 1px solid #ddd;
    box-shadow: 1px 1px 2px rgba(0,0,0,0.1);
}

.card.spades, .card.clubs {
    background-color: #f0f0f0;
    color: #000;
}

.card.hearts, .card.diamonds {
    background-color: #ffecec;
    color: #e74c3c;
}

.instructions {
    background-color: #eaf7ff;
    padding: 10px;
    margin-bottom: 20px;
    border-radius: 5px;
    font-size: 0.9em;
}

/* Card deck styles */
.card-deck-container {
    margin-bottom: 70px;
    padding: 15px;
    background-color: #f9f9f9;
    border-radius: 5px;
    border-left: 4px solid #2ecc71;
}

.card-deck-container h3 {
    margin-bottom: 10px;
    color: #2c3e50;
}

.deck-instructions {
    margin-bottom: 15px;
    font-size: 0.9em;
    color: #7f8c8d;
}

.card-deck {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 15px;
}

.suit-row {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.suit-label {
    width: 30px;
    text-align: center;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    margin-right: 5px;
}

/* Suit label colors for four-color mode */
.suit-label.fourcolor-spades {
    color: #000000;
}

.suit-label.fourcolor-hearts {
    color: #e74c3c;
}

.suit-label.fourcolor-diamonds {
    color: #0880d0;
}

.suit-label.fourcolor-clubs {
    color: #09833c;
}

.deck-card {
    width: 36px;
    height: 54px;
    border: 1px solid #ddd;
    border-radius: 4px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    font-weight: bold;
    cursor: grab;
    font-size: 14px;
    user-select: none;
    background-color: white;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    position: relative;
    padding-bottom: 4px;
}

.deck-card .rank {
    font-size: 16px;
    margin-top: 8px;
    margin-bottom: 0;
    line-height: 1;
}

.deck-card .suit {
    font-size: 22px;
    line-height: 1;
    margin-top: 4px;
}

.deck-card.spades, .deck-card.clubs {
    color: #000;
}

.deck-card.hearts, .deck-card.diamonds {
    color: #e74c3c;
}

.deck-card.used {
    opacity: 0.3;
    cursor: not-allowed;
    background-color: #f0f0f0;
}

/* Standard two-color mode - update club color */
.deck-card.clubs, .dropped-card.clubs {
    color: #1a1a1a;
}

/* Four-color deck - update club color */
.deck-card.clubs.fourcolor,
.dropped-card.clubs.fourcolor {
    color: #145a32;
}

/* Four-color deck styles */
.deck-card.spades.fourcolor,
.dropped-card.spades.fourcolor {
    color: #000000;
}

.deck-card.hearts.fourcolor,
.dropped-card.hearts.fourcolor {
    color: #e74c3c;
}

.deck-card.diamonds.fourcolor,
.dropped-card.diamonds.fourcolor {
    color: #1387d4;
}

.deck-card.clubs.fourcolor,
.dropped-card.clubs.fourcolor {
    color: #09833c;
}

/* Card drop zones styling */
.card-drop-zone {
    position: relative;
    width: 36px;
    height: 54px;
    border: 2px dashed rgba(255, 255, 255, 0.5);
    border-radius: 4px;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: rgba(255, 255, 255, 0.2);
    transition: all 0.2s;
}

.card-drop-zone:first-child,
.card-drop-zone:last-child {
    position: relative;
    left: auto;
    z-index: auto;
}

.card-drop-zone.hover {
    border-color: #3498db;
    background-color: rgba(52, 152, 219, 0.3);
}

.card-drop-zone.filled {
    border-style: solid;
    border-color: transparent;
    background-color: transparent;
}

.dropped-card {
    width: 36px;
    height: 54px;
    border: 1px solid #fff;
    border-radius: 4px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    font-weight: bold;
    position: relative;
    background-color: white;
    box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.3);
    padding-bottom: 4px;
}

.dropped-card .rank {
    font-size: 16px;
    margin-top: 8px;
    margin-bottom: 0;
    line-height: 1;
}

.dropped-card .suit {
    font-size: 22px;
    line-height: 1;
    margin-top: 4px;
}

.dropped-card.spades, .dropped-card.clubs {
    color: #000;
}

.dropped-card.hearts, .dropped-card.diamonds {
    color: #e74c3c;
}

.remove-card {
    position: absolute;
    top: -8px;
    right: -8px;
    width: 18px;
    height: 18px;
    background-color: #e74c3c;
    color: white;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 12px;
    cursor: pointer;
    line-height: 1;
    visibility: hidden;
}

.card-drop-zone:hover .remove-card {
    visibility: visible;
}

/* Remove the ::after pseudo-elements that were not working properly */
.deck-card.spades::after,
.deck-card.hearts::after,
.deck-card.diamonds::after,
.deck-card.clubs::after,
.dropped-card.spades::after,
.dropped-card.hearts::after,
.dropped-card.diamonds::after,
.dropped-card.clubs::after {
    content: none;
}

/* Poker table styling - updated to show only green felt */
.poker-table-container {
    position: relative;
    width: 100%;
    max-width: 900px;
    height: 540px;
    margin: 0 auto 80px;
}

.poker-table {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    background-color: #277553;
    border-radius: 10px;
    box-shadow: inset 0 0 30px rgba(0, 0, 0, 0.5);
    z-index: 1;
}

/* Player position styling - improved positioning */
.player-position {
    position: absolute;
    width: 100px;
    z-index: 2;
    transform-origin: center;
}

/* Wider position for Omaha mode (4 cards) */
.omaha-mode .player-position {
    width: 180px;
}

/* Player result display on poker table */
.player-stats {
    margin-top: 5px;
    color: white;
    font-size: 11px;
    background-color: rgba(0, 0, 0, 0.6);
    border-radius: 3px;
    padding: 3px 5px;
    text-align: left;
    opacity: 0;
    transition: opacity 0.5s;
    width: 100%;
}

.player-stats.visible {
    opacity: 1;
}

.player-stats .stat-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 2px;
}

.player-stats .label {
    font-weight: normal;
}

.player-stats .value {
    font-weight: bold;
}

/* Mini progress bar for win probability */
.mini-progress-container {
    height: 4px;
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
    margin-top: 2px;
    overflow: hidden;
}

.mini-progress-bar {
    height: 100%;
    background: linear-gradient(to right, #27ae60, #2ecc71);
    border-radius: 2px;
    transition: width 0.5s;
}

/* Community cards styling - updated for better visibility */
.community-cards {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 2;
    align-items: center;
}

.community-cards-row {
    display: flex;
    justify-content: center;
    gap: 5px;
    align-items: flex-end;
}

.section-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.community-label {
    color: white;
    font-size: 11px;
    text-align: center;
    margin-bottom: 2px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.7);
}

.flop-container {
    display: flex;
    gap: 6px;
}

/* Make community drop zones match card drop zones */
.community-drop-zone {
    position: relative;
    width: 36px;
    height: 54px;
    border: 2px dashed rgba(255, 255, 255, 0.7);
    border-radius: 4px;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: rgba(255, 255, 255, 0.2);
    transition: all 0.2s;
}

.community-drop-zone.hover {
    border-color: #3498db;
    background-color: rgba(52, 152, 219, 0.3);
}

.community-drop-zone.filled {
    border-style: solid;
    border-color: transparent;
    background-color: transparent;
}

.community-drop-zone:hover .remove-card {
    visibility: visible;
}

/* Game selection radio buttons - fixed styling */
.game-selection {
    margin-left: 20px;
}

/* Radio group base styles - KORJATTU */
.radio-group {
    display: flex;
    border-radius: 6px;
    padding: 3px;
    position: relative;
    background-color: #f0f0f0;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
    height: 40px;
    min-width: 160px;
}

/* Radio labels - tasalevyiset ja keskitetyt */
.radio-label {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-weight: normal;
    padding: 6px 8px;
    border-radius: 4px;
    position: relative;
    z-index: 1;
    transition: color 0.3s;
    text-align: center;
    white-space: nowrap;
    margin-bottom: 0;
    font-size: 14px;
}

.radio-label input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.radio-label span {
    display: block;
    text-align: center;
    width: 100%;
}

.radio-label input[type="radio"]:checked + span {
    color: white;
    font-weight: bold;
}

/* Background highlight for 2-option groups */
.background-highlight {
    position: absolute;
    z-index: 0;
    top: 3px;
    left: 3px;
    height: calc(100% - 6px);
    width: calc(50% - 3px);
    background: #3498db;
    border-radius: 4px;
    transition: transform 0.3s ease;
}

.radio-group.second-checked .background-highlight {
    transform: translateX(100%);
}

/* Game type group - 3 options */
.radio-group.game-type-group {
    min-width: 220px;
}

.radio-group.game-type-group .background-highlight {
    width: calc(33.33% - 2px);
}

.radio-group.game-type-group.second-checked .background-highlight {
    transform: translateX(100%);
}

.radio-group.game-type-group.third-checked .background-highlight {
    transform: translateX(200%);
}

/* Add a second radio group style */
.deck-color-selection {
    margin-left: 20px;
}

/* Player shuffle button styles */
.player-shuffle-button {
    position: absolute;
    right: -24px;
    top: 25%;
    transform: translateY(-50%);
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.2);
    border: none;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0;
    transition: background-color 0.3s ease;
}

.player-shuffle-button:hover {
    background-color: rgba(255, 255, 255, 0.3);
}

.player-shuffle-button svg {
    width: 16px;
    height: 16px;
    fill: rgba(255, 255, 255, 0.8);
}

/* Player fold button styles */
.player-fold-button {
    position: absolute;
    right: -24px;
    top: 75%;
    transform: translateY(-50%);
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background-color: rgba(231, 76, 60, 0.5);
    border: none;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0;
    transition: background-color 0.3s ease;
}

.player-fold-button:hover {
    background-color: rgba(231, 76, 60, 0.7);
}

.player-fold-button svg {
    width: 16px;
    height: 16px;
    fill: rgba(255, 255, 255, 0.8);
}

/* Folded state styling */
.player-input.folded {
    opacity: 0.5;
    pointer-events: none;
}

.player-input.folded .player-shuffle-button,
.player-input.folded .player-fold-button {
    pointer-events: auto;
}

.player-input.folded .player-fold-button {
    background-color: rgba(46, 204, 113, 0.5);
}

.player-input.folded .player-fold-button:hover {
    background-color: rgba(46, 204, 113, 0.7);
}

/* Board shuffle button specific styles */
.board-shuffle {
    right: -30px;
    top: 50px;
    background-color: rgba(255, 255, 255, 0.3);
}

.board-shuffle:hover {
    background-color: rgba(255, 255, 255, 0.4);
}

/* Add styling for the separate shuffle button container */
.shuffle-button-container {
    display: flex;
    justify-content: center;
    margin-left: 10px;
    align-items: center;
}

/* Logo styling */
.site-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 30px;
    justify-content: center;
    text-align: center;
}

.logo-container {
    margin-right: 0;
    margin-bottom: 15px;
}

.site-logo {
    height: 80px;
    width: auto;
}

/* Ylätason logon tyylit */
.main-logo-container {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
    margin-top: 10px;
    text-align: center;
}

.main-logo {
    height: 80px;
    width: auto;
}

/* Hero Stats Bar styles */
.hero-stats-container {
    width: 100%;
    max-width: 1000px;
    margin: 20px auto 0 auto;
    padding: 10px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    display: none;
}

.hero-stats-container.visible {
    display: block;
}

.hero-stats-title {
    text-align: center;
    font-weight: bold;
    margin-bottom: 8px;
    font-size: 14px;
    text-transform: uppercase;
    color: #333;
}

.hero-bar-track {
    display: flex;
    width: 100%;
    height: 30px;
    border-radius: 0;
    overflow: visible;
    background: #eee;
    position: relative;
}

.hero-bar-segment {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 11px;
    font-weight: bold;
    white-space: nowrap;
    transition: width 0.8s ease-out;
    cursor: help;
    position: relative;
}

.hero-bar-segment:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(0, 0, 0, 0.85);
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    z-index: 100;
    margin-bottom: 8px;
    pointer-events: none;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.hero-bar-segment:hover::before {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    border-width: 5px;
    border-style: solid;
    border-color: rgba(0, 0, 0, 0.85) transparent transparent transparent;
    margin-bottom: -2px;
    z-index: 100;
    pointer-events: none;
}

.hero-stats-legend {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
    margin-top: 10px;
    font-size: 12px;
}

.legend-item {
    display: flex;
    align-items: center;
}

.legend-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-right: 5px;
}

/* Style for disabled/randomized opponents */
.player-input.random-opponent {
    opacity: 0.6;
    pointer-events: none;
    filter: grayscale(0.8);
    position: relative;
}

.player-input.random-opponent::after {
    content: '?';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 40px;
    color: white;
    font-weight: bold;
    text-shadow: 0 0 10px black;
    z-index: 10;
}

/* Omaha 5 card inputs - käytä samaa kokoa kuin muut kortit */
.card-inputs.omaha5 {
    display: flex;
    justify-content: center;
    gap: 3px;
}

/* Wider position for Omaha5 mode (5 cards) */
.omaha5-mode .player-position {
    width: 210px;
}

/* Poker table container for omaha5 */
.poker-table-container.omaha5-mode {
    max-width: 950px;
    height: 580px;
}

/* Mobile-friendly style for logo */
@media (max-width: 767px) {
    .main-logo {
        height: 60px;
    }
}

/* Mobile-friendly styles */
@media (max-width: 767px) {
    /* Container adjustments */
    .container {
        padding: 10px;
        margin: 0;
    }
    
    /* Settings panel adjustments */
    .settings {
        flex-direction: column;
    }
    
    .setting-group {
        width: 100%;
        margin-bottom: 8px;
        margin-left: 0 !important;
    }
    
    /* Radio group mobile adjustments */
    .radio-group {
        width: 100%;
        min-width: unset;
    }
    
    .radio-group.game-type-group {
        min-width: unset;
    }
    
    .radio-label {
        font-size: 13px;
        padding: 6px 4px;
    }
    
    /* Card deck container adjustments */
    .card-deck-container {
        margin-bottom: 20px;
        padding: 10px;
    }
    
    /* Poker table adjustments */
    .poker-table-container {
        height: auto;
        position: relative;
        margin-bottom: 20px;
        padding-bottom: 0px;
        overflow: visible;
    }
    
    .poker-table {
        height: 180px;
        transform: translate(-50%, 0%);
    }
    
    /* Community cards positioning adjustments */
    .community-cards {
        position: absolute;
        bottom: 20px;
        width: 100%;
        z-index: 10;
    }
    
    /* Mobile-specific layout for poker table */
    .mobile-layout .poker-table-container {
        display: block !important;
        position: relative;
        height: auto;
        margin-bottom: 0;
    }
    
    /* Contain the poker table and ensure it doesn't overlap */
    .mobile-layout .poker-table {
        position: relative;
        height: 150px;
        margin-bottom: 10px;
        margin-top: 20px;
    }
    
    /* Position community cards within the table */
    .mobile-layout .community-cards {
        position: absolute;
        top: 50%;
        left: 0;
        right: 0;
        transform: translateY(-100%);
    }
    
    /* Create a separate container for players below the table */
    .mobile-layout .poker-table-container::after {
        content: '';
        display: block;
        height: 15px;
        border-bottom: 1px solid rgba(255,255,255,0.2);
        margin-bottom: 10px;
    }
    
    /* Mobile players container - vertical layout */
    .mobile-layout .player-position {
        position: static !important;
        transform: none !important;
        width: 100% !important;
        margin: 5px 0 !important;
        display: block;
        top: auto !important;
        left: auto !important;
    }
    
    /* Player card layout for mobile */
    .mobile-layout .player-input {
        display: flex;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        width: 100%;
        padding: 6px;
        margin: 0;
        background-color: rgba(39, 117, 83, 1);
    }
    
    /* Fix player number display */
    .mobile-layout .player-input::before {
        content: attr(data-player-index);
        position: absolute;
        left: 5px;
        top: 50%;
        transform: translateY(-50%);
        font-size: 10px;
        font-weight: bold;
        color: #fff;
        width: 15px;
        text-align: center;
    }
    
    /* Adjust the player index to display as human-readable number */
    .mobile-layout .player-input[data-player-index="0"]::before { content: ""; }
    .mobile-layout .player-input[data-player-index="1"]::before { content: ""; }
    .mobile-layout .player-input[data-player-index="2"]::before { content: ""; }
    .mobile-layout .player-input[data-player-index="3"]::before { content: ""; }
    .mobile-layout .player-input[data-player-index="4"]::before { content: ""; }
    .mobile-layout .player-input[data-player-index="5"]::before { content: ""; }
    .mobile-layout .player-input[data-player-index="6"]::before { content: ""; }
    .mobile-layout .player-input[data-player-index="7"]::before { content: ""; }
    .mobile-layout .player-input[data-player-index="8"]::before { content: ""; }
    .mobile-layout .player-input[data-player-index="9"]::before { content: ""; }
    
    /* Adjust card inputs position */
    .mobile-layout .card-inputs {
        margin-left: 0px;
        display: flex;
    }
    
    /* Player stats on the right - ensure vertical layout between rows but inline within rows */
    .mobile-layout .player-stats {
        position: relative !important;
        opacity: 1 !important;
        margin: 0 0 0 10px !important;
        width: 90px !important;
        padding: 3px !important;
        font-size: 11px !important;
        display: block !important;
    }
    
    /* Make stat rows stack vertically */
    .mobile-layout .player-stats .stat-row {
        width: 100% !important;
        margin-bottom: 5px !important;
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        justify-content: space-between !important;
        line-height: 1.2 !important;
    }
    
    /* Label and value should be inline on the same line */
    .mobile-layout .player-stats .label {
        display: inline-block !important;
        width: auto !important;
        text-align: left !important;
        vertical-align: middle !important;
    }
    
    .mobile-layout .player-stats .value {
        display: inline-block !important;
        width: auto !important;
        text-align: right !important;
        vertical-align: middle !important;
        font-weight: bold !important;
    }
    
    /* Player control buttons in mobile */
    .mobile-layout .player-shuffle-button,
    .mobile-layout .player-fold-button {
        position: absolute;
        margin-left: 5px;
        margin-top: -12px;
        transform: none;
    }
    
    /* Card drop zone spacing */
    .mobile-layout .card-drop-zone {
        margin: 0 2px;
    }
    
    /* Action buttons stack vertically */
    .actions {
        flex-direction: column;
        gap: 8px;
    }
    
    .actions button {
        width: 100%;
        margin: 0 !important;
    }

    /* Position buttons properly in mobile view */
    .mobile-layout .section-container {
        display: flex;
        flex-direction: column;
        align-items: center;
        width: auto;
        margin: 0 5px;
    }
    
    /* Keep community labels above cards */
    .mobile-layout .community-label {
        margin-bottom: 5px;
        font-size: 10px;
        text-align: center;
    }
    
    /* Adjust river container specifically */
    .mobile-layout .community-cards-row .section-container > div {
        display: flex;
        flex-direction: row;
        align-items: center;
    }
    
    /* Make board shuffle button appear on the right of river card */
    .mobile-layout .board-shuffle {
        position: static;
        margin-left: 8px;
        transform: none;
        top: auto;
        right: auto;
    }
    
    /* Player card container in mobile view */
    .mobile-layout .player-input > div {
        display: flex;
        flex-direction: row;
        align-items: center;
    }
    
    /* Group cards together */
    .mobile-layout .card-inputs {
        margin-right: 8px;
    }
    
    /* Adjust river section for board shuffle button */
    .mobile-layout .section-container:has(.board-shuffle) {
        flex-direction: column;
    }
    
    /* Make sure flop container maintains its layout */
    .mobile-layout .flop-container {
        display: flex;
        flex-direction: row;
        gap: 6px;
    }
    
    /* Fix the river section layout specifically */
    .mobile-layout .community-cards-row .section-container {
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    
    /* Make sure all community labels stay above their cards */
    .mobile-layout .community-label {
        margin-bottom: 5px;
        font-size: 10px;
        display: block;
        width: 100%;
        text-align: center;
    }
    
    /* Container for the card and button in river section */
    .mobile-layout .section-container > div {
        display: flex;
        flex-direction: row;
        align-items: center;
        justify-content: center;
        margin-top: 2px;
    }
    
    /* Make board shuffle button appear on the right of river card */
    .mobile-layout .board-shuffle {
        position: static;
        margin-left: 8px;
        transform: none;
        top: auto;
        right: auto;
    }
    
    /* Remove any overriding flex direction that might be causing issues */
    .mobile-layout .section-container:has(.board-shuffle) {
        flex-direction: column;
    }
    
    /* Make the community cards row display horizontally in mobile */
    .mobile-layout .community-cards-row {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        align-items: flex-end;
    }
    
    /* Keep the shuffle button container as a simple flex container */
    .mobile-layout .shuffle-button-container {
        margin: 15px 5px;
    }

    /* Parannukset select-elementtiin mobiililaitteilla */
    select {
        height: 44px;
        padding: 8px 12px;
        font-size: 16px;
        margin-bottom: 15px;
        -webkit-appearance: none;
        appearance: none;
        background-image: url("data:image/svg+xml;utf8,<svg fill='black' height='24' viewBox='0 0 24 24' width='24' xmlns='http://www.w3.org/2000/svg'><path d='M7 10l5 5 5-5z'/></svg>");
        background-repeat: no-repeat;
        background-position: right 8px center;
        background-size: 20px;
        border: 1px solid #ccc;
        border-radius: 4px;
    }
    
    /* Simulaatiomäärän syöttökentän tyylit mobiililaitteilla */
    input[type="number"] {
        height: 44px;
        padding: 8px 12px;
        font-size: 16px;
        margin-bottom: 15px;
        -webkit-appearance: none;
        appearance: none;
        border: 1px solid #ccc;
        border-radius: 4px;
        min-width: 80px;
        box-sizing: border-box;
    }
    
    /* Kohdistetaan tyyli nimenomaan simulaatiomäärän kenttään */
    #simulationCount {
        width: 100%;
    }
    
    /* Pelaajamäärän valitsimen tyyli */
    #playerCount {
        min-width: 80px;
    }
}