/* =================== RESET =================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* =================== KOLORY: JASNY / CIEMNY =================== */
body.light {
    --bg: #f4f4f4;
    --bg2: #ffffff;
    --text: #000000;
    --accent: #cc0000; /* świąteczna czerwień */
}

body.dark {
    --bg: #1a1a1a;
    --bg2: #2b2b2b;
    --text: #ffffff;
    --accent: #b30000; /* ciemniejsza świąteczna czerwień */
}

/* =================== GLOBAL =================== */
body {
    background: linear-gradient(120deg, var(--bg), var(--bg2));
    background-size: 400% 400%;
    animation: bgShift 15s ease infinite;
    color: var(--text);
    font-family: "Georgia", "Poppins", Arial, sans-serif;
    transition: background 0.25s, color 0.25s;
    overflow-x: hidden;
    line-height: 1.7;
    text-align: center;
}

/* =================== HEADER =================== */
header {
    background: var(--bg2);
    padding: 15px;
    border-bottom: 2px solid var(--accent);
    position: sticky;
    top: 0;
    z-index: 999;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* =================== HAMBURGER =================== */
.hamburger {
    width: 45px;
    height: 35px;
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    background: var(--bg2);
    border: 2px solid var(--accent);
    border-radius: 8px;
    padding: 5px;
    cursor: pointer;
    z-index: 1010;
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hamburger:hover {
    transform: translateY(-50%) scale(1.1) rotate(3deg);
    box-shadow: 0 6px 12px rgba(0,0,0,0.3);
}

.hamburger span {
    width: 100%;
    height: 5px;
    background: var(--accent);
    border-radius: 5px;
    transition: all 0.3s ease;
}

/* =================== MENU =================== */
nav {
    position: fixed;
    top: 0;
    left: -260px;
    width: 250px;
    height: 100vh;
    background: var(--bg2);
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    transition: left 0.3s ease;
    border-right: 2px solid var(--accent);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

nav.open {
    left: 0;
}

nav button {
    padding: 12px 20px;
    font-size: 16px;
    border: 2px solid var(--accent);
    background: linear-gradient(45deg, var(--accent), #ff5555);
    color: #fff;
    cursor: pointer;
    border-radius: 12px;
    transition: transform 0.35s ease, background 0.35s ease, box-shadow 0.35s ease;
    animation: pulse 3s infinite alternate;
    text-align: center;
}

nav button:hover {
    background: linear-gradient(45deg, #ff5555, #cc0000);
    box-shadow: 0 0 15px var(--accent);
    transform: scale(1.1) rotate(-2deg);
}

/* =================== OVERLAY =================== */
#overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.25);
    opacity: 0;
    pointer-events: none;
    transition: 0.25s;
    z-index: 999;
}

nav.open ~ #overlay {
    opacity: 1;
    pointer-events: all;
}

/* =================== MAIN =================== */
main {
    padding: 20px;
    max-width: 700px;
    margin: 0 auto;
    text-align: center;
}

main h1 {
    font-size: 3em;
    margin-bottom: 20px;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.2);
}

main h2 {
    color: var(--accent);
    margin-bottom: 10px;
    letter-spacing: 1px;
    text-align: center;
}

/* =================== BUTTONY =================== */
button, a button {
    background: linear-gradient(45deg, var(--accent), #ff5555);
    border: none;
    padding: 14px 22px;
    border-radius: 12px;
    color: #fff;
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.3s ease, filter 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    font-family: "Georgia", serif;
    text-align: center;
}

button:hover, a button:hover {
    filter: brightness(1.2);
    transform: scale(1.1) rotate(-2deg);
    box-shadow: 0 0 20px var(--accent), 0 0 40px rgba(255,0,0,0.2);
}

/* =================== FOOTER =================== */
footer {
    text-align: center;
    padding: 20px;
    margin-top: 20px;
    border-top: 2px solid var(--accent);
    background: var(--bg2);
    font-family: "Georgia", serif;
}

/* =================== ŚNIEŻYNKI =================== */
.snowflake {
    position: fixed;
    top: -10px;
    color: #fff;
    pointer-events: none;
    font-size: 8px;
    opacity: 0.6;
    animation: fall linear infinite;
    z-index: 9999;
    text-shadow: 0 0 2px #fff;
}

@keyframes fall {
    from { transform: translateY(-10px); }
    to   { transform: translateY(110vh); }
}

/* =================== RESPONSYWNOŚĆ =================== */
@media (max-width: 900px) {
    nav {
        width: 200px;
        justify-content: flex-start; 
        align-items: center; 
        padding-top: 80px; 
        gap: 12px;
    }
    .hamburger {
        width: 40px;
        height: 32px;
        left: 10px;
        top: 15px;
    }
    nav button {
        font-size: 14px;
        padding: 10px 18px;
        width: 90%;
        text-align: center;
    }
}

@media (min-width: 901px) {
    nav {
        position: static;
        width: 100%;
        height: auto;
        flex-direction: row;
        justify-content: center;
        align-items: center;
        gap: 20px;
        border: none;
        padding: 15px 0;
    }
    .hamburger {
        display: none; 
    }
    nav button {
        padding: 10px 20px;
        font-size: 16px;
        animation: none;
    }
}

/* =================== ŚWIĄTECZNE DODATKI =================== */
body.light::after, body.dark::after {
    content: "";
    position: fixed;
    width: 100%;
    height: 100%;
    pointer-events: none;
    top: 0;
    left: 0;
    background-image: radial-gradient(rgba(255,255,255,0.05) 1px, transparent 1px);
    background-size: 10px 10px;
    animation: sparkle 2s infinite linear;
    z-index: 998;
}

@keyframes sparkle {
    0% { background-position: 0 0; }
    100% { background-position: 10px 10px; }
}

@keyframes pulse {
    0% { box-shadow: 0 0 5px var(--accent); }
    50% { box-shadow: 0 0 15px var(--accent); }
    100% { box-shadow: 0 0 5px var(--accent); }
}

@keyframes bgShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* =================== MAŁE TELEFONY — MOCNY FIX =================== */
@media (max-width: 600px) {

    /* Zero przesuwania ekranu */
    html, body {
        overflow-x: hidden !important;
        max-width: 100% !important;
    }

    /* Naprawa gigantycznego h1 */
    main h1 {
        font-size: 1.9em !important;    /* zmniejszone */
        line-height: 1.25 !important;
        word-wrap: break-word !important;
        overflow-wrap: break-word !important;
        hyphens: auto !important;
        max-width: 100% !important;
    }

    /* Gwarancja że main nie robi overflow */
    main {
        padding: 15px !important;
        max-width: 100% !important;
    }

    /* Fix na header, bo on często powoduje przesuwanie */
    header {
        width: 100% !important;
        max-width: 100% !important;
        overflow: hidden !important;
    }

    /* Menu */
    nav {
        max-width: 200px !important;
    }

    /* Przyciski w menu */
    nav button {
        width: 100% !important;
    }

    /* Fix EMOJI – wymusza użycie tej samej rodziny co na kompie */
    body, button, nav button, h1, h2, p {
        font-family: "Georgia", "Poppins", Arial, sans-serif !important;
    }
}
