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

:root {
    /* Medienzentrum Gießen-Vogelsberg Farbpalette */
    --primary-color: #E30613;     /* MZ Rot */
    --primary-dark: #B8050F;      /* Dunkleres Rot */
    --secondary-color: #67747A;   /* MZ Grau */
    --accent-color: #4A5459;      /* Dunkles Grau */
    --accent-dark: #3A4044;       /* Noch dunkleres Grau */
    --success-color: #51b047;     /* Grün */
    --warning-color: #ef7e26;     /* Orange */
    --danger-color: #E30613;      /* Rot */
    
    /* Neutrals */
    --bg-color: #F9FAFB;
    --bg-secondary: #F3F4F6;
    --text-color: #1F2937;
    --text-secondary: #6B7280;
    --code-bg: #F3F4F6;
    --border-color: #E5E7EB;
    --sidebar-bg: #FFFFFF;
    --hover-color: #F3F4F6;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    
    /* Glassmorphism */
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(255, 255, 255, 0.18);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background: linear-gradient(135deg, #E30613 0%, #67747A 50%, #4A5459 100%);
    background-attachment: fixed;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Glassmorphism Background Overlay */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(227, 6, 19, 0.05) 0%, rgba(103, 116, 122, 0.05) 50%, rgba(74, 84, 89, 0.05) 100%);
    pointer-events: none;
    z-index: -1;
}

/* Header mit Glassmorphism */
header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    padding: 1.5rem 0;
    box-shadow: var(--shadow-md);
    position: sticky;
    top: 0;
    z-index: 100;
    animation: slideDown 0.5s ease-out;
}

@keyframes slideDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.header-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.logo {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: white;
    padding: 8px;
    box-shadow: var(--shadow-lg);
    transition: transform 0.3s ease;
}

.logo:hover {
    transform: scale(1.05) rotate(5deg);
}

header h1 {
    font-size: 2rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

header p {
    font-size: 1rem;
    color: var(--text-secondary);
    font-weight: 500;
}

/* Layout */
.container {
    display: grid;
    grid-template-columns: 300px 1fr;
    max-width: 1400px;
    margin: 2rem auto;
    padding: 0 2rem;
    gap: 2rem;
    min-height: calc(100vh - 200px);
}

/* Sidebar mit Glassmorphism */
.sidebar {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 1.5rem;
    border-radius: 16px;
    border: 1px solid var(--glass-border);
    box-shadow: var(--shadow-xl);
    max-height: calc(100vh - 7rem);
    overflow-y: auto;
    position: sticky;
    top: 6rem;
    animation: fadeInLeft 0.6s ease-out;
    scrollbar-width: thin;
    scrollbar-color: rgba(227, 6, 19, 0.3) transparent;
}

.sidebar::-webkit-scrollbar {
    width: 8px;
}

.sidebar::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar::-webkit-scrollbar-thumb {
    background: rgba(227, 6, 19, 0.3);
    border-radius: 4px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
    background: rgba(227, 6, 19, 0.5);
}

@keyframes fadeInLeft {
    from {
        transform: translateX(-30px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.sidebar h2 {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--border-color);
}

.nav-section {
    margin-bottom: 1.5rem;
}

.nav-section h3 {
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.5rem;
    margin-top: 1rem;
}

.sidebar ul {
    list-style: none;
}

.sidebar ul li {
    margin: 0.25rem 0;
}

.sidebar ul li a {
    color: var(--text-color);
    text-decoration: none;
    display: block;
    padding: 0.6rem 1rem;
    border-radius: 8px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 0.95rem;
    font-weight: 500;
}

.sidebar ul li a:hover {
    background: var(--hover-color);
    color: var(--primary-color);
    transform: translateX(8px);
    box-shadow: var(--shadow-sm);
}

.sidebar ul li a.active {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    font-weight: 600;
    box-shadow: var(--shadow-md);
}

/* Main Content mit Glassmorphism */
.main-content {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 3rem;
    border-radius: 16px;
    border: 1px solid var(--glass-border);
    box-shadow: var(--shadow-xl);
    animation: fadeInUp 0.6s ease-out;
}

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

.main-content h1 {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 3px solid transparent;
    border-image: linear-gradient(90deg, var(--primary-color), var(--secondary-color)) 1;
}

.main-content h2 {
    color: var(--text-color);
    font-size: 2rem;
    font-weight: 700;
    margin-top: 3rem;
    margin-bottom: 1rem;
    position: relative;
    padding-left: 1rem;
}

.main-content h2::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 70%;
    background: linear-gradient(180deg, var(--primary-color), var(--secondary-color));
    border-radius: 2px;
}

.main-content h3 {
    color: var(--primary-color);
    font-size: 1.5rem;
    font-weight: 600;
    margin-top: 2rem;
    margin-bottom: 0.8rem;
}

.main-content h4 {
    color: var(--text-color);
    font-size: 1.2rem;
    font-weight: 600;
    margin-top: 1.5rem;
    margin-bottom: 0.6rem;
}

.main-content p {
    margin: 1rem 0;
    line-height: 1.8;
    color: var(--text-color);
}

.main-content img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    margin: 1.5rem 0;
    box-shadow: var(--shadow-xl);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.main-content img:hover {
    transform: scale(1.02);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

/* Code Blocks mit modernem Design */
.main-content pre {
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(10px);
    border-left: 4px solid var(--primary-color);
    border-radius: 12px;
    padding: 1.5rem;
    overflow-x: auto;
    margin: 1.5rem 0;
    box-shadow: var(--shadow-lg);
}

.main-content code {
    background: var(--code-bg);
    padding: 0.2rem 0.5rem;
    border-radius: 6px;
    font-family: 'JetBrains Mono', 'Courier New', monospace;
    font-size: 0.875em;
    color: var(--secondary-color);
    font-weight: 500;
}

.main-content pre code {
    background: transparent;
    padding: 0;
    color: #E5E7EB;
}

/* Blockquotes */
.main-content blockquote {
    border-left: 4px solid var(--accent-color);
    background: linear-gradient(90deg, rgba(245, 158, 11, 0.1), transparent);
    padding: 1.5rem;
    margin: 1.5rem 0;
    border-radius: 8px;
    font-style: italic;
}

.main-content blockquote p {
    margin: 0.5rem 0;
    color: var(--text-secondary);
}

/* Lists */
.main-content ul,
.main-content ol {
    margin: 1rem 0 1rem 2rem;
}

.main-content li {
    margin: 0.5rem 0;
    line-height: 1.8;
}

/* Links mit Animation */
.main-content a {
    color: var(--primary-color);
    text-decoration: none;
    position: relative;
    font-weight: 500;
    transition: color 0.2s ease;
}

.main-content a::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -2px;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    transition: width 0.3s ease;
}

.main-content a:hover {
    color: var(--secondary-color);
}

.main-content a:hover::after {
    width: 100%;
}

/* Info Boxes mit Glassmorphism */
.info-box, .tip-box, .warning-box {
    backdrop-filter: blur(10px);
    padding: 1.25rem 1.5rem;
    margin: 1.5rem 0;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: var(--shadow-md);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.info-box:hover, .tip-box:hover, .warning-box:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.info-box {
    background: linear-gradient(135deg, rgba(227, 6, 19, 0.08), rgba(227, 6, 19, 0.04));
    border-left: 4px solid var(--primary-color);
}

.tip-box {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1), rgba(110, 231, 183, 0.1));
    border-left: 4px solid var(--success-color);
}

.warning-box {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.1), rgba(251, 191, 36, 0.1));
    border-left: 4px solid var(--warning-color);
}

/* Footer */
footer {
    background: rgba(31, 41, 55, 0.95);
    backdrop-filter: blur(10px);
    color: white;
    text-align: center;
    padding: 2rem;
    margin-top: 4rem;
    border-radius: 16px 16px 0 0;
    box-shadow: var(--shadow-xl);
}

footer p {
    opacity: 0.9;
}

/* Search Box mit modernem Design */
.search-box {
    margin-bottom: 1.5rem;
}

.search-box input {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    font-size: 0.95rem;
    font-family: 'Inter', sans-serif;
    transition: all 0.2s ease;
    background: rgba(255, 255, 255, 0.8);
}

.search-box input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(14, 165, 233, 0.1);
    background: white;
}

.search-box input::placeholder {
    color: var(--text-secondary);
}

/* Back to Top Button mit Micro-Animation */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    box-shadow: var(--shadow-xl);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0;
    pointer-events: none;
    font-size: 1.5rem;
    font-weight: 700;
}

.back-to-top.visible {
    opacity: 1;
    pointer-events: auto;
    animation: bounceIn 0.5s ease;
}

@keyframes bounceIn {
    0% {
        transform: scale(0);
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
    }
}

.back-to-top:hover {
    transform: translateY(-4px) scale(1.05);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

/* Responsive Design */
@media (max-width: 968px) {
    .container {
        grid-template-columns: 1fr;
    }
    
    .sidebar {
        position: static;
        top: 0;
    }
    
    header h1 {
        font-size: 1.75rem;
    }
    
    .main-content {
        padding: 2rem;
    }
}

@media (max-width: 576px) {
    .header-content {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    
    .logo {
        width: 60px;
        height: 60px;
    }
    
    header h1 {
        font-size: 1.5rem;
    }
    
    .main-content h1 {
        font-size: 2rem;
    }
    
    .main-content {
        padding: 1.5rem;
    }
}

/* Scroll Reveal Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.6s ease-out;
}

/* Loading Animation für bessere UX */
@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

.loading {
    animation: shimmer 2s infinite;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 1000px 100%;
}
