/* Theme matched to qgshosting.com (Quality Game Servers) */
:root {
    --bg: #0b1120;          /* page navy */
    --surface: #141a29;     /* cards / panels */
    --surface-2: #1b2233;   /* inputs / thumbs */
    --header-bg: #14141d;   /* top nav */
    --border: rgba(255, 255, 255, .09);
    --text: #e7e9ee;
    --muted: rgba(255, 255, 255, .6);
    --accent: #029df6;      /* QGS blue */
    --accent-2: #0b86cf;    /* blue hover */
    --green: #00ae48;       /* QGS green */
    --green-2: #019a40;
    --red: #e05656;
    --radius: 5px;
    --radius-lg: 8px;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: "Fira Sans", "Segoe UI", Roboto, system-ui, sans-serif;
    line-height: 1.55;
}

/* bright accent bar across the very top, like QGS */
body::before {
    content: "";
    display: block;
    height: 3px;
    background: var(--accent);
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-2); }

.wrap { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 20px; }

/* Header */
.site-header {
    background: var(--header-bg);
    border-bottom: 1px solid var(--border);
    position: sticky; top: 0; z-index: 10;
}
.site-header .wrap {
    display: flex; align-items: center; justify-content: space-between;
    height: 64px;
}
.logo { display: flex; align-items: center; gap: 9px; font-size: 1.15rem; font-weight: 700; color: #fff; letter-spacing: .3px; }
.logo:hover { color: #fff; }
.logo-mark {
    background: var(--accent); color: #fff;
    padding: 3px 9px; border-radius: var(--radius); font-weight: 800; letter-spacing: .5px;
}
.site-header nav { display: flex; align-items: center; gap: 18px; }
.site-header nav > a { color: #fff; font-weight: 600; font-size: .9rem; }
.site-header nav > a.btn { color: #fff; }
.site-header nav > a:hover { color: var(--accent); }
.nav-user {
    color: var(--muted); font-size: .85rem; max-width: 180px;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.nav-muted { color: var(--muted) !important; font-weight: 500 !important; font-size: .85rem; }
.nav-muted:hover { color: var(--accent) !important; }

/* Buttons — QGS style: uppercase, 700, 5px radius */
.btn {
    display: inline-block; background: var(--accent); color: #fff;
    padding: 11px 20px; border-radius: var(--radius); font-weight: 700;
    text-transform: uppercase; letter-spacing: .4px; font-size: .85rem;
    border: none; cursor: pointer; transition: background .15s;
}
.btn:hover { background: var(--accent-2); color: #fff; }
.btn-sm { padding: 8px 15px; font-size: .78rem; }
.btn-lg { padding: 14px 26px; font-size: .95rem; }
.btn-green { background: var(--green); }
.btn-green:hover { background: var(--green-2); }
.btn-ghost { background: transparent; color: var(--text); border: 1px solid var(--border); }
.btn-ghost:hover { background: var(--surface-2); color: #fff; }

main.wrap { padding-top: 30px; padding-bottom: 64px; }

h1 { font-size: 1.7rem; font-weight: 700; margin: 0 0 20px; }

/* Page head + search */
.page-head {
    display: flex; align-items: center; justify-content: space-between;
    gap: 16px; flex-wrap: wrap; margin-bottom: 26px;
}
.page-head h1 { margin: 0; }
.search { display: flex; gap: 8px; }
.search input {
    background: var(--surface-2); border: 1px solid var(--border); color: var(--text);
    padding: 9px 13px; border-radius: var(--radius); min-width: 200px;
}
.search input:focus { outline: none; border-color: var(--accent); }

/* Grid of cards — 2 compact columns */
.grid {
    display: grid; gap: 14px;
    grid-template-columns: repeat(2, 1fr);
}
.card {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius-lg); overflow: hidden; color: var(--text);
    display: flex; flex-direction: row; transition: transform .12s, border-color .12s;
}
.card:hover { transform: translateY(-2px); border-color: var(--accent); color: var(--text); }
.card-thumb { flex: 0 0 130px; width: 130px; aspect-ratio: 16 / 10; background: var(--surface-2); overflow: hidden; }
.card-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.no-thumb {
    width: 100%; height: 100%; display: flex; align-items: center; justify-content: center;
    color: var(--muted); font-size: .8rem;
}
.card-body { padding: 10px 13px; display: flex; flex-direction: column; gap: 6px; flex: 1; min-width: 0; }
.card-body h3 { margin: 0; font-size: .95rem; font-weight: 600; word-break: break-word; }
.card-meta { display: flex; gap: 14px; color: var(--muted); font-size: .76rem; }
.card-dl { text-align: center; margin-top: auto; padding: 7px 10px; }
.review-file { font-size: .85rem; }

@media (max-width: 560px) {
    .grid { grid-template-columns: 1fr; }
}

/* Empty state */
.empty { text-align: center; padding: 72px 20px; color: var(--muted); }
.empty p { margin-bottom: 18px; font-size: 1.05rem; }

/* Alerts */
.alert { padding: 14px 18px; border-radius: var(--radius); margin-bottom: 22px; }
.alert-error { background: rgba(224,86,86,.12); border: 1px solid var(--red); color: #ffb4ac; }
.alert-error ul { margin: 0; padding-left: 20px; }
.alert-ok { background: rgba(0,174,72,.14); border: 1px solid var(--green); color: #a9e9bf; }
.alert-warn { background: rgba(244,165,49,.13); border: 1px solid #f4a531; color: #f6d4a0; }

/* Danger button + pill + badges */
.btn-danger { background: var(--red); }
.btn-danger:hover { background: #c94444; }
.pill {
    display: inline-block; min-width: 18px; padding: 1px 7px; border-radius: 999px;
    background: var(--accent); color: #fff; font-size: .72rem; font-weight: 700; text-align: center;
}
.badge {
    display: inline-block; padding: 2px 9px; border-radius: 999px;
    font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .3px;
}
.badge-approved { background: rgba(0,174,72,.18); color: #7fe0a0; }
.badge-pending  { background: rgba(244,165,49,.18); color: #f4c877; }
.badge-rejected { background: rgba(224,86,86,.18); color: #ffa9a1; }
.muted-text { color: var(--muted); }

/* Admin review list */
.admin-h2 { font-size: 1.15rem; margin: 30px 0 14px; display: flex; align-items: center; gap: 10px; }
.review-list { display: flex; flex-direction: column; gap: 14px; }
.review-row {
    display: grid; grid-template-columns: 150px 1fr auto; gap: 18px; align-items: center;
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 14px;
}
.review-thumb {
    width: 150px; aspect-ratio: 16/10; background: var(--surface-2); border-radius: var(--radius);
    overflow: hidden; display: flex; align-items: center; justify-content: center;
}
.review-thumb img { width: 100%; height: 100%; object-fit: cover; }
.review-info h3 { margin: 0 0 6px; font-size: 1.05rem; }
.review-meta { display: flex; flex-wrap: wrap; gap: 6px 14px; color: var(--muted); font-size: .8rem; }
.review-desc { margin: 8px 0 0; font-size: .88rem; color: var(--text); }
.review-actions form { display: flex; flex-direction: column; gap: 8px; }

/* Admin history table */
.admin-table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.admin-table th, .admin-table td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--border); }
.admin-table th { color: var(--muted); font-weight: 600; }

@media (max-width: 640px) {
    .review-row { grid-template-columns: 1fr; }
    .review-thumb { width: 100%; }
    .review-actions form { flex-direction: row; }
}

/* Form */
.form { max-width: 620px; }
.form-narrow { max-width: 420px; }
.form-alt { margin-top: 18px; color: var(--muted); font-size: .9rem; }
.form label { display: block; margin-bottom: 18px; font-weight: 600; }
.form input[type=text],
.form input[type=email],
.form input[type=password],
.form textarea,
.form input[type=file] {
    display: block; width: 100%; margin-top: 7px; font-weight: 400;
    background: var(--surface-2); border: 1px solid var(--border); color: var(--text);
    padding: 11px 13px; border-radius: var(--radius); font-family: inherit; font-size: .95rem;
}
.form input[type=file] { padding: 9px 12px; }
.form input:focus, .form textarea:focus { outline: none; border-color: var(--accent); }
.form textarea { resize: vertical; }
.form small { display: block; margin-top: 6px; color: var(--muted); font-weight: 400; }
.req { color: var(--accent); }
.form-actions { display: flex; gap: 12px; margin-top: 8px; }

/* Map detail */
.map-detail { display: grid; grid-template-columns: 1.3fr 1fr; gap: 30px; align-items: start; }
.map-gallery { display: flex; flex-direction: column; gap: 12px; }
.map-gallery a { display: block; }
.map-gallery img {
    width: 100%; max-width: 100%; height: auto;
    border-radius: var(--radius-lg); border: 1px solid var(--border);
    display: block;
}
.map-info h1 { margin-top: 0; }
.map-author { color: var(--muted); }
.map-stats {
    display: flex; flex-wrap: wrap; gap: 8px 16px; color: var(--muted);
    font-size: .88rem; margin: 14px 0; padding: 12px 0; border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}
.map-desc { margin: 18px 0; }
.orig-name { color: var(--muted); font-size: .82rem; margin-top: 10px; word-break: break-all; }
.back-link { color: var(--muted); }
.back-link:hover { color: var(--accent); }

/* Footer */
.site-footer {
    border-top: 1px solid var(--border); color: var(--muted);
    font-size: .85rem; padding: 26px 0; text-align: center;
}
.site-footer p { margin: 0 0 8px; }
.footer-lead { color: var(--text); font-weight: 600; font-size: .92rem; }
.footer-disclaimer { max-width: 640px; margin: 0 auto 8px; font-size: .78rem; line-height: 1.5; }
.footer-copy { color: var(--muted); font-size: .8rem; }

@media (max-width: 720px) {
    .map-detail { grid-template-columns: 1fr; }
}

/* --- Page title + pagination (added for 36/page listing) --- */
.page-title { font-size: 1.5rem; font-weight: 700; margin: 4px 0 2px; }
.page-sub { color: var(--muted); margin: 0 0 22px; font-size: .85rem; }

.pagination {
    display: flex; flex-wrap: wrap; gap: 6px; justify-content: center;
    margin: 30px 0 6px;
}
.page-link {
    display: inline-block; padding: 8px 13px; border: 1px solid var(--border);
    border-radius: 5px; color: var(--text); font-weight: 600; font-size: .85rem;
    background: var(--surface); transition: border-color .12s, color .12s;
}
.page-link:hover { border-color: var(--accent); color: var(--accent); }
.page-link.current { background: var(--accent); color: #fff; border-color: var(--accent); }
.page-gap { padding: 8px 4px; color: var(--muted); }

/* --- Search + type filter toolbar --- */
.toolbar {
    display: flex; flex-wrap: wrap; gap: 12px; align-items: center;
    justify-content: space-between; margin: 0 0 22px;
}
.search { display: flex; gap: 8px; }
.search input {
    background: var(--surface-2); border: 1px solid var(--border); color: var(--text);
    padding: 9px 13px; border-radius: 5px; min-width: 220px; font-family: inherit;
}
.search input:focus { outline: none; border-color: var(--accent); }
.type-filters { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
    display: inline-block; padding: 6px 12px; border: 1px solid var(--border);
    border-radius: 999px; color: var(--muted); font-size: .8rem; font-weight: 600;
    transition: border-color .12s, color .12s;
}
.chip:hover { border-color: var(--accent); color: var(--accent); }
.chip.active { background: var(--accent); color: #fff; border-color: var(--accent); }
.chip .chip-c { opacity: .7; font-weight: 400; }

/* --- Rent a server button --- */
.btn-rent { background: var(--green); }
.btn-rent:hover { filter: brightness(1.08); }

/* --- Promo modal --- */
.promo-modal {
    position: fixed; inset: 0; z-index: 1000; display: none;
    align-items: center; justify-content: center;
    background: rgba(0, 0, 0, .72); padding: 20px;
}
.promo-modal.open { display: flex; animation: promoFade .2s ease; }
@keyframes promoFade { from { opacity: 0; } to { opacity: 1; } }
.promo-box {
    background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
    max-width: 440px; width: 100%; overflow: hidden; position: relative;
    box-shadow: 0 24px 70px rgba(0, 0, 0, .55);
}
.promo-close {
    position: absolute; top: 8px; right: 10px; width: 34px; height: 34px;
    background: rgba(0, 0, 0, .45); color: #fff; border: none; border-radius: 50%;
    font-size: 1.4rem; line-height: 1; cursor: pointer; z-index: 2;
}
.promo-close:hover { background: rgba(0, 0, 0, .7); }
.promo-img-link { display: block; }
.promo-img-link img { width: 100%; display: block; }
.promo-body { padding: 22px 22px 24px; text-align: center; }
.promo-body h2 { margin: 0 0 8px; font-size: 1.3rem; }
.promo-body p { margin: 0; color: var(--muted); }
.promo-code {
    display: flex; gap: 8px; align-items: center; justify-content: center; margin: 16px 0;
}
.promo-code span {
    font-family: monospace; font-size: 1.2rem; font-weight: 700; letter-spacing: 2px;
    background: var(--surface-2); border: 1px dashed var(--accent); color: var(--accent);
    padding: 8px 16px; border-radius: 6px;
}
.promo-copy {
    background: var(--surface-2); border: 1px solid var(--border); color: var(--text);
    border-radius: 6px; padding: 9px 14px; cursor: pointer; font-weight: 600;
}
.promo-copy:hover { border-color: var(--accent); }
.promo-cta { margin-top: 4px; }

/* --- Filters toolbar (search + type + sort dropdowns) --- */
.toolbar .filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.toolbar input[type="search"],
.toolbar select {
    background: var(--surface-2); border: 1px solid var(--border); color: var(--text);
    padding: 9px 13px; border-radius: 5px; font-family: inherit; font-size: .9rem;
}
.toolbar input[type="search"] { min-width: 210px; }
.toolbar input[type="search"]:focus,
.toolbar select:focus { outline: none; border-color: var(--accent); }
.toolbar select {
    cursor: pointer; padding-right: 30px; appearance: none; -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath fill='%238a94a3' d='M0 0l5 6 5-6z'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 11px center;
}
.filters-reset { color: var(--muted); font-size: .85rem; align-self: center; }
.filters-reset:hover { color: var(--accent); }

/* --- Promo modal restyled like the Pterodactyl / QGS control panel --- */
.promo-modal { background: rgba(2, 6, 14, .82); }
.promo-box {
    background: #0e1522;                         /* dark navy panel */
    border: 3px solid #2092ff;                  /* bright QGS blue border */
    border-radius: 8px;
    max-width: 470px;
    box-shadow: 0 0 26px rgba(32, 146, 255, .35), 0 24px 70px rgba(0, 0, 0, .65);
}
.promo-close {
    top: 12px; right: 12px; width: 40px; height: 40px; border-radius: 6px;
    background: #2092ff; color: #fff; font-size: 1.5rem; opacity: .95;
}
.promo-close:hover { background: #1b82e6; opacity: 1; }
.promo-body { padding: 24px 24px 26px; }
.promo-body h2 { color: #eef3fa; font-weight: 800; font-size: 1.35rem; }
.promo-body p { color: #9fb0c4; }
.promo-code { margin: 18px 0; }
.promo-box .promo-code span {
    background: #0a0f19; border: 1px dashed #2092ff; color: #57c0ff;
    font-size: 1.25rem;
}
.promo-box .promo-copy {
    background: #0a0f19; border: 1px solid #26344a; color: #cdd6e2;
    text-transform: uppercase; font-size: .78rem; letter-spacing: .5px; font-weight: 700;
}
.promo-box .promo-copy:hover { border-color: #2092ff; color: #fff; }
.promo-box .promo-cta {
    background: #2092ff; color: #fff; text-transform: uppercase;
    letter-spacing: .5px; font-weight: 700; border-radius: 6px; padding: 13px 26px;
}
.promo-box .promo-cta:hover { background: #1b82e6; }

.promo-box { max-height: 92vh; overflow-y: auto; }
