:root {
    --bg-dark: #0f0f12;
    --card-bg: rgba(26, 26, 30, 0.75);
    --card-border: rgba(255, 255, 255, 0.08);
    --text-main: #e2e2e2;
    --text-muted: #a1a1aa;
    --accent-red: #ef4444;
    --accent-orange: #f97316;
    --accent-yellow: #fbbf24;
    --accent-green: #22c55e;
    --font-family: 'Inter', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-family);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow-x: hidden;
    background-color: var(--bg-dark);
}

.background-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: url('bg.png') no-repeat center center;
    background-size: cover;
    filter: blur(4px) brightness(0.35);
    z-index: -1;
    transform: scale(1.05);
    /* Prevent blur bleed */
}

.container {
    width: 100%;
    max-width: 1000px;
    padding: 50px 20px;
    display: flex;
    flex-direction: column;
    gap: 25px;
    animation: fadeIn 0.8s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(15px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Header */
.header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 5px;
}

.logo-box {
    width: 64px;
    height: 64px;
    border-radius: 12px;
    overflow: hidden;
    background: #000;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
    border: 1px solid var(--card-border);
}

.logo {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.header-text h1 {
    font-size: 1.6rem;
    color: var(--accent-red);
    text-transform: uppercase;
    letter-spacing: 1px;
    text-shadow: 0 0 10px rgba(239, 68, 68, 0.3);
}

.subtitle {
    color: var(--text-muted);
    font-size: 1.2rem;
    text-transform: none;
    text-shadow: none;
    font-weight: 600;
}

.header-text p {
    font-size: 0.95rem;
    color: var(--text-muted);
    margin-top: 5px;
}

/* Layout Grid */
.grid-layout {
    display: grid;
    grid-template-columns: 1.6fr 1fr;
    gap: 25px;
}

/* Cards */
.card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    padding: 20px;
    /* Reduced padding */
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    /* removed transition & hover to act as one solid block */
}

h3 {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 700;
}

.dashed-hr {
    border: none;
    border-top: 1px dashed rgba(255, 255, 255, 0.1);
    margin: 12px 0;
}

/* Main Info Styles */
.main-info {
    align-self: start;
}

.status-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    border-bottom: 1px solid var(--card-border);
    padding-bottom: 15px;
    /* Reduced */
    margin-bottom: 20px;
    /* Reduced */
}

.status-col p {
    font-weight: 600;
    margin-bottom: 10px;
}

.status-text.offline {
    color: var(--accent-red);
    text-shadow: 0 0 8px rgba(239, 68, 68, 0.3);
}

.status-text.online {
    color: var(--accent-green);
    text-shadow: 0 0 8px rgba(34, 197, 94, 0.3);
}

.version-text {
    color: var(--accent-orange);
    text-shadow: 0 0 8px rgba(249, 115, 22, 0.3);
}

.ip-col {
    text-align: right;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.ip-address {
    font-weight: 800;
    color: var(--accent-yellow);
    margin-bottom: 15px;
    font-size: 1.15rem;
    letter-spacing: 0.5px;
    text-shadow: 0 0 10px rgba(251, 191, 36, 0.4);
    font-family: monospace;
}

.button-group {
    display: flex;
    gap: 12px;
}

.btn {
    padding: 10px 18px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: var(--font-family);
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-primary {
    background: var(--accent-yellow);
    color: #1a1a1a;
    border: none;
    box-shadow: 0 4px 15px rgba(251, 191, 36, 0.3);
}

.btn-primary:hover {
    background: #fcd34d;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(251, 191, 36, 0.4);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.03);
    color: var(--accent-yellow);
    border: 1px solid var(--accent-yellow);
}

.btn-secondary:hover {
    background: rgba(251, 191, 36, 0.1);
    transform: translateY(-2px);
}

.info-columns {
    display: flex;
    gap: 20px;
    /* Reduced */
}

.info-columns .col {
    flex: 1;
}

.info-columns p {
    font-size: 0.85rem;
    /* Reduced */
    margin-bottom: 8px;
    /* Reduced */
    color: #d1d5db;
    font-weight: 500;
}

.link {
    display: block;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 10px;
    transition: opacity 0.2s, transform 0.2s;
}

.link:hover {
    opacity: 0.8;
    transform: translateX(4px);
}

.highlight-orange {
    color: var(--accent-orange);
}

.highlight-yellow {
    color: var(--accent-yellow);
}

.highlight-green {
    color: var(--accent-green);
}

/* Sidebar */
.sidebar-info {
    grid-column: 2;
    grid-row: 1 / 3;
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.players-card {
    margin-bottom: 0;
}

.players-top {
    display: flex;
    justify-content: space-between;
    margin-bottom: 25px;
}

.players-top p {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.players-top .count {
    font-size: 1.3rem;
    font-weight: 800;
    margin-top: 6px;
}

.players-top .red {
    color: var(--accent-red);
    text-shadow: 0 0 10px rgba(239, 68, 68, 0.3);
}

.active-player {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 12px;
    border-radius: 12px;
    margin-bottom: 25px;
    transition: background 0.2s;
}

.active-player:hover {
    background: rgba(0, 0, 0, 0.4);
}

.player-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 12px;
    position: relative;
}

.playtime-tooltip {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    background: rgba(0, 0, 0, 0.9);
    color: var(--accent-yellow);
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s;
    border: 1px solid var(--accent-orange);
    z-index: 10;
}

/* Arrow for tooltip */
.playtime-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border-width: 5px;
    border-style: solid;
    border-color: var(--accent-orange) transparent transparent transparent;
}

.player-profile:hover .playtime-tooltip {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(-8px);
    transition-delay: 1s;
    /* 1-second delay before showing */
}

.player-head {
    width: 36px;
    height: 36px;
    border-radius: 6px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.player-name {
    color: var(--accent-yellow);
    font-weight: 700;
    font-size: 0.95rem;
}

.player-role {
    color: var(--accent-orange);
    font-size: 0.8rem;
    font-weight: 600;
    margin-top: 2px;
}

.links-section {
    border-top: 1px solid var(--card-border);
    padding-top: 20px;
}

/* Changelog */
.changelog-card {
    grid-column: 1;
    grid-row: 2;
    /* Sits beneath the main-info box */
    align-self: start;
}

.changelog-card ul {
    list-style: none;
}

.changelog-card li {
    font-size: 0.9rem;
    color: #d1d5db;
    margin-bottom: 14px;
    display: flex;
    align-items: center;
}

.changelog-card strong {
    color: #fff;
    margin-right: 8px;
    font-weight: 700;
}

/* Support Card */
.support-card p {
    font-size: 0.9rem;
    color: #d1d5db;
    margin-bottom: 12px;
}

/* Footer */
.footer {
    text-align: center;
    margin-top: 30px;
    padding-bottom: 20px;
}

.footer p {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.back-link {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.85rem;
    transition: color 0.2s;
    display: inline-block;
}

.back-link:hover {
    color: #fff;
}

/* Responsive */
@media (max-width: 850px) {
    .grid-layout {
        grid-template-columns: 1fr;
    }

    .info-columns {
        flex-direction: column;
        gap: 20px;
    }

    .changelog-card {
        grid-column: 1;
    }
}

@media (max-width: 500px) {
    .status-row {
        flex-direction: column;
        gap: 15px;
    }

    .ip-col {
        align-items: flex-start;
        text-align: left;
    }
}