:root {
    --bg-color: #f8fafc;
    --text-color: #1e293b;
    --card-bg: #ffffff;
    --border-color: #e2e8f0;
    --accent-color: #3b82f6;
    --hover-bg: #f1f5f9;
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg-color: #0f172a;
        --text-color: #f1f5f9;
        --card-bg: #1e293b;
        --border-color: #334155;
        --accent-color: #60a5fa;
        --hover-bg: #334155;
    }
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.5;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.container {
    max-width: 900px;
    margin: 2rem auto;
    padding: 2rem;
    background: var(--card-bg);
    border-radius: 1rem;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--border-color);
}

header {
    text-align: center;
    margin-bottom: 2rem;
}

header img.logo {
    max-width: 250px;
    height: auto;
    margin-bottom: 1rem;
}

/* For automatic logo switching in dark mode */
.logo-light { display: none; }
.logo-dark { display: block; }

@media (prefers-color-scheme: dark) {
    .logo-dark { display: none; }
    .logo-light { display: block; }
}

h1 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-color);
}

/* Mod Autoindex Style */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

th, td {
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

th {
    font-weight: 600;
    color: var(--accent-color);
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
}

tr:hover td {
    background-color: var(--hover-bg);
}

a {
    color: var(--accent-color);
    text-decoration: none;
    font-weight: 500;
}

a:hover {
    text-decoration: underline;
}

.index-icon {
    width: 1.25rem;
    height: 1.25rem;
    margin-right: 0.5rem;
    vertical-align: middle;
}

/* Error Pages Specific */
.error-container {
    text-align: center;
    padding: 3rem 1rem;
}

.error-code {
    font-size: 8rem;
    font-weight: 900;
    color: var(--accent-color);
    opacity: 0.2;
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    z-index: 0;
    pointer-events: none;
}

.error-content {
    position: relative;
    z-index: 1;
}

.error-title {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.error-msg {
    color: var(--text-color);
    opacity: 0.8;
    max-width: 500px;
    margin: 0 auto 2rem;
}

.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background-color: var(--accent-color);
    color: white !important;
    border-radius: 0.5rem;
    font-weight: 600;
    transition: transform 0.2s;
}

.btn:hover {
    transform: translateY(-2px);
    text-decoration: none;
}

footer {
    margin-top: auto;
    padding: 2rem;
    text-align: center;
    font-size: 0.875rem;
    opacity: 0.6;
}
