/* ============================================================
   Variables & Thème Minecraft
   ============================================================ */
:root {
    --mc-green:        #5d8a41;
    --mc-green-light:  #7ab648;
    --mc-green-neon:   #55ff55;
    --mc-dark:         #141414;
    --mc-darker:       #0d0d0d;
    --mc-card:         #1e1e1e;
    --mc-card-border:  #2e2e2e;
    --mc-text:         #e8e8e8;
    --mc-text-muted:   #8a8a8a;
    --mc-gold:         #ffaa00;
    --mc-red:          #ff5555;
    --mc-navbar-h:     64px;
}

/* ============================================================
   Base
   ============================================================ */
body {
    background-color: var(--mc-dark);
    color: var(--mc-text);
    font-family: 'Segoe UI', system-ui, sans-serif;
}

body::before {
    content: '';
    position: fixed;
    inset: 0;
    background-image:
        radial-gradient(circle at 20% 80%, rgba(93,138,65,0.04) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(85,255,85,0.03) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

/* ============================================================
   Navbar
   ============================================================ */
.mc-navbar {
    background: rgba(13, 13, 13, 0.95);
    border-bottom: 2px solid var(--mc-green);
    backdrop-filter: blur(8px);
    height: var(--mc-navbar-h);
}

.mc-hero-spacer {
    height: var(--mc-navbar-h);
}

.mc-navbar .navbar-brand {
    color: var(--mc-green-light) !important;
    font-size: 1.2rem;
    letter-spacing: 0.5px;
}

.mc-navbar .nav-link {
    color: var(--mc-text-muted) !important;
    transition: color .2s;
    font-size: 0.9rem;
}
.mc-navbar .nav-link:hover,
.mc-navbar .nav-link.active {
    color: var(--mc-green-light) !important;
}

/* ============================================================
   Buttons & Colors
   ============================================================ */
.btn-mc-green {
    background-color: var(--mc-green);
    border-color: var(--mc-green);
    color: #fff;
}
.btn-mc-green:hover {
    background-color: var(--mc-green-light);
    border-color: var(--mc-green-light);
    color: #fff;
}

.mc-green { color: var(--mc-green-light) !important; }
.mc-gold  { color: var(--mc-gold)  !important; }
.mc-red   { color: var(--mc-red)   !important; }

/* ============================================================
   Cards
   ============================================================ */
.mc-card {
    background: var(--mc-card);
    border: 1px solid var(--mc-card-border);
    border-radius: 8px;
    transition: border-color .2s, transform .15s;
}
.mc-card:hover {
    border-color: var(--mc-green);
    transform: translateY(-2px);
}
.mc-card .card-header {
    background: rgba(93,138,65,0.1);
    border-bottom: 1px solid var(--mc-card-border);
    font-weight: 600;
}

/* ============================================================
   Status Widget
   ============================================================ */
.server-status-bar {
    background: var(--mc-card);
    border: 1px solid var(--mc-card-border);
    border-radius: 10px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.status-dot {
    width: 12px; height: 12px;
    border-radius: 50%;
    display: inline-block;
}
.status-dot.online  { background: var(--mc-green-light); box-shadow: 0 0 8px var(--mc-green-light); }
.status-dot.offline { background: var(--mc-red);         box-shadow: 0 0 8px var(--mc-red); }

.player-count {
    font-size: 2rem;
    font-weight: 700;
    color: var(--mc-green-light);
}

.motd-text { font-family: 'Courier New', monospace; font-size: 0.9rem; }

/* ============================================================
   Hero Section
   ============================================================ */
.mc-hero {
    text-align: center;
    padding: 3rem 0 2rem;
    position: relative;
}
.mc-hero h1 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 800;
    color: var(--mc-green-light);
    text-shadow: 0 0 30px rgba(122,182,72,0.3);
}
.mc-hero .subtitle {
    color: var(--mc-text-muted);
    font-size: 1.1rem;
}
.mc-hero .server-address {
    background: var(--mc-darker);
    border: 1px dashed var(--mc-green);
    border-radius: 6px;
    padding: 0.5rem 1.5rem;
    font-family: 'Courier New', monospace;
    font-size: 1.2rem;
    color: var(--mc-gold);
    display: inline-block;
    cursor: pointer;
}

/* ============================================================
   News Cards
   ============================================================ */
.news-card {
    background: var(--mc-card);
    border: 1px solid var(--mc-card-border);
    border-radius: 8px;
    transition: border-color .2s, transform .15s;
    height: 100%;
}
.news-card:hover {
    border-color: var(--mc-green);
    transform: translateY(-3px);
}
.news-card .news-meta {
    color: var(--mc-text-muted);
    font-size: 0.82rem;
}
.news-card .news-title a {
    color: var(--mc-text);
    text-decoration: none;
    font-weight: 600;
}
.news-card .news-title a:hover { color: var(--mc-green-light); }

.pinned-badge {
    background: var(--mc-gold);
    color: #000;
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: 3px;
    font-weight: 700;
}

/* ============================================================
   Players Table
   ============================================================ */
.mc-head { image-rendering: pixelated; }

.player-row td { vertical-align: middle; }

.online-badge {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: var(--mc-green-light);
    box-shadow: 0 0 5px var(--mc-green-light);
    display: inline-block;
}

/* ============================================================
   Rules
   ============================================================ */
.rule-item {
    border-left: 4px solid var(--mc-green);
    padding-left: 1rem;
    margin-bottom: 1.5rem;
}
.rule-number {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--mc-green-light);
    line-height: 1;
}

/* ============================================================
   Login Page
   ============================================================ */
.login-wrapper {
    min-height: calc(100vh - var(--mc-navbar-h));
    display: flex;
    align-items: center;
    justify-content: center;
}
.login-card {
    background: var(--mc-card);
    border: 1px solid var(--mc-green);
    border-radius: 12px;
    padding: 2.5rem;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 0 40px rgba(93,138,65,0.15);
}

/* ============================================================
   Admin Sidebar
   ============================================================ */
.admin-wrapper {
    display: flex;
    min-height: calc(100vh - var(--mc-navbar-h));
}

.admin-sidebar {
    width: 240px;
    flex-shrink: 0;
    background: var(--mc-darker);
    border-right: 1px solid var(--mc-card-border);
    padding-top: 1.5rem;
}

.admin-sidebar .nav-link {
    color: var(--mc-text-muted);
    padding: 0.6rem 1.25rem;
    border-radius: 0;
    font-size: 0.88rem;
    transition: all .15s;
    border-left: 3px solid transparent;
}
.admin-sidebar .nav-link:hover {
    color: var(--mc-green-light);
    background: rgba(93,138,65,0.08);
}
.admin-sidebar .nav-link.active {
    color: var(--mc-green-light);
    border-left-color: var(--mc-green-light);
    background: rgba(93,138,65,0.12);
}
.admin-sidebar .nav-section-title {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--mc-text-muted);
    padding: 1rem 1.25rem 0.25rem;
}

.admin-content {
    flex: 1;
    padding: 2rem;
    overflow-x: auto;
}

/* ============================================================
   RCON Console
   ============================================================ */
.rcon-console {
    background: #000;
    color: #55ff55;
    font-family: 'Courier New', monospace;
    font-size: 0.85rem;
    padding: 1rem;
    border-radius: 6px;
    height: 350px;
    overflow-y: auto;
    border: 1px solid var(--mc-green);
}
.rcon-line-cmd   { color: var(--mc-gold); }
.rcon-line-resp  { color: #aaffaa; }
.rcon-line-error { color: var(--mc-red); }
.rcon-line-sys   { color: #888; }

/* ============================================================
   Tables
   ============================================================ */
.table-mc {
    --bs-table-bg: var(--mc-card);
    --bs-table-border-color: var(--mc-card-border);
    --bs-table-striped-bg: rgba(93,138,65,0.04);
    --bs-table-hover-bg: rgba(93,138,65,0.08);
    color: var(--mc-text);
}
.table-mc th {
    color: var(--mc-text-muted);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-top: none;
}

/* ============================================================
   Forms
   ============================================================ */
.form-control, .form-select {
    background-color: var(--mc-darker) !important;
    border-color: var(--mc-card-border) !important;
    color: var(--mc-text) !important;
}
.form-control:focus, .form-select:focus {
    border-color: var(--mc-green) !important;
    box-shadow: 0 0 0 0.2rem rgba(93,138,65,0.25) !important;
}

/* ============================================================
   Footer
   ============================================================ */
.mc-footer {
    background: var(--mc-darker);
    border-top: 1px solid var(--mc-card-border);
    position: relative;
    z-index: 1;
}

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 768px) {
    .admin-sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid var(--mc-card-border);
    }
    .admin-wrapper { flex-direction: column; }
    .admin-content { padding: 1rem; }
}
