/* --- Variablen für das TPower-Farbschema --- */
:root {
    --bg-dark: #0b0f19;        /* Weltraum-Basis */
    --card-bg: rgba(26, 30, 38, 0.65); /* Halbtransparent für Glass-Effekt */
    --accent-cyan: #4CD1F7;
    --accent-hover: #3BBCE2;
    --text-main: #FFFFFF;
    --text-muted: #9CA3AF;
    --radius-soft: 24px;
    --radius-small: 12px;
}

/* --- Globale Einstellungen --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
    -webkit-tap-highlight-color: transparent;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
    position: relative;
}

/* ECHTER SPACE BACKGROUND (Fixiert für fehlerfreies Scrollen) */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -2; /* Ganz nach hinten */
    background-image: 
        radial-gradient(circle at 15% 30%, rgba(76, 209, 247, 0.08), transparent 40%),
        radial-gradient(circle at 85% 70%, rgba(138, 43, 226, 0.06), transparent 40%),
        linear-gradient(-45deg, #090e17, #131b2a, #0d121c, #101622);
    background-size: 100vw 100vh, 100vw 100vh, 400% 400%;
    animation: spaceNebula 20s ease-in-out infinite;
}

@keyframes spaceNebula {
    0% { background-position: 0% 0%, 0% 0%, 0% 50%; }
    50% { background-position: 100% 100%, 100% 100%, 100% 50%; }
    100% { background-position: 0% 0%, 0% 0%, 0% 50%; }
}

/* ========================================================= */
/* --- STERNSCHNUPPEN (Organisch & Realistisch) --- */
/* ========================================================= */

.stars-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1; 
    pointer-events: none; 
    overflow: hidden;
}

.star {
    position: absolute;
    background: #fff;
    border-radius: 50%;
    opacity: 0; 
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.8),
                0 0 20px var(--accent-cyan);
}

.star::before {
    content: '';
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 70px;
    height: 1px;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.8), transparent);
}

/* Weit verteilte Startpositionen über den ganzen Screen */
.star:nth-child(1) { top: 15%; left: 50%; width: 2px; height: 2px; animation: shootA 5s ease-out infinite 1s; }
.star:nth-child(2) { top: 35%; left: 95%; width: 1px; height: 1px; animation: shootB 7s ease-out infinite 4s; }
.star:nth-child(3) { top: 65%; left: 115%; width: 3px; height: 3px; animation: shootC 6s ease-out infinite 0s; }
.star:nth-child(4) { top: 10%; left: 105%; width: 2px; height: 2px; animation: shootB 8.5s ease-out infinite 6s; }
.star:nth-child(5) { top: 80%; left: 70%; width: 1.5px; height: 1.5px; animation: shootA 6s ease-out infinite 3s; }

/* Realistische Kurve: Startet unsichtbar -> Glüht schnell auf (10%) -> Wird langsamer und verblasst langsam (100%) */
@keyframes shootA {
    0% { transform: rotate(315deg) translateX(0); opacity: 0; }
    10% { opacity: 1; }
    100% { transform: rotate(315deg) translateX(-1500px); opacity: 0; }
}
@keyframes shootB {
    0% { transform: rotate(322deg) translateX(0); opacity: 0; }
    10% { opacity: 1; }
    100% { transform: rotate(322deg) translateX(-1500px); opacity: 0; }
}
@keyframes shootC {
    0% { transform: rotate(308deg) translateX(0); opacity: 0; }
    10% { opacity: 1; }
    100% { transform: rotate(308deg) translateX(-1500px); opacity: 0; }
}

/* --- Typografie & Layout --- */
h1 { font-size: 3rem; font-weight: 800; margin-bottom: 0.5rem; letter-spacing: -1px; }
h2 { font-size: 2.5rem; margin-bottom: 1rem; }
h3 { font-size: 1.5rem; margin-bottom: 0.5rem; }
p { color: var(--text-muted); }
a { text-decoration: none; color: inherit; }

main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 100px 2rem 2rem 2rem;
}

/* --- Navigation --- */
nav {
    position: fixed;
    top: 0;
    width: 100%;
    background: transparent;
    padding: 1.5rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 100;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo { height: 40px; }
.brand-name { font-weight: 800; font-size: 1.2rem; letter-spacing: 1px;}

.nav-links {
    list-style: none;
    display: flex;
    gap: 30px;
}

.nav-item {
    font-weight: 600;
    color: var(--text-muted);
    transition: color 0.3s ease;
}

.nav-item:hover, .nav-item.active {
    color: var(--accent-cyan);
}

/* --- SPA View Logik (Animationen) --- */
.view {
    display: none;
    animation: smoothFadeIn 0.5s ease forwards;
}

.view.active {
    display: block;
}

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

/* --- Startseite: Hero & App Grid --- */
.hero {
    text-align: center;
    margin-bottom: 4rem;
    padding-top: 2rem;
}

.hero-title {
    font-size: clamp(2.2rem, 5vw, 4.2rem); 
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -1.5px;
    margin-bottom: 1rem;
    
    background: linear-gradient(90deg, #FFFFFF 0%, #FFFFFF 100%);
    background-size: 200% auto;
    
    /* WICHTIG: Das Clip-Verhalten muss zwingend hier schon drin sein! */
    -webkit-background-clip: text;
    background-clip: text; 
    -webkit-text-fill-color: transparent;
    color: transparent;

    /* Nur transform und filter animieren, NICHT das background-clip! */
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), filter 0.4s ease;
    cursor: default;
    display: inline-block; /* Behebt Rendering-Fehler in manchen Browsern */
}

.hero-title:hover {
    transform: scale(1.02) translateY(-2px);
    filter: drop-shadow(0 10px 25px rgba(76, 209, 247, 0.4));
    
    /* Beim Hover ändert sich nur die Farbe, das "Clipping" auf den Text bleibt bestehen */
    background-image: linear-gradient(
        110deg,
        #FFFFFF 10%,
        var(--accent-cyan) 50%,
        #FFFFFF 90%
    );
    animation: textShine 2s linear infinite;
}

@keyframes textShine {
    0% {
        background-position: 200% center;
    }
    100% {
        background-position: -200% center;
    }
}

/* Der kleine Text darunter */
.hero p {
    font-size: 1.1rem;
    letter-spacing: 0.5px;
    margin-top: 1rem;
}

.app-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

/* --- App Karten (Glassmorphismus) --- */
.app-card {
    background: var(--card-bg);
    backdrop-filter: blur(12px); 
    -webkit-backdrop-filter: blur(12px);
    border-radius: var(--radius-soft);
    padding: 2.5rem 2rem;
    text-align: center;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid rgba(255, 255, 255, 0.08); 
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3); 
    display: block; 
}

.app-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(76, 209, 247, 0.15);
    border-color: rgba(76, 209, 247, 0.4);
}

/* --- App Icons (Bilder) --- */
.app-icon {
    width: 100px;
    height: 100px;
    margin: 0 auto 1.5rem auto;
    display: block;
    border-radius: 22%;
    object-fit: cover;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), filter 0.4s ease;
}

.app-card:hover .app-icon {
    transform: scale(1.1) rotate(3deg);
    filter: drop-shadow(0 5px 15px rgba(76, 209, 247, 0.4));
}

.app-icon-large {
    width: 150px;
    height: 150px;
    border-radius: 22%;
    object-fit: cover;
    flex-shrink: 0;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

/* --- App Detailseite (Header behält Glass-Effekt) --- */
.app-detail-header {
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    padding: 3rem;
    border-radius: var(--radius-soft);
    display: flex;
    gap: 3rem;
    align-items: flex-start; 
}

/* --- Legal Seite (NEU: Solider Hintergrund, nicht transparent) --- */
.legal-content {
    background: #11151f; /* Solides, tiefes Blau-Grau ohne Transparenz */
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5); /* Etwas mehr Schatten für Tiefe */
    padding: 3rem;
    border-radius: var(--radius-soft);
    margin-top: 2rem;
    position: relative;
    z-index: 10; /* Zwingt die Box sicher über die Sterne */
}

.back-btn {
    display: inline-block;
    margin-bottom: 2rem;
    color: var(--accent-cyan);
    font-weight: 600;
    transition: transform 0.3s ease;
}

.back-btn:hover {
    transform: translateX(-5px);
}

.app-description {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
}

/* --- Listen-Styling --- */
.app-info h4 {
    font-size: 1.2rem;
    margin-bottom: 0.8rem;
    color: var(--text-main);
}

.feature-list {
    list-style-position: inside;
    color: var(--text-muted);
    margin-bottom: 2rem;
    line-height: 1.6;
}

.feature-list li {
    margin-bottom: 0.5rem;
}

.feature-list strong {
    color: var(--accent-cyan);
}

/* --- Buttons --- */
.store-buttons {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    border-radius: var(--radius-small);
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
    text-decoration: none;
}

.btn.primary {
    background: var(--accent-cyan);
    color: var(--bg-dark);
}

.btn.primary:hover {
    background: var(--accent-hover);
    box-shadow: 0 0 15px rgba(76, 209, 247, 0.4);
}

.btn.secondary {
    background: transparent;
    color: var(--text-main);
    border: 1px solid var(--text-muted);
}

.btn.secondary:hover:not(:disabled) {
    border-color: var(--text-main);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ========================================================= */
/* --- MOBILE ANPASSUNGEN (SMARTPHONE OPTIMIERUNG) --- */
/* ========================================================= */

@media (max-width: 768px) {
    main {
        padding: 80px 1rem 2rem 1rem;
    }

    h1 {
        font-size: 2rem;
        margin-bottom: 1rem;
    }
    h2 {
        font-size: 1.6rem;
    }
    h3 {
        font-size: 1.2rem;
    }
    .hero {
        margin-bottom: 2rem;
    }

    nav {
        padding: 1rem;
    }
    .logo {
        height: 32px;
    }
    .brand-name {
        font-size: 1rem;
        white-space: nowrap; 
    }
    .nav-links {
        gap: 12px;
    }
    .nav-item {
        font-size: 0.9rem;
        white-space: nowrap; 
    }

    .app-grid {
        gap: 1.5rem;
    }
    .app-card {
        padding: 1.5rem 1rem; 
    }
    .app-icon {
        width: 70px; 
        height: 70px;
        margin-bottom: 1rem;
    }

    .app-detail-header {
        flex-direction: column;
        text-align: center;
        align-items: center;
        gap: 1.5rem;
        padding: 1.5rem; 
    }
    .app-icon-large {
        width: 100px; 
        height: 100px;
    }
    .feature-list {
        text-align: left;
        font-size: 0.95rem;
    }
    
    .store-buttons {
        flex-direction: column;
        width: 100%;
        margin-top: 1.5rem;
    }
    .store-buttons .btn {
        width: 100%;
    }

    .legal-content {
        padding: 1.5rem;
    }
}

@media (max-width: 400px) {
    .brand-name {
        display: none; 
    }
}