@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;600;800&display=swap');

:root {
    /* --- DARK MODE (Standard) --- */
    --primary: #e94e8b;
    --accent: #00b894;
    --bg-body: #1a0f24;
    --bg-card: #251833;
    --bg-nav: rgba(26, 15, 36, 0.95);
    --text-main: #ffffff;
    --text-muted: #b8b0c4;
    --border: rgba(255, 255, 255, 0.1);
    
    /* WICHTIG: Eingabefelder im Dark Mode */
    --input-bg: #2d1b3e; 
    --input-text: #ffffff;
    --input-border: rgba(255, 255, 255, 0.2);
}

[data-theme="light"] {
    /* --- LIGHT MODE --- */
    --bg-body: #f4f6f8;
    --bg-card: #ffffff;
    --bg-nav: rgba(255, 255, 255, 0.95);
    --text-main: #1a0f24; /* Dunkle Schrift auf hellem Grund */
    --text-muted: #636e72;
    --border: #dfe6e9;
    
    /* WICHTIG: Eingabefelder im Light Mode */
    --input-bg: #ffffff;
    --input-text: #1a0f24; /* Dunkle Schrift! */
    --input-border: #ccc;
}

* { margin:0; padding:0; box-sizing:border-box; }
body { 
    font-family: 'Poppins', sans-serif; 
    background-color: var(--bg-body); 
    color: var(--text-main); 
    transition: background 0.3s, color 0.3s;
    line-height: 1.6;
}

/* --- ELEMENTE --- */
a { text-decoration: none; color: inherit; transition: 0.3s; }
ul { list-style: none; }

/* Header */
header { position: sticky; top: 0; z-index: 1000; background: var(--bg-nav); backdrop-filter: blur(10px); border-bottom: 1px solid var(--border); padding: 10px 0; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.navbar { display: flex; justify-content: space-between; align-items: center; }

/* Logo & Nav */
.logo { font-weight: 800; font-size: 1.5rem; color: var(--text-main); display: flex; align-items: center; gap: 10px; }
.logo span { color: var(--primary); }
.nav-links { display: flex; gap: 20px; }
.nav-links a { font-weight: 600; color: var(--text-muted); }
.nav-links a:hover { color: var(--primary); }

/* Buttons & Switch */
.btn { background: var(--primary); color: white !important; padding: 10px 20px; border-radius: 50px; border: none; font-weight: bold; cursor: pointer; display: inline-block; }
.theme-btn { 
    background: var(--bg-card); 
    border: 1px solid var(--border); 
    color: var(--text-main); 
    padding: 8px 12px; 
    border-radius: 50px; 
    cursor: pointer; 
    font-size: 1.2rem;
    transition: 0.3s;
}
.theme-btn:hover { border-color: var(--primary); transform: scale(1.1); }

/* Cards */
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 30px; margin: 30px 0; }
.card { background: var(--bg-card); padding: 25px; border-radius: 15px; border: 1px solid var(--border); box-shadow: 0 5px 15px rgba(0,0,0,0.05); }

/* --- INPUTS & FORMS (Hier lag das Problem!) --- */
input, select, textarea {
    width: 100%; 
    padding: 12px; 
    margin-bottom: 15px; 
    border-radius: 8px;
    font-family: inherit;
    
    /* Nutze die definierten Variablen */
    background-color: var(--input-bg) !important;
    color: var(--input-text) !important;
    border: 1px solid var(--input-border) !important;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--primary) !important; }

/* Admin Specifics */
.admin-card { background: var(--bg-card); color: var(--text-main); padding: 20px; border-radius: 10px; border: 1px solid var(--border); margin-bottom: 20px; }
.badge { padding: 3px 8px; border-radius: 5px; font-size: 0.8rem; background: var(--bg-body); border: 1px solid var(--border); }

/* Editor Fix */
.editor-box { background: var(--bg-card); border: 1px solid var(--border); }
.editor-content { color: var(--text-main); min-height: 150px; padding: 10px; }

/* Mobile */
.hamburger { display: none; font-size: 1.5rem; cursor: pointer; }
@media(max-width: 900px) {
    .hamburger { display: block; order: 1; margin-right: 15px; }
    .logo { order: 2; flex: 1; }
    .nav-links { 
        display: none; position: absolute; top: 100%; left: 0; width: 100%; 
        background: var(--bg-card); flex-direction: column; padding: 20px; 
        text-align: center; border-bottom: 2px solid var(--primary);
    }
    .nav-links.active { display: flex; }
    .mobile-controls { order: 3; display: flex; gap: 10px; align-items: center; }
}

/* --- REPARATUR: FAQ ACCORDION --- */
.faq-item { 
    background: var(--bg-card); 
    border: 1px solid var(--border); 
    border-radius: 10px; 
    margin-bottom: 15px; 
    overflow: hidden; 
    transition: 0.3s;
}
.faq-question { 
    padding: 20px; 
    cursor: pointer; 
    font-weight: bold; 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    color: var(--text-main); 
}
.faq-question:hover { 
    background: var(--bg-input); 
    color: var(--primary); 
}
.faq-answer { 
    padding: 0 20px 20px 20px; 
    display: none; /* Standardmäßig zu */
    color: var(--text-muted); 
    border-top: 1px solid var(--border); 
    margin-top: 0; 
}
/* Wenn Aktiv */
.faq-item.active .faq-answer { display: block; animation: fadeIn 0.3s; }
.faq-item.active .faq-question span { transform: rotate(45deg); transition: 0.3s; }
@keyframes fadeIn { from { opacity:0; } to { opacity:1; } }


/* --- REPARATUR: PRODUKT DETAIL SEITE --- */
/* Wrapper verhindert, dass die Seite zu breit wird */
.detail-wrapper {
    max-width: 1000px; 
    margin: 40px auto; 
    padding: 0 20px;
}

.detail-container {
    display: grid; 
    grid-template-columns: 1fr 1fr; /* Zwei Spalten: Bild | Text */
    gap: 40px;
    background: var(--bg-card); 
    padding: 40px; 
    border-radius: 20px;
    border: 1px solid var(--border); 
    box-shadow: var(--shadow);
}

.detail-image {
    width: 100%; 
    height: auto; 
    max-height: 500px; 
    border-radius: 15px;
    border: 1px solid var(--border); 
    object-fit: cover;
}

.detail-content h1 { font-size: 2.2rem; line-height: 1.2; margin-bottom: 15px; }
.detail-price { font-size: 2.5rem; color: var(--primary); font-weight: 800; margin: 20px 0; }
.detail-text { font-size: 1rem; color: var(--text-muted); white-space: pre-line; margin-bottom: 30px; line-height: 1.8; }

.detail-meta { 
    background: var(--bg-input); 
    padding: 20px; 
    border-radius: 10px; 
    margin-bottom: 20px; 
    font-size: 0.9rem; 
    border: 1px solid var(--border);
}

/* Mobile Anpassung für Detail Seite */
@media(max-width: 800px) { 
    .detail-container { grid-template-columns: 1fr; } /* Untereinander auf Handy */
}


/* --- REPARATUR: KATEGORIE LABELS --- */
.cat-badge { 
    display: inline-block; 
    padding: 5px 10px; 
    border-radius: 5px; 
    font-size: 0.8rem; 
    font-weight: 800; 
    text-transform: uppercase; 
    letter-spacing: 1px; 
    margin-bottom: 10px; 
    color: white; 
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}
.cat-Konsole { background: #e94e8b; }
.cat-Spiel { background: #f1c40f; color: #333; text-shadow:none; }
.cat-Modding { background: #00b894; }
.cat-Zubehör { background: #0984e3; }
.cat-Ankauf { background: #d63031; animation: pulse 2s infinite; }
@keyframes pulse { 0% { opacity: 1; } 50% { opacity: 0.7; } 100% { opacity: 1; } }


/* --- ATMOSPHÄRE & HINTERGRUND --- */
body {
    /* Ein feiner Schein von oben (Lila zu Dunkel), wirkt edler als reines Schwarz */
    background: radial-gradient(circle at 50% 0%, #3a2252 0%, #1a0f24 60%);
    background-attachment: fixed; /* Der Hintergrund bleibt stehen beim Scrollen */
    min-height: 100vh;
}

/* --- LAYOUT BEGRENZUNG (Damit es nicht so leer aussieht) --- */
.container {
    max-width: 1000px !important; /* Etwas schmaler für besseren Fokus */
}

/* --- HEADER OPTIMIERUNG --- */
.navbar {
    padding: 10px 0;
}
.logo img {
    height: 60px !important; /* Logo größer */
    object-fit: contain;
    margin-right: 15px;
    filter: drop-shadow(0 0 5px rgba(233, 78, 139, 0.5)); /* Leichter Glow um das Logo */
}

/* --- PRODUKT KARTEN FIX --- */
/* Verhindert, dass eine einzelne Karte riesig wird */
.grid-3 {
    display: grid;
    /* Karten sind mindestens 300px breit, aber maximal 350px */
    grid-template-columns: repeat(auto-fill, minmax(280px, 350px));
    justify-content: center; /* Zentriert die Karten in der Mitte */
    gap: 40px;
}

.card {
    background: rgba(37, 24, 51, 0.8); /* Leicht transparent */
    backdrop-filter: blur(10px); /* Milchglas-Effekt */
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 15px 35px rgba(0,0,0,0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(233, 78, 139, 0.2); /* Pinker Schatten beim Hover */
    border-color: var(--primary);
}

.product-img {
    height: 220px;
    width: 100%;
    object-fit: contain; /* Bild wird nicht abgeschnitten, sondern passt komplett rein */
    background: rgba(0,0,0,0.2);
    padding: 20px;
    border-radius: 10px;
}

/* --- KATEGORIE BADGES --- */
.cat-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.5);
}

/* --- FORMULARE & FAQ (Schmaler machen) --- */
/* Zentriert Formulare und FAQ und macht sie schmaler */
#contact .contact-wrapper, 
#faq .container > div {
    max-width: 600px;
    margin: 0 auto;
}

input, select, textarea {
    background: rgba(255, 255, 255, 0.07) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    color: white !important;
}

input:focus, textarea:focus {
    background: rgba(255, 255, 255, 0.1) !important;
    border-color: var(--primary) !important;
    box-shadow: 0 0 15px rgba(233, 78, 139, 0.2);
}

/* --- BUTTON GLOW --- */
.btn {
    box-shadow: 0 4px 15px rgba(233, 78, 139, 0.3);
}
.btn:hover {
    box-shadow: 0 6px 20px rgba(233, 78, 139, 0.5);
}


/* --- BREITEN-ANPASSUNG --- */

/* 1. Der Haupt-Rahmen für ALLES */
.container, .detail-wrapper {
    max-width: 1100px !important; /* Eine einheitliche Breite für die ganze Seite */
    width: 100%;
    margin: 0 auto;
    padding: 0 20px; /* Abstand zum Handyrand */
}

/* 2. Begrenzungen aufheben (Damit FAQ & Kontakt breit werden) */
#contact .contact-wrapper, 
#faq .container > div,
.detail-container {
    max-width: 100% !important; /* Nutze den vollen Platz des Containers */
    margin: 0 !important;       /* Kein extra Zentrieren nötig, da volle Breite */
    width: 100% !important;
}

/* 3. Detail-Seite anpassen */
.detail-wrapper {
    margin-top: 40px;
    margin-bottom: 40px;
}

/* 4. Formularfelder auch breit machen */
form {
    width: 100%;
}

/* 5. FAQ Items volle Breite */
.faq-item {
    width: 100%;
}
