/* Base paper background */
body {
    background: #fdf6e3;
    font-family: 'Fira Mono', 'Courier New', Courier, monospace;
    color: #222;
    margin: 10;
    padding: 10;
    min-height: 100vh;
}

/* Subtle grid overlay */
body::before {
    content: "";
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    pointer-events: none;
    background-image:
        linear-gradient(to right, #e0e0e0 1px, transparent 1px),
        linear-gradient(to bottom, #e0e0e0 1px, transparent 1px);
    background-size: 24px 24px;
    opacity: 0.3;
    z-index: 0;
}

/* Centered container */
.container {
    max-width: 600px;
    margin: 40px auto;
    background: rgba(255,255,255,0.95);
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.03);
    padding: 32px 24px;
    z-index: 1;
    position: relative;
}

/* Headings */
h1, h2, h3 {
    font-family: inherit;
    font-weight: 600;
    border-bottom: 1px solid #e0e0e0;
    padding-bottom: 4px;
    margin-bottom: 16px;
    letter-spacing: 0.5px;
}

/* Form styling */
form {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 24px;
}

input[type="file"] {
    border: 1px solid #b0b0b0;
    background: #f8f8f8;
    padding: 8px;
    border-radius: 4px;
    font-family: inherit;
}

button {
    background: #b5c9c3;
    color: #222;
    border: none;
    border-radius: 4px;
    padding: 10px 0;
    font-size: 1rem;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.2s;
    box-shadow: 0 1px 2px rgba(0,0,0,0.03);
}

button:hover {
    background: #a3b8b0;
}

/* Error message */
.error {
    color: #b22222;
    background: #fff0f0;
    border: 1px solid #f5c2c2;
    padding: 8px 12px;
    border-radius: 4px;
    margin-bottom: 16px;
    font-size: 0.95em;
}

/* Stats grid */
.stats-container {
    margin: 30px 0;
    padding: 20px;
    background: #f8f8f8;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 12px;
    margin-top: 10px;
}

.stat-card {
    background: #fff;
    padding: 10px;
    border-radius: 6px;
    text-align: center;
    border: 1px solid #e0e0e0;
    font-size: 0.95em;
}

.stat-card h3 {
    margin: 0;
    font-size: 1.5em;
    color: #2c3e50;
    font-family: inherit;
}

.stat-card p {
    margin: 4px 0 0 0;
    color: #7f8c8d;
    font-size: 0.9em;
}

/* Responsive */
@media (max-width: 700px) {
    .container {
        padding: 16px 4vw;
    }
}