/* Obur.io — main page styles. Copyright (c) 2026 kurmay. All rights reserved.
   Layout, sizes and colors the mod menu themes are made for.
   Measured at 1366x768; obur.js scales .flex-menu down on smaller windows. */

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}
/* the mod menu sizes its corners in rem against this 10px root */
html {
    font-family: Arial, sans-serif;
    font-size: 10px;
    -webkit-tap-highlight-color: transparent;
}
body {
    background: #000;
    font-family: Arial, sans-serif;
    font-size: 14px;
    line-height: 1.42857143;
    color: #333;
    -webkit-text-size-adjust: none;
}
/* form controls inherit color and font (normalize.css, as on the original page): the mod menu relies on it */
button, input, optgroup, select, textarea { margin: 0; color: inherit; font: inherit; }
button { overflow: visible; text-transform: none; cursor: pointer; border: none; }
input { line-height: normal; }
button, input, select, textarea { font-family: inherit; font-size: inherit; line-height: inherit; }
input[type="checkbox"], input[type="radio"] { box-sizing: border-box; padding: 0; margin: 4px 0 0; line-height: normal; cursor: pointer; }
a { background-color: rgba(255, 255, 255, 0); color: #337ab7; text-decoration: none; }
b, strong { font-weight: 700; }
img { border: 0; vertical-align: middle; }
svg:not(:root) { overflow: hidden; }
canvas { display: inline-block; vertical-align: baseline; }
hr { height: 0; box-sizing: content-box; margin-top: 20px; margin-bottom: 20px; border: 0; border-top: 1px solid #eee; }
label { display: inline-block; max-width: 100%; margin-bottom: 5px; font-weight: 700; }
ul, ol { margin-top: 0; margin-bottom: 10px; }
p { margin: 0 0 10px; }
h1, h2, h3, h4 { margin: 0; }
/* headings the mod builds (theme editor) use the original page's heading base */
.themeEditor h3 { margin: 20px 0 10px; font-family: inherit; font-size: 24px; font-weight: 500; line-height: 1.1; color: inherit; }
.hide, .line--hidden { display: none !important; }

#canvas { position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; z-index: 1; }

/* ---------- page ---------- */
main.body__inner { position: relative; width: 100%; height: 100%; overflow: hidden; z-index: 2; pointer-events: none; }
main.body__inner > * { pointer-events: auto; }
#overlays { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0, 0, 0, .5); }

.container.center {
    position: relative;
    z-index: 10; /* above the game canvas, which the client puts into main */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 1170px;
    max-width: 100%;
    height: 100%;
    margin: 0 auto;
    padding: 0 15px;
    pointer-events: none;
}
.container.center > * { pointer-events: auto; }
.flex-menu { width: 920px; transform-origin: center center; }

.line { position: relative; display: flex; align-items: center; gap: 10px; margin: auto; }
#__line1 { height: 511px; }

#shop-popup {
    position: absolute;
    top: -40px;
    left: 0;
    z-index: 200;
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 920px;
    height: 30px;
    padding: 0 70px;
    border-radius: 12px;
    background: #005f85;
    color: #fff;
    font-weight: 700;
    text-align: center;
}

.menu-wrapper { position: relative; }
.menu-wrapper.top {
    z-index: 501;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    width: 300px;
    height: 510px;
    margin: 0 0 1px;
    overflow: hidden;
}

/* ---------- left: profile ---------- */
#left-menu {
    z-index: 1000;
    display: block;
    flex: none;
    height: 250px;
    margin: 0 0 10px;
    padding: 20px;
    border: 1px solid transparent;
    border-radius: 15px;
    background: #fff;
}
.profile-header {
    position: relative;
    display: flex;
    align-items: center;
    height: 120px;
    padding: 10px;
    border-radius: 10px;
    background: #f1f5f9;
}
.profile-image {
    position: absolute;
    top: 10px;
    left: 10px;
    width: 52px;
    height: 52px;
    overflow: hidden;
    border: 1px solid #c8c9d9;
    border-radius: 100%;
    background: #c8c9d9;
}
.profile-image-icon { position: relative; display: block; width: 50px; height: 50px; object-fit: cover; }
.profile-body { position: absolute; top: 43px; left: 72px; right: 9px; display: flex; flex-direction: column; align-items: flex-start; }
.profile-name {
    position: relative;
    z-index: 1;
    max-width: 100%;
    margin: 0;
    overflow: hidden;
    color: #333136;
    font-size: 18px;
    font-weight: 700;
    line-height: normal;
    white-space: nowrap;
    text-overflow: ellipsis;
}
.progress-row { display: flex; }
.new-meter {
    position: absolute;
    top: 79px;
    left: 24px;
    width: 176px;
    height: 30px;
    border: 2px solid #54c801;
    border-radius: 6px;
}
#user-line-progress {
    position: relative;
    z-index: 1;
    display: block;
    width: 0;
    max-width: 100%;
    height: 26px;
    overflow: hidden;
    border-radius: 0 4px 4px 0;
    background: #54c801;
    transition: width .4s ease;
}
#progress-next {
    position: relative;
    top: -26px;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 26px;
    color: #333136;
    font-size: 11.667px;
    font-weight: 700;
    line-height: normal;
    text-align: center;
}
.agario-star-level { position: relative; top: -58px; left: -16px; z-index: 3; width: 35px; height: 35px; }
.agario-star-level img { display: block; width: 35px; height: 35px; }
.user-level {
    position: relative;
    top: -27px;
    z-index: 4;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 35px;
    height: 20px;
    font-weight: 600;
}
#user-level { color: #fff; font-weight: 600; text-shadow: 0 0 2px #a35a00, 0 1px 1px #a35a00; }
.progress-row > button {
    position: absolute;
    top: 60px;
    right: 10px;
    width: 45px;
    height: 50px;
    padding: 1px 6px;
    background: #f0f0f0;
    border-radius: 0;
}
.progress-row > button img { position: absolute; top: 1px; left: 6px; width: 34px; height: 32px; }
.progress-row > button span {
    position: absolute;
    top: 19.4px;
    right: -2px;
    color: #db8412;
    font-size: 13px;
    font-weight: 700;
    line-height: 18.57px;
}
#boost_timer { position: absolute; bottom: 1px; left: 0; right: 0; color: #2a652e; font-size: 9px; font-weight: 700; line-height: 10px; white-space: nowrap; }

.coins {
    position: absolute;
    top: 10px;
    right: 10px;
    display: flex;
    align-items: center;
    height: 20px;
    border-radius: 6px;
    font-size: 16px;
}
.coins-num {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
    min-width: 60px;
    height: 20px;
    padding: 0 8px;
    border-radius: 3px;
    background: #b4b2b5;
}
.coins-value { position: relative; color: #fff; font-size: 12px; font-weight: 500; line-height: normal; }
.coins-num__coin { display: block; width: 16px; height: 16px; }
.coins .plus {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    margin: 0 0 0 5px;
    padding: 1px 6px;
    border-radius: 5px;
    background: linear-gradient(#5dd971 0, #479d48 100%);
}
.coins .plus::before, .coins .plus::after,
.skin-select__icon-cross-items::before, .skin-select__icon-cross-items::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    background: #fff;
}
.coins .plus::before { width: 2px; height: 10px; transform: translate(-1px, -5px); }
.coins .plus::after { width: 10px; height: 2px; transform: translate(-5px, -1px); }

#offers-block { display: flex; flex-direction: column; gap: 10px; margin: 11px 0 0; }
#offers-block > div { display: flex; justify-content: space-between; align-items: center; gap: 11px; height: 37px; }
#free-chest-button, #collect-button, #shop-button, #sigma-button {
    position: relative;
    height: 37px;
    padding: 1px 6px;
    border-radius: 6px;
    color: #fff;
    font-size: 16px;
    font-weight: 500;
    text-align: left;
}
#free-chest-button, #shop-button, #collect-button { width: 120px; }
#free-chest-button, #collect-button { background: #2a652e; }
#shop-button { background: #1150c5; }
#sigma-button { width: 258px; background: #745001; }
#free-chest-button img { position: absolute; top: -5px; left: 10px; width: 42px; height: 36px; }
#shop-button img { position: absolute; top: -7px; left: 10px; width: 38px; height: 38px; }
#collect-button img { position: absolute; top: 3px; left: 10px; width: 30px; height: 30px; }
#sigma-button img { position: absolute; top: -5px; left: 44px; width: 52px; height: 36px; }
#free-chest-button > div, #shop-button > div, #collect-button > div, #sigma-button > div {
    position: relative;
    top: -1px;
    left: 44px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    height: 35px;
}
#sigma-button > div { left: 92px; }
#collect-button > div { gap: 2px; align-items: flex-start; font-size: 11px; }

/* the side slots hold the daily challenges and the news */
.text-block { border: 1px solid transparent; border-radius: 15px; }
#left_ad_block, #text-block { height: 250px; }
.text-block .right-menu {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
    padding: 12px 14px;
    overflow: hidden;
    border-radius: 15px;
    background: #fff;
}
.panel-title { margin: 0 0 8px; color: inherit; font-size: 15px; font-weight: 700; text-align: center; }
.challenges-panel, .news-panel { display: flex; flex-direction: column; gap: 6px; min-height: 0; overflow-y: auto; font-size: 12px; }
.challenge-line {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    padding: 6px 8px;
    border-radius: 8px;
    background: rgba(128, 128, 128, .14);
    color: inherit;
}
.challenge-line.done { opacity: .55; text-decoration: line-through; }
.challenge-line button { flex: none; padding: 3px 8px; border-radius: 6px; background: #286230; color: #fff; font-size: 11px; font-weight: 500; }
.challenge-progress { flex: none; font-weight: 700; white-space: nowrap; }
.news-item { padding: 6px 8px; border-radius: 8px; background: rgba(128, 128, 128, .14); color: inherit; cursor: pointer; }
.news-item b { display: block; margin-bottom: 2px; font-size: 13px; }

/* ---------- center menu ---------- */
#menu-wrapper { display: flex; align-items: center; }
.menu-wrapper-center { width: 300px; height: 511px; }
#menu.menu-center {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 300px;
    height: 511px;
    padding: 20px;
    border-radius: 15px;
    background: #fff;
}
#menu.menu-center > div:first-child { display: flex; flex-direction: column; }
#center-header { display: flex; justify-content: space-between; align-items: center; min-height: 20px; }
#center-header button { padding: 0; background: none; color: inherit; font-size: 18px; font-weight: 500; line-height: 18px; text-align: center; }
#clans_and_settings { display: flex; align-items: center; gap: 14px; margin-left: auto; }
#clans_and_settings > div { width: 1px; height: 20px; background: #dedede; }
#clans_and_settings button[name="settings"] { width: 20px; height: 20px; }
#clans_and_settings svg { display: block; }

.menu-center-content { width: 240px; margin: 28px 10px 0; }
.menu__title { margin: 0 0 20px; text-align: center; }
.menu-center #title { margin: 0; color: #333136; font-size: 26px; font-weight: 700; line-height: normal; text-align: center; }
.menu-center .menu__item { margin: 28px 0; }

.menu__form-group { margin: 0 0 28px; }
.form-group__flex { display: flex; align-items: center; height: 83px; }
.form-group__flex > .form-group__row { margin: 0 17px 0 0; }
.skin-select { display: inline-block; width: 72px; height: 72px; }
.skin-select__inner { position: relative; width: 72px; height: 72px; }
.skin-select__icon-cross {
    position: absolute;
    top: -2px;
    left: -2px;
    z-index: 2;
    width: 25px;
    height: 25px;
    border: 1px solid #5db75d;
    border-radius: 50%;
    background: #43a952;
    cursor: pointer;
}
#skin-select_remove { border-color: #f02626; background: #f02626; box-shadow: 1px 1px 3px rgba(0, 0, 0, .6); }
#skin-select_remove .skin-select__icon-cross-items { transform: rotate(45deg); }
.skin-select__icon-cross-items { position: relative; width: 23px; height: 23px; }
.skin-select__icon-cross-items::before { width: 2px; height: 13.8px; transform: translate(-1px, -6.9px); }
.skin-select__icon-cross-items::after { width: 13.8px; height: 2px; transform: translate(-6.9px, -1px); }
#skin-select_remove .skin-select__icon-cross-items::before { height: 15.2px; transform: translate(-1px, -7.6px); }
#skin-select_remove .skin-select__icon-cross-items::after { width: 15.2px; transform: translate(-7.6px, -1px); }
.skin-select__icon {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 72px;
    height: 72px;
    border: 1px solid #c8c9d9;
    border-radius: 50%;
    background-color: transparent;
    background-image: repeating-linear-gradient(45deg, transparent, transparent 1px, #f1f1f1 2px, #f1f1f1 3px),
        repeating-linear-gradient(-45deg, transparent, transparent 1px, #f1f1f1 2px, #f1f1f1 3px);
    background-position: 0 0;
    background-size: 100% auto;
    box-shadow: 0 0 10px rgba(51, 49, 54, .25);
    cursor: pointer;
}
.skin-select__icon.has-skin .skin-select__icon-text { display: none; }
.skin-select__icon-text { color: #000; font-size: 16px; line-height: 16px; user-select: none; }
.form-group__rows { position: relative; flex: 1 1 auto; }
.form-group__rows > .form-group__row { margin: 5px 0; }
.form-control {
    display: block;
    width: 100%;
    height: 34px;
    padding: 6px 12px;
    border: 1px solid #a2a2a2;
    border-radius: 4px;
    background: #fff;
    box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075);
    color: #555;
    font-size: 14px;
    line-height: 1.42857;
    outline: none;
}
.form-control:focus { border-color: #66afe9; box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 8px rgba(102, 175, 233, .6); }
#password.form-control { margin: 5px 0; }

.mode-btns { display: flex; justify-content: space-between; align-items: center; gap: 6px; height: 36px; }
.btn {
    display: inline-block;
    padding: 6px 12px;
    margin-bottom: 0;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.42857143;
    text-align: center;
    white-space: nowrap;
    vertical-align: middle;
    touch-action: manipulation;
    cursor: pointer;
    user-select: none;
    background-image: none;
    border: 1px solid rgba(255, 255, 255, 0);
    border-radius: 4px;
}
#play-btn { flex: 1; height: 36px; }
#play-btn:disabled, #spectate-btn:disabled { opacity: .65; cursor: wait; }
#spectate-btn { display: flex; align-items: center; width: 36px; height: 36px; padding: 0; background: none; }
#spectate-btn img { display: block; width: 36px; height: 36px; }
.sign-in-btn, .sign-in-out-btn {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 240px;
    height: 34px;
    margin: 13px 0 0;
    border: 1px solid #c1c1c1;
    border-radius: 4px;
    background: #fff;
    color: #757575;
    line-height: 18px;
    text-align: center;
    cursor: pointer;
}
.sign-in-btn img { width: 38px; height: 18px; padding: 0 10px; object-fit: contain; }
.sign-in-out-btn { margin: 10px 0 0; border-color: #f02626; background: #f02626; color: #fff; font-weight: 500; border-radius: 6px; }

.ch-lang__items { display: flex; justify-content: center; gap: 12px; height: 32px; margin: 0; padding: 0; list-style: none; font-size: 0; line-height: 0; }
.ch-lang__btn { display: block; }
.ch-lang__flag { display: block; width: 32px; height: 32px; }
.ch-lang__btn:not(.active) .ch-lang__flag { opacity: .9; }

.flex-col { display: flex; flex-direction: column; gap: 10px; }
#tournament_link, #discord_link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    height: 36px;
    margin: 0 10px;
    border-radius: 6px;
    color: #fff;
    font-weight: 500;
}
#tournament_link { border: 1px solid #1f1f20; background: #1f1f20; }
#tournament_link img { width: 32px; height: 32px; }
#discord_link { gap: 0; border: 1px solid #5865f2; background: #5865f2; }
#discord_link span { margin: 0 0 0 4px; color: #fff; }
/* the mod menu puts its discord buttons here; with one button it takes the whole row */
#dclinkdiv .dclinks:only-child { flex: 1; margin: 0 10px !important; }

/* ---------- right ---------- */
#right-menu { display: flex; flex-direction: column; align-items: stretch; }
.top-users { height: 250px; margin: 0 0 10px; overflow: hidden; border-radius: 15px; background: #fff; }
.top-users_buttons { display: flex; justify-content: space-between; height: 36px; border-radius: 15px 15px 0 0; }
.top-users_buttons button { width: 150px; height: 36px; padding: 1px 6px; background: #f1f5f9; color: inherit; font-weight: 700; text-align: center; }
.top-users_buttons button.active { background: #fff; }
.top-users__inner { position: relative; height: 214px; padding: 10px; overflow-y: auto; border-radius: 15px; background: #fff; }
.top-users { color: #333136; }
.top-users__inner table { width: 100%; border-collapse: collapse; color: inherit; font-size: 13px; line-height: 1.42857; }
.top-users__inner th { padding: 1px; font-weight: 700; text-align: center; }
.top-users__inner td { padding: 1px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.top-users__inner td:first-child { width: 22px; text-align: center; }
.top-users__inner td:nth-child(2) { max-width: 150px; }
.top-users__inner td:last-child { text-align: right; }
.top-users__inner td img { width: 15px; height: 15px; margin-left: 2px; vertical-align: -3px; }

.ad_bottom {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 738px;
    height: 100px;
    margin: 5px 91px;
    padding: 5px;
    border-radius: 15px;
    background: #fff;
    color: #333136;
    font-size: 14px;
    text-align: center;
}
.text-block .right-menu { color: #333136; }

/* ---------- death screen ---------- */
#__line2 { width: 300px; }
.menu-wrapper--stats-mode { display: flex; flex-direction: column; align-items: center; width: 300px; }
#menu.menu--stats-mode { width: 330px; padding: 20px; border-radius: 10px; background: #fff; color: #333136; }
.menu--stats-mode .menu__title { margin: 0 0 20px; text-align: center; }
.menu--stats-mode #title { margin: 0; color: inherit; font-size: 26px; font-weight: 700; line-height: normal; text-align: center; }
#menu__bonus { margin: 0 0 10px; text-align: center; }
.stats__inner { position: relative; }
.stats__ver { position: absolute; top: 42px; width: 140px; height: .5px; background: #bfbfbf; }
.stats__ver-l { left: 0; }
.stats__ver-r { left: 150px; }
.stats__items { display: grid; grid-template-columns: 1fr 1fr; gap: 20px 5px; }
.stats__item { position: relative; }
.stats__item-title, .stats__item-value { display: block; color: inherit; line-height: 16px; text-align: center; }
.stats__item-title { font-weight: 500; }
.stats__hor { position: absolute; top: 0; left: 145px; width: .5px; height: 32px; background: #bfbfbf; }
.stats-btn__inner { margin: 20px 0 0; }
.stats-btn__continue {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 36px;
    margin: 0 0 15px;
    padding: 1px 6px;
    border-radius: 6px;
    background: #3966d1;
    color: #fff;
    font-weight: 500;
}
.stats-btn__row { display: flex; justify-content: center; align-items: center; gap: 6px; padding: 0 0 5px; color: inherit; font-size: 16px; font-weight: 500; }
.stats-btn__share-btn { width: 20px; height: 20px; padding: 0; background: none; }
.stats-btn__share-btn svg { display: block; }
.ad-block, .ad-block-left, .ad-block-right { display: none; }

/* ---------- chat ---------- */
.chatblock { position: fixed; left: 0; bottom: 0; z-index: 300; width: 100%; height: 0; }
.chatblock__button {
    position: fixed;
    left: 10px;
    bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 30px;
    padding: 1px 6px;
    border-radius: 10px 1px 1px 5px;
    background: #e37955;
}
.chatblock__textarea {
    position: fixed;
    left: 46px;
    bottom: 10px;
    width: 400px;
    height: 30px;
    padding: 4px;
    border: none;
    border-radius: 0 10px 10px 0;
    background: #444;
    color: #fff;
    font-size: 14px;
    outline: none;
}
.chatblock__scrollbar { display: none; }
.chatblock__scrollbar-thumb { position: absolute; left: 0; width: 6px; border-radius: 3px; background: #fc7200; }

/* ---------- top right links ---------- */
#menu-links {
    position: absolute;
    top: 0;
    right: 0;
    z-index: 100;
    padding: 6px 12px;
    border: 1px solid transparent;
    border-radius: 0 0 0 10px;
    background: #fff;
    color: #333;
    text-align: center;
}
#menu-links .link, #menu-links .link_btn { padding: 0; background: none; color: #365c7c; font-size: 14px; font-family: inherit; }
#menu-links .link_btn { display: inline-block; }

/* ---------- ctrl modals (how to play, settings) ---------- */
.ctrl-modal--hidden { display: none; }
.ctrl-modal__overlay {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 10000;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    width: 100%;
    height: 100vh;
    overflow-y: auto;
    background: rgba(0, 0, 0, .5);
}
.ctrl-modal__modal { margin: 30vh 0 35vh; padding: 20px 20px 40px; border-radius: 15px; background: #fff; }
#cm_modal__settings .ctrl-modal__modal { width: 330px; }
#cm_modal__rules .ctrl-modal__modal { width: 440px; max-width: calc(100% - 20px); margin-top: 20vh; padding: 15px; }
.ctrl-modal__header { display: flex; }
.ctrl-modal__title { flex: 1; margin: 10px 0; color: #333; font-size: 24px; font-weight: 500; line-height: 1.1; text-align: center; }
.ctrl-modal__close { display: flex; align-items: center; justify-content: center; width: 16px; padding: 0; background: none; }
.ctrl-modal__content { color: #333; }
#rules-content h5 { margin: 10px 0 4px; font-size: 15px; }
#rules-content ul { margin: 0; padding-left: 18px; }
.ctrl-modal__footer { padding: 10px 0 0; text-align: center; }
.btn-success { height: 36px; background: #286230; border-color: #286230; border-radius: 6px; color: #fff; font-size: 14px; font-weight: 500; }

.ctrl-modal .menu__item { margin-top: 20px; margin-bottom: 20px; }
.ctrl-modal .menu__item:last-child { margin-bottom: 0; }
.checkbox-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(calc(50% - 10px), 1fr)); gap: 5px 10px; margin: 0 0 10px; padding: 0; list-style: none; }
#settings > .checkbox-grid { grid-template-columns: .9fr 1.1fr; }
.checkbox-grid li { overflow: hidden; line-height: 20px; }
.checkbox-grid > input, .checkbox-grid > label { line-height: 20px; }
#settings label { margin-right: 10px; user-select: none; }

/* pretty-checkbox 3.0 (MIT, Lokesh Rajendran), the parts the settings use */
.pretty * { box-sizing: border-box; }
.pretty { position: relative; display: inline-block; margin-right: 1em; white-space: nowrap; line-height: 1; }
.pretty input { position: absolute; top: 0; left: 0; z-index: 2; min-width: 1em; width: 100%; height: 100%; margin: 0; padding: 0; opacity: 0; cursor: pointer; }
.pretty .state label { position: initial; display: inline-block; min-width: calc(1em + 2px); margin: 0; font-weight: 400; text-indent: 1.5em; }
.pretty .state label::before, .pretty .state label::after {
    content: "";
    position: absolute;
    top: calc(-108% + 1em);
    left: 0;
    z-index: 0;
    display: block;
    box-sizing: border-box;
    width: calc(1em + 2px);
    height: calc(1em + 2px);
    border: 1px solid rgba(255, 255, 255, 0);
    border-radius: 0;
    background-color: rgba(255, 255, 255, 0);
}
.pretty .state label::before { border-color: #bdc3c7; }
.pretty.p-svg .state .svg {
    position: absolute;
    top: calc(-108% + 1em);
    left: 0;
    z-index: 1;
    width: calc(1em + 2px);
    height: calc(1em + 2px);
    border: 1px solid rgba(255, 255, 255, 0);
    font-size: 1em;
    line-height: normal;
    text-align: center;
    opacity: 0;
}
.pretty.p-svg .state svg { display: flex; flex: 1 1 0%; justify-content: center; align-items: center; width: 100%; height: 100%; margin: 0; line-height: 1; text-align: center; }
.pretty.p-svg input:checked ~ .state .svg { opacity: 1; }
.pretty.p-round .state label::before, .pretty.p-round .state label::after { border-radius: 100%; }
.pretty.p-smooth .svg, .pretty.p-smooth label::before, .pretty.p-smooth label::after { transition: .5s; }
.pretty.p-smooth input:checked + .state label::after { transition: .3s; }
.pretty.p-smooth input:checked + .state .svg { animation: pretty-zoom .2s ease; }
.pretty input:checked ~ .state.p-success label::after { background-color: #5cb85c !important; }
.pretty input:checked ~ .state.p-success .svg { color: #fff; stroke: #fff; }
@keyframes pretty-zoom { 0% { opacity: 0; transform: scale(0); } }

/* ---------- alert modals ---------- */
.connecting {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 9000;
    display: none;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, .5);
}
.connecting__content {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 440px;
    max-width: calc(100% - 20px);
    max-height: calc(100% - 20px);
    overflow-y: auto;
    transform: translate(-50%, -50%);
}
.connecting__content:not(:has(> .alert)) { padding: 24px 20px; border-radius: 15px; background: #fff; color: #333136; }
.connecting__content h2 { margin: 0 0 14px; color: #333136; font-size: 22px; font-weight: 500; text-align: center; }
.alert {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 15.5px;
    padding: 30px 20px;
    border: 1px solid #fff;
    border-radius: 4px;
    background: #fff;
}
.alert-danger { color: #d32b27; }
.alert-success { color: #2a652e; }
.mb-0 { margin-bottom: 0; }
.connecting-header { position: relative; display: flex; align-items: center; }
.alert-heading { display: flex; align-items: center; gap: 6px; margin: 0 auto; font-size: 20px; font-weight: 500; }
.alert-danger .alert-heading { color: #e04644; }
.alert p { color: #333136; font-size: 16px; font-weight: 500; text-align: center; }
.close-connecting-button { position: absolute; top: 10px; right: 14px; color: #333136; font-size: 18px; cursor: pointer; }
.alert .close-connecting-button { top: -18px; right: -6px; color: #999; font-size: 16px; }
.alert-danger .close-connecting-button { display: none; }
.free-coins-body { display: flex; flex-direction: column; align-items: center; gap: 8px; color: #333136; text-align: center; }
.free-coins-body > div { display: flex; flex-direction: column; align-items: center; }
.free-coins-body p { display: flex; align-items: center; gap: 6px; margin: 0; }
#free-coins-value, #reward-coins-value, #challenge-coins-value { color: #db8412; font-size: 26px; font-weight: 700; }
.loading-bar { height: 6px; overflow: hidden; border-radius: 3px; background: #eee; }
.loading-bar-progress { width: 40%; height: 100%; background: #286230; animation: loading 1.2s ease-in-out infinite; }
@keyframes loading { 0% { transform: translateX(-100%); } 100% { transform: translateX(250%); } }
#connecting { z-index: 8000; background: transparent; pointer-events: none; }
#connecting .connecting__content { top: 24px; width: 240px; transform: translateX(-50%); pointer-events: auto; box-shadow: 0 4px 16px rgba(0, 0, 0, .4); }
#connecting .alert { padding: 14px 18px; gap: 10px; color: #333136; }
#connecting .alert-heading { font-size: 16px; }

/* clans */
#clans-list { display: flex; flex-direction: column; gap: 6px; max-height: 300px; margin: 0 0 12px; overflow-y: auto; }
.clans-item { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 10px; border-radius: 8px; background: #f1f5f9; }
.clans-item > div > b { display: block; }
.clans-item > div > span { font-size: 12px; opacity: .75; }
.clans-item button, #clans-input button, .clan-action { padding: 6px 12px; border-radius: 6px; background: #286230; color: #fff; font-weight: 500; }
#clans-input { display: flex; gap: 6px; }
#clans-input input { flex: 1; height: 34px; padding: 6px 12px; border: 1px solid #a2a2a2; border-radius: 4px; outline: none; }
#clan-members { display: flex; flex-direction: column; gap: 4px; max-height: 260px; margin: 8px 0; overflow-y: auto; }
.member-row { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 8px; background: #f1f5f9; }
.member-index { width: 18px; font-weight: 700; }
.member-desc { flex: 1; }
.member-desc > p { margin: 0; }
.member-desc > p:first-child { font-weight: 700; }
.member-level { font-size: 11px; opacity: .7; }
.member-online { width: 8px; height: 8px; border-radius: 50%; background: #b23939; }
.member-online.on { background: #3db239; }
#clan-requests { display: flex; flex-direction: column; gap: 4px; }
#clan-leave { margin: 12px 0 0; text-align: center; }
#clan-leave > div { display: inline-block; padding: 6px 14px; border-radius: 6px; background: #f02626; color: #fff; font-weight: 500; cursor: pointer; }
#leave-buttons, #assign-buttons { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
#leave-buttons button, #assign-buttons button { padding: 8px 14px; border-radius: 6px; color: #fff; font-weight: 500; }
.leave-cancel { background: #777; }
.leave-ok, .btn-expel { background: #f02626; }
.btn-member { background: #607d8b; }
.btn-elder { background: #2a652e; }
.btn-coleader { background: #6a48cd; }

/* ---------- shop ---------- */
#shop {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 9500;
    display: none;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, .5);
}
#shop-area {
    display: flex;
    flex-direction: column;
    width: 1020px;
    max-width: calc(100% - 20px);
    height: 676px;
    max-height: calc(100% - 20px);
    overflow: hidden;
    border-radius: 10px;
    background: #2e5bc5;
}
#shop-header { display: flex; justify-content: space-between; align-items: center; height: 50px; padding: 12.5px 20px; background: #2e5bc5; }
#shop-header-title { color: #fff; font-size: 22px; font-weight: 500; }
#shop-header-buttons .coins { position: relative; top: 0; right: 0; height: 25px; }
#shop-header-buttons .coins-num { height: 25px; padding: 0 8px; border-radius: 5px; background: rgba(0, 0, 0, .3); }
#shop-header-buttons .coins-value { margin: 0 0 0 4px; font-size: 16px; }
#shop-header-buttons .coins-num__coin { width: 20px; height: 20px; }
#shop-header-buttons .plus { width: 31px; height: 25px; background: #43a952; }
#shop-header-buttons .close-btn { margin: 0 0 0 20px; padding: 1px 6px; background: transparent; }
#shop-header-buttons .close-btn img { display: block; }
#shop-content { display: flex; flex: 1; min-height: 0; padding: 30px; background: #fff; }
#shop-nav {
    display: flex;
    flex-direction: column;
    flex: none;
    align-self: flex-start;
    gap: 4px;
    width: 182px;
    margin: 0 10px 0 0;
    border-radius: 10px;
    background: #f1f5f9;
}
#shop-nav button {
    display: flex;
    align-items: center;
    gap: 6px;
    width: 182px;
    height: 40px;
    padding: 1px 6px 1px 12px;
    border-radius: 8px;
    background: transparent;
    color: #333136;
    font-size: 16px;
    font-weight: 500;
    text-align: left;
}
#shop-nav button.active { background: rgba(46, 91, 197, .25); box-shadow: 0 0 0 2px #2e5bc5 inset; }
#shop-nav button .coins-num__coin { width: 20px; height: 20px; flex: none; }
#shop-tab-body { flex: 1; min-width: 0; overflow-y: auto; border-radius: 10px; background: #f1f5f9; }
.shop-tab { display: none; padding: 20px; }
.shop-tab.active { display: block; }
#shop-skins-buttons {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin: 0 0 34px;
    padding: 0 0 25px;
    border-bottom: 1px solid #98aae2;
}
#shop-skins-buttons button { width: 131px; height: 41px; padding: 1px 6px; border-radius: 20px; color: #fff; font-size: 18px; font-weight: 700; text-align: center; }
#shop-buttons-free { background: linear-gradient(#7cf9ae 0%, #26c064 100%); }
#shop-buttons-premium { background: linear-gradient(#ffde7d 0%, #ffc826 100%); }
#shop-buttons-clan { display: none; background: linear-gradient(#ff8a82 0%, #de493e 100%); }
#shop-buttons-level { background: linear-gradient(#a687ff 0%, #6a48cd 100%); }
#shop-buttons-owned { background: linear-gradient(#97e0ff 0%, #26b1ed 100%); }
#shop-skins-buttons button.active { box-shadow: 0 0 0 3px #fff, 0 0 0 5px #2e5bc5; }
.shop-scrollbar-wrap { position: relative; margin: 0 18px 0 0; }
.tab-content { display: none; flex-wrap: wrap; gap: 9px; }
.tab-content.active { display: flex; }
.skin-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    width: 140px;
    padding: 12px 8px 10px;
    border: 2px solid transparent;
    border-radius: 10px;
    background: #fff;
    color: #333136;
    text-align: center;
    cursor: pointer;
}
.skin-card:hover { border-color: #98aae2; }
.skin-card.selected { border-color: #26c064; }
.skin-card img, .skin-card .skin-anim { width: 100px; height: 100px; border-radius: 50%; object-fit: cover; background-color: #f1f5f9; box-shadow: 0 0 10px rgba(51, 49, 54, .25); }
/* animated skins: a horizontal strip of square frames (tools/make-skins.js), played one frame at a time */
.anim-skin {
    background-size: calc(var(--frames) * 100%) 100% !important;
    background-repeat: no-repeat !important;
    animation: anim-skin var(--frame-time, 1.33s) steps(var(--frames), jump-none) infinite;
}
@keyframes anim-skin { from { background-position: 0% 0; } to { background-position: 100% 0; } }
.skin-card .skin-name { max-width: 100%; overflow: hidden; font-weight: 700; white-space: nowrap; text-overflow: ellipsis; }
.skin-card .skin-price {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    min-width: 90px;
    padding: 3px 10px;
    border-radius: 6px;
    background: #286230;
    color: #fff;
    font-weight: 500;
}
.skin-card .skin-price .coin-icon { width: 16px; height: 16px; }
.skin-card .skin-price:empty { display: none; }
.shop-empty { padding: 20px; color: inherit; text-align: center; opacity: .7; }
.shop-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(172px, 1fr)); gap: 10px; }
.shop-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 16px 12px;
    border-radius: 10px;
    background: linear-gradient(#97e0ff 0%, #26b1ed 100%);
    color: #fff;
    font-weight: 500;
    text-align: center;
    cursor: pointer;
}
.shop-card.orange { background: linear-gradient(#ffde7d 0%, #ffc826 100%); }
.shop-card.purple { background: linear-gradient(#a687ff 0%, #6a48cd 100%); }
.shop-card.green { background: linear-gradient(#7cf9ae 0%, #26c064 100%); }
.shop-card b { font-size: 16px; }
.shop-card .big { font-size: 36px; line-height: 48px; }
.shop-card .price { display: flex; align-items: center; gap: 4px; padding: 4px 12px; border-radius: 6px; background: #286230; font-weight: 700; }
.shop-note { margin: 10px 0; color: #333136; font-size: 13px; opacity: .8; }
.coin-icon { display: inline-block; width: 1.15em; height: 1.15em; vertical-align: -.22em; object-fit: contain; }
.shop-card .big .coin-icon { width: 48px; height: 48px; vertical-align: middle; }

/* ---------- updates ---------- */
#updates-wrap {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 9500;
    display: none;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, .5);
}
#updates { display: flex; flex-direction: column; width: 520px; max-width: calc(100% - 20px); max-height: 80vh; overflow: hidden; border-radius: 15px; background: #fff; }
#updates-header { display: flex; justify-content: space-between; align-items: center; padding: 16px 20px; color: #333; font-size: 24px; font-weight: 500; }
#updates-header img { cursor: pointer; }
#updates-scroll { overflow-y: auto; padding: 0 20px 20px; }
#updates-feed > div { margin: 0 0 12px; padding: 0 0 12px; border-bottom: 1px solid #eee; color: #333136; }
#updates-feed h3 { margin: 0 0 4px; font-size: 18px; }
#updates-feed i { font-size: 12px; opacity: .7; }

/* ---------- tournament page ---------- */
#tournament-info { display: flex; flex-direction: column; gap: 8px; text-align: center; }
#tournament-info button { padding: 8px 16px; border-radius: 6px; }

/* ---------- KURMAY banner above the main menu (animated, assets/img/kurmay-banner.webp / .gif) ---------- */
.kurmay-banner { display: flex; justify-content: center; height: 150px; margin: 0 auto 46px; pointer-events: none; user-select: none; }
.kurmay-banner img { display: block; width: 920px; height: 150px; }
