* {
    font-family: sans-serif;
    font-size: 14px;
}

html, body {
    background-color: #1a1a2e;
    overflow: hidden;
}

html, body, canvas {
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    background: rgba(0, 0, 0, 0.4);

}

div {
    -webkit-user-select: none; /* webkit (safari, chrome) browsers */
    -moz-user-select: none; /* mozilla browsers */
    -khtml-user-select: none; /* webkit (konqueror) browsers */
    -ms-user-select: none; /* IE10+ */
}

#split {
    position: absolute;
    bottom: 10px;
    left: 10px;
    width: 100px;
    height: 100px;
    padding: 5px;
    border: none;
}

#feed {
    position: absolute;
    bottom: 10px;
    right: 10px;
    width: 100px;
    height: 100px;
    padding: 5px;
    border: none;
}

#status {
    position: absolute;
    padding: 10px;
    background: rgba(0, 0, 0, 0.4);
    color: #FFF;
    font-size: 16.1px;
    top: 10px;
    right: 10px;
    font-weight: bold;
    text-align: center;
}

#status .title {
    font-size: 25px;
}

#status .me {
    color: #FF8888;
    font-size: 16.1px;
}

.chatbox {
    position: absolute;
    width: 300px;
    height: 320px;
    background: rgba(22, 22, 22, 0.7);
    bottom: 5px;
    left: 5px;
    border-radius: 5px;
    pointer-events: none;
}

.chatbox .chat-list {
    padding: 5px;
    margin: 0;
    list-style: none;
    box-sizing: border-box;
    height: 285px;
    overflow: hidden;
}

.chatbox .chat-list li {
    padding: 2px;
    margin: 3px;
}

.chatbox .chat-list li.me b {
    color: #ea6153;
}

.chatbox .chat-list li.friend b {
    color: #2ecc71;
}

.chatbox .chat-list li.system {
    color: #9b59b6;
    font-style: italic;
}

.chatbox .chat-list li.system:before {
    content: "» ";
}

.chatbox .chat-list li.system:after {
    content: "»";
}

.chatbox .chat-input {
    pointer-events: all;
    box-sizing: border-box;
    width: 100%;
    padding: 8px;
    background: transparent;
    border: none;
    border-top: 1px solid #DDD;
    outline: none;
}

#startMenu {
    position: relative;
    max-width: 450px;
    width: 90%;
    margin: 40px auto;
    padding: 20px;
    border-radius: 5px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-sizing: border-box;
}

#startMenu p {
    padding: 0;
    text-align: center;
    font-size: x-large;
    font-weight: bold;
    color: #fff;
    margin-bottom: 30px;
    font-size: 36px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

#playerNameInput {
    width: 90%;
    margin: 20px auto;
    display: block;
    text-align: center;
    padding: 10px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    transition: box-shadow 0.3s, border 0.3s;
    box-sizing: border-box;
    border-radius: 5px;
    margin-bottom: 10px;
    outline: none;
}

#playerNameInput::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

#playerNameInput:focus, #playerNameInput.focus {
    border: solid 1px rgba(255, 255, 255, 0.5);
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.2);
}

#startButton, #spectateButton {
    position: relative;
    margin: auto;
    margin-top: 10px;
    width: 100%;
    height: 40px;
    box-sizing: border-box;
    font-size: large;
    color: white;
    text-align: center;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
    background: #2ecc71;
    border: 0;
    border-bottom: 2px solid #28be68;
    cursor: pointer;
    -webkit-box-shadow: inset 0 -2px #28be68;
    box-shadow: inset 0 -2px #28be68;
    border-radius: 5px;
    margin-bottom: 10px;
}

#spectateButton:active, #spectateButton:hover,
#startButton:active, #startButton:hover {
    top: 1px;
    background: #55D88B;
    outline: none;
    -webkit-box-shadow: none;
    box-shadow: none;
}

#settingsButton {
    position: relative;
    margin: auto;
    margin-top: 10px;
    width: 100%;
    height: 40px;
    box-sizing: border-box;
    font-size: large;
    color: white;
    text-align: center;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
    background: #2ecc71;
    border: 0;
    border-bottom: 2px solid #28be68;
    cursor: pointer;
    -webkit-box-shadow: inset 0 -2px #28be68;
    box-shadow: inset 0 -2px #28be68;
    border-radius: 5px;
    margin-bottom: 10px;
}

#settingsButton:active, #settingsButton:hover {
    top: 1px;
    background: #55D88B;
    outline: none;
    -webkit-box-shadow: none;
    box-shadow: none;
}

#settings, #startMenuWrapper {
    -webkit-transition: max-height 1s;
    -moz-transition: max-height 1s;
    -ms-transition: max-height 1s;
    -o-transition: max-height 1s;
    transition: max-height 1s;
    overflow: hidden;
}

#settings {
    max-height: 0;
}

#startMenu h3 {
    padding-bottom: 0;
    margin-bottom: 0;
}

#startMenu ul {
    margin: 10px;
    padding: 10px;
    margin-top: 0;
}

#startMenu .input-error {
    color: red;
    opacity: 0;
    font-size : 12px;
}

#startMenuWrapper {
    z-index: 2;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    overflow-y: auto;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
}

#gameAreaWrapper {
    position: absolute !important;
    top: 0;
    left: 0;
    opacity: 0;
}

@media only screen  and (min-width : 1224px) {
#mobile {
display: none;
	}
}

@media only screen  and (max-width : 1224px) {
#chatbox {
display: none;
        }
}

input [type="image"]:focus{
 border:none;
 outline: 1px solid transparent;
 border-style: none;
}

*:focus {
 outline: 1px solid transparent;
 border-style: none;
}

#connectWalletButton {
    position: relative;
    margin: auto;
    margin-top: 10px;
    width: 100%;
    height: 40px;
    box-sizing: border-box;
    font-size: large;
    color: white;
    text-align: center;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
    background: #9945FF;  /* Phantom wallet purple */
    border: 0;
    border-bottom: 2px solid #7435c1;
    cursor: pointer;
    -webkit-box-shadow: inset 0 -2px #7435c1;
    box-shadow: inset 0 -2px #7435c1;
    border-radius: 5px;
    margin-bottom: 10px;
}

#connectWalletButton:active, #connectWalletButton:hover {
    top: 1px;
    background: #a35cff;
    outline: none;
    -webkit-box-shadow: none;
    box-shadow: none;
}

/* Wallet status display */
#walletStatus {
    text-align: center;
    margin-bottom: 10px;
    font-size: 14px;
    color: #666;
}

/* Stakes display in game */
#stakeDisplay {
    position: absolute;
    padding: 10px;
    background: rgba(0, 0, 0, 0.4);
    color: #FFF;
    font-size: 16.1px;
    top: 10px;
    left: 10px;
    font-weight: bold;
    text-align: center;
}

#stakeDisplay .title {
    font-size: 16px;
    color: #9945FF;
}

#stakeInfo {
    text-align: center;
    margin: 10px 0;
    font-size: 14px;
    color: #666;
}

#disconnectWalletButton {
    position: relative;
    margin: auto;
    margin-top: 10px;
    width: 100%;
    height: 40px;
    box-sizing: border-box;
    font-size: large;
    color: white;
    text-align: center;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
    background: #ff4545;  /* Red color for disconnect */
    border: 0;
    border-bottom: 2px solid #c13535;
    cursor: pointer;
    -webkit-box-shadow: inset 0 -2px #c13535;
    box-shadow: inset 0 -2px #c13535;
    border-radius: 5px;
    margin-bottom: 10px;
}

#disconnectWalletButton:active, #disconnectWalletButton:hover {
    top: 1px;
    background: #ff5e5e;
    outline: none;
    -webkit-box-shadow: none;
    box-shadow: none;
}

#cashOutButton {
    margin-top: 10px;
    width: 100%;
    height: 30px;
    font-size: 14px;
    color: white;
    text-align: center;
    background: #2ecc71;
    border: 0;
    border-bottom: 2px solid #28be68;
    cursor: pointer;
    border-radius: 3px;
    display: none;
}

#cashOutButton:hover {
    background: #55D88B;
}

#cashOutButton:active {
    transform: translateY(1px);
}

#roomSelection {
    margin: 20px 0;
    text-align: center;
}

.room-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 10px;
}

.room-button {
    position: relative;
    width: 100%;
    height: 60px;
    padding: 10px;
    box-sizing: border-box;
    font-size: large;
    color: white;
    text-align: center;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
    background: #2ecc71;
    border: 0;
    border-bottom: 2px solid #28be68;
    cursor: pointer;
    border-radius: 5px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.room-button:hover {
    background: #55D88B;
}

.room-button .stake-amount {
    font-size: 14px;
    opacity: 0.8;
    margin-top: 4px;
}

.room-button[data-room="high"] {
    background: #e74c3c;
    border-bottom-color: #c0392b;
}

.room-button[data-room="high"]:hover {
    background: #ff6b6b;
}

.room-button[data-room="medium"] {
    background: #f1c40f;
    border-bottom-color: #f39c12;
}

.room-button[data-room="medium"]:hover {
    background: #ffdd59;
}

.room-button.active {
    transform: scale(1.02);
    box-shadow: 0 0 10px rgba(0,0,0,0.2);
    border: 2px solid #fff;
}

#startButton:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    background: #999;
    border-bottom-color: #666;
}

/* Room selection styling */
#roomSelection h3 {
    color: #fff;
    font-size: 24px;
    margin-bottom: 20px;
    text-align: center;
}

.room-button {
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    background: rgba(255, 255, 255, 0.1) !important;
}

.room-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

.room-button.active {
    transform: scale(1.02);
    box-shadow: 0 0 20px rgba(255,255,255,0.3);
    border: 2px solid rgba(255,255,255,0.5) !important;
}

/* Wallet status */
#walletStatus {
    color: rgba(255, 255, 255, 0.8) !important;
    font-size: 16px !important;
    margin: 15px 0;
}

/* Settings section */
#settings {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 5px;
    margin-top: 20px;
}

#settings h3, #instructions h3 {
    color: #fff;
    padding: 10px;
}

#settings label {
    color: rgba(255, 255, 255, 0.8);
}

/* Instructions section */
#instructions {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 5px;
    margin-top: 20px;
    padding: 10px;
}

#instructions ul {
    color: rgba(255, 255, 255, 0.8);
}

#instructions li {
    margin-bottom: 8px;
}

/* Error message */
.input-error {
    color: #ff6b6b !important;
    font-size: 14px !important;
}

/* Loading Spinner Styles */
.loading-spinner {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.8);
    z-index: 9999;
}

.loading-spinner .spinner {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 50px;
    height: 50px;
    border: 4px solid #333;
    border-top: 4px solid #fff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.loading-spinner .loading-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, calc(-50% + 60px));
    color: #fff;
    font-size: 18px;
    font-weight: bold;
    text-align: center;
    white-space: nowrap;
}

@keyframes spin {
    from {
        transform: translate(-50%, -50%) rotate(0deg);
    }
    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

/* Make sure the spinner shows up on top of everything */
.loading-spinner.show {
    display: block !important;
}
