/* game.css — unified game site stylesheet — warm theme */

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

body {
    background: #f5ede0;
    color: #2e2018;
    font-family: monospace;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* ── HEADER ── */
.site-header {
    background: #1a1008;
    border-bottom: 1px solid #100a04;
    padding: 0 20px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
    gap: 16px;
}
.site-brand {
    font-size: .9rem;
    font-weight: bold;
    color: #f0e0c8;
    text-decoration: none;
    white-space: nowrap;
}
.site-brand span { color: #e8820a; }
.site-nav {
    display: flex;
    gap: 2px;
    flex-wrap: wrap;
}
.site-nav a {
    color: rgba(240,224,200,.55);
    text-decoration: none;
    padding: 5px 12px;
    border-radius: 4px;
    font-size: .8rem;
    transition: background .12s, color .12s;
}
.site-nav a:hover { background: rgba(255,255,255,.1); color: #f0e0c8; }
.site-nav a.active { background: #c85800; color: #fff; }

/* ── MAIN ── */
main {
    flex: 1;
    padding: 28px 20px 48px;
    max-width: 1100px;
    margin: 0 auto;
    width: 100%;
}

/* ── FOOTER ── */
.site-footer {
    background: #1a1008;
    border-top: 1px solid #100a04;
    padding: 14px 20px;
    text-align: center;
    font-size: .75rem;
    color: rgba(240,224,200,.3);
    flex-shrink: 0;
}

/* ── PAGE HERO ── */
.page-hero {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 4px 0 24px;
    border-bottom: 1px solid #e0ceb8;
    margin-bottom: 24px;
}
.page-hero img {
    width: 48px;
    height: 48px;
    object-fit: contain;
    border-radius: 4px;
}
.page-hero h1 { margin: 0; color: #1a0e04; font-size: 1.1rem; }
.page-hero p  { margin: 4px 0 0; font-size: .8rem; color: #9a8270; }

/* ── HUB GRID ── */
.hub-intro { color: #9a8270; font-size: .82rem; margin: 0 0 22px; }
.hub-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 14px;
}
.hub-card {
    background: #fff8f0;
    border: 1px solid #e0ceb8;
    border-radius: 8px;
    padding: 24px 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    text-decoration: none;
    transition: border-color .15s, transform .15s, box-shadow .15s;
    cursor: pointer;
}
.hub-card:hover {
    border-color: #c85800;
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(200,88,0,.12);
}
.hub-icon { font-size: 1.8rem; line-height: 1; }
.hub-card h2 { margin: 0; color: #1a0e04; font-size: .95rem; }
.hub-card p  { margin: 0; font-size: .78rem; color: #9a8270; flex: 1; line-height: 1.5; }
.hub-arrow   { color: #c85800; font-size: .8rem; align-self: flex-start; }

/* ── SECTION HEADINGS ── */
.section-head {
    font-size: .85rem;
    color: #1a0e04;
    border-bottom: 1px solid #e0ceb8;
    padding-bottom: 8px;
    margin: 28px 0 14px;
}
.section-head span { color: #c85800; }

/* ── GENERIC CARDS ── */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 14px;
}
.card {
    background: #fff8f0;
    border: 1px solid #e0ceb8;
    border-radius: 6px;
    padding: 18px;
}
.card h3 { margin: 0 0 8px; color: #1a0e04; font-size: .88rem; }
.card h4 { margin: 10px 0 4px; color: #3a2818; font-size: .82rem; }
.card p   { font-size: .8rem; color: #7a6455; line-height: 1.5; margin: 0 0 6px; }
.card li  { font-size: .8rem; color: #7a6455; line-height: 1.6; }
.card ul, .card ol { margin: 6px 0; padding-left: 18px; }
.card a   { color: #c85800; }
.card img { width: 100%; border-radius: 4px; margin: 8px 0; max-height: 160px; object-fit: cover; }
.card table { width: 100%; border-collapse: collapse; margin-top: 8px; font-size: .8rem; }
.card table th, .card table td { padding: 5px 10px; border: 1px solid #e0ceb8; text-align: left; color: #2e2018; }
.card table th { background: #f0e4d4; color: #1a0e04; }

/* ── SERVER BANNERS ── */
.server-banners {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 12px;
    margin-top: 4px;
}
.server-banner {
    border: 1px solid #e0ceb8;
    border-radius: 6px;
    overflow: hidden;
    cursor: pointer;
    transition: border-color .12s, box-shadow .12s;
    position: relative;
    background: #fff8f0;
}
.server-banner:hover {
    border-color: #c85800;
    box-shadow: 0 2px 10px rgba(200,88,0,.15);
}
.server-banner img { width: 100%; display: block; }
.copy-hint {
    position: absolute;
    bottom: 6px;
    right: 8px;
    font-size: .68rem;
    color: rgba(255,255,255,.8);
    background: rgba(0,0,0,.55);
    padding: 2px 7px;
    border-radius: 3px;
    pointer-events: none;
}

/* ── SERVER STATUS ── */
.server-status-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
    margin-top: 4px;
}
.status-card {
    background: #fff8f0;
    border: 1px solid #e0ceb8;
    border-radius: 6px;
    padding: 16px;
}
.status-card h3  { margin: 0 0 4px; font-size: .85rem; color: #1a0e04; }
.status-card .addr { font-size: .72rem; color: #9a8270; margin: 0 0 10px; word-break: break-all; }
.status-info { font-size: .75rem; color: #7a6455; margin-top: 8px; line-height: 1.5; min-height: 18px; }
.status-info .online  { color: #2a7a2a; }
.status-info .offline { color: #a02828; }

/* ── BUTTONS ── */
.btn {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 4px;
    border: 1px solid #d8c4ac;
    cursor: pointer;
    font-size: .8rem;
    font-family: monospace;
    text-decoration: none;
    background: #f0e4d4;
    color: #3a2818;
    transition: background .12s, border-color .12s;
}
.btn:hover { background: #e4d4c0; border-color: #c8b49a; color: #1a0e04; }
.btn-primary { background: #c85800; color: #fff; border-color: #c85800; }
.btn-primary:hover { background: #a84600; border-color: #a84600; }

/* ── MC CONTROLS ── */
.mc-controls {
    background: #fff8f0;
    border: 1px solid #e0ceb8;
    border-radius: 6px;
    padding: 16px;
}
.mc-controls-btns { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 4px; }
.mc-note   { font-size: .78rem; color: #7a6455; line-height: 1.5; margin: 0; }
.mc-note a { color: #c85800; }
.mc-status { font-size: .78rem; color: #9a8270; min-height: 18px; }

/* ── VIDEO GRID ── */
.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 16px;
    margin-top: 4px;
}
.video-label { font-size: .78rem; color: #9a8270; margin: 0 0 8px; }
.video-wrap  { position: relative; padding-bottom: 56.25%; border-radius: 6px; overflow: hidden; }
.video-wrap iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: 0; }

/* ── CHIP LINKS ── */
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.chip {
    background: #fff0e4;
    border: 1px solid #ddd0bc;
    color: #7a6455;
    padding: 5px 12px;
    border-radius: 4px;
    font-size: .78rem;
    text-decoration: none;
    transition: border-color .12s, color .12s, background .12s;
}
.chip:hover { border-color: #c85800; color: #1a0e04; background: #fce8d4; }

/* ── TOAST ── */
#toast {
    display: none;
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    background: #c85800;
    color: #fff;
    padding: 8px 20px;
    border-radius: 6px;
    font-size: .8rem;
    z-index: 999;
    white-space: nowrap;
}

/* ── NEWS ── */
.news-filters {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin: 0 0 20px;
}
.news-filter-btn {
    background: #fff8f0;
    border: 1px solid #e0ceb8;
    color: #7a6455;
    padding: 5px 14px;
    border-radius: 4px;
    font-size: .8rem;
    font-family: monospace;
    cursor: pointer;
    transition: background .12s, border-color .12s, color .12s;
}
.news-filter-btn:hover { background: #f0e4d4; color: #1a0e04; border-color: #c8b49a; }
.news-filter-btn.active { background: #c85800; color: #fff; border-color: #c85800; }

.news-card {
    background: #fff8f0;
    border: 1px solid #e0ceb8;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 12px;
    cursor: pointer;
    transition: border-color .15s, box-shadow .15s;
}
.news-card:hover {
    border-color: #c85800;
    box-shadow: 0 3px 12px rgba(200,88,0,.1);
}
.news-card-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}
.news-cat-badge {
    font-size: .7rem;
    color: #fff;
    padding: 2px 8px;
    border-radius: 3px;
    font-weight: bold;
    letter-spacing: .03em;
    text-transform: uppercase;
}
.news-date { font-size: .75rem; color: #9a8270; }
.news-card-title {
    margin: 0 0 6px;
    font-size: .95rem;
    color: #1a0e04;
    line-height: 1.35;
}
.news-card-summary {
    font-size: .82rem;
    color: #7a6455;
    line-height: 1.55;
    margin: 0 0 10px;
}
.news-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.news-tag {
    background: #f0e4d4;
    border: 1px solid #ddd0bc;
    color: #7a6455;
    font-size: .7rem;
    padding: 2px 8px;
    border-radius: 3px;
}
.news-read-more { font-size: .78rem; color: #c85800; }

.news-back-btn {
    background: none;
    border: none;
    color: #c85800;
    font-family: monospace;
    font-size: .82rem;
    cursor: pointer;
    padding: 0;
    margin-bottom: 20px;
    display: block;
}
.news-back-btn:hover { text-decoration: underline; }
.news-article-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.news-article-title {
    margin: 0 0 10px;
    font-size: 1.1rem;
    color: #1a0e04;
    line-height: 1.3;
}
.news-article-content {
    font-size: .85rem;
    color: #3a2818;
    line-height: 1.7;
    max-width: 720px;
}
.news-article-content h4 {
    margin: 20px 0 6px;
    color: #1a0e04;
    font-size: .88rem;
    border-bottom: 1px solid #e0ceb8;
    padding-bottom: 4px;
}
.news-article-content p { margin: 0 0 12px; }
.news-article-content code {
    background: #f0e4d4;
    padding: 1px 5px;
    border-radius: 3px;
    font-size: .82rem;
    color: #8a3800;
}

/* ── NEWS INDEX SECTION ── */
.news-index-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 12px;
}
.news-index-card {
    background: #fff8f0;
    border: 1px solid #e0ceb8;
    border-radius: 6px;
    padding: 16px;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    gap: 6px;
    transition: border-color .15s;
}
.news-index-card:hover { border-color: #c85800; }
.news-index-card .news-cat-badge { align-self: flex-start; }
.news-index-card h3 { margin: 0; font-size: .88rem; color: #1a0e04; line-height: 1.3; }
.news-index-card p { margin: 0; font-size: .78rem; color: #7a6455; line-height: 1.5; flex: 1; }
.news-index-card .news-read-more { font-size: .75rem; }

/* ── MOBILE ── */
@media (max-width: 560px) {
    .site-header { padding: 0 12px; height: 44px; }
    .site-nav a  { padding: 4px 8px; font-size: .75rem; }
    main { padding: 16px 12px 32px; }
    .hub-grid { grid-template-columns: 1fr 1fr; }
    .video-grid { grid-template-columns: 1fr; }
}
@media (max-width: 380px) {
    .hub-grid { grid-template-columns: 1fr; }
}
