/* ============================================================
   WAR OF LYANX - Flask Leaderboard Stylesheet
   ============================================================ */

@font-face {
    font-family: 'PIXELED';
    src: url('assets/Pixeled.ttf') format('truetype');
}

/* --- Reset & Base --- */
* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    background-color: #1a1a2e;
    color: #e0d6c8;
    font-family: 'PIXELED', monospace;
    min-height: 100vh;
    overflow-x: hidden;
}

a { color: #D4A574; text-decoration: none; }
a:hover { color: #FFD700; }

/* --- Navbar --- */
.navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px;
    background: #12122a;
    border-bottom: 2px solid #2a2a4a;
    flex-wrap: wrap;
    gap: 8px;
}

.nav-brand {
    font-size: 16px;
    color: #D4A574;
    letter-spacing: 2px;
}

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

.nav-link {
    font-size: 9px;
    color: #8a7a6a;
    letter-spacing: 1px;
    transition: color 0.2s;
}

.nav-link:hover { color: #D4A574; }

.nav-profile {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #D4A574;
}

.nav-avatar {
    width: 22px;
    height: 22px;
    image-rendering: pixelated;
    border-radius: 3px;
}

.nav-coins {
    background: #2a2a4a;
    padding: 2px 8px;
    border-radius: 4px;
    color: #FFD700;
    font-size: 9px;
}

.nav-register {
    background: #D4A574;
    color: #1a1a2e !important;
    padding: 4px 10px;
    border-radius: 4px;
}

.nav-admin {
    color: #F44336 !important;
}

/* --- Jukebox --- */
.jukebox {
    display: flex;
    align-items: center;
    gap: 6px;
    background: #1a1a2e;
    border: 1px solid #3a3a5a;
    border-radius: 6px;
    padding: 4px 8px;
}

.jukebox-select {
    font-family: 'PIXELED', monospace;
    font-size: 7px;
    padding: 6px 20px 6px 8px;
    background: #2a2a4a url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='6'%3E%3Cpath d='M0 0l4 6 4-6z' fill='%23D4A574'/%3E%3C/svg%3E") no-repeat right 6px center;
    border: 1px solid #3a3a5a;
    border-radius: 4px;
    color: #D4A574;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    max-width: 130px;
    min-width: 100px;
    line-height: 1.4;
}

.jukebox-btn {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #2a2a4a;
    border: 1px solid #3a3a5a;
    border-radius: 4px;
    color: #D4A574;
    cursor: pointer;
    transition: all 0.2s;
    padding: 0;
}

.jukebox-btn:hover {
    border-color: #D4A574;
    color: #FFD700;
    background: #3a3a5a;
}

.jukebox-icon {
    width: 14px;
    height: 14px;
}

.jukebox-vol {
    display: flex;
    align-items: center;
}

.jukebox-volume {
    -webkit-appearance: none;
    appearance: none;
    width: 50px;
    height: 4px;
    background: #3a3a5a;
    border-radius: 2px;
    outline: none;
    cursor: pointer;
}

.jukebox-volume::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 10px;
    height: 10px;
    background: #D4A574;
    border-radius: 50%;
    cursor: pointer;
}

.jukebox-volume::-moz-range-thumb {
    width: 10px;
    height: 10px;
    background: #D4A574;
    border-radius: 50%;
    border: none;
    cursor: pointer;
}

/* --- Hamburger --- */
.nav-hamburger {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
}

.nav-hamburger span {
    display: block;
    width: 22px;
    height: 2px;
    background: #D4A574;
    border-radius: 1px;
    transition: all 0.3s;
}

.nav-hamburger-active span:nth-child(1) {
    transform: rotate(45deg) translate(4px, 4px);
}

.nav-hamburger-active span:nth-child(2) {
    opacity: 0;
}

.nav-hamburger-active span:nth-child(3) {
    transform: rotate(-45deg) translate(4px, -4px);
}

/* --- Container --- */
.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px 16px;
}

/* --- Header --- */
.header {
    text-align: center;
    padding: 20px 0;
}

.title {
    font-size: 28px;
    color: #D4A574;
    text-shadow: 3px 3px 0 #2a1a0a, 0 0 20px rgba(212, 165, 116, 0.3);
    letter-spacing: 4px;
}

.subtitle {
    font-size: 12px;
    color: #8a7a6a;
    margin-top: 8px;
    letter-spacing: 2px;
}

/* --- Flash Messages --- */
.flash-container {
    max-width: 900px;
    margin: 10px auto;
    padding: 0 16px;
}

.flash {
    padding: 10px 16px;
    border-radius: 6px;
    font-size: 10px;
    margin-bottom: 6px;
    letter-spacing: 1px;
}

.flash-error {
    background: rgba(244, 67, 54, 0.2);
    border: 1px solid #F44336;
    color: #F44336;
}

.flash-success {
    background: rgba(76, 175, 80, 0.2);
    border: 1px solid #4CAF50;
    color: #4CAF50;
}

/* --- Tabs --- */
.tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: center;
    margin: 24px 0;
}

.tab {
    font-family: 'PIXELED', monospace;
    font-size: 10px;
    padding: 8px 14px;
    border: 2px solid #3a3a5a;
    background: #2a2a4a;
    color: #8a7a6a;
    cursor: pointer;
    transition: all 0.2s;
    letter-spacing: 1px;
    display: inline-block;
}

.tab:hover { border-color: #D4A574; color: #D4A574; }

.tab.active {
    background: #D4A574;
    color: #1a1a2e;
    border-color: #D4A574;
}
.tab.active:hover,
.tab.active:active,
.tab.active:focus { color: #ffffff; }

/* --- Podium --- */
.podium {
    display: flex;
    justify-content: center;
    align-items: flex-end;
    gap: 16px;
    margin-bottom: 30px;
    padding: 20px 0;
}

.podium-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: transform 0.3s;
}

.podium-item:hover { transform: translateY(-4px); }

.podium-rank { font-size: 24px; margin-bottom: 6px; }

.podium-item:nth-child(1) .podium-rank { color: #C0C0C0; }
.podium-item:nth-child(2) .podium-rank { color: #FFD700; }
.podium-item:nth-child(3) .podium-rank { color: #CD7F32; }

.podium-avatar {
    width: 80px;
    height: 80px;
    image-rendering: pixelated;
    border: 3px solid #3a3a5a;
    border-radius: 8px;
    background: #2a2a4a;
    padding: 4px;
}

.podium-item:nth-child(2) .podium-avatar {
    width: 100px;
    height: 100px;
    border-color: #FFD700;
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.3);
}

.podium-item:nth-child(1) .podium-avatar { border-color: #C0C0C0; }
.podium-item:nth-child(3) .podium-avatar { border-color: #CD7F32; }

.podium-name { font-size: 11px; margin-top: 8px; color: #D4A574; text-align: center; }
.podium-wins { font-size: 10px; color: #8a7a6a; margin-top: 4px; }

.podium-pedestal { width: 100%; margin-top: 8px; border-radius: 4px 4px 0 0; }

.podium-item:nth-child(1) .podium-pedestal { height: 60px; background: linear-gradient(180deg, #C0C0C0, #808080); }
.podium-item:nth-child(2) .podium-pedestal { height: 80px; background: linear-gradient(180deg, #FFD700, #B8860B); }
.podium-item:nth-child(3) .podium-pedestal { height: 40px; background: linear-gradient(180deg, #CD7F32, #8B4513); }

/* --- Ranking Table --- */
.ranking-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 4px;
}

.ranking-row {
    background: #2a2a4a;
    transition: background 0.2s, transform 0.2s;
}

.ranking-row:hover { background: #3a3a5a; transform: translateX(4px); }

.ranking-row td {
    padding: 10px 12px;
    vertical-align: middle;
}

.ranking-row td:first-child { border-radius: 6px 0 0 6px; }
.ranking-row td:last-child { border-radius: 0 6px 6px 0; }

.col-rank { width: 50px; text-align: center; font-size: 16px; color: #D4A574; }

.col-trend { width: 30px; text-align: center; font-size: 12px; }
.trend-up { color: #4CAF50; }
.trend-down { color: #F44336; }
.trend-same { color: #555; }
.trend-new { color: #FFD700; font-size: 9px; }

.col-kingdom { display: flex; align-items: center; gap: 10px; }

.kingdom-avatar {
    width: 36px;
    height: 36px;
    image-rendering: pixelated;
    border-radius: 4px;
}

.kingdom-avatar-sm {
    width: 28px;
    height: 28px;
    image-rendering: pixelated;
    border-radius: 3px;
}

.kingdom-name { font-size: 12px; color: #e0d6c8; }

.col-wins { text-align: center; font-size: 14px; color: #FFD700; min-width: 60px; }
.col-played { text-align: center; font-size: 11px; color: #8a7a6a; min-width: 60px; }
.col-winrate { text-align: center; font-size: 11px; color: #D4A574; min-width: 70px; }

.winbar-container {
    width: 120px;
    height: 8px;
    background: #1a1a2e;
    border-radius: 4px;
    overflow: hidden;
}

.winbar-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.6s ease;
}

.no-data { text-align: center; padding: 40px; color: #555; font-size: 12px; }

/* --- History --- */
.history-section { margin-top: 40px; }

.section-title {
    font-size: 16px;
    color: #D4A574;
    text-align: center;
    margin-bottom: 16px;
    letter-spacing: 2px;
}

.history-list { display: flex; flex-direction: column; gap: 8px; }

.history-item {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #2a2a4a;
    padding: 10px 14px;
    border-radius: 6px;
    border-left: 4px solid #D4A574;
    transition: background 0.2s;
}

.history-item:hover { background: #3a3a5a; }

.history-date { font-size: 9px; color: #666; min-width: 80px; }
.history-mode { font-size: 9px; color: #8a7a6a; min-width: 100px; }

.history-winner {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
}

.history-winner img {
    width: 28px;
    height: 28px;
    image-rendering: pixelated;
    border-radius: 4px;
}

.history-winner-name { font-size: 11px; color: #FFD700; }
.history-participants { font-size: 9px; color: #555; }

.history-participants-avatars {
    display: flex;
    align-items: center;
    gap: 3px;
    flex-wrap: wrap;
    margin-left: auto;
}

.history-p-avatar {
    width: 20px;
    height: 20px;
    image-rendering: pixelated;
    border-radius: 3px;
    opacity: 0.5;
    transition: opacity 0.2s, transform 0.2s;
}

.history-p-avatar:hover {
    opacity: 1;
    transform: scale(1.3);
    z-index: 1;
}

.history-p-winner {
    opacity: 1;
    border: 2px solid #FFD700;
    box-shadow: 0 0 6px rgba(255, 215, 0, 0.4);
}

.history-survival {
    font-size: 9px;
    color: #FF8200;
    background: rgba(255, 130, 0, 0.15);
    padding: 2px 6px;
    border-radius: 3px;
    letter-spacing: 1px;
}

/* --- Auth Forms --- */
.auth-container {
    max-width: 400px;
    margin: 40px auto;
    text-align: center;
}

/* Captcha drag box */
.captcha-box {
    background: #2a2a4a;
    border-radius: 10px;
    padding: 16px;
    text-align: center;
}

.captcha-label {
    font-size: 8px;
    color: #D4A574;
    margin-bottom: 12px;
    line-height: 1.8;
}

.captcha-slider {
    position: relative;
    width: 100%;
    height: 80px;
    background: #1a1a2e;
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid #3a3a5a;
    user-select: none;
    -webkit-user-select: none;
}

.captcha-code-hidden {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 28px;
    font-family: 'PIXELED', monospace;
    color: #FFD700;
    letter-spacing: 8px;
    opacity: 0;
    clip-path: inset(0 100% 0 0);
    pointer-events: none;
    z-index: 1;
}

.captcha-cat {
    position: absolute;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
    width: 70px;
    height: 70px;
    cursor: grab;
    z-index: 2;
    transition: none;
}

.captcha-cat:active { cursor: grabbing; }

.captcha-cat img {
    width: 100%;
    height: 100%;
    image-rendering: pixelated;
    pointer-events: none;
}

.captcha-hint {
    font-size: 7px;
    color: #8a7a6a;
    margin-top: 10px;
}


.auth-title {
    font-size: 24px;
    color: #D4A574;
    margin-bottom: 24px;
    letter-spacing: 3px;
}

.auth-form { display: flex; flex-direction: column; gap: 16px; }

.form-group { text-align: left; }

.form-label {
    display: block;
    font-size: 9px;
    color: #8a7a6a;
    margin-bottom: 6px;
    letter-spacing: 1px;
}

.form-input {
    width: 100%;
    padding: 10px 14px;
    background: #2a2a4a;
    border: 2px solid #3a3a5a;
    color: #e0d6c8;
    font-family: 'PIXELED', monospace;
    font-size: 11px;
    border-radius: 6px;
    outline: none;
    transition: border-color 0.2s;
}

.form-input:focus { border-color: #D4A574; }

.form-input-small { width: 120px; display: inline-block; }

.form-row {
    display: flex;
    gap: 16px;
}

.form-row .form-group { flex: 1; }

select.form-input {
    appearance: none;
    cursor: pointer;
}

.btn {
    font-family: 'PIXELED', monospace;
    font-size: 11px;
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    letter-spacing: 1px;
    transition: all 0.2s;
}

.btn-primary,
.btn-secondary {
    background: #D4A574;
    color: #1a1a2e;
}

.btn-primary:hover,
.btn-primary:active,
.btn-primary:focus,
.btn-secondary:hover,
.btn-secondary:active,
.btn-secondary:focus { color: #ffffff; }

.btn-warn {
    background: #FF8200;
    color: #1a1a2e;
}

.btn-warn:hover,
.btn-warn:active,
.btn-warn:focus { color: #ffffff; }

.btn-full { width: 100%; }

.auth-link {
    margin-top: 20px;
    font-size: 9px;
    color: #555;
}

.auth-link a { color: #D4A574; }

/* --- Profile --- */
.profile-container {
    max-width: 600px;
    margin: 0 auto;
}

.profile-main-title {
    text-align: center;
    max-width: 1000px;
    margin: 0 auto 24px;
}

.profile-layout {
    display: flex;
    gap: 24px;
    max-width: 1000px;
    margin: 0 auto;
    align-items: flex-start;
}

.profile-left {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.profile-right {
    width: 300px;
    flex-shrink: 0;
    position: sticky;
    top: 20px;
}

/* Kill Leaderboard */
.kill-leaderboard {
    background: #2a2a4a;
    border-radius: 8px;
    padding: 16px;
    display: flex;
    flex-direction: column;
}

.kill-lb-title {
    font-size: 14px;
    color: #D4A574;
    text-align: center;
    margin-bottom: 4px;
}

.kill-lb-period {
    font-size: 8px;
    color: #666;
    text-align: center;
    margin-bottom: 16px;
}

.kill-lb-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
}

.kill-lb-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 8px;
    border-radius: 6px;
    background: #1a1a2e;
    transition: background 0.2s;
}

.kill-lb-row:hover { background: #22223a; }

.kill-lb-me {
    background: #2a2a3e;
    border: 1px solid #D4A574;
}

.kill-lb-rank {
    font-size: 9px;
    color: #8a7a6a;
    min-width: 28px;
    text-align: center;
}

.kill-lb-row:nth-child(1) .kill-lb-rank { color: #FFD700; }
.kill-lb-row:nth-child(2) .kill-lb-rank { color: #C0C0C0; }
.kill-lb-row:nth-child(3) .kill-lb-rank { color: #CD7F32; }

.kill-lb-avatar {
    width: 28px;
    height: 28px;
    flex-shrink: 0;
}

.kill-lb-avatar img {
    width: 28px;
    height: 28px;
    image-rendering: pixelated;
    border-radius: 4px;
}

.kill-lb-no-avatar {
    width: 28px;
    height: 28px;
    background: #3a3a5a;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: #555;
}

.kill-lb-name {
    flex: 1;
    font-size: 8px;
    color: #e0d6c8;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.kill-lb-me .kill-lb-name { color: #D4A574; }

.kill-lb-kills {
    font-size: 10px;
    color: #F44336;
    min-width: 36px;
    text-align: right;
}

.kill-lb-separator {
    text-align: center;
    color: #555;
    font-size: 12px;
    padding: 4px 0;
}

.kill-lb-empty {
    text-align: center;
    color: #555;
    font-size: 9px;
    padding: 20px 0;
}

@media (max-width: 768px) {
    .profile-layout {
        flex-direction: column;
    }
    .profile-right {
        width: 100%;
        position: static;
    }
}

/* Daily bonus info */
/* Profile subscription block */
.profile-subscription {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    margin-bottom: 12px;
    background: rgba(212, 165, 116, 0.08);
    border-radius: 6px;
    border: 1px solid #3a3a5a;
}
.profile-sub-none {
    justify-content: space-between;
}
.profile-sub-status {
    font-family: 'PIXELED', monospace;
    font-size: 8px;
    color: #4CAF50;
    letter-spacing: 0.5px;
}
.profile-sub-cancelling {
    color: #F44336;
}
.profile-sub-none .profile-sub-status {
    color: #8a7a6a;
}
.profile-sub-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-left: auto;
}
.profile-sub-actions form {
    display: flex;
    align-items: center;
}
.profile-sub-btn {
    font-family: 'PIXELED', monospace;
    font-size: 9px;
    padding: 6px 14px;
    border-radius: 4px;
    border: 1px solid #3a3a5a;
    background: none;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    box-sizing: border-box;
}
.profile-sub-manage-btn {
    color: #D4A574;
    border-color: #D4A574;
}
.profile-sub-manage-btn:hover {
    background: #D4A574;
    color: #1a1a2e;
}
.profile-sub-cancel {
    color: #F44336;
    border-color: #F44336;
}
.profile-sub-cancel:hover {
    background: #F44336;
    color: #fff;
}
.profile-sub-resume {
    color: #4CAF50;
    border-color: #4CAF50;
}
.profile-sub-resume:hover {
    background: #4CAF50;
    color: #fff;
}
.btn-subscribe-sm {
    font-family: 'PIXELED', monospace;
    font-size: 7px;
    color: #1a1a2e;
    background: #D4A574;
    text-decoration: none;
    padding: 5px 12px;
    border-radius: 4px;
    transition: all 0.2s;
}
.btn-subscribe-sm:hover {
    background: #c4956a;
}

.daily-bonus-info {
    text-align: center;
    margin-bottom: 12px;
    padding: 8px 12px;
    background: rgba(212, 165, 116, 0.1);
    border-radius: 6px;
    border: 1px solid #3a3a5a;
}

.bonus-claimed {
    font-size: 9px;
    color: #4CAF50;
    display: block;
    margin-bottom: 4px;
}

.bonus-next {
    font-size: 8px;
    color: #8a7a6a;
}

.bonus-available {
    font-size: 10px;
    color: #FFD700;
    animation: pulse-bonus 1.5s ease-in-out infinite;
}

@keyframes pulse-bonus {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

.profile-card {
    background: #2a2a4a;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 24px;
}

.profile-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
}

.profile-avatar {
    width: 64px;
    height: 64px;
    image-rendering: pixelated;
    border-radius: 8px;
    border: 3px solid #D4A574;
}

.profile-avatar-placeholder {
    width: 64px;
    height: 64px;
    background: #3a3a5a;
    border-radius: 8px;
    border: 3px solid #555;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: #555;
}

.profile-name { font-size: 18px; color: #D4A574; }
.profile-email { font-size: 9px; color: #666; margin-top: 4px; }

.profile-stats {
    display: flex;
    gap: 12px;
}

.stat-box {
    flex: 1;
    background: #1a1a2e;
    border-radius: 6px;
    padding: 12px;
    text-align: center;
}

.stat-value { display: block; font-size: 18px; color: #e0d6c8; }
.stat-label { display: block; font-size: 8px; color: #666; margin-top: 4px; }
.coins-value { color: #FFD700 !important; }

.profile-section {
    background: #2a2a4a;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 24px;
}

.profile-section .section-title { margin-bottom: 16px; }

.current-kingdom {
    display: flex;
    align-items: center;
    gap: 12px;
    justify-content: center;
    margin-bottom: 16px;
}

.kingdom-avatar-lg {
    width: 56px;
    height: 56px;
    image-rendering: pixelated;
    border-radius: 6px;
    border: 2px solid #D4A574;
}

.kingdom-name-lg { font-size: 16px; color: #D4A574; }

.no-kingdom { text-align: center; color: #555; font-size: 11px; margin-bottom: 16px; }

.kingdom-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 8px;
    margin-bottom: 16px;
}

.kingdom-grid-sm {
    grid-template-columns: repeat(auto-fill, minmax(70px, 1fr));
}

/* Profile kingdom tabs */
.profile-kingdom-tabs {
    margin-bottom: 14px;
}
.pk-tab-content {
    animation: fadeInTab 0.3s ease;
}

/* Suggestion tab */
.suggestion-intro {
    font-family: 'PIXELED', monospace;
    font-size: 7px;
    color: #8a7a6a;
    text-align: center;
    margin-bottom: 12px;
    letter-spacing: 0.5px;
}
.suggestion-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.suggestion-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    background: #1a1a2e;
    border-radius: 6px;
    border: 1px solid transparent;
    transition: background 0.2s;
}
.suggestion-row:hover {
    background: #22224a;
}
.suggestion-current {
    background: rgba(212, 165, 116, 0.1);
    border-color: #D4A574;
}
.suggestion-rank {
    font-family: 'PIXELED', monospace;
    font-size: 8px;
    color: #555;
    width: 22px;
    flex-shrink: 0;
}
.suggestion-row:nth-child(1) .suggestion-rank { color: #FFD700; }
.suggestion-row:nth-child(2) .suggestion-rank { color: #C0C0C0; }
.suggestion-row:nth-child(3) .suggestion-rank { color: #CD7F32; }
.suggestion-avatar {
    width: 28px;
    height: 28px;
    image-rendering: pixelated;
    border-radius: 4px;
    flex-shrink: 0;
}
.suggestion-name {
    font-family: 'PIXELED', monospace;
    font-size: 7px;
    color: #e0d6c8;
    min-width: 70px;
    flex-shrink: 0;
}
.suggestion-stats {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
    flex-wrap: wrap;
    justify-content: flex-end;
}
.suggestion-stat {
    font-family: 'PIXELED', monospace;
    font-size: 6px;
    color: #8a7a6a;
    white-space: nowrap;
}
.suggestion-win { color: #4CAF50; }
.suggestion-podium { color: #D4A574; }
.suggestion-played { color: #666; }

.kingdom-option, .kingdom-check {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 8px;
    background: #1a1a2e;
    border: 2px solid #3a3a5a;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 7px;
    color: #8a7a6a;
}

.kingdom-option:hover, .kingdom-check:hover { border-color: #D4A574; }
.kingdom-option.selected, .kingdom-option:has(input:checked) { border-color: #FFD700; background: #2a2a4a; }
.kingdom-check:has(input:checked) { border-color: #FFD700; background: #2a2a4a; }

.kingdom-option input, .kingdom-check input { display: none; }

.kingdom-option img, .kingdom-check img {
    width: 40px;
    height: 40px;
    image-rendering: pixelated;
}

.kingdom-cooldown {
    text-align: center;
    color: #FF8200;
    font-size: 10px;
    margin-top: 12px;
}

/* Bet History Cards (profile) */
.bet-history {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.bet-history-card {
    background: #1a1a2e;
    border-radius: 8px;
    padding: 12px 14px;
    border-left: 4px solid #555;
}

.bet-history-pending { border-left-color: #FF8200; }
.bet-history-won { border-left-color: #4CAF50; }
.bet-history-lost { border-left-color: #F44336; }

.bet-history-top {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.bet-history-id {
    font-size: 9px;
    color: #666;
}

.bet-history-mode {
    font-size: 10px;
    color: #D4A574;
}

.bet-history-mid {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.bet-history-avatar {
    width: 40px;
    height: 40px;
    image-rendering: pixelated;
    border-radius: 4px;
}

.bet-history-coins {
    font-size: 12px;
    color: #FF8200;
}

.bet-history-bottom {
    display: flex;
}

.bet-history-tag {
    font-size: 9px;
    padding: 3px 10px;
    border-radius: 4px;
}

.tag-pending { background: #3a3a2a; color: #FF8200; }
.tag-won { background: #1a3a1a; color: #4CAF50; }
.tag-lost { background: #3a1a1a; color: #F44336; }

/* --- Bets --- */

/* Tabs */
.bets-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 24px;
    border-bottom: 2px solid #3a3a5a;
}

.bets-tab {
    flex: 1;
    padding: 12px 20px;
    background: none;
    border: none;
    color: #666;
    font-family: 'PIXELED', monospace;
    font-size: 11px;
    cursor: pointer;
    transition: all 0.2s;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
}

.bets-tab:hover { color: #D4A574; }

.bets-tab.active {
    color: #D4A574;
    border-bottom-color: #D4A574;
}
.bets-tab.active:hover,
.bets-tab.active:active,
.bets-tab.active:focus { color: #ffffff; }

.bets-tab-content {
    display: none;
}

.bets-tab-content.active {
    display: block;
}

/* Match card (ongoing — bet view) */
.match-card-bet {
    background: #2a2a4a;
    border-radius: 10px;
    padding: 24px;
    margin-bottom: 20px;
    border: 1px solid #3a3a5a;
}

/* Mode intro */
.match-mode-intro {
    text-align: center;
    margin-bottom: 20px;
}

.match-mode-name {
    display: block;
    font-size: 14px;
    color: #D4A574;
    margin-bottom: 6px;
}

.match-mode-desc {
    display: block;
    font-size: 8px;
    color: #8a7a6a;
    letter-spacing: 1px;
}

/* Kingdom heads (centered, no text) */
.match-kingdoms-heads {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.kingdom-head {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid #3a3a5a;
    transition: all 0.2s;
    background: #1a1a2e;
    display: flex;
    align-items: center;
    justify-content: center;
}

.kingdom-head img {
    width: 48px;
    height: 48px;
    image-rendering: pixelated;
}

.kingdom-head-selected {
    border-color: #FFD700;
    box-shadow: 0 0 12px rgba(255, 215, 0, 0.4);
}

/* Publish info */
.match-publish-info {
    text-align: center;
    margin-bottom: 16px;
}

.match-countdown {
    font-size: 9px;
    color: #2196F3;
    display: block;
    margin-bottom: 4px;
}

.match-ref {
    font-size: 8px;
    color: #444;
}

/* Bet placed banner */
.bet-placed-banner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    background: #1a1a2e;
    padding: 12px 20px;
    border-radius: 8px;
    border: 2px solid #4CAF50;
}

.bet-placed-avatar {
    width: 36px;
    height: 36px;
    image-rendering: pixelated;
}

.bet-placed-text {
    font-size: 10px;
    color: #4CAF50;
}

/* Bet form (inline for ongoing) */
.bet-form-inline { margin-top: 8px; }

.bet-pick-row {
    display: flex;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 14px;
}

.bet-pick-option {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid #3a3a5a;
    cursor: pointer;
    transition: all 0.2s;
    background: #1a1a2e;
    display: flex;
    align-items: center;
    justify-content: center;
}

.bet-pick-option:hover { border-color: #D4A574; transform: scale(1.1); }
.bet-pick-option:has(input:checked) {
    border-color: #FFD700;
    box-shadow: 0 0 12px rgba(255, 215, 0, 0.4);
    transform: scale(1.15);
}
.bet-pick-option input { display: none; }

.bet-pick-option img {
    width: 42px;
    height: 42px;
    image-rendering: pixelated;
}

/* Wager row */
.bet-wager-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.bet-wager-input {
    width: 80px;
    padding: 6px 10px;
    background: #1a1a2e;
    border: 2px solid #3a3a5a;
    border-radius: 6px;
    color: #FFD700;
    font-family: 'PIXELED', monospace;
    font-size: 10px;
    text-align: center;
}

.bet-wager-label {
    font-size: 9px;
    color: #8a7a6a;
}

.btn-bet {
    padding: 8px 20px;
    background: #D4A574;
    color: #1a1a2e;
    border: none;
    border-radius: 6px;
    font-family: 'PIXELED', monospace;
    font-size: 10px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-bet:hover,
.btn-bet:active,
.btn-bet:focus { color: #ffffff; }

/* Survival time range betting */
.survival-bet-label {
    font-size: 9px;
    color: #D4A574;
    text-align: center;
    margin-bottom: 8px;
}

.bet-time-ranges {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
    margin-bottom: 10px;
}

.bet-range-option {
    cursor: pointer;
}

.bet-range-option input[type="radio"] {
    display: none;
}

.range-label {
    display: inline-block;
    padding: 6px 12px;
    background: #1a1a2e;
    border: 2px solid #3a3a5a;
    border-radius: 8px;
    font-family: 'PIXELED', monospace;
    font-size: 8px;
    color: #8a7a6a;
    transition: all 0.2s;
}

.bet-range-option input[type="radio"]:checked + .range-label {
    border-color: #D4A574;
    color: #D4A574;
    background: #2a2a4a;
}

.range-label:hover {
    border-color: #D4A574;
    color: #D4A574;
}

/* Survival kingdom head (single participant) */
.kingdom-head-survival {
    width: 64px;
    height: 64px;
}

/* Bet placed range label (survival) */
.bet-placed-range {
    font-size: 10px;
    color: #D4A574;
    margin-right: 8px;
}

/* Survival result display */
.match-survival-result {
    text-align: center;
    font-size: 10px;
    color: #D4A574;
    margin-top: 8px;
    padding: 6px;
    background: rgba(212, 165, 116, 0.1);
    border-radius: 6px;
}

/* --- Filters (finished tab) --- */
.bets-filters {
    margin-bottom: 20px;
}

.bets-filter-form {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.filter-label {
    font-size: 9px;
    color: #8a7a6a;
}

.filter-select {
    padding: 6px 10px;
    background: #2a2a4a;
    border: 1px solid #3a3a5a;
    border-radius: 6px;
    color: #D4A574;
    font-family: 'PIXELED', monospace;
    font-size: 8px;
    cursor: pointer;
}

/* Match card (result — finished) */
.match-card-result {
    background: #2a2a4a;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 16px;
    border: 1px solid #3a3a5a;
}

.match-result-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.match-mode-tag {
    font-size: 10px;
    color: #D4A574;
    background: #1a1a2e;
    padding: 4px 10px;
    border-radius: 4px;
}

.match-result-date { font-size: 9px; color: #666; }
.match-duration { font-size: 8px; color: #555; margin-left: auto; }

/* Podium */
.match-podium {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 16px;
    margin-bottom: 16px;
    min-height: 120px;
}

.podium-slot {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.podium-avatar {
    width: 48px;
    height: 48px;
    image-rendering: pixelated;
}

.podium-avatar-winner {
    width: 60px;
    height: 60px;
}

.podium-block {
    padding: 6px 16px;
    border-radius: 4px 4px 0 0;
    font-size: 9px;
    text-align: center;
    min-width: 60px;
}

.podium-block-gold {
    background: linear-gradient(180deg, #FFD700, #C8A200);
    color: #1a1a2e;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.podium-block-silver {
    background: linear-gradient(180deg, #C0C0C0, #8a8a8a);
    color: #1a1a2e;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.podium-block-bronze {
    background: linear-gradient(180deg, #CD7F32, #8B5A2B);
    color: #1a1a2e;
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.podium-block-survivor {
    background: linear-gradient(180deg, #6ec7ff, #2a6fb8);
    color: #1a1a2e;
    height: 50px;
    padding: 0 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 9px;
    letter-spacing: 1px;
}
.podium-survivor .podium-avatar-winner {
    filter: drop-shadow(0 0 6px rgba(110,199,255,0.7));
}

.podium-1st { order: 2; }
.podium-2nd { order: 1; }
.podium-3rd { order: 3; }

/* Survival result */
.match-survival-result {
    text-align: center;
    font-size: 10px;
    color: #2196F3;
    margin-bottom: 12px;
}

/* Participants row in match cards */
.match-participants-row {
    display: flex;
    justify-content: center;
    gap: 4px;
    flex-wrap: wrap;
    margin: 12px 0;
    padding: 8px 0;
    border-top: 1px solid #3a3a5a;
}

.match-p-avatar {
    width: 24px;
    height: 24px;
    image-rendering: pixelated;
    border-radius: 4px;
    opacity: 0.4;
    border: 2px solid transparent;
    transition: opacity 0.2s, transform 0.2s;
}

.match-p-avatar:hover {
    opacity: 1;
    transform: scale(1.3);
    z-index: 1;
}

.match-p-winner {
    opacity: 1;
    border-color: #FFD700;
    box-shadow: 0 0 6px rgba(255, 215, 0, 0.4);
}

.match-p-second {
    opacity: 0.8;
    border-color: #C0C0C0;
}

.match-p-third {
    opacity: 0.7;
    border-color: #CD7F32;
}

/* Bet result banner */
.bet-result-banner {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #1a1a2e;
    padding: 10px 14px;
    border-radius: 6px;
    border-left: 4px solid #555;
}

.bet-result-won { border-left-color: #4CAF50; }
.bet-result-lost { border-left-color: #F44336; }
.bet-result-pending { border-left-color: #FF8200; }

.bet-result-avatar {
    width: 28px;
    height: 28px;
    image-rendering: pixelated;
}

.bet-result-kingdom { font-size: 10px; color: #D4A574; }
.bet-result-amount { font-size: 9px; color: #FFD700; }

.bet-result-tag {
    font-size: 9px;
    margin-left: auto;
    padding: 3px 8px;
    border-radius: 4px;
}

.bet-won-tag { background: #4CAF50; color: #fff; }
.bet-lost-tag { background: #F44336; color: #fff; }

.bet-result-range {
    font-size: 10px;
    color: #D4A574;
    padding: 3px 8px;
    background: rgba(212, 165, 116, 0.15);
    border-radius: 4px;
}

.bet-history-range {
    font-size: 9px;
    color: #D4A574;
    padding: 3px 8px;
    background: rgba(212, 165, 116, 0.15);
    border-radius: 4px;
}

/* --- Admin --- */
.admin-nav {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 12px;
}

.btn-active {
    background: #D4A574 !important;
    color: #1a1a2e !important;
}

/* Users table */
.users-table-wrap {
    overflow-x: auto;
}

.users-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 9px;
}

.users-table th {
    font-size: 8px;
    color: #8a7a6a;
    text-align: left;
    padding: 8px 6px;
    border-bottom: 2px solid #3a3a5a;
    white-space: nowrap;
}

.users-table td {
    padding: 8px 6px;
    border-bottom: 1px solid #2a2a4a;
    vertical-align: middle;
}

.user-row:hover {
    background: rgba(212, 165, 116, 0.05);
}

.user-id {
    color: #8a7a6a;
    font-size: 8px;
}

.user-name {
    color: #D4A574;
    font-size: 9px;
}

.user-kingdom img {
    width: 28px;
    height: 28px;
    image-rendering: pixelated;
}

.user-prev-kingdom {
    opacity: 0.5;
}

.user-no-kingdom, .user-no-badge {
    color: #555;
    font-size: 8px;
}

.user-coins {
    font-size: 10px;
}

.user-stat {
    font-size: 9px;
    text-align: center;
}

.user-badge-col {
    text-align: center;
}

.coins-form {
    display: flex;
    align-items: center;
    gap: 4px;
}

.coins-input {
    width: 70px;
    padding: 4px 6px;
    background: #1a1a2e;
    border: 1px solid #3a3a5a;
    border-radius: 4px;
    color: #D4A574;
    font-family: 'PIXELED', monospace;
    font-size: 8px;
    text-align: center;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 4px;
    margin: 16px 0;
}

.page-link {
    font-family: 'PIXELED', monospace;
    font-size: 8px;
    padding: 6px 10px;
    background: #1a1a2e;
    border: 1px solid #3a3a5a;
    border-radius: 4px;
    color: #8a7a6a;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s;
}

.page-link:hover {
    border-color: #D4A574;
    color: #D4A574;
}

.page-active {
    background: #D4A574;
    color: #1a1a2e;
    border-color: #D4A574;
}

.page-dots {
    color: #555;
    font-size: 8px;
    padding: 0 4px;
}

.admin-section {
    background: #2a2a4a;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 24px;
}

.admin-section .section-title { margin-bottom: 16px; }

/* Admin Suggestion page */
.suggestion-total {
    font-family: 'PIXELED', monospace;
    font-size: 8px;
    color: #D4A574;
    margin-bottom: 16px;
}
.suggestion-table-wrapper {
    overflow-x: auto;
    border-radius: 6px;
}
.suggestion-table .suggestion-mode-col {
    font-size: 6px;
    text-align: center;
    min-width: 36px;
}
.suggestion-mode-cell {
    text-align: center;
    font-size: 10px;
    color: #e0d6c8;
}
.suggestion-zero {
    color: #F44336;
    font-weight: bold;
}
.suggestion-played-cell {
    font-weight: bold;
}
.suggestion-highlight {
    background: rgba(76, 175, 80, 0.08);
}
.suggestion-highlight td:first-child {
    color: #4CAF50;
}

/* Quick pick per mode */
.suggestion-modes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 12px;
}
.suggestion-mode-card {
    background: #1a1a2e;
    border-radius: 8px;
    overflow: hidden;
}
.suggestion-mode-title {
    font-family: 'PIXELED', monospace;
    font-size: 8px;
    color: #D4A574;
    padding: 10px 12px;
    background: #12122a;
    text-align: center;
    border-bottom: 1px solid #2a2a4a;
    letter-spacing: 1px;
}
.suggestion-mode-list {
    padding: 6px 0;
}
.suggestion-mode-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 12px;
    font-family: 'PIXELED', monospace;
    font-size: 7px;
    color: #8a7a6a;
}
.suggestion-mode-item:nth-child(1) { color: #4CAF50; }
.suggestion-mode-item:nth-child(2) { color: #4CAF50; }
.suggestion-mode-item:nth-child(3) { color: #81C784; }
.suggestion-mode-rank {
    width: 22px;
    font-size: 7px;
}
.suggestion-mode-name {
    flex: 1;
    font-size: 6px;
}
.suggestion-mode-count {
    font-size: 9px;
    color: #e0d6c8;
}

.admin-form { display: flex; flex-direction: column; gap: 16px; }

.admin-match-card {
    background: #1a1a2e;
    border-radius: 6px;
    padding: 14px;
    margin-bottom: 10px;
}

.inline-form { display: inline; }

.resolve-form { margin-top: 10px; }

.admin-actions {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-top: 8px;
}

.btn-danger {
    background: #F44336;
    color: #fff;
    border: none;
    padding: 6px 14px;
    border-radius: 4px;
    font-family: 'PIXELED', monospace;
    font-size: 9px;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-danger:hover { background: #D32F2F; }

.btn-sm {
    padding: 4px 10px;
    font-size: 8px;
}

.resolve-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* --- SOON Badge --- */
.badge-soon {
    font-size: 7px;
    background: #FF8200;
    color: #1a1a2e;
    padding: 1px 4px;
    border-radius: 3px;
    margin-left: 4px;
    vertical-align: super;
}

/* --- Points column --- */
.col-points {
    text-align: center;
    font-size: 16px;
    color: #FFD700;
    font-weight: bold;
    min-width: 50px;
}

.ranking-header th {
    font-size: 9px;
    color: #555;
    padding: 4px 12px;
    text-align: center;
}

.ranking-header th:nth-child(3) { text-align: left; }

/* --- History 2nd/3rd --- */
.history-2nd {
    font-size: 8px;
    color: #C0C0C0;
}

.history-3rd {
    font-size: 8px;
    color: #CD7F32;
}

/* --- Scheduled match --- */
.match-scheduled {
    font-size: 8px;
    color: #FF8200;
    background: rgba(255, 130, 0, 0.15);
    padding: 2px 6px;
    border-radius: 3px;
}

.match-results-preview {
    display: flex;
    gap: 12px;
    margin: 8px 0;
    font-size: 10px;
}

.result-1st { color: #FFD700; }
.result-2nd { color: #C0C0C0; }
.result-3rd { color: #CD7F32; }

/* --- Rewards Page --- */
.rewards-container {
    max-width: 600px;
    margin: 0 auto;
}

.rewards-banner {
    text-align: center;
    margin-bottom: 24px;
}

.rewards-icon {
    display: inline-block;
    font-size: 18px;
    color: #FF8200;
    background: rgba(255, 130, 0, 0.15);
    padding: 12px 30px;
    border-radius: 8px;
    border: 2px solid #FF8200;
    letter-spacing: 3px;
}

.rewards-card {
    background: #2a2a4a;
    border-radius: 8px;
    padding: 24px;
    margin-bottom: 16px;
}

.rewards-test {
    border-left: 4px solid #FF8200;
}

.rewards-subtitle {
    font-size: 14px;
    color: #D4A574;
    margin-bottom: 12px;
    letter-spacing: 2px;
}

.rewards-text {
    font-size: 9px;
    color: #8a7a6a;
    line-height: 2;
    margin-bottom: 12px;
}

.rewards-highlight {
    color: #FFD700;
    font-size: 10px;
}

.rewards-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-top: 16px;
}

.reward-item {
    background: #1a1a2e;
    border: 2px solid #3a3a5a;
    border-radius: 8px;
    padding: 16px;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.reward-emoji {
    font-size: 14px;
    color: #D4A574;
}

.reward-label {
    font-size: 8px;
    color: #8a7a6a;
}

.rewards-steps {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.step {
    display: flex;
    align-items: center;
    gap: 12px;
}

.step-number {
    width: 32px;
    height: 32px;
    background: #D4A574;
    color: #1a1a2e;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    flex-shrink: 0;
}

.step-text {
    font-size: 9px;
    color: #8a7a6a;
    line-height: 1.8;
}

/* --- Season Selector --- */
.season-selector {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    justify-content: center;
    margin: 0 0 20px;
}

.season-tab {
    font-family: 'PIXELED', monospace;
    font-size: 8px;
    padding: 6px 10px;
    border: 1px solid #3a3a5a;
    background: #2a2a4a;
    color: #8a7a6a;
    cursor: pointer;
    transition: all 0.2s;
    letter-spacing: 1px;
    border-radius: 4px;
}

.season-tab:hover { border-color: #D4A574; color: #D4A574; }

.season-tab.active {
    background: #3a3a5a;
    color: #FFD700;
    border-color: #FFD700;
}

.season-info {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 10px;
    background: #2a2a4a;
    border-radius: 6px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.season-info-label {
    font-size: 10px;
    color: #D4A574;
    letter-spacing: 1px;
}

.season-info-kingdoms {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
}

.kingdom-avatar-xs {
    width: 22px;
    height: 22px;
    image-rendering: pixelated;
    border-radius: 3px;
}

.badge-active {
    font-size: 7px;
    background: #4CAF50;
    color: #1a1a2e;
    padding: 2px 6px;
    border-radius: 3px;
    letter-spacing: 1px;
}

.badge-ended {
    font-size: 7px;
    background: #555;
    color: #ccc;
    padding: 2px 6px;
    border-radius: 3px;
    letter-spacing: 1px;
}

.badge-none {
    font-size: 7px;
    background: #3a3a5a;
    color: #666;
    padding: 2px 6px;
    border-radius: 3px;
    letter-spacing: 1px;
}

.history-season {
    font-size: 8px;
    color: #D4A574;
    background: rgba(212, 165, 116, 0.15);
    padding: 2px 6px;
    border-radius: 3px;
}

/* --- Season Admin --- */
.season-overview {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 10px;
    margin-bottom: 20px;
}

.season-mode-card {
    background: #1a1a2e;
    border-radius: 6px;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.season-mode-header {
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: space-between;
}

.season-kingdoms-row {
    display: flex;
    gap: 3px;
    flex-wrap: wrap;
}

.season-create-panel {
    background: #1a1a2e;
    border-radius: 6px;
    padding: 16px;
    margin-top: 16px;
}

.subsection-title {
    font-size: 12px;
    color: #D4A574;
    margin-bottom: 12px;
    letter-spacing: 1px;
}

.rotation-info {
    padding: 8px 12px;
    background: rgba(76, 175, 80, 0.1);
    border: 1px solid #4CAF50;
    border-radius: 4px;
    margin-bottom: 12px;
}

.kingdom-appearances {
    font-size: 6px;
    color: #666;
    display: block;
    margin-top: 2px;
}

.season-history {
    margin-top: 16px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.season-history-item {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #1a1a2e;
    padding: 10px 14px;
    border-radius: 6px;
    border-left: 3px solid #3a3a5a;
    flex-wrap: wrap;
}

.season-history-item.season-active {
    border-left-color: #4CAF50;
}

.season-label {
    font-size: 10px;
    color: #D4A574;
}

.season-matches-count {
    font-size: 8px;
    color: #666;
    margin-left: auto;
}

.season-match-info {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: rgba(76, 175, 80, 0.1);
    border-radius: 4px;
    margin-bottom: 8px;
}

.btn-xs {
    font-size: 8px;
    padding: 4px 10px;
}

/* --- Kingdom Profile --- */
.kingdom-card {
    background: #2a2a4a;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 24px;
}

.kingdom-card-header {
    padding: 24px;
    border-bottom: 4px solid #D4A574;
    position: relative;
}

.kingdom-card-sprites {
    display: flex;
    justify-content: center;
    align-items: flex-end;
    gap: 24px;
    flex-wrap: wrap;
}

.kingdom-sprite-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.kingdom-card-avatar {
    width: 80px;
    height: 80px;
    image-rendering: pixelated;
    border-radius: 8px;
    border: 3px solid #D4A574;
    background: #1a1a2e;
    padding: 4px;
}

.kingdom-card-sprite {
    width: 64px;
    height: 64px;
    image-rendering: pixelated;
    background: #1a1a2e;
    border-radius: 6px;
    padding: 6px;
    border: 2px solid #3a3a5a;
}

.kingdom-card-banner {
    width: 140px;
    height: 60px;
    image-rendering: pixelated;
    background: #1a1a2e;
    border-radius: 6px;
    padding: 6px;
    border: 2px solid #3a3a5a;
    object-fit: contain;
}

.kingdom-sprite-banner {
    align-self: center;
}

.sprite-label {
    font-size: 7px;
    color: #666;
    letter-spacing: 1px;
}

.kingdom-card-color {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
}

.kingdom-quick-stats {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 4px;
    padding: 16px;
}

.kstat-box {
    background: #1a1a2e;
    border-radius: 6px;
    padding: 12px 16px;
    text-align: center;
    min-width: 90px;
    flex: 1;
}

.kstat-gold { border: 1px solid #FFD700; }

.kstat-value {
    display: block;
    font-size: 18px;
    color: #e0d6c8;
}

.kstat-gold .kstat-value { color: #FFD700; }

.kstat-label {
    display: block;
    font-size: 7px;
    color: #666;
    margin-top: 4px;
    letter-spacing: 1px;
}

.kingdom-section {
    background: #2a2a4a;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 24px;
}

.kingdom-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 8px;
}

.kdetail-box {
    background: #1a1a2e;
    border-radius: 6px;
    padding: 12px;
    text-align: center;
}

.kdetail-icon {
    display: block;
    font-size: 8px;
    color: #8a7a6a;
    margin-bottom: 6px;
    letter-spacing: 1px;
}

.kdetail-value {
    display: block;
    font-size: 16px;
    color: #e0d6c8;
}

.kdetail-highlight { color: #FFD700; }

/* --- Kingdom Tabs --- */
.kingdom-tabs {
    margin-bottom: 16px;
}
.kingdom-tab-content {
    animation: fadeInTab 0.3s ease;
}
@keyframes fadeInTab {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

/* --- Compare Scroll Wrapper --- */
.compare-scroll-wrapper {
    max-height: 340px;
    overflow-y: auto;
    border-radius: 8px;
    scrollbar-width: thin;
    scrollbar-color: #3a3a5a #0d0d1a;
}
.compare-scroll-wrapper::-webkit-scrollbar {
    width: 6px;
}
.compare-scroll-wrapper::-webkit-scrollbar-track {
    background: #0d0d1a;
    border-radius: 3px;
}
.compare-scroll-wrapper::-webkit-scrollbar-thumb {
    background: #3a3a5a;
    border-radius: 3px;
}
.compare-scroll-wrapper::-webkit-scrollbar-thumb:hover {
    background: #D4A574;
}

/* Fixed header grid (outside scroll) */
.compare-grid-header {
    border-radius: 8px 8px 0 0;
    overflow: hidden;
}
.compare-grid-header + .compare-scroll-wrapper {
    border-radius: 0 0 8px 8px;
}
.compare-grid-header + .compare-scroll-wrapper .compare-grid {
    border-radius: 0;
}

/* --- Average Rank Badge --- */
.avg-rank-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: linear-gradient(135deg, #1a1a2e 0%, #12122a 100%);
    border: 2px solid #D4A574;
    border-radius: 10px;
    padding: 16px 24px;
    margin-bottom: 20px;
    text-align: center;
}
.avg-rank-label {
    font-family: 'PIXELED', monospace;
    font-size: 8px;
    color: #8a7a6a;
    letter-spacing: 1px;
}
.avg-rank-value {
    font-family: 'PIXELED', monospace;
    font-size: 24px;
    color: #FFD700;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.3);
}
.avg-rank-suffix {
    font-family: 'PIXELED', monospace;
    font-size: 12px;
    color: #555;
}

/* --- Compare Selector --- */
.compare-selector {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}
.compare-kingdoms {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.compare-kingdom-btn {
    background: #1a1a2e;
    border: 1px solid #3a3a5a;
    border-radius: 6px;
    padding: 3px;
    cursor: pointer;
    transition: border-color 0.15s, transform 0.15s, background 0.15s;
}
.compare-kingdom-btn img {
    width: 32px;
    height: 32px;
    image-rendering: pixelated;
    display: block;
}
.compare-kingdom-btn:hover { border-color: #D4A574; transform: translateY(-2px); }
.compare-kingdom-btn.active { border-color: #D4A574; background: #2a2a4a; }
.compare-label {
    font-family: 'PIXELED', monospace;
    font-size: 8px;
    color: #8a7a6a;
    letter-spacing: 1px;
}
.compare-select {
    font-family: 'PIXELED', monospace;
    font-size: 8px;
    background: #1a1a2e;
    color: #e0d6c8;
    border: 1px solid #3a3a5a;
    border-radius: 4px;
    padding: 6px 24px 6px 8px;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%238a7a6a'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
    cursor: pointer;
    min-width: 140px;
}
.compare-select:focus {
    border-color: #D4A574;
    outline: none;
}

/* --- Compare Grid --- */
.compare-grid {
    display: flex;
    flex-direction: column;
    gap: 2px;
    background: #0d0d1a;
    border-radius: 8px;
    overflow: hidden;
}
.compare-row {
    display: flex;
    align-items: center;
}
.compare-header-row {
    background: #1a1a2e;
    border-bottom: 2px solid #D4A574;
}
.compare-cell {
    padding: 10px 12px;
    font-family: 'PIXELED', monospace;
    font-size: 9px;
}
.compare-stat-name {
    flex: 1;
    color: #8a7a6a;
    font-size: 7px;
    letter-spacing: 1px;
}
.compare-kingdom-col {
    width: 140px;
    text-align: center;
    color: #e0d6c8;
    font-size: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: color 0.3s;
}
.compare-avatar {
    width: 24px;
    height: 24px;
    image-rendering: pixelated;
    border-radius: 4px;
}
.compare-row:nth-child(even) {
    background: #12122a;
}
.compare-row:nth-child(odd) {
    background: #16162e;
}
.compare-header-row {
    background: #1a1a2e !important;
}
.compare-my-val, .compare-other-val {
    font-size: 12px;
    font-weight: bold;
    transition: color 0.3s;
}

/* --- Stat Rankings --- */
.stat-rankings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 12px;
}
.stat-ranking-card {
    background: #1a1a2e;
    border-radius: 8px;
    overflow: hidden;
}
.stat-ranking-title {
    font-family: 'PIXELED', monospace;
    font-size: 8px;
    color: #D4A574;
    padding: 10px 12px;
    background: #12122a;
    letter-spacing: 1px;
    text-align: center;
    border-bottom: 1px solid #2a2a4a;
}
.stat-ranking-list {
    padding: 4px 0;
}
.stat-ranking-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 12px;
    font-family: 'PIXELED', monospace;
    font-size: 7px;
    color: #8a7a6a;
    transition: background 0.2s;
}
.stat-ranking-item:hover {
    background: #22224a;
}
.stat-ranking-current {
    background: rgba(212, 165, 116, 0.1);
    color: #D4A574;
    border-left: 3px solid #D4A574;
}
.stat-ranking-pos {
    width: 24px;
    color: #555;
    font-size: 7px;
}
.stat-ranking-current .stat-ranking-pos {
    color: #D4A574;
}
.stat-ranking-item:nth-child(1) .stat-ranking-pos { color: #FFD700; }
.stat-ranking-item:nth-child(2) .stat-ranking-pos { color: #C0C0C0; }
.stat-ranking-item:nth-child(3) .stat-ranking-pos { color: #CD7F32; }
.stat-ranking-avatar {
    width: 20px;
    height: 20px;
    image-rendering: pixelated;
    border-radius: 3px;
}
.stat-ranking-name {
    flex: 1;
    font-size: 6px;
    letter-spacing: 0.5px;
}
.stat-ranking-val {
    font-size: 8px;
    color: #e0d6c8;
}

.hero-weapons-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.hero-weapon-item {
    background: #1a1a2e;
    border-radius: 6px;
    padding: 8px 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.hero-weapon-name {
    font-size: 9px;
    color: #D4A574;
}

.hero-weapon-count {
    font-size: 9px;
    color: #FFD700;
}

.col-mode-name {
    font-size: 10px;
    color: #D4A574;
    text-align: left;
    padding-left: 12px;
}

.col-kills {
    text-align: center;
    font-size: 12px;
    color: #F44336;
    min-width: 60px;
}

.top-viewers-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.top-viewer-item {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #1a1a2e;
    padding: 8px 14px;
    border-radius: 6px;
}

.tv-rank {
    font-size: 12px;
    color: #D4A574;
    min-width: 30px;
}

.tv-name {
    font-size: 10px;
    color: #e0d6c8;
    flex: 1;
}

.tv-kills {
    font-size: 10px;
    color: #F44336;
}

.top-viewer-item:nth-child(1) .tv-rank { color: #FFD700; }
.top-viewer-item:nth-child(2) .tv-rank { color: #C0C0C0; }
.top-viewer-item:nth-child(3) .tv-rank { color: #CD7F32; }

.history-win { border-left-color: #FFD700; }
.history-podium { border-left-color: #C0C0C0; }

.history-placement {
    font-size: 9px;
    padding: 2px 8px;
    border-radius: 3px;
    letter-spacing: 1px;
}

.placement-1st { background: #FFD700; color: #1a1a2e; }
.placement-2nd { background: #C0C0C0; color: #1a1a2e; }
.placement-3rd { background: #CD7F32; color: #1a1a2e; }
.placement-out { background: #3a3a5a; color: #666; }

.history-match-kills {
    font-size: 8px;
    color: #F44336;
}

.history-match-pts {
    font-size: 8px;
    color: #4CAF50;
}

.history-duration {
    font-size: 7px;
    color: #555;
}

.col-kingdom-link {
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: transform 0.2s;
}

.col-kingdom-link:hover {
    transform: translateX(4px);
}

.col-kingdom-link .kingdom-name:hover {
    color: #FFD700;
}

/* --- Subscribe creator cat --- */
.sub-header { position: relative; }
.sub-header { display: flex; align-items: center; justify-content: center; gap: 28px; flex-wrap: nowrap; }
.sub-header .title { margin: 0; white-space: nowrap; }
.creator-modal-inner .sub-message {
    background: none;
    border-left: none;
    padding: 30px;
    margin: 0;
}
.creator-cat {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}
.creator-cat-img {
    width: 56px;
    height: 56px;
    image-rendering: pixelated;
    animation: creatorBob 1.6s ease-in-out infinite;
}
@keyframes creatorBob {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-4px); }
}
.creator-cat-bubble {
    position: relative;
    background: #D4A574;
    color: #1a1a2e;
    font-family: 'Pixeled', monospace;
    font-size: 7px;
    padding: 8px 10px;
    border-radius: 6px;
    max-width: 160px;
    line-height: 1.6;
    letter-spacing: 1px;
}
.creator-cat-bubble::before {
    content: '';
    position: absolute;
    left: -6px;
    top: 50%;
    transform: translateY(-50%);
    border-top: 6px solid transparent;
    border-bottom: 6px solid transparent;
    border-right: 6px solid #D4A574;
}
.creator-cat:hover .creator-cat-bubble { background: #ffffff; }
.creator-cat:hover .creator-cat-bubble::before { border-right-color: #ffffff; }
.creator-modal-inner { max-width: 600px; }

@media (max-width: 768px) {
    .sub-header { flex-direction: column; gap: 14px; }
    .creator-cat-bubble { font-size: 6px; max-width: 140px; }
}

/* --- Footer --- */
.footer {
    text-align: center;
    margin-top: 40px;
    padding: 20px;
    color: #3a3a5a;
    font-size: 10px;
    letter-spacing: 2px;
}

.footer-social {
    margin-top: 12px;
    display: flex;
    flex-wrap: nowrap;
    justify-content: center;
    gap: 14px;
}
.footer-social-link {
    color: #D4A574;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: color 0.15s, transform 0.15s;
}
.footer-social-link:hover { color: #ffffff; transform: translateY(-2px); }
.footer-social-link svg { image-rendering: pixelated; }

.footer-links {
    margin-top: 10px;
    font-size: 7px;
    letter-spacing: 1px;
}

.footer-links a {
    color: #555;
    transition: color 0.2s;
}

.footer-links a:hover { color: #D4A574; }

.footer-sep { color: #2a2a4a; margin: 0 6px; }

/* --- Legal Pages --- */
.legal-page {
    max-width: 800px;
    margin: 0 auto;
}

.legal-section {
    background: #2a2a4a;
    border-radius: 8px;
    padding: 20px 24px;
    margin-bottom: 16px;
}

.legal-heading {
    font-size: 12px;
    color: #D4A574;
    margin-bottom: 12px;
    letter-spacing: 2px;
}

.legal-text {
    font-size: 8px;
    color: #c0b8a8;
    line-height: 2.4;
    margin-bottom: 10px;
}

.legal-text:last-child { margin-bottom: 0; }

.legal-text a { color: #D4A574; text-decoration: underline; }
.legal-text a:hover { color: #FFD700; }

.important-text {
    color: #FFD700;
    background: rgba(255, 215, 0, 0.08);
    padding: 10px 14px;
    border-radius: 6px;
    border-left: 3px solid #FFD700;
}

.legal-list {
    list-style: none;
    padding: 0;
    margin: 8px 0;
}

.legal-list li {
    font-size: 8px;
    color: #c0b8a8;
    line-height: 2.4;
    padding-left: 16px;
    position: relative;
}

.legal-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 6px;
    height: 6px;
    background: #D4A574;
    border-radius: 50%;
}

.legal-list li a { color: #D4A574; text-decoration: underline; }
.legal-list li a:hover { color: #FFD700; }

.legal-label {
    color: #D4A574;
    font-size: 8px;
}

/* Cookie table */
.cookie-table {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-top: 10px;
}

.cookie-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: #1a1a2e;
    border-radius: 6px;
    font-size: 7px;
    color: #c0b8a8;
    line-height: 1.8;
}

.cookie-header-row {
    background: #12122a;
    color: #D4A574;
    font-size: 8px;
}

.cookie-col-name { min-width: 100px; flex-shrink: 0; color: #e0d6c8; }
.cookie-col-type { min-width: 70px; flex-shrink: 0; }
.cookie-col-purpose { flex: 1; }
.cookie-col-duration { min-width: 90px; flex-shrink: 0; text-align: right; color: #8a7a6a; }

.cookie-badge {
    font-size: 6px;
    padding: 2px 6px;
    border-radius: 3px;
    letter-spacing: 1px;
}

.cookie-essential { background: #4CAF50; color: #fff; }

/* --- Cookie Consent Banner --- */
.cookie-banner {
    position: fixed;
    bottom: 20px;
    left: 20px;
    z-index: 9999;
    max-width: 420px;
    animation: cookieSlideIn 0.5s ease-out;
}

@keyframes cookieSlideIn {
    from { transform: translateY(100px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.cookie-banner-inner {
    display: flex;
    align-items: center;
    gap: 14px;
    background: #1a1a2e;
    border: 2px solid #3a3a5a;
    border-radius: 12px;
    padding: 16px 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6);
}

.cookie-banner-icon {
    flex-shrink: 0;
}

.cookie-banner-content {
    flex: 1;
    min-width: 0;
}

.cookie-banner-title {
    font-size: 10px;
    color: #FFD700;
    margin-bottom: 6px;
    letter-spacing: 2px;
}

.cookie-banner-text {
    font-size: 7px;
    color: #8a7a6a;
    line-height: 2;
}

.cookie-banner-link {
    margin-top: 4px;
}

.cookie-banner-link a {
    font-size: 6px;
    color: #D4A574;
    text-decoration: underline;
    letter-spacing: 1px;
}

.cookie-banner-link a:hover { color: #FFD700; }

.cookie-banner-actions {
    flex-shrink: 0;
}

.cookie-btn-accept {
    font-family: 'PIXELED', monospace;
    font-size: 8px;
    padding: 8px 16px;
    background: #D4A574;
    color: #1a1a2e;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    letter-spacing: 1px;
    white-space: nowrap;
}

.cookie-btn-accept:hover {
    background: #FFD700;
    transform: scale(1.05);
}

/* --- Subscription Badges (navbar + leaderboard) --- */
.nav-badge {
    font-size: 7px;
    padding: 2px 5px;
    border-radius: 3px;
    font-weight: bold;
    letter-spacing: 1px;
}

.nav-badge-scout, .lb-badge-scout, .sub-badge-scout {
    background: #4CAF50;
    color: #fff;
}

.nav-badge-commander, .lb-badge-commander, .sub-badge-commander {
    background: #2196F3;
    color: #fff;
}

.nav-badge-warlord, .lb-badge-warlord, .sub-badge-warlord {
    background: #FFD700;
    color: #1a1a2e;
}

.lb-badge {
    font-size: 6px;
    padding: 2px 4px;
    border-radius: 3px;
    margin-left: 4px;
    flex-shrink: 0;
}

/* Subscribe nav link */
.nav-subscribe {
    color: #FFD700 !important;
    font-size: 9px;
}

.nav-subscribe:hover { color: #fff !important; }

/* --- Leaderboard Tabs & Filters (profile) --- */
.lb-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 8px;
}

.lb-tab {
    flex: 1;
    text-align: center;
    padding: 8px 12px;
    font-size: 10px;
    font-family: 'PIXELED', monospace;
    color: #8a7a6a;
    background: #1a1a2e;
    border: 1px solid #3a3a5a;
    transition: all 0.2s;
    text-decoration: none;
}

.lb-tab:first-child { border-radius: 6px 0 0 6px; }
.lb-tab:last-child { border-radius: 0 6px 6px 0; }

.lb-tab-active {
    background: #D4A574;
    color: #1a1a2e;
    border-color: #D4A574;
}

.lb-tab:hover:not(.lb-tab-active) {
    color: #D4A574;
    border-color: #D4A574;
}
.lb-tab-active:hover,
.lb-tab-active:active,
.lb-tab-active:focus { color: #ffffff; }

.lb-filters {
    display: flex;
    justify-content: center;
    gap: 4px;
    margin-bottom: 8px;
}

.lb-filter {
    font-size: 7px;
    font-family: 'PIXELED', monospace;
    padding: 4px 8px;
    border-radius: 4px;
    color: #8a7a6a;
    background: #1a1a2e;
    border: 1px solid #3a3a5a;
    text-decoration: none;
    transition: all 0.2s;
}

.lb-filter:hover { border-color: #D4A574; color: #D4A574; }

.lb-filter-active {
    background: #2a2a4a;
    color: #D4A574;
    border-color: #D4A574;
}

.lb-filter-scout.lb-filter-active { border-color: #4CAF50; color: #4CAF50; }
.lb-filter-commander.lb-filter-active { border-color: #2196F3; color: #2196F3; }
.lb-filter-warlord.lb-filter-active { border-color: #FFD700; color: #FFD700; }

/* --- Subscribe Page --- */
.sub-header-text {
    font-size: 10px;
    color: #8a7a6a;
    text-align: center;
    margin-top: 8px;
}

.sub-message {
    max-width: 700px;
    margin: 0 auto 24px;
    padding: 20px 24px;
    background: #2a2a4a;
    border-radius: 10px;
    border-left: 4px solid #D4A574;
}

.sub-message-text {
    font-size: 9px;
    color: #e0d6c8;
    line-height: 2.2;
    margin-bottom: 10px;
}

.sub-message-text:last-child { margin-bottom: 0; }

.sub-message-highlight {
    color: #FFD700;
    font-size: 10px;
    margin-top: 12px;
}

.sub-current {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 24px;
    padding: 12px;
    background: #2a2a4a;
    border-radius: 8px;
}

.sub-current-badge {
    font-size: 10px;
    padding: 4px 10px;
    border-radius: 4px;
}

.sub-current-text {
    font-size: 9px;
    color: #8a7a6a;
}

.btn-cancel-sub {
    font-family: 'PIXELED', monospace;
    font-size: 8px;
    padding: 4px 10px;
    background: transparent;
    border: 1px solid #F44336;
    color: #F44336;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-cancel-sub:hover {
    background: #F44336;
    color: #fff;
}

.btn-resume-sub {
    font-family: 'PIXELED', monospace;
    font-size: 8px;
    padding: 6px 14px;
    background: #4CAF50;
    border: 1px solid #4CAF50;
    color: #fff;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-resume-sub:hover {
    background: #388E3C;
    border-color: #388E3C;
}

.sub-cancelling {
    color: #FF9800;
}

.sub-tiers {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: nowrap;
    margin-top: 20px;
    align-items: flex-start;
}

.sub-card {
    background: #2a2a4a;
    border-radius: 12px;
    flex: 1;
    min-width: 0;
    max-width: 320px;
    overflow: hidden;
    border: 2px solid #3a3a5a;
    transition: transform 0.2s, border-color 0.2s;
    position: relative;
}

.sub-card:hover {
    transform: translateY(-4px);
}

.sub-card-featured {
    border-color: #2196F3;
    transform: scale(1.05);
}

.sub-card-featured:hover {
    transform: scale(1.05) translateY(-4px);
}

.sub-card-active {
    border-color: #FFD700 !important;
}

.sub-card-popular {
    background: #2196F3;
    color: #fff;
    text-align: center;
    font-size: 8px;
    padding: 4px;
    font-family: 'PIXELED', monospace;
    letter-spacing: 1px;
}

.sub-card-header {
    padding: 20px;
    text-align: center;
}

.sub-card-scout { background: linear-gradient(135deg, #1a3a1a, #2a2a4a); }
.sub-card-commander { background: linear-gradient(135deg, #1a2a3a, #2a2a4a); }
.sub-card-warlord { background: linear-gradient(135deg, #3a3a1a, #2a2a4a); }

.sub-badge {
    display: inline-block;
    font-size: 14px;
    padding: 6px 16px;
    border-radius: 6px;
    margin-bottom: 10px;
    font-family: 'PIXELED', monospace;
    letter-spacing: 2px;
}

.sub-price {
    display: block;
    font-size: 20px;
    color: #fff;
    font-family: 'PIXELED', monospace;
}

.sub-price-currency {
    font-size: 10px;
    color: #8a7a6a;
}

.sub-card-body {
    padding: 20px;
}

.sub-perks {
    list-style: none;
    margin-bottom: 20px;
}

.sub-perks li {
    font-size: 8px;
    color: #e0d6c8;
    padding: 6px 0;
    border-bottom: 1px solid #3a3a5a;
}

.sub-perks li:last-child { border-bottom: none; }

.sub-perk-icon {
    color: #D4A574;
    margin-right: 6px;
    font-weight: bold;
}

.btn-subscribe {
    display: block;
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 8px;
    font-family: 'PIXELED', monospace;
    font-size: 10px;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
}

.btn-sub-scout {
    background: #4CAF50;
    color: #fff;
}

.btn-sub-scout:hover { background: #66BB6A; }

.btn-sub-commander {
    background: #2196F3;
    color: #fff;
}

.btn-sub-commander:hover { background: #42A5F5; }

.btn-sub-warlord {
    background: #FFD700;
    color: #1a1a2e;
}

.btn-sub-warlord:hover { background: #FFEB3B; }

.sub-active-label {
    text-align: center;
    font-size: 10px;
    color: #FFD700;
    padding: 12px;
    border: 2px solid #FFD700;
    border-radius: 8px;
}

/* ============================================================
   DONATION SECTION (one-time payment, inside creator modal)
   Flat design — inherits modal's #1a1a2e background,
   no gradient, no border, no shadow.
   ============================================================ */

.donation-modal-section {
    position: relative;
    padding: 20px 24px 28px 24px;
    background: none;
    border: none;
    box-shadow: none;
    overflow: hidden;
}

/* Dashed separator between creator message and donation form */
.donation-divider {
    height: 0;
    border: 0;
    border-top: 1px dashed rgba(212, 165, 116, 0.35);
    margin: 0 0 20px 0;
}

/* Allow the creator modal body to scroll when content is tall */
.creator-modal-inner {
    max-height: 94vh;
}
.creator-modal-body {
    overflow-y: auto;
    overflow-x: hidden;
    max-height: calc(94vh - 60px);
    padding: 0;
    scrollbar-width: thin;
    scrollbar-color: #D4A574 #12122a;
}
.creator-modal-body::-webkit-scrollbar { width: 8px; }
.creator-modal-body::-webkit-scrollbar-track { background: #12122a; }
.creator-modal-body::-webkit-scrollbar-thumb {
    background: #D4A574;
    border-radius: 4px;
}

/* Scattered cat heads (decorative, non-interactive) — sized for 600px modal */
.donation-heads {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
}
.donation-head {
    position: absolute;
    object-fit: contain;
    image-rendering: pixelated;
    opacity: 0.45;
    filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.5));
}
.donation-head-1 {
    top: 8px;
    left: 6px;
    width: 64px;
    height: 64px;
    transform: rotate(-14deg);
}
.donation-head-2 {
    top: 18px;
    right: 10px;
    width: 78px;
    height: 78px;
    transform: rotate(18deg);
}
.donation-head-3 {
    bottom: -6px;
    right: 42%;
    width: 54px;
    height: 54px;
    transform: rotate(-8deg);
    opacity: 0.4;
}

.donation-title {
    position: relative;
    z-index: 1;
    text-align: center;
    font-family: 'PIXELED', monospace;
    font-size: 15px;
    color: #D4A574;
    margin: 0 0 16px 0;
    text-shadow: 2px 2px 0 rgba(0, 0, 0, 0.6);
    letter-spacing: 1px;
}

.donation-message {
    position: relative;
    z-index: 1;
    margin: 0 0 24px 0;
}
.donation-text {
    font-family: 'PIXELED', monospace;
    font-size: 9px;
    line-height: 2;
    color: #e8e0d0;
    margin: 0 0 12px 0;
    text-align: center;
}
.donation-text:last-child { margin-bottom: 0; }

.donation-bonus-note {
    margin-top: 8px;
    color: #FFD700;
}
.donation-bonus-highlight {
    color: #FF8200;
    font-weight: bold;
}

/* Form */
.donation-form {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}
.donation-label {
    font-family: 'PIXELED', monospace;
    font-size: 9px;
    color: #D4A574;
    letter-spacing: 1px;
}
.donation-input-row {
    display: flex;
    align-items: stretch;
    gap: 0;
    width: 220px;
    border: 2px solid #D4A574;
    border-radius: 8px;
    overflow: hidden;
    background: #1a1a2e;
}
.donation-input {
    flex: 1;
    min-width: 0;
    padding: 14px 12px;
    border: none;
    background: transparent;
    color: #fff;
    font-family: 'PIXELED', monospace;
    font-size: 16px;
    text-align: center;
    outline: none;
    -moz-appearance: textfield;
}
.donation-input::-webkit-outer-spin-button,
.donation-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
.donation-input:focus { background: rgba(212, 165, 116, 0.08); }
.donation-currency {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 14px;
    background: rgba(212, 165, 116, 0.2);
    color: #D4A574;
    font-family: 'PIXELED', monospace;
    font-size: 11px;
}

.donation-coins-preview {
    font-family: 'PIXELED', monospace;
    font-size: 9px;
    color: #FFD700;
    padding: 6px 12px;
    background: rgba(255, 215, 0, 0.08);
    border: 1px dashed rgba(255, 215, 0, 0.35);
    border-radius: 6px;
    letter-spacing: 1px;
}
.donation-coins-preview #donation-coins-count {
    color: #FF8200;
    font-size: 11px;
    margin: 0 4px;
}

.btn-donate {
    margin-top: 6px;
    padding: 14px 36px;
    border: none;
    border-radius: 8px;
    font-family: 'PIXELED', monospace;
    font-size: 11px;
    background: linear-gradient(135deg, #FF8200 0%, #E55A00 100%);
    color: #fff;
    cursor: pointer;
    letter-spacing: 1px;
    transition: all 0.2s;
    box-shadow: 0 4px 0 rgba(0, 0, 0, 0.3);
}
.btn-donate:hover {
    background: linear-gradient(135deg, #FF9F3A 0%, #FF7500 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 0 rgba(0, 0, 0, 0.35);
}
.btn-donate:active {
    transform: translateY(1px);
    box-shadow: 0 2px 0 rgba(0, 0, 0, 0.3);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

/* --- Tablet (max 900px) --- */
@media (max-width: 900px) {
    .container { padding: 16px 12px; }
    .title { font-size: 22px; letter-spacing: 2px; }
    .sub-tiers { flex-wrap: wrap; }
    .sub-card { max-width: 100%; flex: 1 1 260px; }
    .sub-card-featured { transform: none; }
    .sub-card-featured:hover { transform: translateY(-4px); }
    .kingdom-card-sprites { gap: 16px; }
    .kingdom-card-avatar { width: 64px; height: 64px; }
    .kingdom-card-sprite { width: 48px; height: 48px; }
    .kingdom-card-banner { width: 112px; height: 48px; }
}

/* --- Mobile (max 768px) --- */
@media (max-width: 768px) {
    /* Navbar */
    .navbar {
        flex-wrap: wrap;
        padding: 10px 14px;
        gap: 0;
    }

    .nav-brand { font-size: 13px; }

    .jukebox {
        order: 3;
        width: 100%;
        justify-content: center;
        margin-top: 8px;
        padding: 6px 10px;
    }

    .jukebox-vol { display: none; }

    .nav-hamburger {
        display: flex;
        order: 2;
        margin-left: auto;
    }

    .nav-links {
        display: none;
        width: 100%;
        flex-direction: column;
        gap: 0;
        order: 4;
        background: #12122a;
        border-top: 1px solid #2a2a4a;
        margin-top: 8px;
        padding-top: 4px;
    }

    .nav-links.nav-open {
        display: flex;
    }

    .nav-link {
        display: block;
        padding: 10px 12px;
        font-size: 10px;
        border-bottom: 1px solid #1a1a2e;
    }

    .nav-profile {
        padding: 10px 12px;
    }

    /* Container — full width on mobile */
    .container { max-width: 100%; padding: 14px 10px; }

    /* Title & Header */
    .title { font-size: 16px; letter-spacing: 2px; }
    .subtitle { font-size: 9px; }
    .header { padding: 14px 0; }

    /* Tabs — horizontal scroll, left-aligned */
    .tabs {
        display: flex;
        flex-wrap: nowrap;
        gap: 0;
        justify-content: flex-start;
        margin: 12px 0;
        padding: 0;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }
    .tabs::-webkit-scrollbar { display: none; }
    .tab {
        font-size: 7px;
        padding: 8px 10px;
        letter-spacing: 0;
        white-space: nowrap;
        flex-shrink: 0;
        border-radius: 0;
    }
    .tab:first-child { border-radius: 6px 0 0 6px; }
    .tab:last-child { border-radius: 0 6px 6px 0; }

    /* Season selector — scroll, left-aligned */
    .season-selector {
        flex-wrap: nowrap;
        justify-content: flex-start;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        gap: 4px;
        margin: 0 0 16px;
        padding: 0;
    }
    .season-selector::-webkit-scrollbar { display: none; }
    .season-tab { font-size: 7px; padding: 5px 10px; white-space: nowrap; flex-shrink: 0; }
    .season-info { padding: 8px; gap: 6px; }
    .season-info-label { font-size: 8px; }

    /* Podium */
    .podium { gap: 8px; padding: 10px 0; }
    .podium-avatar { width: 48px; height: 48px; border-width: 2px; }
    .podium-item:nth-child(2) .podium-avatar { width: 60px; height: 60px; }
    .podium-name { font-size: 7px; }
    .podium-wins { font-size: 7px; max-width: 100px; text-align: center; }
    .podium-rank { font-size: 16px; }
    .podium-item:nth-child(1) .podium-pedestal { height: 36px; }
    .podium-item:nth-child(2) .podium-pedestal { height: 50px; }
    .podium-item:nth-child(3) .podium-pedestal { height: 24px; }

    /* Ranking table — full width, hide winbar column entirely */
    .ranking-table { width: 100%; table-layout: fixed; }
    .col-winrate { display: none; }
    .ranking-row td:last-child,
    .ranking-header th:last-child { display: none; }  /* hide winbar td/th */
    .col-rank { width: 28px; font-size: 11px; padding-left: 4px; padding-right: 2px; }
    .col-trend { width: 26px; }
    .col-kingdom { gap: 6px; }
    .kingdom-avatar { width: 26px; height: 26px; }
    .kingdom-name { font-size: 9px; }
    .col-wins { font-size: 11px; min-width: 0; }
    .col-points { font-size: 11px; min-width: 0; }
    .col-played { font-size: 9px; min-width: 0; }
    .ranking-row td { padding: 7px 4px; }
    .ranking-header th { font-size: 7px; padding: 4px; }

    /* History */
    .history-section { margin-top: 28px; }
    .history-2nd, .history-3rd { display: none; }
    .history-participants-avatars { gap: 2px; }
    .history-p-avatar { width: 16px; height: 16px; }
    .history-p-winner { border-width: 1px; }
    .history-item {
        gap: 6px;
        padding: 8px 10px;
        flex-wrap: wrap;
    }
    .history-date { font-size: 7px; min-width: auto; }
    .history-mode { font-size: 7px; min-width: auto; }
    .history-winner { gap: 6px; }
    .history-winner-name { font-size: 9px; }
    .history-winner img { width: 20px; height: 20px; }
    .history-season { font-size: 7px; }
    .history-survival { font-size: 7px; }

    /* Profile — full width */
    .profile-main-title { max-width: 100%; }
    .profile-layout { max-width: 100%; gap: 16px; }
    .profile-left { width: 100%; }
    .profile-card { padding: 16px; }
    .profile-section { padding: 14px; }
    .profile-stats { flex-wrap: wrap; gap: 8px; }
    .stat-box { min-width: calc(50% - 4px); flex: 1 1 calc(50% - 4px); }
    .profile-name { font-size: 14px; }
    .profile-avatar { width: 48px; height: 48px; }
    .profile-avatar-placeholder { width: 48px; height: 48px; font-size: 20px; }
    .kingdom-grid { grid-template-columns: repeat(auto-fill, minmax(60px, 1fr)); gap: 6px; }
    .suggestion-name { font-size: 6px; min-width: 55px; }
    .suggestion-avatar { width: 22px; height: 22px; }
    .suggestion-stats { gap: 5px; }
    .suggestion-stat { font-size: 5px; }
    .kingdom-option img, .kingdom-check img { width: 32px; height: 32px; }
    .kingdom-option, .kingdom-check { padding: 6px; font-size: 6px; }

    /* Kill leaderboard in profile — full width */
    .kill-leaderboard { padding: 12px; }
    .kill-lb-row { padding: 5px 6px; gap: 6px; }
    .kill-lb-rank { min-width: 24px; font-size: 8px; }
    .kill-lb-avatar { width: 24px; height: 24px; }
    .kill-lb-avatar img { width: 24px; height: 24px; }
    .kill-lb-no-avatar { width: 24px; height: 24px; font-size: 10px; }
    .kill-lb-name { font-size: 7px; }
    .kill-lb-kills { font-size: 8px; min-width: 30px; }
    .lb-tab { font-size: 8px; padding: 6px 8px; }
    .lb-filter { font-size: 6px; padding: 3px 6px; }
    .lb-badge { font-size: 5px; padding: 1px 3px; }

    /* Bet history in profile */
    .bet-history { gap: 6px; }
    .bet-history-card { padding: 10px 12px; }
    .bet-history-mid { gap: 8px; }
    .bet-history-avatar { width: 32px; height: 32px; }

    /* Daily bonus */
    .daily-bonus-info { padding: 6px 10px; }
    .bonus-claimed { font-size: 8px; }
    .bonus-next { font-size: 7px; }
    .bonus-available { font-size: 9px; }

    /* Forms */
    .form-row { flex-direction: column; }
    .auth-container { margin: 20px auto; max-width: 100%; }
    .auth-title { font-size: 18px; }

    /* Bets page */
    .match-card-bet { padding: 16px; }
    .match-kingdoms-heads { gap: 6px; }
    .kingdom-head { width: 40px; height: 40px; }
    .kingdom-head img { width: 34px; height: 34px; }
    .bet-pick-option { width: 38px; height: 38px; }
    .bet-pick-option img { width: 32px; height: 32px; }
    .bet-wager-row { flex-wrap: wrap; justify-content: center; gap: 8px; }
    .bets-tabs { flex-direction: row; }
    .bets-tab { font-size: 9px; padding: 10px 8px; }

    /* Subscribe */
    .sub-message { padding: 14px 16px; }
    .sub-message-text { font-size: 8px; line-height: 2; }
    .sub-current { flex-wrap: wrap; gap: 8px; padding: 10px; }
    .sub-card-body { padding: 14px; }
    .sub-perks li { font-size: 7px; }
    .sub-price { font-size: 16px; }

    /* Donation section (mobile, inside creator modal) */
    .donation-modal-section { padding: 16px 14px 18px 14px; }
    .donation-title { font-size: 12px; }
    .donation-text { font-size: 8px; line-height: 1.9; }
    .donation-head-1 { width: 50px; height: 50px; top: 4px; left: 2px; }
    .donation-head-2 { width: 60px; height: 60px; top: 8px; right: 4px; }
    .donation-head-3 { width: 42px; height: 42px; bottom: -4px; right: 42%; }
    .donation-input-row { width: 180px; }
    .donation-input { font-size: 14px; padding: 12px 10px; }
    .donation-currency { font-size: 9px; padding: 0 10px; }
    .btn-donate { font-size: 9px; padding: 12px 24px; }
    .donation-coins-preview { font-size: 8px; }

    /* Match result cards */
    .match-podium { gap: 10px; min-height: 90px; }
    .podium-slot { gap: 4px; }
    .match-result-header { gap: 8px; flex-wrap: wrap; }
    .match-duration { margin-left: 0; }
    .match-participants-row { gap: 3px; margin: 8px 0; padding: 6px 0; }
    .match-p-avatar { width: 20px; height: 20px; border-width: 1px; }

    /* Admin */
    .admin-section { padding: 14px; }
    .users-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
    .users-table { font-size: 7px; min-width: 500px; }
    .users-table th { font-size: 7px; padding: 6px 4px; }
    .users-table td { padding: 6px 4px; }
    .coins-input { width: 50px; font-size: 7px; }

    /* Kingdom profile */
    .kingdom-card-header { padding: 16px; }
    .kingdom-card-sprites { flex-wrap: wrap; justify-content: center; }
    .kingdom-card-avatar { width: 56px; height: 56px; }
    .kingdom-card-sprite { width: 40px; height: 40px; padding: 4px; }
    .kingdom-card-banner { width: 94px; height: 40px; padding: 4px; }
    .sprite-label { font-size: 6px; }
    .kstat-box { min-width: 70px; padding: 8px 10px; }
    .kstat-value { font-size: 14px; }
    .kingdom-stats-grid { grid-template-columns: repeat(3, 1fr); gap: 6px; }
    .kdetail-box { padding: 8px; }
    .kdetail-icon { font-size: 6px; }
    .kdetail-value { font-size: 13px; }

    /* Compare */
    .compare-selector { flex-wrap: wrap; }
    .compare-scroll-wrapper { max-height: 280px; }
    .compare-kingdom-col { width: 100px; font-size: 9px; }
    .compare-cell { padding: 8px 8px; font-size: 7px; }
    .compare-avatar { width: 18px; height: 18px; }
    .compare-my-val, .compare-other-val { font-size: 10px; }
    .compare-kingdom-col span { display: none; }

    /* Average rank badge */
    .avg-rank-badge { flex-wrap: wrap; padding: 12px 16px; gap: 6px; }
    .avg-rank-label { font-size: 7px; width: 100%; }
    .avg-rank-value { font-size: 20px; }

    /* Stat rankings */
    .stat-rankings-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
    .stat-ranking-item { padding: 4px 8px; }
    .stat-ranking-name { font-size: 5px; }
    .stat-ranking-avatar { width: 16px; height: 16px; }

    /* Flash */
    .flash { font-size: 8px; padding: 8px 12px; }

    /* Legal pages */
    .legal-section { padding: 14px 16px; }
    .legal-heading { font-size: 10px; }
    .legal-text { font-size: 7px; line-height: 2.2; }
    .legal-list li { font-size: 7px; }

    /* Cookie table — stack on mobile */
    .cookie-row { flex-wrap: wrap; gap: 4px; padding: 8px 10px; }
    .cookie-col-name { min-width: 80px; }
    .cookie-col-duration { min-width: auto; text-align: left; }

    /* Cookie banner — full width bottom center */
    .cookie-banner {
        bottom: 10px;
        left: 10px;
        right: 10px;
        max-width: none;
    }
    .cookie-banner-inner {
        padding: 12px 14px;
        gap: 10px;
    }
    .cookie-banner-icon img { width: 36px !important; height: 36px !important; }
    .cookie-banner-title { font-size: 9px; }
    .cookie-banner-text { font-size: 6px; }
    .cookie-btn-accept { font-size: 7px; padding: 6px 12px; }

    /* Footer */
    .footer-links { font-size: 6px; }
    .footer-sep { margin: 0 4px; }
}

/* --- Small mobile (max 480px) --- */
@media (max-width: 480px) {
    .container { padding: 10px 6px; }
    .title { font-size: 13px; }
    .nav-brand { font-size: 11px; letter-spacing: 1px; }
    .header { padding: 10px 0; }

    .jukebox-select { max-width: 90px; font-size: 6px; min-width: 80px; }

    /* Tabs — even more compact */
    .tab { font-size: 6px; padding: 6px 8px; }

    /* Podium */
    .podium { gap: 4px; padding: 8px 0; }
    .podium-avatar { width: 36px; height: 36px; }
    .podium-item:nth-child(2) .podium-avatar { width: 46px; height: 46px; }
    .podium-name { font-size: 6px; }
    .podium-wins { font-size: 6px; max-width: 80px; }
    .podium-rank { font-size: 13px; }
    .podium-item:nth-child(1) .podium-pedestal { height: 28px; }
    .podium-item:nth-child(2) .podium-pedestal { height: 40px; }
    .podium-item:nth-child(3) .podium-pedestal { height: 18px; }

    /* Ranking table — tighter, hide trend + played columns */
    .col-trend, .ranking-header th:nth-child(2) { display: none; }
    .col-played, .ranking-header th:nth-child(6) { display: none; }
    .col-rank { width: 22px; font-size: 9px; }
    .kingdom-avatar { width: 22px; height: 22px; }
    .col-kingdom { gap: 4px; }
    .kingdom-name { font-size: 7px; }
    .col-wins { font-size: 9px; min-width: 0; }
    .col-points { font-size: 9px; min-width: 0; }
    .ranking-row td { padding: 6px 3px; }
    .ranking-header th { font-size: 6px; padding: 3px; }

    /* History — ultra compact */
    .history-date { display: none; }
    .history-mode { font-size: 6px; min-width: auto; }
    .history-item { padding: 6px 8px; border-left-width: 3px; gap: 4px; }
    .history-winner img { width: 18px; height: 18px; }
    .history-winner-name { font-size: 8px; }
    .section-title { font-size: 12px; }
    .history-participants-avatars { display: none; }

    /* Profile */
    .profile-header { gap: 10px; }
    .profile-name { font-size: 11px; }
    .profile-email { font-size: 7px; }
    .stat-box { min-width: calc(50% - 4px); }
    .stat-value { font-size: 13px; }
    .stat-label { font-size: 6px; }
    .profile-card { padding: 12px; }
    .profile-section { padding: 12px; }
    .kingdom-grid { grid-template-columns: repeat(auto-fill, minmax(55px, 1fr)); }
    .suggestion-row { padding: 6px 8px; gap: 6px; }
    .suggestion-rank { font-size: 7px; width: 18px; }
    .suggestion-avatar { width: 20px; height: 20px; }
    .suggestion-name { font-size: 5px; min-width: 45px; }
    .suggestion-stat { font-size: 5px; }
    .kingdom-option img, .kingdom-check img { width: 28px; height: 28px; }
    .btn { font-size: 9px; padding: 8px 14px; }

    /* Bet history */
    .bet-history-card { padding: 8px 10px; }
    .bet-history-avatar { width: 28px; height: 28px; }
    .bet-history-coins { font-size: 9px; }
    .bet-history-id { font-size: 7px; }
    .bet-history-mode { font-size: 8px; }
    .bet-history-tag { font-size: 7px; padding: 2px 8px; }

    /* Subscribe */
    .sub-tiers { gap: 12px; }
    .sub-card { flex: 1 1 100%; }
    .sub-price { font-size: 14px; }
    .sub-perks li { font-size: 7px; line-height: 2.2; }
    .btn-subscribe { font-size: 8px; padding: 8px 14px; }

    /* Bets */
    .match-card-bet { padding: 12px; }
    .match-mode-name { font-size: 11px; }
    .match-mode-desc { font-size: 7px; }
    .kingdom-head { width: 34px; height: 34px; }
    .kingdom-head img { width: 28px; height: 28px; }
    .bet-pick-option { width: 34px; height: 34px; }
    .bet-pick-option img { width: 28px; height: 28px; }
    .bet-wager-input { width: 60px; font-size: 9px; }
    .btn-bet { font-size: 8px; padding: 6px 14px; }

    /* Admin */
    .admin-nav { flex-wrap: wrap; }
    .users-table th, .users-table td { padding: 4px 3px; }

    /* Kingdom profile - small mobile */
    .kingdom-card-sprites { gap: 10px; }
    .kingdom-card-avatar { width: 44px; height: 44px; }
    .kingdom-card-sprite { width: 32px; height: 32px; padding: 3px; }
    .kingdom-card-banner { width: 75px; height: 32px; padding: 3px; }
    .kingdom-quick-stats { gap: 3px; padding: 10px; }
    .kstat-box { min-width: 60px; padding: 6px 8px; }
    .kstat-value { font-size: 12px; }
    .kstat-label { font-size: 5px; }
    .kingdom-stats-grid { grid-template-columns: repeat(3, 1fr); gap: 4px; }
    .kdetail-value { font-size: 11px; }
    .kdetail-icon { font-size: 5px; }

    /* Compare - small mobile */
    .compare-selector { gap: 6px; }
    .compare-label { font-size: 6px; }
    .compare-select { font-size: 7px; min-width: 110px; }
    .compare-scroll-wrapper { max-height: 240px; }
    .compare-kingdom-col { width: 70px; }
    .compare-cell { padding: 6px 5px; }
    .compare-stat-name { font-size: 6px; }
    .compare-my-val, .compare-other-val { font-size: 9px; }
    .compare-avatar { width: 16px; height: 16px; }

    /* Average rank badge */
    .avg-rank-badge { padding: 10px 12px; }
    .avg-rank-label { font-size: 6px; }
    .avg-rank-value { font-size: 18px; }
    .avg-rank-suffix { font-size: 10px; }

    /* Stat rankings - single column small */
    .stat-rankings-grid { grid-template-columns: 1fr; }
    .stat-ranking-title { font-size: 7px; }
    .stat-ranking-item { font-size: 6px; }
    .stat-ranking-val { font-size: 7px; }

    .footer { font-size: 8px; padding: 14px; }
    .footer-links { font-size: 5px; }

    /* Cookie banner — compact on small screen */
    .cookie-banner {
        bottom: 6px;
        left: 6px;
        right: 6px;
    }
    .cookie-banner-inner {
        flex-wrap: wrap;
        justify-content: center;
        text-align: center;
        padding: 10px 12px;
        gap: 8px;
    }
    .cookie-banner-icon { display: none; }
    .cookie-banner-title { font-size: 8px; }
    .cookie-banner-text { font-size: 6px; line-height: 1.8; }
    .cookie-btn-accept { width: 100%; padding: 8px; font-size: 8px; }

    /* Legal */
    .legal-section { padding: 12px; }
    .legal-heading { font-size: 9px; letter-spacing: 1px; }
    .cookie-col-purpose { min-width: 100%; }
}

/* Favorite kingdom bonus info + history */
.favorite-kingdom-info {
    margin-top: 12px;
    padding: 10px 12px;
    background: #12122a;
    border: 1px solid #2a2a4a;
    color: #8a7a6a;
    font-size: 7px;
    line-height: 1.8;
    letter-spacing: 0.5px;
}
.fk-history {
    margin-top: 18px;
    background: #12122a;
    border: 1px solid #2a2a4a;
    padding: 14px;
}
.fk-history-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
    max-height: 240px;
    overflow-y: auto;
}
.fk-history-row {
    display: grid;
    grid-template-columns: 40px 1fr auto;
    gap: 10px;
    align-items: center;
    padding: 6px 8px;
    background: #1a1a2e;
    border-left: 3px solid #2a2a4a;
    font-size: 8px;
    letter-spacing: 0.5px;
}
.fk-place-1 { border-left-color: #FFD700; }
.fk-place-1 .fk-history-rank { color: #FFD700; }
.fk-place-2 { border-left-color: #C0C0C0; }
.fk-place-2 .fk-history-rank { color: #C0C0C0; }
.fk-place-3 { border-left-color: #CD7F32; }
.fk-place-3 .fk-history-rank { color: #CD7F32; }
.fk-place-out { border-left-color: #3a3a5a; opacity: 0.75; }
.fk-place-out .fk-history-rank { color: #6a6a8a; font-size: 7px; }
.fk-history-nopodium {
    color: #6a6a8a;
    font-size: 6px;
    letter-spacing: 0.5px;
    margin-left: 4px;
}
.fk-history-mode { color: #e0d6c8; }
.fk-history-date { color: #8a7a6a; font-size: 7px; }

/* ============================================================ */
/* EQUIPMENT SYSTEM                                             */
/* ============================================================ */
.profile-header { position: relative; }

.btn-equipment {
    margin-left: auto;
    align-self: center;
    background: #D4A574;
    color: #1a1a2e;
    border: 1px solid #D4A574;
    border-radius: 6px;
    padding: 10px 18px;
    font-family: 'PIXELED', monospace;
    font-size: 10px;
    letter-spacing: 1px;
    cursor: pointer;
    transition: color 0.2s, transform 0.1s;
}
.btn-equipment:hover,
.btn-equipment:active,
.btn-equipment:focus { color: #ffffff; }
.btn-equipment:active { transform: translateY(1px); }

/* Modal shell */
.eq-modal {
    display: none;
    position: fixed; inset: 0; z-index: 9999;
    background: rgba(0,0,0,0.85);
    align-items: center; justify-content: center;
    padding: 20px;
    font-family: 'PIXELED', monospace;
}
.eq-modal-inner {
    background: #1a1a2e;
    border: 2px solid #2a2a4a;
    width: min(1100px, 98vw);
    height: auto;
    max-height: 94vh;
    overflow: hidden;
    color: #e0d6c8;
    box-shadow: 0 0 40px rgba(0,0,0,0.8);
    display: flex;
    flex-direction: column;
}
.eq-modal-header {
    display: flex; justify-content: space-between; align-items: center;
    padding: 16px 22px;
    background: #12122a;
    border-bottom: 2px solid #2a2a4a;
    color: #D4A574;
    font-size: 14px;
    letter-spacing: 2px;
}
.eq-close {
    background: none; border: none;
    color: #8a7a6a; font-size: 24px; cursor: pointer;
    line-height: 1;
}
.eq-close:hover { color: #D4A574; }

/* Top tabs */
.eq-top-tabs {
    display: flex;
    gap: 8px;
    padding: 14px 22px;
    background: #12122a;
    border-bottom: 1px solid #2a2a4a;
    align-items: center;
}
.eq-top-tab {
    background: #1a1a2e;
    border: 1px solid #2a2a4a;
    color: #8a7a6a;
    padding: 8px 16px;
    font-family: 'PIXELED', monospace;
    font-size: 9px;
    letter-spacing: 1px;
    cursor: pointer;
}
.eq-top-tab:hover { color: #D4A574; border-color: #D4A574; }
.eq-top-tab-active {
    background: #D4A574;
    color: #1a1a2e;
    border-color: #D4A574;
}
.eq-coins-display {
    margin-left: auto;
    color: #FFD700;
    font-size: 10px;
    letter-spacing: 1px;
}

/* Panels */
.eq-panel { display: none; padding: 18px 22px; overflow: hidden; }
.eq-panel-active { display: block; }

/* Sub-tabs (WEAPON / BADGE) */
.eq-sub-tabs {
    display: flex;
    gap: 6px;
    margin: 14px 0 8px 0;
    border-bottom: 1px solid #2a2a4a;
}
.eq-sub-tab {
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    color: #8a7a6a;
    padding: 8px 16px;
    font-family: 'PIXELED', monospace;
    font-size: 9px;
    letter-spacing: 1px;
    cursor: pointer;
}
.eq-sub-tab:hover { color: #D4A574; }
.eq-sub-tab-active {
    color: #D4A574;
    border-bottom-color: #D4A574;
}
.eq-sub-panel { display: none; }
.eq-sub-panel-active { display: block; }

/* Gear 3-col layout */
.eq-gear-layout {
    display: grid;
    grid-template-columns: 180px 1fr 220px;
    gap: 18px;
}
@media (max-width: 900px) {
    .eq-gear-layout { grid-template-columns: 1fr; }
}

.eq-col-title {
    color: #D4A574;
    font-size: 9px;
    letter-spacing: 1px;
    margin-bottom: 10px;
    padding-bottom: 6px;
    border-bottom: 1px solid #2a2a4a;
}

/* Unit column */
.eq-unit-col { display: flex; flex-direction: column; gap: 8px; }
.eq-unit-btn {
    background: #12122a;
    border: 1px solid #2a2a4a;
    color: #8a7a6a;
    padding: 10px 12px;
    font-family: 'PIXELED', monospace;
    font-size: 9px;
    letter-spacing: 1px;
    text-align: left;
    cursor: pointer;
    transition: all 0.15s;
}
.eq-unit-btn:hover:not(.eq-unit-locked) {
    border-color: #D4A574;
    color: #D4A574;
}
.eq-unit-active {
    background: #2a2a4a;
    color: #D4A574;
    border-color: #D4A574;
}
.eq-unit-locked {
    opacity: 0.35;
    cursor: not-allowed;
}

/* Center column — preview + grids */
.eq-center-col { min-width: 0; }

.eq-preview-wrap {
    background: #D4A574;
    border: 1px solid #2a2a4a;
    padding: 18px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}
.eq-badge-banner {
    min-width: 120px;
    padding: 6px 14px;
    text-align: center;
    font-family: 'PIXELED', monospace;
    font-size: 10px;
    color: #1a1a2e;
    letter-spacing: 1px;
    border: 2px solid rgba(0,0,0,0.5);
    text-shadow: 0 0 2px rgba(255,255,255,0.4);
}
/* Preview sized to match game ratios:
   sprite=48, weapon=24 (50% of sprite).
   Weapon R: left edge at sprite-center + 8px → 66.67% from sprite-left.
   Weapon L: left edge at sprite-left - 8px → -16.67% from sprite-left.
   Both vertically centered. */
.eq-preview {
    position: relative;
    width: 192px; height: 144px;
}
.eq-preview img {
    image-rendering: pixelated;
    image-rendering: -moz-crisp-edges;
}
/* Sprite centered: 96x96, at (48, 24) so it fits with weapons around */
#eq-preview-sprite {
    position: absolute;
    width: 96px; height: 96px;
    left: 48px; top: 24px;
    object-fit: contain;
}
/* Weapons are 48x48 (50% of sprite) */
.eq-preview-weapon {
    position: absolute;
    width: 48px; height: 48px;
    object-fit: contain;
    top: 48px; /* vertically centered on sprite center (24 + 48 - 24 = 48) */
}
/* Right weapon: left edge = sprite-left(48) + sprite(96)*0.6667 = 48+64 = 112 */
.eq-preview-weapon-r { left: 112px; }
/* Left weapon (shield): right edge = sprite-left(48) + sprite(96)*0.3333 = 48+32 = 80
   so left = 80 - 48 = 32. Mirrored horizontally. */
.eq-preview-weapon-l { left: 32px; transform: scaleX(-1); display: none; }

.eq-paladin-slots {
    display: none;
    gap: 8px;
    margin-top: 10px;
    justify-content: center;
}
.eq-pal-btn {
    background: #12122a;
    border: 1px solid #2a2a4a;
    color: #8a7a6a;
    padding: 6px 12px;
    font-family: 'PIXELED', monospace;
    font-size: 8px;
    letter-spacing: 1px;
    cursor: pointer;
}
.eq-pal-btn:hover { color: #D4A574; border-color: #D4A574; }
.eq-pal-active { background: #D4A574; color: #1a1a2e; border-color: #D4A574; }

.eq-section-title {
    color: #D4A574;
    font-size: 9px;
    letter-spacing: 1px;
    margin: 18px 0 10px 0;
    padding-bottom: 6px;
    border-bottom: 1px solid #2a2a4a;
}

/* Weapon grid */
.eq-weapon-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 10px;
    max-height: 200px;
    overflow-y: auto;
    padding: 4px;
}
.eq-weapon-item {
    background: #12122a;
    border: 1px solid #2a2a4a;
    padding: 10px 6px;
    text-align: center;
    cursor: pointer;
    transition: all 0.15s;
    position: relative;
}
.eq-weapon-item:hover { border-color: #D4A574; }
.eq-weapon-item img {
    width: 52px; height: 52px;
    object-fit: contain;
    image-rendering: pixelated;
}
.eq-weapon-selected {
    border-color: #D4A574;
    background: #2a2a4a;
}
.eq-weapon-name {
    display: block;
    color: #e0d6c8;
    font-size: 7px;
    letter-spacing: 0.5px;
    margin-top: 6px;
}
.eq-weapon-locked { opacity: 0.5; }
.eq-weapon-locked img { filter: grayscale(1); }
.eq-weapon-tag {
    display: block;
    font-size: 6px;
    color: #FFD700;
    margin-top: 4px;
    letter-spacing: 0.5px;
}
.eq-unlock-btn {
    display: block;
    width: 100%;
    margin-top: 6px;
    background: #D4A574;
    color: #1a1a2e;
    border: 1px solid #8a5a2a;
    padding: 4px 6px;
    font-family: 'PIXELED', monospace;
    font-size: 6px;
    cursor: pointer;
    letter-spacing: 0.5px;
}
.eq-unlock-btn:hover { background: #FFD700; }

/* Badge grid */
.eq-badge-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 10px;
    max-height: 200px;
    overflow-y: auto;
    padding: 4px;
}
.eq-stat-unified {
    background: #12122a;
    border: 1px solid #2a2a4a;
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.eq-stat-row { display: flex; flex-direction: column; gap: 6px; }
.eq-stat-row-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.eq-badge-item {
    background: #12122a;
    border: 1px solid #2a2a4a;
    padding: 10px;
    text-align: center;
    cursor: pointer;
}
.eq-badge-item:hover { border-color: #D4A574; }
.eq-badge-selected { border-color: #D4A574; background: #2a2a4a; }
.eq-badge-band {
    height: 22px; line-height: 22px;
    font-size: 7px;
    font-family: 'PIXELED', monospace;
    color: #1a1a2e;
    margin-bottom: 6px;
    border: 1px solid rgba(0,0,0,0.4);
    text-shadow: 0 0 2px rgba(255,255,255,0.4);
    letter-spacing: 0.5px;
}

/* Stats column */
.eq-stats-col { display: flex; flex-direction: column; gap: 12px; }
.eq-hint-small {
    color: #8a7a6a;
    font-size: 7px;
    letter-spacing: 0.5px;
}
.eq-stats-total {
    color: #FFD700;
    font-size: 9px;
    text-align: center;
    padding: 6px;
    background: #12122a;
    border: 1px solid #2a2a4a;
}
.eq-stat-block {
    background: #12122a;
    border: 1px solid #2a2a4a;
    padding: 12px;
}
.eq-stat-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}
.eq-stat-name { color: #D4A574; font-size: 9px; letter-spacing: 1px; }
.eq-stat-pct { color: #8a7a6a; font-size: 7px; }
.eq-stat-bar {
    display: flex;
    gap: 5px;
    align-items: stretch;
}
.eq-stat-cell {
    flex: 1;
    height: 22px;
    background: #1a1a2e;
    border: 1px solid #2a2a4a;
}
.eq-stat-cell-on {
    background: #D4A574;
    border-color: #D4A574;
    box-shadow: 0 0 4px rgba(212,165,116,0.5);
}
.eq-stat-plus {
    width: 26px;
    height: 22px;
    flex: 0 0 26px;
    background: #D4A574;
    color: #1a1a2e;
    border: 1px solid #D4A574;
    border-radius: 6px;
    padding: 0;
    font-family: 'PIXELED', monospace;
    font-size: 10px;
    line-height: 1;
    cursor: pointer;
    margin-left: 4px;
    transition: color 0.2s;
}
.eq-stat-plus:hover,
.eq-stat-plus:active,
.eq-stat-plus:focus { color: #ffffff; }
.eq-stat-plus:disabled { opacity: 0.4; cursor: not-allowed; }
.eq-buy-btn {
    background: #D4A574;
    color: #1a1a2e;
    border: 1px solid #D4A574;
    border-radius: 6px;
    padding: 10px;
    font-family: 'PIXELED', monospace;
    font-size: 8px;
    letter-spacing: 1px;
    cursor: pointer;
    transition: color 0.2s;
}
.eq-buy-btn:hover,
.eq-buy-btn:active,
.eq-buy-btn:focus { color: #ffffff; }
.eq-buy-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.eq-reset-btn {
    background: #12122a;
    color: #d96a5c;
    border: 1px solid #5a2a2a;
    padding: 10px;
    font-family: 'PIXELED', monospace;
    font-size: 8px;
    letter-spacing: 1px;
    cursor: pointer;
}
.eq-reset-btn:hover { background: #2a1212; color: #ff8a7c; }

/* Power panel */
.eq-power-layout {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 18px;
}
@media (max-width: 800px) {
    .eq-power-layout { grid-template-columns: 1fr; }
}
.eq-power-preview {
    background: #12122a;
    border: 1px solid #2a2a4a;
    padding: 18px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}
.eq-preview-power {
    width: 140px;
    height: 140px;
    position: relative;
}
.eq-preview-power img.eq-power-sprite {
    width: 120px;
    height: 120px;
    object-fit: contain;
    image-rendering: pixelated;
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
}
.eq-badge-banner-power { min-width: 140px; }
.eq-current-power {
    color: #D4A574;
    font-size: 12px;
    letter-spacing: 2px;
    margin-top: 14px;
}
.eq-power-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 10px;
}
.eq-power-item {
    background: #12122a;
    border: 1px solid #2a2a4a;
    padding: 12px;
    cursor: pointer;
    transition: all 0.15s;
}
.eq-power-item:hover:not([data-locked="1"]) { border-color: #D4A574; }
.eq-power-selected { border-color: #D4A574; background: #2a2a4a; }
.eq-power-item[data-locked="1"] { opacity: 0.4; cursor: not-allowed; }
.eq-power-info { display: flex; flex-direction: column; gap: 4px; }
.eq-power-name { color: #D4A574; font-size: 9px; letter-spacing: 1px; }
.eq-power-desc { color: #8a7a6a; font-size: 7px; letter-spacing: 0.5px; }
.eq-locked-tag { color: #FFD700; font-size: 6px; margin-top: 4px; }

/* Toast */
.eq-toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: #12122a;
    border: 2px solid #D4A574;
    color: #D4A574;
    padding: 12px 22px;
    font-family: 'PIXELED', monospace;
    font-size: 9px;
    letter-spacing: 1px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s, transform 0.2s;
    z-index: 10000;
}
.eq-toast-show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}
.eq-toast-err { border-color: #d96a5c; color: #ff8a7c; }
.eq-toast-ok { border-color: #4CAF50; color: #7ee07e; }

/* ============================================================
   404 PAGE — Fun cat composition
   ============================================================ */
.page-404 {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 60vh;
    padding: 30px 16px;
}
.page-404-inner {
    text-align: center;
    background: #12122a;
    border: 2px solid #2a2a4a;
    border-radius: 12px;
    padding: 36px 28px;
    max-width: 560px;
    width: 100%;
}
.page-404-cats {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 14px;
    margin-bottom: 18px;
}
.page-404-number {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 80px;
    color: #D4A574;
    letter-spacing: 4px;
    line-height: 1;
}
.page-404-number .digit {
    text-shadow: 0 4px 0 #2a2a4a;
}
.page-404-cat {
    image-rendering: pixelated;
}
.page-404-cat-side {
    width: 48px;
    height: 48px;
    margin-bottom: 4px;
    animation: cat404Bob 2.4s ease-in-out infinite;
}
.page-404-cat-side:nth-of-type(2) {
    animation-delay: 0.6s;
}
.page-404-cat-mid {
    width: 76px;
    height: 76px;
    animation: cat404Spin 4s ease-in-out infinite;
}
@keyframes cat404Bob {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-8px); }
}
@keyframes cat404Spin {
    0%, 100% { transform: rotate(-6deg); }
    50%      { transform: rotate(6deg); }
}
.page-404-title {
    font-size: 18px;
    color: #D4A574;
    letter-spacing: 2px;
    margin: 12px 0 14px;
}
.page-404-text {
    font-size: 10px;
    color: #8a7a6a;
    line-height: 1.8;
    letter-spacing: 1px;
    margin: 0 0 14px;
}
.page-404-meow {
    font-size: 11px;
    color: #FFD700;
    letter-spacing: 2px;
    margin: 0 0 22px;
    min-height: 14px;
}
.page-404-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

@media (max-width: 600px) {
    .page-404-inner { padding: 24px 16px; }
    .page-404-number { font-size: 44px; }
    .page-404-cat-side { width: 40px; height: 40px; }
    .page-404-cat-mid  { width: 48px; height: 48px; }
    .page-404-title { font-size: 13px; }
    .page-404-text { font-size: 8px; }
    .page-404-meow { font-size: 9px; }
}

.bet-login-prompt {
    display: flex;
    justify-content: center;
    padding: 12px 0 4px;
}
.link-sand { color: #D4A574; text-decoration: underline; }

/* ============================================================
   NAVBAR — Profile block + admin icon
   ============================================================ */
.nav-profile-block {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #1a1a2e;
    border: 1px solid #3a3a5a;
    border-radius: 6px;
    padding: 4px 10px 4px 6px;
    color: #D4A574;
    transition: border-color 0.2s, background 0.2s;
}
.nav-profile-block:hover {
    border-color: #D4A574;
    background: #22223e;
}
.nav-profile-name {
    font-size: 9px;
    letter-spacing: 1px;
    color: #D4A574;
}
.nav-admin-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border: 1px solid #F44336;
    border-radius: 6px;
    color: #F44336;
    transition: background 0.2s, color 0.2s;
}
.nav-admin-icon:hover {
    background: #F44336;
    color: #1a1a2e;
}

/* ============================================================
   VIDEOS PAGE
   ============================================================ */
.videos-empty {
    text-align: center;
    padding: 40px 20px;
}

.videos-featured {
    display: grid;
    grid-template-columns: 1.6fr 1fr;
    gap: 20px;
    margin: 24px 0 32px;
    background: #12122a;
    border: 1px solid #2a2a4a;
    border-radius: 10px;
    padding: 18px;
}
.videos-featured-player {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
    border-radius: 8px;
    overflow: hidden;
}
.videos-featured-player iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}
.videos-featured-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 10px;
}
.videos-latest-tag {
    display: inline-block;
    background: #D4A574;
    color: #1a1a2e;
    font-size: 8px;
    letter-spacing: 1px;
    padding: 4px 8px;
    border-radius: 4px;
    align-self: flex-start;
}
.videos-featured-title {
    font-size: 14px;
    color: #D4A574;
    line-height: 1.5;
    letter-spacing: 1px;
    margin: 0;
}
.videos-featured-date {
    font-size: 9px;
    color: #8a7a6a;
    margin: 0;
}

.videos-section-title {
    font-size: 14px;
    color: #D4A574;
    letter-spacing: 2px;
    margin: 24px 0 12px;
    padding-bottom: 6px;
    border-bottom: 1px solid #2a2a4a;
}

.videos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 16px;
    margin-bottom: 32px;
}

.video-card {
    display: flex;
    flex-direction: column;
    background: #12122a;
    border: 1px solid #2a2a4a;
    border-radius: 8px;
    overflow: hidden;
    transition: border-color 0.2s, transform 0.2s;
    color: inherit;
}
.video-card:hover {
    border-color: #D4A574;
    transform: translateY(-2px);
}
.video-card-thumb {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
}
.video-card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.video-card-play {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.25);
    opacity: 0;
    transition: opacity 0.2s;
}
.video-card:hover .video-card-play {
    opacity: 1;
}
.video-card-play svg {
    width: 48px;
    height: 48px;
    color: #D4A574;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.6));
}
.video-card-body {
    padding: 10px 12px 12px;
}
.video-card-title {
    font-size: 9px;
    color: #D4A574;
    line-height: 1.5;
    margin: 0 0 6px;
    letter-spacing: 0.5px;
    /* Clamp to 2 lines */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.video-card-date {
    font-size: 8px;
    color: #8a7a6a;
    margin: 0;
}

/* --- Responsive: tablet --- */
@media (max-width: 900px) {
    .videos-featured {
        grid-template-columns: 1fr;
    }
}

/* --- Responsive: mobile --- */
@media (max-width: 768px) {
    .videos-featured { padding: 12px; gap: 12px; }
    .videos-featured-title { font-size: 11px; }
    .videos-section-title { font-size: 11px; letter-spacing: 1px; }
    .videos-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 12px;
    }
    .video-card-title { font-size: 8px; }
    .video-card-date { font-size: 7px; }

    /* Profile block on mobile: full-width row inside the dropdown */
    .nav-profile-block {
        width: calc(100% - 24px);
        margin: 8px 12px;
        justify-content: flex-start;
        padding: 8px 10px;
    }
    .nav-admin-icon {
        margin: 4px 12px;
    }
}

@media (max-width: 480px) {
    .videos-grid {
        grid-template-columns: 1fr;
    }
}

/* ============================================================
   EQUIPMENT MODAL — MOBILE LAYOUT
   ============================================================ */
.eq-mobile-tabs { display: none; }
.eq-mobile-actionbar { display: none; }

@media (max-width: 768px) {
    .eq-modal { padding: 0; }
    .eq-modal-inner {
        width: 100vw;
        max-width: 100vw;
        height: 100vh;
        max-height: 100vh;
        border: none;
        display: flex;
        flex-direction: column;
    }
    .eq-modal-header { padding: 12px 14px; font-size: 12px; }

    /* Hide desktop tabs / coins display / sub-tabs on mobile */
    .eq-top-tabs { display: none; }
    .eq-sub-tabs { display: none; }
    .eq-coins-display { display: none; }

    /* Mobile top tabs */
    .eq-mobile-tabs {
        display: flex;
        gap: 4px;
        padding: 8px;
        background: #12122a;
        border-bottom: 1px solid #2a2a4a;
        order: 3;
    }
    .eq-mtab {
        flex: 1;
        background: #1a1a2e;
        border: 1px solid #2a2a4a;
        color: #8a7a6a;
        padding: 10px 4px;
        font-family: 'PIXELED', monospace;
        font-size: 8px;
        letter-spacing: 1px;
        cursor: pointer;
        min-height: 44px;
    }
    .eq-mtab-active {
        background: #D4A574;
        color: #1a1a2e;
        border-color: #D4A574;
    }

    /* Make panel a flex column container, fill remaining space */
    .eq-panel { padding: 0; flex: 1; min-height: 0; display: none; flex-direction: column; }
    .eq-panel-active { display: flex; }

    /* Gear layout becomes a flex column */
    .eq-gear-layout {
        display: flex;
        flex-direction: column;
        gap: 0;
        flex: 1;
        min-height: 0;
    }

    /* eq-center-col: dissolve so children become direct flex children */
    .eq-center-col { display: contents; }

    /* Order the items: preview(1) → unit pills(2) → mobile tabs(3) → sub-content(4) → stats(5) */
    .eq-preview-wrap {
        order: 1;
        position: sticky;
        top: 0;
        z-index: 5;
        padding: 10px;
        gap: 6px;
    }
    .eq-preview { width: 160px; height: 120px; transform: scale(0.85); }

    /* Unit pills horizontal scroll */
    .eq-unit-col {
        order: 2;
        flex-direction: row;
        gap: 6px;
        overflow-x: auto;
        padding: 8px;
        background: #12122a;
        border-bottom: 1px solid #2a2a4a;
    }
    .eq-unit-col .eq-col-title { display: none; }
    .eq-unit-btn {
        flex: 0 0 auto;
        padding: 10px 14px;
        min-height: 44px;
        text-align: center;
    }

    .eq-paladin-slots { order: 3; padding: 6px 8px; }

    /* Sub-panels become scrollable content area, ordered after mobile tabs */
    .eq-sub-panel { order: 4; padding: 10px; overflow-y: auto; flex: 1; min-height: 0; }
    .eq-sub-panel-active { display: block; }

    /* Stats column is also order 4, behaves as content panel */
    .eq-stats-col {
        order: 4;
        padding: 10px;
        overflow-y: auto;
        flex: 1;
        min-height: 0;
    }

    /* Hide all content panels by default on mobile, show only the one matching data-mobile-view */
    .eq-modal[data-mobile-view="weapon"] .eq-sub-panel[data-sub="badge"],
    .eq-modal[data-mobile-view="weapon"] .eq-stats-col,
    .eq-modal[data-mobile-view="badge"] .eq-sub-panel[data-sub="weapon"],
    .eq-modal[data-mobile-view="badge"] .eq-stats-col,
    .eq-modal[data-mobile-view="stats"] .eq-sub-panel { display: none; }

    .eq-modal[data-mobile-view="weapon"] .eq-sub-panel[data-sub="weapon"] { display: block; }
    .eq-modal[data-mobile-view="badge"] .eq-sub-panel[data-sub="badge"] { display: block; }
    .eq-modal[data-mobile-view="stats"] .eq-stats-col { display: block; }

    /* Power panel mobile */
    .eq-power-layout { display: flex; flex-direction: column; gap: 10px; padding: 10px; overflow-y: auto; }

    /* Bigger touch targets */
    .eq-stat-plus { min-width: 44px; min-height: 44px; font-size: 18px; }
    .eq-power-equip { min-height: 40px; padding: 10px 14px; }
    .eq-weapon-item, .eq-badge-item { min-height: 80px; }

    /* Mobile action bar */
    .eq-mobile-actionbar {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 10px;
        padding: 10px 14px;
        background: #12122a;
        border-top: 2px solid #2a2a4a;
        order: 99;
    }
    .eq-mab-coins { color: #FFD700; font-size: 10px; letter-spacing: 1px; }
    .eq-mab-coins b { color: #FFD700; }
    .eq-mab-action {
        background: #D4A574;
        border: 1px solid #D4A574;
        color: #1a1a2e;
        padding: 12px 18px;
        font-family: 'PIXELED', monospace;
        font-size: 9px;
        letter-spacing: 1px;
        min-height: 44px;
        cursor: pointer;
    }
    .eq-mab-action:disabled { opacity: 0.4; cursor: not-allowed; }
}

/* ============================================================
   TUTORIAL GUIDE SYSTEM (creator-cat style)
   ============================================================ */

/* Floating overlay */
.tuto-overlay {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10003;
    width: 90%;
    max-width: 600px;
    animation: tutoSlideUp 0.4s ease-out;
}

@keyframes tutoSlideUp {
    from { opacity: 0; transform: translateX(-50%) translateY(30px); }
    to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}

.tuto-guide {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #2a2a4a;
    border: 2px solid #3a3a5a;
    border-radius: 12px;
    padding: 14px 16px;
    box-shadow: 0 6px 24px rgba(0,0,0,0.6);
}

.tuto-avatar {
    width: 72px;
    height: 72px;
    image-rendering: pixelated;
    flex-shrink: 0;
    animation: creatorBob 1.6s ease-in-out infinite;
    transform-origin: bottom center;
}

/* Talking animation: replaces bobbing while typewriter is active */
.tuto-avatar.tuto-talking {
    animation: tutoTalk 0.3s ease-in-out infinite alternate;
}

@keyframes tutoTalk {
    0%   { transform: rotate(-3deg) scaleY(1); }
    50%  { transform: rotate(2deg) scaleY(0.95); }
    100% { transform: rotate(-1deg) scaleY(1.02); }
}

.tuto-bubble-wrap {
    flex: 1;
    min-width: 0;
}

/* Reuse creator-cat-bubble but override for inline use */
.tuto-bubble {
    max-width: 100%;
    display: block;
}

.tuto-text {
    font-family: 'PIXELED', monospace;
    font-size: 7px;
    color: #1a1a2e;
    line-height: 1.8;
    letter-spacing: 0.5px;
}

.tuto-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
}

.tuto-btn {
    font-family: 'PIXELED', monospace;
    font-size: 7px;
    padding: 5px 12px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    letter-spacing: 1px;
    transition: all 0.2s;
}

.tuto-btn-next {
    background: #D4A574;
    color: #1a1a2e;
}
.tuto-btn-next:hover {
    background: #ffffff;
}

.tuto-btn-stop {
    background: #3a3a5a;
    color: #F44336;
}
.tuto-btn-stop:hover {
    background: #F44336;
    color: #1a1a2e;
}

.tuto-progress {
    font-family: 'PIXELED', monospace;
    font-size: 6px;
    color: #8a7a6a;
    margin-left: auto;
    letter-spacing: 1px;
}

/* --- Highlight box --- */
.tuto-highlight {
    position: absolute;
    z-index: 10001;
    border: 3px solid #FF8200;
    border-radius: 8px;
    box-shadow: 0 0 0 4000px rgba(0, 0, 0, 0.35), 0 0 16px rgba(255, 130, 0, 0.5), inset 0 0 12px rgba(255, 130, 0, 0.15);
    pointer-events: none;
    animation: tutoHighlightPulse 1.5s ease-in-out infinite;
}

@keyframes tutoHighlightPulse {
    0%, 100% { border-color: #FF8200; box-shadow: 0 0 0 4000px rgba(0, 0, 0, 0.35), 0 0 16px rgba(255, 130, 0, 0.5), inset 0 0 12px rgba(255, 130, 0, 0.15); }
    50%      { border-color: #FFD700; box-shadow: 0 0 0 4000px rgba(0, 0, 0, 0.35), 0 0 24px rgba(255, 215, 0, 0.6), inset 0 0 16px rgba(255, 215, 0, 0.2); }
}

/* --- Pixelated arrow --- */
.tuto-arrow {
    position: absolute;
    z-index: 10002;
    pointer-events: none;
    animation: tutoArrowBounce 0.8s ease-in-out infinite;
}

@keyframes tutoArrowBounce {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-8px); }
}

/* --- Scroll hint (fixed top or bottom) --- */
.tuto-scroll-hint {
    position: fixed;
    z-index: 10000;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 10px 20px;
    background: rgba(26, 26, 46, 0.92);
    border: 2px solid #FF8200;
    border-radius: 8px;
    animation: tutoScrollPulse 1s ease-in-out infinite;
}

.tuto-scroll-hint.tuto-scroll-up {
    top: 70px;
}

.tuto-scroll-hint.tuto-scroll-down {
    bottom: 140px;
}

@keyframes tutoScrollPulse {
    0%, 100% { opacity: 1; }
    50%      { opacity: 0.5; }
}

.tuto-scroll-text {
    font-family: 'PIXELED', monospace;
    font-size: 8px;
    color: #FF8200;
    letter-spacing: 1px;
}

/* Mobile adjustments */
@media (max-width: 600px) {
    .tuto-overlay {
        bottom: 10px;
        width: 95%;
    }
    .tuto-guide {
        padding: 10px 12px;
        gap: 8px;
    }
    .tuto-avatar {
        width: 52px;
        height: 52px;
    }
    .tuto-text {
        font-size: 6px;
        line-height: 1.6;
    }
    .tuto-btn {
        font-size: 6px;
        padding: 4px 8px;
    }
    .tuto-scroll-text {
        font-size: 6px;
    }
    .tuto-arrow svg {
        width: 36px;
        height: 18px;
    }
    .tuto-scroll-hint svg {
        width: 28px;
        height: 14px;
    }
}

/* ============================================================
   COLOSSEUM FIGHTER STATS
   ============================================================ */

/* Sub-tabs (Rankings / Fighters) */
.colosseum-subtabs {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 20px;
}

.colosseum-subtab {
    font-family: 'PIXELED', monospace;
    font-size: 10px;
    padding: 8px 16px;
    border: 2px solid #3a3a5a;
    background: #2a2a4a;
    color: #8a7a6a;
    cursor: pointer;
    transition: all 0.2s;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.colosseum-subtab:hover { border-color: #D4A574; color: #D4A574; }

.colosseum-subtab.active {
    background: #D4A574;
    color: #1a1a2e;
    border-color: #D4A574;
}

.colo-tab-icon {
    width: 16px;
    height: 16px;
    image-rendering: pixelated;
}

.colo-tab-icon-flip {
    transform: scaleX(-1);
}

/* Title icons */
.colo-title-icon {
    width: 24px;
    height: 24px;
    image-rendering: pixelated;
    vertical-align: middle;
    margin: 0 6px;
}

.colo-title-icon-flip {
    transform: scaleX(-1);
}

/* Fighter cards list */
.colo-fighters-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.colo-fighter-card {
    background: #2a2a4a;
    border-radius: 8px;
    padding: 14px 16px;
    border-left: 4px solid #D4A574;
    transition: background 0.2s, transform 0.2s;
}

.colo-fighter-card:hover {
    background: #3a3a5a;
    transform: translateX(4px);
}

/* First 3 cards get special border colors */
.colo-fighter-card:nth-child(1) { border-left-color: #FFD700; }
.colo-fighter-card:nth-child(2) { border-left-color: #C0C0C0; }
.colo-fighter-card:nth-child(3) { border-left-color: #CD7F32; }

/* Fighter header row */
.colo-fighter-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.colo-fighter-rank {
    font-size: 18px;
    color: #D4A574;
    min-width: 40px;
    text-align: center;
}

.colo-fighter-card:nth-child(1) .colo-fighter-rank { color: #FFD700; }
.colo-fighter-card:nth-child(2) .colo-fighter-rank { color: #C0C0C0; }
.colo-fighter-card:nth-child(3) .colo-fighter-rank { color: #CD7F32; }

.colo-fighter-identity {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
}

.colo-fighter-avatar-wrap {
    display: flex;
    align-items: center;
    gap: 2px;
}

.colo-fighter-avatar {
    width: 44px;
    height: 44px;
    image-rendering: pixelated;
    border-radius: 6px;
    border: 2px solid #3a3a5a;
    background: #1a1a2e;
    padding: 2px;
}

.colo-fighter-card:nth-child(1) .colo-fighter-avatar { border-color: #FFD700; box-shadow: 0 0 10px rgba(255, 215, 0, 0.3); }

.colo-fighter-weapon {
    width: 22px;
    height: 22px;
    image-rendering: pixelated;
}

.colo-fighter-sword {
    transform: rotate(-30deg);
}

.colo-fighter-shield {
    transform: scaleX(-1) rotate(-10deg);
}

.colo-fighter-name {
    font-size: 13px;
    letter-spacing: 1px;
}

/* Win/Loss record */
.colo-fighter-record {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
}

.colo-fighter-wins { color: #4CAF50; }
.colo-fighter-losses { color: #F44336; }
.colo-fighter-winrate { color: #D4A574; }

/* Stat grid */
.colo-fighter-stats {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 8px;
}

.colo-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: #1a1a2e;
    border-radius: 6px;
    padding: 8px 4px;
}

.colo-stat-val {
    font-size: 14px;
    color: #e0d6c8;
}

.colo-stat-green { color: #4CAF50; }
.colo-stat-red { color: #F44336; }
.colo-stat-blue { color: #42A5F5; }
.colo-stat-fruit { color: #FF8200; }
.colo-stat-legume { color: #66BB6A; }

.colo-stat-label {
    font-size: 7px;
    color: #666;
    margin-top: 4px;
    letter-spacing: 0.5px;
    text-align: center;
}

/* --- Colosseum responsive --- */
@media (max-width: 600px) {
    .colosseum-subtabs { gap: 4px; }
    .colosseum-subtab { font-size: 8px; padding: 6px 10px; }
    .colo-tab-icon { width: 12px; height: 12px; }

    .colo-fighter-header { flex-wrap: wrap; gap: 8px; }
    .colo-fighter-rank { font-size: 14px; min-width: 30px; }
    .colo-fighter-avatar { width: 34px; height: 34px; }
    .colo-fighter-weapon { width: 16px; height: 16px; }
    .colo-fighter-name { font-size: 10px; }
    .colo-fighter-record { font-size: 9px; gap: 4px; }

    .colo-fighter-stats {
        grid-template-columns: repeat(3, 1fr);
        gap: 4px;
    }
    .colo-stat { padding: 6px 2px; }
    .colo-stat-val { font-size: 11px; }
    .colo-stat-label { font-size: 6px; }
}
