body {
    font-family: Arial, sans-serif;
    background: #f7f7f7;
    margin: 0;
    padding: 0;
}

.container {
    max-width: 800px;
    margin: 40px auto;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    padding: 32px 24px;
    text-align: center;
}

.main-flex {
    display: flex;
    flex-direction: row;
    justify-content: flex-start;
    align-items: flex-start;
    gap: 32px;
    position: relative;
}

.results-fixed {
    position: absolute;
    right: 0;
    top: -36px;
    width: 260px;
    background: #f9f9f9;
    border-radius: 8px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.04);
    padding: 16px 12px 8px 12px;
    z-index: 10;
    text-align: left;
}

@media (max-width: 900px) {
    .results-fixed {
        position: static;
        width: 100%;
        margin-bottom: 16px;
    }
}

.chat-column {
    max-width: 700px;
    margin: 40px auto 0 auto;
    background: #f5f7fb;
    border-radius: 8px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.04);
    padding: 18px 14px;
    display: flex;
    flex-direction: column;
    height: 340px;
}

@media (max-width: 700px) {
    .chat-column {
        max-width: 98vw;
        padding: 8px 2vw;
        height: auto;
    }
}


.dice-frame {
    margin: 24px 0;
    flex: 1 1 0;
    background: #f5f7fb;
    border-radius: 8px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.04);
    padding: 24px 18px 18px 18px;
    margin-bottom: 0;
}

.betting-controls {
    margin-bottom: 16px;
    margin-top: 18px;
    padding: 10px 0;
    background: #eef3fa;
    border-radius: 6px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.03);
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 18px;
}

.dices {
    display: flex;
    flex-direction: row;
    justify-content: center;
    gap: 16px;
    margin-bottom: 16px;
}

.dice-frame img {
    width: 100px;
    height: 100px;
    margin-bottom: 16px;
    transition: transform 0.2s;
}

.betting-controls {
    margin-bottom: 16px;
}

.bet-btn {
    padding: 8px 16px;
    margin: 0 4px;
    font-size: 16px;
    border: 1px solid #007cf0;
    background: #fff;
    color: #007cf0;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}

.bet-btn.selected, .bet-btn:active {
    background: #007cf0;
    color: #fff;
}

.selected-bet {
    margin-left: 12px;
    font-weight: bold;
    color: #005fa3;
}

#roll-btn {
    padding: 12px 24px;
    font-size: 18px;
    border: none;
    background: #007cf0;
    color: #fff;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s;
}

#roll-btn:hover {
    background: #005fa3;
}

.results-column {
    min-width: 350px;
    margin-top: 0;
    text-align: left;
    flex: 0 0 240px;
    background: #f9f9f9;
    border-radius: 8px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.04);
    padding: 16px 12px;
}

.results-column h2 {
    margin-bottom: 12px;
}

#results-list {
    list-style: none;
    padding: 0;
    max-height: 280px;
    overflow-y: auto;
    font-size: 22px;
    word-break: auto;
    white-space: normal;
    text-overflow: unset;
    width: 100%;
}

#results-list li {
    padding: 10px 0;
    border-bottom: 1px solid #eee;
    font-size: 22px;
    overflow: visible;
    text-overflow: unset;
    white-space: normal;
    word-break: break-word;
}

#results-list li {
    padding: 10px 0;
    border-bottom: 1px solid #eee;
    font-size: 22px;
    overflow: visible;
    text-overflow: unset;
    white-space: normal;
    word-break: break-word;
}

/* Chat column styles */
.chat-column {
    min-width: 260px;
    max-width: flex; 
    background: #f5f7fb;
    border-radius: 8px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.04);
    padding: 18px 14px;
    margin-left: 24px;
    display: flex;
    flex-direction: column;
    height: 340px;
}

#chat-messages {
    flex: 1 1 0;
    overflow-y: auto;
    margin-bottom: 12px;
    font-size: 18px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.chat-msg-row {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 12px;
}

.chat-msg-username {
    min-width: 90px;
    max-width: 160px;
    font-weight: bold;
    color: #007cf0;
    text-align: right;
    flex-shrink: 0;
    padding-right: 10px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.chat-msg-text {
    flex: 1 1 0;
    word-break: break-word;
    color: #222;
    background: #eaf3ff;
    border-radius: 4px;
    padding: 4px 10px;
    display: inline-block;
}

#chat-messages .chat-msg {
    margin-bottom: 8px;
    word-break: break-word;
}

#chat-input-row {
    display: flex;
    gap: 8px;
}

#username-input {
    flex: 0 0 110px;
    padding: 6px;
    border-radius: 4px;
    border: 1px solid #ccc;
    font-size: 15px;
}

#chat-input {
    flex: 1 1 0;
    padding: 6px;
    border-radius: 4px;
    border: 1px solid #ccc;
    font-size: 15px;
}

#send-chat-btn {
    padding: 6px 14px;
    background: #007cf0;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    cursor: pointer;
    transition: background 0.2s;
}

#send-chat-btn:hover {
    background: #005fa3;
}

#results-list li {
    padding: 6px 0;
    border-bottom: 1px solid #eee;
    font-size: 18px;
}
