:root {
    --bg: #050505;
    --panel: #0a0f0a;
    --green: #00ff41;
    --cyan: #00f3ff;
    --red: #ff0055;
    --text: #e0e0e0;
    --border: rgba(0, 255, 65, 0.3);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    background: var(--bg);
    color: var(--text);
    font-family: 'JetBrains Mono', monospace;
    line-height: 1.6;
    padding-bottom: 2rem;
}

/* Header Scanline */
.scan-line {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 2px;
    background: var(--green);
    opacity: 0.3;
    animation: scan 3s linear infinite;
    pointer-events: none;
    z-index: 999;
}
@keyframes scan { 0% { top: 0%; } 100% { top: 100%; } }

/* Nav */
.cyber-nav {
    background: rgba(0,0,0,0.95);
    border-bottom: 1px solid var(--green);
    padding: 1rem;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-brand { color: var(--green); font-weight: bold; font-size: 1.1rem; }
.nav-links { display: flex; gap: 1rem; margin-top: 0.5rem; }
.nav-links a { color: var(--text); text-decoration: none; font-size: 0.8rem; transition: 0.3s; }
.nav-links a:hover, .login-link:hover { color: var(--cyan); text-shadow: 0 0 5px var(--cyan); }

/* Layout */
.container { max-width: 800px; margin: 2rem auto; padding: 0 1rem; }
.glitch-header { margin-bottom: 2rem; color: #fff; text-shadow: 2px 0 var(--red); }

/* Post Cards */
.intel-card {
    background: var(--panel);
    border: 1px solid var(--border);
    margin-bottom: 2rem;
    padding: 1.5rem;
    position: relative;
    border-left: 3px solid var(--green);
    box-shadow: 0 0 10px rgba(0,0,0,0.5);
}

.intel-header {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: var(--cyan);
    margin-bottom: 1rem;
    border-bottom: 1px solid #222;
    padding-bottom: 0.5rem;
}

.intel-title { color: #fff; margin-bottom: 1rem; text-transform: uppercase; font-size: 1.3rem; }
.intel-body { color: #ccc; white-space: pre-wrap; font-size: 0.95rem; }

/* Admin Panel */
.admin-panel {
    background: #111;
    padding: 1.5rem;
    border: 1px dashed var(--green);
    margin-bottom: 3rem;
}
.admin-panel h3 { color: var(--green); margin-bottom: 1rem; }

input, textarea {
    width: 100%;
    background: #000;
    border: 1px solid #333;
    color: var(--green);
    padding: 12px;
    font-family: inherit;
    margin-bottom: 1rem;
    font-size: 1rem;
}
input:focus, textarea:focus { border-color: var(--green); outline: none; box-shadow: 0 0 10px rgba(0,255,65,0.1); }

button {
    background: var(--green);
    color: #000;
    border: none;
    padding: 12px;
    font-weight: bold;
    cursor: pointer;
    font-family: inherit;
    text-transform: uppercase;
    transition: 0.3s;
}
button:hover { background: var(--cyan); box-shadow: 0 0 15px var(--cyan); }

/* Post Management List */
.posts-list { display: flex; flex-direction: column; gap: 0.5rem; }
.post-row {
    background: #111;
    border: 1px solid #222;
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.post-info { display: flex; flex-direction: column; }
.post-title { font-weight: bold; color: #fff; }
.date { font-size: 0.8rem; color: #666; }

.actions { display: flex; gap: 10px; }
.btn-edit {
    background: #333; color: white; padding: 5px 15px; text-decoration: none; font-size: 0.8rem;
    display: flex; align-items: center;
}
.btn-delete { background: var(--red); color: white; width: auto; padding: 5px 15px; font-size: 0.8rem; }
.btn-cancel {
    display: block; text-align: center; margin-top: 10px; color: #888; text-decoration: none; font-size: 0.9rem;
}
.edit-actions { display: flex; gap: 1rem; flex-direction: column; }

/* Login Page */
.login-body { height: 100vh; display: flex; align-items: center; justify-content: center; }
.login-box {
    width: 100%; max-width: 350px; padding: 2rem;
    border: 1px solid var(--green);
    background: rgba(0,20,0,0.9);
    box-shadow: 0 0 20px rgba(0,255,65,0.2);
    text-align: center;
}
.login-box h2 { color: var(--green); margin-bottom: 1.5rem; }
.error { color: var(--red); font-size: 0.8rem; margin-bottom: 1rem; border: 1px solid var(--red); padding: 5px; }
.back-link { margin-top: 1rem; }
.back-link a { color: #666; text-decoration: none; font-size: 0.8rem; }

/* Mobile Adjustments */
@media (max-width: 600px) {
    .nav-brand { width: 100%; text-align: center; margin-bottom: 0.5rem; }
    .nav-links { width: 100%; justify-content: center; }
    .post-row { flex-direction: column; align-items: flex-start; gap: 1rem; }
    .actions { width: 100%; justify-content: space-between; }
    .btn-edit, .btn-delete { flex: 1; text-align: center; justify-content: center; }
}