:root {
    --bg-color: #ffffff;
    --text-color: #202122;
    --border-color: #a2a9b1;
    --accent-color: #00af89; /* Ovi's brand green */
    --accent-hover: #008f71;
    --sidebar-bg: #f8f9fa;
    --infobox-bg: #f8f9fa;
    --link-color: #0645ad;
    --header-height: 60px;
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1);
}

.dark-theme {
    --bg-color: #1a1a1a;
    --text-color: #e0e0e0;
    --border-color: #3c3c3c;
    --accent-color: #00af89;
    --sidebar-bg: #242424;
    --infobox-bg: #242424;
    --link-color: #6fb1ff;
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color);
    transition: background-color 0.3s, color 0.3s;
}

/* Header Styles */
.wiki-header {
    height: var(--header-height);
    background-color: var(--bg-color);
    border-bottom: 1px solid var(--border-color);
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
}

.header-container {
    max-width: 1400px;
    margin: 0 auto;
    height: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 12px;
}

.wiki-logo {
    font-family: 'Playfair Display', serif;
    font-size: 32px;
    font-weight: 700;
    background: var(--accent-color);
    color: white;
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
}

.wiki-title {
    display: flex;
    flex-direction: column;
}

.main-title {
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 1px;
}

.sub-title {
    font-size: 11px;
    color: var(--border-color);
    text-transform: uppercase;
}

.header-tools {
    display: flex;
    align-items: center;
    gap: 15px;
}

.tool-btn {
    background: none;
    border: none;
    color: var(--text-color);
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.tool-btn:hover {
    background: var(--sidebar-bg);
}

.subscribe-btn {
    background-color: var(--accent-color);
    color: white;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    transition: background 0.2s;
}

.subscribe-btn:hover {
    background-color: var(--accent-hover);
}

/* Layout */
.wiki-container {
    max-width: 1400px;
    margin: var(--header-height) auto 0;
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 40px;
    padding: 40px 20px;
}

/* Sidebar */
.sidebar-nav {
    border-right: 1px solid var(--border-color);
    padding-right: 20px;
}

.toc-sticky {
    position: sticky;
    top: calc(var(--header-height) + 20px);
}

.toc-sticky h3 {
    font-size: 14px;
    text-transform: uppercase;
    color: var(--border-color);
    margin-bottom: 15px;
    letter-spacing: 0.5px;
}

#toc-list {
    list-style: none;
}

#toc-list li {
    margin-bottom: 8px;
}

#toc-list a {
    text-decoration: none;
    color: var(--text-color);
    font-size: 14px;
    transition: color 0.2s;
    display: block;
    padding: 4px 0;
}

#toc-list a:hover {
    color: var(--accent-color);
    padding-left: 5px;
}

/* Content */
.wiki-content {
    max-width: 900px;
}

.content-header {
    margin-bottom: 25px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 10px;
}

#page-title {
    font-family: 'Playfair Display', serif;
    font-size: 42px;
    color: var(--text-color);
    margin-bottom: 5px;
    text-transform: uppercase;
}

.wiki-badge {
    font-size: 13px;
    color: var(--accent-color);
    background: rgba(0, 175, 137, 0.1);
    display: inline-block;
    padding: 2px 10px;
    border-radius: 100px;
    font-weight: 500;
}

/* Infobox */
.infobox-wrapper {
    float: right;
    margin: 0 0 20px 25px;
    width: 300px;
}

.infobox {
    background-color: var(--infobox-bg);
    border: 1px solid var(--border-color);
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    box-shadow: var(--shadow-sm);
}

.infobox-title {
    background-color: var(--accent-color);
    color: white;
    padding: 10px;
    font-weight: 700;
    font-size: 16px;
    text-align: center;
}

.infobox-image {
    padding: 10px;
    text-align: center;
}

.infobox-image img {
    max-width: 100%;
    height: auto;
    border: 1px solid var(--border-color);
}

.image-caption {
    font-size: 11px;
    margin-top: 5px;
    color: var(--border-color);
}

.infobox th {
    text-align: left;
    padding: 8px 12px;
    border-top: 1px solid var(--border-color);
    background: rgba(0,0,0,0.02);
    width: 35%;
}

.infobox td {
    padding: 8px 12px;
    border-top: 1px solid var(--border-color);
}

/* Main Content Styles */
section {
    margin-bottom: 30px;
}

p {
    margin-bottom: 15px;
    font-size: 16px;
    text-align: justify;
}

strong {
    font-weight: 600;
}

.section-title {
    font-size: 24px;
    border-bottom: 1px solid var(--border-color);
    margin: 40px 0 20px;
    padding-bottom: 5px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-title::before {
    content: '';
    width: 4px;
    height: 24px;
    background: var(--accent-color);
    display: inline-block;
}

/* References */
#references-list {
    margin-left: 25px;
    font-size: 14px;
}

#references-list li {
    margin-bottom: 8px;
}

sup a {
    text-decoration: none;
    font-size: 11px;
    font-weight: 600;
    color: var(--accent-color);
    margin: 0 2px;
}

/* Footer */
.wiki-footer {
    border-top: 1px solid var(--border-color);
    margin-top: 60px;
    padding: 40px 0;
    background: var(--sidebar-bg);
}

.footer-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    font-size: 12px;
    color: var(--border-color);
}

@media (max-width: 900px) {
    .wiki-container {
        grid-template-columns: 1fr;
    }
    .sidebar-nav {
        display: none;
    }
    .infobox-wrapper {
        float: none;
        width: 100%;
        margin-left: 0;
    }
}
