* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Inter", sans-serif;
}

html {
    zoom: 1 !important;
}

body {
    font-family: "Inter", sans-serif;
    background: #1e293b;
    background-image:
        radial-gradient(
            circle at top left,
            rgba(56, 189, 248, 0.3),
            transparent 60%
        ),
        radial-gradient(
            circle at bottom right,
            rgba(168, 85, 247, 0.25),
            transparent 60%
        ),
        linear-gradient(135deg, #1e293b, #334155, #1e293b);
    background-attachment: fixed; /* Fixiert den Hintergrund beim Scrollen */
    background-size: cover;

    color: #ffffff; /* Reinweiß für maximalen Kontrast */

    min-height: 100vh;
    overflow-x: hidden;
    font-size: 20px; /* Standard-Schriftgröße erhöht */
    line-height: 1.6;
    zoom: 1 !important;
}

/* Verhindert den Schreib-Cursor, erlaubt aber weiterhin das Kopieren von Text */
html,
body,
.layout,
.section,
.card,
.info-box,
p,
h1,
h2,
h3,
span {
    cursor: default !important;
    user-select: text !important; /* Kopieren wieder erlaubt */
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
    caret-color: transparent !important; /* Versteckt den blinkenden Strich außerhalb von Feldern */
}

/* Erlaubt Markierung und Schreib-Cursor NUR in echten Eingabefeldern */
input,
textarea,
input *,
textarea * {
    cursor: text !important;
    user-select: text !important;
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
    caret-color: auto !important;
}

/* Klickbare Elemente sollen immer den Pointer (Hand) zeigen */
button,
.mission,
.color-swatch,
select,
a,
.image-choice-item,
[role="button"] {
    cursor: pointer !important;
}

h1,
h2,
h3 {
    color: #38bdf8;
    margin-bottom: 20px;
    letter-spacing: 0.5px;
}

p {
    margin-bottom: 15px;
    color: #f1f5f9; /* Helleres Grau für besseren Kontrast */
}

:focus {
    outline: none !important;
}

:focus-visible {
    outline: 4px solid #eab308 !important; /* Deutlicher gelber Fokus-Rahmen nur bei Tastatur-Fokus */
    outline-offset: 4px;
}

.mission:focus-visible,
.modal-btn:focus-visible,
button:focus-visible {
    outline: 4px solid #eab308 !important;
}

/* HEADER */

/* GLOBAL HEADER (Die Spiel-Topbar) */
.topbar {
    height: 100px;
    background: #0f172a !important; /* Solid background to prevent shine-through */
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 40px;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 10000; /* Höher als Startbildschirm (9000) */
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

/* SHOP PREVIEW HEADER (Der Header im Shop Builder) */
#shopLivePreview header {
    position: relative !important; /* WICHTIG: Nicht fixed! */
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    z-index: 1 !important;
}

/* Platzhalter für die fixed Topbar */
body {
    padding-top: 100px;
}

.logo-area {
    display: flex;
    align-items: center;
}

.main-logo {
    height: 80px; /* Schön groß im Header */
    width: auto;
    object-fit: contain;
    transition: transform 0.3s ease;
    filter: drop-shadow(
        0 0 10px rgba(56, 189, 248, 0.4)
    ); /* Leichter Glow für bessere Sichtbarkeit */
}

.main-logo:hover {
    transform: scale(1.05);
}

.topbar-right {
    display: flex;
    gap: 20px;
}

/* GLOBAL FOOTER STYLES */
.global-footer {
    min-height: 100px; /* Mindesthöhe wie Topbar */
    height: auto; /* Erlaubt natürliches Wachstum */
    background: #0f172a !important;
    backdrop-filter: blur(20px);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 40px; /* Flexibleres Padding statt fester Höhe */
    position: relative; /* Nicht mehr fixiert für besseres Scrollen */
    width: 100%;
    z-index: 10;
    box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.3);
    margin-top: 50px;
}

.footer-inner {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

.footer-brand {
    display: flex;
    align-items: center;
    flex: 0 0 auto;
}

.footer-text {
    flex: 1;
    display: flex;
    justify-content: flex-end; /* Schiebt Copyright nach rechts */
    align-items: center;
}

.footer-links {
    position: absolute !important;
    left: calc(50% - 75px) !important; /* Ca. 2cm nach links verschoben */
    transform: translateX(-50%) !important;
    display: flex;
    gap: 30px;
    align-items: center;
    z-index: 20;
}

.copyright-text {
    margin-left: auto !important; /* Schiebt das Copyright ganz nach rechts */
    color: #ffffff !important;
    font-size: 13px !important;
    font-weight: 400 !important;
    text-transform: none !important;
    letter-spacing: normal !important;
    cursor: default !important;
    pointer-events: none !important;
    user-select: none;
    display: inline-block;
}

.footer-logo {
    height: 80px; /* Gleiche Höhe wie Header-Logo */
    width: auto;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.footer-logo:hover {
    transform: scale(1.05);
}

.footer-text {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center; /* Zentriere Kinder-Elemente */
    gap: 15px;
    width: 100%;
}

.footer-text p {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.5);
    margin: 0;
}

.footer-links {
    display: flex;
    gap: 30px;
    justify-content: center;
}

.footer-links span {
    display: inline-block;
    font-size: 14px;
    color: #38bdf8;
    cursor: pointer !important;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    pointer-events: all !important;
    position: relative;
    z-index: 10;
}

.footer-links span:hover {
    color: #ffffff !important;
    text-shadow: 0 0 15px rgba(56, 189, 248, 0.6);
}

@media (max-width: 800px) {
    .footer-inner {
        flex-direction: row !important; /* Verhindere das Stapeln auf kleinen Bildschirmen */
        justify-content: space-between;
        padding: 0 20px;
    }
}

/* SHOP BUILDER SIDEBAR OPTIMIZATION */
.shop-builder-sidebar {
    position: relative;
    z-index: 0;
    overflow: hidden !important; /* Clippt die rotierende Border */
    background: transparent !important;
    border: none !important;
    padding: 0 !important; /* Padding wird auf die inneren Container verteilt */
    border-radius: 30px !important;
    box-shadow: 0 40px 100px rgba(0, 0, 0, 0.8);
    display: flex;
    flex-direction: column;
    height: 800px; /* Fixe Höhe des Rahmens */
}

.shop-builder-sidebar::before {
    content: "";
    position: absolute;
    z-index: -2;
    left: 50%;
    top: 50%;
    width: 2000px;
    height: 2000px;
    background: conic-gradient(#38bdf8, #a855f7, #38bdf8, #a855f7, #38bdf8);
    transform-origin: center;
    animation: rotate-border 5s linear infinite;
}

.shop-builder-sidebar::after {
    content: "";
    position: absolute;
    z-index: -1;
    inset: 4px;
    background: linear-gradient(
        135deg,
        rgba(15, 23, 42, 0.8),
        rgba(2, 6, 23, 0.9)
    );
    border-radius: 26px;
    backdrop-filter: blur(25px);
}

.shop-builder-scroll-content {
    flex: 1;
    overflow-y: auto;
    padding: 35px;
    display: flex;
    flex-direction: column;
    gap: 25px;
    scrollbar-gutter: stable;
}

.shop-builder-footer {
    padding: 25px 35px;
    background: rgba(0, 0, 0, 0.3);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 10;
    display: flex;
    justify-content: center; /* Zentriert den Button */
}

.finish-btn {
    background: linear-gradient(135deg, #22c55e, #16a34a) !important;
    color: white !important;
    padding: 15px 25px !important;
    border-radius: 12px !important; /* Gleiche Ecken wie Spiel starten */
    font-weight: bold !important;
    font-size: 16px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 10px !important;
    box-shadow: 0 10px 25px rgba(34, 197, 94, 0.3) !important;
    transition: all 0.3s ease !important;
    border: none !important;
    cursor: pointer !important;
}

.finish-btn:hover {
    transform: translateY(-3px) scale(1.05) !important;
    box-shadow: 0 15px 40px rgba(34, 197, 94, 0.6) !important;
}

/* Custom Scrollbar für den inneren Bereich */
.shop-builder-scroll-content::-webkit-scrollbar {
    width: 6px;
}

.shop-builder-scroll-content::-webkit-scrollbar-track {
    background: transparent;
}

.shop-builder-scroll-content::-webkit-scrollbar-thumb {
    background: linear-gradient(to bottom, #38bdf8, #a855f7);
    border-radius: 10px;
}

#shopBuilderSection label {
    color: #38bdf8 !important;
    font-size: 13px !important;
    font-weight: 800 !important;
    text-transform: uppercase !important;
    letter-spacing: 1.5px !important;
    margin-bottom: 18px !important;
    display: block !important;
    text-shadow: 0 0 10px rgba(56, 189, 248, 0.3);
}

#shopBuilderSection label.purple-label {
    color: #a855f7 !important;
    text-shadow: 0 0 10px rgba(168, 85, 247, 0.3);
}

/* Custom Scrollbar für die Sidebar */
#shopBuilderSection .card::-webkit-scrollbar {
    width: 6px;
}

#shopBuilderSection .card::-webkit-scrollbar-track {
    background: transparent;
}

#shopBuilderSection .card::-webkit-scrollbar-thumb {
    background: linear-gradient(to bottom, #38bdf8, #a855f7);
    border-radius: 10px;
}

/* Select Felder fix */
#shopBuilderSection select {
    appearance: none;
    background: rgba(255, 255, 255, 0.03) !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    color: white !important;
    padding: 14px 18px !important;
    border-radius: 15px !important;
    width: 100% !important;
    cursor: pointer !important;
    margin-bottom: 8px !important;
    font-size: 15px !important;
    transition: all 0.3s ease !important;
}

#shopBuilderSection select:hover {
    border-color: #38bdf8 !important;
    background: rgba(56, 189, 248, 0.05) !important;
}

/* Farbauswahl Grid Fix */
#themeChoices {
    display: grid !important;
    grid-template-columns: repeat(6, 1fr) !important;
    gap: 10px !important;
    margin-bottom: 15px !important;
}

.color-swatch {
    width: 32px !important;
    height: 32px !important;
    border-radius: 8px !important;
    border: 2px solid rgba(255, 255, 255, 0.1) !important;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
}

.color-swatch:hover {
    transform: scale(1.2) rotate(5deg);
    border-color: white !important;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.4);
}

/* Logo Icon Buttons Fix */
#logoIconChoices {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
    margin-bottom: 5px !important;
}

#logoIconChoices .secondary-btn {
    padding: 12px !important;
    min-width: 48px !important;
    height: 48px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 22px !important;
    background: rgba(255, 255, 255, 0.04) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 12px !important;
}

/* Layout & Nav Buttons Fix */
#layoutChoices,
#navChoices,
#radiusChoices {
    display: flex !important;
    gap: 8px !important;
}

#layoutChoices .secondary-btn,
#navChoices .secondary-btn,
#radiusChoices .secondary-btn {
    flex: 1 !important;
    padding: 12px !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    background: rgba(255, 255, 255, 0.04) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 12px !important;
    color: rgba(255, 255, 255, 0.8) !important;
    transition: all 0.3s ease !important;
}

#shopBuilderSection .secondary-btn:hover {
    background: rgba(56, 189, 248, 0.15) !important;
    border-color: #38bdf8 !important;
    color: white !important;
    transform: translateY(-2px) !important;
}

.card strong,
.stat-card strong {
    display: block;
    margin-top: 6px;
    font-size: 26px;
}

/* BUTTONS */

button {
    border: none;

    padding: 18px 28px;

    border-radius: 20px;

    font-size: 17px;

    font-weight: bold;

    cursor: pointer;

    transition: 0.3s;
}

button:hover {
    transform: translateY(-3px);
}

/* HERO */

.hero {
    display: grid;
    grid-template-columns: 1fr 1fr;

    gap: 60px;

    align-items: center;

    padding: 80px;
}

.hero h1 {
    font-size: 72px;
    line-height: 1.1;
}

.hero p {
    margin-top: 25px;

    font-size: 20px;

    line-height: 1.8;

    color: rgba(255, 255, 255, 0.7);
}

.hero-buttons {
    display: flex;
    gap: 20px;

    margin-top: 20px;
}

.primary-btn {
    background: linear-gradient(135deg, #38bdf8, #0ea5e9);

    color: #00111f;
    padding: 15px 45px;
    border-radius: 99px; /* Pillen-Look wie auf Bild 1 */

    box-shadow: 0 10px 30px rgba(56, 189, 248, 0.35);
}

.primary-btn:hover {
    box-shadow: 0 20px 40px rgba(56, 189, 248, 0.45);
    background: linear-gradient(135deg, #38bdf8, #2563eb);
    color: #00111f;
    transform: translateY(-2px);
}

.purple-btn {
    background: linear-gradient(135deg, #a855f7, #9333ea);
    color: white;
    padding: 15px 45px;
    border-radius: 99px;
    border: none;
    cursor: pointer;
    font-weight: bold;
    box-shadow: 0 10px 30px rgba(168, 85, 247, 0.35);
    transition: all 0.3s ease;
}

.purple-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 40px rgba(168, 85, 247, 0.45);
    background: linear-gradient(135deg, #b066f8, #9d44ef);
}

.secondary-btn {
    background: rgba(255, 255, 255, 0.12);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.2);
    padding: 15px 45px;
    border-radius: 99px; /* Pillen-Look angepasst an primary-btn */
    cursor: pointer;
    font-weight: bold;
    font-size: 18px;
}

.restart-btn {
    background: #ef4444 !important;
    color: white !important;
    border: none;
    padding: 12px 20px;
    border-radius: 12px;
    cursor: pointer;
    font-weight: bold;
    font-size: 14px;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow:
        0 4px 6px -1px rgba(0, 0, 0, 0.1),
        0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

#sidebarStartBtn:hover {
    transform: translateY(2px) !important; /* Sinkt ein (Drücken) */
    box-shadow: 0 4px 10px rgba(34, 197, 94, 0.2) !important;
    background: linear-gradient(135deg, #16a34a, #15803d) !important;
}

.restart-btn:hover {
    transform: translateY(-4px) !important; /* Hebt sich deutlich (Warnung) */
    background: #dc2626 !important;
    box-shadow: 0 15px 30px rgba(239, 68, 68, 0.4) !important;
}

.restart-btn:active {
    transform: translateY(0);
}

.restart-icon {
    font-size: 16px;
}

@keyframes rotate-border {
    from {
        transform: translate(-50%, -50%) rotate(0deg);
    }
    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

.intro-hero {
    position: relative;
    z-index: 0;
    overflow: hidden;
    border: none !important;
    background: transparent !important;
    padding: 60px;
    text-align: center;
    margin-bottom: 50px;
    border-radius: 40px;
}

.intro-hero::before {
    content: "";
    position: absolute;
    z-index: -2;
    left: 50%;
    top: 50%;
    width: 3000px; /* Riesiges fixes Quadrat */
    height: 3000px;
    background: conic-gradient(#38bdf8, #a855f7, #38bdf8, #a855f7, #38bdf8);
    transform-origin: center;
    animation: rotate-border 5s linear infinite;
}

.intro-hero::after {
    content: "";
    position: absolute;
    z-index: -1;
    inset: 5px; /* Etwas dickerer Rahmen für bessere Sichtbarkeit */
    background: linear-gradient(
        135deg,
        rgba(15, 23, 42, 0.98),
        rgba(2, 6, 23, 1)
    );
    border-radius: 35px;
}

.glass-card {
    background: rgba(15, 23, 42, 0.75) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    backdrop-filter: blur(30px);
    transition:
        transform 0.3s ease,
        box-shadow 0.3s ease;
    border-radius: 30px;
    box-shadow: 0 40px 100px rgba(0, 0, 0, 0.8);
}

/* Blaues Design */
.glass-card.blue-theme {
    border: 1px solid #38bdf8 !important;
    box-shadow:
        0 30px 80px -15px rgba(0, 0, 0, 0.9),
        0 0 40px rgba(56, 189, 248, 0.25) !important; /* Stärkerer blauer Schatten */
}

.glass-card.blue-theme:hover {
    transform: translateY(-8px);
    box-shadow:
        0 45px 100px -20px rgba(0, 0, 0, 1),
        0 0 60px rgba(56, 189, 248, 0.45) !important; /* Massiver blauer Glow im Hover */
    border-color: inherit !important;
}

/* Lila Design */
.glass-card.purple-theme {
    border: 1px solid #a855f7 !important;
    box-shadow:
        0 30px 80px -15px rgba(0, 0, 0, 0.9),
        0 0 40px rgba(168, 85, 247, 0.25) !important; /* Stärkerer lila Schatten */
}

.glass-card.purple-theme:hover {
    transform: translateY(-8px);
    box-shadow:
        0 45px 100px -20px rgba(0, 0, 0, 1),
        0 0 60px rgba(168, 85, 247, 0.45) !important; /* Massiver lila Glow im Hover */
    border-color: inherit !important;
}

/* Skill-Karten in der Einleitung */
.skill-card.blue-skill {
    background: rgba(15, 23, 42, 0.75) !important;
    border: 1px solid rgba(56, 189, 248, 0.3) !important;
    box-shadow:
        0 25px 70px -12px rgba(0, 0, 0, 0.8),
        0 0 30px rgba(56, 189, 248, 0.2) !important;
    transition:
        transform 0.3s ease,
        box-shadow 0.3s ease;
}

.skill-card.blue-skill:hover {
    transform: translateY(-8px);
    box-shadow:
        0 40px 90px -15px rgba(0, 0, 0, 1),
        0 0 50px rgba(56, 189, 248, 0.4) !important;
}

.skill-card.purple-skill {
    background: rgba(15, 23, 42, 0.75) !important;
    border: 1px solid rgba(168, 85, 247, 0.3) !important;
    box-shadow:
        0 25px 70px -12px rgba(0, 0, 0, 0.8),
        0 0 30px rgba(168, 85, 247, 0.2) !important;
    transition:
        transform 0.3s ease,
        box-shadow 0.3s ease;
}

.skill-card.purple-skill:hover {
    transform: translateY(-8px);
    box-shadow:
        0 40px 90px -15px rgba(0, 0, 0, 1),
        0 0 50px rgba(168, 85, 247, 0.4) !important;
}

/* Grüne Glas-Karten */
.glass-card.green-theme {
    box-shadow:
        0 30px 80px -15px rgba(0, 0, 0, 0.9),
        0 0 40px rgba(34, 197, 94, 0.25) !important;
}

.glass-card.green-theme:hover {
    transform: translateY(-8px);
    box-shadow:
        0 45px 100px -20px rgba(0, 0, 0, 1),
        0 0 60px rgba(34, 197, 94, 0.45) !important;
}

/* Pro-Tip Box */
.pro-tip {
    position: relative;
    z-index: 0;
    overflow: hidden;
    border: none !important; /* Wichtig: Standard-Border weg */
    background: transparent !important;
    padding: 50px;
    border-radius: 35px;
    margin-bottom: 50px;
    text-align: center;
}

.pro-tip::before {
    content: "";
    position: absolute;
    z-index: -2;
    left: 50%;
    top: 50%;
    width: 3000px; /* Riesiges fixes Quadrat wie beim Hero */
    height: 3000px;
    background: conic-gradient(#38bdf8, #a855f7, #38bdf8, #a855f7, #38bdf8);
    transform-origin: center;
    animation: rotate-border 6s linear infinite;
}

.pro-tip::after {
    content: "";
    position: absolute;
    z-index: -1;
    inset: 5px; /* Dicke der Border */
    background: linear-gradient(
        135deg,
        rgba(15, 23, 42, 0.98),
        rgba(2, 6, 23, 1)
    );
    border-radius: 30px;
}

.preview {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 40px;
    padding: 30px;
}

.preview-big {
    background: rgba(255, 255, 255, 0.05);

    border-radius: 28px;

    min-height: 220px;

    padding: 30px;
}

.preview-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;

    gap: 20px;

    margin-top: 20px;
}

.preview-card {
    background: rgba(255, 255, 255, 0.05);

    border-radius: 24px;

    min-height: 140px;

    padding: 24px;
}

/* --- LAYOUT SYSTEM --- */

.layout {
    display: grid !important;
    grid-template-columns: 350px 1fr; /* Etwas breitere Sidebar */
    gap: 40px;
    padding: 40px 40px 40px 20px; /* Linkes Padding reduziert für mehr Platz links */
    max-width: 100%; /* Volle Breite nutzen */
    margin: 0;
    align-items: start;
    min-height: 100vh;
}

/* --- SIDEBAR & MISSIONEN --- */

.section {
    position: relative;
    z-index: 0;
    overflow: hidden;
    background: transparent !important;
    border: none !important;
    border-radius: 40px;
    padding: 60px;
    margin-bottom: 30px; /* Reduziert von 50px */
    color: #ffffff;
}

.section::before {
    content: "";
    position: absolute;
    z-index: -2;
    left: 50%;
    top: 50%;
    width: 4000px;
    height: 4000px;
    background: conic-gradient(#38bdf8, #a855f7, #38bdf8, #a855f7, #38bdf8);
    transform-origin: center;
    animation: rotate-border 6s linear infinite;
}

.section::after {
    content: "";
    position: absolute;
    z-index: -1;
    inset: 5px;
    background: linear-gradient(
        135deg,
        rgba(15, 23, 42, 0.95),
        rgba(2, 6, 23, 1)
    );
    border-radius: 35px;
    backdrop-filter: blur(30px);
}

.section h1,
.section h2,
.section h3 {
    color: #38bdf8; /* Zurück zu Blau für Überschriften */
}

#introSection p {
    color: #ffffff; /* Wieder weiß wie im ursprünglichen Design */
}

#introSection .glass-card p,
#introSection .glass-card span {
    color: #ffffff;
}

#introSection .glass-card {
    background: rgba(
        15,
        23,
        42,
        0.75
    ) !important; /* Zurück zum ursprünglichen Look */
    color: #ffffff !important;
}

#introSection .pro-tip p {
    color: #ffffff; /* Behalte Weiß für die Hero-Boxen (Pro-Tip/Hero) bei, da diese dunkel bleiben */
}

.sidebar {
    position: fixed; /* Absolut fixiert */
    top: 140px; /* 100px Header + 40px Layout-Padding */
    left: 40px; /* Von 20px auf 40px erhöht für mehr Abstand zum Rand */
    width: 320px;
    z-index: 10000; /* Erhöht, damit über Startbildschirm (9000) */
    overflow: hidden;
    padding: 25px;
    border-radius: 24px;
    background: transparent !important;
    border: none !important;
    box-shadow:
        0 50px 120px -30px rgba(0, 0, 0, 1),
        0 0 60px rgba(56, 189, 248, 0.1);
}

.sidebar::before {
    content: "";
    position: absolute;
    z-index: -2;
    left: 50%;
    top: 50%;
    width: 2000px;
    height: 2000px;
    background: conic-gradient(#38bdf8, #a855f7, #38bdf8, #a855f7, #38bdf8);
    transform-origin: center;
    animation: rotate-border 6s linear infinite;
}

.sidebar::after {
    content: "";
    position: absolute;
    z-index: -1;
    inset: 4px;
    background: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(30px);
    border-radius: 20px;
}

.content {
    display: flex;
    flex-direction: column;
    gap: 30px;
    width: 100%;
    min-width: 0;
    grid-column: 2; /* Erzwingt den Platz rechts neben der fixierten Sidebar */
}

.sidebar h2 {
    font-size: 32px;
    margin-bottom: 25px;
    font-weight: 900;
    text-align: center;
    letter-spacing: -1px;
    text-transform: uppercase;

    /* Blau-Lila Farbverlauf für die Überschrift */
    background: linear-gradient(135deg, #38bdf8, #a855f7);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: transparent;

    filter: drop-shadow(0 0 20px rgba(56, 189, 248, 0.5));
}

.mission {
    margin-bottom: 12px;
    padding: 18px 20px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    transition: all 0.3s ease;
    cursor: pointer;
    color: #ffffff !important; /* Zurück zu Weiß */
    font-size: 18px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.mission.blue-border {
    border: 1px solid #38bdf8 !important;
}

.mission.purple-border {
    border: 1px solid #a855f7 !important;
}

/* Gesperrte Missionen (Behalten die Border, aber reduziert) */
.mission.locked.blue-border {
    border: 1px solid rgba(56, 189, 248, 0.3) !important;
    opacity: 0.5;
}

.mission.locked.purple-border {
    border: 1px solid rgba(168, 85, 247, 0.3) !important;
    opacity: 0.5;
}

.mission.blue-border.active {
    border: 2px solid #38bdf8 !important;
    box-shadow:
        0 0 20px rgba(56, 189, 248, 0.4),
        0 10px 30px rgba(0, 0, 0, 0.5) !important;
}

.mission.purple-border.active {
    border: 2px solid #a855f7 !important;
    box-shadow:
        0 0 20px rgba(168, 85, 247, 0.4),
        0 10px 30px rgba(0, 0, 0, 0.5) !important;
}

.mission:hover:not(.locked) {
    background: rgba(56, 189, 248, 0.1);
    border-color: rgba(56, 189, 248, 0.3);
    transform: translateX(5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
}

/* Aktive Mission */
.mission.active {
    background: rgba(56, 189, 248, 0.15) !important;
    border: 2px solid #38bdf8 !important;
    color: #ffffff !important;
    font-weight: bold;
    box-shadow:
        0 0 20px rgba(56, 189, 248, 0.4),
        0 10px 30px rgba(0, 0, 0, 0.5) !important;
}

.mission.locked {
    opacity: 1 !important; /* Keinerlei Ausgrauen mehr */
    cursor: not-allowed;
    pointer-events: none;
    background: rgba(255, 255, 255, 0.05) !important;
    color: #ffffff !important; /* Absolut reinweiß wie die aktiven */
    border-color: rgba(255, 255, 255, 0.1) !important;
}

.mission.locked::before {
    content: "🔒";
    font-size: 18px;
    filter: none; /* Grayscale entfernt für mehr Farbe */
    opacity: 1;
    color: #f97316; /* Kräftiges Orange für das Schloss */
}

.mission.active::before {
    content: "🎯";
    font-size: 18px;
    color: #38bdf8; /* Leuchtendes Blau */
}

.mission:not(.active):not(.locked)::before {
    content: "✅";
    font-size: 18px;
    opacity: 1;
    color: #22c55e; /* Sattes Grün */
}

.tutorial-box {
    background: linear-gradient(
        135deg,
        rgba(56, 189, 248, 0.1),
        rgba(37, 99, 235, 0.1)
    );
    padding: 30px;
    border-left: 6px solid #38bdf8;
    border-radius: 18px;
    margin: 25px 0;
    backdrop-filter: blur(10px);
}

.helper-btn {
    background: linear-gradient(135deg, #a855f7, #9333ea) !important;
    color: white !important;
    border: none;
    border-radius: 99px; /* Pillenform */
    height: 38px;
    padding: 0 25px;
    font-size: 15px;
    font-weight: 800;
    box-shadow: 0 4px 15px rgba(168, 85, 247, 0.3);
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.helper-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(168, 85, 247, 0.45);
    background: linear-gradient(135deg, #b066f8, #9d44ef) !important;
}

.info-icon-btn {
    background: linear-gradient(135deg, #38bdf8, #0ea5e9) !important;
    color: white !important;
    border: none;
    border-radius: 99px; /* Pillenform */
    height: 38px;
    min-width: 45px;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 11;
    text-transform: uppercase;
    box-shadow: 0 4px 15px rgba(56, 189, 248, 0.3);
}

.info-icon-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(56, 189, 248, 0.45);
    background: linear-gradient(135deg, #7dd3fc, #38bdf8) !important;
}

.input-group-wrapper {
    display: flex;
    align-items: center;
    gap: 15px;
    width: 100%;
    margin-bottom: 25px;
}

.input-group-wrapper input,
.input-group-wrapper textarea {
    margin-top: 0 !important;
    flex: 1;
}

.button-group-inline {
    display: flex;
    flex-direction: row;
    gap: 8px;
    align-items: center;
    white-space: nowrap;
}

.helper-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(168, 85, 247, 0.45);
    background: linear-gradient(135deg, #b066f8, #9d44ef) !important;
}

.info-box {
    padding: 25px 30px;
    border-radius: 20px;
    background: rgba(2, 6, 23, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-left: 6px solid #38bdf8;
    backdrop-filter: blur(20px);
    line-height: 1.6;
    font-size: 16px;
    margin-top: 25px;
    color: #ffffff;
    box-shadow: 0 25px 60px -10px rgba(0, 0, 0, 0.8);
}

.info-box strong {
    color: #38bdf8;
    display: block;
    margin-bottom: 8px;
    font-size: 18px;
}

.shop-preview {
    margin-top: 25px;
    background: white;
    color: #0f172a;
    border-radius: 24px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border: 1px solid #e2e8f0;
}

.shop-preview h3 {
    margin: 0;
    font-size: 22px;
    font-weight: 800;
}

.shop-preview p {
    margin-top: 10px;
    color: #475569;
}

.shop-preview img {
    border: 1px solid #f1f5f9;
}

.image-choice-item:hover {
    transform: scale(1.02);
}

.product-card {
    border: 1px solid #ccc;
    border-radius: 12px;
    padding: 15px;
    margin-top: 15px;
}

input,
textarea {
    width: 100%;
    margin-top: 18px;
    padding: 18px;
    outline: none;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.05) !important;
    color: white !important;
    font-size: 16px;
    border: 2px solid #38bdf8 !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

input:focus-visible,
textarea:focus-visible,
select:focus-visible {
    outline: 2px solid #fbbf24 !important; /* Gelber Fokus nur bei Tastatur-Navigation */
    outline-offset: 2px;
}

input:focus,
textarea:focus,
select:focus {
    outline: none !important;
    border-color: #a855f7 !important; /* Lila Border bei Fokus/Klick */
    background: rgba(255, 255, 255, 0.1) !important;
    box-shadow: 0 0 20px rgba(168, 85, 247, 0.3) !important;
}

input::placeholder,
textarea::placeholder {
    color: #ffffff !important;
    opacity: 1 !important;
    -webkit-text-fill-color: #ffffff !important;
}

/* Suchfelder in den Datenbank-Modals: dunkle Schrift auf hellem Hintergrund */
#customerSearch,
#productSearch {
    color: #1e293b !important;
    -webkit-text-fill-color: #1e293b !important;
    background: #f8fafc !important;
    border-color: #e2e8f0 !important;
}

#customerSearch::placeholder,
#productSearch::placeholder {
    color: #94a3b8 !important;
    -webkit-text-fill-color: #94a3b8 !important;
    opacity: 1 !important;
}

.quiz-option {
    margin-top: 10px;
    padding: 12px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.08);
    cursor: pointer;
    transition: 0.3s;
}

.quiz-option:hover {
    background: rgba(56, 189, 248, 0.25);
}

.progress-bar {
    width: 100%;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 999px;
    overflow: hidden;
    margin-top: 10px;
}

select {
    width: 100%;
    padding: 15px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.05) !important;
    border: 2px solid #38bdf8 !important;
    color: white !important;
    font-size: 16px;
    outline: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

select:focus {
    background: rgba(255, 255, 255, 0.1) !important;
    border-color: #a855f7 !important;
    box-shadow: 0 0 20px rgba(56, 189, 248, 0.3);
}

select option {
    background: #0f172a; /* Dunkler Hintergrund für die Optionen */
    color: white;
}

#saveProductBtn,
#saveSEOBtn,
#finishGameBtn {
    background: linear-gradient(135deg, #a855f7, #9333ea) !important;
    color: white !important;
    box-shadow: 0 10px 30px rgba(168, 85, 247, 0.35) !important;
    transition: all 0.3s ease !important;
}

#saveProductBtn:hover,
#saveSEOBtn:hover,
#finishGameBtn:hover {
    background: linear-gradient(135deg, #38bdf8, #0ea5e9) !important;
    color: #00111f !important; /* Schrift wird Schwarz/Dunkelblau bei Hover auf Blau */
    box-shadow: 0 20px 40px rgba(56, 189, 248, 0.45) !important;
    transform: translateY(-2px) !important;
}

#startScreen {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    background: radial-gradient(
        circle at center,
        rgba(51, 65, 85, 0.85),
        rgba(30, 41, 59, 0.95)
    ); /* Zurück zum Original */
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9000; /* Reduziert, damit Topbar (10000) drüber liegt */
    backdrop-filter: blur(15px);
    padding-left: 100px; /* Nudge nach rechts, um Platz für Sidebar zu lassen */
}

.start-screen-card {
    position: relative;
    z-index: 0;
    overflow: hidden;
    border: none !important;
    background: transparent !important;
    padding: 60px;
    border-radius: 40px;
    max-width: 1000px;
    width: 95%;
    text-align: center;
    box-shadow: 0 50px 150px -30px rgba(0, 0, 0, 1);
}

.start-screen-card::before {
    content: "";
    position: absolute;
    z-index: -2;
    left: 50%;
    top: 50%;
    width: 4000px; /* Extra groß für die breite Karte */
    height: 4000px;
    background: conic-gradient(#38bdf8, #a855f7, #38bdf8, #a855f7, #38bdf8);
    transform-origin: center;
    animation: rotate-border 6s linear infinite;
}

.start-screen-card::after {
    content: "";
    position: absolute;
    z-index: -1;
    inset: 6px;
    background: linear-gradient(
        135deg,
        rgba(15, 23, 42, 0.98),
        rgba(2, 6, 23, 1)
    ); /* Zurück zum Original */
    border-radius: 34px;
}

/* MODAL */
.modal-open {
    overflow: hidden !important;
}

.modal-overlay {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background: rgba(
        15,
        23,
        42,
        0.3
    ) !important; /* Transparent mit 30% Deckkraft */
    backdrop-filter: blur(20px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 99999 !important;
    overflow: hidden !important;
}

.modal {
    position: relative;
    z-index: 10;
    overflow: hidden; /* WICHTIG: Clippt die Animation auf den Container */
    background: rgba(15, 23, 42, 0.85); /* Transparent mit 85% Deckkraft */
    border-radius: 40px;
    padding: 0; /* Padding wird auf den inneren Scroll-Container verlagert */
    max-width: 800px;
    width: 95%;
    text-align: center;
    box-shadow: 0 40px 100px rgba(0, 0, 0, 0.6);
    animation: modalIn 0.3s ease-out;
    display: flex;
    flex-direction: column;
    max-height: 85vh; /* Begrenzt die Höhe des Modals */
}

/* Neuer Scroll-Bereich NUR für den Text */
.modal-content-scroll {
    overflow-y: auto;
    padding: 60px;
    flex: 1;
    position: relative;
    z-index: 5;
}

.modal::before {
    content: "";
    position: absolute;
    z-index: -2;
    left: 50%;
    top: 50%;
    width: 150%; /* Angepasst an Startseite */
    height: 300%; /* Angepasst an Startseite */
    background: conic-gradient(
        from 0deg,
        #38bdf8,
        #a855f7,
        #38bdf8,
        #a855f7,
        #38bdf8
    );
    transform-origin: center;
    animation: rotate-border 4s linear infinite;
    transform: translate(-50%, -50%);
}

.modal::after {
    content: "";
    position: absolute;
    z-index: -1;
    inset: 4px; /* Dicke des Rahmens */
    background: rgba(15, 23, 42, 0.9); /* Transparent mit 90% Deckkraft */
    border-radius: 36px;
}

.modal h3 {
    background: linear-gradient(135deg, #38bdf8, #a855f7);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: transparent;
    margin-bottom: 25px;
    font-size: 42px;
    font-weight: 900;
}

.modal p {
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 35px;
    font-size: 22px;
}

.modal-btn {
    background: #38bdf8; /* Startfarbe: Blau */
    color: #000000; /* Textfarbe auf Blau: Schwarz */
    padding: 18px 45px;
    border-radius: 99px;
    font-weight: 800;
    cursor: pointer;
    border: none;
    transition: all 0.3s ease;
    font-size: 20px;
    box-shadow: 0 10px 25px rgba(56, 189, 248, 0.4);
    text-transform: none;
}

.modal-btn:hover {
    background: #a855f7; /* Hover-Farbe: Lila */
    color: #ffffff; /* Textfarbe auf Lila: Weiß */
    transform: translateY(-3px);
    box-shadow: 0 15px 30px rgba(168, 85, 247, 0.5);
}

/* Cursor für alle klickbare Elemente und ihre Kinder */
div[onclick],
div[onclick] *,
li[onclick],
li[onclick] * {
    cursor: pointer !important;
}

/* Kein Hover-Effekt für die Hauptkacheln */
.glass-card:hover {
    transform: none !important;
    box-shadow: none !important;
    border-color: inherit !important;
    border-width: inherit !important;
    border-style: inherit !important;
}

/* Hover-Effekt für li-Elemente mit onclick */
li[onclick]:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(56, 189, 248, 0.3);
    border-color: rgba(56, 189, 248, 0.5) !important;
}

/* Hover-Effekt für div-Elemente mit onclick (innerhalb von Kacheln) */
.glass-card div[onclick]:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(56, 189, 248, 0.3);
    border-color: rgba(56, 189, 248, 0.5) !important;
}

/* Spezifische Hover-Effekte für purple-theme li-Elemente */
.glass-card.purple-theme li[onclick]:hover {
    box-shadow: 0 8px 20px rgba(168, 85, 247, 0.3);
    border-color: rgba(168, 85, 247, 0.5) !important;
}

/* Spezifische Hover-Effekte für purple-theme div-Elemente */
.glass-card.purple-theme div[onclick]:hover {
    box-shadow: 0 8px 20px rgba(168, 85, 247, 0.3);
    border-color: rgba(168, 85, 247, 0.5) !important;
}

/* RESPONSIVE */

@media (max-width: 1000px) {
    .hero {
        grid-template-columns: 1fr;
    }

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

@media (max-width: 700px) {
    .hero h1 {
        font-size: 42px;
    }

    .hero-card h1 {
        font-size: 38px;
    }

    .hero {
        padding: 30px;
    }

    .topbar {
        padding: 20px;
    }

    .hero-buttons {
        flex-direction: column;
    }

    .large,
    .wide {
        grid-column: span 1;
    }
}

/* INFO und HELP Buttons für Büromanagement */
.helper-btn {
    background: linear-gradient(135deg, #a855f7, #9333ea) !important;
    color: white !important;
    border: none;
    border-radius: 99px;
    height: 38px;
    padding: 0 25px;
    font-size: 15px;
    font-weight: 800;
    box-shadow: 0 4px 15px rgba(168, 85, 247, 0.3);
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.helper-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(168, 85, 247, 0.45);
    background: linear-gradient(135deg, #b066f8, #9d44ef) !important;
}

.info-icon-btn {
    background: linear-gradient(135deg, #38bdf8, #0ea5e9) !important;
    color: white !important;
    border: none;
    border-radius: 99px;
    height: 38px;
    min-width: 45px;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 11;
    text-transform: uppercase;
    box-shadow: 0 4px 15px rgba(56, 189, 248, 0.3);
}

.info-icon-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(56, 189, 248, 0.45);
    background: linear-gradient(135deg, #7dd3fc, #38bdf8) !important;
}

.input-group-wrapper {
    display: flex;
    align-items: center;
    gap: 15px;
    width: 100%;
    margin-bottom: 25px;
}

.input-group-wrapper input,
.input-group-wrapper textarea {
    margin-top: 0 !important;
    flex: 1;
}

.button-group-inline {
    display: flex;
    flex-direction: row;
    gap: 8px;
    align-items: center;
    white-space: nowrap;
}
