/*
Theme Name: Erika-Theme
Theme URI: https://erika-theme.dev
Author: Erika Dev Team
Description: Hyper-modernes, interaktives Anime/Musik/VTube Theme. - Erika Edition v1.3 (Alignment Fix)
Version: 1.3
*/

:root {
    --bg-color: #080912;
    --text-color: #eaeaea;
    --accent-primary: #e6c65c; /* Gold */
    --accent-secondary: #5480fa; /* Blau */
    --glass-bg: rgba(15, 18, 28, 0.85);
    --glass-border: 1px solid rgba(255, 255, 255, 0.1);
    
    /* FONTS */
    --font-main: 'Montserrat', sans-serif;
    --font-display: 'Cormorant Garamond', serif;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    margin: 0;
    overflow-x: hidden;
    font-family: var(--font-main);
    font-weight: 400;
    cursor: none; /* Desktop default */
}

/* UI BASICS */
#cursor {
    position: fixed; top: 0; left: 0; width: 20px; height: 20px;
    border: 2px solid var(--accent-primary); border-radius: 50%;
    pointer-events: none; z-index: 9999;
    transform: translate(-50%, -50%); transition: width 0.3s, height 0.3s, transform 0.2s;
    mix-blend-mode: difference;
}
#cursor.hovered { width: 50px; height: 50px; background: rgba(255,255,255,0.1); border-color: transparent; }

#webgl-canvas { position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; z-index: -1; opacity: 0.6; pointer-events: none; }

.content-wrapper { position: relative; z-index: 10; padding: 5vw 10vw; min-height: 100vh; }

/* HERO SECTION */
.hero-section { 
    display: flex; 
    align-items: center; 
    justify-content: center; /* Ensures content is centered horizontally */
    gap: 100px; 
    width: 100%; 
    min-height: 80vh; /* Full viewport height look */
    margin-bottom: 80px; 
}

/* FIX: flex: 0 1 auto allows centering. Previous flex:1 forced it to edges. */
.hero-text { 
    flex: 0 1 auto; 
    z-index: 2; 
    text-align: right; 
} 

.hero-avatar-container { 
    flex: 0 1 auto; 
    display: flex; 
    flex-direction: column; 
    justify-content: center; 
    align-items: center; 
    perspective: 1000px; 
    z-index: 1; 
    position: relative; 
}

.hero-avatar-link { display: block; cursor: pointer; transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); }
.hero-avatar-link:hover { transform: scale(1.05); }
.avatar-frame { position: relative; width: 400px; height: 400px; border-radius: 50%; box-shadow: 0 0 0 10px var(--glass-bg), 0 0 30px rgba(0,0,0,0.1); animation: pulse-aura 3s infinite alternate; }
.avatar-frame img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; position: relative; z-index: 2; border: 8px solid var(--bg-color); opacity: 0; }
@keyframes pulse-aura { 0% { box-shadow: 0 0 0 10px var(--glass-bg), 0 0 30px var(--accent-primary); } 100% { box-shadow: 0 0 0 15px var(--glass-bg), 0 0 50px var(--accent-secondary); } }

/* Social Icons */
.hero-social-row {
    display: flex;
    justify-content: center;
    flex-wrap: wrap; 
    gap: 15px;
    margin-top: 30px; 
    z-index: 5;
}
.hero-social-btn {
    width: 40px; height: 40px;
    border-radius: 50%;
    background: var(--glass-bg);
    border: 1px solid rgba(255,255,255,0.2);
    color: var(--text-color);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.1rem;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    text-decoration: none;
}
.hero-social-btn:hover {
    background: var(--accent-primary);
    color: #000;
    border-color: var(--accent-primary);
    transform: translateY(-5px) scale(1.1);
    box-shadow: 0 5px 15px var(--accent-primary);
}

/* GRID & CARDS */
.section-title { 
    font-family: var(--font-display); 
    font-size: 3.5rem; 
    font-weight: 700; 
    font-style: italic; 
    margin-bottom: 40px; margin-top: 80px; 
    text-transform: uppercase; 
    letter-spacing: 2px; 
    color: var(--text-color); 
}
.grid-layout { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 30px; margin-bottom: 50px; }

.gallery-card { position: relative; border-radius: 20px; overflow: hidden; aspect-ratio: 16/9; transform: translateZ(0); transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94); cursor: pointer; background: #111; border: 1px solid rgba(255,255,255,0.1); }
.card-image { width: 100%; height: 100%; object-fit: cover; transition: all 0.5s ease; filter: grayscale(100%) sepia(20%) hue-rotate(180deg) brightness(0.6) contrast(1.2); opacity: 0.8; }
.gallery-card:hover .card-image { filter: grayscale(0%) brightness(1.0) contrast(1); opacity: 0.4; transform: scale(1.05); }
.gallery-card:hover { transform: translateY(-5px); box-shadow: 0 15px 35px rgba(0,0,0,0.5); border-color: var(--accent-primary); }
.card-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; display: flex; flex-direction: column; justify-content: center; align-items: center; padding: 25px; opacity: 0; transition: opacity 0.3s ease; box-sizing: border-box; }
.gallery-card:hover .card-overlay { opacity: 1; }

.card-title { 
    font-family: var(--font-display);
    color: #fff; font-size: 1.8rem; font-weight: 700; 
    text-transform: uppercase; text-align: center; line-height: 1.2; 
    width: 100%; word-wrap: break-word; hyphens: auto; 
    text-shadow: 0 2px 10px rgba(0,0,0,0.8); 
    transform: translateY(15px); transition: transform 0.3s ease; 
    background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary)); 
    -webkit-background-clip: text; 
}

.gallery-card:hover .card-title { transform: translateY(0); }
.ext-icon { position: absolute; top: 15px; right: 15px; color: #000; font-weight:bold; font-size: 1rem; background: var(--accent-primary); width: 30px; height: 30px; display: flex; align-items: center; justify-content: center; border-radius: 50%; z-index: 10; box-shadow: 0 5px 10px rgba(0,0,0,0.3); }

/* Special Badge for Duration */
.duration-badge {
    position: absolute; bottom: 15px; right: 15px;
    background: rgba(0,0,0,0.8); color: #fff;
    padding: 2px 8px; border-radius: 5px; font-size: 0.8rem;
    font-weight: 600; font-family: var(--font-main);
    z-index: 5;
}

/* PAGINATION */
.pagination { display: flex; justify-content: center; gap: 10px; margin-top: 50px; }
.page-numbers { 
    display: flex; align-items: center; justify-content: center; 
    width: 40px; height: 40px; border-radius: 10px; 
    background: var(--glass-bg); border: 1px solid rgba(255,255,255,0.2); 
    color: var(--text-color); text-decoration: none; font-weight: bold; 
    transition: all 0.2s; 
    cursor: pointer;
}
.page-numbers.current, .page-numbers:hover { background: var(--accent-primary); color: #000; border-color: var(--accent-primary); transform: translateY(-3px); }
.pagination.loading { opacity: 0.5; pointer-events: none; }

/* TYPO H1 - RESPONSIVE CLAMP */
h1 { 
    font-family: var(--font-display); 
    font-size: clamp(3.5rem, 8vw, 7rem); 
    font-weight: 700; 
    line-height: 0.9; 
    margin-bottom: 30px; 
    background: linear-gradient(45deg, var(--accent-primary), var(--accent-secondary)); 
    -webkit-background-clip: text; 
    -webkit-text-fill-color: transparent; 
    position: relative; 
}

/* Glitch Logic */
.glitch-hover:hover { animation: glitch-anim 0.3s cubic-bezier(.25, .46, .45, .94) both infinite; background: none; }
h1.glitch-hover:hover { -webkit-text-fill-color: var(--accent-primary); }

.title-part-main { 
    font-family: var(--font-display);
    -webkit-text-fill-color: var(--accent-primary); 
    background: none; 
}
.title-part-sub { 
    font-family: var(--font-main); 
    -webkit-text-fill-color: var(--text-color); 
    font-size: 0.35em; 
    font-weight: 300;
    letter-spacing: 3px;
    display: block; margin-top: 10px; background: none; 
}

.glitch-hover:hover::before, .glitch-hover:hover::after { content: attr(data-text); position: absolute; top: 0; left: 0; width: 100%; height: 100%; }
.title-part-main.glitch-hover:hover::before, .title-part-main.glitch-hover:hover::after { -webkit-text-fill-color: var(--accent-primary); }
.title-part-sub.glitch-hover:hover::before, .title-part-sub.glitch-hover:hover::after { -webkit-text-fill-color: var(--accent-secondary); }

.glitch-hover:hover::before { left: 2px; text-shadow: -1px 0 var(--accent-secondary); clip: rect(24px, 550px, 90px, 0); animation: glitch-anim-2 2s linear infinite alternate-reverse; }
.glitch-hover:hover::after { left: -2px; text-shadow: -1px 0 var(--accent-primary); clip: rect(85px, 550px, 140px, 0); animation: glitch-anim 2s linear infinite alternate-reverse; }

@keyframes glitch-anim { 0% { transform: translate(0) } 20% { transform: translate(-2px, 2px) } 40% { transform: translate(-2px, -2px) } 60% { transform: translate(2px, 2px) } 80% { transform: translate(2px, -2px) } 100% { transform: translate(0) } }
@keyframes glitch-anim-2 { 0% { clip: rect(10px, 9999px, 30px, 0); } 20% { clip: rect(80px, 9999px, 100px, 0); } 40% { clip: rect(20px, 9999px, 60px, 0); } 60% { clip: rect(60px, 9999px, 80px, 0); } 80% { clip: rect(10px, 9999px, 40px, 0); } 100% { clip: rect(70px, 9999px, 90px, 0); } }

/* SINGLE & FOOTER */
.single-container { max-width: 900px; margin: 0 auto; }
.single-header { text-align: center; margin-bottom: 50px; padding-top: 100px; }
.single-title { 
    font-family: var(--font-display);
    font-size: clamp(2.5rem, 5vw, 4.5rem); 
    font-weight: 700; line-height: 1; margin-bottom: 20px; 
}
.single-meta-row { display: flex; justify-content: center; gap: 20px; color: var(--text-color); opacity: 0.7; font-size: 1rem; font-weight: 600; text-transform: uppercase; letter-spacing: 1px; }
.cat-badge { color: var(--accent-primary); border: 1px solid var(--accent-primary); padding: 2px 10px; border-radius: 15px; }
.share-row { display: flex; justify-content: center; gap: 15px; margin-bottom: 50px; }
.share-btn { width: 50px; height: 50px; border-radius: 50%; background: var(--glass-bg); border: var(--glass-border); color: var(--text-color); display: flex; align-items: center; justify-content: center; font-size: 1.2rem; transition: 0.2s; cursor: pointer; }
.share-btn:hover { background: var(--accent-primary); color: #000; transform: translateY(-5px); border-color: var(--accent-primary); }
.content-area { font-size: 1.2rem; line-height: 1.8; color: var(--text-color); background: var(--glass-bg); backdrop-filter: blur(10px); border: var(--glass-border); padding: 60px; border-radius: 20px; box-shadow: 0 10px 40px rgba(0,0,0,0.2); }
.content-area p { margin-bottom: 20px; }
.content-area a { color: var(--accent-primary); text-decoration: underline; text-decoration-thickness: 2px; }
.content-area a:hover { color: var(--accent-secondary); }
.content-area img { border-radius: 10px; max-width: 100%; height: auto; }
.content-area h2, .content-area h3 { 
    font-family: var(--font-display);
    font-weight: 700;
    margin-top: 40px; margin-bottom: 20px; color: var(--accent-secondary); 
}
#site-footer { text-align: center; padding: 60px 20px; font-size: 0.9rem; opacity: 0.5; margin-top: 50px; border-top: 1px solid rgba(255,255,255,0.05); }

/* Navigation */
nav a { text-decoration: none; color: var(--text-color); font-size: 1.2rem; margin-right: 20px; font-weight: 500; position: relative; z-index: 20; }
nav a:hover { color: var(--accent-primary); }
.transition-wipe { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary)); z-index: 9000; transform: translateY(100%); pointer-events: none; }

/* PLAYER DEFAULT (Desktop) */
.music-widget { position: fixed; bottom: 30px; left: 30px; width: 300px; background: var(--glass-bg); backdrop-filter: blur(10px); border: var(--glass-border); border-radius: 15px; padding: 15px; z-index: 100; display: flex; flex-direction: column; box-shadow: 0 10px 30px rgba(0,0,0,0.3); transition: transform 0.3s ease; }
.music-widget:hover { transform: translateY(-5px); }
#yt-player-container { width: 100%; height: 150px; border-radius: 10px; overflow: hidden; margin-bottom: 10px; background: #000; }
.player-controls { display: flex; justify-content: space-between; align-items: center; }
.control-btn { background: none; border: 1px solid var(--accent-primary); color: var(--accent-primary); padding: 5px 15px; border-radius: 20px; cursor: pointer; font-family: var(--font-main); font-weight: bold; font-size: 0.8rem; transition: all 0.2s; }
.control-btn:hover { background: var(--accent-primary); color: #000; }

/* =========================================
   MOBILE RESPONSIVENESS (Max Width 768px)
   ========================================= */
@media (max-width: 768px) {
    /* Disable Custom Cursor on Touch */
    body { cursor: auto; }
    #cursor { display: none !important; }
    
    .content-wrapper {
        padding: 30px 15px 160px 15px; /* More bottom padding for music player */
    }

    /* Hero Umbau */
    .hero-section {
        flex-direction: column; /* Stacked */
        gap: 30px;
        text-align: center;
        margin-bottom: 50px;
        min-height: auto; /* Allow shrink */
    }

    .hero-text {
        text-align: center;
        width: 100%;
        order: 1; /* Text first */
        flex: auto; /* Reset flex */
    }
    
    .hero-avatar-container {
        flex: 0 0 auto;
        order: 2; /* Avatar second */
        width: 100%;
    }

    /* Avatar Responsive Size */
    .avatar-frame {
        width: 70vw;
        height: 70vw;
        max-width: 300px;
        max-height: 300px;
        margin: 0 auto;
    }

    .hero-social-row {
        justify-content: center;
    }

    /* Grid Layout */
    .grid-layout {
        grid-template-columns: 1fr; /* Full width cards */
        gap: 20px;
    }

    /* Single Page Content */
    .content-area { 
        padding: 25px; 
        font-size: 1rem; 
        border-radius: 10px;
    }

    /* Music Player Mobile Optimization */
    .music-widget {
        bottom: 0;
        left: 0;
        width: 100%;
        border-radius: 15px 15px 0 0; /* Only top corners rounded */
        background: rgba(15, 18, 28, 0.95); /* More opaque */
        border: none;
        border-top: 1px solid rgba(255,255,255,0.2);
        box-sizing: border-box;
        padding: 10px 15px;
    }
    .music-widget:hover {
        transform: none; /* Disable hover effect */
    }
    #yt-player-container {
        height: 0; /* Hide video part on mobile to save space, keeping audio controls */
        margin-bottom: 5px;
        display: none; /* Optional: Toggle via JS if needed, currently hidden for compact view */
    }
    /* If you want video visible on mobile, comment out above block */
    #yt-player-container.mobile-visible { height: 100px; display: block; }
}
