/* Lokale Font-Definitionen */
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('./fonts/Inter-Regular.woff2') format('woff2');
}

@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url('./fonts/Inter-Bold.woff2') format('woff2');
}

@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 900;
    font-display: swap;
    src: url('./fonts/Inter-Black.woff2') format('woff2');
}

@font-face {
    font-family: 'JetBrains Mono';
    font-style: normal;
    font-weight: 300;
    font-display: swap;
    src: url('./fonts/JetBrainsMono-Light.woff2') format('woff2');
}

@font-face {
    font-family: 'JetBrains Mono';
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url('./fonts/JetBrainsMono-SemiBold.woff2') format('woff2');
}

@font-face {
    font-family: 'JetBrains Mono';
    font-style: normal;
    font-weight: 800;
    font-display: swap;
    src: url('./fonts/JetBrainsMono-ExtraBold.woff2') format('woff2');
}

/* CSS-Variablen für konsistente Farben */
:root {
    --bg-primary: #000000;
    --text-primary: #ffffff;
    --accent-red: #ff3333;
    --accent-blue: #00ffff;
}

/* CSS Reset und Basis-Styles */
*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    font-family: 'Inter', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.2;
    overflow-x: hidden;
    cursor: crosshair;
    user-select: none;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Video-Hintergrund, leicht unscharf und dunkel */
.video-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -2;
    filter: grayscale(100%) brightness(30%) blur(5px);
}

/* XP-Style Popup Styles */
.xp-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(3px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    animation: popup-fade-in 0.2s ease-out;
}

@keyframes popup-fade-in {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.xp-popup-window {
    width: 90%;
    max-width: 400px;
    background: #c0c0c0;
    border: 2px solid;
    border-color: #ffffff #808080 #808080 #ffffff;
    font-family: 'MS Sans Serif', 'Tahoma', sans-serif;
    font-size: 11px;
    color: #000000;
    box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.5);
    animation: popup-bounce 0.3s ease-out;
}

@keyframes popup-bounce {
    0% {
        transform: scale(0.8) translateY(-20px);
    }
    50% {
        transform: scale(1.05) translateY(0);
    }
    100% {
        transform: scale(1) translateY(0);
    }
}

.xp-popup-header {
    background: linear-gradient(90deg, #0997ff 0%, #0053ee 100%);
    color: #ffffff;
    padding: 3px 4px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: bold;
    font-size: 11px;
    border-bottom: 1px solid #808080;
}

.xp-title-text {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 600;
    font-size: 12px;
    transition: color 0.1s ease;
}

.xp-close-btn {
    background: #c0c0c0;
    border: 1px solid;
    border-color: #ffffff #808080 #808080 #ffffff;
    width: 16px;
    height: 14px;
    font-size: 9px;
    font-weight: bold;
    color: #000000;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.xp-close-btn:hover {
    background: #e0e0e0;
}

.xp-close-btn:active {
    border-color: #808080 #ffffff #ffffff #808080;
    background: #a0a0a0;
}

.xp-popup-content {
    padding: 20px 16px;
    text-align: center;
    background: #c0c0c0;
}

.xp-description {
    font-family: 'JetBrains Mono', monospace;
    font-size: 13px;
    font-weight: 400;
    line-height: 1.4;
    margin: 0;
    color: #000000;
}

.xp-popup-footer {
    padding: 12px 16px 16px;
    text-align: center;
    background: #c0c0c0;
}

.xp-escape-btn {
    background: #c0c0c0;
    border: 2px solid;
    border-color: #ffffff #808080 #808080 #ffffff;
    padding: 4px 16px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    font-weight: 600;
    color: #000000;
    cursor: pointer;
    text-transform: uppercase;
    transition: all 0.1s ease;
}

.xp-escape-btn:hover {
    background: #e0e0e0;
    color: var(--accent-red);
}

.xp-escape-btn:active {
    border-color: #808080 #ffffff #ffffff #808080;
    background: #a0a0a0;
    transform: translateY(1px);
}

/* Responsive Anpassungen für das Popup */
@media (max-width: 480px) {
    .xp-popup-window {
        width: 95%;
        max-width: none;
        margin: 0 10px;
    }
    
    .xp-popup-content {
        padding: 16px 12px;
    }
    
    .xp-description {
        font-size: 12px;
    }
}

/* Roter schwebender Escape-Button für legal.html und privacy.html */
.back-button-container {
    position: fixed;
    top: 2rem;
    right: 2rem;
    z-index: 9999;
}

.red-glowing-circle {
    width: 40px;
    height: 40px;
    background: var(--accent-red);
    border-radius: 50%;
    box-shadow: 0 0 15px var(--accent-red), 0 0 25px var(--accent-red);
    transition: all 0.3s ease;
    cursor: pointer;
}

.back-button {
    text-decoration: none;
    display: block;
}

.red-glowing-circle:hover {
    transform: scale(1.2);
    box-shadow: 0 0 25px var(--accent-red), 0 0 40px var(--accent-red), 0 0 60px var(--accent-red);
    animation: wobble 0.6s ease-in-out;
}

@keyframes wobble {
    0%, 100% { transform: scale(1.2) rotate(0deg); }
    25% { transform: scale(1.25) rotate(-5deg); }
    75% { transform: scale(1.15) rotate(5deg); }
}

/* NEUE CSS für DEBRIS Terminal - separiert vom Angelspiel */
.debris-terminal-container {
    border: 1px solid var(--accent-blue);
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    border-radius: 8px;
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.5);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.debris-terminal-header {
    font-family: 'JetBrains Mono', monospace;
    color: var(--accent-red);
    font-weight: 600;
    padding: 1rem;
    text-align: center;
    border-bottom: 1px solid var(--accent-blue);
}

.debris-blog-output {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
    font-family: 'JetBrains Mono', monospace;
    line-height: 1.5;
    color: var(--text-primary);
}

.debris-blog-output::-webkit-scrollbar {
    width: 8px;
}

.debris-blog-output::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 4px;
}

.debris-blog-output::-webkit-scrollbar-thumb {
    background: var(--accent-blue);
    border-radius: 4px;
    transition: background 0.3s ease;
}

.debris-blog-output::-webkit-scrollbar-thumb:hover {
    background: var(--accent-red);
}

/* Tailwind-ähnliche Utility Classes */
.antialiased {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.z-20 { z-index: 20; }

.max-w-7xl {
    max-width: 80rem;
}

.max-w-4xl {
    max-width: 56rem;
}

.mx-auto {
    margin-left: auto;
    margin-right: auto;
}

.grid {
    display: grid;
}

.grid-cols-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.gap-8 {
    gap: 2rem;
}

.gap-12 {
    gap: 3rem;
}

.flex {
    display: flex;
}

.flex-col {
    flex-direction: column;
}

.flex-row {
    flex-direction: row;
}

.w-full {
    width: 100%;
}

.h-auto {
    height: auto;
}

.h-0 {
    height: 0px;
}

.pb-\[100\%\] {
    padding-bottom: 100%;
}

.rounded-xl {
    border-radius: 0.75rem;
}

.shadow-xl {
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.border {
    border-width: 1px;
}

.border-white {
    border-color: #ffffff;
}

.border-opacity-10 {
    border-color: rgba(255, 255, 255, 0.1);
}

.overflow-hidden {
    overflow: hidden;
}

.relative {
    position: relative;
}

.absolute {
    position: absolute;
}

.inset-0 {
    top: 0px;
    right: 0px;
    bottom: 0px;
    left: 0px;
}

.object-cover {
    object-fit: cover;
}

.transform {
    transform: translateX(0) translateY(0) rotate(0) skewX(0) skewY(0) scaleX(1) scaleY(1);
}

.transition {
    transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 150ms;
}

.duration-300 {
    transition-duration: 300ms;
}

.ease-in-out {
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}

.hover\:scale-105:hover {
    transform: scale(1.05);
}

.group:hover .group-hover\:scale-110 {
    transform: scale(1.1);
}

.group:hover .group-hover\:text-accent-red {
    color: var(--accent-red);
}

.mt-4 {
    margin-top: 1rem;
}

.text-center {
    text-align: center;
}

.text-sm {
    font-size: 0.875rem;
    line-height: 1.25rem;
}

.text-base {
    font-size: 1rem;
    line-height: 1.5rem;
}

.font-jetbrains-mono {
    font-family: 'JetBrains Mono', monospace;
}

.text-accent-blue {
    color: var(--accent-blue);
}

.text-accent-red {
    color: var(--accent-red);
}

.text-white {
    color: #ffffff;
}

.hover\:text-red-500:hover {
    color: #ef4444;
}

.opacity-50 {
    opacity: 0.5;
}

.mx-4 {
    margin-left: 1rem;
    margin-right: 1rem;
}

.block {
    display: block;
}

.no-underline {
    text-decoration: none;
}

.max-w-none {
    max-width: none;
}

.m-0 {
    margin: 0px;
}

.mt-0 {
    margin-top: 0px;
}

.\!min-h-0 {
    min-height: 0px !important;
}

.\!p-0 {
    padding: 0px !important;
}

/* Responsive Design */
@media (min-width: 768px) {
    .md\:flex-row {
        flex-direction: row;
    }
    
    .md\:w-1\/2 {
        width: 50%;
    }
    
    .md\:text-base {
        font-size: 1rem;
        line-height: 1.5rem;
    }
}

/* Glitch-Effekt für die Zahlen */
@keyframes number-glitch-anim {
    0%, 100% { clip-path: inset(0% 0 0% 0); transform: translate(0, 0); }
    20% { clip-path: inset(10% 0 70% 0); transform: translate(2px, 0); }
    40% { clip-path: inset(40% 0 30% 0); transform: translate(-2px, 0); }
    60% { clip-path: inset(20% 0 50% 0); transform: translate(3px, 0); }
    80% { clip-path: inset(55% 0 15% 0); transform: translate(-3px, 0); }
}

@keyframes color-glitch-anim {
    0%, 100% { filter: drop-shadow(0 0 0 transparent); }
    50% { filter: drop-shadow(1px 1px 0 var(--accent-red)) drop-shadow(-1px -1px 0 var(--accent-blue)); }
}

.number-cell.glitch-active {
    animation: 
        number-glitch-anim 0.3s steps(4, jump-none) infinite,
        color-glitch-anim 0.3s steps(4, jump-none) infinite;
}

/* Hero-Bereich */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    text-align: center;
    z-index: 10;
    padding: 2rem;
}

.hero-title {
    font-family: 'Inter', sans-serif;
    font-weight: 900;
    font-size: clamp(3rem, 15vw, 15rem);
    line-height: 0.9;
    text-transform: uppercase;
    letter-spacing: -0.05em;
    margin-bottom: 1rem;
    position: relative;
    transition: transform 0.1s ease-in-out;
}

@keyframes title-glitch-before {
    0%, 100% { transform: translate(0, 0); clip-path: inset(0 0 0 0); }
    25% { transform: translate(10px, 0); clip-path: inset(15% 0 75% 0); }
    50% { transform: translate(-10px, 0); clip-path: inset(45% 0 30% 0); }
    75% { transform: translate(10px, 0); clip-path: inset(60% 0 10% 0); }
}

@keyframes title-glitch-after {
    0%, 100% { transform: translate(0, 0); clip-path: inset(0 0 0 0); }
    25% { transform: translate(-10px, 0); clip-path: inset(15% 0 75% 0); }
    50% { transform: translate(10px, 0); clip-path: inset(45% 0 30% 0); }
    75% { transform: translate(-10px, 0); clip-path: inset(60% 0 10% 0); }
}

.dynamic-glitch-title.glitch-active {
    position: relative;
}

.dynamic-glitch-title.glitch-active::before {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    color: var(--accent-red);
    animation: title-glitch-before 0.2s steps(2, jump-none) infinite;
}

.dynamic-glitch-title.glitch-active::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    color: var(--accent-blue);
    animation: title-glitch-after 0.2s steps(2, jump-none) infinite;
}

.hero-subtitle {
    font-family: 'JetBrains Mono', monospace;
    font-size: clamp(1rem, 3vw, 2rem);
    font-weight: 300;
    margin-top: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    justify-content: center;
    color: var(--accent-blue);
    opacity: 0;
    transition: opacity 0.2s ease-in-out;
}

.tm-symbol {
    position: absolute;
    font-size: 0.2em;
    top: 10%;
    right: -1.5em;
    color: var(--text-primary);
    opacity: 0;
    transition: opacity 0.2s ease-in-out;
}

.hero-title.glitch-active .tm-symbol,
.hero-title.glitch-active + .hero-subtitle {
    opacity: 1;
}

/* Zahlenraster */
.number-grid {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: grid;
    grid-template-columns: repeat(20, 1fr);
    grid-template-rows: repeat(20, 1fr);
    gap: 1px;
    z-index: 15;
    opacity: 0.3;
    pointer-events: none;
}

.number-cell {
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.7rem;
    font-weight: 300;
    color: var(--accent-blue);
    transition: all 0.3s ease;
    cursor: default;
    position: relative;
}

.number-cell.red-number {
    color: var(--accent-red);
    cursor: pointer;
    text-decoration: none;
    pointer-events: auto;
}

.number-cell.red-number:hover {
    color: #ffffff;
    text-shadow: 0 0 20px var(--accent-red), 0 0 30px var(--accent-red);
}

/* Sektionen */
.content-section {
    min-height: 100vh;
    padding: 8rem 2rem;
    position: relative;
    z-index: 10;
}

.section-title {
    font-family: 'Inter', sans-serif;
    font-weight: 900;
    font-size: clamp(3rem, 8vw, 8rem);
    text-transform: uppercase;
    letter-spacing: -0.05em;
    text-align: center;
    margin-bottom: 4rem;
    position: relative;
    z-index: 11;
}

/* Terminal-Stil */
.terminal-container {
    max-width: 1200px;
    margin: 0 auto;
    border: 1px solid var(--accent-blue);
    padding: 2rem;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
}

.terminal-header {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 2rem;
}

.terminal-button {
    background: none;
    border: 1px solid var(--accent-blue);
    color: var(--accent-blue);
    padding: 0.75rem 2rem;
    font-family: 'JetBrains Mono', monospace;
    font-weight: 600;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.3s ease;
}

.terminal-button:hover, .terminal-button.active {
    background: var(--accent-red);
    border-color: var(--accent-red);
    color: var(--text-primary);
    box-shadow: 0 0 10px var(--accent-red);
}

.terminal-output {
    min-height: 400px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 1rem;
    line-height: 1.5;
    color: var(--accent-blue);
    overflow-y: auto;
    white-space: pre-wrap;
}

.terminal-line {
    display: block;
    margin-bottom: 0.5rem;
    opacity: 0;
    animation: type-in 0.1s forwards;
    color: var(--text-primary);
}

.terminal-line.command {
    color: var(--accent-blue);
    font-weight: 600;
}

.terminal-line.title {
    color: var(--accent-red);
    font-size: 1.2rem;
    font-weight: 600;
    margin-top: 1rem;
}

.terminal-line.description {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 1rem;
}

@keyframes type-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Vault */
.vault-message {
    font-family: 'JetBrains Mono', monospace;
    font-size: clamp(1rem, 2vw, 1.5rem);
    color: var(--accent-red);
    text-align: center;
    margin-bottom: 2rem;
    min-height: 1.5em;
}

/* Kontakt */
.contact-section {
    padding: 8rem 2rem;
    position: relative;
    text-align: center;
    z-index: 10;
}

.morse-code-container {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    max-width: 800px;
    margin: 0 auto 4rem auto;
}

.morse-symbol {
    display: inline-block;
    width: 20px;
    height: 20px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transition: background 0.1s ease-in-out;
    box-shadow: 0 0 5px rgba(0, 255, 255, 0.5);
}

.morse-symbol.active {
    background: var(--accent-red);
    box-shadow: 0 0 20px var(--accent-red);
}

.morse-space {
    width: 30px;
    height: 20px;
    display: inline-block;
}

.contact-info {
    font-family: 'JetBrains Mono', monospace;
    font-size: clamp(1rem, 2vw, 1.5rem);
    font-weight: 300;
    line-height: 1.5;
    color: var(--accent-blue);
}

/* Angelspiel - ALTE Klasse bleibt für das echte Angelspiel */
.game-terminal-container {
    margin-top: 4rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    border: 1px solid var(--accent-blue);
    padding: 1rem;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    border-radius: 8px;
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.5);
}

.game-terminal-header {
    font-family: 'JetBrains Mono', monospace;
    color: var(--accent-red);
    font-weight: 600;
    margin-bottom: 1rem;
    text-align: center;
}

#gameTerminalOutput {
    min-height: 250px;
    max-height: 400px;
    overflow-y: auto;
    padding-bottom: 1rem;
    white-space: pre-wrap;
    line-height: 1.5;
    font-family: 'JetBrains Mono', monospace;
    text-align: left;
}

.game-terminal-input-container {
    display: flex;
    align-items: center;
    border-top: 1px solid var(--accent-blue);
    padding-top: 1rem;
    gap: 0.5rem;
}

#gameTerminalInput {
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-primary);
    width: 100%;
    font-family: 'JetBrains Mono', monospace;
}

#gameTerminalInput:focus {
    color: var(--accent-red);
}

.command-prompt {
    color: var(--accent-blue);
}

/* Scrolling Banner */
.scrolling-banner {
    background-color: #C0C0C0;
    color: #000000;
    border-top: 2px solid #ffffff;
    border-left: 2px solid #ffffff;
    border-right: 2px solid #808080;
    border-bottom: 2px solid #808080;
    padding: 0.5rem 0;
    margin-bottom: 2rem;
    overflow: hidden;
    height: 2rem;
    z-index: 10;
    display: flex;
    align-items: center;
    position: relative;
}

.scrolling-text {
    font-family: 'MS Sans Serif', 'Tahoma', 'Arial', sans-serif;
    font-size: 1rem;
    white-space: nowrap;
    position: absolute;
    left: 100%;
    animation: scroll-text 30s linear infinite;
}

@keyframes scroll-text {
    to {
        transform: translateX(-100%);
    }
}

/* Footer */
footer {
    padding: 2rem;
    text-align: center;
    background: rgba(0, 0, 0, 0.5);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    z-index: 10;
}

.footer-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9rem;
}

.footer-links a {
    color: var(--accent-blue);
    text-decoration: none;
    transition: all 0.3s ease;
}

.footer-links a:hover {
    color: var(--accent-red);
    text-shadow: 0 0 10px var(--accent-red);
}

.footer-links .icon {
    font-size: 1.5rem;
    width: 1.5rem;
    height: 1.5rem;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .footer-links {
        flex-direction: column;
        gap: 1rem;
    }
}