/* Wiki Page Styles - Fusion Media */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #0a0a0a;
    color: #ffffff;
    min-height: 100vh;
    position: relative;
    line-height: 1.6;
}

/* Animated background grid */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        linear-gradient(rgba(99, 102, 241, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(99, 102, 241, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    animation: gridMove 20s linear infinite;
    z-index: 0;
}

@keyframes gridMove {
    0% {
        transform: translate(0, 0);
    }

    100% {
        transform: translate(50px, 50px);
    }
}

body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 50% 50%, rgba(99, 102, 241, 0.08) 0%, transparent 50%);
    z-index: 0;
}

.wiki-container {
    position: relative;
    z-index: 1;
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 2rem;
    grid-template-areas:
        "header header"
        "content toc"
        "footer footer";
}

/* Header */
header {
    grid-area: header;
    text-align: center;
    margin-bottom: 1rem;
    padding: 2rem 0;
}

header h1 {
    font-size: 2.5rem;
    font-weight: 900;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.subtitle {
    font-size: 1.1rem;
    color: #a0a0a0;
    font-weight: 300;
}

/* Table of Contents - Sticky */
.wiki-toc {
    grid-area: toc;
    background: rgba(20, 20, 20, 0.6);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 1.5rem;
    position: sticky;
    top: 2rem;
    align-self: start;
    max-height: calc(100vh - 4rem);
    overflow-y: auto;
}

/* Custom scrollbar for TOC */
.wiki-toc::-webkit-scrollbar {
    width: 6px;
}

.wiki-toc::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
}

.wiki-toc::-webkit-scrollbar-thumb {
    background: rgba(102, 126, 234, 0.3);
    border-radius: 3px;
}

.wiki-toc::-webkit-scrollbar-thumb:hover {
    background: rgba(102, 126, 234, 0.5);
}

.wiki-toc h3 {
    color: #667eea;
    font-size: 1.2rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.wiki-toc ul {
    list-style: none;
}

.wiki-toc ul li {
    margin-bottom: 0.7rem;
}

.wiki-toc a {
    color: #a0a0a0;
    text-decoration: none;
    transition: all 0.2s ease;
    display: block;
    padding: 0.3rem 0;
    font-size: 0.95rem;
}

.wiki-toc a:hover {
    color: #667eea;
    padding-left: 0.5rem;
}

.wiki-toc a::before {
    content: '→';
    margin-right: 0.5rem;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.wiki-toc a:hover::before {
    opacity: 1;
}

/* Main Content */
.wiki-content {
    grid-area: content;
    background: rgba(20, 20, 20, 0.4);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 2.5rem;
}

.wiki-content section {
    margin-bottom: 3rem;
}

.wiki-content section:last-child {
    margin-bottom: 0;
}

.wiki-content h2 {
    font-size: 2rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid rgba(102, 126, 234, 0.3);
    scroll-margin-top: 2rem;
}

.wiki-content h3 {
    font-size: 1.4rem;
    font-weight: 600;
    color: #e0e0e0;
    margin-bottom: 0.75rem;
    margin-top: 1rem;
}

.wiki-content p {
    color: #c0c0c0;
    margin-bottom: 1rem;
    font-size: 1rem;
}

.wiki-content ul,
.wiki-content ol {
    margin-left: 2rem;
    margin-bottom: 1rem;
    color: #c0c0c0;
}

.wiki-content ul li,
.wiki-content ol li {
    margin-bottom: 0.5rem;
    padding-left: 0.5rem;
}

.wiki-content ol>li {
    margin-bottom: 1.5rem;
}

.wiki-content strong {
    color: #667eea;
    font-weight: 600;
}

.wiki-content code {
    background: rgba(102, 126, 234, 0.1);
    color: #f093fb;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
}

.wiki-content pre {
    background: rgba(10, 10, 10, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 1rem;
    overflow-x: auto;
    margin-bottom: 1rem;
}

.wiki-content pre code {
    background: none;
    padding: 0;
}

/* Footer */
footer {
    grid-area: footer;
    text-align: center;
    padding: 2rem 0;
    margin-top: 2rem;
}

footer a {
    display: inline-block;
    background: rgba(20, 20, 20, 0.6);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 0.8rem 1.5rem;
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

footer a:hover {
    background: rgba(30, 30, 30, 0.8);
    border-color: rgba(102, 126, 234, 0.5);
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.2);
}

footer a::before {
    content: '←';
    margin-right: 0.5rem;
}

/* Responsive */
@media (max-width: 1024px) {
    .wiki-container {
        grid-template-columns: 1fr;
        grid-template-areas:
            "header"
            "toc"
            "content"
            "footer";
    }

    .wiki-toc {
        position: relative;
        top: 0;
        max-height: none;
        margin-bottom: 2rem;
    }
}

@media (max-width: 768px) {
    .wiki-container {
        padding: 1.5rem;
    }

    header h1 {
        font-size: 2rem;
    }

    .subtitle {
        font-size: 1rem;
    }

    .wiki-content {
        padding: 1.5rem;
    }

    .wiki-content h2 {
        font-size: 1.6rem;
    }

    .wiki-content h3 {
        font-size: 1.2rem;
    }

    .wiki-content ul,
    .wiki-content ol {
        margin-left: 1.5rem;
    }
}

@media (max-width: 480px) {
    header h1 {
        font-size: 1.6rem;
    }

    .wiki-toc {
        padding: 1rem;
    }

    .wiki-content {
        padding: 1rem;
    }

    .wiki-content h2 {
        font-size: 1.4rem;
    }

    .wiki-content ul,
    .wiki-content ol {
        margin-left: 1rem;
    }
}

/* Styling for sub-links i TOC */
.sub-toc {
    margin-left: 1.5rem !important;
    margin-top: 0.5rem;
    font-size: 0.85rem;
}

.sub-toc li {
    margin-bottom: 0.4rem !important;
}

.sub-toc a::before {
    content: '○';
    /* En cirkel i stedet for en pil for underpunkter */
    font-size: 0.7rem;
}

img {
    max-width: 100%;
    border-radius: 8px;
    margin: 1rem 0;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}