/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-green: #00ff41;
    --dark-green: #00cc33;
    --bright-green: #00ff88;
    --bg-black: #040806;
    --bg-dark: #07110d;
    --bg-darker: #050c09;
    --text-light: #e0e0e0;
    --text-muted: #7f8a84;
    --border-color: #0f1b15;
    --hover-bg: #0f1d17;
}

body {
    font-family: 'Georgia', 'Times New Roman', serif;
    background-color: var(--bg-dark);
    color: var(--primary-green);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Zalgo text styling */
.zalgo-text {
    font-family: 'Georgia', 'Times New Roman', serif;
    letter-spacing: 0.05em;
    line-height: 1.4;
}

/* Header */
.header {
    background-color: var(--bg-darker);
    background-image: url("/image.png");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    border-bottom: 2px solid var(--primary-green);
    padding: 3rem 0;
    min-height: 320px;
    display: flex;
    align-items: center;
    box-shadow: 0 0 20px rgba(0, 255, 65, 0.3);
}

.header--compact {
    min-height: 12vh;
    padding: 1.5rem 0;
    background-position: center 30%;
}

.header--compact .header-content {
    padding: 1rem 2rem;
}

.header--compact .site-title {
    font-size: 1.8rem;
}

.header--compact .site-subtitle {
    font-size: 0.8rem;
}

.header-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    background: linear-gradient(
        90deg,
        rgba(4, 8, 6, 0.85) 0%,
        rgba(4, 8, 6, 0.6) 50%,
        rgba(4, 8, 6, 0.85) 100%
    );
    border: 1px solid rgba(0, 255, 65, 0.15);
    padding: 1.5rem 2rem;
}

.logo-section {
    flex: 1;
    text-align: center;
}

.main-logo {
    max-width: 200px;
    height: auto;
    margin-bottom: 1rem;
    filter: drop-shadow(0 0 10px var(--primary-green));
    display: none;
}

.site-title {
    font-size: 2.5rem;
    color: var(--primary-green);
    text-shadow: 0 0 15px var(--primary-green);
    margin-bottom: 0.5rem;
    font-weight: bold;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    font-family: 'Georgia', 'Times New Roman', serif;
}

.site-subtitle {
    color: var(--text-muted);
    font-size: 0.9rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.header-decoration {
    flex-shrink: 0;
}

.decoration-icon {
    width: 60px;
    height: 60px;
    filter: drop-shadow(0 0 8px var(--primary-green));
    opacity: 0.8;
}

/* Container Layout */
.container {
    display: flex;
    flex: 1;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
    padding: 2rem;
    gap: 2rem;
}

/* Sidebar */
.sidebar {
    width: 280px;
    flex-shrink: 0;
    background: var(--bg-dark);
    border: 1px solid var(--border-color);
    padding: 1.5rem;
    height: fit-content;
    position: sticky;
    top: 2rem;
}

.search-box {
    position: relative;
    margin-bottom: 2rem;
}

#search-input {
    width: 100%;
    padding: 0.75rem;
    background: var(--bg-black);
    border: 1px solid var(--primary-green);
    color: var(--primary-green);
    font-family: inherit;
    font-size: 0.9rem;
    border-radius: 0;
    outline: none;
    transition: all 0.3s;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

#search-input:focus {
    box-shadow: 0 0 10px rgba(0, 255, 65, 0.5);
    border-color: var(--bright-green);
}

#search-input::placeholder {
    color: var(--text-muted);
}

.search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-dark);
    border: 1px solid var(--border-color);
    border-top: none;
    max-height: 300px;
    overflow-y: auto;
    display: none;
    z-index: 100;
}

.search-results.active {
    display: block;
}

.search-result-item {
    padding: 0.75rem;
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
    transition: background 0.2s;
    color: var(--text-light);
    text-transform: uppercase;
    font-size: 0.85rem;
}

.search-result-item:hover {
    background: var(--hover-bg);
    color: var(--primary-green);
}

.nav-section {
    margin-top: 2rem;
}

.nav-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-color);
}

.nav-icon {
    width: 24px;
    height: 24px;
    filter: drop-shadow(0 0 4px var(--primary-green));
    opacity: 0.7;
}

.nav-menu {
    list-style: none;
}

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

.nav-link {
    display: block;
    padding: 0.75rem;
    color: var(--text-light);
    text-decoration: none;
    transition: all 0.2s;
    border-left: 3px solid transparent;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.05em;
}

.nav-link:hover {
    background: var(--hover-bg);
    color: var(--primary-green);
    border-left-color: var(--primary-green);
    padding-left: 1rem;
    text-shadow: 0 0 5px var(--primary-green);
}

.nav-link.active {
    background: var(--hover-bg);
    color: var(--primary-green);
    border-left-color: var(--primary-green);
    font-weight: bold;
    box-shadow: inset 0 0 10px rgba(0, 255, 65, 0.2);
}

/* Main Content */
.main-content {
    flex: 1;
    background: var(--bg-dark);
    border: 1px solid var(--border-color);
    padding: 2rem;
    min-height: 600px;
}

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

.breadcrumbs {
    color: var(--text-muted);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.breadcrumb-item {
    color: var(--primary-green);
}

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

/* Wiki Article */
.wiki-article {
    color: var(--text-light);
}

.wiki-article h1 {
    color: var(--primary-green);
    font-size: 2rem;
    margin-bottom: 1rem;
    text-shadow: 0 0 10px rgba(0, 255, 65, 0.3);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    border-left: 4px solid var(--primary-green);
    padding-left: 1rem;
}

.wiki-article h2 {
    color: var(--primary-green);
    font-size: 1.5rem;
    margin-top: 2rem;
    margin-bottom: 1rem;
    border-bottom: 2px solid var(--primary-green);
    padding-bottom: 0.5rem;
    text-shadow: 0 0 5px var(--primary-green);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.wiki-article h3 {
    color: var(--primary-green);
    font-size: 1.2rem;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.wiki-article p {
    margin-bottom: 1rem;
    line-height: 1.8;
}

.wiki-article ul, .wiki-article ol {
    margin-left: 2rem;
    margin-bottom: 1rem;
}

.wiki-article li {
    margin-bottom: 0.5rem;
}

.wiki-article a {
    color: var(--primary-green);
    text-decoration: none;
    border-bottom: 1px dotted var(--primary-green);
}

.wiki-article a:hover {
    border-bottom: 1px solid var(--primary-green);
    text-shadow: 0 0 5px var(--primary-green);
}

.wiki-article code {
    background: var(--bg-black);
    padding: 0.2rem 0.4rem;
    border-radius: 3px;
    font-family: 'Courier New', 'Consolas', monospace;
    color: var(--primary-green);
    border: 1px solid var(--border-color);
}

.wiki-article pre {
    background: var(--bg-black);
    padding: 1rem;
    border-radius: 4px;
    overflow-x: auto;
    border: 1px solid var(--border-color);
    margin-bottom: 1rem;
    font-family: 'Courier New', 'Consolas', monospace;
}

.wiki-article pre code {
    background: none;
    border: none;
    padding: 0;
}

/* Framed insert boxes */
.infohazard-warning,
.info-box {
    position: relative;
    background-color: var(--bg-black);
    border: 2px solid var(--primary-green);
    padding: 1.75rem;
    margin: 2rem 0;
    box-shadow: 0 0 20px rgba(0, 255, 65, 0.25),
                inset 0 0 18px rgba(0, 255, 65, 0.12);
    background-image:
        radial-gradient(circle at 18px 18px, rgba(0, 255, 65, 0.35) 0 2px, transparent 3px),
        radial-gradient(circle at calc(100% - 18px) 18px, rgba(0, 255, 65, 0.35) 0 2px, transparent 3px),
        radial-gradient(circle at 18px calc(100% - 18px), rgba(0, 255, 65, 0.35) 0 2px, transparent 3px),
        radial-gradient(circle at calc(100% - 18px) calc(100% - 18px), rgba(0, 255, 65, 0.35) 0 2px, transparent 3px),
        linear-gradient(90deg, rgba(0, 255, 65, 0.12) 0 2px, transparent 2px 100%),
        linear-gradient(0deg, rgba(0, 255, 65, 0.12) 0 2px, transparent 2px 100%);
    background-repeat: no-repeat;
}

.infohazard-warning::before,
.info-box::before {
    content: "";
    position: absolute;
    inset: 10px;
    border: 1px solid rgba(0, 255, 65, 0.4);
    pointer-events: none;
}

/* Infohazard Warning */
.infohazard-warning {
    animation: warning-pulse 3s ease-in-out infinite;
}

.warning-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--primary-green);
    font-weight: bold;
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--primary-green);
    text-shadow: 0 0 10px var(--primary-green);
}

.warning-icon {
    width: 32px;
    height: 32px;
    filter: drop-shadow(0 0 8px var(--primary-green));
}

.warning-content {
    color: var(--text-light);
}

.warning-content strong {
    color: var(--primary-green);
    text-shadow: 0 0 5px var(--primary-green);
}

@keyframes warning-pulse {
    0%, 100% {
        box-shadow: 0 0 30px rgba(0, 255, 65, 0.4),
                    inset 0 0 30px rgba(0, 255, 65, 0.1);
    }
    50% {
        box-shadow: 0 0 50px rgba(0, 255, 65, 0.7),
                    inset 0 0 50px rgba(0, 255, 65, 0.3);
    }
}

.info-box h2 {
    margin-top: 0;
    border-bottom: none;
    padding-bottom: 0;
}

/* Feature Carousel */
.feature-carousel-container {
    margin: 2rem 0;
    position: relative;
}

.feature-carousel {
    display: flex;
    overflow: hidden;
    gap: 1.5rem;
    scroll-behavior: smooth;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    position: relative;
}

.feature-card {
    flex: 0 0 100%;
    background: var(--bg-black);
    border: 1px solid var(--border-color);
    padding: 1.5rem;
    text-align: center;
    transition: all 0.3s;
    position: relative;
    scroll-snap-align: start;
    min-height: 280px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.feature-card-link {
    display: block;
    text-decoration: none;
    color: inherit;
    width: 100%;
    height: 100%;
}

.feature-card-link:hover {
    text-decoration: none;
}

.feature-card:hover {
    border-color: var(--primary-green);
    box-shadow: 0 0 20px rgba(0, 255, 65, 0.4);
    transform: translateY(-2px);
}

.feature-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 1rem;
    filter: drop-shadow(0 0 8px var(--primary-green));
    opacity: 0.9;
}

.feature-card h3 {
    margin-top: 0;
    font-size: 1.1rem;
    color: var(--primary-green);
}

.feature-card p {
    color: var(--text-muted);
    margin-bottom: 0;
    font-size: 0.9rem;
}

.carousel-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-top: 1.5rem;
}

.carousel-btn {
    background: var(--bg-black);
    border: 1px solid var(--primary-green);
    color: var(--primary-green);
    width: 40px;
    height: 40px;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    font-family: inherit;
}

.carousel-btn:hover {
    background: var(--primary-green);
    color: var(--bg-black);
    box-shadow: 0 0 10px rgba(0, 255, 65, 0.5);
}

.carousel-btn:active {
    transform: scale(0.95);
}

.carousel-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.carousel-btn:disabled:hover {
    background: var(--bg-black);
    color: var(--primary-green);
    box-shadow: none;
}

.carousel-indicators {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.carousel-indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--border-color);
    border: 1px solid var(--primary-green);
    cursor: pointer;
    transition: all 0.3s;
    padding: 0;
    margin: 0;
}

.carousel-indicator.active {
    background: var(--primary-green);
    box-shadow: 0 0 8px rgba(0, 255, 65, 0.6);
}

/* Responsive: Show multiple cards on larger screens */
@media (min-width: 768px) {
    .feature-card {
        flex: 0 0 calc(50% - 0.75rem);
    }
}

@media (min-width: 1024px) {
    .feature-card {
        flex: 0 0 calc(33.333% - 1rem);
    }
}

@media (min-width: 1400px) {
    .feature-card {
        flex: 0 0 calc(25% - 1.125rem);
    }
}

/* Article List */
.recent-articles {
    margin-top: 3rem;
}

.article-list {
    list-style: none;
    margin-left: 0;
}

.article-list li {
    padding: 1rem;
    background: var(--bg-black);
    border: 1px solid var(--border-color);
    margin-bottom: 0.75rem;
    transition: all 0.2s;
}

.article-list li:hover {
    border-color: var(--primary-green);
    background: var(--hover-bg);
    box-shadow: 0 0 15px rgba(0, 255, 65, 0.3);
}

.article-list a {
    color: var(--primary-green);
    text-decoration: none;
    font-weight: bold;
    border-bottom: none;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 0.95rem;
}

.article-list a:hover {
    text-shadow: 0 0 5px var(--primary-green);
}

/* Category and Metadata */
.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
    margin-top: 1.5rem;
}

.category-card {
    display: block;
    padding: 1.25rem;
    background: var(--bg-black);
    border: 1px solid var(--border-color);
    text-decoration: none;
    color: var(--text-light);
    transition: all 0.2s;
}

.category-card:hover {
    border-color: var(--primary-green);
    background: var(--hover-bg);
    box-shadow: 0 0 12px rgba(0, 255, 65, 0.25);
}

.category-card h3 {
    margin-bottom: 0.5rem;
    color: var(--primary-green);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 1rem;
}

.category-count {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.article-meta {
    margin-top: 0.5rem;
    color: var(--text-muted);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.tag-list {
    margin-top: 0.5rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tag {
    padding: 0.2rem 0.5rem;
    border: 1px solid var(--border-color);
    background: var(--bg-darker);
    color: var(--text-muted);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.empty-state {
    padding: 1.5rem;
    border: 1px solid var(--border-color);
    background: var(--bg-black);
    color: var(--text-muted);
}

.search-result-item small {
    display: block;
    color: var(--text-muted);
    margin-top: 0.25rem;
    font-size: 0.75rem;
}

/* Pagination */
.pagination {
    margin-top: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 0.85rem;
}

.pagination-link {
    color: var(--primary-green);
    text-decoration: none;
    border: 1px solid var(--border-color);
    background: var(--bg-black);
    padding: 0.4rem 0.8rem;
    transition: all 0.2s;
}

.pagination-link:hover {
    border-color: var(--primary-green);
    background: var(--hover-bg);
    box-shadow: 0 0 10px rgba(0, 255, 65, 0.2);
}

.pagination-current {
    color: var(--text-muted);
}

/* Footer */
.footer {
    background: var(--bg-darker);
    border-top: 1px solid var(--border-color);
    padding: 2rem;
    text-align: center;
    color: var(--text-muted);
    margin-top: auto;
}

.footer-content p {
    margin-bottom: 0.5rem;
}

.footer-quote {
    margin-top: 1rem;
    font-size: 0.9rem;
    color: var(--text-muted);
    font-style: italic;
}

/* Responsive Design */
@media (max-width: 968px) {
    .container {
        flex-direction: column;
        padding: 1rem;
    }

    .sidebar {
        width: 100%;
        position: static;
    }

    .header-content {
        flex-direction: column;
        gap: 1rem;
    }

    .site-title {
        font-size: 2rem;
    }

    .feature-grid {
        grid-template-columns: 1fr;
    }
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg-black);
}

::-webkit-scrollbar-thumb {
    background: var(--primary-green);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--bright-green);
}
