/* Glassmorphism & Premium UI Enhancements */

:root {
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(255, 255, 255, 0.4);
    --glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.1);
    --glass-blur: 10px;
}

[data-theme="dark"] {
    --glass-bg: rgba(20, 20, 25, 0.85);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.5);
    --bg-color: #0a0a0c !important;
    --secondary-bg: #16161a !important;
    --text-color: #e0e0e0 !important;
    --border-color: #2a2a2a !important;
    --theme-color-light: #64b5f6;
    /* Brighter accent for dark mode */
}

/* Sidebar Glassmorphism */
.sidebar {
    background: var(--glass-bg) !important;
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border-right: 1px solid var(--glass-border) !important;
    box-shadow: var(--glass-shadow);
}

/* Navbar Glassmorphism (if applicable, though mostly sidebar in Docsify) */
.app-nav {
    background: transparent !important;
}

/* Main Content Area Enhancements */
.content {
    padding-top: 20px;
}

/* Custom Scrollbars */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

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

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

::-webkit-scrollbar-thumb:hover {
    background: var(--theme-color);
}

[data-theme="dark"] ::-webkit-scrollbar-thumb {
    background: #444;
}

[data-theme="dark"] ::-webkit-scrollbar-thumb:hover {
    background: var(--theme-color-light);
}

/* Smooth Fade-in Animation for Content */
.markdown-section {
    animation: fadeIn 0.6s ease-out;
}

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

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Blockquotes */
.markdown-section blockquote {
    border-left-width: 4px;
    border-left-color: var(--theme-color);
    background: var(--secondary-bg);
    border-radius: 0 8px 8px 0;
    padding: 1em 1.5em;
    margin: 1.5em 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

[data-theme="dark"] .markdown-section blockquote {
    background: rgba(255, 255, 255, 0.03);
    border-left-color: var(--theme-color-light);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

/* Tables */
.markdown-section table {
    display: table;
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    margin: 1.5em 0;
}

.markdown-section table th {
    background: var(--secondary-bg);
    color: var(--theme-color);
    font-weight: 600;
    padding: 12px 15px;
    border-bottom: 2px solid var(--border-color);
}

.markdown-section table td {
    padding: 12px 15px;
    border-bottom: 1px solid var(--border-color);
}

.markdown-section table tr:last-child td {
    border-bottom: none;
}

.markdown-section table tr:hover td {
    background: var(--hover-bg);
}

[data-theme="dark"] .markdown-section table th {
    background: rgba(255, 255, 255, 0.05);
    color: var(--theme-color-light);
    border-bottom: 1px solid var(--border-color);
}

[data-theme="dark"] .markdown-section table td {
    border-bottom: 1px solid var(--border-color);
}

[data-theme="dark"] .markdown-section table tr:hover td {
    background: rgba(255, 255, 255, 0.05);
}

/* Buttons */
.markdown-section a.btn {
    border-radius: 30px;
    /* More rounded */
    padding: 0.4em 1em;
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.markdown-section a.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* Links */
.markdown-section a {
    text-decoration: none;
    position: relative;
}

/* Subtle background pattern/gradient for body */
body {
    background-image:
        radial-gradient(circle at 10% 20%, rgba(var(--theme-color), 0.05) 0%, transparent 20%),
        radial-gradient(circle at 90% 80%, rgba(var(--theme-color-light), 0.05) 0%, transparent 20%);
    background-attachment: fixed;
}

/* Dark Mode Specific Enhancements */
[data-theme="dark"] body {
    background-image:
        radial-gradient(circle at 15% 25%, rgba(40, 50, 80, 0.2) 0%, transparent 25%),
        radial-gradient(circle at 85% 75%, rgba(60, 40, 60, 0.2) 0%, transparent 25%);
    background-color: #0a0a0c;
}

[data-theme="dark"] .markdown-section code {
    background: rgba(255, 255, 255, 0.05);
    color: #f0f0f0;
}