
/* CSS Variables for theming */
:root {
    --primary-color: #3498db;
    --secondary-color: #2c3e50;
    --accent-color: #e74c3c;
    --success-color: #27ae60;
    --warning-color: #f39c12;
    --bg-color: #ffffff;
    --text-color: #333333;
    --border-color: #ddd;
    --shadow: 0 2px 10px rgba(0,0,0,0.1);
    --radius: 8px;
    --transition: all 0.3s ease;
}

/* Dark theme variables */
[data-theme="dark"] {
    --primary-color: #4a9ff5;
    --secondary-color: #34495e;
    --accent-color: #e74c3c;
    --success-color: #2ecc71;
    --warning-color: #f1c40f;
    --bg-color: #1a1a1a;
    --text-color: #ffffff;
    --border-color: #444;
    --shadow: 0 2px 10px rgba(0,0,0,0.3);
}

[data-theme="dark"] .page-title {
    background: linear-gradient(135deg, #4a9ff5, #e74c3c);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: transparent;
}

[data-theme="dark"] .collapsible-header {
    background: linear-gradient(135deg, #2c3e50, #34495e);
    color: white;
}

[data-theme="dark"] .collapsible-header:hover {
    background: linear-gradient(135deg, var(--primary-color), #3498db);
}

[data-theme="dark"] .info-box {
    background: linear-gradient(135deg, #2c3e50, #34495e);
    color: #4a9ff5;
}

[data-theme="dark"] .warning-box {
    background: linear-gradient(135deg, #2c3e50, #34495e);
    color: #f1c40f;
}

[data-theme="dark"] .toc-container {
    background: linear-gradient(135deg, #2c3e50, #34495e);
}

[data-theme="dark"] .search-results {
    background: var(--bg-color);
    color: var(--text-color);
}

[data-theme="dark"] .feedback-container {
    background: linear-gradient(135deg, #2c3e50, #34495e);
}

/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    height: 100%;
    width: 100%;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color);
    transition: var(--transition);
}

/* Header Styles */
.wiki-header {
    background: var(--secondary-color);
    color: white;
    padding: 0.4rem 0;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    box-shadow: var(--shadow);
}

.main-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.nav-brand h1 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.5rem;
}

.nav-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.theme-toggle, .search-toggle {
    background: none;
    border: none;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: var(--radius);
    transition: var(--transition);
}

.theme-toggle:hover, .search-toggle:hover {
    background: rgba(255,255,255,0.1);
}

.language-selector {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 0.5rem;
    border-radius: var(--radius);
    cursor: pointer;
}

/* Search Container - Hidden */
.search-container {
    display: none;
}

.search-container.active {
    opacity: 1;
    transform: translateY(0);
    visibility: visible;
    pointer-events: auto;
}

.search-input {
    width: 100%;
    padding: 1rem 1.5rem;
    border: 2px solid transparent;
    border-radius: 50px;
    font-size: 1rem;
    background: var(--bg-color);
    color: var(--text-color);
    box-shadow: var(--shadow);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    z-index: 1;
}

.search-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(52, 152, 219, 0.1), var(--shadow);
    transform: scale(1.02);
}

.search-input::placeholder {
    color: #999;
    transition: all 0.3s ease;
}

.search-input:focus::placeholder {
    color: transparent;
}

.search-results {
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin-top: 0.5rem;
    max-height: 0;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0;
    transform: translateY(-10px);
}

.search-results:not(:empty) {
    max-height: 300px;
    opacity: 1;
    transform: translateY(0);
    overflow-y: auto;
}

.search-results > div {
    transition: all 0.2s ease;
    border-bottom: 1px solid var(--border-color);
}

.search-results > div:hover {
    background: var(--primary-color) !important;
    color: white !important;
    transform: translateX(5px);
}

/* Sidebar Styles */
.sidebar {
    position: fixed;
    left: 0;
    top: 60px;
    width: 280px;
    height: calc(100vh - 60px);
    background: var(--bg-color);
    border-right: 1px solid var(--border-color);
    padding: 2rem;
    overflow-y: auto;
    z-index: 100;
    box-shadow: var(--shadow);
}

.sidebar-content h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.1rem;
}

.nav-menu {
    list-style: none;
    margin-bottom: 2rem;
}

.nav-menu li {
    margin-bottom: 0.5rem;
}

.nav-menu a {
    color: var(--text-color);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem;
    border-radius: var(--radius);
    transition: var(--transition);
    font-weight: 500;
}

.nav-menu a:hover {
    background: var(--primary-color);
    color: white;
    transform: translateX(5px);
}



/* Main Content */
.main-content {
    margin-left: 280px;
    margin-top: 80px;
    padding: 2rem;
    max-width: calc(100% - 280px);
}

/* Breadcrumb */
.breadcrumb {
    margin-bottom: 2rem;
    font-size: 0.9rem;
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    padding: 1rem;
    border-radius: var(--radius);
    border-left: 4px solid var(--primary-color);
    color: var(--text-color);
}

.breadcrumb a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

.breadcrumb a:hover {
    text-decoration: underline;
}

.separator {
    margin: 0 0.5rem;
    color: var(--border-color);
}

.current {
    color: var(--text-color);
    font-weight: 600;
}

/* Content Sections */
.content-section {
    background: var(--bg-color);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 3rem;
    margin-bottom: 2rem;
    border: 1px solid var(--border-color);
}

.page-title {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 2.8rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.page-description {
    font-size: 1.2rem;
    color: #666;
    margin-bottom: 3rem;
    line-height: 1.8;
}

.section {
    margin-bottom: 4rem;
}

.section h2 {
    color: var(--secondary-color);
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border-bottom: 3px solid var(--primary-color);
    padding-bottom: 1rem;
    font-size: 1.8rem;
    font-weight: 600;
}

/* Table of Contents */
.toc-container {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border-left: 5px solid var(--primary-color);
    padding: 2rem;
    margin: 3rem 0;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.toc-container h3 {
    margin-bottom: 1.5rem;
    color: var(--primary-color);
    font-size: 1.3rem;
    font-weight: 600;
}

.toc {
    list-style: none;
}

.toc li {
    margin-bottom: 0.8rem;
    padding-left: 1rem;
    position: relative;
}

.toc li:before {
    content: "▶";
    position: absolute;
    left: 0;
    color: var(--primary-color);
}

.toc a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
    font-weight: 500;
}

.toc a:hover {
    text-decoration: underline;
    color: var(--accent-color);
}

/* Collapsible Items - Verbesserte Animationen */
.collapsible-item {
    border: 2px solid var(--border-color);
    border-radius: var(--radius);
    margin-bottom: 1.5rem;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    background: var(--bg-color);
    position: relative;
}

.collapsible-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    transform: scaleX(0);
    transition: transform 0.3s ease;
    transform-origin: left;
}

.collapsible-item:hover {
    border-color: var(--primary-color);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    transform: translateY(-2px);
}

.collapsible-item:hover::before {
    transform: scaleX(1);
}

.collapsible-header {
    width: 100%;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border: none;
    padding: 1.5rem;
    text-align: left;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 1.2rem;
    font-weight: 600;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    color: var(--text-color);
    position: relative;
    overflow: hidden;
}

.collapsible-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.6s ease;
}

.collapsible-header:hover::before {
    left: 100%;
}

.collapsible-header:hover {
    background: linear-gradient(135deg, var(--primary-color), #2980b9);
    color: white;
    box-shadow: inset 0 0 20px rgba(255,255,255,0.1);
}

.collapsible-header.active {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: white;
    box-shadow: inset 0 0 20px rgba(255,255,255,0.2);
}

.collapse-icon {
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    font-size: 1rem;
    color: inherit;
}

.collapsible-header.active .collapse-icon {
    transform: rotate(90deg) scale(1.1);
    color: #fff;
}

.collapsible-content {
    padding: 0 2rem;
    max-height: 0;
    overflow: hidden;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    background: var(--bg-color);
    opacity: 0;
}

.collapsible-content.active {
    max-height: 2000px;
    padding: 2rem;
    opacity: 1;
}

.collapsible-content > * {
    transform: translateY(20px);
    opacity: 0;
    transition: all 0.3s ease;
    transition-delay: 0.1s;
}

.collapsible-content.active > * {
    transform: translateY(0);
    opacity: 1;
}

.collapsible-content h4 {
    color: var(--secondary-color);
    margin: 1.5rem 0 1rem 0;
    font-size: 1.1rem;
    font-weight: 600;
}

.collapsible-content ul, .collapsible-content ol {
    margin: 1rem 0;
    padding-left: 2rem;
}

.collapsible-content li {
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

/* Info Boxes */
.info-box, .warning-box {
    padding: 1.5rem;
    border-radius: var(--radius);
    margin: 2rem 0;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    box-shadow: var(--shadow);
}

.info-box {
    background: linear-gradient(135deg, #e3f2fd, #bbdefb);
    border-left: 5px solid var(--primary-color);
    color: #1976d2;
}

.warning-box {
    background: linear-gradient(135deg, #fff3e0, #ffcc02);
    border-left: 5px solid var(--warning-color);
    color: #f57c00;
}

.info-box i, .warning-box i {
    font-size: 1.2rem;
    margin-top: 0.2rem;
}

/* Feedback System */
.feedback-container {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    padding: 2.5rem;
    border-radius: var(--radius);
    text-align: center;
    margin: 3rem 0;
    box-shadow: var(--shadow);
}

.feedback-container p {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    font-weight: 500;
}

.feedback-buttons {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin: 2rem 0;
}

.feedback-btn {
    background: linear-gradient(135deg, var(--primary-color), #2980b9);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: var(--radius);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: var(--transition);
    font-weight: 600;
    font-size: 1rem;
}

.feedback-btn:hover {
    background: linear-gradient(135deg, var(--accent-color), #c0392b);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.2);
}

.feedback-btn.negative {
    background: linear-gradient(135deg, #95a5a6, #7f8c8d);
}

.feedback-form {
    margin-top: 2rem;
}

.feedback-form textarea {
    width: 100%;
    min-height: 120px;
    padding: 1.5rem;
    border: 2px solid var(--border-color);
    border-radius: var(--radius);
    resize: vertical;
    font-family: inherit;
    transition: var(--transition);
}

.feedback-form textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.feedback-form button {
    background: linear-gradient(135deg, var(--success-color), #229954);
    color: white;
    border: none;
    padding: 1rem 3rem;
    border-radius: var(--radius);
    cursor: pointer;
    margin-top: 1rem;
    font-weight: 600;
    transition: var(--transition);
}

.feedback-form button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.2);
}

/* Comments Section */
.comments-section {
    background: var(--bg-color);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 3rem;
    margin-bottom: 2rem;
    border: 1px solid var(--border-color);
}

.comments-section h3 {
    color: var(--primary-color);
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.5rem;
    font-weight: 600;
}

.comment-form textarea {
    width: 100%;
    min-height: 100px;
    padding: 1.5rem;
    border: 2px solid var(--border-color);
    border-radius: var(--radius);
    resize: vertical;
    margin-bottom: 1rem;
    font-family: inherit;
    transition: var(--transition);
}

.comment-form textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.comment-form button {
    background: linear-gradient(135deg, var(--primary-color), #2980b9);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: var(--radius);
    cursor: pointer;
    font-weight: 600;
    transition: var(--transition);
}

.comment-form button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.2);
}

.comment {
    border-bottom: 1px solid var(--border-color);
    padding: 2rem 0;
    transition: var(--transition);
}

.comment:hover {
    background: rgba(52, 152, 219, 0.05);
    padding: 2rem 1rem;
    border-radius: var(--radius);
}

.comment-author {
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 0.8rem;
    font-size: 1.1rem;
}

.comment-text {
    line-height: 1.7;
    margin-bottom: 1rem;
}

.comment-actions {
    margin-top: 1rem;
    display: flex;
    gap: 1.5rem;
}

.comment-actions button {
    background: none;
    border: none;
    color: var(--primary-color);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem;
    border-radius: var(--radius);
    transition: var(--transition);
    font-weight: 500;
}

.comment-actions button:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-1px);
}

/* Footer */
.wiki-footer {
    background: var(--secondary-color);
    color: white;
    margin-top: 4rem;
    margin-left: 280px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
    padding: 4rem 2rem;
}

.footer-section h4 {
    margin-bottom: 1.5rem;
    color: var(--primary-color);
    font-size: 1.2rem;
    font-weight: 600;
}

.footer-section ul {
    list-style: none;
}

.footer-section li {
    margin-bottom: 0.8rem;
}

.footer-section a {
    color: #bbb;
    text-decoration: none;
    transition: var(--transition);
    font-weight: 500;
}

.footer-section a:hover {
    color: white;
    text-decoration: underline;
}

.footer-bottom {
    text-align: center;
    padding: 2rem;
    border-top: 1px solid #444;
    background: #1a1a1a;
    font-weight: 500;
}

/* Mobile menu button */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: var(--radius);
    transition: var(--transition);
}

.mobile-menu-toggle:hover {
    background: rgba(255,255,255,0.1);
}

/* Sidebar overlay for mobile */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 99;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.sidebar-overlay.active {
    display: block;
    opacity: 1;
}

/* Ensure mobile content doesn't overlap */
@media (max-width: 968px) {
    body {
        overflow-x: hidden;
    }
}

/* Responsive Design */
@media (max-width: 968px) {
    .mobile-menu-toggle {
        display: block;
    }
    
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        width: 280px;
        z-index: 101;
    }
    
    .sidebar.active {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
        padding: 1.5rem;
        margin-top: 70px;
        width: 100%;
        max-width: 100%;
    }
    
    .wiki-footer {
        margin-left: 0;
    }
    
    .main-nav {
        padding: 0 1rem;
        justify-content: space-between;
    }
    
    .nav-brand h1 {
        font-size: 1.3rem;
    }
    
    .nav-controls {
        display: flex;
        align-items: center;
        gap: 0.5rem;
    }
    
    .feedback-buttons {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }
    
    .page-title {
        font-size: 2.2rem;
    }
    
    .collapsible-header {
        font-size: 1.1rem;
        padding: 1.2rem;
        flex-wrap: wrap;
        text-align: left;
    }
    
    .collapsible-content.active {
        padding: 1.5rem;
    }
    
    .content-section {
        padding: 2rem 1rem;
    }
    
    .toc-container {
        padding: 1.5rem;
        margin: 2rem 0;
    }
    
    .section h2 {
        font-size: 1.5rem;
        flex-wrap: wrap;
        text-align: center;
        justify-content: center;
    }
}

@media (max-width: 580px) {
    .page-title {
        font-size: 1.8rem;
        text-align: center;
    }
    
    .page-description {
        font-size: 1rem;
        text-align: center;
    }
    
    .nav-controls {
        gap: 0.3rem;
    }
    
    .nav-brand h1 {
        font-size: 1.1rem;
    }
    
    .content-section {
        padding: 1.5rem 0.8rem;
        margin-bottom: 1rem;
    }
    
    .collapsible-header {
        font-size: 1rem;
        padding: 1rem;
        flex-direction: row;
        text-align: left;
        gap: 0.8rem;
    }
    
    .collapsible-content.active {
        padding: 1rem;
    }
    
    .toc-container {
        padding: 1rem;
        margin: 1.5rem 0;
    }
    
    .toc-container h3 {
        font-size: 1.1rem;
        text-align: center;
    }
    
    .comments-section {
        padding: 1.5rem 0.8rem;
    }
    
    .main-content {
        padding: 1rem 0.5rem;
        margin-top: 65px;
    }
    
    .breadcrumb {
        margin-bottom: 1rem;
        padding: 0.8rem;
        font-size: 0.85rem;
        text-align: center;
    }
    
    .section {
        margin-bottom: 2rem;
    }
    
    .section h2 {
        font-size: 1.3rem;
        margin-bottom: 1.5rem;
        padding-bottom: 0.8rem;
    }
    
    .info-box, .warning-box, .success-box, .error-box {
        padding: 1rem;
        margin: 1.5rem 0;
        flex-direction: column;
        text-align: center;
        gap: 0.8rem;
    }
    
    .info-box i, .warning-box i, .success-box i, .error-box i {
        font-size: 1.5rem;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        padding: 2rem 1rem;
        text-align: center;
    }
    
    .wiki-header {
        padding: 0.3rem 0;
    }
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

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

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

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

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

.content-section, .comments-section {
    animation: fadeIn 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar {
    animation: slideInFromLeft 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.main-content {
    animation: slideInFromRight 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Hover-Animationen for Buttons */
.theme-toggle, .search-toggle, .language-selector {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.theme-toggle:hover, .search-toggle:hover {
    background: rgba(255,255,255,0.15);
    transform: scale(1.1);
    animation: pulse 1s infinite;
}

.language-selector:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

/* Navbar Brand Animation */
.nav-brand h1 {
    transition: all 0.3s ease;
}

.nav-brand h1:hover {
    animation: float 2s ease-in-out infinite;
    color: var(--primary-color);
}

/* TOC Animation */
.toc-container {
    animation: fadeIn 0.8s ease-out 0.2s both;
}

.toc li {
    animation: slideInFromLeft 0.5s ease-out calc(0.1s * var(--i));
}

/* Card Hover Effekte */
.collapsible-item a {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.collapsible-item a::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.6s ease;
}

.collapsible-item a:hover::before {
    left: 100%;
}

.collapsible-item a:hover {
    box-shadow: 0 6px 20px rgba(0,0,0,0.2);
    transform: translateY(-2px) scale(1.02);
}
.toc-container .collapsible-header {
    font-size: 1.2rem;
    background: transparent;
    border: none;
    padding: 0;
    margin-bottom: 1rem;
    cursor: pointer;
    color: var(--primary-color);
}

.toc-container .collapse-icon {
    margin-left: auto;
    transition: transform 0.3s ease;
}

.toc-container .collapsible-header.active .collapse-icon {
    transform: rotate(90deg);
}


/* Focus styles for accessibility */
button:focus, a:focus, input:focus, textarea:focus, select:focus {
    outline: 3px solid var(--primary-color);
    outline-offset: 2px;
}
