@import url('https://fonts.googleapis.com/css2?family=Cutive+Mono&display=swap');

:root {
    --color-bg: #eeeeee;
    --color-fg: #000000;
    --color-muted: #333333;
    --color-border: #000000;
}

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

body {
    font-family: 'Cutive Mono', monospace;
    background-color: var(--color-bg);
    color: var(--color-fg);
}

.page {
    max-width: 2000px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

@media (min-width: 2000px) {
    .page {
        border-left: 1px solid var(--color-border);
        border-right: 1px solid var(--color-border);
    }
}

.hero-bg {
    position: fixed;
    top: 0;
    height: min(100vh, 800px);
    left: max(0px, calc((100vw - 2000px) / 2));
    right: max(0px, calc((100vw - 2000px) / 2));
    background-image: url(./centurion_charge.png), url(./castle.png);
    background-repeat: no-repeat;
    background-size: 600px auto, auto min(800px, 100%);
    background-position: left bottom, right bottom;
    pointer-events: none;
    z-index: 0;
    border-bottom: 1px solid var(--color-border);
}

.container {
    max-width: 70rem;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
header {
    background-color: var(--color-bg);
    border-bottom: 3px solid var(--color-border);
    padding: 1rem 0;
    position: relative;
    z-index: 2;
}

main {
    margin: 0 auto;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: 'Cinzel', serif;
    font-size: 2rem;
    font-weight: 700;
    color: var(--color-fg);
    text-decoration: none;
}

.nav-buttons {
    display: flex;
    gap: 2rem;
    margin-left: auto;
}

.nav-buttons a {
    color: var(--color-fg);
    text-decoration: none;
    font-size: 1rem;
    transition: color 0.3s;
}

.nav-buttons a:hover {
    color: var(--color-muted);
}

.nav-toggle {
    display: none;
}

.nav-hamburger {
    display: none;
    cursor: pointer;
    font-size: 1.5rem;
    user-select: none;
}

.btn {
    padding: 0.75rem 1.5rem;
    border: 2px solid var(--color-border);
    background-color: transparent;
    color: var(--color-fg);
    text-decoration: none;
    font-family: 'Cutive Mono', monospace;
    font-size: 0.9rem;
    transition: all 0.3s;
    cursor: pointer;
}

.btn:hover {
    background-color: var(--color-fg);
    color: var(--color-bg);
}

.btn-primary {
    background-color: var(--color-fg);
    color: var(--color-bg);
}

.btn-primary:hover {
    background-color: transparent;
    color: var(--color-fg);
}

/* Hero Section */
.hero {
    padding: 1rem 0;
}

.hero-layout {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
}

.hero-left {
    flex: 0 0 60%;
    min-width: 0;
}

.hero-content {
	max-width: 800px;
	margin: auto;
    margin-bottom: 1rem;
}

.hero-text {
    flex: 1;
    border: 3px solid var(--color-border);
    padding: 1rem;
    background-color: var(--color-bg);
    text-align: center;
}

.hero-features {
    width: 100%;
    margin-top: 1rem;
}

.hero-subtitle {
    font-family: 'Cinzel', serif;
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--color-fg);
}

.hero-description {
    font-size: 1.1rem;
    max-width: 800px;
    margin: 0 auto 1rem auto;
    color: var(--color-fg);
}

/* Server Info */
.server-info {
    background-color: var(--color-bg);
    padding: 1rem 0;
    margin: 1rem 0;
}

.server-stats {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

/* Additional styles for inline styles that were in HTML */
.hero-features-container {
    display: flex;
    gap: 1rem;
}

.hero-features-column {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.meteor-timer {
    font-family: 'Cinzel', serif;
    font-weight: 600;
    font-size: 2rem;
    width: fit-content;
    margin: 0 auto;
    padding-top: 0.5rem;
}

a.highlight,
span.highlight {
    font-weight: 700;
    color: crimson;
}

.stat {
    text-align: center;
}

.stat-value {
    font-family: 'Cinzel', serif;
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--color-fg);
}

.stat-label {
    font-size: 0.9rem;
    color: var(--color-muted);
    margin-top: 0.5rem;
}

/* Features Grid */
.feature-card {
    background-color: var(--color-bg);
    border: 3px solid var(--color-border);
    padding: 1rem;
    display: flex;
    flex-direction: column;
}

.feature-title {
    font-family: 'Cinzel', serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-fg);
    margin-bottom: 0.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--color-border);
}

.feature-description {
    font-size: 1rem;
    color: var(--color-fg);
    margin-top: 0;
}

/* Sidebar */
.sidebar {
    flex: 0 0 calc(40% - 2rem);
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.player-news,
.live-map {
    border: 3px solid var(--color-border);
    background-color: var(--color-bg);
    padding: 1.5rem;
}

.player-news-title {
    font-family: 'Cinzel', serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-fg);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--color-border);
}

.player-news-body {
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--color-fg);
}

/* News Post Fragments (injected via HTMX) */
.news-post {
    border: 2px solid var(--color-border);
    padding: 1rem;
    margin-bottom: 1rem;
}

.news-post:last-child {
    margin-bottom: 0;
}

.news-post-title {
    font-family: 'Cinzel', serif;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--color-fg);
    margin-bottom: 0.25rem;
    padding-bottom: 0.25rem;
    border-bottom: 1px solid var(--color-border);
}

.news-post-meta {
    font-size: 0.8rem;
    color: var(--color-muted);
    margin-bottom: 0.5rem;
}

.news-post-author {
    color: crimson;
}

.news-post-image {
    display: block;
    max-width: 100%;
    border: 2px solid var(--color-border);
    margin-bottom: 0.75rem;
}

.news-post-body {
    margin-bottom: 0.5rem;
}

.news-post-footnote {
    font-size: 0.8rem;
    color: var(--color-muted);
    border-top: 1px solid var(--color-border);
    padding-top: 0.5rem;
}

.news-empty {
    text-align: center;
    color: var(--color-muted);
}

/* Changelogs */
.changelog-header {
    text-align: center;
    margin-bottom: 2rem;
}

.changelog-list {
    max-width: 50rem;
    margin: 0 auto;
}

.changelog-entry {
    border: 3px solid var(--color-border);
    background-color: var(--color-bg);
    padding: 1.25rem;
    margin-bottom: 1rem;
}

.changelog-date {
    font-size: 0.85rem;
    color: var(--color-muted);
    margin-bottom: 0.25rem;
}

.changelog-title {
    font-family: 'Cinzel', serif;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--color-fg);
    margin-bottom: 0.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--color-border);
}

.changelog-archive-link {
    display: block;
    text-align: center;
    margin-top: 1.5rem;
    font-size: 1rem;
    color: crimson;
    text-decoration: none;
}

.changelog-archive-link:hover {
    text-decoration: underline;
}

.changelog-entry > ul {
    margin-left: 1rem;
}

/* Responsive Design */
@media (max-width: 999px) {
    .hero-bg {
        display: none;
    }

    .nav-buttons {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        right: 0;
        background-color: var(--color-bg);
        border: 3px solid var(--color-border);
        padding: 1rem;
        gap: 0.75rem;
        z-index: 10;
    }

    .nav-toggle:checked ~ .nav-buttons {
        display: flex;
    }

    .nav-hamburger {
        display: block;
    }

    nav {
        position: relative;
    }

    .hero-subtitle {
        font-size: 1.2rem;
    }

    .server-stats {
        gap: 1.5rem;
    }

    .hero-content {
        flex-direction: column;
    }

    .hero-text {
        text-align: center;
    }

    .hero-layout {
        flex-direction: column;
    }

    .hero-left {
        flex: 1 1 auto;
    }

    .sidebar {
        flex: 1 1 auto;
    }

    .player-news,
    .live-map {
        width: 100%;
    }

    .hero-features-container {
        flex-direction: column;
    }
}
