/* styles.css */
:root {
    --neon-green: #10b981;
    --neon-green-hover: #34d399;
    --danger-red: #ef4444;
    --danger-red-hover: #dc2626;
    --warning-gold: #fbbf24;
    --bg-dark: rgba(0, 0, 0, 0.4);
    --border-color: rgba(255, 255, 255, 0.1);
    --text-main: #f3f4f6;
    --text-muted: #9ca3af;
}

body {
    margin: 0;
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: linear-gradient(135deg, #050517, #062b2b);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    line-height: 1.5;
}

/* Header */
header {
    background: #000000;
    border-bottom: 1px solid var(--border-color);
    text-align: center;
    padding: 24px 20px;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
}

h1 { margin: 0; font-size: 2.25rem; font-weight: 800; color: var(--neon-green); letter-spacing: -0.025em; }
.subtitle { margin: 4px 0 0 0; font-size: 0.875rem; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; }

.top-right-logo { position: absolute; top: 10px; right: 10px; }
.top-right-logo img { width: 150px; height: auto; object-fit: contain; } /* Downsized slightly for better fit */

/* Main Container */
main { flex: 1; padding: 40px 20px; max-width: 800px; margin: 0 auto; width: 100%; box-sizing: border-box; }

/* Glass Panels */
.glass-panel {
    background: var(--bg-dark);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 32px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

a.glass-panel { cursor: pointer; display: block; text-decoration: none; }
a.glass-panel:hover { border-color: rgba(16, 185, 129, 0.3); transform: translateY(-2px); }

.glass-panel h2 { font-size: 1.5rem; font-weight: 700; margin-top: 0; margin-bottom: 24px; color: var(--text-main); border-bottom: 1px solid var(--border-color); padding-bottom: 12px; }
.glass-panel h3 { margin: 0 0 8px 0; font-size: 1.5rem; color: var(--neon-green); font-weight: 700; }
.glass-panel p { margin: 0 0 16px 0; color: var(--text-main); font-size: 1rem; }
.glass-panel small { color: var(--text-muted); font-size: 0.875rem; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

/* Buttons & Inputs */
.create-btn { background-color: var(--neon-green); color: #000; text-decoration: none; padding: 10px 24px; border-radius: 8px; font-weight: 700; display: inline-block; margin-top: 16px; transition: transform 0.1s, background-color 0.2s; font-size: 0.95rem; }
button { background-color: var(--neon-green); color: #000; border: none; padding: 14px 24px; border-radius: 8px; font-weight: 700; cursor: pointer; width: 100%; font-size: 1.05rem; transition: transform 0.1s, background-color 0.2s; }
button:hover, .create-btn:hover { background-color: var(--neon-green-hover); transform: translateY(-1px); }
button:active, .create-btn:active { transform: translateY(0); }

.form-group { margin-bottom: 20px; }
label { display: block; font-size: 0.875rem; font-weight: 600; margin-bottom: 8px; color: var(--text-muted); }
input, textarea { width: 100%; padding: 12px 16px; border-radius: 8px; border: 1px solid var(--border-color); background: rgba(255, 255, 255, 0.05); color: white; box-sizing: border-box; font-family: inherit; transition: all 0.2s ease; font-size: 1rem; }
input:focus, textarea:focus { outline: none; border-color: var(--neon-green); background: rgba(255, 255, 255, 0.1); box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2); }

/* Badges & Links */
.admin-badge { background: #fbbf24; color: #000; font-size: 0.7rem; padding: 2px 8px; border-radius: 9999px; font-weight: 700; text-transform: uppercase; white-space: nowrap; }
.empty-state { text-align: center; color: var(--text-muted); font-size: 1.1rem; margin-top: 40px; }
a.nav-link, a.cancel-link, a.back-link { color: var(--text-muted); text-decoration: none; font-weight: 600; display: inline-block; margin-top: 24px; transition: color 0.2s; }
a.nav-link:hover, a.cancel-link:hover, a.back-link:hover { color: var(--text-main); text-decoration: underline; }
a.back-link { margin-top: 0; margin-bottom: 20px; color: var(--neon-green); }

/* Admin Dashboard Elements */
.admin-card { background: rgba(255, 255, 255, 0.03); padding: 16px 20px; border-radius: 8px; margin-bottom: 12px; border: 1px solid var(--border-color); display: flex; justify-content: space-between; align-items: center; transition: background 0.2s; }
.admin-card:hover { background: rgba(255, 255, 255, 0.08); }
.admin-card .card-content h3 { margin: 0 0 4px 0; color: var(--neon-green); font-size: 1.1rem; }
.admin-card .card-content p { margin: 0; font-size: 0.875rem; color: var(--text-muted); }
.delete-btn { background-color: var(--danger-red); color: white; width: auto; padding: 8px 16px; border-radius: 6px; font-size: 0.875rem; }
.delete-btn:hover { background-color: var(--danger-red-hover); }
.admin-device-btn { background-color: var(--warning-gold); }

/* View Post & Comments Elements */
.post-title { margin-top: 0; font-size: 1.8rem; color: var(--neon-green); font-weight: 700; margin-bottom: 8px;}
.post-meta { font-size: 0.875rem; color: var(--text-muted); margin-bottom: 24px; display: flex; align-items: center; gap: 8px; }
.post-body { font-size: 1.125rem; white-space: pre-wrap; color: var(--text-main); }
.comment-card { padding: 16px; border-bottom: 1px solid var(--border-color); }
.comment-card:last-child { border-bottom: none; }
.comment-author { font-weight: 600; color: var(--neon-green); margin-bottom: 4px; display: flex; align-items: center; gap: 8px; }
.comment-body { margin: 0; color: var(--text-main); font-size: 0.95rem;}

/* =========================================
   Mobile Responsiveness
   ========================================= */
@media (max-width: 768px) {
    h1 { font-size: 1.75rem; }
    main { padding: 20px 15px; }
    .glass-panel { padding: 20px; }
    
    /* Adjust logo placement on mobile so it doesn't overlap text */
    .top-right-logo { position: relative; top: auto; right: auto; margin-top: 15px; }
    .top-right-logo img { width: 80px; }
    
    /* Make admin cards stack on tiny screens */
    .admin-card { flex-direction: column; align-items: flex-start; gap: 12px; }
    .delete-btn { width: 100%; }
}
