* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Courier New', monospace;
}

html, body {
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

body {
    background-color: #000;
    color: #fff;
    overflow: hidden;
}

.hidden {
    display: none !important;
}

/* ---------- Eigener Mauszeiger (nur mit Maus) ---------- */
.custom-cursor {
    position: fixed;
    top: 0;
    left: 0;
    width: 40px;
    height: 40px;
    background: url('assets/cursor-80.png') no-repeat center / contain;
    pointer-events: none;
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.2s ease;
}

body.has-mouse .custom-cursor.visible {
    opacity: 1;
}

body.has-mouse,
body.has-mouse * {
    cursor: none;
}

/* ---------- Hintergrund ---------- */
.container {
    width: 100%;
    height: 100vh;
    height: 100dvh;
    position: relative;
}

/* Das Video ist bereits abgedunkelt encodiert (kein Live-Filter nötig) */
#background {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
    pointer-events: none;
}

/* ---------- Profilkarte ---------- */
#profile-block {
    position: fixed;
    top: 50%;
    left: 50%;
    width: min(820px, calc(100vw - 32px));
    min-height: 332px;
    background: linear-gradient(180deg, rgba(255,255,255,0.06), rgba(255,255,255,0.02)), rgba(0,0,0,0.6);
    border-radius: 15px;
    border: 1px solid rgba(255,255,255,0.18);
    padding: 20px;
    z-index: 20;
    display: flex;
    flex-direction: column;
    gap: 15px;
    /* nur blur: saturate/contrast haben den Effekt in Chromium kaputt gemacht */
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.55), inset 0 1px 0 rgba(255,255,255,0.06);
    overflow: hidden;
    opacity: 0; /* wird nach dem Start eingeblendet */
}

#profile-block::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 15px;
    pointer-events: none;
    background: linear-gradient(180deg,
        rgba(255,255,255,0.22) 0%,
        rgba(255,255,255,0.06) 6%,
        rgba(255,255,255,0.02) 18%,
        rgba(255,255,255,0) 40%);
    mix-blend-mode: overlay;
    z-index: 0;
}

#profile-block > * {
    position: relative;
    z-index: 2;
}

.profile-header {
    display: flex;
    align-items: flex-start;
    gap: 15px;
}

.profile-container {
    position: relative;
    width: 150px;
    height: 150px;
    flex-shrink: 0;
}

/* kleiner leuchtender Punkt, der ums Profilbild kreist */
.profile-container::after {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 50%;
    background: radial-gradient(circle at 10px 10px, #00CED1 10%, transparent 15%);
    animation: orbit 3s linear infinite;
    z-index: -1;
    filter: blur(1px);
}

.profile-picture {
    display: block;
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
}

.profile-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.name-and-badges {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

#profile-name {
    font-family: 'Helvetica Neue', Arial, sans-serif;
    font-size: 32px;
    font-weight: bold;
    letter-spacing: 3px;
    color: #fff;
    filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.7));
}

.name-crown {
    width: 28px;
    height: auto;
    display: block;
    filter: drop-shadow(0 0 6px rgba(0, 206, 209, 0.6));
    pointer-events: none;
}

#profile-handle {
    display: inline-block;
    align-self: flex-start;
    color: rgba(255, 255, 255, 0.6);
    font-size: 14px;
    letter-spacing: 1px;
    text-decoration: none;
    margin: -4px 0 8px;
    transition: color 0.2s ease;
}

#profile-handle:hover,
#profile-handle:focus-visible {
    color: #00CED1;
}

#profile-bio {
    color: rgba(255, 255, 255, 0.8);
    font-size: 18px;
    line-height: 1.5;
    margin-bottom: 10px;
    min-height: 1.5em;
}

.bio-separator {
    width: 100%;
    height: 1px;
    background: rgba(255, 255, 255, 0.2);
    margin: 20px 0;
}

.profile-footer {
    display: flex;
    flex-direction: column;
    gap: 5px;
    width: 100%;
    margin-top: auto;
}

.visitor-counter {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.1);
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 14px;
    align-self: flex-start;
}

.visitor-icon {
    width: 18px;
    height: 18px;
    color: white;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 12px;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
}

.social-icon {
    display: block;
    width: 36px;
    height: 36px;
    transition: transform 0.3s ease;
    filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.7));
}

.social-links a:hover .social-icon,
.social-links a:focus-visible .social-icon {
    transform: scale(1.4) rotateY(15deg);
}

/* sichtbarer Fokusrahmen für Tastaturbedienung */
a:focus-visible,
#start-screen:focus-visible {
    outline: 2px solid #00CED1;
    outline-offset: 4px;
}

@keyframes orbit {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* ---------- Startbildschirm ---------- */
#start-screen {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 30;
    cursor: pointer;
}

#start-text {
    font-size: 24px;
    color: #fff;
    text-align: center;
}

/* ---------- Handy / Tablet ---------- */
@media (max-width: 768px) {
    #profile-block {
        width: calc(100vw - 32px);
        max-width: 420px;
        min-height: 0;
        top: calc(50% + (env(safe-area-inset-top) - env(safe-area-inset-bottom)) / 2);
        max-height: calc(100dvh - 40px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        padding: 22px 18px 18px;
    }

    .profile-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 14px;
    }

    .profile-container,
    .profile-picture {
        width: 112px;
        height: 112px;
    }

    .profile-info {
        width: 100%;
        align-items: center;
    }

    .name-and-badges {
        flex-direction: column;
        gap: 8px;
        margin-bottom: 6px;
    }

    #profile-name {
        font-size: 28px;
    }

    .name-crown {
        width: 30px;
    }

    #profile-handle {
        align-self: center;
    }

    #profile-bio {
        font-size: 15px;
        min-height: 3em; /* verhindert Springen beim Tippen */
        margin-bottom: 0;
    }

    .bio-separator {
        margin: 6px 0;
    }

    .social-links {
        gap: 18px;
        margin-bottom: 12px;
    }

    .social-links a {
        min-width: 44px;
        min-height: 44px;
    }

    .social-icon {
        width: 40px;
        height: 40px;
    }

    .visitor-counter {
        align-self: center;
        padding: 6px 14px;
        font-size: 13px;
    }

    #start-text {
        font-size: 20px;
        padding: 0 24px;
    }
}

/* Kleine/niedrige Handys (z.B. iPhone SE) */
@media (max-width: 768px) and (max-height: 700px) {
    .profile-container,
    .profile-picture {
        width: 88px;
        height: 88px;
    }
    #profile-name { font-size: 24px; }
    #profile-bio { min-height: 1.5em; font-size: 14px; }
    .profile-header { gap: 10px; }
    .social-links { margin-bottom: 8px; }
}

/* Wer "Bewegung reduzieren" eingestellt hat, bekommt keine Dauer-Animation */
@media (prefers-reduced-motion: reduce) {
    .profile-container::after { animation: none; }
    .social-icon { transition: none; }
}
