/* --- Variablen für das TPower-Farbschema --- */
:root {
    --bg-dark: #1A1D24;
    --card-bg: #222731;
    --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;
}

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

/* --- 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: rgba(26, 29, 36, 0.85);
    backdrop-filter: blur(10px);
    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;
}

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

/* --- App Karten --- */
.app-card {
    background: var(--card-bg);
    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.05);
}

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

/* --- 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);
}

.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 --- */
.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-detail-header {
    display: flex;
    gap: 3rem;
    align-items: flex-start; 
    background: var(--card-bg);
    padding: 3rem;
    border-radius: var(--radius-soft);
}

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

/* --- Listen-Styling für PitMate Features --- */
.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;
}

/* --- Legal Seite --- */
.legal-content {
    background: var(--card-bg);
    padding: 3rem;
    border-radius: var(--radius-soft);
    margin-top: 2rem;
}

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

@media (max-width: 768px) {
    /* Globale Abstände anpassen */
    main {
        padding: 80px 1rem 2rem 1rem;
    }

    /* Typografie für Handys verkleinern */
    h1 {
        font-size: 2rem;
        margin-bottom: 1rem;
    }
    h2 {
        font-size: 1.6rem;
    }
    h3 {
        font-size: 1.2rem;
    }
    .hero {
        margin-bottom: 2rem;
    }

    /* Navigation aufräumen & quetschen verhindern */
    nav {
        padding: 1rem;
    }
    .logo {
        height: 32px;
    }
    .brand-name {
        font-size: 1rem;
        white-space: nowrap; /* Verhindert Zeilenumbruch */
    }
    .nav-links {
        gap: 12px;
    }
    .nav-item {
        font-size: 0.9rem;
        white-space: nowrap; /* Verhindert Zeilenumbruch im Menü */
    }

    /* Startseite: Grid und Karten kompakter */
    .app-grid {
        gap: 1.5rem;
    }
    .app-card {
        padding: 1.5rem 1rem; /* Weniger Rand in der Karte */
    }
    .app-icon {
        width: 70px; /* Icons auf dem Handy wieder etwas kleiner */
        height: 70px;
        margin-bottom: 1rem;
    }

    /* Detailseiten für Apps */
    .app-detail-header {
        flex-direction: column;
        text-align: center;
        align-items: center;
        gap: 1.5rem;
        padding: 1.5rem; /* Weniger Rand */
    }
    .app-icon-large {
        width: 100px; /* Auf dem Handy kleiner, damit sie nicht alles einnehmen */
        height: 100px;
    }
    .feature-list {
        text-align: left;
        font-size: 0.95rem;
    }
    
    /* Buttons stapeleln für besseres Tippen mit dem Daumen */
    .store-buttons {
        flex-direction: column;
        width: 100%;
        margin-top: 1.5rem;
    }
    .store-buttons .btn {
        width: 100%;
    }

    /* Legal Seite */
    .legal-content {
        padding: 1.5rem;
    }
}

/* Spezieller Fix für sehr schmale Displays (z.B. ältere iPhones), 
   damit das Menü rechts immer Platz hat */
@media (max-width: 400px) {
    .brand-name {
        display: none; /* Versteckt den Text neben dem Logo, Menü behält Platz */
    }
}