/* ============================================
   N8M4RE — NIGHTMARE THEME
   Dark, mystisch, Neon-Akzente
   ============================================ */

/* === Fonts (lokal, kein Google-Fonts-Abruf) === */
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('/fonts/inter-v20-latin_latin-ext-regular.woff2') format('woff2');
}
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url('/fonts/inter-v20-latin_latin-ext-500.woff2') format('woff2');
}
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url('/fonts/inter-v20-latin_latin-ext-600.woff2') format('woff2');
}
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url('/fonts/inter-v20-latin_latin-ext-700.woff2') format('woff2');
}

/* === CSS Custom Properties === */
:root {
    --bg-primary: #0a0a0f;
    --bg-secondary: #12121a;
    --bg-card: rgba(18, 18, 26, 0.8);
    --border-glow: rgba(168, 85, 247, 0.25);
    --text-primary: #e4e4e7;
    --text-secondary: #71717a;
    --text-muted: #52525b;
    --accent-purple: #a855f7;
    --accent-violet: #7c3aed;
    --accent-cyan: #06b6d4;
    --accent-pink: #ec4899;
    --glow-purple: rgba(168, 85, 247, 0.4);
    --glow-cyan: rgba(6, 182, 212, 0.3);
    --radius-lg: 16px;
    --radius-xl: 24px;
    --transition-smooth: cubic-bezier(0.4, 0, 0.2, 1);
}

/* === Base === */
*, *::before, *::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* === Animated Background === */
.bg-orbs {
    position: fixed;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
}

.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.15;
    animation: orbFloat 20s ease-in-out infinite;
}

.orb-1 {
    width: 500px;
    height: 500px;
    background: var(--accent-purple);
    top: -10%;
    left: -10%;
    animation-duration: 25s;
}

.orb-2 {
    width: 400px;
    height: 400px;
    background: var(--accent-cyan);
    bottom: -10%;
    right: -10%;
    animation-duration: 20s;
    animation-delay: -5s;
}

.orb-3 {
    width: 300px;
    height: 300px;
    background: var(--accent-pink);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation-duration: 30s;
    animation-delay: -10s;
    opacity: 0.08;
}

@keyframes orbFloat {
    0%, 100% { transform: translate(0, 0) scale(1); }
    25% { transform: translate(30px, -40px) scale(1.05); }
    50% { transform: translate(-20px, 20px) scale(0.95); }
    75% { transform: translate(40px, 30px) scale(1.02); }
}

/* === Brand / Logo === */
.brand-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 160px;
    height: 160px;
    margin-bottom: 1rem;
    animation: logoPulse 5s ease-in-out infinite;
}

/* Rabenlogo (Raster, eigener Glow im Bild): nur leichter zusätzlicher Schein */
.brand-badge img {
    display: block;
    width: 100%;
    height: 100%;
    transition: transform 0.4s var(--transition-smooth), filter 0.4s var(--transition-smooth);
}

.brand-badge:hover img {
    transform: scale(1.04);
    filter: drop-shadow(0 0 18px var(--glow-cyan));
}

@keyframes logoPulse {
    0%, 100% { filter: drop-shadow(0 0 10px rgba(168, 85, 247, 0.25)); }
    50% { filter: drop-shadow(0 0 22px rgba(168, 85, 247, 0.45)); }
}

.brand-title {
    font-family: 'Inter', sans-serif;
    font-size: 2.75rem;
    font-weight: 700;
    letter-spacing: 6px;
    text-transform: uppercase;
    background: linear-gradient(135deg, var(--accent-purple), var(--accent-cyan));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.25rem;
    text-shadow: none;
    filter: drop-shadow(0 0 30px var(--glow-purple));
}

.brand-subtitle {
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--text-secondary);
    margin: 0;
}

/* === Glass Card === */
.glass-card {
    background: var(--bg-card);
    backdrop-filter: blur(20px) saturate(150%);
    -webkit-backdrop-filter: blur(20px) saturate(150%);
    border: 1px solid var(--border-glow);
    border-radius: var(--radius-xl);
    overflow: hidden;
    position: relative;
    transition: border-color 0.4s var(--transition-smooth),
                box-shadow 0.4s var(--transition-smooth),
                transform 0.4s var(--transition-smooth);
    min-height: 400px;
}

.glass-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 1px;
    background: linear-gradient(135deg, var(--accent-purple), transparent 40%, transparent 60%, var(--accent-cyan));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0.3;
    transition: opacity 0.4s var(--transition-smooth);
    pointer-events: none;
}

.glass-card:hover {
    border-color: rgba(168, 85, 247, 0.4);
    box-shadow: 0 0 40px rgba(168, 85, 247, 0.1),
                0 20px 60px rgba(0, 0, 0, 0.3);
    transform: translateY(-2px);
}

.glass-card:hover::before {
    opacity: 0.6;
}

.glass-card-body {
    padding: 2rem;
}

/* === Header inside glass card (für API-Response) === */
.glass-card .card-header,
.glass-card .card {
    background: transparent !important;
    border: none !important;
    color: var(--text-primary) !important;
}

.glass-card .card-body {
    background: transparent !important;
    color: var(--text-primary) !important;
}

/* === Loader === */
.loader {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    gap: 1.5rem;
}

.loader-dots {
    display: flex;
    gap: 8px;
}

.loader-dots span {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--accent-purple);
    animation: dotPulse 1.4s ease-in-out infinite;
}

.loader-dots span:nth-child(2) {
    animation-delay: 0.2s;
    background: var(--accent-violet);
}

.loader-dots span:nth-child(3) {
    animation-delay: 0.4s;
    background: var(--accent-cyan);
}

@keyframes dotPulse {
    0%, 80%, 100% {
        transform: scale(0.6);
        opacity: 0.4;
    }
    40% {
        transform: scale(1);
        opacity: 1;
    }
}

.loader-text {
    font-size: 0.85rem;
    color: var(--text-secondary);
    letter-spacing: 1px;
    margin: 0;
}

/* === Error State === */
.error-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    gap: 1rem;
}

.error-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 2px solid var(--accent-pink);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent-pink);
    box-shadow: 0 0 20px rgba(236, 72, 153, 0.2);
}

.error-text {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin: 0;
    text-align: center;
}

/* === Status Badge === */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 16px;
    border-radius: 100px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    background: rgba(168, 85, 247, 0.1);
    border: 1px solid rgba(168, 85, 247, 0.2);
    color: var(--text-secondary);
    transition: all 0.3s var(--transition-smooth);
}

.status-badge.online {
    background: rgba(34, 197, 94, 0.1);
    border-color: rgba(34, 197, 94, 0.3);
    color: #4ade80;
}

.status-badge.offline {
    background: rgba(236, 72, 153, 0.1);
    border-color: rgba(236, 72, 153, 0.3);
    color: var(--accent-pink);
}

.status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--text-secondary);
    transition: background 0.3s ease;
}

.online .status-dot {
    background: #4ade80;
    box-shadow: 0 0 8px rgba(34, 197, 94, 0.6);
}

.offline .status-dot {
    background: var(--accent-pink);
    box-shadow: 0 0 8px rgba(236, 72, 153, 0.4);
}

.status-dot.pulse {
    animation: statusPulse 2s ease-in-out infinite;
}

@keyframes statusPulse {
    0%, 100% { box-shadow: 0 0 4px rgba(34, 197, 94, 0.4); }
    50% { box-shadow: 0 0 12px rgba(34, 197, 94, 0.8); }
}

/* === Footer === */
.site-footer {
    padding: 1.5rem 0;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.8rem;
    letter-spacing: 0.5px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    background: rgba(0, 0, 0, 0.2);
}

/* === Typography === */
h1, h2, h3 {
    font-weight: 700;
    letter-spacing: -0.5px;
    color: var(--text-primary);
}

/* === Links === */
a {
    color: var(--accent-purple);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--accent-cyan);
}

/* === Buttons === */
.btn {
    border-radius: var(--radius-lg);
    font-weight: 600;
    padding: 0.6rem 1.5rem;
    border: 1px solid var(--border-glow);
    background: var(--bg-card);
    color: var(--text-primary);
    transition: all 0.3s var(--transition-smooth);
}

.btn:hover {
    background: rgba(168, 85, 247, 0.15);
    border-color: var(--accent-purple);
    color: var(--accent-purple);
    box-shadow: 0 0 20px var(--glow-purple);
    transform: translateY(-1px);
}

/* === Animations === */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(24px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.7s var(--transition-smooth) both;
}

.fade-in-delay {
    animation-delay: 0.15s;
}

.fade-in-delay-2 {
    animation-delay: 0.3s;
}

/* === Focus === */
:focus-visible {
    outline: 2px solid var(--accent-purple);
    outline-offset: 2px;
}

/* === Scrollbar === */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
    background: var(--accent-violet);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent-purple);
}

/* === Selection === */
::selection {
    background: rgba(168, 85, 247, 0.3);
    color: #fff;
}

/* === Responsive === */
@media (max-width: 768px) {
    .brand-title {
        font-size: 2rem;
        letter-spacing: 4px;
    }

    .brand-badge {
        width: 128px;
        height: 128px;
    }

    .glass-card {
        border-radius: var(--radius-lg);
        min-height: 300px;
    }

    .glass-card-body {
        padding: 1.5rem;
    }

    .orb {
        filter: blur(60px);
        opacity: 0.1;
    }
}

@media (max-width: 576px) {
    .brand-title {
        font-size: 1.75rem;
        letter-spacing: 3px;
    }

    .brand-badge {
        width: 112px;
        height: 112px;
    }

    .glass-card-body {
        padding: 1rem;
    }

    .loader {
        padding: 3rem 1rem;
    }
}

/* === Prefers Reduced Motion === */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .orb {
        animation: none;
    }
}