/* MCAP.IO skin. Palette and fonts mirror brand/theme.json (src/client/js/theme.json). */
:root {
    --bg: #121722;
    --panel: #1B2230;
    --panel-edge: #2A3345;
    --text: #E8ECF4;
    --muted: #8B95A8;
    --green: #2EBD85;
    --green-deep: #1A7F59;
    --red: #F6465D;
    --gold: #F0B90B;
    --grid: #222B3B;
    --font-ui: Archivo, "Helvetica Neue", Arial, sans-serif;
    --font-num: "IBM Plex Mono", ui-monospace, Menlo, monospace;
}

* {
    font-family: var(--font-ui);
    font-size: 14px;
}

html, body {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
    background-color: var(--bg);
    color: var(--text);
    overflow: hidden;
}

html, body, canvas {
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    background: var(--bg);
}

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+ */
}

/* Mobile controls: airdrop (split) and dump (eject) */
#split, #feed {
    position: absolute;
    bottom: 16px;
    width: 88px;
    height: 88px;
    border-radius: 50%;
    border: 2px solid var(--panel-edge);
    background: rgba(27, 34, 48, 0.88);
    color: var(--text);
    font-weight: 700;
    font-size: 15px;
    cursor: pointer;
}

#split {
    left: 16px;
    border-color: var(--green);
}

#feed {
    right: 16px;
    border-color: var(--red);
}

#split:active { background: var(--green-deep); }
#feed:active { background: #A8283A; }

/* Leaderboard */
#status {
    position: absolute;
    top: 12px;
    right: 12px;
    min-width: 220px;
    padding: 12px 14px 10px;
    background: rgba(27, 34, 48, 0.9);
    border: 1px solid var(--panel-edge);
    border-radius: 10px;
    color: var(--text);
}

#status .title {
    display: block;
    font-size: 15px;
    font-weight: 800;
    font-stretch: 112%;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--panel-edge);
}

#status .board {
    list-style: none;
    margin: 6px 0 0;
    padding: 0;
}

#status .board li {
    display: grid;
    grid-template-columns: 20px 1fr auto;
    gap: 8px;
    align-items: baseline;
    padding: 3px 0;
}

#status .board span {
    font-size: 13px;
}

#status .rank {
    color: var(--muted);
    font-family: var(--font-num);
}

#status .tk {
    font-family: var(--font-num);
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

#status .mc {
    font-family: var(--font-num);
    font-weight: 500;
    color: var(--green);
    text-align: right;
}

#status .me .tk {
    color: var(--gold);
}

/* Chat */
.chatbox {
    position: absolute;
    width: 300px;
    height: 320px;
    background: rgba(27, 34, 48, 0.88);
    border: 1px solid var(--panel-edge);
    bottom: 12px;
    left: 12px;
    border-radius: 10px;
    pointer-events: none;
    overflow: hidden;
}

.chatbox .chat-list {
    padding: 8px;
    margin: 0;
    list-style: none;
    box-sizing: border-box;
    height: 283px;
    overflow: hidden;
    color: var(--text);
}

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

.chatbox .chat-list li b {
    font-family: var(--font-num);
    font-weight: 600;
}

.chatbox .chat-list li.me b {
    color: var(--gold);
}

.chatbox .chat-list li.friend b {
    color: var(--green);
}

.chatbox .chat-list li.system {
    color: var(--muted);
}

.chatbox .chat-list li.system b {
    color: var(--text);
}

.chatbox .chat-input {
    pointer-events: all;
    box-sizing: border-box;
    width: 100%;
    padding: 10px;
    background: transparent;
    color: var(--text);
    border: none;
    border-top: 1px solid var(--panel-edge);
    outline: none;
}

.chatbox .chat-input::placeholder {
    color: var(--muted);
}

/* Start screen: dark chart backdrop, one slate panel */
#startMenuWrapper {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 2;
    overflow-y: auto;
    background-color: var(--bg);
    background-image:
        linear-gradient(var(--grid) 1px, transparent 1px),
        linear-gradient(90deg, var(--grid) 1px, transparent 1px);
    background-size: 56px 56px;
    background-position: center center;
}

#startMenu {
    position: relative;
    margin: 9vh auto 48px;
    width: 400px;
    max-width: calc(100% - 32px);
    padding: 28px 28px 24px;
    border-radius: 14px;
    background-color: var(--panel);
    border: 1px solid var(--panel-edge);
    box-shadow: 0 24px 60px rgba(5, 8, 14, 0.55);
    box-sizing: border-box;
}

#startMenu .wordmark {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0;
}

#startMenu .wordmark .mark {
    width: 44px;
    height: 44px;
    flex: none;
}

#startMenu .wordmark span {
    font-size: 40px;
    line-height: 1;
    font-weight: 800;
    font-stretch: 112%;
    letter-spacing: -0.01em;
    color: var(--text);
}

#startMenu .tagline {
    margin: 12px 0 22px;
    font-size: 15px;
    line-height: 1.45;
    color: var(--muted);
}

/* Ticker field: "$" adornment appears once something is typed */
.ticker-box {
    display: flex;
    align-items: center;
    height: 56px;
    padding: 0 14px;
    border: 1px solid var(--panel-edge);
    border-radius: 10px;
    background: var(--bg);
    cursor: text;
    transition: border-color 0.15s;
}

.ticker-box:focus-within {
    border-color: var(--green);
}

.ticker-box .dollar {
    font-family: var(--font-num);
    font-weight: 600;
    font-size: 22px;
    color: var(--green);
    margin-right: 2px;
}

.ticker-box:has(input:placeholder-shown) .dollar {
    display: none;
}

#playerNameInput {
    flex: 1;
    min-width: 0;
    height: 100%;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--text);
    font-family: var(--font-num);
    font-weight: 600;
    font-size: 22px;
    text-transform: uppercase;
    outline: none;
}

#playerNameInput::placeholder {
    font-family: var(--font-ui);
    font-weight: 500;
    font-size: 18px;
    text-transform: none;
    color: var(--muted);
}

#caInput {
    display: block;
    width: 100%;
    height: 44px;
    margin-top: 4px;
    padding: 0 14px;
    box-sizing: border-box;
    border: 1px solid var(--panel-edge);
    border-radius: 10px;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-num);
    font-size: 13px;
    outline: none;
    transition: border-color 0.15s;
}

#caInput::placeholder {
    font-family: var(--font-ui);
    font-size: 14px;
    color: var(--muted);
}

#caInput:focus {
    border-color: var(--green);
}

#startMenu .input-error {
    display: block;
    min-height: 18px;
    padding: 4px 2px 2px;
    color: var(--red);
    opacity: 0;
    font-size: 13px;
    font-weight: 600;
}

#startButton, #spectateButton, #settingsButton {
    position: relative;
    box-sizing: border-box;
    cursor: pointer;
    border-radius: 10px;
    font-weight: 700;
    transition: background-color 0.15s, border-color 0.15s, color 0.15s;
}

#startButton {
    display: block;
    width: 100%;
    height: 54px;
    margin-top: 16px;
    border: 0;
    background: var(--green);
    color: #0B1A13;
    font-size: 18px;
    font-weight: 800;
    font-stretch: 112%;
}

#startButton:hover {
    background: #36CC91;
}

#startButton:active {
    top: 1px;
    background: var(--green-deep);
    color: var(--text);
}

#startMenu .secondary {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

#spectateButton, #settingsButton {
    height: 44px;
    border: 1px solid var(--panel-edge);
    background: transparent;
    color: var(--text);
    font-size: 15px;
}

#spectateButton {
    flex: 1;
}

#settingsButton {
    padding: 0 16px;
    color: var(--muted);
}

#spectateButton:hover, #settingsButton:hover {
    border-color: var(--muted);
    color: var(--text);
}

#startButton:focus-visible, #spectateButton:focus-visible, #settingsButton:focus-visible {
    outline: 2px solid var(--gold);
    outline-offset: 2px;
}

#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;
}

#settings {
    max-height: 0;
    overflow: hidden;
}

#settings ul {
    list-style: none;
    margin: 14px 0 0;
    padding: 12px 14px;
    border-radius: 10px;
    background: var(--bg);
}

#settings li {
    padding: 5px 0;
}

#settings label {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text);
    cursor: pointer;
}

#settings input[type="checkbox"] {
    accent-color: var(--green);
    width: 16px;
    height: 16px;
    margin: 0;
}

#instructions {
    margin-top: 22px;
    padding-top: 18px;
    border-top: 1px solid var(--panel-edge);
}

#instructions h3 {
    margin: 0 0 12px;
    font-size: 15px;
    font-weight: 700;
    color: var(--text);
}

#instructions dl {
    display: grid;
    grid-template-columns: 64px 1fr;
    gap: 8px 12px;
    margin: 0;
}

#instructions dt {
    justify-self: start;
    align-self: start;
    padding: 1px 7px;
    border: 1px solid var(--panel-edge);
    border-radius: 6px;
    font-family: var(--font-num);
    font-size: 12px;
    font-weight: 600;
    color: var(--text);
    line-height: 1.5;
}

#instructions dd {
    margin: 0;
    color: var(--muted);
    line-height: 1.5;
}

#instructions .hint {
    margin: 14px 0 0;
    color: var(--muted);
    line-height: 1.5;
}

#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;
        }
}

@media only screen and (max-width: 480px) {
    #startMenu {
        margin-top: 16px;
        padding: 22px 18px 20px;
    }
    #startMenu .wordmark span {
        font-size: 34px;
    }
    #status {
        min-width: 0;
        width: 168px;
        padding: 10px 10px 8px;
    }
    #status .board li {
        grid-template-columns: 16px 1fr auto;
        gap: 6px;
    }
    #status .board span {
        font-size: 12px;
    }
}

@media (prefers-reduced-motion: reduce) {
    #settings, #startMenuWrapper, .ticker-box, #startButton {
        transition: none;
    }
}

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

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