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

body {
    background-image: url('/static/bg.jpg');
    background-repeat: repeat;
    color: #ccc;
    font-family: "Trebuchet MS", Trebuchet, sans-serif;
    font-size: 14px;
    line-height: 1.6;
}

a {
    color: #bdc9ee;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    background-color: #000;
    min-height: 100vh;
}

.topnav {
    margin-top: 15px;
}

.topnav a {
    display: inline-block;
    color: #808080;
    background: #111;
    border: 1px solid #333;
    padding: 4px 16px;
    font-size: 0.9em;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-right: 10px;
}

.topnav a:hover {
    color: #ccc;
    border-color: #555;
    text-decoration: none;
}

.topnav a.active {
    color: #bdc9ee;
    border-color: #bdc9ee;
    text-decoration: none;
}

header {
    border-bottom: 1px dotted #333;
    padding-bottom: 20px;
    margin-bottom: 20px;
    text-align: center;
}

header h1 {
    font-size: 2.5em;
    font-style: italic;
    font-weight: bold;
    letter-spacing: 2px;
    text-transform: uppercase;
}

header h1 a {
    color: #ccc;
}

header h1 a:hover {
    text-decoration: none;
    color: #bdc9ee;
}

.content {
    display: flex;
    gap: 40px;
}

.posts {
    flex: 1;
    min-width: 0;
}

.post {
    border-bottom: 1px dotted #333;
    padding-bottom: 20px;
    margin-bottom: 20px;
}

.post-date {
    color: #808080;
    font-size: 0.85em;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 5px;
}

.post-title {
    font-size: 1.3em;
    font-weight: normal;
    margin-bottom: 10px;
}

.post-title a {
    color: #bdc9ee;
}

.post-content {
    color: #999;
    line-height: 1.7;
}

.back-link {
    margin-top: 20px;
}

.sidebar {
    width: 200px;
    flex-shrink: 0;
}

.sidebar-section {
    border-bottom: 1px dotted #333;
    padding-bottom: 15px;
    margin-bottom: 15px;
}

.sidebar-section h3 {
    color: #808080;
    font-size: 0.85em;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 10px;
}

.sidebar-section p {
    color: #999;
    font-size: 0.9em;
}

.sidebar-section ul {
    list-style: none;
}

.sidebar-section ul li {
    font-size: 0.9em;
    margin-bottom: 5px;
}

footer {
    border-top: 1px dotted #333;
    padding-top: 20px;
    margin-top: 20px;
    text-align: center;
    color: #666;
    font-size: 0.85em;
}

/* Home page */
.home-content {
    flex: 1;
    text-align: center;
}

.tagline {
    font-size: 1.2em;
    color: #808080;
    letter-spacing: 3px;
    margin-bottom: 10px;
}

.description {
    color: #999;
    margin-bottom: 30px;
}

.home-nav a {
    display: inline-block;
    margin-right: 20px;
    font-size: 0.9em;
    letter-spacing: 2px;
}

/* Admin */
.admin-label {
    color: #808080;
    font-size: 0.85em;
    letter-spacing: 2px;
    margin-top: 5px;
}

.admin-content {
    flex: 1;
}

.admin-actions {
    margin-bottom: 30px;
}

.btn {
    display: inline-block;
    background: #333;
    color: #ccc;
    padding: 8px 16px;
    border: 1px solid #555;
    font-family: inherit;
    font-size: 0.85em;
    letter-spacing: 1px;
    cursor: pointer;
    text-decoration: none;
    margin-right: 10px;
}

.btn:hover {
    background: #444;
    text-decoration: none;
}

.btn-secondary {
    background: transparent;
    border-color: #333;
}

.btn-link {
    background: none;
    border: none;
    color: #bdc9ee;
    cursor: pointer;
    font-family: inherit;
    font-size: inherit;
    padding: 0;
}

.btn-link:hover {
    text-decoration: underline;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.admin-table th,
.admin-table td {
    text-align: left;
    padding: 10px;
    border-bottom: 1px dotted #333;
}

.admin-table th {
    color: #808080;
    font-size: 0.85em;
    letter-spacing: 1px;
}

.admin-table .actions a,
.admin-table .actions button {
    margin-right: 10px;
}

/* Forms */
.admin-form,
.login-form {
    max-width: 500px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    color: #808080;
    font-size: 0.85em;
    letter-spacing: 1px;
    margin-bottom: 5px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    background: #111;
    border: 1px solid #333;
    color: #ccc;
    padding: 10px;
    font-family: inherit;
    font-size: inherit;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #555;
}

.form-actions {
    margin-top: 20px;
}

/* Login */
.login-content {
    max-width: 300px;
    margin: 0 auto;
}

.login-content h2 {
    margin-bottom: 20px;
    color: #808080;
    font-size: 1em;
    letter-spacing: 2px;
}

.error-message {
    background: #331111;
    border: 1px solid #663333;
    color: #cc6666;
    padding: 10px;
    margin-bottom: 20px;
    font-size: 0.9em;
}

@media (max-width: 600px) {
    .content {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
    }
}
