/* --- CSS VARIABLEN --- */
:root {
    --c-brand-blue: #004e8a;
    --c-brand-green: #8fc400;

    /* LIGHT MODE */
    --bg-overlay: rgba(255, 255, 255, 0.62);
    --text-main: #1a202c;
    --text-sub: #333;
    --glass-bg: rgba(255, 255, 255, 0.15);
    --glass-border: rgba(255, 255, 255, 0.5);
    --glass-border-top: rgba(255, 255, 255, 0.9);
    --glass-shadow: rgba(0, 78, 138, 0.1);
    --glass-hover-bg: rgba(255, 255, 255, 0.4);
    --icon-color: #004e8a; 
    --logo-filter: drop-shadow(0 10px 15px rgba(0,0,0,0.1));
    --particle-color: #004e8a;
}

/* DARK MODE */
body.dark-mode {
    --bg-overlay: rgba(10, 20, 35, 0.85); 
    --text-main: #ffffff;
    --text-sub: #cccccc;
    --glass-bg: rgba(30, 41, 59, 0.6); 
    --glass-border: rgba(255, 255, 255, 0.15);
    --glass-border-top: rgba(255, 255, 255, 0.3);
    --glass-shadow: rgba(0, 0, 0, 0.5);
    --glass-hover-bg: rgba(255, 255, 255, 0.15);
    --icon-color: #67e8f9; 
    --logo-filter: brightness(0) invert(1) drop-shadow(0 0 8px rgba(255,255,255,0.5));
    --particle-color: #67e8f9;
}

body {
    margin: 0; padding: 0;
    font-family: 'Inter', sans-serif;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow-x: hidden;
    overflow-y: auto;
    background-color: #f0f2f5; 
    transition: color 0.3s ease; 
}

/* --- HINTERGRUND --- */
.bg-layer {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    z-index: -2;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 0.5s ease-in;
    
    /* Fallback Bild */
    background-image: url('../img/ZfH.jpg'); 
}
.bg-layer.loaded { opacity: 1; }

.overlay-layer {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    z-index: -1;
    background: var(--bg-overlay); 
    backdrop-filter: blur(3px); 
    transition: background 0.5s ease;
}

/* --- HEADER & LOGO --- */
header {
    margin-bottom: 40px;
    text-align: center;
    z-index: 10;
    animation: fadeInDown 1s ease-out;
}

.logo-img {
    height: 200px; 
    width: auto;
    background: transparent;
    padding: 0;
    border-radius: 0;
    filter: var(--logo-filter);
    transition: all 0.3s ease;
}

.logo-img:hover {
    transform: scale(1.02);
    filter: var(--logo-filter) drop-shadow(0 0 15px rgba(255,255,255,0.8));
}

/* --- BUTTONS --- */
.menu-grid {
    display: flex;
    gap: 25px;
    flex-wrap: wrap;
    justify-content: center;
    padding: 20px;
    z-index: 10;
    max-width: 1500px;
}

.glass-btn {
    position: relative;
    width: 165px; height: 165px; 
    border-radius: 50%;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    transition: all 0.2s cubic-bezier(0.25, 0.8, 0.25, 1);
    overflow: hidden;
    background: var(--glass-bg);
    backdrop-filter: blur(8px); 
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid var(--glass-border);
    border-top: 1px solid var(--glass-border-top);
    box-shadow: 0 10px 20px var(--glass-shadow), inset 0 0 20px rgba(255, 255, 255, 0.05);
}

.glass-btn i {
    font-size: 2.8rem; 
    color: var(--icon-color);
    z-index: 2;
    margin-bottom: 5px;
    transform: translateY(8px); 
    transition: all 0.2s ease;
    filter: drop-shadow(0 2px 5px rgba(0,0,0,0.1));
}

.text-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 2;
    transition: all 0.2s ease;
    transform: translateY(8px);
}

.glass-btn span {
    font-family: 'Rajdhani', sans-serif;
    font-weight: 700;
    font-size: 1rem;
    color: var(--text-main);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    line-height: 1;
}

.glass-btn small {
    font-family: 'Inter', sans-serif;
    font-size: 0.7rem;
    color: var(--text-sub);
    font-weight: 600;
    opacity: 0;
    height: 0; 
    overflow: hidden;
    margin-top: 0;
    transition: all 0.2s ease;
}

/* Hover States */
.glass-btn:hover {
    transform: translateY(-8px);
    background: var(--glass-hover-bg); 
    border-color: var(--c-brand-blue); 
    box-shadow: 0 20px 40px var(--glass-shadow);
}

body.dark-mode .glass-btn:hover {
     border-color: #fff; 
}

.glass-btn:hover i {
    transform: translateY(-5px) scale(0.9); 
    color: var(--c-brand-green);
}

body.dark-mode .glass-btn:hover i {
    color: #bef264; 
    filter: drop-shadow(0 0 8px rgba(190, 242, 100, 0.6)); 
}

.glass-btn:hover .text-wrap {
    transform: translateY(-5px);
}

.glass-btn:hover small {
    opacity: 1; height: auto; margin-top: 4px; 
}

/* --- PARTIKEL --- */
.particle {
    position: absolute;
    background: var(--particle-color);
    border-radius: 50%;
    opacity: 0; 
    pointer-events: none;
}

.glass-btn:hover .particle {
    opacity: 0.5;
    animation: floatDust 4s linear infinite;
}

/* --- TOGGLE SWITCH --- */
.switch-wrapper {
    margin-top: 30px;
    margin-bottom: 30px;
    z-index: 20;
    position: relative;
    /* Zentrierung sicherstellen */
    display: flex;
    justify-content: center; 
}

.checkbox {
    opacity: 0;
    position: absolute;
}

/* Der Hintergrund (Track) */
.label {
    width: 64px;
    height: 34px;
    background: rgba(255, 255, 255, 0.4); 
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: 50px;
    cursor: pointer;
    position: relative; 
    display: block;     
    backdrop-filter: blur(5px);
    box-shadow: 0 5px 15px var(--glass-shadow);
    transition: all 0.3s ease;
}

/* Der Ball */
.ball {
    width: 28px;
    height: 28px;
    
    /* Im Light Mode ist der Ball BLAU */
    background-color: var(--c-brand-blue); 
    
    border-radius: 50%;
    position: absolute;
    top: 2px;
    left: 3px;
    transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1), background-color 0.3s ease;
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden; 
}

/* Die Icons im Ball */
.ball i {
    position: absolute;
    color: white; /* Auf dem blauen Ball ist das Icon weiß */
    font-size: 16px;
    transition: all 0.3s ease;
}

/* --- LOGIK FÜR ICONS --- */

.ball .ph-sun { opacity: 1; transform: scale(1) rotate(0deg); }
.ball .ph-moon { opacity: 0; transform: scale(0) rotate(-90deg); }

/* --- BEWEGUNG UND FARBWECHSEL IM DARK MODE --- */

/* Im Dark Mode wird der Ball WEISS */
.checkbox:checked + .label .ball {
    transform: translateX(30px);
    background-color: #ffffff; 
}

/* Der Mond muss BLAU werden, weil der Ball jetzt weiß ist */
.checkbox:checked + .label .ball .ph-moon {
    opacity: 1;
    transform: scale(1) rotate(0deg);
    color: var(--c-brand-blue); /* Mond ist blau auf weißem Ball */
}

.checkbox:checked + .label .ball .ph-sun {
    opacity: 0;
    transform: scale(0) rotate(90deg);
}

/* Dark Mode Track */
body.dark-mode .label {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.1);
}

@keyframes floatDust {
    0% { transform: translateY(0) translateX(0); opacity: 0; }
    20% { opacity: 0.5; }
    100% { transform: translateY(-50px) translateX(25px); opacity: 0; }
}

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

/* --- SOCIAL MEDIA LEISTE --- */
.social-bar {
    display: flex;
    gap: 20px; 
    margin-top: 40px; 
    margin-bottom: 20px; 
    z-index: 20;
    position: relative;
}

.social-btn {
    width: 45px; 
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all 0.3s ease;
    
    background: transparent;
    border: none;
    box-shadow: none;
    backdrop-filter: none;
}

.social-btn i {
    font-size: 1.8rem; 
    color: var(--text-main); 
    opacity: 0.8; 
    transition: all 0.3s ease;
    
    /* Das sorgt dafür, dass man das schwarze Icon auch auf dunklen Fenstern sieht */
    filter: drop-shadow(0 0 3px rgba(255, 255, 255, 1)); 
}

/* --- HOVER EFFEKTE (Nur Icon bewegt sich und wird farbig) --- */

.social-btn:hover {
    transform: translateY(-5px) scale(1.1);
    background: transparent; 
    border: none;
}

.social-btn:hover i {
    opacity: 1; 
}

/* Die Farben bleiben gleich */
.social-btn.insta:hover i { color: #E1306C; }
.social-btn.tiktok:hover i { color: #000000; filter: drop-shadow(2px 2px 0px #25F4EE) drop-shadow(-2px -2px 0px #FE2C55); }
.social-btn.youtube:hover i { color: #FF0000; }
.social-btn.facebook:hover i { color: #1877F2; }

/* Dark Mode Anpassung für Social Icons */
body.dark-mode .social-btn i {
    color: #ffffff; 
    opacity: 0.9;  
    
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.8));
}
body.dark-mode .social-btn:hover i {
    opacity: 1;
}
body.dark-mode .social-btn.tiktok:hover i {
    color: #ffffff;
}