:root {
    /* Aktualisierte, moderne Farbpalette */
    --primary-blue: #0052ff;
    --primary-blue-hover: #0041cc;
    --discord-blurple: #5865F2;
    --discord-blurple-hover: #4752C4;
    --bg-dark-top: #1e222b;
    --bg-dark-bottom: #0a0b0d;
    --text-light: #f8fafc;
    --text-muted: #64748b;
    --danger-red: #e53e3e;
    --danger-red-hover: #c53030;
}

* { 
    box-sizing: border-box; 
    margin: 0; 
    padding: 0; 
    font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, Roboto, sans-serif; 
}

body { 
    color: var(--text-light); 
    line-height: 1.6; 
    min-height: 100vh; 
    display: flex; 
    flex-direction: column; 
    background: var(--bg-dark-bottom); 
    overflow-x: hidden;
}

/* Globaler Verlauf für Index und andere Seiten */
.dark-gradient, .index-body { 
    background: linear-gradient(180deg, var(--bg-dark-top) 0%, var(--bg-dark-bottom) 100%); 
}


/* =========================================
   1. NAVBAR & ALLGEMEINES (Für Dashboard & App)
   ========================================= */
.navbar { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    padding: 1.5rem 2rem; 
    background: rgba(0,0,0,0.5); 
    border-bottom: 1px solid rgba(255,255,255,0.05); 
}
.logo { 
    font-size: 1.8rem; 
    font-weight: 900; 
    color: var(--primary-blue); 
    text-decoration: none; 
    letter-spacing: -1px; 
}
.logo span { 
    color: var(--text-light); 
}
.container { 
    max-width: 900px; 
    min-width: 700px;
    margin: 3rem auto; 
    padding: 2rem; 
    background: var(--bg-card); 
    border-radius: 12px; 
}



/* =========================================
   2. NEUE STARTSEITE (Index.php)
   ========================================= */
.center-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    width: 100%;
    max-width: 600px;
    padding: 2rem;
    margin: 0 auto;
}
.brand-title {
    font-size: 4.5rem;
    font-weight: 900;
    letter-spacing: -2px;
    color: var(--primary-blue);
    line-height: 1;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
}
.brand-title span { color: var(--text-light); }
.brand-subtitle {
    font-size: 1.4rem;
    color: var(--text-muted);
    font-weight: 500;
    letter-spacing: 1px;
    margin-bottom: 3rem;
}

/* Live Suche (Index) */
.search-container { width: 100%; position: relative; }
.search-input {
    width: 100%;
    padding: 1.1rem 1.5rem;
    font-size: 1.2rem;
    background: rgba(0, 0, 0, 0.4);
    border: 2px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    color: white;
    outline: none;
    transition: all 0.3s ease;
    text-align: center;
}
.search-input:focus {
    border-color: var(--primary-blue);
    background: rgba(0, 0, 0, 0.6);
    box-shadow: 0 0 25px rgba(0, 82, 255, 0.2);
}
.search-results {
    width: 100%;
    margin-top: 1rem;
    background: rgba(15, 17, 23, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    list-style: none;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    text-align: left;
    display: none;
}
.search-results li a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    color: var(--text-light);
    text-decoration: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    transition: background 0.2s;
}

.search-results li:last-child a { border-bottom: none; }
.search-results li a:hover { background: rgba(255, 255, 255, 0.05); }
.search-results .sona-name { font-weight: 700; }
.search-results .sona-species { font-size: 0.9rem; color: var(--text-muted); }

.search-sona-left {
    display: flex;
    align-items: center;
    gap: 0.8rem; /* Abstand zwischen Bild und Name */
}
.search-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--primary-blue);
    background: rgba(0, 0, 0, 0.2);
    flex-shrink: 0; /* Verhindert, dass das Bild bei langen Namen gequetscht wird */
}


/* Untere Leiste (Footer Startseite) */
.bottom-action-bar {
    width: 100%;
    padding: 3rem 2rem;
    display: flex;
    justify-content: center;
    align-items: center;
}
.btn-bottom {
    padding: 1rem 2.5rem;
    font-size: 1.1rem;
    font-weight: 700;
    border-radius: 30px;
    text-decoration: none;
    transition: all 0.2s ease;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}
.btn-dashboard {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-light);
    border: 1px solid rgba(255, 255, 255, 0.1);
}
.btn-dashboard:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}


/* =========================================
   3. BUTTONS (App / Dashboard)
   ========================================= */
.btn { 
    padding: 0.8rem 1.8rem; 
    border-radius: 8px; 
    text-decoration: none; 
    font-weight: 700; 
    color: white; 
    border: none; 
    cursor: pointer; 
    display: inline-block; 
    transition: all 0.2s; 
}
.btn-primary { background: var(--primary-blue); }
.btn-primary:hover { background: var(--primary-blue-hover); }
.btn-secondary { background: #4a5568; }
.btn-secondary:hover { background: #323a48; }
.btn-discord { background: var(--discord-blurple); color: white; border: none; }
.btn-discord:hover { background: var(--discord-blurple-hover); transform: translateY(-2px); box-shadow: 0 6px 20px rgba(88, 101, 242, 0.3); }
.btn-danger { background: var(--danger-red); }
.btn-danger:hover { background: var(--danger-red-hover); }


/* =========================================
   4. DASHBOARD (Stats & Cards)
   ========================================= */
.stats-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-bottom: 2.5rem; }
.stat-box { background: rgba(0,0,0,0.2); padding: 1.5rem; border-radius: 8px; border-left: 4px solid var(--primary-blue); text-align: center; }
.stat-box span { display: block; color: var(--text-muted); font-size: 0.9rem; text-transform: uppercase; margin-bottom: 0.5rem; }
.stat-box strong { font-size: 2rem; color: white; }

.sona-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 1.5rem; margin-top: 1.5rem; }
.sona-card { background: rgba(0,0,0,0.25); padding: 1.5rem; border-radius: 8px; text-align: center; border: 1px solid rgba(255,255,255,0.05); position: relative; }
.sona-card img { width: 110px; height: 110px; border-radius: 50%; object-fit: cover; margin-bottom: 1rem; border: 3px solid var(--primary-blue); }
.sona-card h3 { margin-bottom: 0.2rem; }
.sona-card-species { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 0.8rem; }
.sona-card-views { font-size: 0.85rem; color: var(--primary-blue); background: rgba(0, 82, 255, 0.1); display: inline-block; padding: 0.2rem 0.6rem; border-radius: 20px; margin-bottom: 1rem; }


/* =========================================
   5. FORMULARE (Für Add/Edit Sona)
   ========================================= */
.form-group { margin-bottom: 1.5rem; text-align: left; }
.form-group label { display: block; margin-bottom: 0.5rem; font-weight: bold; color: var(--text-light); }
.form-group input[type="text"], 
.form-group input[type="date"], 
.form-group textarea, 
.form-group select { 
    width: 100%; 
    padding: 0.8rem; 
    border-radius: 6px; 
    border: 1px solid var(--text-muted); 
    background: rgba(0,0,0,0.2); 
    color: white; 
    font-family: inherit;
    font-size: 1rem;
}


/* =========================================
   6. DANGER ZONE & MODALS (Account Löschen)
   ========================================= */
.danger-zone { margin-top: 4rem; padding: 1.5rem; border: 1px dashed var(--danger-red); border-radius: 8px; background: rgba(229, 62, 62, 0.03); }
.danger-zone h3 { color: var(--danger-red); margin-bottom: 0.5rem; }

.modal-overlay { position: fixed; top:0; left:0; width:100%; height:100%; background: rgba(0,0,0,0.8); display: flex; justify-content: center; align-items: center; z-index: 1000; visibility: hidden; opacity: 0; transition: opacity 0.2s ease, visibility 0.2s; }
.modal-overlay.active { visibility: visible; opacity: 1; }
.modal-content { background: #1e293b; padding: 2rem; border-radius: 12px; max-width: 450px; width: 90%; border: 2px solid var(--danger-red); text-align: center; }
.modal-content h4 { color: white; font-size: 1.4rem; margin-bottom: 1rem; }
.modal-content p { color: var(--text-muted); margin-bottom: 1.5rem; }
.modal-buttons { display: flex; gap: 1rem; justify-content: center; }