:root {
    --gold: #ffd700;
    --silver: #c0c0c0;
    --bronze: #cd7f32;
    --bg: #1a1a1a;
    --panel: #2b2b2b;
    --text: #e0e0e0;
    --muted: #999;
    --accent: #1ae65d;
    --line: #3a3a3a;
    --content-width: 760px;
}

* {
    -webkit-tap-highlight-color: transparent;
    box-sizing: border-box;
}

html {
    height: 100%;
}

body {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    min-height: 100%;
    margin: 0;
    padding: 0;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    background-color: var(--bg);
    color: var(--text);
    overflow-x: hidden;
}

/* Zaznaczanie tekstu blokujemy tylko na ekranie gry – strony z treścią
   muszą być normalnie czytelne i kopiowalne (wymóg czytelności AdSense). */
body.game-page,
body.game-page * {
    -webkit-user-select: none;
    user-select: none;
}

a {
    color: var(--accent);
}

/* ---------- Nagłówek i nawigacja ---------- */

.site-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px 24px;
    width: 100%;
    max-width: 1100px;
    padding: 14px 20px;
    border-bottom: 1px solid var(--line);
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 18px;
    font-weight: 700;
    color: var(--text);
    text-decoration: none;
}

.brand-mark {
    width: 30px;
    height: 30px;
}

.site-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.site-nav a {
    padding: 7px 12px;
    border-radius: 8px;
    font-size: 15px;
    color: #bdbdbd;
    text-decoration: none;
}

.site-nav a:hover {
    background: #262626;
    color: #fff;
}

.site-nav a.active {
    background: #262626;
    color: var(--accent);
}

/* ---------- Ekran gry ---------- */

.game-page main {
    position: relative;
    text-align: center;
    flex-shrink: 0;
    margin-bottom: 20px;
    padding-top: 20px;
}

#scores-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    width: 100%;
    max-width: 900px;
    padding: 0 20px;
    margin-top: 60px;
}

.score-panel {
    background: var(--panel);
    padding: 15px 20px;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    text-align: center;
}

#world-highscore-panel {
    border: 2px solid #a1883b;
}

.score-panel h3 {
    margin: 0 0 10px 0;
    font-size: 16px;
    color: #ccc;
}

#mushroom {
    width: 250px;
    height: 250px;
    cursor: pointer;
}

.cap {
    fill: #808080;
    transition: fill 0.3s;
}

.stem {
    fill: #8b4513;
    transition: fill 0.3s;
}

.dots {
    fill: #fff;
    opacity: 0.6;
}

.message-container {
    margin-top: 20px;
    font-size: 24px;
    font-weight: bold;
    height: 60px;
    color: #ccc;
}

#celebration-message {
    font-size: 1.2em;
    line-height: 1.2;
    color: #fff;
    text-shadow: 0 0 8px gold;
}

#play-again-message {
    font-size: 0.8em;
    color: #ccc;
    margin-top: 10px;
}

.hidden {
    display: none;
}

#fireworks-container {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    pointer-events: none;
    z-index: 10;
}

.firework {
    --tx: 0px;
    --ty: 0px;
    position: absolute;
    width: 10px;
    height: 10px;
    background: #fff;
    border-radius: 50%;
    opacity: 0;
    box-shadow: 0 0 12px currentColor;
}

#fireworks-container.active .firework {
    animation: firework-explode 1s ease-out;
}

@keyframes firework-explode {
    0% {
        transform: translate(0, 0) scale(0.2);
        opacity: 1;
    }
    80% {
        opacity: 1;
    }
    100% {
        transform: translate(var(--tx), var(--ty)) scale(1.6);
        opacity: 0;
    }
}

/* ---------- Strony z treścią ---------- */

.page {
    width: 100%;
    max-width: var(--content-width);
    padding: 32px 20px 50px;
    line-height: 1.65;
    font-size: 17px;
}

.page h1 {
    margin: 0 0 8px;
    font-size: 32px;
    line-height: 1.2;
}

.page .lead {
    margin: 0 0 28px;
    font-size: 19px;
    color: #b9b9b9;
}

.page h2 {
    margin: 36px 0 12px;
    font-size: 23px;
    border-bottom: 1px solid var(--line);
    padding-bottom: 6px;
}

.page h3 {
    margin: 26px 0 8px;
    font-size: 18px;
    color: #ddd;
}

.page p,
.page li {
    color: #cfcfcf;
}

.page ul,
.page ol {
    padding-left: 22px;
}

.page li {
    margin-bottom: 8px;
}

.page strong {
    color: #fff;
}

.page table {
    width: 100%;
    border-collapse: collapse;
    margin: 18px 0;
    font-size: 16px;
}

.page th,
.page td {
    padding: 9px 12px;
    border-bottom: 1px solid var(--line);
    text-align: left;
}

.page th {
    color: #fff;
    background: #232323;
}

.page tbody tr:nth-child(even) {
    background: #202020;
}

.table-wrap {
    overflow-x: auto;
}

.callout {
    margin: 22px 0;
    padding: 16px 18px;
    background: var(--panel);
    border-left: 3px solid var(--accent);
    border-radius: 6px;
}

.callout p:first-child {
    margin-top: 0;
}

.callout p:last-child {
    margin-bottom: 0;
}

.cta {
    display: inline-block;
    margin: 8px 0 4px;
    padding: 12px 22px;
    border: 0;
    background: var(--accent);
    color: #0d240f;
    font: inherit;
    font-weight: 700;
    line-height: 1.2;
    border-radius: 8px;
    text-decoration: none;
}

button.cta {
    cursor: pointer;
}

.cta:hover {
    filter: brightness(1.1);
}

.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 14px;
    margin: 22px 0;
}

.stat {
    padding: 14px 16px;
    background: var(--panel);
    border-radius: 10px;
    text-align: center;
}

.stat .value {
    display: block;
    font-size: 26px;
    font-weight: 700;
    color: #fff;
}

.stat .label {
    font-size: 13px;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.rank-1 td:first-child {
    color: var(--gold);
    font-weight: 700;
}

.rank-2 td:first-child {
    color: var(--silver);
    font-weight: 700;
}

.rank-3 td:first-child {
    color: var(--bronze);
    font-weight: 700;
}

.faq-q {
    margin: 26px 0 6px;
    font-size: 18px;
    font-weight: 700;
    color: #fff;
}

.updated {
    color: var(--muted);
    font-size: 14px;
}

.contact-form {
    display: grid;
    gap: 8px;
    max-width: 680px;
    margin: 28px 0 16px;
}

.contact-form label {
    margin-top: 10px;
    color: #fff;
    font-weight: 700;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    box-sizing: border-box;
    padding: 11px 12px;
    border: 1px solid #444;
    border-radius: 8px;
    background: #222;
    color: #fff;
    font: inherit;
}

.contact-form textarea {
    resize: vertical;
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: 2px solid var(--accent);
    outline-offset: 1px;
}

/* ---------- Tips index ---------- */

.tips-featured {
    display: grid;
    grid-template-columns: minmax(260px, 0.95fr) minmax(280px, 1.05fr);
    gap: 26px;
    margin: 28px 0 42px;
    overflow: hidden;
    background: linear-gradient(135deg, #272727, #1f1f1f);
    border: 1px solid #3a3a3a;
    border-radius: 16px;
}

.tip-image,
.tip-card-image {
    display: block;
    overflow: hidden;
    background: #151515;
}

.tip-image img,
.tip-card-image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 180ms ease, filter 180ms ease;
    border-radius: 10px;
}

.tip-image {
    min-height: 280px;
}

.tip-image:hover img,
.tip-card-image:hover img {
    transform: scale(1.035);
    filter: brightness(1.08);
}

.tip-featured-copy {
    align-self: center;
    padding: 28px 30px 28px 0;
}

.tip-kicker {
    margin: 0 0 8px !important;
    color: var(--accent) !important;
    font-size: 13px !important;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.tip-featured-copy h2,
.tip-card h3 {
    margin-top: 0;
    border: 0;
    padding: 0;
}

.tip-featured-copy h2 a,
.tip-card h3 a {
    color: #fff;
    text-decoration: none;
}

.tip-featured-copy h2 a:hover,
.tip-card h3 a:hover {
    color: var(--accent);
}

.tip-link {
    color: var(--accent);
    font-weight: 700;
    text-decoration: none;
}

.tip-link:hover {
    color: #fff;
}

.tips-section-title {
    margin-top: 0 !important;
}

.tip-card {
    overflow: hidden;
    background: var(--panel);
    border: 1px solid #363636;
    border-radius: 14px;
    transition: transform 180ms ease, border-color 180ms ease;
}

.tip-card:hover {
    transform: translateY(-3px);
    border-color: #5f8f62;
}

.tip-card-image {
    aspect-ratio: 16 / 8;
}

.tip-card-body {
    padding: 20px 22px 24px;
}

.tip-card-body h3 {
    font-size: 21px;
}

.tip-card-body p:last-of-type {
    min-height: 52px;
}

.article-hero {
    display: block;
    width: 100%;
    max-width: 720px;
    height: 360px;
    margin: 18px 0 28px;
    object-fit: cover;
    border-radius: 10px;
}

.related-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 18px;
}

.related-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 10px;
    background: var(--panel);
    border: 1px solid #363636;
    border-radius: 10px;
    color: #fff;
    text-decoration: none;
    transition: border-color 180ms ease, transform 180ms ease;
}

.related-item:hover {
    border-color: #5f8f62;
    transform: translateX(3px);
}

.related-item img {
    flex: 0 0 82px;
    width: 82px;
    height: 82px;
    object-fit: cover;
    border-radius: 10px;
}

.related-item span {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.related-item strong {
    color: #fff;
}

.related-item small {
    color: var(--muted);
    font-size: 13px;
}

/* ---------- Stopka ---------- */

.site-footer {
    width: 100%;
    max-width: 1100px;
    margin-top: auto;
    padding: 28px 20px 32px;
    border-top: 1px solid var(--line);
    text-align: center;
    font-size: 14px;
    color: #777;
}

.footer-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px 20px;
    margin-bottom: 12px;
}

.site-footer a {
    color: #999;
    text-decoration: none;
}

.site-footer a:hover {
    text-decoration: underline;
}

@media (max-width: 768px) {
    #scores-container {
        grid-template-columns: 1fr;
        max-width: 340px;
        margin-top: 40px;
    }

    .site-header {
        justify-content: center;
    }

    .site-nav {
        justify-content: center;
    }

    .page {
        font-size: 16px;
        padding-top: 24px;
    }

    .page h1 {
        font-size: 27px;
    }

    .tips-featured {
        grid-template-columns: 1fr;
    }

    .tip-featured-copy {
        padding: 24px;
    }

    .related-item img {
        flex-basis: 70px;
        width: 70px;
        height: 70px;
    }
}
