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

:root {
    color-scheme: light;
    --bg: #f5f5f7;
    --panel: rgba(255, 255, 255, 0.9);
    --card: #ffffff;
    --accent: #111827;
    --accent-secondary: #0a84ff;
    --text: #0f172a;
    --muted: #6b7280;
    --border: rgba(15, 23, 42, 0.08);
    --shadow: 0 25px 60px rgba(15, 23, 42, 0.08);
}

body {
    font-family: 'Space Grotesk', 'Segoe UI', system-ui, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
}

a {
    color: var(--accent-secondary);
    text-decoration: none;
    transition: color 0.2s ease;
}

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

.page {
    display: flex;
    flex-direction: column;
}

.page__header {
    padding: 2rem clamp(1.5rem, 5vw, 5rem);
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border);
    backdrop-filter: blur(12px);
    background: rgba(245, 245, 247, 0.85);
    position: sticky;
    top: 0;
    z-index: 10;
}

.page__header nav {
    display: flex;
    gap: 1.5rem;
}

.page__header a {
    color: var(--text);
    font-weight: 500;
    opacity: 0.7;
}

.page__header a:hover {
    opacity: 1;
}

.page__content {
    flex: 1;
    padding: 4rem clamp(1.5rem, 5vw, 5rem);
}

.games {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.game-switcher {
    background: var(--panel);
    padding: 1.5rem;
    border-radius: 24px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
}

.game-switcher label {
    font-weight: 600;
    display: block;
    margin-bottom: 0.5rem;
}

.game-switcher input[type="range"] {
    width: 100%;
    margin: 0.5rem 0 1rem;
}

.game-options {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.game-options button {
    flex: 1;
    min-width: 120px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.6);
    color: var(--text);
    padding: 0.6rem 1rem;
    cursor: pointer;
    transition: background 0.2s ease, box-shadow 0.2s ease;
}

.game-options button.active {
    background: linear-gradient(120deg, var(--accent), var(--accent-secondary));
    color: #ffffff;
    border-color: transparent;
    box-shadow: 0 10px 25px rgba(10, 132, 255, 0.3);
}

.game-panel {
    display: none;
    background: var(--panel);
    border-radius: 28px;
    padding: 2rem;
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
}

.game-panel.active {
    display: block;
}

.game-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.meta-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.game-status {
    margin-top: 1.5rem;
    color: var(--muted);
}

.workflows {
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
}

.workflow-form-card,
.calendar-embed,
.subscription-card {
    background: var(--panel);
    border-radius: 28px;
    padding: 2rem;
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    margin-bottom: 1rem;
}

.workflow-form label {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    margin-bottom: 1rem;
    font-weight: 500;
}

.workflow-form input,
.workflow-form select,
.workflow-form textarea {
    border-radius: 12px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.8);
    padding: 0.65rem 0.9rem;
    color: var(--text);
    font-family: inherit;
    box-shadow: inset 0 1px 3px rgba(15, 23, 42, 0.05);
}

.workflow-form textarea {
    min-height: 120px;
    resize: vertical;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.form-hint {
    margin-top: 1rem;
    color: var(--muted);
    font-size: 0.9rem;
}

.form-feedback {
    margin-top: 0.5rem;
    font-size: 0.9rem;
    color: #ffd166;
}

.workflow-list__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.link-field {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin: 1rem 0;
}

.link-field input {
    flex: 1;
    min-width: 220px;
    border-radius: 16px;
    border: 1px solid var(--border);
    padding: 0.8rem 1rem;
    background: rgba(255, 255, 255, 0.85);
    color: var(--text);
    font-size: 0.95rem;
}

.calendar-iframe {
    border-radius: 24px;
    overflow: hidden;
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
}

header.hero {
    min-height: 70vh;
    padding: 3rem clamp(1.5rem, 5vw, 5rem) 4rem;
    background: linear-gradient(135deg, #fdfdfd, #e5e7eb);
    border-bottom: 1px solid var(--border);
}

.hero__nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.logo {
    font-weight: 600;
    letter-spacing: 1px;
    font-size: 1.1rem;
    color: var(--accent);
}

.hero nav {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.hero nav a {
    color: var(--accent);
    opacity: 0.6;
    transition: opacity 0.2s ease;
}

.hero nav a:hover {
    opacity: 1;
}

.hero__content {
    margin-top: 5rem;
    max-width: 680px;
}

.eyebrow {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 5px;
    color: var(--accent-secondary);
}

.hero__content h1 {
    font-size: clamp(2.8rem, 6vw, 4rem);
    margin: 1.5rem 0;
    color: var(--accent);
}

.hero__actions {
    margin-top: 2rem;
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn {
    border: 1px solid transparent;
    padding: 0.9rem 1.5rem;
    border-radius: 999px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
}

.btn.primary {
    background: linear-gradient(120deg, var(--accent-secondary), #94c5ff);
    color: #ffffff;
    box-shadow: 0 15px 30px rgba(10, 132, 255, 0.35);
}

.btn.secondary {
    border-color: var(--border);
    color: var(--accent);
    background: rgba(255, 255, 255, 0.8);
}

main {
    padding: 4rem clamp(1.5rem, 5vw, 5rem);
    display: flex;
    flex-direction: column;
    gap: 4rem;
}

.section-heading {
    max-width: 640px;
    margin-bottom: 2rem;
}

.section-heading h2 {
    font-size: clamp(2rem, 4vw, 2.6rem);
    margin: 0.8rem 0;
}

.info {
    display: flex;
    flex-direction: column;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
}

.info-grid article {
    background: var(--card);
    padding: 1.5rem;
    border-radius: 28px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
}

.info-grid h3 {
    margin: 0.5rem 0 0.8rem;
}

.label {
    font-size: 0.8rem;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--muted);
}

.impressum__cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.impressum__cards article {
    padding: 1.2rem;
    background: var(--card);
    border-radius: 20px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
}

.impressum__cards h3 {
    margin-bottom: 0.4rem;
}

.login {
    background: var(--panel);
    border-radius: 32px;
    padding: 3rem;
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
}

.login--standalone {
    max-width: 720px;
    margin: 0 auto;
}

.login__form {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
    margin-top: 2rem;
}

.login__form label {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    font-weight: 500;
}

.login__form input {
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 0.9rem;
    color: var(--text);
    font-size: 1rem;
}

.login__form input:focus {
    outline: 1px solid var(--accent-secondary);
}

.login__hint {
    font-size: 0.9rem;
    color: var(--muted);
}

.ttt-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(70px, 1fr));
    gap: 0.8rem;
}

.ttt-cell {
    height: 90px;
    border-radius: 18px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.9);
    font-size: 2rem;
    color: var(--text);
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.ttt-cell:disabled {
    cursor: default;
    opacity: 0.6;
}

.ttt-cell:not(:disabled):hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(15, 23, 42, 0.15);
}

.sudoku-grid {
    display: grid;
    grid-template-columns: repeat(9, minmax(30px, 1fr));
    gap: 0.3rem;
}

.sudoku-cell {
    width: 100%;
    padding: 0.6rem;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.9);
    color: var(--text);
    text-align: center;
    font-size: 1rem;
    font-weight: 600;
}

.sudoku-cell:disabled {
    background: rgba(10, 132, 255, 0.15);
}

.wordle-board {
    display: grid;
    grid-template-columns: repeat(5, 56px);
    grid-template-rows: repeat(6, 56px);
    gap: 0.5rem;
    justify-content: flex-start;
}

.wordle-tile {
    border-radius: 12px;
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.9);
}

.wordle-tile.correct {
    background: #2ba572;
    border-color: #2ba572;
}

.wordle-tile.present {
    background: #c49b2d;
    border-color: #c49b2d;
}

.wordle-tile.absent {
    opacity: 0.4;
}

.wordle-controls {
    margin-top: 1.2rem;
    display: flex;
    gap: 0.8rem;
    flex-wrap: wrap;
}

.wordle-controls input {
    flex: 1;
    min-width: 160px;
    border-radius: 999px;
    border: 1px solid var(--border);
    padding: 0.7rem 1rem;
    background: rgba(255, 255, 255, 0.9);
    color: var(--text);
    font-size: 1rem;
}

footer {
    padding: 2rem;
    text-align: center;
    color: var(--muted);
    border-top: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.8);
}

@media (max-width: 640px) {
    .hero__nav {
        flex-direction: column;
        align-items: flex-start;
    }

    header.hero {
        padding-top: 2rem;
    }

    .login {
        padding: 2rem;
    }

    .ttt-cell {
        height: 70px;
    }

    .wordle-board {
        grid-template-columns: repeat(5, 48px);
        grid-template-rows: repeat(6, 48px);
    }
}
