/* === RESET I PODSTAWA === */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background: #000;
    color: #ddd;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
}

/* === 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;
}

.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: 25px 0 15px; 
    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: 8px; 
    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: 25px;
}

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

.news-card img {
    height: 190px;
    width: 100%;
    object-fit: cover;
    border-bottom: 1px solid #222;
}

.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 === */
.site-footer{
    border-top: 1px solid #222;
    background: #0a0a0a;
    padding: 18px 0;
    margin-top: 35px;
}
.site-footer-text{
    color: #666;
    font-size: 12px;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.6px;
}


/* === 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: cover; 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;}
