:root {
    --bg-color: #ffffff;
    --text-color: #202122;
    --link-color: #3366cc;
    --header-bg: #eaecf0;
    --border-color: #a2a9b1;
    --infobox-bg: #f8f9fa;
    --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Lato, Helvetica, Arial, sans-serif;
}

/* Dark/Mystical Theme Variables (applied during seep) */
body.seeping-level-high {
    --bg-color: #0a0510;
    --text-color: #e0d5e5;
    --link-color: #b388ff;
    --header-bg: #1a1025;
    --border-color: #4a3060;
    --infobox-bg: #140a1f;
}

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

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-family);
    line-height: 1.6;
    transition: background-color 3s ease, color 3s ease;
    overflow-x: hidden;
}

/* Wikipedia Header */
.wiki-header {
    background-color: var(--bg-color);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    position: sticky;
    top: 0;
    z-index: 100;
    transition: background-color 3s ease, border-color 3s ease;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.hamburger {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.hamburger span {
    display: block;
    width: 20px;
    height: 2px;
    background-color: var(--text-color);
    transition: background-color 3s ease;
}

.wiki-logo {
    font-family: "Times New Roman", Times, serif;
    font-size: 18px;
    letter-spacing: 1px;
}

.search-icon {
    font-size: 18px;
    opacity: 0.7;
}

/* Content Area */
.wiki-content {
    padding: 16px;
    max-width: 800px;
    margin: 0 auto;
}

.hatnote {
    font-style: italic;
    color: #54595d;
    font-size: 0.9em;
    margin-bottom: 12px;
    transition: color 3s ease;
}

body.seeping-level-high .hatnote {
    color: #887;
}

.title {
    font-family: "Linux Libertine", "Georgia", "Times", serif;
    font-size: 28px;
    font-weight: normal;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 4px;
    margin-bottom: 12px;
    transition: border-color 3s ease;
}

.article-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    font-size: 0.9em;
}

.listen-btn {
    background: none;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 6px 12px;
    color: var(--text-color);
    font-family: inherit;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.3s;
}

.listen-btn:active {
    background-color: var(--header-bg);
}

a {
    color: var(--link-color);
    text-decoration: none;
    transition: color 3s ease;
}

/* Infobox */
.infobox {
    background-color: var(--infobox-bg);
    border: 1px solid var(--border-color);
    padding: 8px;
    margin-bottom: 16px;
    font-size: 0.9em;
    transition: all 3s ease;
}

.infobox-title {
    text-align: center;
    font-weight: bold;
    font-size: 1.1em;
    background-color: #c8b8e0;
    color: #000;
    padding: 4px;
    margin-bottom: 8px;
    transition: background-color 3s ease;
}

body.seeping-level-high .infobox-title {
    background-color: #3b2259;
    color: #fff;
}

.infobox-image {
    width: 100%;
    height: auto;
    display: block;
    margin-bottom: 4px;
}

.infobox-caption {
    font-size: 0.85em;
    text-align: center;
    margin-bottom: 8px;
}

.infobox-table {
    width: 100%;
    border-collapse: collapse;
}

.infobox-table th, .infobox-table td {
    text-align: left;
    vertical-align: top;
    padding: 4px;
    border-top: 1px solid var(--border-color);
}

.infobox-table th {
    width: 40%;
}

p {
    margin-bottom: 14px;
}

.section-title {
    font-family: "Linux Libertine", "Georgia", "Times", serif;
    font-size: 20px;
    font-weight: normal;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 4px;
    margin-top: 24px;
    margin-bottom: 12px;
}

.warning-box {
    background-color: #fcf4f4;
    border-left: 4px solid #d33;
    padding: 12px;
    margin-top: 24px;
    font-size: 0.9em;
    transition: all 3s ease;
}

body.seeping-level-high .warning-box {
    background-color: #2a0a0a;
    border-color: #ff3333;
}

/* Seeping Animations & Glitches */
.glitch-text {
    animation: text-flicker 0.1s infinite alternate;
    color: #d33;
    text-shadow: 2px 0 0 #0ff, -2px 0 0 #f0f;
}

@keyframes text-flicker {
    0% { opacity: 1; transform: skewX(0deg); }
    50% { opacity: 0.8; transform: skewX(10deg); }
    100% { opacity: 1; transform: skewX(-5deg); }
}

.mirage-active {
    filter: url(#mirage);
}

.spatial-distortion {
    display: inline-block;
    animation: float-letters 3s ease-in-out infinite alternate;
}

@keyframes float-letters {
    0% { transform: translateY(0) rotate(0deg); }
    100% { transform: translateY(-3px) rotate(2deg); letter-spacing: 2px; }
}

/* Footer */
.site-footer {
    max-width: 800px;
    margin: 40px auto 20px;
    padding: 20px 16px;
    border-top: 1px solid var(--border-color);
    font-size: 0.85em;
    text-align: center;
    color: #54595d;
    transition: all 3s ease;
}

body.seeping-level-high .site-footer {
    color: #887;
    border-color: var(--border-color);
}