:root {
    --bg: #0b0b0b;
    --surface: #121212;
    --surface-alt: #171717;
    --border: #2b2b2b;
    --text: #e6e6e6;
    --muted: #9d9d9d;
    --accent: #ff6a00;
    --accent-dark: #c24b0c;
    --danger: #ff4d4d;
    --success: #45c16f;
    --shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background:
        radial-gradient(circle at top, rgba(255, 106, 0, 0.12), transparent 30%),
        linear-gradient(180deg, #0b0b0b 0%, #090909 100%);
    color: var(--text);
    font-family: Roboto, sans-serif;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    max-width: 100%;
    display: block;
}

.container {
    width: min(1200px, calc(100% - 32px));
    margin: 0 auto;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(10, 10, 10, 0.85);
    backdrop-filter: blur(6px);
    border-bottom: 1px solid #2a2a2a;
}

.navbar {
    min-height: 76px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.logo,
.hero-title,
.section-title,
.panel-title,
.admin-brand {
    font-family: 'Russo One', sans-serif;
    letter-spacing: 1px;
}

.logo {
    color: #fff;
    font-size: 1.5rem;
}

.nav-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 18px;
}

.nav-links a {
    color: #c8c8c8;
    font-weight: 500;
    transition: color 0.2s ease;
}

.nav-links a:hover,
.nav-links a.is-active {
    color: var(--accent);
}

.page-shell {
    min-height: calc(100vh - 76px);
}

.hero {
    min-height: 640px;
    position: relative;
    display: grid;
    place-items: center;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        linear-gradient(rgba(0, 0, 0, 0.52), rgba(0, 0, 0, 0.84)),
        var(--hero-image) center/cover no-repeat;
    filter: saturate(0.9);
}

.hero::after {
    content: '';
    position: absolute;
    inset: auto 0 0;
    height: 160px;
    background: linear-gradient(180deg, rgba(11, 11, 11, 0), rgba(11, 11, 11, 1));
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    width: min(840px, calc(100% - 32px));
}

.hero-kicker,
.section-kicker,
.stat-label {
    font-family: Orbitron, sans-serif;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.hero-kicker,
.section-kicker {
    color: var(--accent);
    font-size: 0.85rem;
}

.hero-title {
    font-size: clamp(2.7rem, 7vw, 5.4rem);
    margin: 14px 0;
}

.hero-subtitle {
    color: #cfcfcf;
    font-size: clamp(1rem, 2vw, 1.2rem);
    line-height: 1.7;
    max-width: 760px;
    margin: 0 auto 28px;
}

.hero-actions,
.toolbar,
.filters {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
}

.hero-actions {
    justify-content: center;
}

.btn {
    border: 0;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 46px;
    padding: 0 22px;
    color: #fff;
    font-weight: 700;
    border-radius: 10px;
    background: linear-gradient(135deg, #ff6a00, #c24b0c);
    box-shadow: 0 0 0 rgba(255, 106, 0, 0.3);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 24px rgba(255, 106, 0, 0.4);
}

.btn-secondary {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text);
}

.btn-small {
    min-height: 40px;
    padding: 0 16px;
}

.section {
    padding: 72px 0;
}

.section-title {
    font-size: clamp(1.8rem, 4vw, 2.7rem);
    margin: 10px 0 16px;
}

.section-copy {
    color: var(--muted);
    line-height: 1.7;
    max-width: 740px;
}

.grid {
    display: grid;
    gap: 22px;
}

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

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

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

.card,
.table-card,
.admin-card,
.metric-card,
.filter-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    box-shadow: var(--shadow);
}

.card,
.admin-card,
.table-card,
.filter-card {
    padding: 30px;
}

.server-card {
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
    align-self: start;
}

.server-card:hover {
    border-color: var(--accent);
    transform: translateY(-6px);
    box-shadow: 0 14px 30px rgba(255, 106, 0, 0.18);
}

.card-title,
.panel-title {
    margin: 0 0 14px;
    font-family: Orbitron, sans-serif;
}

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

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

.metric-card {
    padding: 22px;
}

.stat-value {
    margin-top: 8px;
    font-size: 2rem;
    font-weight: 700;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.pill {
    display: inline-flex;
    align-items: center;
    padding: 8px 12px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.03);
    color: #d2d2d2;
    font-size: 0.92rem;
}

.status-on {
    color: var(--success);
}

.status-off {
    color: var(--danger);
}

.filters,
.toolbar {
    align-items: end;
    margin: 24px 0;
}

.field {
    flex: 1 1 190px;
}

.field label {
    display: block;
    margin-bottom: 10px;
    color: #c8c8c8;
    font-size: 0.95rem;
}

.input,
.select,
.textarea {
    width: 100%;
    min-height: 46px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: #0f0f0f;
    color: var(--text);
    padding: 12px 14px;
    font: inherit;
}

.textarea {
    min-height: 120px;
    resize: vertical;
}

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

.flash-stack {
    padding-top: 18px;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th,
td {
    padding: 16px 14px;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

th {
    color: #d6d6d6;
    background: rgba(255, 255, 255, 0.02);
    font-family: Orbitron, sans-serif;
    font-size: 0.86rem;
    letter-spacing: 1px;
}

tr:hover td {
    background: rgba(255, 255, 255, 0.015);
}

.rank-cell {
    font-weight: 700;
    color: var(--accent);
}

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

.avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.feed-item {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

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

.split {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 22px;
}

.home-overview {
    align-items: start;
}

.home-servers-column,
.home-feeds-column {
    align-self: start;
}

.home-servers-grid {
    align-items: start;
}

.home-feed-card {
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.home-feed-list {
    max-height: 320px;
    overflow-y: auto;
    padding-right: 8px;
}

.home-feed-list::-webkit-scrollbar {
    width: 8px;
}

.home-feed-list::-webkit-scrollbar-thumb {
    background: rgba(255, 106, 0, 0.28);
    border-radius: 999px;
}

.map-frame {
    min-height: 480px;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid var(--border);
    background:
        radial-gradient(circle at center, rgba(255, 106, 0, 0.12), transparent 45%),
        linear-gradient(180deg, #191919, #0f0f0f);
    display: grid;
    place-items: center;
    color: #c6c6c6;
}

.map-stage {
    position: relative;
    min-height: 560px;
    padding: 0;
}

.map-image {
    width: 100%;
    height: 100%;
    min-height: 560px;
    object-fit: cover;
    display: block;
}

.map-hotspots {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.hotspot-marker {
    position: absolute;
    transform: translate(-50%, -50%);
    border-radius: 999px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.95) 0%, rgba(255, 112, 67, 0.92) 28%, rgba(255, 59, 48, 0.72) 52%, rgba(255, 59, 48, 0.08) 100%);
    border: 2px solid rgba(255, 255, 255, 0.92);
    box-shadow: 0 0 0 var(--hotspot-glow, 20px) rgba(255, 59, 48, 0.16), 0 0 26px rgba(255, 80, 44, 0.72);
    display: grid;
    place-items: center;
    animation: hotspot-pulse 1.8s ease-in-out infinite;
}

.hotspot-marker span {
    font-size: 0.82rem;
    font-weight: 700;
    color: #fff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.85);
}

.hotspot-marker.is-peak {
    z-index: 2;
    box-shadow: 0 0 0 calc(var(--hotspot-glow, 20px) + 12px) rgba(255, 59, 48, 0.2), 0 0 32px rgba(255, 80, 44, 0.82);
}

@keyframes hotspot-pulse {
    0%,
    100% {
        transform: translate(-50%, -50%) scale(1);
    }
    50% {
        transform: translate(-50%, -50%) scale(1.08);
    }
}

.admin-shell {
    display: grid;
    grid-template-columns: 260px 1fr;
    min-height: 100vh;
}

.admin-sidebar {
    background: #0e0e0e;
    border-right: 1px solid var(--border);
    padding: 28px 20px;
}

.admin-brand {
    font-size: 1.35rem;
    margin-bottom: 28px;
}

.admin-menu {
    display: grid;
    gap: 10px;
}

.admin-menu a {
    padding: 12px 14px;
    border-radius: 10px;
    color: #cfcfcf;
}

.admin-menu a:hover,
.admin-menu a.is-active {
    background: rgba(255, 106, 0, 0.12);
    color: #fff;
}

.admin-main {
    padding: 30px;
}

.admin-topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    margin-bottom: 24px;
}

.flash {
    padding: 14px 16px;
    border-radius: 10px;
    margin-bottom: 18px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.flash-success {
    background: rgba(69, 193, 111, 0.1);
    color: #bbf3cb;
}

.flash-error {
    background: rgba(255, 77, 77, 0.1);
    color: #ffbaba;
}

.auth-shell {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
}

.auth-card {
    width: min(460px, 100%);
    padding: 34px;
}

.profile-header {
    display: flex;
    gap: 24px;
    align-items: center;
}

.profile-cover-card {
    position: relative;
    overflow: hidden;
    background-size: cover;
    background-position: center;
}

.profile-cover-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(11, 11, 11, 0.12), rgba(11, 11, 11, 0.58));
    pointer-events: none;
}

.profile-cover-card > * {
    position: relative;
    z-index: 1;
}

.profile-avatar {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    border: 2px solid var(--border);
}

.avatar-stack {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    overflow: visible;
    vertical-align: middle;
}

.online-dot {
    position: absolute;
    display: block;
    right: 1px;
    bottom: 1px;
    z-index: 3;
    width: 15px;
    height: 15px;
    border-radius: 50%;
    background: #29d365;
    border: 2px solid #111;
    box-shadow: 0 0 0 2px rgba(17, 17, 17, 0.95), 0 0 10px rgba(41, 211, 101, 0.45);
}

.profile-tag {
    margin: 8px 0 10px;
    font-family: Orbitron, sans-serif;
    font-size: 0.95rem;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.player-name-vip,
.player-name-gradient {
    display: inline-block;
    font-weight: 700;
}

.player-name-gradient {
    color: transparent;
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.player-name-glow {
    text-shadow: 0 0 1px rgba(255, 255, 255, 0.08);
}

.player-name-gradient.player-name-glow {
    text-shadow: none;
    filter: drop-shadow(0 0 1px rgba(255, 255, 255, 0.10));
}

.profile-banned {
    filter: grayscale(1) saturate(0.15) contrast(0.95);
}

.ip-sensitive {
    position: relative;
    display: inline-flex;
    align-items: center;
    padding: 2px 6px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.04);
    color: var(--text);
    text-shadow: 0 0 6px rgba(230, 230, 230, 0.55);
    user-select: none;
    transition: color 0.18s ease, text-shadow 0.18s ease, background-color 0.18s ease;
}

.ip-sensitive::after {
    content: attr(data-full-ip);
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    padding: 2px 6px;
    color: transparent;
    transition: color 0.18s ease;
}

.ip-sensitive:hover {
    color: transparent;
    text-shadow: none;
    background: rgba(255, 255, 255, 0.08);
}

.ip-sensitive:hover::after {
    color: var(--text);
}

.profile-bio {
    max-width: 700px;
    margin: 14px 0 0;
    padding-left: 14px;
    border-left: 3px solid var(--accent);
    color: #cdcdcd;
    line-height: 1.7;
}

.resource-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
    align-items: start;
}

.resource-card {
    padding: 18px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: var(--surface-alt);
    min-width: 0;
    overflow: hidden;
}

.resource-card .stat-label {
    font-size: 0.95rem;
    letter-spacing: 1px;
    line-height: 1.3;
}

.resource-card .stat-value {
    font-size: clamp(1.8rem, 3vw, 2.35rem);
    line-height: 1.1;
}

.resource-card-inline {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 14px;
    min-height: 72px;
}

.resource-card-inline .stat-label,
.resource-card-inline .stat-value {
    margin: 0;
}

.resource-card-inline .stat-value {
    justify-self: end;
    text-align: right;
}

.empty-state {
    color: var(--muted);
    padding: 20px 0;
}

@media (max-width: 980px) {
    .grid-2,
    .grid-3,
    .grid-4,
    .stats-row,
    .resource-grid,
    .split,
    .admin-shell {
        grid-template-columns: 1fr;
    }

    .navbar {
        min-height: auto;
        padding: 16px 0;
        flex-direction: column;
    }

    .admin-sidebar {
        border-right: 0;
        border-bottom: 1px solid var(--border);
    }
}

@media (max-width: 720px) {
    .card,
    .table-card,
    .admin-card,
    .filter-card {
        padding: 22px;
    }

    .hero {
        min-height: 560px;
    }

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