* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

body, html {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    overflow: hidden; /* Scroll responsibility moved to wrapper */
    background-color: #030208; 
    background: radial-gradient(circle at center, #0a0614 0%, #030208 100%); 
    font-family: 'Rajdhani', sans-serif;
    color: white;
}

/* 3D Canvas als Hintergrund - IMMER FIXIERT */
#network-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1; 
}

/* Grain Overlay - Zwischen Hintergrund und UI */
.grain-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 5; /* Zwischen Canvas (1) und Wrapper (10) */
    pointer-events: none;
    opacity: 0.45; /* Heavy Cinematic Texture */
    filter: brightness(0.5);
}

.grain-overlay::before {
    content: "";
    position: absolute;
    top: -100%;
    left: -100%;
    width: 300%;
    height: 300%;
    /* Frequenz auf absolutes Limit (12.0) gesetzt für mikroskopische Dichte */
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='12.0' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
    background-repeat: repeat;
    animation: grain-jump 0.15s steps(2) infinite; /* Hochfrequentes Vibrieren */
}

@keyframes grain-jump {
    0%, 100% { transform: translate(0, 0); }
    10% { transform: translate(-5%, -5%); }
    20% { transform: translate(-10%, 5%); }
    30% { transform: translate(5%, -10%); }
    40% { transform: translate(-5%, 15%); }
    50% { transform: translate(-10%, -5%); }
    60% { transform: translate(15%, 0); }
    70% { transform: translate(0, 10%); }
    80% { transform: translate(-15%, 0); }
    90% { transform: translate(10%, 5%); }
}

/* Scroll Mask Wrapper for top-edge fade */
.scroll-mask-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    
    /* Der magische Fade-Effekt am oberen Rand */
    mask-image: linear-gradient(to bottom, transparent 0%, black 50vh);
    -webkit-mask-image: linear-gradient(to bottom, transparent 0%, black 50vh);
    mask-size: 100% 100%;
    mask-repeat: no-repeat;
    
    /* Gruppiert alle Kinder in einen Layer für korrekte Maskierung (wichtig für backdrop-filter) */
    isolation: isolate;
    transform: translateZ(0);
}

.scroll-mask-wrapper::-webkit-scrollbar { display: none; }
.scroll-mask-wrapper { scrollbar-width: none; }

/* Main Content Container */
.page-container {
    position: relative;
    width: 100%;
    pointer-events: none;
}

.section {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 100px 20px;
    width: 100%;
}

/* Glassmorphism Panel */
.glass-panel {
    padding: 20px 40px; 
    background: rgba(20, 10, 35, 0.4); /* Purple tinted background */
    border-radius: 6px;
    border: 1px solid rgba(100, 65, 165, 0.3); /* Purple border */
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    text-align: center;
    position: relative;
    overflow: hidden;
    z-index: 10;
    pointer-events: auto; /* Allow interaction if needed */
}

/* Pseudo Content Cards */
.glass-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    width: 100%;
    max-width: 1200px;
}

.card {
    background: rgba(15, 10, 25, 0.5);
    border: 1px solid rgba(100, 65, 165, 0.1);
    padding: 40px;
    border-radius: 12px;
    backdrop-filter: blur(10px);
    text-align: left;
    transition: transform 0.3s ease, border-color 0.3s ease;
    pointer-events: auto;
}

.card:hover {
    transform: translateY(-5px);
    border-color: rgba(100, 65, 165, 0.6);
}

.card-icon {
    font-size: 2.5rem;
    margin-bottom: 20px;
    filter: drop-shadow(0 0 10px rgba(100, 65, 165, 0.5));
}

.card h3 {
    font-family: 'Orbitron', sans-serif;
    color: #6441a5;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 2px;
}

/* Stats Grid */
.stats-grid {
    display: flex;
    justify-content: space-around;
    width: 100%;
    max-width: 1000px;
}

.stat-item {
    text-align: center;
    pointer-events: auto;
}

.stat-val {
    display: block;
    font-size: 4rem;
    font-weight: 800;
    font-family: 'Orbitron', sans-serif;
    color: #ffffff;
    text-shadow: 0 0 20px rgba(100, 65, 165, 0.6);
}

.stat-label {
    text-transform: uppercase;
    letter-spacing: 4px;
    color: #6441a5;
    font-size: 0.9rem;
    opacity: 0.8;
}


/* Subtiler Glow-Effekt INNERHALB des Panels */
.glass-panel::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at center, rgba(138, 43, 226, 0.05) 0%, transparent 70%);
    pointer-events: none;
}

/* Glow Text Design mit dauerhaftem Glow und Glitch-Layering */
.glow-text {
    font-family: 'Outfit', sans-serif;
    font-size: 3.5rem;
    font-weight: 800;
    color: #ffffff; /* Fallback */
    letter-spacing: 8px;
    margin: 0;
    text-transform: uppercase;
    position: relative;
    display: inline-block;
}

/* 1. LAYER: Permanent Steady Glow (ganz hinten) */
.glow-text::before {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -3;
    color: transparent;
    text-shadow: 
        0 0 10px rgba(138, 43, 226, 0.9),
        0 0 20px rgba(100, 65, 165, 0.8),
        0 0 35px rgba(138, 43, 226, 0.6);
    pointer-events: none;
}

/* 2. LAYER: Glitch Layer 2 (mittlerer Layer) */
.text-gradient::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    color: #3f2a6d; /* Darker Purple */
    animation: rgb-shift-2 2.5s infinite linear alternate-reverse;
    opacity: 0.5;
    transform: translate(2px, -1px);
    pointer-events: none;
}

/* 3. LAYER: Glitch Layer 1 (kurz hinter dem Haupttext) */
.glow-text::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    color: #6441a5; /* Purple */
    animation: rgb-shift-1 3s infinite linear alternate-reverse;
    opacity: 0.5;
    transform: translate(-2px, 1px);
    pointer-events: none;
}

.text-gradient {
    background: linear-gradient(to bottom, #ffffff 20%, #b0b0b0 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    display: inline-block;
    position: relative;
}

/* Subtitle Specifics */
.subtitle-container {
    margin-top: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 5px;
}

.subtitle {
    font-size: 1.5rem !important;
    letter-spacing: 4px !important;
}

.subtitle .text-gradient::after, 
.subtitle::before, 
.subtitle::after {
    font-size: 1.5rem !important;
    letter-spacing: 4px !important;
}

.cursor {
    font-family: 'Rajdhani', sans-serif;
    font-size: 1.8rem;
    color: #6441a5;
    font-weight: 800;
    text-shadow: 0 0 10px rgba(100, 65, 165, 0.8);
    display: inline-block;
    vertical-align: middle;
}

.cursor.blink {
    animation: cursor-blink 0.4s step-end infinite;
}

@keyframes cursor-blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

/* Base Flicker um es kaputt wirken zu lassen */
@keyframes base-flicker {
    0%, 19.9%, 22%, 62.9%, 64%, 64.9%, 70%, 100% {
        opacity: 1;
        transform: translate(0, 0);
    }
    20%, 21.9%, 63%, 63.9%, 65%, 69.9% {
        opacity: 0.7;
        transform: translate(1px, -1px); /* Subtiler Ruckler beim Flickern */
    }
}

/* Weicher, chromatischer Glitch ohne Slices */
@keyframes rgb-shift-1 {
    0%   { transform: translate(0, 0); opacity: 0; }
    2%   { transform: translate(-3px, 1px); opacity: 0.8; }
    4%   { transform: translate(0, 0); opacity: 0; }
    60%  { transform: translate(0, 0); opacity: 0; }
    62%  { transform: translate(2px, -2px); opacity: 0.5; }
    64%  { transform: translate(0, 0); opacity: 0; }
    100% { transform: translate(0, 0); opacity: 0; }
}

@keyframes rgb-shift-2 {
    0%   { transform: translate(0, 0); opacity: 0; }
    16%  { transform: translate(0, 0); opacity: 0; }
    18%  { transform: translate(3px, -1px); opacity: 0.8; }
    20%  { transform: translate(0, 0); opacity: 0; }
    80%  { transform: translate(0, 0); opacity: 0; }
    82%  { transform: translate(-1px, 2px); opacity: 0.6; }
    84%  { transform: translate(0, 0); opacity: 0; }
    100% { transform: translate(0, 0); opacity: 0; }
}

/* Responsive Anpassung für kleinere Bildschirme */
@media (max-width: 900px) {
    .glow-text {
        font-size: 2rem;
        letter-spacing: 5px;
    }
    .glass-panel {
        padding: 15px 30px;
    }
}

@media (max-width: 600px) {
    .glow-text {
        font-size: 1.5rem;
        letter-spacing: 3px;
    }
    .glass-panel {
        padding: 10px 20px;
    }
}
