/* ================================================================================
   MODERN TECH STYLE 1: Dark Tech Professional - Enhanced with Day/Night Mode
   
   Theme: Dunkles, technisches Design mit animierten blauen Neon-Akzenten
   Features: Grid-Hintergrund, Glassmorphism, Neon-Effekte, Umfangreiche Animationen
   Day/Night Mode: Toggle zwischen Dark und Light Theme
   ================================================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;600&display=swap');

/* === CSS VARIABLEN FÜR THEME === */
:root {
    /* Dark Theme (Standard) */
    --bg-primary: #0a192f;
    --bg-secondary: rgba(15, 23, 42, 0.85);
    --bg-tertiary: rgba(30, 41, 59, 0.6);
    --text-primary: #cbd5e1;
    --text-secondary: #94a3b8;
    --text-heading: #e2e8f0;
    --accent-color: #60a5fa;
    --accent-rgb: 96, 165, 250;
    --border-color: rgba(96, 165, 250, 0.2);
    --grid-color: rgba(96, 165, 250, 0.03);
    --scanline-color: rgba(96, 165, 250, 0.3);
}

html[data-theme="light"] {
    /* Light Theme */
    --bg-primary: #f1f5f9;
    --bg-secondary: rgba(255, 255, 255, 0.95);
    --bg-tertiary: rgba(248, 250, 252, 0.8);
    --text-primary: #1e293b;
    --text-secondary: #475569;
    --text-heading: #0f172a;
    --accent-color: #3b82f6;
    --accent-rgb: 59, 130, 246;
    --border-color: rgba(59, 130, 246, 0.3);
    --grid-color: rgba(59, 130, 246, 0.08);
    --scanline-color: rgba(59, 130, 246, 0.2);
}

/* === ANIMATIONEN === */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideInFromLeft {
    from { opacity: 0; transform: translateX(-30px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes slideInFromRight {
    from { opacity: 0; transform: translateX(30px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes glow {
    0%, 100% { box-shadow: 0 0 5px rgba(var(--accent-rgb), 0.4), 0 0 10px rgba(var(--accent-rgb), 0.2); }
    50% { box-shadow: 0 0 20px rgba(var(--accent-rgb), 0.6), 0 0 30px rgba(var(--accent-rgb), 0.3); }
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

@keyframes scanline {
    0% { transform: translateY(-100%); }
    100% { transform: translateY(100vh); }
}

@keyframes gridPulse {
    0%, 100% { opacity: 0.03; }
    50% { opacity: 0.06; }
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

@keyframes shimmer {
    0% { background-position: -1000px 0; }
    100% { background-position: 1000px 0; }
}

@keyframes borderGlow {
    0%, 100% { border-color: rgba(var(--accent-rgb), 0.2); box-shadow: 0 0 5px rgba(var(--accent-rgb), 0.1); }
    50% { border-color: rgba(var(--accent-rgb), 0.5); box-shadow: 0 0 20px rgba(var(--accent-rgb), 0.3); }
}

/* === GLOBALE BASIS-STILE === */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

html, body {
    height: 100%;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg-primary);
    background-image: 
        linear-gradient(var(--grid-color) 1.5px, transparent 1.5px),
        linear-gradient(90deg, var(--grid-color) 1.5px, transparent 1.5px);
    background-size: 40px 40px;
    color: var(--text-primary);
    overflow: hidden;
    line-height: 1.7;
    position: relative;
    transition: all 0.5s ease;
}

/* Animiertes Grid */
html::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(var(--grid-color) 1.5px, transparent 1.5px),
        linear-gradient(90deg, var(--grid-color) 1.5px, transparent 1.5px);
    background-size: 40px 40px;
    animation: gridPulse 4s ease-in-out infinite;
    pointer-events: none;
    z-index: 1;
    transition: all 0.5s ease;
}

/* Scanline Effekt */
html::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(to bottom, 
        transparent,
        var(--scanline-color),
        transparent
    );
    animation: scanline 8s linear infinite;
    pointer-events: none;
    z-index: 9999;
    opacity: 0.5;
    transition: all 0.5s ease;
}

/* === HEADER/TOPFRAME === */
#topframe {
    height: 70px;
    background: var(--bg-secondary);
    backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid var(--border-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 35px;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5), 0 0 20px rgba(var(--accent-rgb), 0.08);
    position: fixed;
    width: 100%;
    z-index: 1000;
    top: 0;
    animation: slideInFromLeft 0.6s ease-out;
    transition: all 0.5s ease;
}

.logo {
    animation: float 3s ease-in-out infinite;
}

.logo img {
    height: 45px;
    width: auto;
    filter: brightness(1.2) drop-shadow(0 0 10px rgba(var(--accent-rgb), 0.4));
    transition: all 0.5s ease;
}

.logo:hover img {
    transform: scale(1.08) rotate(5deg);
    filter: brightness(1.3) drop-shadow(0 0 25px rgba(var(--accent-rgb), 0.8));
    animation: glow 2s ease-in-out infinite;
}

#topframe h1 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--accent-color);
    letter-spacing: 2px;
    margin: 0;
    text-transform: uppercase;
    text-shadow: 0 0 20px rgba(var(--accent-rgb), 0.5);
    position: relative;
    animation: fadeIn 0.8s ease-out 0.2s both;
    transition: all 0.5s ease;
}

#topframe h1::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, var(--accent-color), transparent);
    animation: shimmer 3s linear infinite;
    background-size: 1000px 100%;
    transition: all 0.5s ease;
}

/* Sprachauswahl */
#language-selector {
    display: flex;
    gap: 8px;
    animation: slideInFromRight 0.6s ease-out 0.3s both;
}

#language-selector button {
    background: rgba(var(--accent-rgb), 0.1);
    color: var(--accent-color);
    border: 1px solid rgba(var(--accent-rgb), 0.3);
    padding: 7px 15px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    font-family: 'JetBrains Mono', monospace;
    transition: all 0.5s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    overflow: hidden;
}

#language-selector button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(var(--accent-rgb), 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.5s, height 0.5s;
}

#language-selector button:hover::before {
    width: 300px;
    height: 300px;
}

#language-selector button:hover {
    background: rgba(var(--accent-rgb), 0.2);
    border-color: var(--accent-color);
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 0 25px rgba(var(--accent-rgb), 0.5), 0 5px 15px rgba(0, 0, 0, 0.4);
    text-shadow: 0 0 10px rgba(var(--accent-rgb), 0.8);
}

#language-selector button:active {
    transform: translateY(-1px) scale(1.02);
}

/* === NAVIGATION/MENUFRAME === */
#menuframe {
    height: 55px;
    background: var(--bg-tertiary);
    backdrop-filter: blur(15px);
    border-bottom: 1px solid var(--border-color);
    padding: 0 20px;
    position: fixed;
    width: 100%;
    z-index: 999;
    top: 70px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    animation: slideInFromLeft 0.6s ease-out 0.1s both;
    transition: all 0.5s ease;
}

#menu {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
    gap: 2px;
    overflow: visible;
    position: relative;
}

#menu li {
    padding: 0;
    position: relative;
    height: 100%;
    display: flex;
    align-items: center;
    animation: fadeIn 0.6s ease-out both;
}

#menu li:nth-child(1) { animation-delay: 0.2s; }
#menu li:nth-child(2) { animation-delay: 0.25s; }
#menu li:nth-child(3) { animation-delay: 0.3s; }
#menu li:nth-child(4) { animation-delay: 0.35s; }
#menu li:nth-child(5) { animation-delay: 0.4s; }
#menu li:nth-child(6) { animation-delay: 0.45s; }
#menu li:nth-child(7) { animation-delay: 0.5s; }
#menu li:nth-child(8) { animation-delay: 0.55s; }

/* Hauptmenü-Links */
#menu > li > a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    padding: 0 16px;
    height: 100%;
    display: flex;
    align-items: center;
    transition: all 0.5s ease;
    border-bottom: 2px solid transparent;
    position: relative;
    text-transform: uppercase;
    letter-spacing: 1.2px;
}

#menu > li > a::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--accent-color), transparent);
    transition: all 0.5s ease;
    transform: translateX(-50%);
    box-shadow: 0 0 10px rgba(var(--accent-rgb), 0.8);
}

#menu > li > a::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, rgba(var(--accent-rgb), 0.1) 0%, transparent 100%);
    opacity: 0;
    transition: opacity 0.5s ease;
}

#menu > li > a:hover {
    color: var(--accent-color);
    text-shadow: 0 0 10px rgba(var(--accent-rgb), 0.5);
    transform: translateY(-2px);
}

#menu > li > a:hover::before {
    width: 85%;
}

#menu > li > a:hover::after {
    opacity: 1;
}

/* Untermenüs Ebene 1 */
#menu > li > ul {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 250px;
    background: var(--bg-secondary);
    backdrop-filter: blur(20px);
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), 0 0 0 1px var(--border-color);
    padding: 10px;
    margin-top: 8px;
    list-style: none;
    z-index: 2000;
    border: 1px solid var(--border-color);
    animation: borderGlow 3s ease-in-out infinite;
    transition: all 0.5s ease;
}

#menu li ul li ul {
    display: none;
    position: absolute;
    top: -10px;
    left: 100%;
    margin-left: 10px;
    min-width: 240px;
    background: var(--bg-secondary);
    backdrop-filter: blur(20px);
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), 0 0 0 1px var(--border-color);
    padding: 10px;
    list-style: none;
    z-index: 2001;
    border: 1px solid var(--border-color);
    transition: all 0.5s ease;
}

#menu li.open > ul {
    display: block;
    animation: fadeIn 0.3s ease-out;
}

/* Untermenü-Items */
#menu ul li {
    padding: 0;
    position: relative;
    border-bottom: none;
}

#menu ul li a {
    display: block;
    padding: 10px 14px;
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.5s ease;
    border-radius: 8px;
    border-left: 2px solid transparent;
    position: relative;
    overflow: hidden;
}

#menu ul li a::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(180deg, var(--accent-color), var(--accent-color));
    transform: scaleY(0);
    transition: transform 0.5s ease;
}

#menu ul li a::after {
    content: '→';
    position: absolute;
    right: 14px;
    opacity: 0;
    transform: translateX(-10px);
    transition: all 0.5s ease;
    color: var(--accent-color);
}

#menu ul li a:hover {
    background: rgba(var(--accent-rgb), 0.15);
    color: var(--accent-color);
    padding-left: 18px;
    padding-right: 30px;
    text-shadow: 0 0 10px rgba(var(--accent-rgb), 0.5);
    transform: translateX(3px);
}

#menu ul li a:hover::before {
    transform: scaleY(1);
}

#menu ul li a:hover::after {
    opacity: 1;
    transform: translateX(0);
}

/* === HAUPTINHALT === */
#mainframe {
    position: absolute;
    top: 125px;
    bottom: 45px;
    width: 100%;
    overflow-y: auto;
    background: transparent;
    padding: 0;
    z-index: 2;
}

/* Scrollbar */
#mainframe::-webkit-scrollbar {
    width: 10px;
}

#mainframe::-webkit-scrollbar-track {
    background: rgba(var(--accent-rgb), 0.05);
    border-radius: 10px;
    transition: all 0.5s ease;
}

#mainframe::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--accent-color) 0%, var(--accent-color) 100%);
    border-radius: 10px;
    border: 2px solid transparent;
    background-clip: content-box;
    box-shadow: 0 0 10px rgba(var(--accent-rgb), 0.5);
    animation: glow 3s ease-in-out infinite;
    transition: all 0.5s ease;
}

#mainframe::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, var(--accent-color) 0%, var(--accent-color) 100%);
    background-clip: content-box;
    box-shadow: 0 0 15px rgba(var(--accent-rgb), 0.8);
}

#content {
    max-width: 1200px;
    margin: 28px auto;
    padding: 38px 35px;
    background: var(--bg-tertiary);
    backdrop-filter: blur(15px);
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5), 0 0 0 1px var(--border-color);
    border: 1px solid var(--border-color);
    animation: fadeIn 0.8s ease-out 0.4s both;
    position: relative;
    overflow: hidden;
    transition: all 0.5s ease;
}

#content::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, 
        rgba(var(--accent-rgb), 0.2),
        rgba(var(--accent-rgb), 0),
        rgba(var(--accent-rgb), 0.2)
    );
    border-radius: 16px;
    opacity: 0;
    transition: opacity 0.5s ease;
    animation: shimmer 3s linear infinite;
    background-size: 200% 200%;
    z-index: -1;
}

#content:hover::before {
    opacity: 1;
}

#content h2, #content h3, #content h4 {
    color: var(--text-heading);
    margin-top: 1.8em;
    margin-bottom: 0.9em;
    font-weight: 700;
    animation: fadeIn 0.6s ease-out both;
    transition: all 0.5s ease;
}

#content h2 {
    font-size: 2rem;
    color: var(--accent-color);
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 14px;
    margin-bottom: 1.3em;
    text-shadow: 0 0 20px rgba(var(--accent-rgb), 0.4);
    letter-spacing: 0.5px;
    position: relative;
    animation: fadeIn 0.8s ease-out 0.2s both;
    transition: all 0.5s ease;
}

#content h2::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100px;
    height: 2px;
    background: linear-gradient(90deg, var(--accent-color), transparent);
    box-shadow: 0 0 10px rgba(var(--accent-rgb), 0.8);
    animation: shimmer 3s linear infinite;
    transition: all 0.5s ease;
}

#content h3 {
    font-size: 1.55rem;
    color: var(--text-secondary);
    position: relative;
    padding-left: 18px;
    animation: fadeIn 0.8s ease-out 0.3s both;
    transition: all 0.5s ease;
}

#content h3::before {
    content: '▸';
    position: absolute;
    left: 0;
    color: var(--accent-color);
    text-shadow: 0 0 10px rgba(var(--accent-rgb), 0.8);
    animation: pulse 2s ease-in-out infinite;
}

#content h4 {
    font-size: 1.28rem;
    color: var(--text-primary);
    animation: fadeIn 0.8s ease-out 0.4s both;
    transition: all 0.5s ease;
}

#content p {
    margin-bottom: 1.15em;
    color: var(--text-primary);
    line-height: 1.8;
    animation: fadeIn 0.6s ease-out both;
    transition: all 0.5s ease;
}

#content ul, #content ol {
    margin-left: 1.9em;
    margin-bottom: 1.15em;
}

#content li {
    margin-bottom: 0.65em;
    color: var(--text-primary);
    line-height: 1.75;
    animation: slideInFromLeft 0.5s ease-out both;
    transition: all 0.5s ease;
}

#content li:hover {
    color: var(--text-heading);
    transform: translateX(5px);
}

#content li::marker {
    color: var(--accent-color);
    animation: pulse 3s ease-in-out infinite;
}

#content li strong {
    color: var(--text-heading);
    font-weight: 600;
    text-shadow: 0 0 5px rgba(var(--accent-rgb), 0.3);
    transition: all 0.5s ease;
}

#content a {
    color: var(--accent-color);
    text-decoration: none;
    border-bottom: 1px solid rgba(var(--accent-rgb), 0.4);
    transition: all 0.5s ease;
    position: relative;
}

#content a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--accent-color), var(--accent-color));
    transition: width 0.5s ease;
    box-shadow: 0 0 10px rgba(var(--accent-rgb), 0.6);
}

#content a:hover {
    color: var(--accent-color);
    text-shadow: 0 0 8px rgba(var(--accent-rgb), 0.5);
    border-bottom-color: transparent;
}

#content a:hover::after {
    width: 100%;
}

#content img {
    max-width: 100%;
    height: auto;
    border-radius: 14px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5), 0 0 0 1px var(--border-color);
    margin: 1.7em 0;
    border: 1px solid var(--border-color);
    transition: all 0.5s ease;
    animation: fadeIn 0.8s ease-out both;
}

#content img:hover {
    transform: scale(1.02) translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.6), 0 0 30px rgba(var(--accent-rgb), 0.4);
    border-color: rgba(var(--accent-rgb), 0.5);
}

/* === FOOTER === */
#bottomframe {
    height: 45px;
    background: var(--bg-secondary);
    backdrop-filter: blur(20px);
    border-top: 1px solid var(--border-color);
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    position: fixed;
    width: 100%;
    bottom: 0;
    z-index: 999;
    font-size: 0.85rem;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.5);
    font-family: 'JetBrains Mono', monospace;
    letter-spacing: 0.5px;
    animation: slideInFromLeft 0.6s ease-out 0.5s both;
    transition: all 0.5s ease;
}

footer p {
    margin: 0;
}

footer a {
    color: var(--accent-color);
    text-decoration: none;
    padding: 0 8px;
    transition: all 0.3s ease;
    position: relative;
}

footer a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 8px;
    right: 8px;
    height: 1px;
    background: var(--accent-color);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

footer a:hover {
    color: var(--accent-color);
    text-shadow: 0 0 8px rgba(var(--accent-rgb), 0.6);
}

footer a:hover::after {
    transform: scaleX(1);
}
    margin: 0;
    animation: fadeIn 1s ease-out 0.8s both;
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
    #topframe {
        padding: 0 20px;
        height: 65px;
    }

    #topframe h1 {
        font-size: 1.2rem;
    }

    #menuframe {
        height: auto;
        top: 65px;
    }

    #menu {
        flex-wrap: nowrap;
        overflow-x: auto;
    }

    #mainframe {
        top: 120px;
    }

    #content {
        padding: 25px;
        margin: 15px;
    }

    #content h2 {
        font-size: 1.7rem;
    }
}

/* === THEME TOGGLE BUTTON === */
.theme-toggle {
    background: rgba(var(--accent-rgb), 0.1);
    border: 1px solid var(--border-color);
    padding: 10px;
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    margin: 0 15px;
}

.theme-toggle svg {
    width: 20px;
    height: 20px;
    color: var(--accent-color);
    transition: all 0.3s ease;
    position: absolute;
}

.theme-toggle .sun-icon {
    opacity: 0;
    transform: rotate(-90deg) scale(0.5);
}

.theme-toggle .moon-icon {
    opacity: 1;
    transform: rotate(0deg) scale(1);
}

html[data-theme="light"] .theme-toggle .sun-icon {
    opacity: 1;
    transform: rotate(0deg) scale(1);
}

html[data-theme="light"] .theme-toggle .moon-icon {
    opacity: 0;
    transform: rotate(90deg) scale(0.5);
}

.theme-toggle:hover {
    background: rgba(var(--accent-rgb), 0.2);
    border-color: var(--accent-color);
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 0 20px rgba(var(--accent-rgb), 0.4);
}
