:root {
    --ink: #e9f0eb;
    --muted: #9aaf9f;
    --line: rgba(210, 226, 215, 0.2);
    --bg-1: #0a1210;
    --bg-2: #111c18;
    --panel: rgba(13, 26, 22, 0.78);
    --panel-strong: rgba(12, 20, 17, 0.92);
    --accent: #c89a46;
    --accent-2: #7d2f22;
    --success: #2e7a4a;
    --danger: #a23a32;
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    min-height: 100%;
    font-family: "Cairo", sans-serif;
    color: var(--ink);
    background: radial-gradient(circle at 80% 20%, #22342f 0%, var(--bg-2) 40%, var(--bg-1) 100%);
}

.site-bg {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background:
            radial-gradient(circle at 15% 18%, rgba(200, 154, 70, 0.14), transparent 30%),
            radial-gradient(circle at 85% 72%, rgba(125, 47, 34, 0.16), transparent 28%),
            linear-gradient(140deg, rgba(9, 16, 14, 0.92), rgba(11, 21, 18, 0.95));
}

.topbar,
.container,
.footer {
    position: relative;
    z-index: 1;
}

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 14px 28px;
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(6px);
    background: rgba(8, 14, 12, 0.66);
}

.brand-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--ink);
    text-decoration: none;
}

.brand-link strong {
    display: block;
    font-family: "Teko", sans-serif;
    letter-spacing: 1px;
    font-size: 2rem;
    font-weight: 600;
    line-height: 1;
}

.brand-link small {
    color: var(--muted);
    display: block;
    margin-top: 2px;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 1.6px;
}

.brand-icon {
    width: 46px;
    height: 46px;
}

.topbar nav {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

.topbar nav a {
    color: var(--ink);
    text-decoration: none;
    font-weight: 700;
    padding: 8px 11px;
    border-radius: 10px;
    border: 1px solid transparent;
    transition: all 0.2s ease;
}

.topbar nav a:hover {
    border-color: var(--line);
    color: #fff;
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.lang-switcher {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px;
    border-radius: 999px;
    border: 1px solid rgba(200, 154, 70, 0.24);
    background: rgba(8, 14, 12, 0.54);
}

.lang-switcher a {
    min-width: 60px;
    padding: 7px 10px;
    border-radius: 16px;
    color: var(--muted);
    text-decoration: none;
    text-align: center;
    font-weight: 700;
    border: 1px solid transparent;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
}

.lang-switcher a:hover {
    color: var(--ink);
    border-color: var(--line);
}

.lang-switcher a.is-active {
    color: #18150f;
    background: linear-gradient(180deg, #ce9f48, #a7792f);
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.24);
}

.lang-flag {
    font-size: 1.22rem;
    line-height: 1;
    filter: drop-shadow(0 2px 5px rgba(0, 0, 0, 0.22));
}

.lang-code {
    font-size: 0.74rem;
    letter-spacing: 0.08em;
}

.nav-wallet {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 12px;
    border-radius: 999px;
    border: 1px solid rgba(200, 154, 70, 0.4);
    background: rgba(200, 154, 70, 0.12);
    color: #f0d7a2;
    font-weight: 800;
}

.gold-mark {
    --gold-size: 28px;
    --gold-stack-size: 96%;
    --gold-stack-x: 8%;
    --gold-stack-y: 100%;
    --gold-coin-size: 62%;
    --gold-coin-x: 82%;
    --gold-coin-y: 14%;
    --gold-tilt: 0deg;
    width: var(--gold-size);
    height: var(--gold-size);
    display: inline-block;
    flex: 0 0 auto;
    background-image: url("/assets/img/gold-coin.png"), url("/assets/img/gold-stack.png");
    background-repeat: no-repeat, no-repeat;
    background-position: var(--gold-coin-x) var(--gold-coin-y), var(--gold-stack-x) var(--gold-stack-y);
    background-size: var(--gold-coin-size) auto, var(--gold-stack-size) auto;
    filter: drop-shadow(0 8px 14px rgba(0, 0, 0, 0.28));
    transform: rotate(var(--gold-tilt));
    transform-origin: center bottom;
}

.gold-mark--nav {
    --gold-size: 22px;
    --gold-coin-size: 58%;
}

.gold-mark--wallet {
    --gold-size: 40px;
    --gold-stack-size: 92%;
    --gold-coin-size: 56%;
    --gold-coin-x: 78%;
    --gold-coin-y: 16%;
}

.gold-mark--chip {
    --gold-size: 24px;
    --gold-stack-size: 92%;
    --gold-coin-size: 56%;
    --gold-coin-x: 80%;
    --gold-coin-y: 12%;
}

.gold-mark--resource {
    --gold-size: 28px;
    --gold-stack-size: 94%;
    --gold-coin-size: 58%;
}

.gold-mark--scene {
    --gold-size: 210px;
    --gold-stack-size: 94%;
    --gold-stack-x: 6%;
    --gold-stack-y: 100%;
    --gold-coin-size: 44%;
    --gold-coin-x: 82%;
    --gold-coin-y: 14%;
    filter:
        drop-shadow(0 18px 28px rgba(0, 0, 0, 0.36))
        drop-shadow(0 0 28px rgba(249, 208, 86, 0.14));
}

.danger-link {
    color: #ffd5d1 !important;
    border-color: rgba(162, 58, 50, 0.5) !important;
}

.container {
    width: min(1240px, 94vw);
    margin: 24px auto;
    animation: enter 0.55s ease;
}

@keyframes enter {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero {
    display: grid;
    grid-template-columns: 1.04fr 1fr;
    gap: 24px;
    align-items: stretch;
}

.hero-left,
.hero-right,
.card {
    border: 1px solid var(--line);
    border-radius: 18px;
    background: var(--panel);
    box-shadow: 0 14px 40px rgba(0, 0, 0, 0.35);
}

.hero-left {
    padding: 32px;
    background:
            linear-gradient(160deg, rgba(15, 24, 21, 0.97), rgba(11, 19, 16, 0.88)),
            radial-gradient(circle at 20% 14%, rgba(200, 154, 70, 0.16), transparent 34%);
}

.hero-left h1 {
    margin: 12px 0 8px;
    font-family: "Teko", sans-serif;
    font-size: 3.2rem;
    line-height: 1;
    letter-spacing: 1px;
}

.hero-left p {
    color: #d2dfd6;
    max-width: 52ch;
}

.hero-badges {
    margin-top: 18px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.hero-badges span {
    border: 1px solid var(--line);
    padding: 6px 11px;
    border-radius: 999px;
    color: #d4b677;
    font-size: 0.9rem;
}

.brand-logo {
    width: 210px;
    max-width: 100%;
}

.hero-right {
    padding: 22px;
}

.auth-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.card {
    padding: 20px;
}

.card h2 {
    margin: 0 0 14px;
    font-size: 1.34rem;
    font-family: "Teko", sans-serif;
    letter-spacing: 0.7px;
}

label {
    display: block;
    margin-bottom: 6px;
    color: var(--muted);
    font-size: 0.9rem;
}

input,
select,
button {
    width: 100%;
    border-radius: 10px;
    border: 1px solid var(--line);
    background: rgba(8, 14, 12, 0.9);
    color: var(--ink);
    padding: 10px 12px;
    margin-bottom: 11px;
    font-family: inherit;
}

input:focus,
select:focus,
button:focus {
    outline: none;
    border-color: rgba(200, 154, 70, 0.72);
    box-shadow: 0 0 0 3px rgba(200, 154, 70, 0.16);
}

button,
.button-inline {
    background: linear-gradient(180deg, #ce9f48, #a7792f);
    color: #18150f;
    border: 0;
    font-weight: 800;
    cursor: pointer;
    transition: filter 0.2s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.button-inline {
    margin-top: 10px;
}

.btn-sm {
    padding: 6px 10px;
    font-size: 0.82rem;
    margin-top: 0;
}

button:hover,
.button-inline:hover {
    filter: brightness(1.07);
}

small,
.muted {
    color: var(--muted);
}

.flash {
    padding: 10px 14px;
    border-radius: 11px;
    margin-bottom: 16px;
    border: 1px solid var(--line);
}

.flash-success {
    background: rgba(46, 122, 74, 0.2);
    border-color: rgba(46, 122, 74, 0.5);
}

.flash-error {
    background: rgba(162, 58, 50, 0.2);
    border-color: rgba(162, 58, 50, 0.52);
}

.flash-info {
    background: rgba(57, 102, 139, 0.2);
    border-color: rgba(90, 148, 194, 0.45);
}

.panel {
    margin-bottom: 16px;
}

.two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.commander p {
    margin: 0 0 7px;
}

.rank-summary {
    display: grid;
    grid-template-columns: 94px 1fr;
    gap: 16px;
    align-items: center;
    margin-bottom: 16px;
    padding: 14px 16px;
    border: 1px solid rgba(200, 154, 70, 0.24);
    border-radius: 16px;
    background: linear-gradient(140deg, rgba(36, 24, 13, 0.88), rgba(10, 18, 16, 0.74));
}

.rank-summary span,
.rank-overview-status span {
    display: block;
    color: #d8bd83;
    font-size: 0.8rem;
    margin-bottom: 4px;
}

.rank-summary strong,
.rank-overview-status strong {
    display: block;
    font-size: 1.4rem;
    line-height: 1.05;
    font-family: "Teko", sans-serif;
    letter-spacing: 0.8px;
}

.rank-summary small,
.rank-overview-status small {
    display: block;
    margin-top: 5px;
    color: #b7c6bd;
}

.rank-summary-badge {
    display: grid;
    place-items: center;
    width: 94px;
    height: 154px;
    border-radius: 24px;
    background:
        linear-gradient(180deg, rgba(162, 136, 86, 0.16), rgba(18, 23, 20, 0.08)),
        radial-gradient(circle at 50% 18%, rgba(255, 223, 114, 0.18), rgba(10, 17, 14, 0.12) 52%, transparent 74%);
}

.rank-badge {
    display: inline-block;
    width: 88px;
    height: 152px;
    filter: drop-shadow(0 0 14px rgba(255, 214, 99, 0.14)) drop-shadow(0 8px 18px rgba(0, 0, 0, 0.34));
}

.rank-badge-hero {
    width: 84px;
    height: 146px;
}

.rank-badge-status {
    width: 108px;
    height: 180px;
}

.rank-badge-table {
    width: 96px;
    height: 166px;
}

.progress-wrap {
    height: 12px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 999px;
    margin-top: 12px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #6f3b28, #ca9b45);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.stats-grid div {
    padding: 11px;
    border-radius: 12px;
    border: 1px solid var(--line);
    background: rgba(10, 17, 14, 0.7);
}

.stats-grid span {
    color: var(--muted);
    font-size: 0.82rem;
}

.stats-grid strong {
    display: block;
    margin-top: 6px;
    font-size: 1.16rem;
}

.wallet-hero {
    display: grid;
    gap: 10px;
    padding: 14px;
    border-radius: 14px;
    border: 1px solid rgba(200, 154, 70, 0.35);
    background: linear-gradient(160deg, rgba(36, 29, 12, 0.92), rgba(14, 21, 18, 0.9));
}

.wallet-label {
    display: block;
    color: #d3ba87;
    font-size: 0.8rem;
    margin-bottom: 4px;
}

.wallet-balance {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-size: 2rem;
    font-family: "Teko", sans-serif;
    letter-spacing: 1px;
}

.wallet-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: #d9e7df;
    font-size: 0.9rem;
}

.rules-grid {
    margin-top: 12px;
    display: grid;
    gap: 10px;
}

.rules-grid div {
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 10px;
    background: rgba(10, 17, 14, 0.65);
}

.rules-grid strong,
.rules-grid span {
    display: block;
}

.bundle-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
}

.compact-list {
    grid-template-columns: 1fr;
}

.bundle-card {
    border: 1px solid rgba(200, 154, 70, 0.28);
    border-radius: 16px;
    padding: 14px;
    background:
        linear-gradient(180deg, rgba(23, 19, 11, 0.95), rgba(12, 18, 16, 0.92)),
        radial-gradient(circle at top left, rgba(200, 154, 70, 0.18), transparent 36%);
}

.bundle-card.compact {
    padding: 10px 12px;
}

.bundle-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.bundle-gold {
    font-size: 1.4rem;
    font-family: "Teko", sans-serif;
    letter-spacing: 0.8px;
    margin: 0 0 6px;
}

.table-subline {
    display: block;
    margin-top: 3px;
    color: #b8c8bf;
    font-size: 0.8rem;
}

.shop-bundle-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 18px;
}

.shop-bundle-card {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(235, 219, 180, 0.26);
    border-radius: 18px;
    padding: 0;
    background:
        linear-gradient(180deg, rgba(21, 16, 11, 0.96), rgba(9, 13, 12, 0.98)),
        radial-gradient(circle at 50% 12%, rgba(255, 212, 105, 0.15), transparent 38%);
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.34);
}

.shop-bundle-card.tone-1 {
    background:
        linear-gradient(180deg, rgba(30, 20, 10, 0.95), rgba(9, 12, 11, 0.98)),
        radial-gradient(circle at 52% 18%, rgba(199, 139, 41, 0.32), transparent 46%);
}

.shop-bundle-card.tone-2 {
    background:
        linear-gradient(180deg, rgba(24, 18, 11, 0.95), rgba(7, 11, 11, 0.98)),
        radial-gradient(circle at 50% 14%, rgba(206, 170, 73, 0.34), transparent 48%);
}

.shop-bundle-card.tone-3 {
    background:
        linear-gradient(180deg, rgba(47, 31, 12, 0.95), rgba(10, 11, 10, 0.98)),
        radial-gradient(circle at 50% 12%, rgba(255, 197, 84, 0.38), transparent 52%);
}

.shop-bundle-card.tone-4 {
    background:
        linear-gradient(180deg, rgba(27, 21, 14, 0.95), rgba(9, 11, 12, 0.98)),
        radial-gradient(circle at 55% 14%, rgba(222, 183, 84, 0.32), transparent 48%);
}

.shop-bundle-card.tone-5 {
    background:
        linear-gradient(180deg, rgba(32, 24, 15, 0.95), rgba(10, 12, 12, 0.98)),
        radial-gradient(circle at 44% 12%, rgba(205, 162, 58, 0.32), transparent 50%);
}

.shop-bundle-card.is-popular {
    border-color: rgba(236, 162, 25, 0.92);
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.38), 0 0 0 2px rgba(236, 162, 25, 0.32);
}

.shop-bundle-ribbon {
    position: absolute;
    top: 12px;
    left: 24px;
    right: 24px;
    z-index: 2;
    background: linear-gradient(180deg, #2f7388, #26556a);
    color: #f2fbff;
    text-align: center;
    padding: 9px 12px;
    border-radius: 12px;
    font-weight: 800;
    font-size: 0.92rem;
    letter-spacing: 0.02em;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.24);
}

.shop-bundle-top {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
    gap: 14px;
    padding: 18px 18px 12px;
}

.shop-bundle-card.is-popular .shop-bundle-top {
    padding-top: 58px;
}

.shop-bundle-top strong {
    display: block;
    min-width: 0;
    font-size: 1.08rem;
    line-height: 1.15;
}

.shop-bundle-total {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    justify-self: end;
    white-space: nowrap;
    color: #fff6d8;
    font-family: "Teko", sans-serif;
    font-size: 2rem;
    line-height: 1;
    letter-spacing: 0.7px;
}

.shop-bundle-extra {
    padding: 8px 18px 10px;
    background: rgba(0, 0, 0, 0.9);
    color: #f1df95;
    text-align: center;
    font-size: 0.95rem;
    font-weight: 700;
}

.shop-bundle-scene {
    position: relative;
    display: flex;
    flex-direction: column;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.shop-coin-scene {
    position: relative;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    width: 100%;
    min-height: 272px;
    padding: 26px 18px 10px;
    overflow: hidden;
    background:
        radial-gradient(circle at 30% 82%, rgba(255, 223, 141, 0.28), transparent 32%),
        radial-gradient(circle at 74% 20%, rgba(255, 214, 102, 0.18), transparent 28%),
        linear-gradient(120deg, rgba(41, 29, 15, 0.16), rgba(0, 0, 0, 0));
}

.shop-coin-cluster {
    position: relative;
    width: min(100%, 300px);
    height: 228px;
    margin: 0 auto;
}

.shop-coin-scene::before {
    content: "";
    position: absolute;
    inset: auto 10% 0;
    height: 72px;
    border-radius: 50%;
    background:
        radial-gradient(circle, rgba(255, 211, 83, 0.34), rgba(255, 211, 83, 0) 72%);
    filter: blur(12px);
    pointer-events: none;
}

.shop-coin-scene::after {
    content: "";
    position: absolute;
    inset: auto 16% 8px;
    height: 34px;
    border-radius: 50%;
    background:
        linear-gradient(180deg, rgba(5, 7, 7, 0.12), rgba(5, 7, 7, 0.56));
    filter: blur(5px);
    pointer-events: none;
}

.shop-coin-stack {
    position: absolute;
    transform: translateX(-50%) rotate(var(--gold-tilt));
    transform-origin: center bottom;
    margin-bottom: -4px;
}

.shop-coin-stack.is-backdrop {
    filter:
        drop-shadow(0 12px 22px rgba(0, 0, 0, 0.28))
        drop-shadow(0 0 20px rgba(249, 208, 86, 0.1));
}

.shop-coin-stack.is-hero {
    filter:
        drop-shadow(0 18px 30px rgba(0, 0, 0, 0.38))
        drop-shadow(0 0 30px rgba(255, 216, 104, 0.18));
}

.shop-bundle-card.is-popular .shop-coin-stack.is-hero {
    filter:
        drop-shadow(0 20px 34px rgba(0, 0, 0, 0.4))
        drop-shadow(0 0 34px rgba(255, 216, 104, 0.2));
}

.shop-bundle-stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    padding: 4px 16px 16px;
}

.shop-bundle-stats span {
    padding: 8px 12px;
    border-radius: 14px;
    background:
        linear-gradient(180deg, rgba(5, 7, 7, 0.84), rgba(10, 11, 10, 0.72)),
        rgba(5, 7, 7, 0.74);
    border: 1px solid rgba(236, 198, 91, 0.2);
    color: #f4f0de;
    text-align: center;
    font-size: 0.88rem;
    font-weight: 700;
}

.shop-bundle-stats.is-starter {
    grid-template-columns: 1fr;
}

.shop-bundle-price {
    padding: 18px 18px 8px;
    text-align: center;
}

.shop-bundle-price strong {
    display: block;
    color: #ffffff;
    font-family: "Teko", sans-serif;
    font-size: 2.1rem;
    letter-spacing: 0.8px;
    line-height: 1;
}

.shop-bundle-price small {
    display: block;
    margin-top: 8px;
    color: #d9c58e;
    font-size: 0.9rem;
}

.shop-bundle-card button {
    margin: 0 18px 18px;
    width: calc(100% - 36px);
    padding-top: 12px;
    padding-bottom: 12px;
    font-size: 1.05rem;
    border-radius: 12px;
    background: linear-gradient(180deg, #f0a100, #b95b06);
    color: #fff8ed;
}

.shop-currency-note {
    margin-top: 14px;
}

.medal-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 11px;
}

.medal-list li {
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 10px;
    display: grid;
    grid-template-columns: 58px 1fr;
    gap: 11px;
    align-items: center;
    background: rgba(10, 17, 14, 0.65);
}

.medal-icon {
    display: inline-grid;
    place-items: center;
    width: 58px;
    height: 58px;
    padding: 6px;
    border-radius: 16px;
    border: 1px solid rgba(200, 154, 70, 0.34);
    background:
        radial-gradient(circle at 28% 22%, rgba(255, 235, 185, 0.18), transparent 24%),
        linear-gradient(145deg, rgba(22, 30, 27, 0.92), rgba(10, 16, 15, 0.96));
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
    font-size: 1.1rem;
}

.medal-icon img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
    object-position: center;
    filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.2));
}

.map-list {
    display: grid;
    gap: 10px;
}

.map-item {
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 11px;
    background: rgba(10, 17, 14, 0.64);
}

.map-item strong {
    display: block;
    margin-bottom: 4px;
}

.map-item small {
    display: block;
    margin-bottom: 6px;
}

.map-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

.tag {
    display: inline-block;
    border-radius: 999px;
    padding: 3px 10px;
    font-size: 0.75rem;
    border: 1px solid rgba(200, 154, 70, 0.45);
    color: #ddbc78;
    background: rgba(200, 154, 70, 0.12);
}

.tag.ok {
    border-color: rgba(46, 122, 74, 0.5);
    color: #b5f0c9;
    background: rgba(46, 122, 74, 0.2);
}

.tag.warn {
    border-color: rgba(162, 58, 50, 0.55);
    color: #ffd5d1;
    background: rgba(162, 58, 50, 0.2);
}

.inline-form {
    margin-top: 8px;
}

.inline-form button {
    margin-bottom: 0;
}

.battle-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    color: #d6e4db;
    margin-bottom: 12px;
}

.battle-victory-card {
    padding: 14px 16px;
    border-radius: 16px;
    border: 1px solid rgba(210, 179, 109, 0.24);
    background:
        linear-gradient(145deg, rgba(20, 34, 31, 0.94), rgba(11, 18, 16, 0.88)),
        rgba(10, 16, 15, 0.92);
    box-shadow: inset 0 0 24px rgba(0, 0, 0, 0.24);
}

.battle-victory-card--finished {
    border-color: rgba(137, 192, 147, 0.3);
}

.battle-victory-card__head {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    align-items: flex-end;
    flex-wrap: wrap;
}

.battle-victory-card__eyebrow {
    margin: 0 0 6px;
    color: #aebfb2;
    font-size: 0.74rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.battle-victory-card__head strong,
.battle-victory-card__me strong {
    display: block;
    color: #f6f0dd;
    font-size: 1.35rem;
    line-height: 1.1;
}

.battle-victory-card__me {
    min-width: 180px;
}

.battle-victory-card__me span {
    display: block;
    margin-bottom: 6px;
    color: #b4c6bb;
    font-size: 0.8rem;
}

.battle-victory-card__bar {
    margin-top: 12px;
    height: 12px;
    border-radius: 999px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.battle-victory-card__bar span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #70d06c, #d5c16c 76%, #f0df94);
    box-shadow: 0 0 18px rgba(188, 177, 100, 0.26);
}

.battle-victory-card__stats {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 10px;
    color: #dfe7e1;
    font-size: 0.84rem;
}

.battle-victory-card__stats strong {
    color: #f8f1db;
}

.battle-victory-card__winner {
    margin: 10px 0 0;
    color: #c9efce;
    font-size: 0.9rem;
}

.battle-lock-note {
    margin: 0 0 10px !important;
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid rgba(224, 191, 114, 0.18);
    background: rgba(77, 55, 24, 0.18);
    color: #f1ddac !important;
    line-height: 1.6;
}

.battle-form--locked {
    opacity: 0.54;
    pointer-events: none;
    filter: saturate(0.72);
}

.battle-layout {
    display: grid;
    grid-template-columns: 1.3fr 0.9fr;
    gap: 16px;
}

.war-stage-wrap {
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid rgba(198, 160, 85, 0.32);
    background: linear-gradient(165deg, rgba(20, 45, 55, 0.92), rgba(17, 36, 45, 0.9));
    box-shadow: inset 0 0 28px rgba(0, 0, 0, 0.35);
}

.war-stage {
    display: block;
    width: 100%;
    height: auto;
    min-height: 380px;
}

.continent-shape {
    fill: url(#landGradient);
    stroke: rgba(255, 255, 255, 0.2);
    stroke-width: 2;
    opacity: 0.86;
}

.province-node {
    cursor: pointer;
    transition: transform 0.15s ease, opacity 0.15s ease;
}

.province-node:hover {
    transform: translateY(-1px);
}

.province-node polygon {
    stroke: rgba(8, 12, 11, 0.75);
    stroke-width: 1.3;
}

.province-node circle {
    fill: rgba(17, 21, 18, 0.92);
}

.province-node text {
    font-size: 10px;
    text-anchor: middle;
    fill: rgba(240, 246, 243, 0.88);
    font-weight: 700;
    pointer-events: none;
}

.province-node.mine polygon {
    stroke: rgba(148, 255, 185, 0.65);
}

.province-node.enemy polygon {
    stroke: rgba(255, 192, 192, 0.46);
}

.province-node.is-selected polygon {
    stroke: #ffe08d;
    stroke-width: 2.3;
    filter: drop-shadow(0 0 6px rgba(255, 224, 141, 0.62));
}

.army-marker {
    cursor: pointer;
    transition: transform 0.15s ease;
}

.army-marker:hover {
    transform: scale(1.05);
}

.army-marker circle {
    stroke: rgba(13, 15, 13, 0.75);
    stroke-width: 1.2;
}

.army-marker text {
    font-size: 8px;
    text-anchor: middle;
    fill: #fcf9f0;
    font-weight: 800;
    pointer-events: none;
}

.army-marker.mine circle {
    fill: #3aa76f;
}

.army-marker.enemy circle {
    fill: #c24b4b;
}

.army-marker.is-selected circle {
    stroke: #ffe08d;
    stroke-width: 2.2;
}

.battle-legend {
    margin-top: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    color: #d8e4de;
    font-size: 0.84rem;
}

.battle-legend span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.legend-swatch {
    width: 14px;
    height: 10px;
    border-radius: 3px;
    display: inline-block;
}

.legend-swatch.mine {
    background: rgba(92, 195, 132, 0.86);
}

.legend-swatch.enemy {
    background: rgba(188, 88, 88, 0.85);
}

.legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
}

.legend-dot.mine {
    background: #3aa76f;
}

.legend-dot.enemy {
    background: #c24b4b;
}

.map-selection-details {
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 8px 10px;
    margin-top: 8px;
    margin-bottom: 10px;
    background: rgba(9, 15, 13, 0.7);
}

.province-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin-top: 12px;
}

.province-card {
    border-radius: 12px;
    border: 1px solid var(--line);
    padding: 10px;
    background: rgba(10, 17, 14, 0.72);
}

.province-card strong {
    display: block;
    margin-bottom: 5px;
    font-size: 0.93rem;
}

.province-card small {
    display: block;
    margin-bottom: 4px;
}

.province-own {
    border-color: rgba(46, 122, 74, 0.55);
    background: rgba(46, 122, 74, 0.16);
}

.province-enemy {
    border-color: rgba(162, 58, 50, 0.48);
    background: rgba(84, 32, 29, 0.2);
}

.battle-form {
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 10px;
    margin-bottom: 11px;
    background: rgba(10, 17, 14, 0.62);
}

.battle-form label {
    color: #d4b677;
    font-weight: 700;
}

.world-war {
    display: grid;
    gap: 12px;
}

.resource-ribbon {
    display: flex;
    flex-wrap: nowrap;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 4px;
}

.resource-chip {
    min-width: 145px;
    border: 1px solid rgba(200, 154, 70, 0.35);
    border-radius: 14px;
    background: linear-gradient(180deg, rgba(18, 26, 23, 0.96), rgba(9, 16, 14, 0.94));
    padding: 8px 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.resource-chip strong {
    display: block;
    font-size: 0.85rem;
    color: #d7e4db;
}

.resource-chip span {
    font-size: 0.82rem;
    color: #bdd2c5;
}

.resource-chip b {
    color: #7ed8a6;
    font-weight: 700;
}

.resource-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    min-height: 28px;
    font-size: 1.05rem;
}

.resource-icon--gold {
    min-width: 34px;
}

.resource-icon--image {
    min-width: 38px;
    min-height: 38px;
}

.resource-icon--image img {
    width: 38px;
    height: 38px;
    display: block;
    object-fit: contain;
    object-position: center bottom;
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.22));
}

.unit-visual {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
    object-position: center bottom;
    filter: drop-shadow(0 8px 12px rgba(0, 0, 0, 0.24));
}

.world-map-shell {
    position: relative;
    border: 1px solid rgba(200, 154, 70, 0.38);
    border-radius: 16px;
    overflow: hidden;
    min-height: 74vh;
    background:
        radial-gradient(circle at 20% 18%, rgba(255, 255, 255, 0.08), transparent 18%),
        radial-gradient(circle at 82% 78%, rgba(255, 255, 255, 0.06), transparent 20%),
        linear-gradient(180deg, #7ac4de 0%, #5fb3d5 36%, #4e8cb7 100%);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}

.world-map-shell::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background:
        radial-gradient(circle at 15% 20%, rgba(255, 255, 255, 0.13), transparent 20%),
        radial-gradient(circle at 82% 72%, rgba(255, 255, 255, 0.12), transparent 22%),
        repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.035) 0 14px, rgba(255, 255, 255, 0) 14px 28px);
    mix-blend-mode: soft-light;
}

.world-map-shell::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    box-shadow: inset 0 0 80px rgba(9, 24, 33, 0.34);
}

#worldMap {
    position: absolute;
    inset: 0;
    z-index: 2;
}

.map-hud {
    position: absolute;
    z-index: 500;
    width: 320px;
    max-height: calc(100% - 24px);
    overflow-y: auto;
    background:
        linear-gradient(180deg, rgba(13, 28, 25, 0.9), rgba(6, 15, 14, 0.82)),
        rgba(8, 16, 14, 0.84);
    border: 1px solid rgba(200, 154, 70, 0.26);
    backdrop-filter: blur(6px);
    border-radius: 14px;
    padding: 10px;
}

.map-hud h3 {
    margin: 0 0 8px;
    font-family: "Teko", sans-serif;
    letter-spacing: 0.7px;
    font-size: 1.25rem;
}

.map-hud-left {
    top: 12px;
    right: 12px;
}

.map-hud-right {
    bottom: 12px;
    right: 12px;
}

.map-hud p {
    margin: 0 0 6px;
    color: #d4dfd7;
    font-size: 0.86rem;
}

.hud-note {
    margin-bottom: 10px !important;
}

.hud-route-note {
    margin: 8px 0 10px !important;
    line-height: 1.5;
}

.map-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 8px 0 6px;
}

.map-legend span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 8px;
    border-radius: 999px;
    border: 1px solid rgba(200, 154, 70, 0.18);
    background: rgba(11, 18, 16, 0.72);
    color: #e6efe9;
    font-size: 0.76rem;
}

.route-legend {
    display: grid;
    gap: 7px;
    margin: 10px 0 8px;
}

.route-legend span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #d8e4de;
    font-size: 0.78rem;
}

.route-swatch {
    width: 28px;
    height: 0;
    border-top-width: 2px;
    border-top-style: dashed;
    flex: 0 0 28px;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.28));
}

.route-swatch--land {
    border-top-color: #82d27a;
    border-top-style: dashed;
}

.route-swatch--sea {
    border-top-color: #8ad8ef;
    border-top-style: dashed;
}

.route-swatch--border {
    border-top-color: #e4eef2;
    border-top-width: 1px;
    border-top-style: dashed;
}

.legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.28);
}

.legend-dot.mine {
    background: #8fdfa3;
}

.legend-dot.ally {
    background: #94c9ff;
}

.legend-dot.neutral {
    background: #cfd7de;
}

.legend-dot.enemy {
    background: #efadb4;
}

.hud-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

.hud-stats div {
    border: 1px solid rgba(200, 154, 70, 0.22);
    border-radius: 10px;
    padding: 6px;
    text-align: center;
    background: rgba(9, 16, 14, 0.66);
}

.hud-stats span {
    display: block;
    font-size: 0.72rem;
    color: #9eb5a7;
}

.hud-stats strong {
    display: block;
    color: #e8f3ec;
    margin-top: 3px;
}

.xp-race-card {
    margin-top: 10px;
    padding: 10px;
    border-radius: 14px;
    border: 1px solid rgba(223, 199, 149, 0.18);
    background:
        linear-gradient(145deg, rgba(18, 33, 29, 0.9), rgba(8, 18, 16, 0.84));
}

.xp-race-card--finished {
    border-color: rgba(134, 186, 144, 0.28);
}

.xp-race-card__head,
.xp-race-card__row {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    align-items: center;
}

.xp-race-card__head strong {
    color: #f3ebd4;
    font-size: 0.92rem;
}

.xp-race-card__head span,
.xp-race-card__progress small,
.xp-race-card__row span {
    color: #b9cbc1;
    font-size: 0.76rem;
}

.xp-race-card__progress {
    margin-top: 9px;
}

.xp-race-card__bar {
    height: 10px;
    border-radius: 999px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.04);
    margin-bottom: 6px;
}

.xp-race-card__bar span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #82d27a, #d9bc68);
}

.xp-race-card__rewards {
    display: grid;
    gap: 4px;
    margin-top: 9px;
}

.xp-race-card__rewards span {
    color: #95afa1;
    font-size: 0.72rem;
}

.xp-race-card__rewards strong,
.xp-race-card__row strong {
    color: #f5efdc;
    font-size: 0.82rem;
}

.xp-race-card__winner {
    margin: 9px 0 0;
    color: #c9ebcf;
    font-size: 0.8rem;
}

.xp-race-card__leaderboard {
    display: grid;
    gap: 6px;
    margin-top: 10px;
}

.xp-race-card__row {
    padding: 7px 8px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.xp-race-card__row.is-mine {
    border-color: rgba(208, 183, 110, 0.24);
    background: rgba(122, 93, 38, 0.16);
}

.forces-strip {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    margin-top: 10px;
}

.forces-strip__item {
    display: grid;
    gap: 4px;
    justify-items: center;
    padding: 8px 6px;
    border-radius: 12px;
    border: 1px solid rgba(200, 154, 70, 0.18);
    background: rgba(9, 16, 14, 0.58);
    text-align: center;
}

.forces-strip__item img {
    width: 44px;
    height: 44px;
    display: block;
    object-fit: contain;
    object-position: center bottom;
    filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.22));
}

.forces-strip__item small {
    color: #b6c8bc;
    font-size: 0.68rem;
    line-height: 1.2;
}

.city-focus-card {
    margin-top: 10px;
    padding: 10px;
    border-radius: 14px;
    border: 1px solid rgba(223, 199, 149, 0.18);
    background:
        linear-gradient(145deg, rgba(18, 33, 29, 0.9), rgba(8, 18, 16, 0.84));
}

.city-focus-card__head {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: flex-start;
    margin-bottom: 10px;
}

.city-focus-card__eyebrow {
    margin: 0 0 4px;
    color: #d6d5bd;
    font-size: 0.72rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.city-focus-card__head h4 {
    margin: 0;
    color: #f5efde;
    font-size: 1.15rem;
}

.city-focus-card__capital {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 66px;
    min-height: 30px;
    padding: 0 10px;
    border-radius: 999px;
    background: rgba(214, 176, 90, 0.18);
    border: 1px solid rgba(214, 176, 90, 0.34);
    color: #f3d790;
    font-size: 0.72rem;
    font-weight: 700;
}

.city-focus-card__stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 10px;
}

.city-focus-card__stats span {
    display: grid;
    gap: 4px;
    padding: 8px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.city-focus-card__stats b {
    color: #9fb5a8;
    font-size: 0.7rem;
}

.city-focus-card__stats strong {
    color: #f4f0e4;
    font-size: 0.86rem;
}

.city-focus-card__section {
    display: grid;
    gap: 6px;
    margin-top: 8px;
}

.city-focus-card__section strong {
    color: #ecd39a;
    font-size: 0.84rem;
}

.city-focus-card__list {
    margin: 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 6px;
}

.city-focus-card__list li,
.city-focus-card__section p {
    margin: 0;
    padding: 7px 8px;
    border-radius: 10px;
    background: rgba(7, 14, 12, 0.52);
    border: 1px solid rgba(255, 255, 255, 0.05);
    color: #d7e1da;
    font-size: 0.8rem;
    line-height: 1.45;
}

.city-focus-card__quick-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.city-action-btn {
    min-height: 38px;
    padding: 8px 12px;
    border-radius: 999px;
    border: 1px solid rgba(210, 183, 116, 0.28);
    background: linear-gradient(180deg, rgba(195, 145, 53, 0.22), rgba(138, 92, 24, 0.14));
    color: #f6eddc;
    font-weight: 700;
    font-size: 0.78rem;
    cursor: pointer;
    transition: transform 0.16s ease, border-color 0.16s ease, opacity 0.16s ease, box-shadow 0.16s ease;
}

.city-action-btn:hover:not(:disabled) {
    transform: translateY(-1px);
    border-color: rgba(255, 225, 160, 0.48);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.18);
}

.city-action-btn:disabled {
    opacity: 0.42;
    cursor: not-allowed;
    box-shadow: none;
}

.city-action-btn--danger {
    border-color: rgba(203, 97, 98, 0.36);
    background: linear-gradient(180deg, rgba(156, 46, 54, 0.32), rgba(90, 18, 28, 0.18));
}

.city-action-btn--ghost {
    border-color: rgba(109, 156, 194, 0.32);
    background: linear-gradient(180deg, rgba(50, 99, 134, 0.22), rgba(24, 46, 62, 0.16));
}

.diplomacy-card {
    margin-bottom: 10px;
    padding: 10px;
    border-radius: 14px;
    border: 1px solid rgba(223, 199, 149, 0.18);
    background:
        linear-gradient(145deg, rgba(18, 33, 29, 0.9), rgba(8, 18, 16, 0.84));
}

.diplomacy-card__head {
    margin-bottom: 8px;
}

.diplomacy-card__head h4 {
    margin: 0 0 4px;
    color: #f4eedc;
    font-size: 1rem;
}

.diplomacy-card__head p {
    margin: 0;
    color: #b9cbc1;
    font-size: 0.78rem;
    line-height: 1.5;
}

.battle-form--diplomacy {
    margin-bottom: 0;
}

.diplomacy-list {
    display: grid;
    gap: 7px;
    margin-top: 8px;
    max-height: 220px;
    overflow-y: auto;
}

.diplomacy-item {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    align-items: center;
    padding: 8px 10px;
    border-radius: 10px;
    background: rgba(7, 14, 12, 0.52);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.diplomacy-item strong {
    color: #f5efe0;
    font-size: 0.84rem;
}

.diplomacy-item span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 66px;
    padding: 4px 8px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
}

.diplomacy-item--allied span {
    background: rgba(94, 159, 255, 0.18);
    color: #a6d1ff;
}

.diplomacy-item--neutral span {
    background: rgba(192, 203, 214, 0.16);
    color: #dbe2e8;
}

.diplomacy-item--war span {
    background: rgba(239, 113, 126, 0.18);
    color: #ffc0c8;
}

.city-node-wrap {
    background: transparent;
    border: 0;
}

.city-node {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    pointer-events: none;
}

.city-node__core {
    width: 16px;
    height: 16px;
    flex: 0 0 16px;
    border-radius: 50%;
    background: var(--city-core, #7fd067);
    border: 2px solid rgba(255, 255, 255, 0.82);
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.22), 0 8px 20px rgba(0, 0, 0, 0.18);
}

.city-node__label {
    min-width: 0;
    padding: 5px 10px;
    border-radius: 999px;
    background: rgba(15, 23, 21, 0.82);
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.18);
}

.city-node__label strong,
.city-node__label small {
    display: block;
    line-height: 1.05;
    white-space: nowrap;
}

.city-node__label strong {
    color: #fcfbf5;
    font-size: 0.8rem;
}

.city-node__label small {
    margin-top: 3px;
    color: #c9d8d1;
    font-size: 0.64rem;
}

.city-node__capital {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: rgba(214, 176, 90, 0.22);
    color: #f8da8f;
    font-size: 0.72rem;
    line-height: 1;
}

.city-node--mine .city-node__label {
    border-color: rgba(159, 221, 164, 0.38);
}

.city-node--ally .city-node__label {
    border-color: rgba(146, 192, 255, 0.42);
}

.city-node--neutral .city-node__label {
    border-color: rgba(204, 214, 224, 0.38);
}

.city-node--enemy .city-node__label {
    border-color: rgba(244, 167, 176, 0.42);
}

.city-node.is-active .city-node__core {
    transform: scale(1.1);
    box-shadow: 0 0 0 3px rgba(255, 229, 159, 0.2), 0 8px 20px rgba(0, 0, 0, 0.22);
}

.city-node.is-active .city-node__label {
    border-color: rgba(255, 229, 159, 0.72);
    box-shadow: 0 0 0 1px rgba(255, 229, 159, 0.24), 0 10px 24px rgba(0, 0, 0, 0.22);
}

.battle-form.compact {
    margin-bottom: 8px;
    padding: 8px;
}

.battle-form.is-targeted {
    border-color: rgba(255, 229, 159, 0.82);
    box-shadow: 0 0 0 1px rgba(255, 229, 159, 0.26), 0 0 0 8px rgba(255, 229, 159, 0.08);
    animation: battleFormPulse 1.25s ease;
}

.battle-form.compact label {
    margin-bottom: 5px;
}

.battle-form.compact select,
.battle-form.compact button,
.battle-form.compact .unit-selector {
    margin-bottom: 7px;
}

.unit-selector {
    display: grid;
    gap: 8px;
}

.unit-selector__input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

@keyframes battleFormPulse {
    0% {
        transform: translateY(0);
    }

    35% {
        transform: translateY(-2px);
    }

    100% {
        transform: translateY(0);
    }
}

.unit-selector__card {
    display: grid;
    grid-template-columns: 84px minmax(0, 1fr);
    gap: 10px;
    align-items: center;
    padding: 8px;
    border-radius: 14px;
    border: 1px solid rgba(202, 182, 132, 0.22);
    background:
        linear-gradient(120deg, rgba(12, 21, 19, 0.94), rgba(16, 31, 27, 0.88));
    cursor: pointer;
    transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.unit-selector__card:hover {
    transform: translateY(-1px);
    border-color: rgba(214, 190, 133, 0.42);
}

.unit-selector__input:checked + .unit-selector__card {
    border-color: rgba(255, 221, 149, 0.72);
    box-shadow: 0 0 0 1px rgba(255, 221, 149, 0.26), 0 10px 24px rgba(0, 0, 0, 0.24);
}

.unit-selector__art {
    height: 74px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background:
        radial-gradient(circle at 30% 26%, rgba(255, 255, 255, 0.14), transparent 20%),
        linear-gradient(145deg, rgba(64, 87, 84, 0.9), rgba(27, 39, 38, 0.96));
    display: grid;
    place-items: center;
    overflow: hidden;
}

.unit-selector__card--infantry .unit-selector__art {
    background:
        radial-gradient(circle at 28% 22%, rgba(255, 255, 255, 0.16), transparent 18%),
        linear-gradient(145deg, rgba(86, 102, 92, 0.92), rgba(32, 40, 34, 0.96));
}

.unit-selector__card--tank .unit-selector__art {
    background:
        radial-gradient(circle at 28% 22%, rgba(255, 226, 174, 0.16), transparent 18%),
        linear-gradient(145deg, rgba(96, 79, 51, 0.92), rgba(41, 33, 23, 0.96));
}

.unit-selector__card--armored .unit-selector__art {
    background:
        radial-gradient(circle at 28% 22%, rgba(255, 233, 190, 0.16), transparent 18%),
        linear-gradient(145deg, rgba(92, 84, 66, 0.92), rgba(39, 34, 27, 0.96));
}

.unit-selector__card--artillery .unit-selector__art {
    background:
        radial-gradient(circle at 28% 22%, rgba(204, 224, 255, 0.16), transparent 18%),
        linear-gradient(145deg, rgba(62, 74, 81, 0.92), rgba(26, 34, 39, 0.96));
}

.unit-selector__art .unit-visual {
    width: 100%;
    height: 100%;
    padding: 5px;
}

.unit-selector__copy {
    display: grid;
    gap: 3px;
    min-width: 0;
}

.unit-selector__copy strong {
    font-size: 0.92rem;
    color: #f7f3e7;
}

.unit-selector__copy small {
    color: #b8cac0;
    line-height: 1.35;
}

.unit-selector__copy em {
    color: #ecd39a;
    font-style: normal;
    font-size: 0.77rem;
}

.progress-list {
    display: grid;
    gap: 10px;
}

.progress-item {
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 10px;
    background: rgba(10, 17, 14, 0.65);
}

.progress-head {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    align-items: center;
    margin-bottom: 8px;
}

.progress-head-main {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.progress-head-main strong {
    min-width: 0;
}

.progress-unit-art {
    width: 62px;
    height: 52px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background:
        radial-gradient(circle at 28% 22%, rgba(255, 255, 255, 0.14), transparent 18%),
        linear-gradient(145deg, rgba(48, 63, 59, 0.92), rgba(20, 28, 26, 0.96));
    display: grid;
    place-items: center;
    overflow: hidden;
}

.progress-unit-art--tank {
    background:
        radial-gradient(circle at 28% 22%, rgba(255, 226, 174, 0.16), transparent 18%),
        linear-gradient(145deg, rgba(96, 79, 51, 0.92), rgba(41, 33, 23, 0.96));
}

.progress-unit-art--armored {
    background:
        radial-gradient(circle at 28% 22%, rgba(255, 233, 190, 0.16), transparent 18%),
        linear-gradient(145deg, rgba(92, 84, 66, 0.92), rgba(39, 34, 27, 0.96));
}

.progress-unit-art--artillery {
    background:
        radial-gradient(circle at 28% 22%, rgba(204, 224, 255, 0.16), transparent 18%),
        linear-gradient(145deg, rgba(62, 74, 81, 0.92), rgba(26, 34, 39, 0.96));
}

.progress-unit-art .unit-visual {
    width: 100%;
    height: 100%;
    padding: 4px;
}

.unit-marker-wrap {
    background: transparent;
    border: 0;
}

.unit-marker {
    position: relative;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.unit-marker__dot {
    position: absolute;
    top: -3px;
    left: 50%;
    transform: translateX(-50%);
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #d8262f;
    border: 2px solid rgba(255, 255, 255, 0.72);
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.28), 0 8px 18px rgba(0, 0, 0, 0.18);
}

.unit-marker.mine .unit-marker__dot {
    background: #d8262f;
}

.unit-marker.ally .unit-marker__dot {
    background: #4ca6ff;
}

.unit-marker.neutral .unit-marker__dot {
    background: #b2bcc6;
}

.unit-marker.enemy .unit-marker__dot {
    background: #f1555f;
}

.unit-marker__badge {
    position: relative;
    z-index: 2;
    width: 54px;
    height: 60px;
    margin: 10px auto 0;
    clip-path: polygon(0 0, 100% 0, 100% 72%, 50% 100%, 0 72%);
    background: rgba(245, 245, 245, 0.96);
    border: 1px solid rgba(65, 75, 82, 0.42);
    box-shadow: 0 10px 18px rgba(0, 0, 0, 0.24);
}

.unit-marker__badge::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 2px;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.3);
    pointer-events: none;
}

.unit-marker__morale {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 11px;
    background: rgba(76, 84, 89, 0.6);
}

.unit-marker__morale i {
    display: block;
    height: 100%;
    background: linear-gradient(90deg, #98dc63, #5da541);
}

.unit-marker__badge-body {
    position: absolute;
    inset: 14px 7px 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    color: #172126;
}

.unit-marker__badge-icon {
    width: 20px;
    height: 20px;
    opacity: 0.96;
    object-fit: contain;
    object-position: center;
    filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.18));
}

.unit-marker__badge-body strong {
    font-family: "Teko", sans-serif;
    font-size: 1.3rem;
    line-height: 1;
}

.unit-marker__shadow {
    position: absolute;
    left: 50%;
    bottom: 8px;
    width: 60px;
    height: 14px;
    transform: translateX(-50%);
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.18);
    filter: blur(6px);
}

.unit-marker__figure {
    position: absolute;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    object-fit: contain;
    object-position: center bottom;
    filter: drop-shadow(0 8px 12px rgba(0, 0, 0, 0.26));
}

.unit-marker--infantry .unit-marker__figure {
    width: 68px;
    height: 94px;
}

.unit-marker--tank .unit-marker__figure {
    width: 96px;
    height: 66px;
    bottom: 4px;
}

.unit-marker--armored .unit-marker__figure {
    width: 102px;
    height: 68px;
    bottom: 4px;
}

.unit-marker--artillery .unit-marker__figure {
    width: 102px;
    height: 68px;
    bottom: 4px;
}

.unit-marker.is-active .unit-marker__badge {
    box-shadow: 0 0 0 2px rgba(255, 226, 157, 0.82), 0 10px 18px rgba(0, 0, 0, 0.24);
}

.unit-marker.is-active .unit-marker__figure {
    filter: drop-shadow(0 0 10px rgba(255, 235, 188, 0.55)) drop-shadow(0 8px 12px rgba(0, 0, 0, 0.28));
}

.map-unit-focus {
    position: absolute;
    left: 12px;
    right: 328px;
    bottom: 12px;
    z-index: 520;
    display: grid;
    grid-template-columns: 150px minmax(0, 1fr);
    gap: 14px;
    align-items: center;
    padding: 12px 14px;
    border-radius: 16px;
    border: 1px solid rgba(224, 204, 163, 0.24);
    background:
        linear-gradient(135deg, rgba(15, 27, 25, 0.94), rgba(7, 16, 16, 0.88));
    backdrop-filter: blur(10px);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.3);
}

.map-unit-focus__media {
    height: 112px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background:
        radial-gradient(circle at 28% 22%, rgba(255, 255, 255, 0.16), transparent 18%),
        linear-gradient(145deg, rgba(55, 74, 70, 0.94), rgba(19, 28, 27, 0.96));
    display: grid;
    place-items: center;
    overflow: hidden;
}

.map-unit-focus[data-unit-type="tank"] .map-unit-focus__media {
    background:
        radial-gradient(circle at 28% 22%, rgba(255, 226, 174, 0.16), transparent 18%),
        linear-gradient(145deg, rgba(98, 80, 54, 0.94), rgba(37, 29, 20, 0.96));
}

.map-unit-focus[data-unit-type="artillery"] .map-unit-focus__media {
    background:
        radial-gradient(circle at 28% 22%, rgba(204, 224, 255, 0.16), transparent 18%),
        linear-gradient(145deg, rgba(60, 73, 79, 0.94), rgba(21, 29, 34, 0.96));
}

.map-unit-focus__media .unit-visual {
    width: 100%;
    height: 100%;
    padding: 8px;
}

.map-unit-focus__body {
    min-width: 0;
}

.map-unit-focus__eyebrow {
    margin: 0 0 4px;
    color: #c5d6cd;
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.map-unit-focus__title {
    margin: 0;
    color: #f8f4e8;
    font-family: "Teko", sans-serif;
    font-size: 2rem;
    letter-spacing: 0.04em;
}

.map-unit-focus__role {
    margin: 4px 0 10px;
    color: #a7bdb2;
}

.map-unit-focus__stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.map-unit-focus__stats span {
    display: grid;
    gap: 4px;
    padding: 8px 10px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.map-unit-focus__stats b {
    color: #a6bbb0;
    font-size: 0.75rem;
    font-weight: 600;
}

.map-unit-focus__stats strong {
    color: #f9f4e6;
    font-size: 0.96rem;
}

.leaflet-container {
    font-family: "Cairo", sans-serif;
    background:
        radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.1), transparent 22%),
        linear-gradient(180deg, #8ed2e6 0%, #63b5d5 36%, #4e8cb7 100%);
}

.leaflet-pane svg,
.leaflet-pane img {
    user-select: none;
    -webkit-user-drag: none;
}

.world-map-base {
    opacity: 0.92;
    transform-origin: center center;
    filter: saturate(0.86) contrast(0.96) drop-shadow(0 14px 24px rgba(12, 31, 42, 0.24));
}

.world-map-base--world_war {
    opacity: 0.86;
}

.world-map-base--mediterranean,
.world-map-base--middle_east {
    opacity: 0.95;
}

.leaflet-control-zoom {
    border: 1px solid rgba(28, 53, 62, 0.26) !important;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
}

.leaflet-control-zoom a {
    background: rgba(9, 18, 18, 0.82) !important;
    color: #f3efe2 !important;
    border-bottom-color: rgba(255, 255, 255, 0.08) !important;
}

@media (max-width: 1150px) {
    .map-unit-focus {
        right: 12px;
        bottom: 180px;
    }

    .city-node__label {
        padding: 4px 8px;
    }

    .city-node__label strong {
        font-size: 0.72rem;
    }
}

@media (max-width: 820px) {
    .map-unit-focus {
        grid-template-columns: 96px minmax(0, 1fr);
    }

    .map-unit-focus__media {
        height: 82px;
    }

    .map-unit-focus__title {
        font-size: 1.5rem;
    }

    .map-unit-focus__stats {
        grid-template-columns: 1fr;
    }

    .city-focus-card__stats {
        grid-template-columns: 1fr;
    }
}

.page-ranks .container {
    width: min(1450px, 95vw);
}

.rank-overview {
    position: relative;
    overflow: hidden;
    border-radius: 26px;
    border: 1px solid rgba(200, 154, 70, 0.22);
    background:
        linear-gradient(90deg, rgba(57, 32, 16, 0.92), rgba(14, 23, 20, 0.96) 12%, rgba(6, 15, 13, 0.98) 50%, rgba(14, 23, 20, 0.96) 88%, rgba(57, 32, 16, 0.92)),
        radial-gradient(circle at 18% 18%, rgba(200, 154, 70, 0.12), transparent 26%),
        radial-gradient(circle at 82% 70%, rgba(111, 178, 214, 0.12), transparent 30%);
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.42);
}

.rank-overview::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.03), transparent),
        linear-gradient(0deg, transparent, rgba(255, 255, 255, 0.02), transparent);
    pointer-events: none;
}

.rank-overview-head {
    position: relative;
    z-index: 1;
    display: flex;
    justify-content: space-between;
    gap: 20px;
    align-items: flex-end;
    padding: 26px 30px 22px;
    border-bottom: 1px solid rgba(219, 203, 162, 0.16);
    background: linear-gradient(90deg, rgba(81, 45, 22, 0.95), rgba(48, 30, 17, 0.92) 38%, rgba(34, 26, 17, 0.82));
}

.rank-kicker {
    display: inline-block;
    color: rgba(255, 246, 227, 0.9);
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 3px;
    text-transform: uppercase;
}

.rank-overview h1 {
    margin: 8px 0 10px;
    font-family: "Teko", sans-serif;
    font-size: 4rem;
    line-height: 0.9;
    letter-spacing: 1px;
}

.rank-overview-head p {
    margin: 0;
    max-width: 60ch;
    color: #d5dfd9;
}

.rank-overview-status {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 112px 1fr;
    gap: 12px;
    align-items: center;
    min-width: 320px;
    padding: 14px 16px;
    border-radius: 18px;
    border: 1px solid rgba(200, 154, 70, 0.22);
    background: rgba(7, 14, 12, 0.5);
    backdrop-filter: blur(5px);
}

.rank-progress-shell {
    position: relative;
    z-index: 1;
    padding: 18px 30px 0;
}

.rank-progress-copy {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
    margin-bottom: 10px;
}

.rank-progress-copy strong {
    color: #f0f5f2;
}

.rank-progress-copy span {
    color: #b8c8bf;
    font-size: 0.92rem;
}

.rank-progress-wrap {
    margin-top: 0;
    background: rgba(255, 255, 255, 0.08);
}

.rank-table-shell {
    position: relative;
    z-index: 1;
    padding: 18px 22px 22px;
    overflow-x: auto;
}

.rank-table {
    min-width: 900px;
    border-collapse: separate;
    border-spacing: 0;
    overflow: hidden;
    border: 1px solid rgba(214, 216, 205, 0.12);
    border-radius: 22px;
    background: rgba(6, 13, 11, 0.36);
}

.rank-table thead th {
    padding: 20px 18px;
    border-bottom-color: rgba(219, 203, 162, 0.14);
    background: rgba(34, 38, 35, 0.42);
    color: #ddc585;
    font-size: 0.86rem;
    letter-spacing: 1px;
}

.rank-table td {
    padding: 18px;
    border-bottom-color: rgba(219, 232, 224, 0.12);
    vertical-align: middle;
    background: rgba(6, 11, 10, 0.06);
}

.rank-table tbody tr:last-child td {
    border-bottom: 0;
}

.rank-table tbody tr:hover td {
    background: rgba(255, 255, 255, 0.02);
}

.rank-table tbody tr.is-current td {
    background: linear-gradient(90deg, rgba(200, 154, 70, 0.12), rgba(71, 112, 135, 0.08), rgba(200, 154, 70, 0.08));
    box-shadow: inset 0 1px 0 rgba(222, 193, 129, 0.26), inset 0 -1px 0 rgba(222, 193, 129, 0.18);
}

.rank-level-cell {
    width: 88px;
    text-align: center;
    color: #f2f6f4;
    font-family: "Teko", sans-serif;
    font-size: 2rem;
    letter-spacing: 0.6px;
}

.rank-insignia-cell {
    width: 156px;
    text-align: center;
}

.rank-name-cell strong {
    display: block;
    font-size: 1.55rem;
    line-height: 1.1;
    font-family: "Teko", sans-serif;
    letter-spacing: 1px;
}

.rank-name-cell small {
    display: block;
    margin-top: 6px;
    color: #bac8c0;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 0.82rem;
}

.rank-score-cell {
    width: 180px;
    direction: ltr;
    text-align: left;
    color: #f7fbf8;
    font-size: 2rem;
    font-family: "Teko", sans-serif;
    letter-spacing: 0.7px;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.94rem;
}

th,
td {
    border-bottom: 1px solid var(--line);
    padding: 9px;
    text-align: right;
}

html[dir="ltr"] th,
html[dir="ltr"] td {
    text-align: left;
}

th {
    color: #d4b677;
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.6px;
}

.footer {
    border-top: 1px solid var(--line);
    margin-top: 18px;
    padding: 16px 0 20px;
    text-align: center;
    color: var(--muted);
    font-size: 0.85rem;
}

@media (max-width: 980px) {
    .hero,
    .two-col,
    .auth-grid {
        grid-template-columns: 1fr;
    }

    .topbar {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }

    .topbar-actions {
        width: 100%;
        justify-content: space-between;
    }

    .lang-switcher {
        justify-content: flex-start;
    }

    .stats-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .battle-layout {
        grid-template-columns: 1fr;
    }

    .shop-bundle-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .rank-overview-head,
    .rank-progress-copy {
        flex-direction: column;
        align-items: flex-start;
    }

    .rank-overview-status {
        width: 100%;
        min-width: 0;
    }

    .province-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .war-stage {
        min-height: 300px;
    }

    .world-map-shell {
        min-height: 78vh;
    }

    .map-hud {
        width: 250px;
    }

    .map-hud-left {
        right: auto;
        left: 12px;
    }

    .hud-stats {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 560px) {
    .container {
        width: min(98vw, 1240px);
    }

    .hero-left,
    .hero-right,
    .card {
        padding: 14px;
        border-radius: 14px;
    }

    .hero-left h1 {
        font-size: 2.5rem;
    }

    .shop-bundle-grid {
        grid-template-columns: 1fr;
    }

    .shop-bundle-top {
        grid-template-columns: 1fr;
        gap: 8px;
        padding: 14px 14px 10px;
    }

    .shop-bundle-card.is-popular .shop-bundle-top {
        padding-top: 52px;
    }

    .shop-bundle-total {
        font-size: 1.6rem;
        justify-self: start;
    }

    .shop-coin-scene {
        min-height: 216px;
    }

    .shop-coin-cluster {
        width: min(100%, 250px);
        height: 180px;
    }

    .shop-bundle-stats {
        grid-template-columns: 1fr;
        padding: 4px 12px 12px;
    }

    .shop-bundle-price strong {
        font-size: 1.7rem;
    }

    .rank-summary {
        grid-template-columns: 78px 1fr;
        padding: 10px 12px;
    }

    .rank-summary-badge {
        width: 78px;
        height: 124px;
    }

    .rank-badge-hero {
        width: 72px;
        height: 118px;
    }

    .rank-overview-head {
        padding: 18px;
    }

    .rank-overview h1 {
        font-size: 2.9rem;
    }

    .rank-progress-shell,
    .rank-table-shell {
        padding-left: 16px;
        padding-right: 16px;
    }

    .rank-table thead th,
    .rank-table td {
        padding: 14px 10px;
    }

    .rank-badge-table,
    .rank-badge-status {
        width: 74px;
        height: 122px;
    }

    .rank-overview-status {
        grid-template-columns: 78px 1fr;
        padding: 10px 12px;
    }

    .rank-level-cell,
    .rank-score-cell {
        font-size: 1.55rem;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .province-grid {
        grid-template-columns: 1fr;
    }

    .war-stage {
        min-height: 230px;
    }

    .world-map-shell {
        min-height: 86vh;
    }

    .map-hud {
        position: static;
        width: 100%;
        margin: 10px;
    }

    .map-hud-left,
    .map-hud-right {
        left: auto;
        right: auto;
    }

    .resource-chip {
        min-width: 130px;
    }

    .city-node__label small {
        display: none;
    }

    th,
    td {
        padding: 7px;
        font-size: 0.82rem;
    }
}
