/* =========================================================
   Grrxie – main.css
   Farben sind aus dem Logo abgeleitet (Grün → Türkis → Blau).
   Dark Mode ist Standard, Light Mode über [data-theme="light"].
   ========================================================= */

/* ========== Design Tokens ========== */
:root {
    --green: #1fd69c;
    --teal: #12a39a;
    --blue: #2b6fd1;
    --blue-deep: #0f4f9a;
    --brand-gradient: linear-gradient(100deg, var(--green), var(--teal) 45%, var(--blue));

    --bg: #070b12;
    --bg-2: #0c1320;
    --surface: rgba(255, 255, 255, 0.04);
    --surface-hover: rgba(255, 255, 255, 0.08);
    --border: rgba(255, 255, 255, 0.10);
    --text: #e8eef2;
    --text-muted: #9aa8b5;
    --glow-1: rgba(31, 214, 156, 0.22);
    --glow-2: rgba(43, 111, 209, 0.26);
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);

    --radius: 18px;
    --container: 1080px;
    --header-h: 64px;

    color-scheme: dark;
}

:root[data-theme="light"] {
    --bg: #f2f6f7;
    --bg-2: #e6eef0;
    --surface: rgba(255, 255, 255, 0.75);
    --surface-hover: #ffffff;
    --border: rgba(10, 30, 50, 0.10);
    --text: #0d1a24;
    --text-muted: #4d5f6c;
    --glow-1: rgba(31, 214, 156, 0.28);
    --glow-2: rgba(43, 111, 209, 0.20);
    --shadow: 0 10px 30px rgba(15, 40, 60, 0.10);

    color-scheme: light;
}

/* ========== Reset / Base ========== */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--header-h) + 16px);
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
    color: var(--text);
    background: var(--bg);
    transition: background-color 0.4s ease, color 0.4s ease;
    overflow-x: hidden;
}

img,
svg,
picture {
    display: block;
    max-width: 100%;
}

img {
    height: auto;
}

a {
    color: inherit;
}

h1,
h2,
h3 {
    line-height: 1.15;
    margin: 0;
    overflow-wrap: break-word;
    hyphens: auto;
}

p {
    margin: 0;
}

:focus-visible {
    outline: 2px solid var(--green);
    outline-offset: 3px;
    border-radius: 6px;
}

.icon {
    width: 1.1em;
    height: 1.1em;
    flex-shrink: 0;
    fill: currentColor;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.skip-link {
    position: absolute;
    left: 16px;
    top: -60px;
    z-index: 2000;
    padding: 0.6rem 1rem;
    border-radius: 10px;
    background: var(--green);
    color: #04140e;
    font-weight: 700;
    text-decoration: none;
}

.skip-link:focus {
    top: 12px;
}

.container {
    width: 100%;
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 20px;
}

/* Padding + negativer Margin: Glyphen (z. B. kursive Überhänge, Letter-Spacing)
   werden bei background-clip: text sonst abgeschnitten. */
.gradient-text {
    padding: 0 0.08em;
    margin: 0 -0.08em;
    -webkit-box-decoration-break: clone;
    box-decoration-break: clone;
    background: var(--brand-gradient);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

/* ========== Background Layers ========== */
.bg {
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    overflow: hidden;
    background: linear-gradient(160deg, var(--bg) 0%, var(--bg-2) 100%);
    transition: background 0.4s ease;
}

.glow {
    position: absolute;
    width: 560px;
    height: 560px;
    border-radius: 50%;
    filter: blur(110px);
}

.glow-1 {
    top: -200px;
    right: -180px;
    background: radial-gradient(circle, var(--glow-1), transparent 70%);
}

.glow-2 {
    bottom: -220px;
    left: -200px;
    background: radial-gradient(circle, var(--glow-2), transparent 70%);
}

/* ========== Header ========== */
.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    height: var(--header-h);
    transition: background 0.3s ease, border-color 0.3s ease, backdrop-filter 0.3s ease;
    border-bottom: 1px solid transparent;
}

.site-header.is-scrolled {
    background: color-mix(in srgb, var(--bg) 78%, transparent);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom-color: var(--border);
}

.header-inner {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    font-size: 1.1rem;
    letter-spacing: -0.3px;
    text-decoration: none;
}

.brand-logo {
    width: 32px;
    height: 32px;
    flex-shrink: 0;
    object-fit: contain;
}

.nav {
    display: flex;
    align-items: center;
    gap: 4px;
}

.nav-links {
    display: flex;
    gap: 2px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-links a {
    display: block;
    padding: 0.45rem 0.8rem;
    border-radius: 10px;
    text-decoration: none;
    font-size: 0.95rem;
    color: var(--text-muted);
    transition: color 0.2s ease, background 0.2s ease;
}

.nav-links a:hover {
    color: var(--text);
    background: var(--surface-hover);
}

.icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text);
    cursor: pointer;
    font-size: 1.05rem;
    transition: background 0.2s ease, transform 0.2s ease;
}

.icon-btn:hover {
    background: var(--surface-hover);
    transform: translateY(-1px);
}

/* Theme-Icon: zeigt immer das Ziel-Theme (Sonne im Dark Mode, Mond im Light Mode) */
.theme-toggle .icon-moon { display: none; }
:root[data-theme="light"] .theme-toggle .icon-sun  { display: none; }
:root[data-theme="light"] .theme-toggle .icon-moon { display: block; }

.menu-toggle {
    display: none;
}

.menu-toggle .bar {
    display: block;
    width: 18px;
    height: 2px;
    background: currentColor;
    border-radius: 2px;
    position: relative;
    transition: background 0.2s ease;
}

.menu-toggle .bar::before,
.menu-toggle .bar::after {
    content: "";
    position: absolute;
    left: 0;
    width: 18px;
    height: 2px;
    background: currentColor;
    border-radius: 2px;
    transition: transform 0.25s ease;
}

.menu-toggle .bar::before { transform: translateY(-6px); }
.menu-toggle .bar::after  { transform: translateY(6px); }

.menu-toggle[aria-expanded="true"] .bar { background: transparent; }
.menu-toggle[aria-expanded="true"] .bar::before { transform: rotate(45deg); }
.menu-toggle[aria-expanded="true"] .bar::after  { transform: rotate(-45deg); }

/* ========== Buttons ========== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    padding: 0.75rem 1.4rem;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text);
    font-size: 0.98rem;
    font-weight: 600;
    line-height: 1.3;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.btn:hover {
    background: var(--surface-hover);
    transform: translateY(-2px);
}

.btn-primary {
    border-color: transparent;
    background: var(--brand-gradient);
    color: #fff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
    box-shadow: 0 8px 24px rgba(18, 163, 154, 0.30);
}

.btn-primary:hover {
    background: var(--brand-gradient);
    box-shadow: 0 12px 30px rgba(18, 163, 154, 0.45);
}

.btn-twitch:hover   { border-color: #9146ff; }
.btn-discord:hover  { border-color: #5865f2; }

/* ========== Hero ========== */
.hero {
    min-height: calc(100vh - var(--header-h));
    min-height: calc(100svh - var(--header-h));
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 2rem 0 4rem;
}

.hero-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.hero-logo-wrap {
    width: clamp(120px, 30vw, 190px);
    aspect-ratio: 1;
    margin-bottom: 1.4rem;
}

.hero-logo {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 12px 30px rgba(18, 163, 154, 0.35));
}

.live-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.2rem;
    padding: 0.35rem 0.9rem;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--surface);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    text-decoration: none;
    max-width: 100%;
    text-align: center;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.live-badge[hidden] {
    display: none;
}

.live-badge .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--text-muted);
}

.live-badge.is-live {
    color: #fff;
    background: rgba(235, 4, 0, 0.85);
    border-color: transparent;
}

.live-badge.is-live .dot {
    background: #fff;
    animation: livePulse 1.4s ease-in-out infinite;
}

.hero h1 {
    font-size: clamp(3rem, 11vw, 5.5rem);
    font-weight: 900;
    letter-spacing: -2px;
}

.tagline {
    margin-top: 1rem;
    max-width: 34rem;
    font-size: clamp(1.05rem, 2.6vw, 1.25rem);
    color: var(--text-muted);
}

.tags {
    margin-top: 1rem;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.4rem 0.6rem;
    font-size: 0.95rem;
    color: var(--text-muted);
}

.tags .tag {
    display: inline-block;
    transition: transform 0.25s ease, color 0.25s ease, text-shadow 0.25s ease;
}

.tags .tag:hover {
    transform: scale(1.12);
    color: var(--text);
    text-shadow: 0 0 10px rgba(31, 214, 156, 0.8), 0 0 20px rgba(43, 111, 209, 0.6);
}

.tags .sep {
    opacity: 0.4;
}

.hero-actions {
    margin-top: 2.2rem;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
}

.socials {
    margin-top: 1.8rem;
    display: flex;
    gap: 10px;
    justify-content: center;
    list-style: none;
    padding: 0;
}

.socials a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text-muted);
    transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.socials a:hover {
    color: var(--text);
    background: var(--surface-hover);
    transform: translateY(-2px);
}

.scroll-hint {
    margin-top: 3rem;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
    color: var(--text-muted);
    text-decoration: none;
    opacity: 0.7;
}

.scroll-hint .mouse {
    width: 22px;
    height: 34px;
    border: 2px solid currentColor;
    border-radius: 12px;
    position: relative;
}

.scroll-hint .mouse::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 6px;
    width: 4px;
    height: 7px;
    margin-left: -2px;
    border-radius: 2px;
    background: currentColor;
    animation: scrollWheel 1.8s ease-in-out infinite;
}

/* ========== Sections ========== */
.section {
    padding: 5.5rem 0;
}

.section-head {
    text-align: center;
    margin-bottom: 2.8rem;
}

.eyebrow {
    display: inline-block;
    margin-bottom: 0.6rem;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--teal);
}

.section h2 {
    font-size: clamp(1.9rem, 5vw, 2.7rem);
    font-weight: 800;
    letter-spacing: -1px;
}

.section-head p {
    margin: 0.8rem auto 0;
    max-width: 36rem;
    color: var(--text-muted);
}

.card {
    border: 1px solid var(--border);
    background: var(--surface);
    border-radius: var(--radius);
    padding: 1.6rem;
    box-shadow: var(--shadow);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

/* ========== About ========== */
.about-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
    gap: 20px;
    align-items: stretch;
}

.about-text {
    font-size: 1.05rem;
}

.about-text p + p {
    margin-top: 1rem;
}

.about-text .greeting {
    font-size: 1.35rem;
    font-weight: 700;
}

.about-text .aside {
    color: var(--text-muted);
    font-style: italic;
}

/* Kein eigenes padding hier – .facts ist auch .card und nutzt dessen Innenabstand */
.facts {
    list-style: none;
    margin: 0;
    display: grid;
    align-content: center;
    gap: 14px;
}

.fact {
    display: flex;
    align-items: center;
    gap: 14px;
}

.fact-icon,
.big-icon,
.heart {
    overflow: hidden;
}

.fact-icon {
    flex-shrink: 0;
    width: 46px;
    height: 46px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    font-size: 1.35rem;
    background: var(--brand-gradient);
    color: #fff;
}

.fact > div {
    min-width: 0;
}

.fact > div > strong {
    display: block;
    font-size: 1rem;
}

.fact > div > span {
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* ========== Games ========== */
.games-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.game {
    position: relative;
    overflow: hidden;
    transition: transform 0.25s ease, border-color 0.25s ease;
}

.game::before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 4px;
    background: var(--accent, var(--brand-gradient));
}

.game:hover {
    transform: translateY(-4px);
    border-color: color-mix(in srgb, var(--accent-solid, var(--teal)) 55%, transparent);
}

.game-emoji {
    width: 52px;
    height: 52px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    background: var(--surface-hover);
    border: 1px solid var(--border);
    font-size: 1.6rem;
    line-height: 1;
    overflow: hidden;
}

.game h3 {
    margin-top: 0.9rem;
    font-size: 1.2rem;
    font-weight: 700;
}

.game p {
    margin-top: 0.4rem;
    color: var(--text-muted);
    font-size: 0.95rem;
}

.game--osu      { --accent: #ff66aa; --accent-solid: #ff66aa; }
.game--forza    { --accent: linear-gradient(90deg, #ff9a1f, #ff5e3a); --accent-solid: #ff7a2a; }
.game--cod      { --accent: linear-gradient(90deg, #9aa36b, #5d6b3a); --accent-solid: #8a9560; }
.game--rl       { --accent: linear-gradient(90deg, #2a8cff, #ff8a1f); --accent-solid: #2a8cff; }
.game--tft      { --accent: linear-gradient(90deg, #c8aa6e, #0ac8b9); --accent-solid: #c8aa6e; }
.game--more     { --accent: var(--brand-gradient); --accent-solid: var(--green); }

/* ========== Community ========== */
.community-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
}

.discord-card {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    background:
        radial-gradient(120% 120% at 0% 0%, rgba(88, 101, 242, 0.28), transparent 60%),
        var(--surface);
}

.discord-card .big-icon {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    display: grid;
    place-items: center;
    background: #5865f2;
    color: #fff;
    font-size: 1.7rem;
}

.discord-card h3,
.rules-card h3 {
    font-size: 1.35rem;
    font-weight: 800;
}

.discord-card p {
    color: var(--text-muted);
}

.discord-card .btn {
    margin-top: auto;
    align-self: flex-start;
}

.rules {
    margin: 1rem 0 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 0.8rem;
}

.rules li {
    display: flex;
    gap: 0.75rem;
    font-size: 0.97rem;
}

.rules li::before {
    content: "";
    flex-shrink: 0;
    width: 8px;
    height: 8px;
    margin-top: 0.55rem;
    border-radius: 50%;
    background: var(--brand-gradient);
}

.rules code {
    padding: 0.05rem 0.4rem;
    border-radius: 6px;
    background: var(--surface-hover);
    border: 1px solid var(--border);
    font-size: 0.9em;
}

.no-go {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 0.5rem;
}

.no-go span {
    padding: 0.15rem 0.65rem;
    border-radius: 999px;
    font-size: 0.82rem;
    border: 1px solid rgba(235, 70, 70, 0.4);
    color: #ef6b6b;
    background: rgba(235, 70, 70, 0.08);
}

.rules-note {
    margin-top: 1.1rem;
    font-size: 0.88rem;
    color: var(--text-muted);
}

/* ========== Support ========== */
.support-card {
    max-width: 760px;
    margin: 0 auto;
    text-align: center;
    padding: 2.4rem 1.6rem;
    background:
        radial-gradient(100% 140% at 50% 0%, rgba(31, 214, 156, 0.16), transparent 60%),
        var(--surface);
}

.support-card .heart {
    width: 58px;
    height: 58px;
    margin: 0 auto 1rem;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-size: 1.5rem;
    color: #fff;
    background: var(--brand-gradient);
}

.support-card p {
    max-width: 32rem;
    margin: 0.8rem auto 0;
    color: var(--text-muted);
}

.support-actions {
    margin-top: 1.8rem;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
}

.support-card .small {
    margin-top: 1.4rem;
    font-size: 0.85rem;
}

/* ========== Footer ========== */
.site-footer {
    padding: 2.5rem 0 3rem;
    border-top: 1px solid var(--border);
    font-size: 0.9rem;
    color: var(--text-muted);
}

.footer-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem 2rem;
}

.footer-inner .socials {
    margin: 0;
}

.footer-inner .socials a {
    width: 38px;
    height: 38px;
}

.footer-links {
    display: flex;
    gap: 1.2rem;
}

.footer-links a {
    text-decoration: none;
}

.footer-links a:hover {
    color: var(--text);
    text-decoration: underline;
}

/* ========== Legal Pages ========== */
.legal {
    padding: 3rem 0 5rem;
}

.legal .card {
    max-width: 760px;
    margin: 0 auto;
}

.legal h1 {
    font-size: clamp(2rem, 6vw, 2.6rem);
    font-weight: 800;
    margin-bottom: 1.5rem;
}

.legal h2 {
    font-size: 1.2rem;
    margin: 1.8rem 0 0.5rem;
}

.legal p,
.legal li {
    color: var(--text-muted);
}

.legal p + p {
    margin-top: 0.7rem;
}

.legal a {
    color: var(--teal);
}

.placeholder {
    padding: 0 0.3rem;
    border-radius: 4px;
    background: rgba(255, 196, 0, 0.18);
    color: var(--text);
}

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

    .about-grid,
    .community-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 720px) {
    .menu-toggle {
        display: inline-flex;
    }

    .nav-links {
        position: absolute;
        top: var(--header-h);
        left: 12px;
        right: 12px;
        flex-direction: column;
        gap: 2px;
        padding: 8px;
        border-radius: 16px;
        border: 1px solid var(--border);
        background: color-mix(in srgb, var(--bg) 94%, transparent);
        backdrop-filter: blur(14px);
        -webkit-backdrop-filter: blur(14px);
        box-shadow: var(--shadow);
        opacity: 0;
        transform: translateY(-8px);
        pointer-events: none;
        transition: opacity 0.2s ease, transform 0.2s ease;
    }

    .nav-links.is-open {
        opacity: 1;
        transform: none;
        pointer-events: auto;
    }

    .nav-links a {
        padding: 0.75rem 1rem;
        font-size: 1rem;
    }

    .section {
        padding: 4rem 0;
    }
}

@media (max-width: 560px) {
    .container {
        padding: 0 16px;
    }

    .games-grid {
        grid-template-columns: 1fr;
    }

    .hero-actions .btn,
    .support-actions .btn {
        width: 100%;
    }

    .footer-inner {
        flex-direction: column;
        text-align: center;
    }
}
