:root {
    --bg-primary: #0d0d0d;
    --bg-secondary: #1a1a1a;
    --bg-tertiary: #242424;
    --bg-card: #2a2a2a;
    --accent-primary: #d4af37;
    --accent-secondary: #c9a961;
    --accent-dark: #b8942c;
    --text-primary: #f5f5f5;
    --text-secondary: #b8b8b8;
    --text-muted: #808080;
    --border-color: rgba(212, 175, 55, 0.15);
    --border-subtle: rgba(255, 255, 255, 0.08);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.5);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.6);
    --shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.8);
}

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

body {
    font-family: 'Inter', 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-primary);
    min-height: 100vh;
    padding: 20px;
    color: var(--text-primary);
    line-height: 1.6;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    background: var(--bg-secondary);
    border-radius: 20px;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    border: 1px solid var(--border-subtle);
}

header {
    background: linear-gradient(135deg, #1a1a1a 0%, #242424 100%);
    border-bottom: 2px solid var(--accent-primary);
    color: white;
    padding: 28px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><defs><pattern id="grid" width="40" height="40" patternUnits="userSpaceOnUse"><path d="M 40 0 L 0 0 0 40" fill="none" stroke="rgba(212,175,55,0.03)" stroke-width="1"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
    opacity: 0.5;
}

header h1 {
    font-size: 2.2rem;
    margin-bottom: 6px;
    font-weight: 700;
    position: relative;
    letter-spacing: 0.02em;
    color: var(--accent-primary);
    text-shadow: 0 2px 10px rgba(212, 175, 55, 0.3);
}

.subtitle {
    font-size: 0.95rem;
    opacity: 0.9;
    position: relative;
    font-weight: 400;
}

.content-wrapper {
    display: flex;
    min-height: 600px;
}

.sidebar {
    width: 270px;
    background: var(--bg-tertiary);
    border-right: 1px solid var(--border-subtle);
    padding: 20px 16px;
}

.sidebar h2 {
    color: var(--text-primary);
    margin-bottom: 14px;
    font-size: 1.2rem;
    font-weight: 600;
}

.sidebar h3 {
    color: var(--accent-primary);
    margin-top: 20px;
    margin-bottom: 10px;
    font-size: 1.05rem;
    font-weight: 600;
}

.subject-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.subject-btn {
    padding: 10px 14px;
    border: 1px solid var(--border-subtle);
    background: var(--bg-secondary);
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.92rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: all 0.2s ease;
}

.subject-btn:hover {
    background: var(--bg-card);
    color: var(--accent-primary);
    border-color: var(--accent-primary);
}

.subject-btn.active {
    background: var(--bg-card);
    color: var(--accent-primary);
    border-color: var(--accent-primary);
    box-shadow: 0 0 15px rgba(212, 175, 55, 0.2);
}

.subject-btn:disabled {
    background: rgba(26, 26, 26, 0.5);
    color: var(--text-muted);
    border-color: var(--border-subtle);
    cursor: not-allowed;
    opacity: 0.5;
}

.subject-btn:disabled:hover {
    transform: none;
    background: rgba(26, 26, 26, 0.5);
    color: var(--text-muted);
    border-color: var(--border-subtle);
}

#textsortenButtons {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.textsorte-btn {
    padding: 9px 12px;
    border: 1px solid var(--border-subtle);
    background: var(--bg-secondary);
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.88rem;
    color: var(--text-secondary);
    text-align: left;
    transition: all 0.2s ease;
    border-left: 2px solid transparent;
}

.textsorte-btn:hover {
    background: var(--bg-card);
    color: var(--text-primary);
    border-left-color: var(--accent-primary);
}

.textsorte-btn.active {
    background: var(--bg-card);
    color: var(--accent-primary);
    border-left-color: var(--accent-primary);
    font-weight: 500;
}

.main-content {
    flex: 1;
    padding: 28px;
    overflow-y: auto;
    background: var(--bg-primary);
}

.welcome-message {
    text-align: center;
    padding: 50px 20px;
    color: var(--text-secondary);
}

.welcome-message h2 {
    font-size: 2rem;
    margin-bottom: 12px;
    color: var(--accent-primary);
    font-weight: 700;
}

.textsorte-detail {
    animation: fadeIn 0.4s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.detail-header {
    border-bottom: 1px solid var(--border-subtle);
    padding-bottom: 14px;
    margin-bottom: 24px;
    position: relative;
}

.detail-header::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100px;
    height: 2px;
    background: var(--accent-primary);
}

.detail-header h2 {
    color: var(--accent-primary);
    font-size: 1.8rem;
    margin-bottom: 8px;
    font-weight: 700;
    letter-spacing: 0.01em;
}

.detail-header .category {
    display: inline-block;
    background: rgba(212, 175, 55, 0.1);
    color: var(--accent-primary);
    padding: 4px 12px;
    border-radius: 16px;
    font-size: 0.85rem;
    font-weight: 500;
    border: 1px solid var(--border-color);
}

.info-section {
    margin-bottom: 20px;
    background: var(--bg-secondary);
    padding: 16px;
    border-radius: 10px;
    border: 1px solid var(--border-subtle);
    transition: all 0.2s ease;
}

.info-section:hover {
    border-color: var(--border-color);
}

.info-section h3 {
    color: var(--text-primary);
    font-size: 1.1rem;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
}

.info-section p {
    color: var(--text-secondary);
    line-height: 1.6;
    font-size: 0.92rem;
    margin-bottom: 10px;
}

.info-section ul {
    list-style: none;
    padding-left: 0;
}

.info-section ul li {
    padding: 9px 11px;
    margin-bottom: 6px;
    background: var(--bg-tertiary);
    border-left: 2px solid var(--accent-primary);
    border-radius: 5px;
    color: var(--text-secondary);
    transition: all 0.2s ease;
    font-size: 0.88rem;
    line-height: 1.5;
}

.info-section ul li:hover {
    background: var(--bg-card);
}

.info-section ul li strong {
    color: var(--accent-primary);
    font-weight: 600;
}

.highlight-box {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-left: 3px solid var(--accent-primary);
    padding: 16px;
    border-radius: 8px;
    margin: 16px 0;
}

.highlight-box h4 {
    color: var(--accent-primary);
    margin-bottom: 8px;
    font-weight: 600;
    font-size: 1rem;
}

.highlight-box p {
    color: var(--text-secondary);
    font-size: 0.92rem;
    line-height: 1.6;
}

.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.tag {
    background: var(--accent-primary);
    color: var(--bg-primary);
    padding: 4px 10px;
    border-radius: 14px;
    font-size: 0.82rem;
    font-weight: 500;
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent-dark);
}

/* Selection Styling */
::selection {
    background: var(--accent-dark);
    color: var(--text-primary);
}

/* Responsive Design */
@media (max-width: 968px) {
    .content-wrapper {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid var(--border-subtle);
    }

    .main-content {
        padding: 20px;
    }

    header h1 {
        font-size: 1.8rem;
    }
    
    .detail-header h2 {
        font-size: 1.5rem;
    }
    
    .info-section {
        padding: 14px;
    }
}
