/* --- Reset & Base --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: #050505;
    font-family: 'Outfit', sans-serif;
    color: #ffffff;
    overflow: hidden;
}

/* --- Canvas Background --- */
#neural-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 0;
    background: radial-gradient(circle at center, #0a1128 0%, #050505 70%);
}

/* --- UI Layout Layer --- */
.ui-layer {
    position: fixed; /* Geändert auf fixed für bessere Stabilität */
    top: 0;
    left: 0;
    z-index: 10;
    width: 100vw;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    pointer-events: none; /* Klicks gehen durch die Ebene durch... */
}

.glass-card {
    pointer-events: auto; /* ...außer auf die Card selbst */
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(100, 200, 255, 0.1);
    border-radius: 24px;
    padding: 3rem;
    max-width: 600px;
    width: 90%;
    text-align: center;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.1);
    transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease, all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 1;
    visibility: visible;
}

.glass-card.hidden {
    opacity: 0;
    visibility: hidden;
    transform: scale(0.95);
    pointer-events: none;
}

/* --- Typografie --- */
.headline {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 1.5rem;
}

.headline img {
    width: 80%;
    max-width: 300px;
    height: auto;
    margin-bottom: 1rem;
}

.ai-gradient2 {
    background: linear-gradient(to left, #fff 0%, #777 50%, #fff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-size: 200% auto;
    animation: shine 4s linear infinite;
}

@keyframes shine {
    to { background-position: 200% center; }
}

/* --- Interactive Button --- */
.btn-glow {
    background: transparent;
    color: #fff;
    font-family: inherit;
    font-size: 1.1rem;
    font-weight: 500;
    padding: 1rem 2.5rem;
    border: 1px solid #06b6d4;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 0 15px rgba(6, 182, 212, 0.2);
    position: relative;
    z-index: 5;
}

.btn-glow:hover {
    background: rgba(6, 182, 212, 0.1);
    box-shadow: 0 0 30px rgba(6, 182, 212, 0.6);
}

/* --- Action Wrapper & Warnung --- */
.action-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 2rem;
}

.ai-warning {
    display: none;
    flex-direction: column;
    align-items: center;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: rgb(255, 50, 50);
    margin-top: 0;
    opacity: 0;
    transition: all 0.5s ease;
}

.ai-warning.show {
    display: flex;
    margin-top: 25px;
    opacity: 1;
}

/* ========================= */
/* UI: Logo & Settings     */
/* ========================= */

.logo-top-left {
    position: fixed;
    top: 12px;
    left: 12px;
    z-index: 100; /* Viel höher als ui-layer */
    pointer-events: auto; /* Wichtig! */
    cursor: pointer;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    opacity: 0;
    visibility: hidden;
}

.logo-top-left.visible {
    opacity: 0.85;
    visibility: visible;
}

.param-toggle {
    position: fixed;
    top: 12px;
    right: 12px;
    z-index: 100; /* Viel höher als ui-layer */
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid rgba(6, 182, 212, 0.8);
    background: rgba(15, 23, 42, 0.9);
    color: #fff;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.5);
    pointer-events: auto; /* Wichtig! */
    transition: transform 0.2s active;
}

.param-toggle:active {
    transform: scale(0.9);
}

.param-panel {
    position: fixed;
    top: 64px;
    right: 12px;
    z-index: 100;
    width: min(340px, 90vw);
    max-height: 80vh;
    padding: 20px;
    border-radius: 16px;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(148, 163, 184, 0.4);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.7);
    color: #e5e7eb;
    overflow-y: auto;
    pointer-events: auto; /* Wichtig! */
}

.param-panel.hidden {
    display: none;
}

/* --- Form Elements --- */
.param-row {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 16px;
}

.param-row input[type="range"] {
    cursor: pointer;
    accent-color: #06b6d4;
}

/* Smartphones */
@media (max-width: 600px) {
    .glass-card {
        max-width: 390px;
        padding: 2rem 1.5rem;
	zoom: 0.7;

    }
    
    .param-panel {
        top: 60px;
        right: 10px;
        left: 10px;
        width: auto;
    }
}

/* Impressum-Link rechts unten statt mittig */
.impressum-link{
    position: fixed;
    right: 18px;
    bottom: 14px;
    left: auto;
    width: auto;
    text-align: right;
    z-index: 1100;
    font-size: 12px;
    opacity: 0.78;
}

.impressum-link a{
    color: white;
    text-decoration: none;
    cursor: pointer;
    pointer-events: auto;
}

.impressum-link a:hover{
    opacity: 1;
    text-decoration: underline;
}

/* Overlay darf Klicks annehmen */
.impressum-overlay{
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.65);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    pointer-events: auto;
}

/* Fenster als Bezugspunkt fürs X */
.impressum-window{
    position: relative;
    width: 90%;
    height: 90%;
    overflow: auto;
    background: rgba(20,20,25,0.95);
    border-radius: 18px;
    padding: 50px;
    color: white;
    font-family: 'Outfit', sans-serif;
    line-height: 1.5;
    pointer-events: auto;
}

/* X wirklich klickbar machen */
.close-impressum{
    position: absolute;
    top: 18px;
    right: 22px;
    background: none;
    border: none;
    color: white;
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
    z-index: 2100;
    pointer-events: auto;
    padding: 8px;
}

/* hidden muss wirklich verstecken */
.hidden{
    display: none !important;
}

.brand-logo-small {
    width: 120px;
}

#neural-canvas{
    touch-action: none;
}
