/* Shared styles for the guide pages (study-with-me, pomodoro-timer, adhd-focus-app) and the windows and linux pages.
   Tokens and components match index.html; change both together. */
@font-face {
    font-family: 'Pixeldoro';
    src: url('fonts/pixeldoro.woff2') format('woff2');
    font-display: swap;
}

:root {
    --blue: #228bdc;
    --orange: #edb83f;
    --red: #bf1d1d;
    --red-dark: #8a1414;
    --white: #ffffff;
    --dark: #212b2c;
    --on-bg: #ffffff;
    --on-bg-muted: rgba(255, 255, 255, 0.82);
    --pixel: 'Pixeldoro', 'Courier New', monospace;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--pixel);
    background-color: #060f1a;
    color: var(--on-bg);
    text-shadow: 0 2px 0 rgba(0, 0, 0, 0.35);
    line-height: 1.5;
    -webkit-font-smoothing: none;
}

a {
    color: inherit;
}

/* The game's Urban_Night1 scene behind the whole page */
.backdrop {
    position: fixed;
    z-index: -1;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    height: 100lvh;
    background: #060f1a url('images/bg-urban-night.webp') center / cover no-repeat;
    image-rendering: pixelated;
}

.backdrop::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(rgba(33, 43, 44, 0.5), rgba(33, 43, 44, 0.7));
}

/* No rubber-band bounce: it pulls the page off the fixed backdrop */
html {
    overscroll-behavior: none;
}

/* Nav: home on the left, socials on the right */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px 18px;
    padding: 16px 24px;
}

.home {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 20px;
    text-decoration: none;
}

.home img {
    width: 28px;
    height: 28px;
    image-rendering: pixelated;
}

nav {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 18px;
    font-size: 15px;
}

nav a {
    text-decoration: none;
    color: var(--on-bg-muted);
}

nav a:hover {
    color: var(--on-bg);
}

/* Hero */
.guide-hero {
    max-width: 860px;
    margin: 0 auto;
    padding: 40px 16px 32px;
    text-align: center;
}

.eyebrow {
    font-size: 15px;
    color: var(--orange);
    margin-bottom: 10px;
}

h1 {
    font-size: 45px;
    font-weight: normal;
    line-height: 1.15;
    margin-bottom: 18px;
}

.lead {
    max-width: 680px;
    margin: 0 auto 26px;
    font-size: 20px;
    color: var(--on-bg-muted);
}

.facts {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 22px;
    list-style: none;
}

.facts li {
    padding: 4px 12px;
    border: 2px solid rgba(255, 255, 255, 0.5);
    border-radius: 8px;
    background: rgba(33, 43, 44, 0.6);
    font-size: 15px;
}

/* Call to action: one variant per device, desktop is the no-JS default */
.cta-ios,
.cta-android,
[data-device="ios"] .cta-desktop,
[data-device="android"] .cta-desktop {
    display: none;
}

[data-device="ios"] .cta-ios,
[data-device="android"] .cta-android {
    display: block;
}

.btn-play {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 16px 40px;
    background: var(--red);
    color: var(--white);
    font-size: 25px;
    text-decoration: none;
    border-radius: 12px;
    box-shadow: 0 5px 0 var(--red-dark);
    transition: transform 0.1s ease, box-shadow 0.1s ease;
}

/* The play arrow is its own icon, nudged a touch below the middle of the lowercase letters */
.play-icon {
    position: relative;
    top: 4px;
    width: 9px;
    height: 15px;
    fill: currentColor;
    shape-rendering: crispEdges;
}

.btn-play:hover {
    transform: translateY(-2px);
    box-shadow: 0 7px 0 var(--red-dark);
}

.btn-play:active {
    transform: translateY(4px);
    box-shadow: 0 1px 0 var(--red-dark);
}

.store-badge img {
    width: 220px;
    height: auto;
    display: block;
    margin: 0 auto;
}

.cta-note,
.other-platforms,
.ratings {
    font-size: 15px;
    color: var(--on-bg-muted);
    margin-top: 12px;
}

.other-platforms {
    margin-top: 6px;
}

.ratings {
    margin-top: 18px;
}

.ratings b {
    font-weight: normal;
    white-space: nowrap;
}

.ratings span {
    color: var(--orange);
}

/* Sections */
section {
    max-width: 1080px;
    margin: 0 auto;
    padding: 24px 16px 56px;
    text-align: center;
}

.narrow {
    max-width: 760px;
}

.section-title {
    font-size: 30px;
    font-weight: normal;
    margin-bottom: 24px;
}

.shot {
    max-width: 960px;
    margin: 0 auto;
    padding: 0 16px 56px;
    text-align: center;
}

.shot img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    border: 4px solid var(--white);
    border-radius: 14px;
    background: var(--dark);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

.shot figcaption {
    font-size: 20px;
    margin-top: 12px;
}

.card,
.tool,
.review,
.faq details {
    border: 3px solid var(--white);
    border-radius: 14px;
    background: rgba(33, 43, 44, 0.75);
    box-shadow: 0 4px 0 rgba(0, 0, 0, 0.35);
}

.tool-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}

.tool {
    padding: 24px 18px;
    overflow-wrap: break-word;
}

/* Long words in other languages (stundenplan-vorlage, останавливаются) */
html:not([lang="en"]) .tool,
html:not([lang="en"]) .footer-cols {
    hyphens: auto;
}

.tool img {
    width: 44px;
    height: 44px;
    image-rendering: pixelated;
    margin-bottom: 12px;
}

.tool h3 {
    font-size: 20px;
    font-weight: normal;
    margin-bottom: 8px;
}

.tool p {
    font-size: 15px;
    color: var(--on-bg-muted);
}

/* Explainer and how-to cards: left-aligned reading text */
.card {
    padding: 26px 28px;
    text-align: left;
}

.card p,
.card li {
    font-size: 20px;
    color: var(--on-bg-muted);
}

.card p + p {
    margin-top: 12px;
}

/* Terminal commands in the install steps */
code {
    padding: 1px 6px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.1);
    color: var(--on-bg);
    font: inherit;
    overflow-wrap: anywhere;
}

.steps {
    list-style: none;
    counter-reset: step;
}

.steps li {
    position: relative;
    padding-left: 44px;
    counter-increment: step;
}

.steps li + li {
    margin-top: 16px;
}

.steps li::before {
    content: counter(step);
    position: absolute;
    left: 0;
    top: 0;
    width: 30px;
    height: 30px;
    border-radius: 8px;
    background: var(--blue);
    color: var(--white);
    text-align: center;
    line-height: 30px;
}

.steps strong {
    display: block;
    font-weight: normal;
    color: var(--on-bg);
}

/* Quotes */
.review-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    align-items: start;
}

.review {
    padding: 22px 20px;
}

.review blockquote {
    font-size: 20px;
    line-height: 1.4;
}

.review figcaption {
    margin-top: 14px;
    font-size: 15px;
    color: var(--on-bg-muted);
}

.review figcaption span {
    color: var(--orange);
    margin-right: 4px;
}

/* FAQ */
.faq details {
    text-align: left;
    margin-bottom: 12px;
}

.faq summary {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 20px;
    font-size: 20px;
    cursor: pointer;
    list-style: none;
}

.faq summary::-webkit-details-marker {
    display: none;
}

.faq summary::after {
    content: '+';
    flex-shrink: 0;
    color: var(--on-bg-muted);
}

.faq details[open] summary::after {
    content: '−';
}

.faq details p {
    padding: 0 20px 18px;
    font-size: 15px;
    line-height: 1.5;
    color: var(--on-bg-muted);
}

.more {
    font-size: 15px;
    color: var(--on-bg-muted);
    margin-top: 28px;
}

/* Private discord popover */
.discord-btn {
    display: inline-flex;
    align-items: center;
    padding: 0;
    border: 0;
    background: none;
    color: var(--on-bg-muted);
    cursor: pointer;
}

.discord-btn:hover {
    color: var(--on-bg);
}

.discord-btn svg {
    width: 21px;
    height: 15px;
    fill: currentColor;
    shape-rendering: crispEdges;
}

/* Social links in the nav: pixel icons in the same style */
nav .social {
    display: inline-flex;
    align-items: center;
}

nav .social svg {
    fill: currentColor;
    shape-rendering: crispEdges;
}

.discord-pop {
    width: min(440px, calc(100% - 32px));
    margin: auto;
    padding: 28px 24px 24px;
    border: 3px solid var(--white);
    border-radius: 14px;
    background: var(--dark);
    color: var(--on-bg);
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.discord-pop::backdrop {
    background: rgba(0, 0, 0, 0.55);
}

.discord-pop img {
    width: 44px;
    height: 44px;
    image-rendering: pixelated;
    margin-bottom: 10px;
}

.discord-pop h2 {
    font-size: 25px;
    font-weight: normal;
    margin-bottom: 12px;
}

.discord-pop p {
    font-size: 20px;
    line-height: 1.45;
}

.discord-pop p + p {
    margin-top: 8px;
    color: var(--on-bg-muted);
}

.discord-pop button {
    margin-top: 20px;
    padding: 8px 18px;
    border: 3px solid var(--white);
    border-radius: 10px;
    background: var(--blue);
    color: var(--white);
    font: inherit;
    font-size: 20px;
    cursor: pointer;
}

/* Footer */
footer {
    max-width: 1080px;
    margin: 0 auto;
    padding: 32px 16px;
    border-top: 2px solid rgba(255, 255, 255, 0.2);
    font-size: 15px;
    color: var(--on-bg-muted);
}

.footer-cols {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.footer-cols h2 {
    font-size: 20px;
    font-weight: normal;
    color: var(--on-bg);
    margin-bottom: 10px;
}

.footer-cols a,
.footer-cols button {
    display: block;
    padding: 3px 0;
    text-decoration: none;
    overflow-wrap: break-word;
}

.footer-cols button {
    border: 0;
    background: none;
    color: inherit;
    font: inherit;
    cursor: pointer;
}

footer a:hover,
.footer-cols button:hover {
    color: var(--on-bg);
    text-decoration: underline;
}

.footer-langs {
    margin-top: 28px;
    line-height: 1.8;
}

.footer-langs a {
    display: inline-block;
    margin-right: 14px;
    text-decoration: none;
}

.footer-langs a[aria-current] {
    color: var(--on-bg);
}

.copyright {
    margin-top: 20px;
    font-size: 15px;
}

/* Language picker: the globe in the nav opens every version of this page */
.lang-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0;
    border: 0;
    background: none;
    color: var(--on-bg-muted);
    font: inherit;
    text-shadow: inherit;
    cursor: pointer;
}

.lang-btn:hover {
    color: var(--on-bg);
}

.lang-btn svg {
    width: 15px;
    height: 15px;
    fill: currentColor;
    shape-rendering: crispEdges;
}

.lang-pop {
    width: min(320px, calc(100% - 32px));
    margin: auto;
    padding: 20px;
    border: 3px solid var(--white);
    border-radius: 14px;
    background: var(--dark);
    color: var(--on-bg);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.lang-pop::backdrop {
    background: rgba(0, 0, 0, 0.55);
}

.lang-pop h2 {
    font-size: 20px;
    font-weight: normal;
    text-align: center;
    margin-bottom: 12px;
}

.lang-pop a {
    display: block;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 20px;
    text-decoration: none;
}

.lang-pop a:hover {
    background: rgba(255, 255, 255, 0.1);
}

.lang-pop a[aria-current] {
    background: var(--blue);
}

/* Offer the visitor's own language when the browser asks for one we have; never redirect */
.lang-suggest {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    background: var(--blue);
    font-size: 15px;
    text-align: center;
}

.lang-suggest[hidden] {
    display: none;
}

.lang-suggest button {
    padding: 0 4px;
    border: 0;
    background: none;
    color: var(--white);
    font: inherit;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
}

@media (max-width: 900px) {
    .tool-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .review-grid {
        grid-template-columns: 1fr;
        max-width: 560px;
        margin: 0 auto;
    }
}

@media (max-width: 600px) {
    header {
        justify-content: center;
        padding: 16px;
    }

    nav {
        gap: 6px 14px;
        font-size: 15px;
    }

    .lang-code {
        display: none;
    }

    h1 {
        font-size: 30px;
    }

    .lead {
        font-size: 20px;
    }

    .section-title {
        font-size: 25px;
    }

    /* One card per row: icon on the left, text beside it */
    .tool-grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 10px;
    }

    .tool {
        display: grid;
        grid-template-columns: 44px minmax(0, 1fr);
        column-gap: 14px;
        align-items: start;
        padding: 16px;
        text-align: left;
    }

    .tool img {
        grid-row: span 2;
        margin-bottom: 0;
    }

    .tool h3 {
        font-size: 20px;
        margin-bottom: 4px;
    }

    .tool p {
        font-size: 15px;
    }

    .card {
        padding: 20px 18px;
    }

    .card p,
    .card li {
        font-size: 15px;
    }

    .shot figcaption,
    .review blockquote {
        font-size: 15px;
    }

    .faq summary {
        font-size: 15px;
        padding: 14px 16px;
    }

    .faq details p {
        padding: 0 16px 16px;
        font-size: 15px;
    }

    .footer-cols {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* Narrow phones: tighter links so the globe stays on their row */
@media (max-width: 389px) {
    nav {
        column-gap: 8px;
    }

    .btn-play {
        padding: 16px 24px;
    }
}
