@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

/* Prevent FOUC: body starts with opacity:0 inline, this reveals it once CSS loads */
body {
    opacity: 1 !important;
    transition: opacity 0.15s ease-in;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-primary: #0a0a0a;
    --bg-secondary: #111111;
    --bg-card: #141414;
    --bg-card-alt: #1a1a1a;
    --bg-card-hover: #1e1e1e;
    --border: #222222;
    --border-light: #2a2a2a;
    --border-accent: #333333;
    --text-primary: #e8e8e8;
    --text-secondary: #a0a0a0;
    --text-muted: #5a5a5a;
    --accent: #c0392b;
    --accent-hover: #e74c3c;
    --accent-dim: rgba(192, 57, 43, 0.12);
    --accent-glow: rgba(192, 57, 43, 0.25);
    --gold: #f1c40f;
    --gold-dim: rgba(241, 196, 15, 0.1);
    --silver: #bdc3c7;
    --bronze: #e67e22;
    --success: #2ecc71;
    --success-dim: rgba(46, 204, 113, 0.1);
    --vip: #9b59b6;
    --vip-dim: rgba(155, 89, 182, 0.12);
    --container-width: 740px;
    --radius: 3px;
    --radius-lg: 6px;
}

body {
    font-family: 'Inter', -apple-system, sans-serif;
    font-size: 13px;
    line-height: 1.5;
    color: var(--text-primary);
    min-height: 100vh;
    background-repeat: no-repeat;
    background-attachment: fixed;
    background-position: right -152px bottom -166px;
    background-size: 433px auto;
    background-color: #0a0a0a;
    image-rendering: pixelated;
}

a {
    color: var(--text-primary);
    text-decoration: none;
    transition: color 0.15s;
}

a:hover {
    color: var(--accent-hover);
}

/* Layout */
.wrapper {
    max-width: var(--container-width);
    margin: 40px auto;
    padding: 0 16px;
}

/* Header Banner */
.header-banner {
    width: 100%;
    height: 150px;
    background: url('/cdn/img/header.jpg') center center / cover no-repeat;
    border: 1px solid var(--border);
    border-bottom: none;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.header-banner::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0,0,0,0.4) 0%, rgba(0,0,0,0.7) 100%);
}

.header-banner .logo {
    position: relative;
    z-index: 1;
    text-align: center;
}

.header-banner .logo a {
    text-decoration: none;
    color: inherit;
}

.header-banner .logo h1 {
    font-size: 32px;
    font-weight: 800;
    letter-spacing: 5px;
    text-transform: uppercase;
    color: #fff;
    text-shadow: 0 2px 20px rgba(192, 57, 43, 0.4);
}

.header-banner .logo h1 span {
    color: var(--accent);
}

.header-banner .logo p {
    font-size: 10px;
    letter-spacing: 4px;
    text-transform: uppercase;
    color: rgba(255,255,255,0.5);
    margin-top: 4px;
}

.beta-badge {
    position: absolute;
    top: 10px;
    left: 12px;
    z-index: 1;
    padding: 2px 8px;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    background: rgba(241, 196, 15, 0.15);
    border: 1px solid var(--gold);
    border-radius: 2px;
    color: var(--gold);
}

.data-update-badge {
    position: absolute;
    top: 10px;
    left: 66px;
    z-index: 1;
    padding: 2px 8px;
    font-size: 9px;
    font-weight: 600;
    letter-spacing: 0.5px;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 2px;
    color: rgba(255, 255, 255, 0.8);
}

/* Main Container */
.container {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-top: none;
    min-height: 400px;
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

/* Navigation */
.nav {
    display: flex;
    align-items: center;
    border-bottom: 1px solid var(--border);
    padding: 0;
    height: 38px;
    background: var(--bg-card);
}

.nav a {
    display: flex;
    align-items: center;
    height: 100%;
    padding: 0 16px;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: var(--text-secondary);
    border-right: 1px solid var(--border);
    transition: all 0.15s;
}

.nav a:hover {
    background: var(--bg-card-hover);
    color: var(--text-primary);
}

.nav a.active {
    color: var(--accent);
    background: var(--accent-dim);
    box-shadow: inset 0 -2px 0 var(--accent);
}

.nav .nav-right {
    margin-left: auto;
    display: flex;
    align-items: center;
    height: 100%;
}

.nav .nav-right a {
    border-right: none;
    border-left: 1px solid var(--border);
}

/* Language Switcher */
.lang-switcher {
    display: flex;
    align-items: center;
    height: 100%;
    border-left: 1px solid var(--border);
    padding: 0 10px;
}

.lang-switcher select {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 10px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    letter-spacing: 0.5px;
}

.lang-switcher select:focus { outline: none; }

/* Content Area */
.content {
    padding: 24px;
}

/* Section Headers */
.section-header {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--text-muted);
    padding: 10px 0;
    margin-bottom: 10px;
    border-bottom: 1px solid var(--border);
}

/* Cards */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    margin-bottom: 12px;
    border-radius: var(--radius);
    overflow: hidden;
}

.card-header {
    padding: 10px 16px;
    border-bottom: 1px solid var(--border);
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--text-secondary);
    background: var(--bg-card-alt);
}

.card-body {
    padding: 16px;
}

/* Info Rows */
.info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 9px 0;
    border-bottom: 1px solid var(--border);
}

.info-row:last-child { border-bottom: none; }

.info-row .label {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 500;
}

.info-row .value {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1px;
    background: var(--border);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 16px;
    overflow: hidden;
}

.stat-item {
    background: var(--bg-card);
    padding: 18px 14px;
    text-align: center;
}

.stat-item .stat-value {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.5px;
}

.stat-item .stat-label {
    font-size: 9px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text-muted);
    margin-top: 4px;
    font-weight: 600;
}

/* Hotel Badge (custom boxed icon) */
.hotel-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 16px;
    font-size: 8px;
    font-weight: 700;
    letter-spacing: 0.2px;
    text-transform: uppercase;
    background: var(--bg-primary);
    border: 1px solid var(--border-accent);
    border-radius: 2px;
    color: var(--text-secondary);
    vertical-align: middle;
    margin-right: 4px;
    line-height: 1;
    font-family: 'Inter', monospace;
    flex-shrink: 0;
}

/* VIP Badge */
.vip-badge {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 2px 6px;
    font-size: 8px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    background: var(--vip-dim);
    border: 1px solid var(--vip);
    border-radius: 2px;
    color: var(--vip);
    vertical-align: middle;
}

.vip-badge::before {
    content: '★';
    font-size: 8px;
}

/* Toplist Table */
.toplist {
    width: 100%;
    border-collapse: collapse;
}

.toplist thead th {
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: var(--text-muted);
    padding: 10px 14px;
    text-align: left;
    border-bottom: 1px solid var(--border);
    background: var(--bg-card-alt);
}

.toplist thead th:last-child {
    text-align: right;
}

.toplist tbody tr {
    border-bottom: 1px solid var(--border);
    transition: background 0.1s;
}

.toplist tbody tr:hover {
    background: var(--bg-card-hover);
}

.toplist tbody tr:last-child {
    border-bottom: none;
}

.toplist tbody td {
    padding: 10px 14px;
    vertical-align: middle;
}

.toplist tbody td:last-child {
    text-align: right;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.toplist .rank {
    width: 36px;
    font-weight: 800;
    color: var(--text-muted);
    font-size: 13px;
}

.toplist .rank-1 { color: var(--gold); text-shadow: 0 0 8px var(--gold-dim); }
.toplist .rank-2 { color: var(--silver); }
.toplist .rank-3 { color: var(--bronze); }

.toplist .player-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.toplist .player-avatar {
    width: 30px;
    height: 30px;
    background: var(--bg-primary);
    border: 1px solid var(--border-accent);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 9px;
    font-weight: 700;
    color: var(--text-muted);
    flex-shrink: 0;
}

.toplist .player-name {
    font-weight: 500;
    font-size: 13px;
}

.toplist .player-name a:hover {
    color: var(--accent-hover);
}

.toplist .player-head {
    width: 28px;
    height: 28px;
    border-radius: var(--radius);
    background: var(--bg-primary);
    border: 1px solid var(--border-accent);
    object-fit: cover;
    image-rendering: pixelated;
    flex-shrink: 0;
}

.toplist .money {
    color: var(--success);
    font-weight: 700;
}

/* Profile Page */
.profile-header {
    display: flex;
    gap: 24px;
    margin-bottom: 16px;
    align-items: stretch;
}

.profile-avatar-col {
    flex-shrink: 0;
}

.profile-avatar-frame {
    width: 180px;
    height: 240px;
    position: relative;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    overflow: hidden;
    border: 1px solid var(--border);
    border-bottom: none;
}

.profile-avatar-bg {
    position: absolute;
    top: -88px;
    left: -9px;
    width: auto;
    height: auto;
    max-width: none;
}

.profile-avatar-frame::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0,0,0,0.4) 0%, rgba(0,0,0,0.7) 100%);
    z-index: 0;
}

.profile-avatar-char {
    position: absolute;
    bottom: 25px;
    left: 50%;
    transform: translateX(-50%);
    image-rendering: pixelated;
    z-index: 1;
}

.profile-info-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 12px 0;
}

.profile-name {
    font-size: 26px;
    font-weight: 800;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 4px;
}

.profile-rank-label {
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 700;
    margin-bottom: 16px;
}

.profile-highlight-stats {
    display: flex;
    gap: 28px;
    margin-bottom: 14px;
}

.profile-highlight {
    display: flex;
    flex-direction: column;
}

.profile-highlight-val {
    font-size: 28px;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -1px;
    line-height: 1;
}

.profile-highlight-label {
    font-size: 9px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text-muted);
    font-weight: 600;
    margin-top: 4px;
}

.profile-quick-stats {
    display: flex;
    gap: 24px;
    margin-bottom: 14px;
}

.profile-qs {
    display: flex;
    flex-direction: column;
}

.profile-qs-val {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.5px;
}

.profile-qs-val.cash {
    color: var(--success);
}

.profile-qs-val.xp {
    color: var(--gold);
}

.profile-qs-label {
    font-size: 9px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text-muted);
    font-weight: 600;
    margin-top: 2px;
}

.profile-meta-row {
    display: flex;
    align-items: center;
    gap: 14px;
    font-size: 11px;
    color: var(--text-muted);
    flex-wrap: wrap;
}

.profile-meta-row + .profile-meta-row {
    margin-top: 4px;
}

.profile-meta-row span {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

/* Respect System */
.respect-block {
    display: flex;
    border: 1px solid var(--border);
    border-top: none;
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
    overflow: hidden;
}

.respect-half {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 7px 0;
}

.respect-half-up {
    background: rgba(46, 204, 113, 0.06);
}

.respect-half-down {
    background: rgba(192, 57, 43, 0.06);
    border-left: 1px solid var(--border);
}

.respect-num {
    font-size: 13px;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.respect-half-up .respect-num {
    color: var(--success);
}

.respect-half-down .respect-num {
    color: var(--accent);
}

.respect-inline {
    display: inline;
}

.respect-btn {
    width: 20px;
    height: 20px;
    font-size: 12px;
    font-weight: 700;
    font-family: inherit;
    border: 1px solid;
    border-radius: 2px;
    cursor: pointer;
    transition: all 0.15s;
    background: transparent;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.respect-btn-up {
    border-color: rgba(46, 204, 113, 0.3);
    color: var(--success);
}

.respect-btn-up:hover {
    background: var(--success-dim);
    border-color: var(--success);
}

.respect-btn-down {
    border-color: rgba(192, 57, 43, 0.3);
    color: var(--accent);
}

.respect-btn-down:hover {
    background: var(--accent-dim);
    border-color: var(--accent);
}

/* Mod Badge */
.mod-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 6px;
    font-size: 8px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    background: rgba(231, 76, 60, 0.2);
    border: 1px solid #e74c3c;
    border-radius: 2px;
    color: #e74c3c;
    vertical-align: middle;
    position: relative;
    cursor: default;
}

.mod-tooltip {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    width: 220px;
    padding: 10px 12px;
    font-size: 11px;
    font-weight: 400;
    letter-spacing: 0;
    text-transform: none;
    line-height: 1.5;
    color: var(--text);
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    z-index: 100;
    white-space: normal;
}

.mod-tooltip::before {
    content: '';
    position: absolute;
    top: -5px;
    left: 50%;
    transform: translateX(-50%) rotate(45deg);
    width: 8px;
    height: 8px;
    background: var(--bg-card);
    border-top: 1px solid var(--border);
    border-left: 1px solid var(--border);
}

.mod-badge:hover .mod-tooltip {
    display: block;
}

/* Profile Stat Sections — Redesigned */
.pstat-section {
    margin-bottom: 12px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}

.pstat-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border-bottom: 1px solid var(--border);
    background: var(--bg-card-alt);
}

.pstat-title {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.8px;
    color: var(--text-secondary);
}

.pstat-count {
    margin-left: auto;
    font-size: 9px;
    font-weight: 600;
    color: var(--text-muted);
    letter-spacing: 0.3px;
}

.pstat-rows {
    display: grid;
    grid-template-columns: 1fr 1fr;
}

.pstat-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    background: var(--bg-card);
    transition: background 0.1s;
}

.pstat-row:hover {
    background: var(--bg-card-hover);
}

/* Alternate row backgrounds for readability */
.pstat-row:nth-child(4n+3),
.pstat-row:nth-child(4n+4) {
    background: var(--bg-card-alt);
}

.pstat-row:nth-child(4n+3):hover,
.pstat-row:nth-child(4n+4):hover {
    background: var(--bg-card-hover);
}

/* All items always 50/50, no full-width spanning */

.pstat-label {
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 500;
}

.pstat-val {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-primary);
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.3px;
}

/* Boolean check/cross icons */
.pstat-bool {
    display: inline-flex;
    align-items: center;
}

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

.pstat-yes {
    color: var(--text-secondary);
}

.pstat-no {
    color: var(--text-muted);
}

/* Mapped text values */
.pstat-mapped {
    font-weight: 600;
    font-size: 11px;
    letter-spacing: 0.3px;
    text-transform: uppercase;
    color: var(--text-secondary);
}

/* Profile Bio */
.profile-bio {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 14px 16px;
    margin-bottom: 16px;
    font-family: "Cascadia Code", "Consolas", "Menlo", "DejaVu Sans Mono", monospace;
    font-size: 12px;
    line-height: 1.4;
    color: var(--text-secondary);
    white-space: pre-wrap;
    word-break: break-word;
    overflow-x: auto;
    tab-size: 4;
}

.profile-bio-edit {
    margin-bottom: 16px;
}

.profile-bio-input {
    width: 100%;
    min-height: 60px;
    max-height: 300px;
    padding: 10px 14px;
    font-size: 12px;
    font-family: "Cascadia Code", "Consolas", "Menlo", "DejaVu Sans Mono", monospace;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-primary);
    resize: vertical;
    line-height: 1.4;
    white-space: pre;
    overflow-x: auto;
    tab-size: 4;
}

.profile-bio-input:focus {
    outline: none;
    border-color: var(--accent);
}

.profile-bio-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 6px;
}

.profile-bio-hint {
    font-size: 10px;
    color: var(--text-muted);
    font-family: monospace;
}

/* Toplist Filters */
.toplist-controls {
    display: flex;
    gap: 10px;
    margin-bottom: 14px;
    align-items: flex-end;
}

.toplist-controls .control-group {
    flex: 1;
}

.toplist-controls .control-group label {
    display: block;
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: var(--text-muted);
    margin-bottom: 6px;
}

/* Custom Dropdown */
.custom-select {
    position: relative;
    width: 100%;
}

.custom-select select {
    width: 100%;
    height: 34px;
    padding: 0 32px 0 12px;
    font-size: 12px;
    font-weight: 500;
    font-family: inherit;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-primary);
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    transition: border-color 0.15s;
}

.custom-select select:hover {
    border-color: var(--border-accent);
}

.custom-select select:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 2px var(--accent-dim);
}

.custom-select::after {
    content: '▾';
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 11px;
    pointer-events: none;
}

/* Hotel Pills (next to dropdown) */
.hotel-pills {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
    align-items: center;
    height: 34px;
}

.hotel-pills .pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 34px;
    padding: 0 12px;
    font-size: 10px;
    font-weight: 600;
    color: var(--text-secondary);
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.15s;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    text-decoration: none;
}

.hotel-pills .pill:hover {
    background: var(--bg-card-hover);
    color: var(--text-primary);
    border-color: var(--border-accent);
}

.hotel-pills .pill.active {
    background: var(--accent-dim);
    color: var(--accent);
    border-color: var(--accent);
}

/* Widget Grid */
.widget-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 12px;
}

/* Badge */
.badge {
    display: inline-block;
    padding: 3px 7px;
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: 1px solid;
    border-radius: 2px;
}

.badge-danger {
    color: var(--accent);
    border-color: var(--accent);
    background: var(--accent-dim);
}

.badge-success {
    color: var(--success);
    border-color: var(--success);
    background: var(--success-dim);
}

/* Room Missions */
.room-description {
    color: var(--text-secondary);
    font-size: 12px;
    line-height: 1.8;
    margin-bottom: 14px;
}

.room-missions { margin-top: 8px; }

.secret-mission {
    color: var(--text-muted);
    font-style: italic;
    letter-spacing: 3px;
    font-size: 11px;
}

/* Missions Page */
.mission-room {
    margin-bottom: 24px;
}

.mission-room-header {
    margin-bottom: 10px;
}

.mission-room-header h3 {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.mission-room-header .mission-room-desc {
    font-size: 11px;
    color: var(--text-muted);
    line-height: 1.6;
}

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

.mission-card {
    background: var(--bg-card-alt);
    border: 1px solid var(--border-accent);
    border-radius: var(--radius);
    padding: 16px 14px;
    text-align: center;
    position: relative;
    transition: border-color 0.15s, background 0.15s;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    overflow: visible;
}

.mission-card:hover {
    border-color: var(--text-muted);
    background: var(--bg-card-hover);
}

.mission-card:hover .mission-tooltip {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.mission-tooltip {
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%) translateY(4px);
    background: var(--bg-primary);
    border: 1px solid var(--border-accent);
    border-radius: var(--radius);
    padding: 8px 12px;
    font-size: 11px;
    color: var(--text-secondary);
    line-height: 1.5;
    white-space: normal;
    width: max-content;
    max-width: 220px;
    text-align: left;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s, transform 0.2s, visibility 0.2s;
    z-index: 10;
    pointer-events: none;
    box-shadow: 0 4px 12px rgba(0,0,0,0.5);
}

.mission-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: var(--border-accent);
}

.mission-card.mission-secret {
    border-style: dashed;
    border-color: var(--border);
    background: var(--bg-primary);
}

.mission-card.mission-secret:hover {
    border-color: var(--border-accent);
    background: var(--bg-card);
}

.mc-name {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

.mission-secret .mc-name {
    color: var(--text-muted);
    font-style: italic;
    text-transform: none;
    letter-spacing: 0;
}

.mc-type {
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 2px 7px;
    border-radius: 2px;
    display: inline-block;
}

.mc-type-user {
    color: var(--success);
    background: var(--success-dim);
    border: 1px solid rgba(46, 204, 113, 0.3);
}

.mc-type-room {
    color: #3498db;
    background: rgba(52, 152, 219, 0.1);
    border: 1px solid rgba(52, 152, 219, 0.3);
}

.mc-type-global {
    color: #f1c40f;
    background: rgba(241, 196, 15, 0.1);
    border: 1px solid rgba(241, 196, 15, 0.3);
}

.mission-completed {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1px;
}

.mission-completed .mission-count {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
    font-variant-numeric: tabular-nums;
}

.mission-completed .mission-label {
    font-size: 9px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    font-weight: 600;
}

.mission-xp {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 3px;
}

.mission-xp .mission-xp-val {
    font-size: 16px;
    font-weight: 700;
    color: var(--gold);
    font-variant-numeric: tabular-nums;
}

.mission-xp .mission-xp-label {
    font-size: 9px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    font-weight: 600;
}

/* Mini missions badge in room header */
.mission-mini-badge {
    font-size: 10px;
    font-weight: 600;
    color: var(--text-muted);
    background: var(--bg-card-alt);
    border: 1px solid var(--border);
    border-radius: 2px;
    padding: 2px 8px;
    margin-left: 8px;
    letter-spacing: 0.3px;
    vertical-align: middle;
}

/* Unlocked mission state (secret missions revealed) */
.mission-unlocked-badge {
    font-size: 9px;
    font-weight: 700;
    color: var(--success);
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

/* Secret mission that's been unlocked */
.mission-secret .mc-name-unlocked {
    color: var(--text-secondary);
    font-style: normal;
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

/* Progress Bars */
.progress-bar {
    display: inline-block;
    width: 80px;
    height: 6px;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: 3px;
    vertical-align: middle;
    margin-right: 8px;
    overflow: hidden;
}

.progress-fill {
    display: block;
    height: 100%;
    background: linear-gradient(90deg, var(--accent) 0%, var(--accent-hover) 100%);
    border-radius: 3px;
}

.progress-text {
    font-size: 11px;
    color: var(--text-muted);
    font-variant-numeric: tabular-nums;
}

/* Forms */
.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--text-muted);
    margin-bottom: 6px;
}

.form-input {
    width: 100%;
    padding: 10px 14px;
    font-size: 13px;
    font-family: inherit;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-primary);
    transition: border-color 0.15s, box-shadow 0.15s;
}

.form-input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 2px var(--accent-dim);
}

.form-input::placeholder {
    color: var(--text-muted);
}

select.form-input {
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%235a5a5a' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 32px;
}

.btn {
    display: inline-block;
    padding: 10px 24px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    border: 1px solid;
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.15s;
    font-family: inherit;
}

.btn-primary {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}

.btn-primary:hover {
    background: var(--accent-hover);
    border-color: var(--accent-hover);
    color: #fff;
    box-shadow: 0 4px 12px var(--accent-glow);
}

/* Flash Messages */
.flash {
    padding: 12px 16px;
    margin-bottom: 16px;
    font-size: 12px;
    border: 1px solid;
    border-radius: var(--radius);
    font-weight: 500;
}

.flash-error {
    background: var(--accent-dim);
    border-color: var(--accent);
    color: var(--accent-hover);
}

.flash-success {
    background: var(--success-dim);
    border-color: var(--success);
    color: var(--success);
}

/* Admin */
.admin-tabs {
    display: flex;
    gap: 0;
    border-bottom: 1px solid var(--border);
    margin-bottom: 16px;
    overflow-x: auto;
}

.admin-tab {
    padding: 10px 16px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    text-decoration: none;
    border-bottom: 2px solid transparent;
    transition: all 0.15s;
    white-space: nowrap;
}

.admin-tab:hover {
    color: var(--text-primary);
}

.admin-tab.active {
    color: var(--accent);
    border-bottom-color: var(--accent);
}

.admin-section-head {
    display: flex;
    align-items: baseline;
    gap: 10px;
    margin-bottom: 10px;
}

.admin-section-head h3 {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
}

.admin-count {
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 400;
}

.admin-note {
    font-size: 11px;
    color: var(--text-muted);
    margin-left: auto;
}

.admin-cols {
    display: flex;
    gap: 6px;
    padding: 4px 10px;
    margin-bottom: 2px;
}

.admin-col {
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
}

.admin-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-bottom: none;
    transition: background 0.1s;
}

.admin-row:first-of-type {
    border-radius: var(--radius) var(--radius) 0 0;
}

.admin-row:last-of-type {
    border-bottom: 1px solid var(--border);
    border-radius: 0 0 var(--radius) var(--radius);
}

.admin-row:only-of-type {
    border-radius: var(--radius);
    border-bottom: 1px solid var(--border);
}

.admin-row:hover {
    background: var(--bg-card-hover);
}

.admin-row-new {
    background: var(--bg-primary);
    border-style: dashed;
}

.admin-fields {
    display: flex;
    align-items: center;
    gap: 6px;
    flex: 1;
    flex-wrap: wrap;
}

.admin-input {
    padding: 5px 8px;
    font-size: 11px;
    font-family: inherit;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: 2px;
    color: var(--text-primary);
    transition: border-color 0.15s;
    -moz-appearance: textfield;
}

.admin-input::-webkit-outer-spin-button,
.admin-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.admin-input:focus {
    outline: none;
    border-color: var(--accent);
}

.admin-input-xs { width: 44px; }
.admin-input-sm { width: 90px; }
.admin-input-md { width: 140px; }
.admin-input-lg { flex: 1; min-width: 120px; }

select.admin-input {
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    padding-right: 16px;
}

.admin-row-actions {
    display: flex;
    gap: 4px;
    flex-shrink: 0;
}

.admin-btn-save, .admin-btn-add, .admin-btn-del {
    padding: 4px 10px;
    font-size: 10px;
    font-weight: 700;
    font-family: inherit;
    border: 1px solid;
    border-radius: 2px;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    transition: all 0.15s;
}

.admin-btn-save {
    display: none;
}

.admin-btn-add {
    background: var(--success-dim);
    border-color: var(--success);
    color: var(--success);
}

.admin-btn-add:hover {
    background: var(--success);
    color: #fff;
}

.admin-btn-del {
    background: transparent;
    border-color: var(--border);
    color: var(--text-muted);
}

.admin-btn-del:hover {
    background: var(--accent-dim);
    border-color: var(--accent);
    color: var(--accent);
}

.admin-row.saving {
    border-color: var(--accent);
}

.admin-row.saved {
    border-color: var(--success);
}

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

.admin-tile {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
    text-align: center;
    text-decoration: none;
    transition: all 0.15s;
}

.admin-tile:hover {
    border-color: var(--accent);
    background: var(--accent-dim);
}

.admin-tile-count {
    font-size: 22px;
    font-weight: 700;
    color: var(--text-primary);
}

.admin-tile-label {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    margin-top: 4px;
    font-weight: 600;
}

.admin-table-wrap {
    overflow-x: auto;
}

.admin-table td {
    font-size: 11px;
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.admin-table th {
    font-size: 9px;
}

.admin-cell {
    color: var(--text-secondary);
}

.admin-actions {
    white-space: nowrap;
    text-align: right;
}

.admin-actions a {
    font-size: 10px;
    color: var(--accent);
    margin-right: 8px;
}

.admin-del {
    font-size: 10px;
    color: var(--text-muted);
    background: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
}

.admin-del:hover {
    color: var(--accent-hover);
}

/* Guide Page */
.guide-steps {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin: 14px 0;
}

.guide-step {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 14px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-bottom: none;
}

.guide-step:first-child {
    border-radius: var(--radius) var(--radius) 0 0;
}

.guide-step:last-child {
    border-bottom: 1px solid var(--border);
    border-radius: 0 0 var(--radius) var(--radius);
}

.guide-step-num {
    width: 26px;
    height: 26px;
    background: var(--accent-dim);
    border: 1px solid var(--accent);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    color: var(--accent);
    flex-shrink: 0;
}

.guide-step-content h4 {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.guide-step-content p {
    font-size: 11px;
    color: var(--text-muted);
    line-height: 1.6;
}

.guide-step-content code {
    background: var(--bg-primary);
    border: 1px solid var(--border);
    padding: 1px 5px;
    font-size: 10px;
    border-radius: 2px;
    color: var(--accent);
    font-family: 'Inter', monospace;
}

/* Guide Mission List */
.guide-mission-list {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}

.guide-mission-row {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
}

.guide-mission-row:last-child {
    border-bottom: none;
}

.guide-mission-name {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    min-width: 120px;
}

.guide-mission-desc {
    font-size: 11px;
    color: var(--text-muted);
    line-height: 1.5;
}

.guide-mission-footer {
    display: block;
    padding: 11px 16px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.5px;
    color: var(--text-secondary);
    background: var(--bg-card-alt);
    text-align: center;
    text-decoration: none;
    transition: all 0.15s;
}

.guide-mission-footer:hover {
    color: var(--text-primary);
    background: var(--bg-card-hover);
}

/* Games List */
.game-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.game-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
}

.game-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.game-item:first-child {
    padding-top: 0;
}

.game-icon {
    width: 36px;
    height: 36px;
    background: var(--bg-primary);
    border: 1px solid var(--border-accent);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}

.game-info h4 {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.game-info p {
    font-size: 11px;
    color: var(--text-muted);
    line-height: 1.5;
}

/* Hotel List (full-row layout) */
.guide-hotel-list {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin-bottom: 14px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}

.guide-hotel-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
}

.guide-hotel-row:last-child {
    border-bottom: none;
}

.guide-hotel-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.guide-hotel-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
}

.guide-hotel-play-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 28px;
    background: transparent;
    border: 1px solid var(--success);
    border-radius: var(--radius);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--success);
    text-decoration: none;
    transition: all 0.15s;
}

.guide-hotel-play-btn:hover {
    background: var(--success-dim);
    border-color: var(--success);
    color: var(--success);
    box-shadow: 0 4px 12px rgba(46, 204, 113, 0.15);
}

.guide-hotel-offline-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 28px;
    background: transparent;
    border: 1px solid var(--border-accent);
    border-radius: var(--radius);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--text-muted);
}

/* Legacy hotel buttons (kept for compatibility) */
.guide-hotels {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 14px;
}

.guide-hotel-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 12px;
    font-weight: 500;
    color: var(--text-primary);
    transition: all 0.15s;
    text-decoration: none;
}

.guide-hotel-btn:hover {
    border-color: var(--accent);
    background: var(--accent-dim);
    color: var(--accent);
}

.cmd-code {
    background: var(--bg-primary);
    border: 1px solid var(--border);
    padding: 3px 8px;
    font-size: 11px;
    border-radius: 2px;
    color: var(--accent);
    font-family: 'Inter', monospace;
    font-weight: 600;
    white-space: nowrap;
}

.cmd-list {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    margin-bottom: 14px;
}

.cmd-category {
    padding: 6px 14px;
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: var(--text-muted);
    background: var(--bg-card-alt);
    border-bottom: 1px solid var(--border);
}

.cmd-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 7px 14px;
    border-bottom: 1px solid var(--border);
}

.cmd-row:last-child {
    border-bottom: none;
}

.cmd-row .cmd-code {
    min-width: 110px;
    display: inline-block;
    text-align: center;
}

.cmd-row .cmd-desc {
    font-size: 11px;
    color: var(--text-secondary);
}

.cmd-row .cmd-alias {
    font-size: 10px;
    color: var(--text-muted);
    margin-left: auto;
    white-space: nowrap;
    font-style: italic;
}

/* Footer */
.footer {
    padding: 14px 16px;
    border-top: 1px solid var(--border);
    text-align: center;
    font-size: 10px;
    color: var(--text-muted);
    letter-spacing: 0.5px;
}

/* Responsive */
@media (max-width: 600px) {
    .wrapper {
        margin: 0 auto;
        padding: 0;
    }

    .header-banner {
        height: 110px;
        border-radius: 0;
    }

    .header-banner .logo h1 {
        font-size: 22px;
    }

    .container {
        border-radius: 0;
        border-left: none;
        border-right: none;
    }

    .nav {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .nav a {
        white-space: nowrap;
        padding: 0 12px;
        font-size: 10px;
    }

    .content {
        padding: 16px;
    }

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

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

    .profile-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .profile-avatar-frame {
        width: 140px;
        height: 190px;
    }

    .profile-avatar-char {
        height: 160px;
    }

    .profile-name {
        justify-content: center;
        font-size: 20px;
    }

    .profile-highlight-stats {
        justify-content: center;
    }

    .profile-quick-stats {
        justify-content: center;
    }

    .profile-meta-row {
        justify-content: center;
    }

    .toplist-controls {
        flex-direction: column;
    }

    .hotel-pills {
        flex-wrap: wrap;
    }
}

/* Toplist Card Header with Order Buttons */
.toplist-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.toplist-order-btns {
    display: flex;
    gap: 2px;
}

.toplist-order-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 20px;
    font-size: 10px;
    color: var(--text-muted);
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: 2px;
    text-decoration: none;
    transition: all 0.15s;
}

.toplist-order-btn:hover {
    color: var(--text-primary);
    border-color: var(--border-accent);
}

.toplist-order-btn.active {
    color: var(--accent);
    border-color: var(--accent);
    background: var(--accent-dim);
}

/* Highlight logged-in user row */
.toplist tbody tr.toplist-me {
    background: var(--gold-dim);
    border-left: 2px solid var(--gold);
}

.toplist tbody tr.toplist-me:hover {
    background: rgba(241, 196, 15, 0.15);
}

/* Toplist Highlights - removed, using categories now */

/* Admin Modal */
.admin-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.admin-modal {
    background: var(--bg-secondary);
    border: 1px solid var(--border-accent);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 480px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.admin-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    border-bottom: 1px solid var(--border);
    font-size: 13px;
    font-weight: 700;
    color: var(--text-primary);
}

.admin-modal-close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 20px;
    cursor: pointer;
    line-height: 1;
    padding: 0 4px;
}

.admin-modal-close:hover {
    color: var(--accent-hover);
}

.admin-modal-body {
    padding: 18px;
}

.admin-modal-body textarea.form-input {
    resize: vertical;
    min-height: 60px;
    font-size: 12px;
    line-height: 1.6;
}

.admin-modal-footer {
    padding: 12px 18px;
    border-top: 1px solid var(--border);
    text-align: right;
}

/* Admin description button */
.admin-btn-desc {
    padding: 4px 6px;
    font-size: 12px;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 2px;
    cursor: pointer;
    transition: all 0.15s;
    line-height: 1;
}

.admin-btn-desc:hover {
    border-color: var(--accent);
    background: var(--accent-dim);
}

/* Mission Detail Panel (click to expand) */
.mission-has-detail {
    cursor: pointer;
}

.mission-detail-panel {
    display: none;
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background: var(--bg-primary);
    border: 1px solid var(--border-accent);
    border-radius: var(--radius);
    padding: 10px 14px;
    font-size: 11px;
    color: var(--text-secondary);
    line-height: 1.7;
    z-index: 20;
    text-align: left;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5);
}

.mission-detail-open .mission-detail-panel {
    display: block;
}

.mission-detail-open .mission-tooltip {
    display: none;
}

/* Rank List (Home page) */
.rank-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 0;
}

.rank-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-bottom: 1px solid var(--border);
    border-right: 1px solid var(--border);
}

.rank-item:last-child {
    border-bottom: none;
}

.rank-id {
    font-size: 10px;
    font-weight: 600;
    color: var(--text-muted);
    font-variant-numeric: tabular-nums;
    min-width: 18px;
}

.rank-name {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.3px;
}


/* News Timeline */
.news-timeline {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.news-month {
    margin-bottom: 24px;
}

.news-month-label {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--text-muted);
    padding: 8px 0;
    margin-bottom: 8px;
    border-bottom: 1px solid var(--border);
}

.news-month-entries {
    display: flex;
    flex-direction: column;
    gap: 0;
    padding-left: 16px;
    border-left: 2px solid var(--border);
}

.news-entry {
    position: relative;
    padding: 12px 0 12px 20px;
}

.news-entry:last-child {
    padding-bottom: 0;
}

.news-entry-dot {
    position: absolute;
    left: -7px;
    top: 18px;
    width: 12px;
    height: 12px;
    background: var(--bg-card);
    border: 2px solid var(--border-accent);
    border-radius: 50%;
}

.news-entry-content {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 14px 16px;
    transition: border-color 0.15s;
}

.news-entry-content:hover {
    border-color: var(--border-accent);
}

.news-entry-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 6px;
}

.news-entry-date {
    font-size: 10px;
    color: var(--text-muted);
    margin-left: auto;
}

.news-entry-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.news-entry-body {
    font-size: 11px;
    color: var(--text-secondary);
    line-height: 1.7;
}

.news-category {
    display: inline-block;
    padding: 2px 8px;
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    border-radius: 2px;
    border: 1px solid;
}

.news-cat-update {
    color: #3498db;
    background: rgba(52, 152, 219, 0.1);
    border-color: rgba(52, 152, 219, 0.3);
}

.news-cat-feature {
    color: var(--success);
    background: var(--success-dim);
    border-color: rgba(46, 204, 113, 0.3);
}

.news-cat-fix {
    color: var(--gold);
    background: var(--gold-dim);
    border-color: rgba(241, 196, 15, 0.3);
}

.news-cat-event {
    color: var(--vip);
    background: var(--vip-dim);
    border-color: rgba(155, 89, 182, 0.3);
}

/* i18n Loading State */
body.i18n-loading .content {
    position: relative;
    min-height: 200px;
}

body.i18n-loading .content > *:not(.i18n-loader) {
    visibility: hidden;
}

body.i18n-loading [data-i18n] {
    visibility: hidden;
}

body.i18n-loading .content::after {
    content: '';
    position: absolute;
    top: 80px;
    left: 50%;
    transform: translateX(-50%);
    width: 24px;
    height: 24px;
    border: 2px solid var(--border);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: i18n-spin 0.6s linear infinite;
}

@keyframes i18n-spin {
    to { transform: translateX(-50%) rotate(360deg); }
}

body:not(.i18n-loading) .content {
    visibility: visible;
}
