:root {
    --bg: #0b0e14;
    --bg-alt: #121722;
    --card: #161c2a;
    --card-border: #232b3d;
    --text: #e7ebf3;
    --text-dim: #8b93a7;
    --gold: #e2a63c;
    --gold-dim: #a97f2f;
    --green: #3ecf6a;
    --red: #e0525c;
    --radius: 12px;
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    background: var(--bg);
    color: var(--text);
    font-family: 'Segoe UI', Roboto, -apple-system, sans-serif;
    line-height: 1.55;
}

a { color: var(--gold); text-decoration: none; }
a:hover { color: #f0bc5d; }

.container {
    max-width: 1080px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.site-header {
    background: linear-gradient(180deg, var(--bg-alt), var(--bg));
    border-bottom: 1px solid var(--card-border);
    position: sticky;
    top: 0;
    z-index: 10;
}

.site-header .bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 0;
}

.brand {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--text);
    letter-spacing: .5px;
}

.brand span { color: var(--gold); }

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

.nav-links a {
    color: var(--text-dim);
    font-weight: 600;
    font-size: .95rem;
}

.nav-links a:hover { color: var(--text); }

.nav-links .panel-link {
    background: rgba(226, 166, 60, .1);
    border: 1px solid var(--gold-dim);
    padding: 7px 14px;
    border-radius: 8px;
    color: var(--gold);
}

.nav-links .panel-link:hover { background: rgba(226, 166, 60, .18); }

/* Hero */
.hero {
    padding: 56px 0 30px;
    text-align: center;
}

.hero h1 {
    font-size: 2.3rem;
    margin: 0 0 10px;
}

.hero p {
    color: var(--text-dim);
    max-width: 560px;
    margin: 0 auto;
}

/* Stats bar */
.stats-bar {
    display: flex;
    gap: 14px;
    margin: 30px 0;
    flex-wrap: wrap;
}

.stats-bar .stat {
    flex: 1;
    min-width: 150px;
    background: var(--card);
    border: 1px solid var(--card-border);
    border-radius: var(--radius);
    padding: 16px 20px;
    text-align: center;
}

.stats-bar .num {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--gold);
}

.stats-bar .label {
    color: var(--text-dim);
    font-size: .82rem;
    margin-top: 2px;
}

/* Serverlist rows - unikov.net tarzı kart */
:root {
    --maroon-1: #241014;
    --maroon-2: #180c0f;
    --maroon-border: #402027;
    --orange: #e8672c;
    --orange-dim: #b84f22;
}

.serverlist {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin: 20px 0 36px;
}

.server-row {
    position: relative;
    display: flex;
    align-items: stretch;
    background: linear-gradient(100deg, var(--maroon-1) 55%, var(--maroon-2));
    border: 1px solid var(--maroon-border);
    border-left: 3px solid var(--orange);
    border-radius: var(--radius);
    overflow: hidden;
    min-height: 118px;
    transition: border-color .15s ease;
}

.server-row:hover { border-color: var(--orange-dim); border-left-color: var(--orange); }

.row-body {
    position: relative;
    z-index: 2;
    flex: 1;
    padding: 18px 22px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 10px;
    min-width: 0;
}

.row-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.row-name-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.row-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    flex-shrink: 0;
    background: var(--red);
}

.row-dot.online { background: var(--green); }

.row-name {
    font-weight: 800;
    color: #fff;
    font-size: 1.02rem;
    letter-spacing: .3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.row-name:hover { color: var(--orange); }

.row-players-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: #e7ebf3;
    font-weight: 700;
    font-size: .9rem;
    flex-shrink: 0;
}

.row-players-badge .icon { opacity: .7; }

.row-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.row-meta .flag {
    font-size: 1.15rem;
    line-height: 1;
}

.row-meta .country {
    color: var(--text-dim);
    font-size: .85rem;
}

.ip-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(0, 0, 0, .28);
    border: 1px solid var(--maroon-border);
    border-radius: 7px;
    padding: 5px 11px;
    font-family: 'Consolas', monospace;
    font-size: .8rem;
    color: #d7dbe4;
    cursor: pointer;
}

.ip-badge:hover { border-color: var(--orange-dim); color: #fff; }
.ip-badge .copied { color: var(--green); }

.connect-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 8px;
    background: var(--orange);
    color: #1a0a02;
    font-size: .8rem;
}

.connect-btn:hover { background: #f27a3f; color: #1a0a02; }

.map-badge {
    position: absolute;
    right: 12px;
    bottom: 12px;
    z-index: 2;
    background: rgba(10, 6, 7, .72);
    color: #f1e4d8;
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .4px;
    text-transform: uppercase;
    padding: 4px 10px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.row-thumb {
    position: relative;
    flex-shrink: 0;
    width: 26%;
    min-width: 160px;
}

.row-thumb img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: .85;
}

.row-thumb::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, var(--maroon-1), rgba(36, 16, 20, 0) 55%);
    z-index: 1;
}

.row-thumb.no-thumb img { display: none; }

@media (max-width: 700px) {
    .server-row { flex-direction: column; min-height: 0; }
    .row-thumb { width: 100%; height: 110px; order: -1; }
    .row-thumb::before { background: linear-gradient(180deg, rgba(24,12,15,0), var(--maroon-1) 90%); }
}

.status-dot {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: .82rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 20px;
}

.status-dot.online { background: rgba(62, 207, 106, .12); color: var(--green); }
.status-dot.offline { background: rgba(224, 82, 92, .12); color: var(--red); }

.status-dot::before {
    content: '';
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: currentColor;
}

.player-count {
    font-size: 1.9rem;
    font-weight: 800;
    margin: 10px 0 2px;
}

.player-count small {
    font-size: 1rem;
    color: var(--text-dim);
    font-weight: 500;
}

.connect-row {
    display: flex;
    gap: 8px;
    margin-top: 16px;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 9px 16px;
    border-radius: 8px;
    font-weight: 700;
    font-size: .88rem;
    border: none;
    cursor: pointer;
    text-align: center;
}

.btn-gold { background: var(--gold); color: #1a1305; }
.btn-gold:hover { background: #f0bc5d; color: #1a1305; }

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

.btn-outline:hover { border-color: var(--gold-dim); color: var(--gold); }

.btn-danger { background: var(--red); color: #2a0b0e; }
.btn-danger:hover { background: #ec7178; }

.ip-copy {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--bg-alt);
    border: 1px solid var(--card-border);
    border-radius: 8px;
    padding: 8px 12px;
    font-family: 'Consolas', monospace;
    font-size: .85rem;
    color: var(--text-dim);
    margin-top: 10px;
    cursor: pointer;
}

.ip-copy:hover { border-color: var(--gold-dim); color: var(--text); }

.ip-copy .copied { color: var(--green); }

/* Section headings */
.section {
    margin: 48px 0;
}

.section-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 18px;
}

.section-head h2 { margin: 0; font-size: 1.4rem; }
.section-head a { font-size: .9rem; font-weight: 600; }

/* Announcements */
.announcement-card {
    background: var(--card);
    border: 1px solid var(--card-border);
    border-radius: var(--radius);
    padding: 18px 22px;
    margin-bottom: 14px;
}

.announcement-card h3 { margin: 0 0 6px; font-size: 1.05rem; }
.announcement-card .date { color: var(--text-dim); font-size: .82rem; }
.announcement-card p { color: var(--text-dim); margin: 8px 0 0; }

.announcement-body {
    background: var(--card);
    border: 1px solid var(--card-border);
    border-radius: var(--radius);
    padding: 28px;
    white-space: pre-wrap;
}

/* Server detail / players table */
.detail-hero-v2 {
    background: linear-gradient(120deg, var(--maroon-1), var(--maroon-2));
    border: 1px solid var(--maroon-border);
    border-left: 3px solid var(--orange);
    border-radius: var(--radius);
    padding: 26px 28px;
    margin: 30px 0 0;
}

.dh-top {
    display: flex;
    align-items: center;
    gap: 10px;
}

.dh-top h1 {
    margin: 0;
    font-size: 1.5rem;
    color: #fff;
}

.dh-connect {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin: 18px 0 4px;
}

.dh-info-grid {
    display: flex;
    gap: 30px;
    flex-wrap: wrap;
    margin-top: 22px;
    padding-top: 18px;
    border-top: 1px solid var(--maroon-border);
}

.dh-info {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.2rem;
}

.dh-info-label {
    font-size: .74rem;
    color: var(--text-dim);
}

.dh-info-value {
    font-size: .9rem;
    font-weight: 700;
    color: #fff;
}

.map-preview {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--card-border);
    margin: 18px 0 0;
}

.map-preview img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    display: block;
}

.map-preview .no-thumb {
    background: linear-gradient(120deg, var(--maroon-1), var(--maroon-2));
}

.map-preview-info {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 18px;
    background: linear-gradient(0deg, rgba(0, 0, 0, .75), transparent);
}

.map-preview-name {
    color: #fff;
    font-weight: 700;
    text-transform: uppercase;
    font-size: .85rem;
    letter-spacing: .4px;
}

.map-preview-occ {
    color: #f1e4d8;
    font-size: .85rem;
    font-weight: 600;
}

table.players {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

table.players th, table.players td {
    text-align: left;
    padding: 10px 14px;
    border-bottom: 1px solid var(--card-border);
    font-size: .9rem;
}

table.players th { color: var(--text-dim); font-weight: 600; }
table.players tr:last-child td { border-bottom: none; }

.empty-state {
    color: var(--text-dim);
    text-align: center;
    padding: 30px;
}

/* Auth / admin */
.auth-box {
    max-width: 380px;
    margin: 80px auto;
    background: var(--card);
    border: 1px solid var(--card-border);
    border-radius: var(--radius);
    padding: 30px;
}

.auth-box h2 { margin-top: 0; }

.field { margin-bottom: 16px; }

.field label {
    display: block;
    margin-bottom: 6px;
    font-size: .85rem;
    color: var(--text-dim);
    font-weight: 600;
}

.field input[type=text],
.field input[type=email],
.field input[type=password],
.field textarea {
    width: 100%;
    background: var(--bg-alt);
    border: 1px solid var(--card-border);
    color: var(--text);
    padding: 10px 12px;
    border-radius: 8px;
    font-size: .95rem;
    font-family: inherit;
}

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

.error-text { color: var(--red); font-size: .82rem; margin-top: 6px; }

.flash-success {
    background: rgba(62, 207, 106, .12);
    color: var(--green);
    border: 1px solid rgba(62, 207, 106, .3);
    padding: 10px 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: .9rem;
}

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

.admin-table th, .admin-table td {
    padding: 12px 14px;
    border-bottom: 1px solid var(--card-border);
    text-align: left;
    font-size: .9rem;
}

.admin-table th { color: var(--text-dim); }

.badge {
    font-size: .75rem;
    font-weight: 700;
    padding: 3px 9px;
    border-radius: 20px;
}

.badge.published { background: rgba(62, 207, 106, .12); color: var(--green); }
.badge.draft { background: rgba(139, 147, 167, .15); color: var(--text-dim); }

.admin-actions { display: flex; gap: 8px; }
.admin-actions form { display: inline; }

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

/* Footer */
.site-footer {
    border-top: 1px solid var(--card-border);
    margin-top: 60px;
    padding: 26px 0;
    color: var(--text-dim);
    font-size: .85rem;
    text-align: center;
}

.checkbox-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 18px;
}

.checkbox-row input { width: auto; }

@media (max-width: 640px) {
    .site-header .bar { flex-direction: column; gap: 14px; align-items: flex-start; }
    .hero h1 { font-size: 1.7rem; }
}
