/* ============================================
   STYLE RESET & FOUNDATION
   ============================================ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html,
body {
    width: 100%;
    height: 100%;
}

body {
    background: linear-gradient(135deg, #0F1D2D 0%, #1B3D5C 50%, #0F1D2D 100%);
    color: #ffffff;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
    overflow: hidden;
    position: relative;
}

/* ============================================
   CANVAS BACKGROUND LAYER
   ============================================ */

#bg-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    display: block;
    cursor: none; /* Custom cursor */
}

/* ============================================
   MAIN CONTENT LAYER
   ============================================ */

.content {
    position: relative;
    z-index: 2;
    width: 100%;
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 20px;
    pointer-events: none;
}

.hero {
    margin-bottom: 40px;
    background: rgba(91, 159, 212, 0.03);
    padding: 30px 40px;
    border-radius: 12px;
    border: 1px solid rgba(232, 244, 255, 0.08);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: inset 0 1px 1px rgba(232, 244, 255, 0.1);
}

h1 {
    font-size: clamp(2rem, 8vw, 3.5rem);
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    margin-bottom: 15px;
    background: linear-gradient(120deg, #E8F4FF 0%, #5B9FD4 50%, #4A8BB8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 0 30px rgba(91, 159, 212, 0.5)) drop-shadow(0 0 15px rgba(74, 139, 184, 0.4));
    animation: fadeInDown 1s ease-out, glitchFlicker 0.15s infinite 2.5s;
    position: relative;
}

@keyframes glitchFlicker {
    0%, 100% {
        text-shadow: 
            2px 2px 0 rgba(91, 159, 212, 0.3),
            -2px -2px 0 rgba(74, 139, 184, 0.3);
    }
    50% {
        text-shadow: 
            -2px 2px 0 rgba(91, 159, 212, 0.4),
            2px -2px 0 rgba(232, 244, 255, 0.3);
    }
}

.subtitle {
    font-size: clamp(0.9rem, 2vw, 1.1rem);
    color: #A8C5D9;
    font-weight: 300;
    letter-spacing: 0.05em;
    animation: fadeInUp 1s ease-out 0.2s both;
}

/* ============================================
   NAVIGATION LINKS
   ============================================ */

.links {
    display: flex;
    gap: 30px;
    justify-content: center;
    flex-wrap: wrap;
    pointer-events: auto;
    animation: fadeInUp 1s ease-out 0.4s both;
}

.link {
    color: #7BA8C9;
    text-decoration: none;
    font-size: clamp(0.85rem, 2vw, 1rem);
    letter-spacing: 0.05em;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 8px 12px;
    position: relative;
    border-bottom: 1px solid transparent;
    background: rgba(91, 159, 212, 0.05);
    border-radius: 6px;
    border: 1px solid rgba(232, 244, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.link:hover,
.link:focus {
    color: #E8F4FF;
    border-bottom-color: #5B9FD4;
    border: 1px solid rgba(91, 159, 212, 0.3);
    background: rgba(91, 159, 212, 0.15);
    text-shadow: 0 0 10px rgba(91, 159, 212, 0.5);
    outline: none;
    box-shadow: 0 8px 32px rgba(91, 159, 212, 0.1);
}

.link:focus-visible {
    outline: 2px solid #5B9FD4;
    outline-offset: 4px;
}

/* ============================================
   FOOTER & IMPRESSUM
   ============================================ */

.footer {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3;
    pointer-events: auto;
}

.impressum-btn {
    background: rgba(91, 159, 212, 0.08);
    border: 1px solid rgba(232, 244, 255, 0.15);
    color: #7BA8C9;
    padding: 8px 16px;
    font-size: 0.8rem;
    letter-spacing: 0.05em;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 6px;
    font-family: inherit;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.impressum-btn:hover,
.impressum-btn:focus {
    color: #E8F4FF;
    border-color: rgba(91, 159, 212, 0.4);
    background: rgba(91, 159, 212, 0.15);
    text-shadow: 0 0 10px rgba(91, 159, 212, 0.4);
    outline: none;
    box-shadow: 0 8px 32px rgba(91, 159, 212, 0.15);
}

.impressum-btn:focus-visible {
    outline: 2px solid #5B9FD4;
    outline-offset: 2px;
}

/* ============================================
   MODAL STYLES
   ============================================ */

.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(5, 5, 5, 0.9);
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease-out;
    pointer-events: none;
    backdrop-filter: blur(4px);
}

.modal.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.modal-content {
    background: rgba(15, 29, 45, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(232, 244, 255, 0.15);
    border-radius: 12px;
    padding: 40px;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 8px 32px rgba(91, 159, 212, 0.1), inset 0 1px 1px rgba(232, 244, 255, 0.1);
}

.modal-content h2 {
    font-size: 1.8rem;
    font-weight: 300;
    letter-spacing: 0.1em;
    margin-bottom: 30px;
    color: #5B9FD4;
}

.impressum-section {
    margin-bottom: 25px;
}

.impressum-section h3 {
    font-size: 1.1rem;
    font-weight: 500;
    color: #4A8BB8;
    margin-bottom: 10px;
    letter-spacing: 0.05em;
}

.impressum-section p {
    font-size: 0.9rem;
    color: #aaa;
    line-height: 1.8;
}

.impressum-section a {
    color: #5B9FD4;
    text-decoration: none;
    transition: color 0.3s ease;
}

.impressum-section a:hover {
    color: #E8F4FF;
    text-decoration: underline;
}

.close-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    background: transparent;
    border: none;
    color: #7BA8C9;
    font-size: 1.8rem;
    cursor: pointer;
    transition: color 0.3s ease;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-btn:hover,
.close-btn:focus {
    color: #5B9FD4;
    outline: none;
}

.close-btn:focus-visible {
    outline: 2px solid #5B9FD4;
    border-radius: 2px;
}

/* ============================================
   ANIMATIONS
   ============================================ */

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

@media (max-width: 768px) {
    h1 {
        font-size: 2rem;
        letter-spacing: 0.1em;
    }

    .subtitle {
        font-size: 0.9rem;
    }

    .links {
        gap: 20px;
    }

    .link {
        font-size: 0.9rem;
    }

    .modal-content {
        margin: 20px;
        padding: 30px;
        max-height: 90vh;
    }

    .impressum-section h3 {
        font-size: 1rem;
    }

    .impressum-section p {
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 1.5rem;
    }

    .subtitle {
        font-size: 0.8rem;
        margin-bottom: 30px;
    }

    .hero {
        margin-bottom: 30px;
    }

    .links {
        gap: 15px;
    }

    .link {
        font-size: 0.8rem;
        padding: 6px 8px;
    }

    .footer {
        bottom: 15px;
    }

    .impressum-btn {
        padding: 6px 12px;
        font-size: 0.75rem;
    }

    .modal-content {
        padding: 20px;
    }

    .modal-content h2 {
        font-size: 1.4rem;
        margin-bottom: 20px;
    }

    .close-btn {
        top: 15px;
        right: 15px;
    }
}

/* ============================================
   ACCESSIBILITY
   ============================================ */

@media (prefers-reduced-motion: reduce) {
    h1,
    .subtitle,
    .links {
        animation: none;
    }

    .link {
        transition: color 0.1s ease-out;
    }
}

/* Print Styles */
@media print {
    #bg-canvas {
        display: none;
    }

    body {
        background-color: #ffffff;
        color: #000000;
    }

    .link {
        text-decoration: underline;
    }
}
