*, *::before, *::after { box-sizing: border-box; }

a { text-decoration: none; }

body {
    margin: 0;
    padding: 0;
    /* Fallback gdy nie ma obrazka tła — ciemny kolor zbliżony do CS-themed */
    background-color: #1a1a1a;
    /* Oryginał: background-image: url("attachments/Header/image_5.jpg")
       cover + bottom center. Wgrasz obraz pod tą ścieżką i zadziała. */
    background-image: url("/attachments/Header/image_5.jpg");
    background-position: bottom center;
    background-repeat: no-repeat;
    background-size: cover;
    background-attachment: fixed;
    color: #fafafa; /* palette-color4-4 */
    font-family: 'Century Gothic', 'Trebuchet MS', sans-serif;
    font-size: 14px;
    min-height: 100vh;
}

/* ── Główne panele z oryginału ────────────────────────────── */
/* Oryginał: #column1-content, #content-content = rgba(0,0,0,0.9) */
#cfn-header,
#cfn-topbar,
#cfn-notifications,
#cfn-content,
#cfn-footer {
    background-color: rgba(0, 0, 0, 0.85);
}

#cfn-header {
    border-bottom: 1px solid rgba(255,255,255,0.08);
    border-radius: 0 0 10px 10px;
    padding: 8px 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

/* ── Logo ─────────────────────────────────────────────────── */
#cfn-logo img {
    max-height: 55px;
    width: auto;
    display: block;
}

#cfn-logo a { text-decoration: none; }

/* ── Nawigacja — odtworzona z .linkmenumain ────────────────── */
/* Oryginał:
   .linkmenumain { font-family: Century Gothic; font-size: 13px;
   background: rgba(68,68,68,.5); border-radius: 5px; padding: 2px; margin: 1px; }
   .linkmenumain:hover { background: rgba(34,34,34,.5); }
*/
#cfn-nav {
    flex: 1;
}

#cfn-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 1px;
}

#cfn-nav ul li a {
    display: block;
    font-family: 'Century Gothic', sans-serif;
    font-size: 13px;
    color: #fafafa;
    background: rgba(68, 68, 68, 0.5);
    border-radius: 5px;
    padding: 3px 8px;
    margin: 1px;
    text-decoration: none;
    white-space: nowrap;
    transition: background 0.1s linear;
}

#cfn-nav ul li a:hover,
#cfn-nav ul li.active a {
    background: rgba(34, 34, 34, 0.5);
    color: #fff;
    text-decoration: none;
}

/* ── Userbar ──────────────────────────────────────────────── */
#cfn-userbar {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: #fafafa;
    white-space: nowrap;
    font-family: 'Century Gothic', sans-serif;
}

#cfn-userbar img { border-radius: 4px; }

/* ── Topbar (pasek języka i supportu) ─────────────────────── */
#cfn-topbar {
    padding: 4px 12px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}

#cfn-topbar table { width: 100%; }

/* .palette-color4-4 = #fafafa — oryginalna klasa */
.palette-color4-4 { color: #fafafa; }

/* animweapons — z oryginału */
img.animweapons:hover,
.animweapons:hover {
    filter: alpha(Opacity=50);
    opacity: 0.5;
}

/* ── Powiadomienia ────────────────────────────────────────── */
#cfn-notifications {
    padding: 4px 12px;
}

#cfn-notifications table { margin-bottom: 3px; }

/* ── Treść ────────────────────────────────────────────────── */
#cfn-content {
    padding: 10px 12px;
    min-height: 350px;
    border-radius: 10px;
    margin: 6px 0;
}

/* ── Stopka ───────────────────────────────────────────────── */
#cfn-footer {
    border-top: 1px solid rgba(255,255,255,0.06);
    border-radius: 10px 10px 0 0;
    padding: 8px 12px;
}

/* ── Tabele — .table_dark z oryginału ─────────────────────── */
/* Oryginał:
   .table_dark th { color: #EDB749; border-bottom: 1px solid #808080; padding: 12px 17px; }
   .table_dark td { color: #CAD4D6; border-bottom: 1px solid #808080; padding: 12px 17px; }
   .table_dark tr:hover td { background-color: #484848; }
*/
.table_dark {
    font-family: 'Century Gothic', sans-serif;
    font-size: 14px;
    width: 100%;
    text-align: left;
    border-collapse: collapse;
}

.table_dark th {
    color: #EDB749;
    border-bottom: 1px solid #808080;
    padding: 12px 17px;
}

.table_dark td {
    color: #CAD4D6;
    border-bottom: 1px solid #808080;
    padding: 12px 17px;
}

.table_dark tr:last-child td { border-bottom: none; }

.table_dark tr:hover td { background-color: #484848; }

/* Generyczne tabele w treści */
#cfn-content table { border-collapse: collapse; }
#cfn-content td, #cfn-content th { vertical-align: top; }

/* ── Inputy — .myinput z oryginału ───────────────────────── */
/* Oryginał:
   .myinput { background: transparent; border: 1px ridge white;
   width: 150px; height: 18px; font-family: Century Gothic; font-size: 13px; color: white; }
*/
.myinput,
input[type="text"],
input[type="password"],
input[type="number"],
input[type="email"],
textarea,
select {
    background: transparent;
    border: 1px ridge rgba(255,255,255,0.6);
    font-family: 'Century Gothic', sans-serif;
    font-size: 13px;
    color: #fff;
    border-radius: 3px;
    padding: 3px 6px;
    outline: none;
}

input[type="text"]:focus,
input[type="password"]:focus,
input[type="number"]:focus,
textarea:focus,
select:focus {
    border-color: rgba(255,255,255,0.9);
}

textarea { resize: none; }

/* ── Przyciski — .mybutton z oryginału ───────────────────── */
/* Oryginał: gradient #f6f6f6→#d4d4d4, border: 1px solid #a1a1a1 */
.mybutton,
button[type="submit"],
button[type="button"] {
    font-family: 'Century Gothic', sans-serif;
    font-size: 13px;
    font-weight: bold;
    color: #717171;
    cursor: pointer;
    border-radius: 4px;
    border: 1px solid #a1a1a1;
    background: #f6f6f6;
    background: linear-gradient(to bottom, #f6f6f6, #d4d4d4);
    box-shadow:
        inset 0 0 0 1px rgba(255,255,255,0.2),
        inset 0 0 6px 0 rgba(255,255,255,0.3),
        0 1px 2px rgba(0,0,0,0.4);
    padding: 4px 12px;
    text-decoration: none;
    transition: background 0.1s;
}

.mybutton:hover,
button[type="submit"]:hover,
button[type="button"]:hover {
    background: #f6f6f6;
    background: linear-gradient(to bottom, #f6f6f6, #ececec);
    color: #555;
}

/* ── Specjalne linki — .myspeciallink (zielony przycisk) ──── */
/* Oryginał: rgb(43,153,91) → rgb(75,183,141) */
a.myspeciallink,
a.myspeciallink2 {
    border-radius: 10px;
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.2),
        0 1px 2px rgba(0,0,0,0.08);
    color: #fff;
    display: block;
    text-align: center;
    font-family: 'Century Gothic', sans-serif;
    font-size: 12px;
    padding: 8px 16px;
    text-decoration: none;
    text-shadow: 0 1px 1px rgba(0,0,0,0.075);
    background-color: rgb(43, 153, 91);
    border: 1px solid rgb(33, 126, 74);
    transition: background-color 0.1s linear;
}

a.myspeciallink { width: 150px; }
a.myspeciallink2 { width: 100px; }

a.myspeciallink:hover,
a.myspeciallink2:hover {
    background-color: rgb(75, 183, 141);
    text-decoration: none;
}

/* ── Tooltip z oryginału ──────────────────────────────────── */
.tooltip { display: inline; position: relative; }

.tooltip:hover:after {
    border: 1px solid #ccc;
    background: rgba(0,0,0,1);
    border-radius: 10px;
    bottom: 26px;
    color: #fff;
    font-family: 'Century Gothic', sans-serif;
    font-size: 12px;
    text-align: center;
    content: attr(title);
    left: 20%;
    padding: 5px 15px;
    position: absolute;
    z-index: 98;
    width: 220px;
}

.tooltip:hover:before {
    border: solid;
    border-color: #333 transparent;
    border-width: 6px 6px 0 6px;
    bottom: 20px;
    content: "";
    left: 50%;
    position: absolute;
    z-index: 99;
}

/* ── Przycisk "do góry" — .topbutton z oryginału ─────────── */
.topbutton {
    width: 100px;
    border: 1px solid #ccc;
    background: rgba(0,0,0,1);
    text-align: center;
    padding: 10px;
    position: fixed;
    bottom: 50px;
    right: 50px;
    cursor: pointer;
    color: #fff;
    font-family: 'Century Gothic', sans-serif;
    font-size: 12px;
    border-radius: 10px;
    text-decoration: none;
    display: block;
    z-index: 100;
}

/* ── Tekstowe style oryginalne ────────────────────────────── */
.avatarprofile { transition: 0.5s; }
.avatarprofile:hover { transform: scale(3.0); }

/* ── Avatar / profil ─────────────────────────────────────── */
.myinputfile { font-family: 'Century Gothic', sans-serif; }

.mytextarea {
    background: transparent;
    border: 1px ridge white;
    width: 250px;
    height: 50px;
    font-family: 'Century Gothic', sans-serif;
    font-size: 15px;
    color: white;
}

/* ── Responsywność ────────────────────────────────────────── */
@media (max-width: 768px) {
    #cfn-header {
        flex-direction: column;
        align-items: flex-start;
        padding: 6px 8px;
    }

    #cfn-nav ul li a {
        font-size: 11px;
        padding: 2px 5px;
    }

    #cfn-content { padding: 8px; }

    #cfn-topbar { padding: 3px 8px; font-size: 12px; }

    .topbutton { right: 10px; bottom: 10px; width: 70px; font-size: 11px; }
}
