/* core/static/css/style.css */
:root {
    --bg-main: #141518;
    --bg-card: #1f2126;
    --bg-header: #0d0e10;
    --accent-amber: #d97724;
    --wr-high: #2ecc71;
    --wr-mid: #a4b0be;
    --wr-low: #e74c3c;
    --text-primary: #f1f2f6;
    --text-muted: #9599a6;
    --border-color: #2f323a;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body {
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-main);
    color: var(--text-primary);
    line-height: 1.5;
}
a { color: var(--accent-amber); text-decoration: none; }
a:hover { text-decoration: underline; }

.navbar {
    background-color: var(--bg-header);
    border-bottom: 1px solid var(--border-color);
    padding: 0.9rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}
.brand {
    font-size: 1.4rem;
    font-weight: 800;
    color: #fff;
    letter-spacing: 1px;
}
.brand span { color: var(--accent-amber); }
.nav-links { display: flex; align-items: center; gap: 1.2rem; }
.container { max-width: 1180px; margin: 1.8rem auto; padding: 0 1.2rem; }

.card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.25rem;
    margin-bottom: 1.25rem;
}

.search-bar {
    display: flex;
    gap: 0.6rem;
    margin-bottom: 1.2rem;
}
.search-bar input, textarea, select {
    width: 100%;
    background: #141518;
    border: 1px solid var(--border-color);
    color: #fff;
    padding: 0.65rem 0.9rem;
    border-radius: 6px;
}
.btn {
    background-color: var(--accent-amber);
    color: #fff;
    border: none;
    padding: 0.55rem 1.1rem;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    display: inline-block;
}
.btn-outline {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-muted);
}
.btn-outline.active, .btn-outline:hover {
    border-color: var(--accent-amber);
    color: #fff;
    background: rgba(217, 119, 36, 0.2);
    text-decoration: none;
}

.filter-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
    align-items: center;
}

.champ-table {
    width: 100%;
    border-collapse: collapse;
}
.champ-table th, .champ-table td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border-color);
    text-align: left;
}
.champ-table th { color: var(--text-muted); font-size: 0.85rem; text-transform: uppercase; }
.champ-cell { display: flex; align-items: center; gap: 0.8rem; }
.champ-icon { width: 44px; height: 44px; border-radius: 6px; border: 1px solid var(--border-color); }
.item-icon { width: 42px; height: 42px; border-radius: 6px; border: 1px solid #444; margin-right: 0.5rem; }

.badge-wr-high { color: var(--wr-high); font-weight: 700; }
.badge-wr-mid { color: var(--wr-mid); font-weight: 600; }
.badge-wr-low { color: var(--wr-low); font-weight: 700; }
.role-tag {
    background: #141518;
    padding: 0.25rem 0.6rem;
    border-radius: 4px;
    font-size: 0.8rem;
    color: var(--text-muted);
    border: 1px solid var(--border-color);
}
.alert {
    background: rgba(217, 119, 36, 0.18);
    border-left: 4px solid var(--accent-amber);
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
    border-radius: 4px;
}
/* --- Wspólne pomocnicze --- */
.muted { color: var(--text-muted); }
.small { font-size: 0.85rem; }
.inline-form { display: inline; }
.link-danger { background: none; border: none; color: var(--wr-low); cursor: pointer; font: inherit; }
.sep { border: 0; border-top: 1px solid var(--border-color); margin: 1.2rem 0; }
.panel { padding: 0.75rem; background: var(--bg-main); border-radius: 6px; }
details summary { cursor: pointer; list-style: none; }
details summary::-webkit-details-marker { display: none; }
code { background: var(--bg-main); padding: 0.1rem 0.35rem; border-radius: 4px; }
.errorlist { color: var(--wr-low); list-style: none; font-size: 0.85rem; }

/* --- Komentarze / odpowiedzi --- */
.comment { background: var(--bg-main); padding: 0.75rem; border-radius: 6px; margin-top: 0.6rem; }
.comment-meta { display: flex; justify-content: space-between; gap: 0.5rem; flex-wrap: wrap; font-size: 0.85rem; color: var(--text-muted); }
.comment-body { margin-top: 0.4rem; overflow-wrap: anywhere; }

/* --- Forum --- */
.thread-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; flex-wrap: wrap; }
.thread-foot { display: flex; justify-content: space-between; align-items: center; gap: 0.6rem; flex-wrap: wrap; margin-top: 0.6rem; }
.reply-count { white-space: nowrap; color: var(--text-muted); }

/* --- Reakcje --- */
.reactions { display: flex; gap: 0.35rem; flex-wrap: wrap; margin-top: 0.5rem; }
.reaction {
    background: var(--bg-card); border: 1px solid var(--border-color); border-radius: 999px;
    padding: 0.15rem 0.55rem; color: var(--text-primary); cursor: pointer; font-size: 0.9rem;
}
.reaction:hover { border-color: var(--accent-amber); }
.reaction.mine { border-color: var(--accent-amber); background: rgba(217, 119, 36, 0.2); }
.reaction.readonly { cursor: default; }
.reaction span { font-size: 0.8rem; color: var(--text-muted); }

/* --- Oceny buildów --- */
.rating { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; margin-top: 0.5rem; }
.stars { color: #f1c40f; letter-spacing: 1px; font-size: 1.05rem; }
.rate-form { display: inline-flex; align-items: center; gap: 0.1rem; margin-left: 0.6rem; }
.star-btn { background: none; border: none; cursor: pointer; font-size: 1.25rem; color: #555a66; padding: 0 0.1rem; }
.star-btn.on { color: #f1c40f; }
.rate-form:hover .star-btn { color: #f1c40f; }
.rate-form .star-btn:hover ~ .star-btn { color: #555a66; }

/* --- Przedmioty --- */
.item-grid { display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: center; margin-top: 0.5rem; }
.item-chip { display: flex; align-items: center; background: var(--bg-main); padding: 0.4rem 0.7rem; border-radius: 6px; border: 1px solid var(--border-color); border-left-width: 3px; }
.item-weapon { border-left-color: #e67e22; }
.item-vitality { border-left-color: #2ecc71; }
.item-spirit { border-left-color: #9b59b6; }
.champ-icon, .item-icon { object-fit: cover; }

/* --- Paginacja --- */
.pagination { display: flex; flex-wrap: wrap; align-items: center; gap: 0.35rem; margin: 1rem 0; }
.page-link {
    min-width: 2.2rem; text-align: center; padding: 0.35rem 0.65rem; border-radius: 6px;
    border: 1px solid var(--border-color); color: var(--text-muted); background: var(--bg-card);
}
a.page-link:hover { border-color: var(--accent-amber); color: #fff; text-decoration: none; }
.page-link.current { background: var(--accent-amber); border-color: var(--accent-amber); color: #fff; font-weight: 700; }
.page-link.disabled { opacity: 0.4; }
.page-ellipsis { color: var(--text-muted); padding: 0 0.2rem; }
.page-info { margin-left: auto; font-size: 0.85rem; color: var(--text-muted); }

@media (max-width: 720px) {
    .champ-table th:nth-child(n+5), .champ-table td:nth-child(n+5) { display: none; }
    .page-info { margin-left: 0; width: 100%; }
}

/* --- Historia meczów gracza --- */
.match-list { list-style: none; margin-top: 0.5rem; display: grid; gap: 0.3rem; }
.match-list li { padding: 0.35rem 0.6rem; border-radius: 4px; border-left: 3px solid var(--border-color); background: var(--bg-card); }
.match-list li.win { border-left-color: var(--wr-high); }
.match-list li.loss { border-left-color: var(--wr-low); }

/* --- Błędy formularzy (np. blokada logowania) --- */
.errorlist.nonfield { background: rgba(231, 76, 60, 0.12); border-left: 4px solid var(--wr-low); padding: 0.6rem 0.8rem; border-radius: 4px; }
