:root {
    /* ZMIENIONE KOLORY: Zieleń i czerwień są ciemniejsze, mniej agresywne dla oczu */
    --bg: #050505; 
    --panel: #0f0f0f; 
    --red: #cc0000; 
    --green: #00cc44; 
    --gold: #ffb020; 
    --text: #e0e0e0; 
    --muted: #888; 
    --border: #222;
    --font-head: 'Chakra Petch', sans-serif; 
    --font-mono: 'Share Tech Mono', monospace; 
    --font-body: 'Inter', sans-serif;
    --radius: 8px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { background: var(--bg); color: var(--text); font-family: var(--font-body); line-height: 1.6; background-image: linear-gradient(rgba(255,0,0,.03) 1px, transparent 1px), linear-gradient(90deg, rgba(255,0,0,.03) 1px, transparent 1px); background-size: 30px 30px; overflow-x: hidden; }
a { color: var(--green); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }
.container { max-width: 1000px; margin: 0 auto; padding: 20px; }
code { font-family: var(--font-mono); background: #1a1a1a; padding: 1px 5px; border-radius: 4px; color: var(--green); font-size: 0.9em; }
h1, h2, h3 { font-family: var(--font-head); text-transform: uppercase; letter-spacing: 1px; }
.page-title { font-size: 2.2rem; text-align: center; margin-bottom: 5px; }
.page-subtitle { font-family: var(--font-mono); text-align: center; color: var(--muted); margin-bottom: 40px; font-size: 0.9rem; }
#site-logo { max-height: 50px; width: auto; object-fit: contain; display: block; margin: 0 auto 20px auto; }

/* OGŁOSZENIA */
#global-ann-bar { background: #000; border-bottom: 1px solid var(--border); padding: 10px 0; margin-bottom: 20px; }
.ann-item { background: var(--panel); border: 1px solid var(--border); border-left: 4px solid var(--red); border-radius: var(--radius); padding: 15px 20px; display: flex; flex-direction: column; gap: 10px; margin-bottom: 10px; }
.ann-header { display: flex; justify-content: space-between; align-items: center; border-bottom: 1px dashed #333; padding-bottom: 10px; }
.ann-author { display: flex; align-items: center; gap: 10px; font-weight: bold; color: var(--text); font-family: var(--font-head); }
.ann-author img { width: 24px; height: 24px; border-radius: 50%; }
.ann-meta { font-family: var(--font-mono); font-size: 0.8rem; color: var(--muted); display: flex; gap: 15px; }
.ann-timer { color: var(--red); font-weight: bold; }
.ann-content { font-size: 0.95rem; line-height: 1.7; color: #ddd; }
.ann-content p { margin-bottom: 8px; } .ann-content p:last-child { margin-bottom: 0; }
.ann-banner { width: 100%; max-height: 250px; object-fit: cover; border-radius: 4px; margin-top: 10px; border: 1px solid var(--border); }
.ann-actions { display: none; gap: 10px; justify-content: flex-end; margin-top: 10px; }
body.is-owner .ann-actions { display: flex; }

/* PRZYCISKI */
.btn { display: inline-flex; align-items: center; justify-content: center; padding: 10px 20px; font-family: var(--font-head); font-weight: 700; text-transform: uppercase; border: 1px solid transparent; border-radius: var(--radius); cursor: pointer; transition: all .2s; font-size: 0.85rem; text-align: center; }
.btn-primary { background: var(--red); color: #fff; box-shadow: 0 0 10px rgba(255,0,0,0.3); }
.btn-primary:hover { background: #990000; box-shadow: 0 0 20px rgba(255,0,0,0.6); transform: translateY(-2px); text-decoration: none; }
.btn-outline { border-color: var(--border); color: var(--text); background: transparent; }
.btn-outline:hover { border-color: var(--green); color: var(--green); text-decoration: none; }
.btn-sm { padding: 6px 12px; font-size: 0.75rem; }
.btn-discord { background: #5865F2; color: #fff; border: none; }
.btn-discord:hover { background: #4752C4; text-decoration: none; transform: translateY(-2px); }

/* REGULAMIN */
.rules-container { background: var(--panel); padding: 30px; border: 1px solid var(--border); border-radius: var(--radius); }
.rule-category { margin-bottom: 30px; }
.rule-category:last-child { margin-bottom: 0; }
.rule-category h3 { color: var(--red); border-bottom: 1px solid var(--border); padding-bottom: 10px; margin-bottom: 15px; font-size: 1.3rem; }
.rule-line { font-size: 0.95rem; color: #ccc; padding: 8px 0; border-bottom: 1px dashed #222; display: flex; gap: 10px; }
.rule-line:last-child { border-bottom: none; }
.rule-line::before { content: '>'; color: var(--green); font-weight: bold; font-family: var(--font-mono); }

/* SERWERY */
.server-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 20px; margin-bottom: 40px; }
.server-card { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); display: flex; flex-direction: column; transition: transform .2s, border-color .2s; overflow: hidden; }
.server-card:hover { transform: translateY(-3px); border-color: #444; }
.server-banner { width: 100%; height: 140px; object-fit: cover; display: block; border-bottom: 1px solid var(--border); }
.server-info { padding: 20px; flex: 1; display: flex; flex-direction: column; }
.server-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 20px; gap: 10px; flex-wrap: wrap; }
.server-title-group { display: flex; align-items: center; gap: 15px; }
.server-thumbnail { width: 48px; height: 48px; border-radius: 12px; object-fit: cover; background: #222; flex-shrink: 0; border: 1px solid #333; }
.server-name { font-family: var(--font-head); font-size: 1.2rem; }
.server-status { padding: 3px 10px; border-radius: 4px; font-size: 0.75rem; font-family: var(--font-mono); font-weight: bold; text-transform: uppercase; white-space: nowrap; }
.status-active { color: var(--green); border: 1px solid var(--green); background: rgba(0,255,0,0.05); }
.status-wip { color: var(--gold); border: 1px solid var(--gold); background: rgba(255,176,32,0.05); }
.status-offline { color: var(--red); border: 1px solid var(--red); background: rgba(255,0,0,0.05); }
.server-ip-box { display: flex; gap: 10px; margin-bottom: 15px; }
.server-ip-box input { background: #000; border: 1px solid var(--border); color: var(--green); padding: 8px 12px; font-family: var(--font-mono); border-radius: 4px; width: 100%; outline: none; }
.server-actions { display: none; gap: 10px; margin-top: auto; border-top: 1px solid var(--border); padding-top: 15px; }
body.is-owner .server-actions { display: flex; }

/* PREMIUM */
.premium-wrapper { display: flex; flex-wrap: wrap; gap: 30px; justify-content: center; margin-bottom: 50px; }
.premium-card { width: 100%; max-width: 380px; background: #090909; border: 1px solid var(--border); border-radius: var(--radius); padding: 35px; position: relative; overflow: hidden; box-shadow: 0 10px 30px rgba(0,0,0,0.5); }
.premium-card.vip { border-top: 3px solid var(--gold); }
.premium-card.svip { border-top: 3px solid var(--red); }
.premium-title { font-family: var(--font-head); font-size: 2rem; margin-bottom: 5px; text-transform: uppercase; letter-spacing: 1px; }
.premium-card.vip .premium-title { color: var(--gold); text-shadow: 0 0 15px rgba(255,176,32,0.3); }
.premium-card.svip .premium-title { color: var(--red); text-shadow: 0 0 15px rgba(255,0,0,0.3); }
.premium-price { font-family: var(--font-mono); font-size: 1.2rem; color: var(--text); margin-bottom: 25px; padding-bottom: 25px; border-bottom: 1px dashed var(--border); }
.premium-list { list-style: none; font-size: 0.95rem; }
.premium-list li { margin-bottom: 15px; padding-left: 25px; position: relative; color: #ccc; line-height: 1.5; }
.premium-list li::before { content: '✓'; position: absolute; left: 0; color: var(--green); font-weight: bold; font-family: var(--font-mono); }
.premium-list ul { list-style: none; margin-top: 8px; margin-left: 0; font-size: 0.85rem; color: var(--muted); }
.premium-list ul li { padding-left: 14px; margin-bottom: 6px; }
.premium-list ul li::before { content: '■'; color: var(--red); font-size: 0.6rem; top: 4px; left: 0; }

/* REKRUTACJE */
.rec-grid { display: flex; flex-direction: column; gap: 20px; }
.rec-card { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); border-left: 4px solid var(--green); padding: 25px; }
.rec-title { font-family: var(--font-head); font-size: 1.4rem; margin-bottom: 10px; }
.rec-desc { color: #ccc; margin-bottom: 20px; font-size: 0.95rem; line-height: 1.7; }
.rec-actions { display: none; gap: 10px; border-top: 1px solid var(--border); padding-top: 15px; }
body.is-owner .rec-actions { display: flex; }

/* CHANGELOG */
.changelog-list { display: flex; flex-direction: column; gap: 15px; }
.changelog-card { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 25px; cursor: pointer; transition: border-color .2s; }
.changelog-card:hover { border-color: var(--red); }
.changelog-meta { display: flex; justify-content: space-between; font-family: var(--font-mono); font-size: 0.85rem; color: var(--muted); margin-bottom: 15px; flex-wrap: wrap; gap: 10px; }
.changelog-content h1, .changelog-content h2, .changelog-content h3 { color: var(--green); margin-top: 20px; margin-bottom: 10px; }
.changelog-content p { margin-bottom: 12px; font-size: 0.95rem; }
.changelog-content ul, .changelog-content ol { margin-top: 10px; margin-bottom: 15px; padding-left: 24px; margin-left: 0; }
.changelog-content li { margin-bottom: 8px; line-height: 1.6; font-size: 0.95rem; padding-left: 4px; }
.changelog-content li p { margin-bottom: 0; }
.changelog-content a { color: var(--green); text-decoration: underline; }
.changelog-content code { background: #222; padding: 2px 6px; border-radius: 4px; font-family: var(--font-mono); font-size: 0.85rem; color: var(--green); }

/* ADMIN TEAM */
#team-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 20px; }
.role-card { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; border-top: 3px solid var(--role-color, var(--red)); }
.role-header { display: flex; align-items: center; margin-bottom: 15px; border-bottom: 1px solid var(--border); padding-bottom: 10px; font-family: var(--font-head); font-size: 1.05rem; color: var(--text); }
.member { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; padding: 6px; border-radius: 4px; background: rgba(255,255,255,0.02); }
.member img { width: 32px; height: 32px; border-radius: 50%; }

/* MODAL & TOAST */
.modal-backdrop { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.85); backdrop-filter: blur(5px); z-index: 10000; align-items: center; justify-content: center; padding: 15px; }
.modal-backdrop.open { display: flex; }
.modal-content { background: var(--panel); border: 1px solid var(--border); border-top: 3px solid var(--red); border-radius: var(--radius); padding: 30px; width: 100%; max-width: 500px; max-height: 90vh; overflow-y: auto; }
.modal-content h2 { font-family: var(--font-head); color: var(--red); margin-bottom: 20px; }
.form-group { margin-bottom: 20px; }
.form-group label { display: block; font-family: var(--font-mono); font-size: 0.85rem; margin-bottom: 8px; color: var(--text); }
.form-group input, .form-group textarea, .form-group select { width: 100%; background: #050505; border: 1px solid var(--border); padding: 12px; color: #fff; border-radius: 4px; font-family: var(--font-body); font-size: 0.95rem; }
.form-group input[type="file"] { padding: 8px; font-family: var(--font-mono); font-size: 0.85rem; }
.form-group input:focus, .form-group textarea:focus { outline: none; border-color: var(--red); box-shadow: 0 0 0 2px rgba(255,0,0,0.2); }
.modal-actions { display: flex; gap: 10px; margin-top: 25px; }
.toast-container { position: fixed; bottom: 20px; right: 20px; z-index: 11000; display: flex; flex-direction: column; gap: 10px; }
.toast { background: #000; border: 1px solid var(--green); color: #fff; padding: 12px 20px; border-radius: var(--radius); font-family: var(--font-mono); font-size: 0.9rem; }

/* GLOBALNY WIDGET LOGOWANIA */
.global-auth-widget {
    position: fixed; top: 20px; right: 20px; z-index: 9999;
    background: var(--panel); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 6px 12px;
    display: flex; align-items: center; gap: 15px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.5); font-family: var(--font-mono); font-size: 0.85rem;
}
.auth-btn { background: var(--green); color: #000; padding: 8px 16px; border-radius: 4px; font-weight: bold; text-decoration: none; font-family: var(--font-head); transition: 0.2s; }
.auth-btn:hover { background: #00aa33; text-decoration: none; transform: translateY(-2px); }
.auth-user { display: flex; align-items: center; gap: 8px; color: var(--text); font-weight: bold; }
.auth-user img { width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--green); }
.auth-link { color: var(--red); text-decoration: none; }
.auth-link:hover { text-decoration: underline; }

@media (max-width: 768px) {
    .page-title { font-size: 1.8rem; }
    .rules-container { padding: 20px; }
    .rule-line { font-size: 0.9rem; }
    .premium-card { max-width: 100%; padding: 25px; }
    .premium-title { font-size: 1.6rem; }
    .server-header { flex-direction: column; align-items: flex-start; gap: 15px; }
    .server-title-group { width: 100%; }
    .server-status { align-self: flex-start; }
    .modal-content { padding: 20px; }
    #site-logo { max-height: 40px; }
    .global-auth-widget { top: 10px; right: 10px; padding: 4px 8px; font-size: 0.75rem; }
    .auth-user span { display: none; }
}