/* =================================================================== */
/* 1. PROMĚNNÉ A ZÁKLADNÍ NASTAVENÍ (Mobile-First: 0px - 399px)        */
/* =================================================================== */

:root {
    --text-color: #D4D3D3;
    --deco-color: #F9C701;
    --bg-color: #272727;
}

html {
    scroll-behavior: smooth;
    margin: 0;
}

body {
    background-color: #393939;
    color: var(--text-color);
    font-family: Helvetica, Arial, sans-serif;
    font-size: 1rem;
    line-height: 1.4;
    margin: 0;
    padding: 0;
}

main {
    margin: 0px auto;
    padding: 0px;
    width: 100%;
}

/* =================================================================== */
/* 2. NAVIGACE A HLAVIČKA                                              */
/* =================================================================== */

nav {
    background-color: #272727;
    position: sticky;
    top: 0px;
    z-index: 1000;
    text-align: center;
    box-shadow: 0px 0px 20px black;
    font-size: 20px;
}

nav ul {
    list-style: none;
    display: flex;
    margin: 0 auto;
    width: 300px;
    padding-left: 0;
}

nav li {
    display: flex;
}

nav li.logo,
nav li.sw {
    display: none;
}

nav li.link {
    margin-right: 0;
    text-align: center;
}

nav a {
    display: flex;
    text-decoration: none;
    color: var(--text-color);
    padding: 1.3em 0.4em 1em 0.4em;
    font-size: 14.4px;
    transition: background-color 150ms ease;
}

nav a:hover {
    background-color: #131313;
    color: #FFFFFF;
}

nav a.active-link {
    border-bottom: 3px solid var(--text-color);
}

header {
    background-image: url(res/bannertt.webp);
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center;
    height: 150px;
}

/* =================================================================== */
/* 3. LAYOUT A SEKCE STRÁNEK                                           */
/* =================================================================== */

article {
    width: 95%;
    margin: 0px auto;
}

section.onas {
    background-image: url(res/bgi.webp);
    background-repeat: no-repeat;
    background-size: cover;
}

section.nabor {
    background-image: url(res/bgin.webp);
    background-repeat: no-repeat;
    background-size: cover;
}

section.discord {
    background-image: url(res/bgid.webp);
    background-repeat: no-repeat;
    background-size: cover;
}

section.vedeni {
    background-image: url(res/bgiv.webp);
    background-repeat: no-repeat;
    background-size: cover;
}

section.statistics {
    background-image: url(res/bgin.webp);
    background-repeat: no-repeat;
    background-size: cover;
    display: flow-root;
    padding-bottom: 10px;
}

/* =================================================================== */
/* 4. TYPOGRAFIE, SEZNAMY A ODKAZY                                     */
/* =================================================================== */

h1 {
    color: #eceaea;
    font-size: 2.5rem;
    font-weight: normal;
    text-align: center;
    text-shadow: 1.5px 1.5px 0px black;
}

section.statistics h1 {
    margin-bottom: 10px;
    margin-top: 0;
    padding-top: 30px;
}

h2 {
    color: #F9C701;
    font-size: 2rem;
    font-weight: normal;
    text-align: center;
    text-shadow: 1.5px 1.5px 0px black;
    margin-bottom: 0;
    margin-top: 14px;
    text-indent: 0;
}

p {
    color: #D4D3D3;
    text-align: justify;
    font-size: 1rem;
    padding: 10px;
    text-shadow: 1.5px 1.5px 0px black;
}

p.citec {
    font-style: italic;
    text-align: center;
    font-weight: normal;
    text-indent: 0;
}

p.cite {
    font-style: italic;
    text-align: justify;
    font-weight: normal;
    width: 90%;
    margin: 0px auto;
}

p.zajem {
    text-align: center;
    font-size: 1.25rem;
}

p.charts {
    text-align: center;
}

p.citeCharts {
    font-style: italic;
    text-align: center;
    font-weight: normal;
    font-size: 1rem;
    text-indent: 0;
    padding-top: 0;
    margin-bottom: 20px;
}

ul.rank {
    font-size: 1rem;
    color: #D4D3D3;
    text-shadow: 1.5px 1.5px 0px black;
}

span.highlight {
    color: #F9C701;
    font-weight: bold;
}

span.b {
    font-weight: bold;
}

a.aContact {
    color: var(--text-color);
    text-decoration: none;
    font-weight: bold;
}

a.aContact:hover {
    color: #FFFFFF;
    text-decoration: underline;
}

a.highlight {
    color: var(--text-color);
    text-decoration: none;
    font-weight: bold;
}

a.highlight:hover {
    color: #FFFFFF;
    text-decoration: underline;
}

/* =================================================================== */
/* 5. DEKORACE, OBRÁZKY, TABULKY A TLAČÍTKA                            */
/* =================================================================== */

div.deco {
    margin: 0 auto;
    text-align: center;
}

img.nabor {
    width: 30%;
}

img.discord {
    width: 30%;
}

img.erb {
    width: 45%;
}

img.community {
    width: 30%;
}

img.hell {
    width: 80%;
}

img.vision {
    width: 60%;
}

img.vedeni {
    width: 100%;
}

table.heroes {
    margin: 0 auto;
    font-size: 1.25rem;
    text-shadow: 1.5px 1.5px 0px black;
    color: #D4D3D3;
    width: 95%;
    text-align: center;
}

table.heroes img {
    width: 70%;
}

table.vedeni {
    width: 98%;
    text-align: center;
    margin: 0 auto;
    border: none;
    border-collapse: collapse;
}

table.nabortl {
    margin: 0 auto;
}

button.nabor {
    border: none;
    padding: 8px 10px;
    text-align: center;
    text-decoration: none;
    font-size: 1.5rem;
    cursor: pointer;
    background-color: #F9C701;
    box-shadow: 0px 0px 20px black;
    border-radius: 20px;
    color: #131313;
}

button.nabor:hover {
    background-color: #f98d01;
    color: #000000;
    transition: background-color 150ms ease;
}

/* =================================================================== */
/* 6. PATIČKA (FOOTER)                                                 */
/* =================================================================== */

footer {
    background-color: #222222;
    color: #D4D3D3;
    position: relative;
    bottom: 0px;
}

footer table.footer {
    text-align: left;
    margin: 0 auto;
    width: 95%;
    font-size: 0.625rem;
}

footer th.footerl {
    font-weight: normal;
}

footer th.footerr {
    text-align: right;
    font-weight: normal;
}

footer a {
    color: #D4D3D3;
}

footer a:hover {
    color: #FFFFFF;
    text-decoration: none;
}

/* =================================================================== */
/* 7. INTERAKTIVNÍ TABULKA STATISTIK A ARCHIV                          */
/* =================================================================== */

/* Ovládací prvky a filtry */
.archive-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    justify-content: center;
    align-items: flex-end;
    background-color: rgba(39, 39, 39, 0.92);
    border: 1px solid #4f4f4f;
    border-radius: 8px;
    padding: 14px 18px;
    margin: 15px auto;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.6);
}

.control-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
    text-align: left;
}

.control-group label {
    font-size: 0.8rem;
    color: var(--deco-color);
    font-weight: bold;
    text-shadow: 1px 1px 0px black;
}

.sw-select,
.sw-input {
    background-color: #1a1a1a;
    color: var(--text-color);
    border: 1px solid #5a5a5a;
    border-radius: 5px;
    padding: 7px 10px;
    font-size: 0.9rem;
    font-family: inherit;
    outline: none;
}

.sw-select:focus,
.sw-input:focus {
    border-color: var(--deco-color);
}

.sw-btn {
    background-color: var(--deco-color);
    color: #131313;
    border: none;
    border-radius: 5px;
    padding: 8px 14px;
    font-size: 0.9rem;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 150ms ease;
}

.sw-btn:hover {
    background-color: #f98d01;
    color: #000000;
}

/* Souhrnný box cechu nad tabulkou */
.guild-summary-box {
    background-color: rgba(30, 30, 30, 0.92);
    border: 1px solid #4f4f4f;
    border-radius: 8px;
    padding: 12px 16px;
    margin: 0 auto 15px auto;
    text-align: center;
    font-size: 0.88rem;
    line-height: 1.6;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
}

.guild-summary-box .summary-title {
    color: var(--deco-color);
    font-weight: bold;
    font-size: 1rem;
    margin-bottom: 4px;
}

.guild-summary-box .summary-gains {
    color: #8ce99a;
    font-weight: bold;
}

.guild-summary-box .summary-changes {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    margin-top: 4px;
}

.guild-summary-box .summary-warning {
    color: #ffd43b;
    font-size: 0.78rem;
    margin-top: 6px;
    font-weight: bold;
}

/* Kontejner a základní struktura tabulky */
.sw-table-wrapper {
    width: 100%;
    overflow-x: auto;
    margin: 0 auto 35px auto;
    border: 1px solid #4f4f4f;
    border-radius: 8px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.75);
    background-color: #1e1e1e;
}

.sw-stats-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.76rem;
    color: var(--text-color);
    white-space: nowrap;
    text-align: center;
}

.sw-stats-table th,
.sw-stats-table td {
    padding: 4px 6px;
    border: 1px solid #383838;
    vertical-align: middle;
}

/* Záhlaví tabulky a řazení */
.sw-stats-table thead th {
    background-color: #272727;
    color: var(--text-color);
    font-weight: bold;
    text-shadow: 1px 1px 0px black;
    user-select: none;
}

.sw-stats-table thead tr.group-header-row th {
    color: var(--deco-color);
    font-size: 0.82rem;
    border-bottom: 1px solid #555;
    padding: 6px;
}

.sw-stats-table thead tr.sub-header-row th {
    font-size: 0.74rem;
    background-color: #2d2d2d;
}

.sw-stats-table th.sortable-th {
    cursor: pointer;
    transition: background-color 120ms ease, color 120ms ease;
}

.sw-stats-table th.sortable-th:hover {
    background-color: #3a3a3a;
    color: #ffffff;
}

.sw-stats-table th.active-sort {
    color: var(--deco-color);
    background-color: #333333;
}

.sort-icon {
    font-size: 0.65rem;
    margin-left: 2px;
    color: var(--deco-color);
}

/* Řádky tabulky */
.sw-stats-table tbody tr:nth-child(even) {
    background-color: #242424;
}

.sw-stats-table tbody tr:nth-child(odd) {
    background-color: #1c1c1c;
}

.sw-stats-table tbody tr:hover {
    background-color: #343224;
}

/* Buňky členů, ikony a lektvary */
.sw-stats-table td.cell-member {
    text-align: left;
    font-weight: bold;
    padding-left: 8px;
}

.member-wrap {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.table-icon {
    width: 18px;
    height: 18px;
    object-fit: contain;
    vertical-align: middle;
    flex-shrink: 0;
    user-select: none;
}

.cell-potions {
    padding: 3px 6px;
}

.potions-wrap {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 3px;
}

.potion-empty {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    font-size: 0.72rem;
    line-height: 1;
}

/* Rozdílové popisky (+delta) */
.delta-inline {
    font-size: 0.67rem;
    color: #b8b8b8;
    margin-left: 2px;
    font-weight: normal;
}

.delta-positive {
    color: #8ce99a;
}

.delta-negative {
    color: #ff8787;
}

.delta-block {
    display: block;
    font-size: 0.65rem;
    line-height: 1.05;
}

/* Stavové podbarvení buněk (úrovně, denní aktivita, atributy) */
.cell-level-500 {
    background-color: rgba(177, 151, 252, 0.28);
    color: #efe8ff;
}

.cell-level-600 {
    background-color: rgba(255, 236, 153, 0.24);
    color: #fff9db;
}

.cell-level-700 {
    background-color: rgba(255, 169, 77, 0.30);
    color: #ffe8cc;
}

.cell-level-800 {
    background-color: rgba(255, 107, 107, 0.34);
    color: #ffe3e3;
}

.cell-daily-done {
    background-color: rgba(64, 192, 87, 0.36);
    color: #d3f9d8;
    font-weight: bold;
}

.cell-daily-base {
    background-color: rgba(43, 138, 62, 0.18);
    color: var(--text-color);
}

.cell-daily-none {
    background-color: rgba(201, 42, 42, 0.38);
    color: #ffc9c9;
    font-weight: bold;
}

.cell-maxed {
    background-color: rgba(43, 138, 62, 0.28);
    color: #b2f2bb;
}

.cell-warn {
    background-color: rgba(201, 42, 42, 0.35);
    color: #ffc9c9;
    font-weight: bold;
}

.cell-ratio {
    background-color: rgba(230, 153, 50, 0.2);
}

.cell-base-total {
    background-color: rgba(43, 138, 62, 0.16);
    font-weight: bold;
}

.cell-total-sum {
    background-color: rgba(249, 199, 1, 0.12);
    font-weight: bold;
}

/* Patička tabulky s průměry */
.sw-stats-table tfoot tr.footer-header-repeat th {
    background-color: #272727;
    color: #b0b0b0;
    font-size: 0.72rem;
    border-top: 2px solid #555;
}

.sw-stats-table tfoot tr.avg-row td {
    background-color: #2b291e;
    color: #ffffff;
    font-weight: bold;
    border-top: 1px solid var(--deco-color);
    padding: 6px;
}

.table-status-msg {
    padding: 25px !important;
    font-size: 1rem;
    color: var(--deco-color);
}

/* =================================================================== */
/* 8. RESPONZIVNÍ DESIGN (MEDIA QUERIES)                               */
/* =================================================================== */

/* --- MOBILE STYLES | 400px a více --- */
@media screen and (min-width: 400px) {
    nav ul {
        width: 400px;
        padding: 0;
    }

    nav li.logo {
        display: flex;
        margin-top: 6px;
        padding-right: 5%;
        padding-left: 3%;
    }

    nav img.logo {
        width: 60px;
    }

    nav a.logo {
        text-decoration: none;
        padding: 0;
        transition: none;
    }

    nav a.logo:hover {
        background-color: initial;
    }

    nav a {
        padding: 1.8em 0.4em 1em 0.4em;
    }

    table.heroes {
        font-size: 1.125rem;
    }

    img.heroes {
        width: 50%;
    }

    img.nabor {
        width: 22%;
    }

    button.nabor {
        font-size: 1.625rem;
    }
}

/* --- TABLET STYLES | 600px a více --- */
@media screen and (min-width: 600px) {
    nav {
        width: 100%;
    }

    nav ul {
        width: 550px;
    }

    nav img.logo {
        width: 65px;
    }

    nav li.logo {
        padding-right: 1em;
        padding-left: 0;
    }

    nav a {
        padding: 1.2em 0.6em 1em 0.6em;
        font-size: 20px;
    }

    header {
        height: 200px;
    }

    article {
        width: 550px;
    }

    section.onas,
    section.vedeni {
        width: 100%;
    }

    table.heroes {
        font-size: 1.25rem;
        width: 590px;
    }

    table.vedeni {
        width: 590px;
    }

    img.vedeni {
        width: 280px;
    }

    h1 {
        font-size: 2.625rem;
    }

    h2 {
        font-size: 1.75rem;
    }

    p {
        font-size: 1.25rem;
        padding: 25px;
    }

    p.cite {
        width: 500px;
    }

    p.zajem {
        font-size: 1.5rem;
    }

    p.citeCharts {
        font-size: 1.35rem;
    }

    ul.rank {
        font-size: 1.25rem;
    }

    footer table.footer {
        width: 580px;
        font-size: 0.8125rem;
    }
}

/* --- BIG TABLET STYLES | 900px a více --- */
@media screen and (min-width: 900px) {
    nav {
        width: 100%;
    }

    nav ul {
        padding: 0;
        width: 900px;
    }

    nav li.logo {
        padding-left: 40px;
        padding-right: 0;
    }

    nav a.logo {
        font-size: 22px;
    }

    nav a.logo:hover {
        color: var(--text-color);
    }

    nav li.sw {
        display: flex;
        margin-left: 10px;
        padding: 1em 10% 0.5em 0em;
        font-size: 24px;
    }

    nav a {
        padding: 1.2em 0.8em 1em 0.8em;
    }

    header {
        height: 240px;
    }

    article {
        width: 800px;
    }

    section.vedeni {
        width: 100%;
    }

    p {
        font-size: 1.5rem;
    }

    p.cite {
        width: 800px;
    }

    ul.rank {
        font-size: 1.5rem;
    }

    table.heroes {
        width: 700px;
    }

    table.heroes img {
        width: 60%;
    }

    table.vedeni {
        width: 800px;
    }

    img.nabor {
        width: 15%;
    }

    img.discord {
        width: 18%;
    }

    img.erb {
        width: 35%;
    }

    img.hell {
        width: 65%;
    }

    img.vision {
        width: 50%;
    }

    img.community {
        width: 26%;
    }

    footer {
        width: 100%;
    }

    footer table.footer {
        width: 850px;
        font-size: 1rem;
    }
}

/* --- DESKTOP STYLES | 1100px a více --- */
@media screen and (min-width: 1100px) {
    body {
        background-color: #272727;
    }

    nav {
        background-color: var(--bg-color);
        height: 75px;
    }

    nav ul {
        width: 1050px;
    }

    nav li.sw {
        padding: 0.9em 22% 0.7em 0em;
    }

    nav a.logo {
        font-size: 24px;
    }

    nav a {
        padding: 1.2em 1em 1em 1em;
    }

    header {
        height: 311px;
    }

    article {
        width: 900px;
    }

    article.stats-article {
        width: 96%;
        max-width: 1550px;
    }

    section.onascite {
        background-color: #393939;
    }

    p.cite {
        width: 900px;
    }

    table.heroes img {
        width: auto;
    }

    table.vedeni {
        width: 900px;
    }

    img.vedeni {
        width: 450px;
    }

    img.erb {
        width: 30%;
    }

    img.hell {
        width: 55%;
    }

    img.vision {
        width: 45%;
    }

    img.community {
        width: 22%;
    }

    img.discord {
        width: 16%;
    }

    footer {
        background-color: var(--bg-color);
        box-shadow: 0px 0px 20px black;
    }

    footer table.footer {
        width: 1000px;
    }
}