:root {
    --fiege-green: #0e3b2c;
    --fiege-forest: #08271e;
    --fiege-dark: #041b15;
    --fiege-gold: #c8a96b;
    --fiege-gold-soft: rgba(200, 169, 107, 0.55);
    --fiege-beige: #f4f1db;
    --fiege-cream: #faf7eb;
    --fiege-red: #e30613;
}

* {
    box-sizing: border-box;
}

html, body {
    background-color: var(--fiege-dark);
    color: var(--fiege-beige);
    font-family: 'Optima', 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
    margin: 0;
    padding: 0;
    min-height: 100%;
    overflow-x: hidden;
}

a {
    color: var(--fiege-gold);
    text-decoration: none;
}

a:hover,
a:focus {
    color: var(--fiege-cream);
}

button,
.btn {
    border: none;
    border-radius: 999px;
    padding: 0.85rem 2.6rem;
    font-size: 1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    cursor: pointer;
    transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
    background: linear-gradient(135deg, rgba(200, 169, 107, 0.95), rgba(147, 112, 35, 0.9));
    color: var(--fiege-dark);
    box-shadow: 0 14px 25px rgba(0, 0, 0, 0.28);
}

button:hover,
button:focus,
.btn:hover,
.btn:focus {
    transform: translateY(-2px);
    box-shadow: 0 18px 30px rgba(0, 0, 0, 0.32);
}

button:disabled,
.btn:disabled {
    cursor: not-allowed;
    opacity: 0.55;
    box-shadow: none;
    transform: none;
}

input,
textarea {
    font-family: inherit;
}

input[type="text"],
input[type="password"],
textarea {
    width: 100%;
    padding: 0.85rem 1.1rem;
    border-radius: 14px;
    border: 1px solid rgba(244, 241, 219, 0.25);
    background: rgba(244, 241, 219, 0.12);
    color: var(--fiege-cream);
    font-size: 1rem;
    transition: border-color 0.2s ease, background 0.2s ease;
}

input[type="text"]:focus,
input[type="password"]:focus,
textarea:focus {
    outline: none;
    border-color: var(--fiege-gold);
    background: rgba(244, 241, 219, 0.18);
}

label {
    font-size: 0.8rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--fiege-gold-soft);
}

h1, h2, h3, h4, h5 {
    font-family: 'Optima', 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
    margin: 0;
    color: var(--fiege-cream);
}

h1 {
    font-size: clamp(2.4rem, 4vw, 3.6rem);
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

h2 {
    font-size: clamp(1.6rem, 3vw, 2.2rem);
}

p {
    color: rgba(244, 241, 219, 0.82);
    line-height: 1.6;
}

.card {
    border-radius: 22px;
    background: rgba(8, 39, 30, 0.82);
    border: 1px solid rgba(200, 169, 107, 0.28);
    box-shadow: 0 18px 35px rgba(0, 0, 0, 0.24);
    padding: clamp(1.5rem, 4vw, 2.5rem);
}

.content {
    padding: 0;
}

#blazor-error-ui {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(4, 27, 21, 0.92);
    z-index: 1200;
    color: var(--fiege-cream);
    align-items: center;
    justify-content: center;
    padding: clamp(2rem, 6vw, 4rem);
    text-align: center;
}

#blazor-error-ui[style*="block"] {
    display: flex !important;
}

#blazor-error-ui .blazor-error__dialog {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
    align-items: center;
    width: min(420px, 90vw);
    padding: clamp(1.8rem, 4vw, 2.4rem);
    border-radius: 24px;
    background: rgba(8, 39, 30, 0.94);
    border: 1px solid rgba(200, 169, 107, 0.35);
    box-shadow: 0 35px 80px rgba(0, 0, 0, 0.45);
}

#blazor-error-ui .blazor-error__title {
    font-size: 1.6rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--fiege-gold);
}

#blazor-error-ui .blazor-error__copy {
    font-size: 0.95rem;
    color: rgba(244, 241, 219, 0.8);
    line-height: 1.5;
}

#blazor-error-ui .blazor-error__hint {
    margin: 0;
    font-size: 0.9rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(244, 241, 219, 0.65);
}

#blazor-error-ui .reload {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.8rem;
    border-radius: 999px;
    background: linear-gradient(140deg, rgba(200, 169, 107, 0.95), rgba(147, 112, 35, 0.9));
    color: var(--fiege-dark);
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.32);
}

#blazor-error-ui .reload:hover,
#blazor-error-ui .reload:focus {
    transform: translateY(-2px);
    box-shadow: 0 22px 55px rgba(0, 0, 0, 0.38);
}

#blazor-error-ui .dismiss {
    position: absolute;
    top: 0.8rem;
    right: 0.95rem;
    font-size: 1.3rem;
    color: rgba(244, 241, 219, 0.5);
    text-decoration: none;
    cursor: pointer;
    transition: color 0.2s ease;
}

#blazor-error-ui .dismiss:hover,
#blazor-error-ui .dismiss:focus {
    color: rgba(244, 241, 219, 0.85);
}

#blazor-error-ui .dismiss:focus {
    outline: 2px solid rgba(200, 169, 107, 0.6);
    outline-offset: 4px;
}

#components-reconnect-modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(4, 27, 21, 0.86);
    backdrop-filter: blur(8px);
    color: var(--fiege-cream);
    z-index: 1600;
    align-items: center;
    justify-content: center;
    padding: clamp(2rem, 6vw, 4rem);
    text-align: center;
    font-size: 0;
    pointer-events: none;
}

#components-reconnect-modal.components-reconnect-modal--visible {
    display: flex;
}

#components-reconnect-modal::after {
    content: attr(data-message);
    font-size: clamp(1.2rem, 2.4vw, 1.8rem);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    line-height: 1.7;
    white-space: pre-line;
    max-width: min(560px, 94vw);
    color: var(--fiege-gold);
    text-shadow: 0 4px 28px rgba(0, 0, 0, 0.55);
    font-weight: 600;
    pointer-events: auto;
}

#components-reconnect-modal > * {
    display: none !important;
}

.blazor-error-boundary {
    background: rgba(227, 6, 19, 0.92);
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

.blazor-error-boundary::after {
    content: "Ein Fehler ist aufgetreten.";
}

/* Start animation overlay */
.start-animation {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at center, rgba(244, 241, 219, 0.45) 0%, rgba(8, 39, 30, 0.96) 55%, rgba(4, 27, 21, 1) 100%);
    backdrop-filter: blur(4px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.start-animation.is-ready {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    animation: overlayFade 3.6s ease forwards;
}

.animation-stage {
    text-align: center;
    color: var(--fiege-cream, #faf7eb);
}

.animation-sequence {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: clamp(180px, 28vw, 320px);
    width: min(480px, 80vw);
}

.sequence-step {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1.4rem;
    opacity: 0;
    animation: sequenceStep 3.6s ease forwards;
    animation-play-state: paused;
}

.sequence-step--one {
    animation-delay: 0s;
}

.sequence-step--two {
    animation-delay: 1.2s;
}

.sequence-step--three {
    animation-delay: 2.4s;
}

.animation-stage img {
    max-width: clamp(160px, 26vw, 320px);
    height: auto;
    filter: drop-shadow(0 12px 30px rgba(0, 0, 0, 0.35));
}

.animation-text {
    font-size: clamp(1.3rem, 2.2vw, 2rem);
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.animation-eyebrow {
    font-size: clamp(0.9rem, 1.8vw, 1.2rem);
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: rgba(244, 241, 219, 0.75);
}

.start-animation.is-ready .sequence-step {
    animation-play-state: running;
}

@keyframes sequenceStep {
    0% {
        opacity: 0;
        transform: translateY(18px) scale(0.98);
    }
    12% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
    30% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
    45% {
        opacity: 0;
        transform: translateY(-14px) scale(0.97);
    }
    100% {
        opacity: 0;
        transform: translateY(-14px) scale(0.97);
    }
}

@keyframes overlayFade {
    0% {
        opacity: 1;
        pointer-events: auto;
        visibility: visible;
    }
    75% {
        opacity: 1;
        pointer-events: auto;
    }
    100% {
        opacity: 0;
        pointer-events: none;
        visibility: hidden;
    }
}
