/* ==========================================================================
   1. BASIS & RESET
   ========================================================================== */
html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    min-height: 100%;
    background: #000000;
    color: #ffe4e0;
    font-family: 'Inter', system-ui, sans-serif;
    overflow-x: hidden;
}

* { box-sizing: border-box; }

/* ==========================================================================
   2. HINTERGRUND-SYSTEM (Abyss & Glüh-Sphären)
   ========================================================================== */
.gradient-background {
    position: fixed;
    inset: 0;
    z-index: 1;
    overflow: hidden;
    background: #000000;
}

.gradient-sphere {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.3;
}

.sphere-1 {
    width: 60vw; height: 60vw;
    background: linear-gradient(40deg, #4c0519, #991b1b);
    top: -20%; left: -15%;
    animation: float-1 25s ease-in-out infinite alternate;
}

.sphere-2 {
    width: 50vw; height: 50vw;
    background: linear-gradient(240deg, #7c2d12, #ea580c);
    bottom: -15%; right: -10%;
    animation: float-2 30s ease-in-out infinite alternate;
}

.sphere-3 {
    width: 35vw; height: 35vw;
    background: radial-gradient(circle, rgba(185, 28, 28, 0.2), transparent);
    top: 50%; left: 30%;
    animation: float-3 18s ease-in-out infinite alternate;
}

.grid-overlay {
    position: absolute;
    inset: 0;
    background-size: 60px 60px;
    background-image: 
        linear-gradient(to right, rgba(239, 68, 68, 0.03) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(239, 68, 68, 0.03) 1px, transparent 1px);
    mask-image: radial-gradient(circle at center, black, transparent 90%);
    z-index: 2;
}

.noise-overlay {
    position: absolute;
    inset: 0;
    opacity: 0.05;
    z-index: 3;
    pointer-events: none;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ==========================================================================
   3. PARTIKEL-SYSTEM (The Glowing Ash)
   ========================================================================== */
#particles-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 4;
    pointer-events: none;
    overflow: hidden;
}

.particle {
    position: absolute;
    pointer-events: none;
    will-change: transform, opacity;
}

/* ==========================================================================
   4. HERO SEKTION & LAYOUT
   ========================================================================== */
.backend-hero {
    position: relative;
    z-index: 10;
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 2rem;
}

.hero-layout {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 4rem;
    align-items: center;
}

/* ==========================================================================
   5. TYPOGRAFIE & KOMPONENTEN
   ========================================================================== */
h1 {
    font-size: clamp(2.8rem, 5.5vw, 4.5rem);
    font-weight: 900;
    margin-bottom: 1.5rem;
    line-height: 1.2; /* Erhöht von 1.05, um Platz für Unterlängen zu schaffen */
    letter-spacing: -0.03em;
    color: #fff;
    padding-bottom: 0.1em; /* Puffer für das "g" */
    text-shadow: 0 0 15px rgba(239, 68, 68, 0.2);
}

.gradient-text {
    background: linear-gradient(135deg, #fff 30%, #f97316 70%, #b91c1c 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    /* Box-Decoration-Break sorgt dafür, dass der Gradient über Zeilenumbrüche hinweg sauber bleibt */
    display: inline-block; 
    filter: drop-shadow(0 0 20px rgba(249, 115, 22, 0.4));
}
p {
    font-size: 1.15rem;
    line-height: 1.7;
    color: rgba(255, 228, 224, 0.7);
    margin-bottom: 3rem;
}

.status-indicator {
    font-family: 'Fira Code', monospace;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.25rem;
    margin-bottom: 1.8rem;
    color: #ef4444;
    display: flex;
    align-items: center;
}

.pulse-dot {
    width: 10px; height: 10px;
    background: #f97316;
    border-radius: 50%;
    margin-right: 14px;
    box-shadow: 0 0 15px #f97316;
    animation: pulse-infernal 1.5s infinite;
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 15px;
    background: linear-gradient(90deg, #b91c1c, #ea580c);
    color: #fff;
    padding: 1.2rem 3rem;
    border-radius: 2px;
    text-decoration: none;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.15rem;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 10px 30px -5px rgba(185, 28, 28, 0.5);
    border: 1px solid rgba(255,255,255,0.1);
}

.btn-primary:hover {
    background: #fff;
    color: #000;
    box-shadow: 0 0 50px rgba(249, 115, 22, 0.6);
    transform: translateY(-3px) scale(1.03);
}


/* ==========================================================================
   6. LOGIN BOX & INPUTS
   ========================================================================== */
.login-page-wrapper {
    position: relative;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 2rem;
}

/*.login-box {
    width: 100%;
    max-width: 450px;
    background: linear-gradient(135deg, rgba(15, 15, 20, 0.9), rgba(5, 5, 5, 0.95));
    border: 1px solid rgba(185, 28, 28, 0.2);
    border-radius: 4px;
    padding: 30px;
    backdrop-filter: blur(15px);
    box-shadow: 0 40px 80px -15px rgba(0, 0, 0, 0.8);
}*/

.login-header {
    text-align: center;
    margin-bottom: 2rem;
}

.subtitle {
    font-size: 0.9rem;
    color: rgba(255, 228, 224, 0.5);
    margin-top: 0.5rem;
}

.infernal-form {
    display: flex;
    flex-direction: column;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    margin-bottom: 1.5rem;
}

.input-group label {
    font-family: 'Fira Code', monospace;
    font-size: 0.75rem;
    text-transform: uppercase;
    color: #ef4444;
}

.input-group input {
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 1rem;
    color: #fff;
    border-radius: 2px;
    transition: all 0.3s ease;
}

.input-group input:focus {
    outline: none;
    border-color: #f97316;
    background: rgba(185, 28, 28, 0.05);
    box-shadow: 0 0 15px rgba(249, 115, 22, 0.2);
}

.login-submit {
    width: 100%;
    justify-content: center;
}

/* ==========================================================================
   7. TOASTS SYSTEM
   ========================================================================== */
.toast-container {
    position: fixed;
    top: 2rem;
    right: 2rem;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    pointer-events: none;
}

.toast {
    pointer-events: auto;
    min-width: 320px;
    background: rgba(76, 5, 25, 0.95);
    border-left: 4px solid #ef4444;
    border-top: 1px solid rgba(239, 68, 68, 0.3);
    color: #fff;
    padding: 1.2rem;
    border-radius: 4px;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    box-shadow: 0 20px 40px rgba(0,0,0,0.6), 0 0 20px rgba(185, 28, 28, 0.2);
    backdrop-filter: blur(10px);
    animation: toastSlideIn 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.toast-icon { font-size: 1.5rem; }
.toast-title { display: block; font-weight: 800; text-transform: uppercase; font-size: 0.8rem; color: #ef4444; margin-bottom: 0.2rem; }
.toast-msg { margin: 0; font-size: 0.9rem; color: rgba(255, 228, 224, 0.8); line-height: 1.4; }

.toast-close {
    background: none;
    border: none;
    color: rgba(255,255,255,0.5);
    cursor: pointer;
    font-size: 1.2rem;
    padding: 0;
    margin-left: auto;
    transition: color 0.2s;
}

.toast-close:hover { color: #fff; }

@keyframes toastSlideIn {
    from { transform: translateX(120%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

.toast-fade-out {
    animation: toastSlideOut 0.4s ease-in forwards !important;
}

@keyframes toastSlideOut {
    from { transform: translateX(0); opacity: 1; }
    to { transform: translateX(120%); opacity: 0; }
}

/* ==========================================================================
   8. GLOBAL ANIMATIONS & RESPONSIVE
   ========================================================================== */
@keyframes float-1 { 0% { transform: translate(0,0); } 100% { transform: translate(8%, 5%) rotate(2deg); } }
@keyframes float-2 { 0% { transform: translate(0,0); } 100% { transform: translate(-8%, -5%) rotate(-2deg); } }
@keyframes float-3 { 0% { transform: translate(0,0) opacity(0.3); } 100% { transform: translate(-5%, 10%) opacity(0.6); } }

@keyframes pulse-infernal { 
    0%, 100% { opacity: 1; transform: scale(1); box-shadow: 0 0 15px #f97316; } 
    50% { opacity: 0.6; transform: scale(0.95); box-shadow: 0 0 25px #b91c1c; } 
}

@media (max-width: 968px) {
    .hero-layout { grid-template-columns: 1fr; text-align: center; }
    .hero-visual { display: none; }
}