/* =========================================================================
 * AI CONTEXT: style.css - Zentrales Stylesheet
 * -------------------------------------------------------------------------
 * BESCHREIBUNG: Globales Design des OnPe Hubs.
 * UPDATE: Anti-Spam Wort-Umbruch (overflow-wrap) hinzugefügt, um zerrissene 
 * Boxen durch ewig lange Wörter (xxxxxxx) zu verhindern.
 * ========================================================================= */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600;900&display=swap');

:root { --bg-color: #09090b; --card-bg: #111; --accent-gold: #eeb32a; --accent-gradient: linear-gradient(135deg, #f5c85d, #eeb32a); --text-color: #e0e0e0; --text-muted: #888; --danger: #ff4c4c; --success: #00e676; --glass-bg: rgba(15, 15, 18, 0.8); }

/* 🛡️ GLOBALE ANTI-SPAM FORMATIERUNG (Erzwingt Umbrüche bei Endlos-Wörtern) */
*, *::before, *::after { 
    box-sizing: border-box; 
    overflow-wrap: anywhere; 
    word-wrap: break-word; 
    word-break: break-word; 
}

body { font-family: 'Inter', sans-serif; background: var(--bg-color); color: var(--text-color); margin: 0; padding-top: 80px; display: flex; flex-direction: column; align-items: center; min-height: 100vh; overflow-x: hidden; line-height: 1.6; }
.main-wrapper { width: 100%; max-width: 650px; padding: 15px; margin: 0 auto; flex: 1;}
.hero-image { width: 100%; max-height: 400px; object-fit: cover; display: block; margin: 0; border-bottom: 2px solid var(--accent-gold); box-shadow: 0 10px 30px rgba(0,0,0,0.5); }

/* KARTEN & RAHMEN */
.card { background: var(--card-bg); border: 1px solid #333; border-radius: 12px; padding: 20px; margin-bottom: 25px; box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5); position: relative; transition: 0.2s; }
.card-gold { border: 1px solid var(--accent-gold); }

/* BUTTONS */
.btn-primary, .create-btn-bottom, button.submit { background: var(--accent-gradient); color: #000; border: none; border-radius: 30px; padding: 14px 24px; font-size: 1.05em; font-weight: 900; cursor: pointer; box-shadow: 0 4px 15px rgba(238, 179, 42, 0.3); text-transform: uppercase; transition: 0.3s; display: inline-flex; justify-content: center; align-items: center; text-decoration: none; }
.btn-primary.full-width { width: 100%; }
.btn-primary:hover, .create-btn-bottom:hover, button.submit:hover { box-shadow: 0 6px 20px rgba(238, 179, 42, 0.5); transform: translateY(-2px); }
.btn { background: #222; color: #fff; border: 1px solid #444; padding: 10px 16px; border-radius: 8px; cursor: pointer; font-weight: 600; transition: 0.2s; text-decoration: none; display: inline-block;}
.btn:hover { background: #333; }

/* INPUTS & MODERNES DROPDOWN */
input[type="text"], input[type="url"], input[type="number"], input[type="password"], textarea { width: 100%; padding: 14px; background: #111; border: 1px solid #444; border-radius: 10px; color: #fff; font-size: 1em; outline: none; transition: 0.3s; font-family: 'Inter', sans-serif; box-sizing: border-box; }
input:focus, textarea:focus { border-color: var(--accent-gold); box-shadow: 0 0 10px rgba(238, 179, 42, 0.1); }
select { width: 100%; padding: 14px 40px 14px 14px; background-color: #111; background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23eeb32a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e"); background-repeat: no-repeat; background-position: right 15px center; background-size: 16px; color: #fff; border: 1px solid #444; border-radius: 10px; font-size: 1em; font-family: 'Inter', sans-serif; -webkit-appearance: none; -moz-appearance: none; appearance: none; outline: none; cursor: pointer; transition: 0.3s; box-sizing: border-box; }
select:focus { border-color: var(--accent-gold); box-shadow: 0 0 10px rgba(238, 179, 42, 0.1); }

/* SPRACHAUSWAHL */
.lang-row { display: flex; justify-content: center; gap: 8px; margin-bottom: 25px; flex-wrap: wrap; }
.lang-btn { background: #1a1a1a; color: var(--text-muted); text-decoration: none; font-size: 0.9em; font-weight: 900; padding: 8px 18px; border-radius: 20px; border: 1px solid #444; transition: 0.2s; }
.lang-btn.active { background: var(--accent-gradient); color: #000; border: none; box-shadow: 0 4px 10px rgba(238, 179, 42, 0.2); }

/* TEXTE & MELDUNGEN */
h1, h2, h3 { margin-top: 0; color: var(--accent-gold); }
.section-title { border-bottom: 2px solid var(--accent-gold); padding-bottom: 10px; margin-bottom: 20px; font-size: 1.5em; }
.success { background: rgba(0,230,118,0.1); color: var(--success); border: 1px solid var(--success); padding: 12px; border-radius: 12px; font-weight: 600; margin-bottom: 20px; text-align: center; }

/* FOOTER */
.app-footer { width: 100%; padding: 25px 15px; background: #050505; border-top: 1px solid #222; color: var(--text-muted); text-align: center; font-size: 0.85em; margin-top: auto; line-height: 1.8;}
.app-footer span { color: var(--accent-gold); font-weight: bold; }

/* WEITERLESEN LINK */
.read-more-link { color: var(--accent-gold); font-weight: 900; text-decoration: none; transition: 0.2s; white-space: nowrap; }
.read-more-link:hover { text-decoration: underline; color: #fff; }

/* =========================================================================
   NAVBAR & SIDEBAR
   ========================================================================= */
.app-navbar { position: fixed; top: 0; left: 0; right: 0; height: 65px; background: var(--glass-bg); backdrop-filter: blur(15px); -webkit-backdrop-filter: blur(15px); border-bottom: 1px solid #222; display: flex; justify-content: space-between; align-items: center; padding: 0 20px; z-index: 9999; box-shadow: 0 4px 20px rgba(0,0,0,0.5); }
.nav-left { display: flex; align-items: center; gap: 12px; }
.logo-img { height: 45px; width: auto; object-fit: contain; }
.app-title { font-size: 1.2em; font-weight: 900; background: var(--accent-gradient); -webkit-background-clip: text; -webkit-text-fill-color: transparent; text-transform: uppercase; margin: 0; }
.hamburger { font-size: 2em; color: var(--accent-gold); cursor: pointer; user-select: none; }
.sidebar { height: 100%; width: 0; position: fixed; z-index: 10000; top: 0; right: 0; background: rgba(15,15,18,0.95); backdrop-filter: blur(20px); overflow-x: hidden; transition: 0.3s; padding-top: 70px; border-left: 1px solid #222; box-shadow: -10px 0 30px rgba(0,0,0,0.8); }
.sidebar a { padding: 16px 25px; text-decoration: none; font-size: 1.1em; color: #ccc; display: block; transition: 0.2s; border-bottom: 1px solid rgba(255,255,255,0.02); font-weight: 600;}
.sidebar a:hover, .sidebar a.active { color: #000; background: var(--accent-gradient); }
.sidebar .close-btn { position: absolute; top: 15px; right: 20px; font-size: 36px; border: none; padding: 0; background: transparent; color: #888; cursor: pointer; }
.sidebar .menu-header { padding: 0 25px 10px; color: var(--accent-gold); font-size: 0.85em; font-weight: 900; text-transform: uppercase; border-bottom: 2px solid #333; margin-bottom: 5px; }
#overlay { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.8); backdrop-filter: blur(3px); z-index: 9998; }

/* =========================================================================
   SMARTPHONE OPTIMIERUNGEN
   ========================================================================= */
@media (max-width: 600px) {
    body { font-size: 15px; padding-top: 70px; }
    .card { padding: 15px; margin-bottom: 18px; border-radius: 10px; }
    .btn-primary, .create-btn-bottom, button.submit { padding: 12px 18px; font-size: 0.9em; }
    .btn { padding: 8px 12px; font-size: 0.85em; }
    .section-title { font-size: 1.3em; margin-bottom: 15px; }
    h1 { font-size: 1.6em; }
    h3 { font-size: 1.15em; }
    input[type="text"], input[type="url"], input[type="number"], input[type="password"], textarea, select { padding: 12px; font-size: 0.95em; }
    .hero-image { max-height: 220px; }
}

/* =========================================================================
   ONPE VANILLA JS EDITOR (LEICHTGEWICHT & NATIV)
   ========================================================================= */
.onpe-editor-wrapper {
    border: 1px solid #444;
    border-radius: 12px;
    background: #111;
    overflow: hidden;
    margin-bottom: 15px;
    box-shadow: inset 0 2px 10px rgba(0,0,0,0.5);
    width: 100%;
}
.onpe-editor-toolbar {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    background: #1a1a1a;
    padding: 10px;
    border-bottom: 1px dashed #333;
    gap: 8px;
    -webkit-overflow-scrolling: touch; 
    scrollbar-width: none; 
}
.onpe-editor-toolbar::-webkit-scrollbar { display: none; }

.onpe-editor-btn {
    background: #222;
    color: #eee;
    border: 1px solid #444;
    border-radius: 8px;
    padding: 10px 16px;
    font-size: 1.1em;
    font-weight: 900;
    cursor: pointer;
    flex-shrink: 0; 
    transition: 0.2s;
    min-width: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.onpe-editor-btn:hover, .onpe-editor-btn:active {
    background: rgba(238, 179, 42, 0.2);
    border-color: var(--accent-gold);
    color: var(--accent-gold);
}
.onpe-editor-content {
    padding: 15px;
    min-height: 120px;
    max-height: 600px;
    overflow-y: auto;
    color: #eee;
    font-family: inherit;
    font-size: 1.05em;
    line-height: 1.5;
    outline: none;
    background: #111;
}
.onpe-editor-content:empty:before {
    content: attr(data-placeholder);
    color: #666;
    pointer-events: none;
    display: block;
}
.onpe-editor-content:focus { background: rgba(0,0,0,0.2); }
.onpe-editor-content h2 { color: var(--accent-gold); border-bottom: 2px solid var(--accent-gold); padding-bottom:5px; margin-top:0; font-size:1.5em; }
.onpe-editor-content h3 { color: var(--accent-gold); border-bottom: 1px dashed rgba(238,179,42,0.3); padding-bottom:5px; margin-top:0; font-size:1.25em; }
.onpe-editor-content h4 { color: #fff; font-size:1.1em; text-transform:uppercase; margin-top:0;}