/* === RESET I PODSTAWA === */
/* Tło strony: podmień plik assets/Tło.png, aby zmienić globalne tło. */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: #000;
    background-image: linear-gradient(rgba(0,0,0,.72), rgba(0,0,0,.72)), url("../T%C5%82o.png");
    background-position: center top;
    background-repeat: no-repeat;
    background-size: cover;
    background-attachment: fixed;
    color: #ddd;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
}


/* === FORMULARZE (baza) === */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="url"],
input[type="search"],
input[type="file"],
select,
textarea {
    width: 100%;
    padding: 12px;
    background: #121212;
    border: 1px solid #333;
    color: #fff;
    border-radius: 6px;
    box-sizing: border-box;
    font-family: inherit;
}

textarea {
    min-height: 120px;
    resize: vertical;
}

input[type="file"] { padding: 10px; }

/* === NAGŁÓWEK I NAWIGACJA === */
.top-fixed-wrapper {
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 5px 15px rgba(0,0,0,0.8);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.server-list-bar {
    display: flex;
    gap: 12px;
    padding: 15px 20px;
    background: #0a0a0a;
    border-bottom: 2px solid #f39c12;
    overflow-x: auto;
    scrollbar-width: none; /* Ukrycie scrollbara dla Firefox */
}
.server-list-bar::-webkit-scrollbar { display: none; } /* Ukrycie scrollbara dla Chrome/Safari */

header {
    background: linear-gradient(#1a1a1a, #0f0f0f);
    border-bottom: 1px solid #333;
}

.header-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 10px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo img {
    max-height: 48px;
    width: auto;
    display: block;
    transition: transform 0.3s;
}
.logo img:hover { transform: scale(1.05); }

nav { 
    background: #111; 
    border-top: 1px solid #222; 
    border-bottom: 1px solid #222; 
}

.nav-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 12px 20px;
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
    list-style: none;
}
.nav-inner li{display:flex;}

.nav-inner a {
    color: #f39c12;
    text-decoration: none;
    font-weight: bold;
    font-size: 14px;
    text-transform: uppercase;
    transition: 0.2s;
}
.nav-inner a:hover { color: #fff; text-shadow: 0 0 8px #f39c12; }

.section-title{ 
    font-size: 24px; 
    color: #f39c12; 
    margin:24px 0 16px; 
    font-weight: bold; 
    text-transform: uppercase;
    border-left: 4px solid #f39c12;
    padding-left: 15px;
}

/* === SERWERY W PASKU === */
.server-tile { 
    background: #161616; 
    border: 1px solid #333; 
    padding: 10px 15px; 
    border-radius: 12px; 
    min-width: 200px; 
    flex-shrink: 0;
    transition: border-color 0.3s;
}
.server-tile:hover { border-color: #f39c12; }
.tile-name { color: #f39c12; font-weight: bold; font-size: 12px; margin-bottom: 4px; }
.tile-line { font-size: 10px; color: #888; display: flex; justify-content: space-between; }
.tile-line b { color: #fff; }

/* === SYSTEM NEWSÓW === */
.news-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:24px;}

.news-card {
    display: flex;
    flex-direction: column;
    background: #161616;
    border: 1px solid #222;
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.3s, border-color 0.3s;
}
.news-card:hover { 
    transform: translateY(-5px); 
    border-color: #f39c12; 
}



.news-card img{max-width:100%;height:auto;}
/* Kontener obrazka w newsach (stabilne kadrowanie i brak „wychodzenia” poza kartę) */
.news-media{
    width: 100%;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border-bottom: 1px solid #222;
    background: #000;

    /* Fallback wysokości (dla stałego layoutu kart) */
    height: 190px;
    overflow: hidden;
}

/* Jeżeli przeglądarka wspiera aspect-ratio, użyj proporcji zamiast stałej wysokości */
@supports (aspect-ratio: 16 / 9){
    .news-media{
        height: auto;
        aspect-ratio: 16 / 9;
    }
}

.news-media img{
    display: block;
    width: 100%;
    height: 100%;
    object-fit: fill; /* wypełnij ramkę (bez czarnych pasów), może lekko przyciąć */
    max-width: 100%;
    max-height: 100%;
    transform: none; /* nie powiększaj w kartach news */
}

.news-content {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 20px;
}

.news-title {
    font-weight: bold;
    color: #f39c12;
    font-size: 18px;
    margin-bottom: 12px;
    height: 50px;
    overflow: hidden;
}

.news-text {
    flex-grow: 1;
    font-size: 14px;
    color: #bbb;
    word-break: break-word;
    margin-bottom: 15px;
    padding-bottom: 3px;
    line-height: 1.7;
}

.news-footer-meta {
    margin-top: auto;
    padding-top: 15px;
    font-size: 11px;
    color: #555;
    text-align: right;
    border-top: 1px solid #222;
    font-style: italic;
}

/* === PRZYCISKI === */
.news-btn {
    display: block;
    padding: 12px;
    background: linear-gradient(135deg, #f1c40f 0%, #f39c12 100%);
    color: #000;
    text-align: center;
    border-radius: 6px;
    font-weight: bold;
    text-decoration: none;
    margin-top: 15px;
    transition: 0.3s;
    border: none;
    text-transform: uppercase;
    font-size: 12px;
}
.news-btn:hover { 
    filter: brightness(1.1); 
    box-shadow: 0 4px 15px rgba(243, 156, 18, 0.4); 
}

/* === RESPONSYWNOŚĆ === */
@media (max-width: 1100px) { 
    .news-grid { grid-template-columns: repeat(2, 1fr); } 
}

@media (max-width: 768px) {
    .nav-inner { gap: 15px; }
    .header-inner { flex-direction: column; gap: 15px; text-align: center; }
}

@media (max-width: 650px) { 
    .news-grid { grid-template-columns: 1fr; } 
    .section-title { font-size: 20px; }
}

/* === NEWS: UJEDNOLICONA WYSOKOŚĆ KART === */
.news-card{
    height: 560px;
}
.news-content{
    height: 100%;
}
/* Równa wysokość tekstu (niezależnie od ilości linii) */
.news-text{
    display: -webkit-box;
    -webkit-box-orient: vertical;
    overflow: hidden;
    -webkit-line-clamp: 7;
    padding-bottom: 3px; /* zapobiega ucięciu ostatniej linii (pixel rounding) */
}
/* Dla kart bez obrazka pozwól na odrobinę więcej tekstu, ale nadal stała karta */
.news-card.no-image .news-text{
    -webkit-line-clamp: 11;
}
/* Przycisk zawsze w tym samym miejscu */
.news-actions{
    margin-top: 14px;
}
/* Autor/data zawsze na dole karty */
.news-footer-meta{
    margin-top: auto;
}

/* === STOPKA (spójna z forum) === */
.site-footer{
    background:#050505;
    border-top:1px solid #222;
    color:#666;
    text-align:center;
    padding:7px 0;
    margin-top:20px;
}
.site-footer .container{
    display:flex;
    flex-direction:column;
    align-items:center;
    justify-content:center;
    gap:0;
}
.site-footer-line--main,
.site-footer-text{
    font-size:11px;
    color:#666;
    text-transform:none;
    letter-spacing:0;
    line-height:1.15;
}
.site-footer-line--sub{
    font-size:9px;
    color:#444;
    letter-spacing:.2px;
    line-height:1.1;
}


/* === NEWS: REZERWACJA MIEJSCA NA PRZYCISK (żeby karty były równe) === */
.news-actions{
    min-height: 52px; /* miejsce na przycisk + margines */
    display: flex;
    align-items: flex-start;
}
.news-actions:empty{ min-height: 52px; }
.news-actions .news-btn{ margin-top: 15px; }


/* === AUTOCOMPLETE === */
.search-results{position:absolute;top:100%;left:0;right:0;background:#1a1a1a;border:1px solid #333;z-index:2000;display:none;max-height:220px;overflow:auto;border-radius:6px;margin-top:4px;}
.search-item{padding:10px 12px;cursor:pointer;border-bottom:1px solid #222;font-size:12px;color:#ddd;}
.search-item:hover{background:#222;color:#f39c12;}


/* === PROFIL (AVATAR) === */
.profile-avatar img{ width: 140px; height: 140px; object-fit: fill; border-radius: 50%; }


/* ===== Notices ===== */
.notice{padding:12px 14px;border-radius:8px;margin:12px 0;font-size:13px;line-height:1.4;border:1px solid #2a2a2a;background:#161616;color:#ddd;}
.notice.notice-success{border-color:#235b3b;background:#0f1b14;color:#b9f3cf;}
.notice.notice-error{border-color:#5b2323;background:#1b0f0f;color:#f3b9b9;}

/* ===== ItemShop caretakers ===== */
.staff-list{margin-top:10px;display:flex;flex-direction:column;gap:6px;}
.staff-group{margin-top:6px;display:flex;flex-direction:column;gap:6px;}
.staff-group-title{color:#f39c12;font-weight:900;font-size:11px;text-transform:uppercase;letter-spacing:.8px;opacity:.95;padding:6px 2px 2px 2px;}
.staff-row{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:8px 10px;border:1px solid #222;background:#121212;border-radius:8px;}
.staff-row.staff-row-compact{padding:6px 8px;border-radius:7px;}
.staff-left{display:flex;align-items:center;gap:8px;min-width:0;}
.staff-name{color:#ddd;font-weight:700;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:220px;}
.staff-role{font-size:11px;font-weight:900;padding:4px 8px;border-radius:999px;border:1px solid #333;background:#1a1a1a;color:#f1c40f;text-transform:uppercase;letter-spacing:.6px;}
.staff-role.role-admin{color:#ffb3b3;border-color:#5b2323;background:#1b0f0f;}
.staff-role.role-moderator{color:#b3d9ff;border-color:#23445b;background:#0f151b;}
.staff-role.role-opiekun{color:#b9f3cf;border-color:#235b3b;background:#0f1b14;}

/* ItemShop: bardziej kompaktowy blok ikona + drop */
.server-meta{display:flex;align-items:center;justify-content:center;gap:10px;margin-top:6px;margin-bottom:8px;line-height:1;}
.server-meta .server-card-icon{font-size:28px;filter:drop-shadow(0 0 10px rgba(243,156,18,.22));}
.server-meta .server-drop{font-size:12px;color:#aaa;white-space:nowrap;}
.server-meta .server-drop-val{color:#f1c40f;font-weight:900;}
.staff-actions a{color:#e74c3c;text-decoration:none;font-weight:800;font-size:12px;}
.staff-actions a:hover{text-decoration:underline;}
.staff-form{margin-top:12px;display:flex;gap:8px;flex-wrap:wrap;}
.staff-form input,.staff-form select{background:#0f0f0f;border:1px solid #2a2a2a;border-radius:8px;color:#ddd;padding:10px 12px;font-size:13px;}
.staff-form button{background:#f39c12;border:none;border-radius:8px;color:#111;font-weight:900;padding:10px 14px;cursor:pointer;}
.staff-form button:hover{filter:brightness(1.05);}


/* ===== Header icons / notifications ===== */
@keyframes blink-notification{0%{transform:scale(1);opacity:1;}50%{transform:scale(1.1);opacity:.9;}100%{transform:scale(1);opacity:1;}}
.user-bar{display:flex;align-items:center;font-size:13px;color:#ddd;}
.user-bar b{color:#f39c12;margin-left:5px;}
.user-bar a.nav-link{color:#ddd;text-decoration:none;transition:.2s;margin:0 10px;}
.user-bar a.nav-link:hover{color:#f39c12;}
.user-nav-icon{position:relative;display:inline-flex;align-items:center;text-decoration:none;margin:0 8px;padding:5px;transition:.2s;}
.icon-svg{width:24px;height:24px;fill:none;stroke:#ddd;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;transition:.2s;}
.user-nav-icon:hover .icon-svg{stroke:#f39c12;transform:translateY(-1px);}
.msg-badge{position:absolute;top:-2px;right:-5px;background:#e74c3c;color:#fff;font-size:10px;font-weight:900;min-width:17px;height:17px;border-radius:50%;display:flex;align-items:center;justify-content:center;border:2px solid #1a1a1a;box-shadow:0 2px 5px rgba(0,0,0,.5);animation:blink-notification 1.5s infinite ease-in-out;pointer-events:none;}
.header-inner img{max-height:48px;width:auto;display:block;}


/* === NEWS: WIDOK POJEDYNCZEGO ARTYKUŁU (RESPONSYWNE OBRAZKI) === */
.news-media-full{
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 2px solid #f39c12;
    background: #000;
    overflow: hidden;

    /* Fallback wysokości (dla starszych przeglądarek) */
    max-height: 480px;
}

/* Jeżeli przeglądarka wspiera aspect-ratio, trzymaj stałą proporcję w podglądzie */
@supports (aspect-ratio: 16 / 9){
    .news-media-full{
        aspect-ratio: 16 / 9;
        max-height: 480px;
    }
}

.news-image-full{
    width: 100%;
    height: 100%;
    object-fit: fill; /* wypełnij ramkę (bez czarnych pasów), może lekko przyciąć */
    display: block;
}



/* =========================
   TOAST / FLASH
   ========================= */
.toast{
    position: relative;
    padding: 12px 14px;
    border-radius: 10px;
    border: 1px solid #333;
    margin: 0 0 14px;
    font-weight: 700;
    letter-spacing: .2px;
    animation: toastIn .28s ease-out both;
}
.toast-info{ background:#101418; color:#dfe6e9; border-color:#2d3436; }
.toast-success{ background:#0f1b12; color:#b8f7c2; border-color:#1f6f3a; }
.toast-error{ background:#1b0f0f; color:#ffb3b3; border-color:#8b1d1d; }
@keyframes toastIn{ from{ transform:translateY(-6px); opacity:0; } to{ transform:translateY(0); opacity:1; } }
.toast .toast-x{
    position:absolute; right:10px; top:8px;
    background:transparent; border:0; color:inherit;
    font-size:18px; cursor:pointer; opacity:.8;
}

/* =========================
   HURTS CODE REDEEM (PROFILE)
   ========================= */
.redeem-top{
    display:flex;
    flex-direction:column;
    align-items:center;
    justify-content:center;
    gap:10px;
    padding:6px 0 0;
}
.redeem-top .redeem-title{
    font-weight:900;
    color:#f39c12;
    text-align:center;
    margin-bottom:2px;
}
.redeem-top .hurts-redeem-form{
    width:100%;
    max-width:420px;
    margin:0 auto;
    flex-direction:column;
    align-items:stretch;
}
.redeem-top .hurts-redeem-inputwrap{ flex:initial; min-width:0; width:100%; display:flex; justify-content:center; }
.redeem-top .hurts-redeem-inputwrap input{ text-align:center; width:100%; }
.redeem-top .hurts-redeem-btn{ width:100%; }
.redeem-top .hurts-redeem-hint{ text-align:center; max-width:420px; }

.hurts-history-box{
    background:transparent;
    border:0;
    border-radius:0;
    padding:0;
    margin-top:0;
    width:100%;
}

.hurts-redeem{
    background:#121212;
    border:1px solid #333;
    border-radius:12px;
    padding:14px;
}
.hurts-redeem-balance{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:12px;
    padding:12px 12px;
    border:1px solid #2a2a2a;
    border-radius:12px;
    background:#0f0f0f;
    margin-bottom:12px;
}
.hurts-redeem-amount{
    font-size:28px;
    font-weight:900;
    color:#f39c12;
    line-height:1;
}
.hurts-redeem-amount span{
    font-size:14px;
    font-weight:800;
    color:#d2d2d2;
    margin-left:6px;
}
.hurts-redeem-icon{
    width:46px;
    height:46px;
    object-fit:contain;
    filter: drop-shadow(0 2px 8px rgba(0,0,0,.6));
}
.hurts-redeem-form{
    display:flex;
    gap:10px;
    flex-wrap:wrap;
    align-items:flex-end;
}
.hurts-redeem-inputwrap{ flex:1; min-width:240px; }
.hurts-redeem-inputwrap input{
    height:44px;
    border-radius:10px;
    border:1px solid #333;
    background:#0f0f0f;
    color:#fff;
    padding:0 12px;
    font-family:monospace;
    letter-spacing:.6px;
}
.hurts-redeem-btn{
    height:44px;
    background:#f39c12;
    color:#000;
    border:none;
    font-weight:900;
    padding:0 18px;
    border-radius:10px;
}
.hurts-redeem-hint{
    margin-top:6px;
    font-size:12px;
    color:#888;
}
.hurts-redeem-history{
    margin-top:0;
    border-top:0;
    padding-top:0;
}
.hurts-redeem-history-title{
    font-weight:900;
    color:#f39c12;
    margin-bottom:8px;
}
.hurts-redeem-history-scroll{
    max-height:320px;
    overflow:auto;
    border:1px solid #333;
    border-radius:10px;
    background:#121212;
}
.hurts-table{
    width:100%;
    border-collapse:collapse;
    min-width:0;
    table-layout:fixed;
}
.hurts-table th{
    text-align:left;
    padding:10px;
    background:#1c1c1c;
    color:#f39c12;
    position:sticky;
    top:0;
    z-index:1;
}
.hurts-table td{
    padding:10px;
    border-top:1px solid #2a2a2a;
    color:#ddd;
}
.hurts-table td.muted{ color:#888; }
.wallet-cell-trim{
    position:relative;
}
.wallet-cell-trim[data-tooltip]{
    cursor:help;
}
.wallet-cell-trim[data-tooltip]::after{
    content:attr(data-tooltip);
    position:absolute;
    left:50%;
    bottom:calc(100% + 8px);
    transform:translateX(-50%);
    background:#141414;
    color:#f5f5f5;
    border:1px solid #3a3a3a;
    border-radius:8px;
    padding:7px 10px;
    min-width:max-content;
    max-width:260px;
    width:max-content;
    white-space:normal;
    line-height:1.35;
    box-shadow:0 10px 24px rgba(0,0,0,.45);
    opacity:0;
    pointer-events:none;
    z-index:40;
    font-size:12px;
    text-align:left;
}
.wallet-cell-trim[data-tooltip]::before{
    content:"";
    position:absolute;
    left:50%;
    bottom:calc(100% + 2px);
    transform:translateX(-50%);
    border:6px solid transparent;
    border-top-color:#3a3a3a;
    opacity:0;
    pointer-events:none;
    z-index:41;
}
.wallet-cell-trim[data-tooltip]:hover::after,
.wallet-cell-trim[data-tooltip]:hover::before,
.wallet-cell-trim[data-tooltip]:focus-within::after,
.wallet-cell-trim[data-tooltip]:focus-within::before{
    opacity:1;
}

/* =========================
   TOOLTIP (ADMIN codes)
   ========================= */
.code-tooltip{
    position:relative;
    display:inline-block;
}
.code-tooltip .code-tooltip-box{
    display:none;
    position:absolute;
    left:0;
    top:100%;
    margin-top:8px;
    width:320px;
    max-width:75vw;
    background:#0f0f0f;
    border:1px solid #333;
    border-radius:10px;
    padding:10px;
    z-index:50;
    box-shadow:0 10px 30px rgba(0,0,0,.5);
}
.code-tooltip:hover .code-tooltip-box{ display:block; }
.code-tooltip-box .tt-title{
    font-weight:900;
    color:#f39c12;
    margin-bottom:6px;
    font-size:12px;
}
.code-tooltip-box .tt-scroll{
    max-height:180px;
    overflow:auto;
    font-size:12px;
    color:#ddd;
}
.code-tooltip-box .tt-row{
    display:flex;
    justify-content:space-between;
    gap:10px;
    padding:6px 0;
    border-top:1px solid #2a2a2a;
}
.code-tooltip-box .tt-row:first-child{ border-top:0; }
.code-tooltip-box .tt-row span{ color:#aaa; }

/* =========================
   ItemShop - wybór trybu
   ========================= */

.page-head{
    margin-top: 20px;
    margin-bottom: 18px;
}

.page-title{
    font-size: 44px;
    line-height: 1.05;
    font-weight: 800;
    color: #fff;
    margin: 0 0 6px 0;
}

.page-breadcrumbs{
    color: #8c8c8c;
    font-size: 14px;
}

.page-breadcrumbs .crumb-sep{
    margin: 0 8px;
    color: #333;
}

.page-breadcrumbs .crumb-current{
    color: #fff;
    font-weight: 700;
}

.itemshop-modes-grid{
    display: grid;
    /* Auto-fit z minimalną szerokością karty, żeby tekst nie łamał się „po 1 słowie” */
    grid-template-columns: repeat(auto-fit, minmax(520px, 1fr));
    gap: 22px;
}

@media (max-width: 720px){
    .itemshop-modes-grid{ grid-template-columns: 1fr; }
    .page-title{ font-size: 34px; }
    .itemshop-mode-card{ padding-right: 210px; }
}

.itemshop-mode-card{
    background: rgba(20,20,20,.92);
    border: 1px solid #242424;
    border-radius: 14px;
    padding: 18px 220px 18px 18px; /* prawa strona na postać (rezerwa, by tekst nie wchodził na obrazek) */
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 150px;
    box-shadow: 0 8px 25px rgba(0,0,0,.35);
}

.itemshop-mode-card:before{
    content: "";
    position: absolute;
    inset: -80px -80px auto auto;
    width: 260px;
    height: 260px;
    border-radius: 999px;
    background: radial-gradient(circle, rgba(243,156,18,.35) 0%, rgba(0,0,0,0) 62%);
    pointer-events: none;
}

.mode-left{
    position: relative;
    z-index: 2;

    /* Nie pozwól, żeby tekst wchodził na obrazek po prawej */
    max-width: calc(100% - 170px);
    min-width: 0;
}

.mode-title{
    font-size: 32px;
    font-weight: 900;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: .6px;
    margin-bottom: 4px;
}

.mode-subtitle{
    color: #9b9b9b;
    font-size: 14px;
    margin-bottom: 12px;
}

.mode-status{
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
    min-height: 20px;
    flex-wrap: wrap;
}

.status-dot{
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
    box-shadow: 0 0 0 3px rgba(255,255,255,.04);
}

.dot-online{ background: #2ecc71; }
.dot-offline{ background: #e74c3c; }

.status-count{
    display: flex;
    align-items: baseline;
    gap: 10px;
    flex-wrap: wrap;
    max-width: 100%;
    min-width: 0;
}

.status-slash{
    color: #bdbdbd;
    font-weight: 900;
    font-size: 18px;
    line-height: 1;
}

.status-max{
    color: #e6e6e6;
    font-size: 18px;
    font-weight: 900;
    line-height: 1;
}

.status-number{
    color: #fff;
    font-size: 24px;
    font-weight: 900;
}

.status-label{
    color: #2ecc71;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: .6px;

    flex-basis: 100%;
}

.status-offline{
    color: #e74c3c;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: .8px;
}

.mode-actions{ margin-top: 2px; }

.mode-btn{
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 11px 18px;
    min-width: 180px;
    border-radius: 12px;
    background: linear-gradient(90deg, #f39c12, #d68910);
    color: #000;
    font-weight: 900;
    text-decoration: none;
    border: 0;
}

.mode-btn:hover{
    filter: brightness(1.06);
}

.mode-right{
    position: absolute;
    right: 12px;
    bottom: -8px;
    z-index: 1;
    width: 160px;
    height: 160px;
    display: flex;
    align-items: flex-end;
    justify-content: flex-end;
    pointer-events: none;
}

.mode-character{
    width: 150px;
    height: 150px;
    object-fit: contain;
    opacity: .95;
    filter: drop-shadow(0 10px 18px rgba(0,0,0,.55));
}

@media (max-width: 720px){
    .mode-right{
        width: 140px;
        height: 140px;
        right: 10px;
        bottom: -6px;
    }
    .mode-character{ width: 130px; height: 130px; }
    .mode-left{ max-width: calc(100% - 190px); }
}

/* =========================
   ItemShop - strona serwera
   ========================= */

.itemshop-server-head{
    background:#161616;
    border:1px solid #222;
    border-radius:8px;
    padding:25px;
    margin-bottom:18px;
    text-align:center;
}

.itemshop-server-label{
    font-size:14px;
    font-weight:900;
    color:#fff;
    opacity:.95;
    margin-bottom:10px;
}

.itemshop-server-name{
    font-size:18px;
    font-weight:900;
    color:#f39c12;
    margin-bottom:8px;
}

.itemshop-server-balance{
    margin-top:14px;
    color:#ddd;
}

.itemshop-server-balance b{
    color:#f39c12;
}

/* =========================
   Administracja
   ========================= */

.admin-page-head{
    margin-top:20px;
    margin-bottom:14px;
    text-align:center;
}

.admin-page-title{
    margin:0;
    color:#fff;
    font-size:32px;
    font-weight:900;
}

.admin-list{
    display:flex;
    flex-direction:column;
    gap:8px;
}

.admin-row{
    display:flex;
    align-items:center;
    gap:10px;
}

.admin-role-pill{
    padding:6px 10px;
    border:1px solid #333;
    border-radius:999px;
    background:#0f0f0f;
    color:#f39c12;
    font-size:12px;
    font-weight:900;
    white-space:nowrap;
}

.admin-nick{
    color:#ddd;
    font-size:12px;
    font-weight:700;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
}

/* =========================
   Panel Admina: Skrzynki
   ========================= */

.admin-crates-grid{
    display:grid;
    grid-template-columns:repeat(3, minmax(0, 1fr));
    gap:12px;
}

@media (max-width: 1024px){
    .admin-crates-grid{ grid-template-columns:repeat(2, minmax(0, 1fr)); }
}

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

.admin-crate-card{
    border:1px solid #2a2a2a;
    background:#0f0f0f;
    border-radius:10px;
    padding:10px;
}

.admin-crate-card__title{
    font-weight:900;
    color:#ddd;
    margin-bottom:6px;
}

/* =========================
   Password fields (admin) – bez ujawniania na hover
   ========================= */
.pw-field{
    display:flex;
    gap:8px;
    align-items:center;
}
.pw-field > input{
    flex:1 1 auto;
}
.pw-toggle-btn,
.pw-fetch-btn{
    flex:0 0 auto;
    padding:10px 12px;
    border-radius:10px;
    border:1px solid #2a2a2a;
    background:#161616;
    color:#ddd;
    font-weight:800;
    cursor:pointer;
}
.pw-toggle-btn:hover,
.pw-fetch-btn:hover{
    filter:brightness(1.1);
}


/* === PREMIUM UI STAGE 3 === */
:root{
    --bg:#000;
    --surface:#111;
    --surface-2:#161616;
    --surface-3:#1d1d1d;
    --line:#2a2a2a;
    --line-strong:#383838;
    --text:#ddd;
    --muted:#9a9a9a;
    --accent:#f39c12;
    --accent-soft:rgba(243,156,18,.16);
    --success:#2ecc71;
    --danger:#e74c3c;
    --shadow-soft:0 10px 30px rgba(0,0,0,.28);
    --shadow-card:0 18px 45px rgba(0,0,0,.42);
    --radius-sm:10px;
    --radius-md:14px;
    --radius-lg:18px;
}
html{scroll-behavior:smooth;}
body{min-height:100vh;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;}
a{color:inherit;}
a:focus-visible,button:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible,summary:focus-visible{
    outline:2px solid rgba(243,156,18,.9);
    outline-offset:2px;
}
.skip-link{
    position:absolute;
    left:12px;
    top:12px;
    transform:translateY(-200%);
    background:#fff;
    color:#111;
    padding:10px 14px;
    border-radius:999px;
    font-weight:800;
    z-index:3000;
    text-decoration:none;
    box-shadow:var(--shadow-soft);
}
.skip-link:focus{transform:translateY(0);}
.page-main{padding-top:28px;padding-bottom:42px;}
.page-section{display:flex;flex-direction:column;gap:24px;}
.page-section__header,.page-intro-card, .news-view, .profile-wrapper, .auth-card, .form-box{
    box-shadow:var(--shadow-soft);
}
.page-heading{font-size:clamp(1.9rem, 2.5vw, 2.5rem);line-height:1.1;color:#fff;margin:0 0 10px;}
.page-subtitle{max-width:74ch;color:#b7b7b7;font-size:15px;line-height:1.7;}
.page-intro-card,.page-empty-state{
    background:linear-gradient(180deg, rgba(255,255,255,.015), rgba(255,255,255,.01));
    border:1px solid var(--line);
    border-radius:var(--radius-lg);
    padding:22px;
}
.page-empty-state p{margin:0;color:#c5c5c5;}
.news-card,.server-card,.profile-card,.page-intro-card,.auth-card,.news-view{
    backdrop-filter:blur(4px);
}
.news-card{
    position:relative;
    background:linear-gradient(180deg, rgba(255,255,255,.016), rgba(255,255,255,.01));
    border:1px solid var(--line);
    border-radius:var(--radius-lg);
    box-shadow:var(--shadow-soft);
}
.news-card:hover{box-shadow:var(--shadow-card);}
.news-content{gap:12px;}
.news-title{height:auto;min-height:48px;line-height:1.25;color:#fff;}
.news-footer-meta{color:#8d8d8d;}
.news-btn{
    min-height:44px;
    border-radius:999px;
    font-size:12px;
    letter-spacing:.35px;
    box-shadow:0 10px 25px rgba(243,156,18,.18);
}
.news-btn:hover{transform:translateY(-1px);}
.news-actions{display:flex;flex-wrap:wrap;gap:10px;align-items:flex-start;}
.news-pagination{display:flex;gap:10px;justify-content:center;flex-wrap:wrap;}
.news-pagination__item,.news-pagination__current{
    min-width:42px;height:42px;display:inline-flex;align-items:center;justify-content:center;
    border-radius:999px;border:1px solid var(--line-strong);text-decoration:none;font-weight:800;
}
.news-pagination__item{background:#141414;color:#ddd;}
.news-pagination__current{background:var(--accent);color:#111;border-color:var(--accent);}
.auth-card{
    max-width:520px;
    margin:48px auto;
    background:linear-gradient(180deg, rgba(255,255,255,.02), rgba(255,255,255,.01));
    padding:32px;
    border-radius:22px;
    border:1px solid var(--line);
    text-align:left;
}
.auth-title{font-size:2rem;color:#fff;margin:0 0 10px;}
.auth-lead,.auth-links{color:#b9b9b9;}
.auth-form{display:flex;flex-direction:column;gap:16px;margin-top:22px;}
.form-field{display:flex;flex-direction:column;gap:8px;}
.form-label{font-size:12px;font-weight:900;letter-spacing:.4px;text-transform:uppercase;color:#f5c36c;}
.auth-input{min-height:50px;border-radius:14px;border-color:#3a3a3a;background:#101010;}
.auth-btn{min-height:50px;border-radius:999px;font-size:14px;letter-spacing:.35px;box-shadow:0 10px 24px rgba(243,156,18,.2);}
.error-msg{border-radius:12px;padding:14px 16px;line-height:1.55;}
.server-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:24px;}
.server-card{height:100%;}
.server-card-header{display:flex;justify-content:center;padding:22px 20px 0;}
.server-card-icon{display:inline-flex;align-items:center;justify-content:center;width:58px;height:58px;border-radius:16px;background:rgba(243,156,18,.1);font-size:28px;}
.server-title-centered{text-align:center;min-height:auto;margin-bottom:2px;}
.server-detail-centered{text-align:center;}
.server-status-box{margin:6px 0 0;padding:14px;border:1px solid var(--line);border-radius:16px;background:#101010;text-align:center;}
.server-links{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;width:100%;}
.admin-list{display:flex;flex-direction:column;gap:10px;}
.admin-row{display:flex;gap:10px;align-items:center;justify-content:space-between;padding:10px 12px;border:1px solid var(--line);border-radius:12px;background:#101010;}
.admin-role-pill{display:inline-flex;align-items:center;justify-content:center;min-width:110px;padding:7px 12px;border-radius:999px;background:var(--accent-soft);border:1px solid rgba(243,156,18,.34);font-size:11px;font-weight:900;color:#f7c46c;text-transform:uppercase;}
.admin-guardian-grid{align-items:stretch;}
.admin-guardian-card{display:flex;flex-direction:column;justify-content:flex-start;align-items:center;gap:12px;min-height:unset;text-align:center;}
.admin-guardian-server-title{width:100%;margin:0;text-align:center;}
.admin-guardian-emblem{width:100%;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;}
.admin-guardian-divider{display:block;width:min(100%, 180px);height:1px;background:linear-gradient(90deg, rgba(243,156,18,0), rgba(243,156,18,.9), rgba(243,156,18,0));}
.admin-guardian-emblem .server-card-icon{width:44px;height:44px;font-size:22px;border-radius:12px;}
.admin-guardian-nick-wrap{width:100%;display:flex;justify-content:center;}
.admin-guardian-nick{font-size:18px;font-weight:800;color:#fff;line-height:1.3;word-break:break-word;text-align:center;}
.admin-guardian-rank-wrap{margin-top:0;width:100%;display:flex;justify-content:center;}
.admin-guardian-rank{display:inline-flex;align-items:center;justify-content:center;font-size:15px;font-weight:900;line-height:1.25;word-break:break-word;text-align:center;}
.admin-nick{font-weight:700;color:#fff;word-break:break-word;text-align:right;}
.news-view{background:linear-gradient(180deg, rgba(255,255,255,.018), rgba(255,255,255,.008));border:1px solid var(--line);border-radius:22px;overflow:hidden;}
.news-body{padding:26px;}
.news-header h1{font-size:clamp(2rem, 4vw, 2.9rem);line-height:1.06;margin:0 0 10px;color:#fff;}
.news-text-full{font-size:16px;line-height:1.9;color:#d0d0d0;}
.back-link{display:inline-flex;margin-top:18px;color:#f7c46c;font-weight:700;text-decoration:none;}
.back-link:hover{text-decoration:underline;}
.site-footer{border-top:1px solid #1f1f1f;background:#090909;margin-top:32px;}
.site-footer .container{padding-top:18px;padding-bottom:24px;text-align:center;}
.site-footer-line--main{font-weight:800;color:#ddd;}
.site-footer-line--sub{color:#767676;font-size:13px;margin-top:4px;}
@media (max-width: 1024px){
    .container{padding:16px;}
    .server-grid,.server-links{grid-template-columns:1fr;}
    .profile-wrapper{padding:28px;}
}
@media (max-width: 768px){
    .top-fixed-wrapper{position:static;}
    .header-inner{padding:14px 16px;align-items:stretch;}
    .user-bar{display:flex;flex-wrap:wrap;justify-content:center;gap:10px;}
    .nav-inner{justify-content:flex-start;overflow:auto;flex-wrap:nowrap;padding:12px 16px;gap:14px;scrollbar-width:none;}
    .nav-inner::-webkit-scrollbar{display:none;}
    .nav-inner a{white-space:nowrap;padding-bottom:4px;}
    .page-main{padding-top:18px;}
    .page-intro-card,.page-empty-state,.news-body,.auth-card,.profile-wrapper{padding:20px;}
    .news-grid,.server-grid{grid-template-columns:1fr;gap:18px;}
    .news-card.no-image .news-content{min-height:0;}
    .news-text-full{font-size:15px;line-height:1.8;}
    .news-btn,.auth-btn{width:100%;}
    .server-list-bar{padding:12px 14px;gap:10px;}
    .server-tile{min-width:170px;}
}
@media (max-width: 540px){
    .container{padding:14px;}
    .page-heading{font-size:1.75rem;}
    .auth-card{margin:24px auto;padding:18px;}
    .news-body{padding:18px;}
    .admin-row{align-items:flex-start;flex-direction:column;}
    .admin-role-pill,.admin-nick{text-align:left;}
    .admin-guardian-meta{align-items:flex-start;}
}

.visually-hidden{position:absolute!important;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0;}


/* === STAGE 4 PRODUCT POLISH === */
.page-section__header{
    position:relative;
    padding:26px 28px;
    border:1px solid rgba(255,255,255,.06);
    border-radius:24px;
    background:
        radial-gradient(circle at top right, rgba(243,156,18,.12), transparent 34%),
        linear-gradient(180deg, rgba(255,255,255,.02), rgba(255,255,255,.008));
    overflow:hidden;
}
.page-section__header::after{
    content:"";
    position:absolute;
    inset:auto -50px -70px auto;
    width:180px;
    height:180px;
    border-radius:999px;
    background:radial-gradient(circle, rgba(243,156,18,.16), transparent 70%);
    pointer-events:none;
}
.page-kicker{
    position:relative;
    z-index:1;
    display:inline-flex;
    align-items:center;
    gap:8px;
    width:max-content;
    padding:7px 12px;
    border-radius:999px;
    background:rgba(243,156,18,.08);
    border:1px solid rgba(243,156,18,.18);
    color:#f4c36a;
}
.page-heading,.page-subtitle{position:relative;z-index:1;}
.user-greeting{color:#d8d8d8;}
.news-grid,.server-grid,.itemshop-modes-grid{content-visibility:auto;contain-intrinsic-size:1px 900px;}
.itemshop-mode-card{
    border-radius:20px;
    transition:transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.itemshop-mode-card:hover{
    transform:translateY(-3px);
    border-color:rgba(243,156,18,.5);
    box-shadow:0 18px 42px rgba(0,0,0,.42);
}
.mode-title{
    text-transform:none;
    letter-spacing:.02em;
    line-height:1.05;
}
.mode-subtitle{max-width:36ch;line-height:1.55;}
.mode-btn{
    min-height:46px;
    border-radius:999px;
    box-shadow:0 14px 28px rgba(243,156,18,.18);
}
.server-links .news-btn,
.news-actions .news-btn{
    min-width:0;
}
.server-card .news-actions{width:100%;}
@media (max-width: 860px){
    .page-section__header{padding:20px;}
}
html.is-constrained-connection .mode-right{display:none;}
html.is-constrained-connection .mode-left{max-width:none;}
html.is-constrained-connection .itemshop-mode-card{padding-right:18px;}
html.is-constrained-connection .news-card,
html.is-constrained-connection .itemshop-mode-card,
html.is-constrained-connection .server-card{
    box-shadow:none;
    backdrop-filter:none;
}
html.is-constrained-connection *{
    scroll-behavior:auto !important;
}
@media (prefers-reduced-motion: reduce){
    html{scroll-behavior:auto;}
    .news-card,
    .itemshop-mode-card,
    .mode-btn,
    .news-btn{
        transition:none;
    }
}
@media (max-width: 640px){
    .page-section__header{padding:18px;border-radius:20px;}
    .page-kicker{font-size:11px;letter-spacing:.14em;}
    .mode-subtitle{max-width:none;}
}


/* === Aktualności: układ jak serwery + data przy przycisku === */
.news-grid--adaptive{
    grid-template-columns: repeat(var(--news-columns, 3), minmax(0, 1fr));
}
.news-grid--adaptive .news-card{
    height: 100%;
    min-height: 560px;
}
.news-grid--adaptive .news-content{
    height: 100%;
}
.news-bottom{
    margin-top: auto;
    padding-top: 16px;
    border-top: 1px solid #222;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 18px;
}
.news-bottom .news-footer-meta{
    margin: 0;
    padding: 0;
    border: 0;
    text-align: left;
    font-style: normal;
}
.news-actions--card{
    min-height: 0;
    margin-top: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 10px;
}
.news-actions--card .news-btn{
    margin-top: 0;
    min-width: 220px;
}
.news-card-date{
    display: inline-block;
    font-size: 11px;
    line-height: 1.35;
    color: #9d9d9d;
    text-align: right;
    white-space: nowrap;
}
@media (max-width: 1100px){
    .news-grid--adaptive{
        grid-template-columns: repeat(var(--news-columns-md, 2), minmax(0, 1fr));
    }
}
@media (max-width: 768px){
    .news-bottom{
        flex-direction: column;
        align-items: stretch;
    }
    .news-actions--card{
        align-items: stretch;
    }
    .news-card-date{
        text-align: left;
        white-space: normal;
    }
    .news-actions--card .news-btn{
        min-width: 0;
        width: 100%;
    }
}
@media (max-width: 650px){
    .news-grid--adaptive{
        grid-template-columns: 1fr;
    }
}


/* === Aktualności na stronie głównej: ciaśniejszy tytuł + więcej treści === */
.news-grid--adaptive .news-content{
    gap: 8px;
}
.news-grid--adaptive .news-title{
    height: auto;
    min-height: 0;
    margin: 0 0 4px;
    line-height: 1.18;
}
.news-grid--adaptive .news-text{
    margin: 0;
    padding-bottom: 0;
    line-height: 1.6;
    white-space: pre-line;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.news-grid--adaptive[data-news-columns="1"] .news-text{
    -webkit-line-clamp: 16;
}
.news-grid--adaptive[data-news-columns="2"] .news-text{
    -webkit-line-clamp: 13;
}
.news-grid--adaptive[data-news-columns="3"] .news-text{
    -webkit-line-clamp: 10;
}
.news-grid--adaptive[data-news-columns="1"] .news-card.no-image .news-text{
    -webkit-line-clamp: 20;
}
.news-grid--adaptive[data-news-columns="2"] .news-card.no-image .news-text{
    -webkit-line-clamp: 16;
}
.news-grid--adaptive[data-news-columns="3"] .news-card.no-image .news-text{
    -webkit-line-clamp: 12;
}
.news-grid--adaptive .news-bottom{
    padding-top: 12px;
}
@media (max-width: 1100px){
    .news-grid--adaptive[data-news-columns="3"] .news-text{
        -webkit-line-clamp: 12;
    }
    .news-grid--adaptive[data-news-columns="3"] .news-card.no-image .news-text{
        -webkit-line-clamp: 15;
    }
}
@media (max-width: 768px){
    .news-grid--adaptive .news-content{
        gap: 7px;
    }
    .news-grid--adaptive .news-title{
        margin-bottom: 2px;
    }
    .news-grid--adaptive .news-text,
    .news-grid--adaptive[data-news-columns="1"] .news-text,
    .news-grid--adaptive[data-news-columns="2"] .news-text,
    .news-grid--adaptive[data-news-columns="3"] .news-text{
        -webkit-line-clamp: unset;
        overflow: visible;
        display: block;
    }
}

/* ===== v32: stopka + ciasteczka + legal ===== */
.site-footer-line--sub{
    display:flex;
    flex-direction:column;
    align-items:center;
    justify-content:center;
    gap:1px;
    flex-wrap:nowrap;
}
.site-footer-subtext{
    display:block;
}
.site-footer-legal-links{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    gap:8px;
    flex-wrap:wrap;
}
.site-footer-legal-links a{
    color:#b9b9b9;
    text-decoration:none;
}
.site-footer-legal-links a:hover{ color:#f39c12; }
.site-footer-sep{ color:#555; }
.cookie-banner{
    position:fixed;
    left:16px;
    right:16px;
    top:8px;
    bottom:auto;
    z-index:9999;
    display:flex;
    justify-content:center;
    pointer-events:none;
}
.cookie-banner[hidden]{display:none !important;}
.cookie-banner__inner{
    width:min(840px,100%);
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:14px;
    padding:10px 14px;
    border:1px solid rgba(243,156,18,.24);
    background:rgba(12,12,12,.96);
    border-radius:16px;
    box-shadow:0 14px 40px rgba(0,0,0,.45);
    pointer-events:auto;
}
.cookie-banner__text{
    color:#ddd;
    font-size:13px;
    line-height:1.45;
}
.cookie-banner__link{
    color:#ffd75e;
    font-weight:800;
    text-decoration:none;
    white-space:nowrap;
}
.cookie-banner__link:hover,
.cookie-banner__link:focus-visible{
    text-decoration:underline;
}
.cookie-banner__btn{
    min-width:82px;
    height:38px;
    border:0;
    border-radius:12px;
    background:#f39c12;
    color:#111;
    font-weight:900;
    cursor:pointer;
    padding:0 16px;
}
.static-legal-card{
    max-width:980px;
    margin:0 auto;
}
.static-legal-content{
    color:#d8d8d8;
    line-height:1.8;
    white-space:normal;
}
@media (max-width: 760px){
    .cookie-banner__inner{
        flex-direction:column;
        align-items:stretch;
    }
    .cookie-banner__btn{ width:100%; }
}


/* ===== v39: stopka i cookies - poprawki finalne ===== */
.site-footer .container{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:0;}
.site-footer-stack{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:1px;width:100%;}
.site-footer-line--main,.site-footer-line--legal{display:block;width:100%;text-align:center;}
.site-footer-line--legal{margin-top:1px;font-size:13px;line-height:1.15;color:#767676;}
.site-footer-line--legal a{color:#b9b9b9;text-decoration:none;}
.site-footer-line--legal a:hover{color:#f39c12;}
.site-footer-sep{display:inline-block;margin:0 8px;color:#555;}
.site-footer-legal-links,.site-footer-subtext,.site-footer-line--sub{display:none;}
.cookie-banner{pointer-events:none;}
.cookie-banner__inner{pointer-events:auto;}
.cookie-banner__form{margin:0;flex:0 0 auto;}
.cookie-banner__btn{display:inline-flex;align-items:center;justify-content:center;text-decoration:none;}


/* ===== v41: twarde poprawki cookies + stopka ===== */
.site-footer{margin-top:32px;}
.site-footer .container{padding-top:14px;padding-bottom:14px;text-align:center;}
.site-footer-stack--forced-two-lines{display:block;width:100%;text-align:center;}
.site-footer-stack--forced-two-lines .site-footer-line--main{display:block;width:100%;line-height:1.45;}
.site-footer-stack--forced-two-lines .site-footer-line--legal-inline{display:inline-block;margin-top:4px;font-weight:500;font-size:13px;color:#b9b9b9;}
.site-footer-stack--forced-two-lines .site-footer-line--legal-inline a{color:#b9b9b9;text-decoration:none;}
.site-footer-stack--forced-two-lines .site-footer-line--legal-inline a:hover{color:#f39c12;}
.site-footer-stack--forced-two-lines .site-footer-sep{display:inline-block;margin:0 8px;color:#555;}
.cookie-banner__form{display:block;margin:0;flex:0 0 auto;}
.cookie-banner__btn{cursor:pointer;}
