:root {
    --bg-color: #9146ff;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { height: 100%; width: 100%; }

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background-color: var(--bg-color);
    background-image: url('Bilder/hintergrund.webp');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: clamp(20px, 4vh, 50px) clamp(10px, 3vw, 30px);
    color: white;
    overflow-x: hidden;
    overflow-y: auto;
}

/* =============================
   CONTAINER (Dynamisch)
============================= */
.container {
    text-align: center;
    width: clamp(280px, 90vw, 480px);
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(10px);
    border-radius: clamp(15px, 3vw, 25px);
    padding: clamp(20px, 5vw, 45px) clamp(15px, 4vw, 30px);
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
    margin: 0 auto;
    max-height: calc(100vh - clamp(40px, 8vh, 100px));
    overflow-y: auto;
    scrollbar-width: none;
}
.container::-webkit-scrollbar { display: none; }

/* =============================
   PROFILBILD (Dynamisch)
============================= */
.profile-pic {
    width: clamp(90px, 18vw, 140px);
    height: clamp(90px, 18vw, 140px);
    border-radius: 50%;
    margin: 0 auto clamp(10px, 2vw, 20px);
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.4);
    border: clamp(2px, 0.5vw, 4px) solid rgba(145, 70, 255, 0.6);
    transition: all 0.3s ease;
    background-color: #000;
}
.profile-pic img { width: 100%; height: 100%; object-fit: cover; }

.profile-pic.is-live {
    border-color: #ff0000;
    box-shadow: 0 0 20px rgba(255, 0, 0, 0.8), 0 0 40px rgba(255, 0, 0, 0.4);
    animation: profilePulse 2s infinite;
}
@keyframes profilePulse {
    0%   { box-shadow: 0 0 0 0 rgba(255, 0, 0, 0.7); border-color: #ff0000; }
    70%  { box-shadow: 0 0 0 15px rgba(255, 0, 0, 0); border-color: #ff4444; }
    100% { box-shadow: 0 0 0 0 rgba(255, 0, 0, 0); border-color: #ff0000; }
}

/* =============================
   TITEL (Dynamisch)
============================= */
h1 {
    font-size: clamp(1.8em, 6vw, 3em);
    margin-bottom: clamp(5px, 1.5vw, 10px);
    text-shadow: 0 2px 10px rgba(0,0,0,0.8);
    font-weight: 700;
    transition: all 0.5s ease;
    word-wrap: break-word;
}

/* =============================
   MINI ICONS (Dynamisch)
============================= */
.mini-icons {
    display: flex;
    justify-content: center;
    gap: clamp(10px, 3vw, 20px);
    margin-bottom: clamp(15px, 4vw, 30px);
}
.mini-icon {
    color: rgba(255,255,255,0.8);
    font-size: clamp(1.3em, 3vw, 1.8em);
    transition: all 0.3s ease;
    text-decoration: none;
}
.mini-icon:hover { transform: scale(1.2); color: white; text-shadow: 0 0 15px rgba(255,255,255,0.5); }
.mini-twitter:hover { color: #1da1f2; }
.mini-tiktok:hover  { color: #fe2c55; }

/* =============================
   SOCIAL BUTTONS (Dynamisch)
============================= */
.social-grid {
    display: flex;
    flex-direction: column;
    gap: clamp(8px, 2vw, 15px);
    margin-bottom: 10px;
    width: 100%;
}

.social-box {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: clamp(8px, 2vw, 15px);
    padding: clamp(12px, 2.5vw, 18px) clamp(12px, 2.5vw, 20px);
    text-decoration: none;
    color: white;
    border-radius: 50px;
    font-weight: bold;
    font-size: clamp(0.85em, 2.5vw, 1.1em);
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    position: relative;
    width: 100%;
    text-shadow: -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000, 1px 1px 0 #000, 3px 3px 5px rgba(0,0,0,0.6);
}
.social-box:hover { transform: translateY(-5px) scale(1.03); box-shadow: 0 15px 35px rgba(0,0,0,0.5); }
.social-box i { font-size: clamp(1.2em, 3vw, 1.6em); width: 30px; text-align: center; flex-shrink: 0; }
.social-box span { flex-grow: 1; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding-right: 30px; }

/* =============================
   LIVE INDIKATOR
============================= */
.live-indicator {
    width: 12px; height: 12px;
    background-color: #ff0000;
    border-radius: 50%;
    display: none;
    position: absolute;
    right: 20px; top: 50%;
    transform: translateY(-50%);
    box-shadow: 0 0 10px #ff0000;
    animation: pulse 1.5s infinite;
}
@keyframes pulse {
    0%   { transform: translateY(-50%) scale(0.95); box-shadow: 0 0 0 0 rgba(255, 0, 0, 0.7); }
    70%  { transform: translateY(-50%) scale(1);    box-shadow: 0 0 0 10px rgba(255, 0, 0, 0); }
    100% { transform: translateY(-50%) scale(0.95); box-shadow: 0 0 0 0 rgba(255, 0, 0, 0); }
}

.twitch.is-live {
    background: #ff0000 !important;
    border: 2px solid white;
    box-shadow: 0 0 20px rgba(255,0,0,0.6);
    animation: pulseButton 2s infinite;
}
@keyframes pulseButton {
    0%   { box-shadow: 0 0 0 0 rgba(255, 0, 0, 0.7); }
    70%  { box-shadow: 0 0 0 15px rgba(255, 0, 0, 0); }
    100% { box-shadow: 0 0 0 0 rgba(255, 0, 0, 0); }
}

/* =============================
   BUTTON FARBEN
============================= */
.twitch     { background: #9146ff; }
.discord    { background: #5865f2; }
.discord2   { background: #5865f2; }
.email      { background: #007bff; }
.setup      { background: #6441a5; }
.teamspeak  { background: #2580c3; }
.spacer   { height: clamp(20px, 5vw, 40px); width: 100%; display: block; }

/* =============================
   FOOTER
============================= */
footer {
    position: fixed;
    bottom: 10px; left: 15px;
    font-size: clamp(0.7em, 1.5vw, 0.85em);
    opacity: 0.8;
    z-index: 999;
}
footer a { color: rgba(255,255,255,0.85); text-decoration: underline; font-weight: normal; border: none; }
footer a:hover { opacity: 1; color: white; }

/* =============================
   MODALS
============================= */
.modal {
    display: none;
    position: fixed; top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.9);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
}
.modal-content {
    background: rgba(26,26,46,0.95);
    margin: 20px;
    padding: clamp(15px, 3vw, 25px);
    border-radius: 20px;
    width: 90%;
    max-width: 500px;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    text-align: left;
    border: 1px solid rgba(255,255,255,0.1);
}

/* Twitch Stream Modal */
#stream-modal .modal-content {
    max-width: 1200px;
    height: 85vh;
    padding: 0;
    background: black;
    overflow: hidden;
    border: none;
    display: flex;
    flex-direction: column;
}
.video-container { flex-grow: 1; width: 100%; position: relative; }
.follow-cta {
    width: 100%;
    background: #9146ff;
    color: white;
    text-align: center;
    padding: clamp(10px, 2vw, 15px);
    font-weight: bold;
    font-size: clamp(0.9em, 2vw, 1.2em);
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: background 0.3s;
    box-shadow: 0 -5px 15px rgba(0,0,0,0.5);
    z-index: 1002;
}
.follow-cta:hover { background: #772ce8; }

.modal-content h2 { margin-bottom: 20px; text-align: center; }
.close {
    position: absolute;
    top: 15px; right: 20px;
    font-size: clamp(1.5em, 3vw, 2em);
    cursor: pointer;
    color: #aaa;
    z-index: 1003;
}
#stream-modal .close {
    color: white;
    background: rgba(0,0,0,0.5);
    border-radius: 50%;
    width: 40px; height: 40px;
    text-align: center;
    line-height: 40px;
    top: 10px; right: 10px;
}
.close:hover { color: white; background: red; }

.impressum-text p { margin-bottom: 15px; line-height: 1.5; }
.impressum-text a { color: #38bdf8; text-decoration: none; }
.impressum-text a:hover { text-decoration: underline; }

/* =============================
   FULL HD (1920x1080)
============================= */
@media (min-width: 481px) and (max-width: 1920px) {
    .container {
        width: clamp(280px, 38vw, 460px);
        margin: 0 auto;
        max-height: calc(100vh - clamp(40px, 8vh, 80px)); /* Passt sich der Bildschirmhöhe an */
        padding: 20px 20px; /* Kompakteres Padding */
    }
    .profile-pic {
        width: clamp(80px, 7vw, 110px);   /* Kleiner */
        height: clamp(80px, 7vw, 110px);
        margin-bottom: 10px;
    }
    h1 {
        font-size: clamp(1.6em, 2.5vw, 2.5em); /* Kleiner */
        margin-bottom: 5px;
    }
    .mini-icons {
        margin-bottom: 12px; /* Weniger Abstand */
    }
    .social-grid {
        gap: clamp(6px, 1vw, 9px); /* Weniger Abstand zwischen Buttons */
    }
    .social-box {
        font-size: clamp(0.85em, 1.1vw, 1em);
        padding: clamp(11px, 1.2vw, 14px) clamp(12px, 1.5vw, 18px); /* Kompakter */
    }
    .social-box i {
        font-size: clamp(1.1em, 1.5vw, 1.4em);
    }
    .spacer {
        height: 15px; /* Kleinerer Spacer */
    }
}

/* =============================
   HIGH RES (2K / 4K ab 1921px)
============================= */
@media (min-width: 1921px) {
    .container {
        width: clamp(420px, 22vw, 550px);
        margin: 0 auto;
        max-height: calc(100vh - clamp(40px, 8vh, 100px));
        padding: 25px 20px;
    }
    .profile-pic {
        width: clamp(100px, 6vw, 130px);
        height: clamp(100px, 6vw, 130px);
    }
    h1 {
        font-size: clamp(2em, 2.5vw, 3em);
    }
    .mini-icon {
        font-size: clamp(1.5em, 1.5vw, 1.8em);
    }
    .mini-icons {
        margin-bottom: 15px;
    }
    .social-box {
        font-size: clamp(0.95em, 1vw, 1.1em);
        padding: clamp(12px, 1vw, 15px) clamp(12px, 1vw, 18px);
        border-radius: 50px;
    }
    .social-box i {
        font-size: clamp(1.2em, 1.5vw, 1.6em);
    }
    .social-grid {
        gap: clamp(6px, 1vw, 10px);
    }
    footer {
        font-size: clamp(0.85em, 0.8vw, 1em);
    }
}

/* =============================
   MOBIL (unter 480px)
============================= */
@media (max-width: 480px) {
    body {
        background-image: url('Bilder/hintergrund_mobil.webp');
        justify-content: center;
        padding: clamp(15px, 3vh, 30px) 10px;
        overflow-y: auto;
    }
    .container {
        width: 95vw;
        max-height: calc(100vh - 30px);
        margin: 0 auto;
    }
    .spacer { display: none; }
    footer {
        position: fixed;
        bottom: 8px; left: 0;
        width: 100%;
        text-align: center;
    }
}
