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

:root {
    --primary: #8b5cf6;
    --primary-hover: #7c3aed;
    --secondary: #3b82f6;
    --bg-dark: #0f111a;
    --bg-darker: #06080d;
    --glass-bg: rgba(255, 255, 255, 0.04);
    --glass-bg-hover: rgba(255, 255, 255, 0.08);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-border-focus: rgba(139, 92, 246, 0.4);
    --text-main: #f8fafc;
    --text-body: #cbd5e1;
    --text-muted: #94a3b8;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --radius-lg: 16px;
    --radius-md: 12px;
    --shadow-glow: 0 0 25px rgba(139, 92, 246, 0.2);
    --shadow-soft: 0 8px 30px rgba(0, 0, 0, 0.5);
    --header-font: 'Outfit', sans-serif;
    --body-font: 'Inter', sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--body-font);
    background: radial-gradient(ellipse at top, #1a1c2c, var(--bg-dark), var(--bg-darker));
    color: var(--text-main);
    line-height: 1.7;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

h1,
h2,
h3,
h4,
h5 {
    font-family: var(--header-font);
    font-weight: 600;
}

a {
    color: var(--text-main);
    text-decoration: none;
    transition: all 0.2s;
}

.text-center {
    text-align: center;
}

.text-muted {
    color: var(--text-muted);
}

/* Navbar */
.navbar {
    background: rgba(6, 8, 13, 0.8);
    backdrop-filter: blur(15px);
    border-bottom: 1px solid var(--glass-border);
    padding: 1.2rem 3rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-brand {
    font-size: 1.4rem;
    font-weight: 700;
    font-family: var(--header-font);
    letter-spacing: 2px;
    background: linear-gradient(to right, #fff, #a78bfa);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-links {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

/* Hero Section */
.hero {
    padding: 6rem 2rem;
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="100%" height="100%" opacity="0.05"><rect width="100%" height="100%" fill="none" class="grid-layer"></rect><defs><pattern id="grid" width="40" height="40" patternUnits="userSpaceOnUse"><path d="M 40 0 L 0 0 0 40" fill="none" stroke="white" stroke-width="1"/></pattern></defs><rect width="100%" height="100%" fill="url(%23grid)" /></svg>') center/cover;
    position: relative;
    border-bottom: 1px solid var(--glass-border);
}

.hero::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 100px;
    background: linear-gradient(to top, var(--bg-dark), transparent);
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.hero-title {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    background: linear-gradient(to right, #fff, #a78bfa);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -1px;
}

.hero-subtitle {
    font-size: 1.2rem;
    color: var(--text-muted);
}

/* Page Layout */
.page-container {
    display: flex;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
    padding: 3rem 2rem;
    gap: 4rem;
    flex: 1;
}

/* Sidebar */
.sidebar {
    width: 280px;
    flex-shrink: 0;
}

/* Sidebar Search */
.sidebar-search {
    margin-bottom: 1.5rem;
    padding: 0 1rem;
}

.sidebar-search-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.sidebar-search-icon {
    position: absolute;
    left: 12px;
    color: var(--text-muted);
}

.sidebar-search-input {
    width: 100%;
    padding: 0.7rem 1rem 0.7rem 2.5rem;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    color: var(--text-main);
    font-family: var(--body-font);
    font-size: 0.95rem;
    transition: all 0.3s;
}

.sidebar-search-input:focus {
    outline: none;
    border-color: var(--primary);
    background: var(--glass-bg-hover);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.15);
}

.sidebar-search-input::placeholder {
    color: var(--text-muted);
}

.sidebar-title {
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 1.5px;
    color: var(--text-muted);
    margin-bottom: 1rem;
    padding-left: 1rem;
}

.nav-menu {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.nav-item {
    display: flex;
    align-items: center;
    padding: 1rem 1.2rem;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    font-weight: 500;
    transition: all 0.3s;
}

.nav-item:hover {
    background: var(--glass-bg-hover);
    transform: translateX(5px);
    border-color: rgba(255, 255, 255, 0.15);
}

.nav-item.active {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.2), rgba(59, 130, 246, 0.1));
    border-left: 4px solid var(--primary);
    color: #fff;
    font-weight: 600;
}

.nav-category-group {
    margin-bottom: 0.5rem;
    display: flex;
    flex-direction: column;
}

.nav-item-header {
    display: flex;
    align-items: center;
    width: 100%;
    gap: 0.5rem;
}

.nav-item-header .nav-item {
    flex: 1;
}

.group-toggle {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    color: var(--text-muted);
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
}

.group-toggle:hover {
    background: var(--glass-bg-hover);
    color: #fff;
}

.nav-category-group.collapsed .group-toggle svg {
    transform: rotate(-90deg);
}

.group-toggle svg {
    transition: transform 0.3s;
}

.nav-subcategories {
    display: flex;
    flex-direction: column;
    padding-left: 1rem;
    border-left: 1px solid var(--glass-border);
    margin-left: 1rem;
    margin-top: 0.5rem;
    gap: 0.4rem;
    overflow: hidden;
}

.nav-subitem {
    display: flex;
    align-items: center;
    padding: 0.5rem 1rem;
    color: var(--text-muted);
    font-size: 0.9rem;
    border-radius: 8px;
    transition: all 0.2s;
}

.nav-subitem:hover {
    color: #fff;
    background: var(--glass-bg);
}

.nav-subitem.active {
    color: var(--primary);
    font-weight: 600;
}

/* Main Content Area */
.content-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2rem;
    /* Reduced from 4rem */
    padding-top: 1rem;
}

.empty-state {
    text-align: center;
    padding: 5rem 2rem;
    background: var(--glass-bg);
    border: 1px dashed var(--glass-border);
    border-radius: var(--radius-lg);
}

/* Nahtlose Text-Sektionen (Kein Blog!) */
.content-section {
    border-bottom: 1px solid var(--glass-border);
    padding-bottom: 2rem;
    /* Reduced from 4rem */
}

.content-section:last-child {
    border-bottom: none;
    padding-bottom: 2rem;
}

.section-title {
    font-size: 2.2rem;
    margin-bottom: 1.5rem;
    color: #fff;
    line-height: 1.2;
}

.section-image {
    width: 100%;
    margin-bottom: 2rem;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-soft);
}

.section-image img {
    width: 100%;
    height: auto;
    max-height: 600px;
    object-fit: contain;
    background: rgba(0, 0, 0, 0.3);
}

.section-text {
    font-size: 1.15rem;
    color: var(--text-body);
    line-height: 1.6;
    /* Reduced from 1.8 */
}

.section-text p {
    margin-bottom: 1rem;
}

.section-text ul,
.section-text ol {
    margin: 1rem 0 1rem 1.5rem;
}

.section-text h1,
.section-text h2,
.section-text h3 {
    margin: 1.5rem 0 0.8rem 0;
    color: #fff;
}

.section-text blockquote {
    border-left: 4px solid var(--primary);
    padding-left: 1rem;
    color: var(--text-muted);
    font-style: italic;
}

/* Base Cards for admin/login forms */
.card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
}

.container {
    max-width: 1200px;
    margin: 3rem auto;
    padding: 0 1.5rem;
}

/* Forms */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-muted);
    font-size: 0.95rem;
}

.form-control {
    width: 100%;
    padding: 1rem 1.2rem;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    color: var(--text-main);
    font-family: var(--body-font);
    font-size: 1rem;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.15);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.8rem 1.5rem;
    font-size: 0.95rem;
    font-weight: 500;
    text-align: center;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-family: var(--header-font);
    transition: all 0.2s;
}

.btn-primary {
    background: linear-gradient(to right, var(--primary), var(--secondary));
    color: white;
}

.btn-primary:hover {
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.4);
}

.btn-success {
    background: var(--success);
    color: white;
}

.btn-danger {
    background: var(--danger);
    color: white;
}

.btn-sm {
    padding: 0.4rem 0.8rem;
    font-size: 0.85rem;
}

.btn-block {
    display: block;
    width: 100%;
}

/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0.6rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.badge-admin {
    background: rgba(59, 130, 246, 0.2);
    color: #93c5fd;
}

.badge-published {
    background: rgba(16, 185, 129, 0.2);
    color: #6ee7b7;
}

.badge-pending {
    background: rgba(245, 158, 11, 0.2);
    color: #fcd34d;
}

/* Tables */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

th,
td {
    padding: 1.2rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--glass-border);
}

th {
    font-size: 0.85rem;
    text-transform: uppercase;
    color: var(--text-muted);
}

/* Alerts */
.alert {
    padding: 1rem 1.5rem;
    border-radius: var(--radius-md);
    margin-bottom: 1.5rem;
}

.alert-danger {
    background: rgba(239, 68, 68, 0.1);
    border-left: 4px solid var(--danger);
}

.alert-success {
    background: rgba(16, 185, 129, 0.1);
    border-left: 4px solid var(--success);
}

/* Footer */
.footer {
    margin-top: auto;
    padding: 2rem 0;
    border-top: 1px solid var(--glass-border);
    background: var(--bg-darker);
    color: var(--text-muted);
}

/* Quill Editor Overrides */
.ql-toolbar.ql-snow {
    background: #1e293b;
    border-color: var(--glass-border) !important;
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
}

.ql-container.ql-snow {
    border-color: var(--glass-border) !important;
    border-bottom-left-radius: 8px;
    border-bottom-right-radius: 8px;
}

.ql-snow .ql-stroke {
    stroke: #cbd5e1 !important;
}

.ql-snow .ql-fill {
    fill: #cbd5e1 !important;
}

.ql-snow .ql-picker {
    color: #cbd5e1 !important;
}

.ql-snow.ql-toolbar button:hover,
.ql-snow .ql-toolbar button:hover .ql-stroke,
.ql-snow .ql-toolbar button.ql-active .ql-stroke {
    stroke: var(--primary) !important;
}

/* SortableJS Ghost Class */
.sortable-ghost {
    opacity: 0.4;
    background: var(--primary) !important;
}

.drag-handle:hover {
    color: #fff !important;
}