/* =============================
   Czcionki i zmienne
   ============================= */
@import url('https://fonts.googleapis.com/css2?family=MedievalSharp&display=swap');

:root {
    --bg: #080808;
    --bg2: #141414;
    --gold: #d4af37;
    --amber: #b8741a;
    --stone: #2a2a2c;
    --text: #e5e5e5;
    --muted: #9a9aa0;
    --danger: #b02e2e;
    --success: #4ca64c;
}

/* =============================
   Reset i body
   ============================= */
* { box-sizing: border-box; margin: 0; padding: 0 }
html, body { height: 100% }
body {
    font-family: 'MedievalSharp', 'Times New Roman', serif;
    background: linear-gradient(to bottom, var(--bg), var(--bg2));
    color: var(--text);
    line-height: 1.5;
}

/* Tło */
body::before {
    content: "";
    position: fixed;
    inset: 0;
    background: url('/bg.jpg') center/cover no-repeat;
    opacity: 0.9;
    filter: grayscale(.3) contrast(1.15) brightness(.85);
    pointer-events: none;
    z-index: 0;
}

/* Subtelna tekstura */
body {
    background: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABAQMAAAAl21bKAAAABlBMVEX///8AAABVwtN+AAAAAXRSTlMAQObYZgAAAApJREFUCNdjYAAAAAIAAeIhvDMAAAAASUVORK5CYII=') repeat;
}

/* =============================
   Nawigacja
   ============================= */
.nav {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    justify-content: space-between; /* brand po lewej, menu po prawej */
    align-items: center;
    padding: 12px 24px;
    background: rgba(10, 10, 10, 0.75);
    backdrop-filter: blur(6px);
    border-bottom: 2px solid #1f1f1f;
    box-shadow: 0 6px 20px rgba(0,0,0,.6);
}

.brand {
    font-size: 30px;
    color: var(--gold);
    text-shadow: 2px 2px 2px #000, 0 0 12px var(--amber);
    letter-spacing: 2px;
}

.menu {
    display: flex;
    gap: 14px;
}

.menu a {
    padding: 10px 16px;
    border: 1px solid #3a3a3f;
    border-radius: 8px;
    color: var(--text);
    text-decoration: none;
    transition: .25s;
    background: linear-gradient(145deg,#1a1a1c,#0e0e10);
    font-size: 15px;
}
.menu a:hover,
.menu a.active {
    border-color: var(--gold);
    color: var(--gold);
    box-shadow: 0 0 8px rgba(212,175,55,.4),
                inset 0 0 8px rgba(184,116,26,.2);
}

/* =============================
   Layout strony
   ============================= */
.page {
    display: flex;
    gap: 24px;
    max-width: 1300px;
    margin: 40px auto;
    padding: 0 20px;
    position: relative;
    z-index: 5;
}

.main { flex: 3 }
.sidebar {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* =============================
   Panele
   ============================= */
.panel {
    position: relative;
    background: rgba(18,18,18,0.92);
    border: 1px solid #2b2b2e;
    border-radius: 12px;
    box-shadow: 0 0 25px rgba(0,0,0,.5), inset 0 0 12px rgba(184,116,26,.08);
    overflow: hidden;
}
.panel::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 1px;
    background: linear-gradient(135deg,rgba(212,175,55,.4),transparent,rgba(184,116,26,.25));
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
}
.content {
    padding: 28px;
    position: relative;
    z-index: 2;
}

/* =============================
   Formularze
   ============================= */
form {
    background: rgba(20, 20, 20, 0.95);
    border: 2px solid #444;
    border-radius: 8px;
    padding: 24px;
    box-shadow: 0 0 18px rgba(0,0,0,.6);
    text-align: center;
}

form h2 {
    margin-bottom: 20px;
    font-size: 24px;
    color: var(--gold);
    text-shadow: 2px 2px #000;
    animation: flicker 3s infinite;
}

input, button {
    font-family: inherit;
}

input {
    width: 100%;
    padding: 12px;
    margin: 10px 0;
    background: #111;
    border: 1px solid #333;
    border-radius: 6px;
    color: var(--text);
    font-size: 15px;
    transition: .25s;
}
input:focus {
    border-color: var(--gold);
    box-shadow: 0 0 12px rgba(212,175,55,.3);
    outline: none;
}

button {
    width: 100%;
    padding: 12px;
    margin-top: 14px;
    border: 1px solid #424247;
    border-radius: 6px;
    background: linear-gradient(145deg,#2a2a2e,#121214);
    color: var(--gold);
    font-size: 16px;
    cursor: pointer;
    transition: .25s;
    text-shadow: 1px 1px #000;
}
button:hover {
    transform: translateY(-1px);
    background: linear-gradient(#333, #111);
    box-shadow: 0 6px 15px rgba(0,0,0,.4),
                0 0 10px rgba(212,175,55,.25);
}

/* =============================
   Alerty
   ============================= */
.alert { margin-bottom: 10px }
.alert.success { color: var(--success) }
.alert.error { color: var(--danger) }

/* =============================
   Efekty
   ============================= */
@keyframes flicker {
    0%, 18%, 22%, 25%, 53%, 57%, 100% { opacity: 1; }
    20%, 24%, 55% { opacity: 0.4; }
}

/* =============================
   Tabele (ranking)
   ============================= */
table { width: 100%; border-collapse: collapse; margin-top: 10px }
th, td {
    padding: 10px;
    border-bottom: 1px solid #2e2e33;
    text-align: left;
}
th {
    color: var(--gold);
    font-weight: normal;
}
tr:hover { background: #121214 }

/* =============================
   Footer
   ============================= */
footer {
    opacity: .7;
    text-align: center;
    padding: 24px 0;
    font-size: 14px;
    color: var(--muted);
}
.form-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;   /* wyśrodkowanie poziome */
    justify-content: center; /* wyśrodkowanie pionowe, jeśli chcesz */
    min-height: 70vh;      /* wysokość kontenera, żeby środek był mniej więcej w pionie */
    gap: 20px;
}
form {
    max-width: 420px;
    width: 100%;
}
