/* 
   GHOST STATION - Bespoke Bludit Theme for HTX-82
   Direct Tactical Port from Station UI
*/

:root {
    --bg-dark: #0f172a;
    --glass-bg: rgba(30, 41, 59, 0.7);
    --glass-border: rgba(255, 255, 255, 0.1);
    --accent: #38bdf8;
    --accent-hover: #0ea5e9;
    --accent-glow: rgba(56, 189, 248, 0.3);
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --danger: #ef4444;
    --success: #10b981;
}

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

body {
    background: var(--bg-dark);
    color: var(--text-primary);
    font-family: 'Rajdhani', sans-serif;
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
    line-height: 1.6;
}

/* Background Atmospheric Pulse */
.background-glow {
    position: fixed;
    top: -50%; left: -50%;
    width: 200vw; height: 200vh;
    background: radial-gradient(circle at center, var(--accent-glow) 0%, var(--bg-dark) 40%);
    animation: atmospheric-pulse 10s infinite alternate ease-in-out;
    z-index: -1;
}

@keyframes atmospheric-pulse {
    0% { transform: scale(1); opacity: 0.6; }
    100% { transform: scale(1.1); opacity: 1; }
}

/* The Glass Container Wrapper */
.glass-wrap {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 2.5rem;
    width: 95%;
    max-width: 900px;
    margin: 4rem auto;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
}

header {
    text-align: center;
    border-bottom: 1px solid var(--glass-border);
    padding-bottom: 2rem;
}

header h1 a {
    font-family: 'Tektur', sans-serif;
    font-weight: 400;
    font-size: 2.2rem;
    letter-spacing: 4px;
    color: var(--text-primary);
    text-transform: uppercase;
    text-decoration: none;
}

header h1 span {
    color: var(--accent);
    text-shadow: 0 0 15px rgba(56, 189, 248, 0.5);
}

.site-slogan {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-top: 0.5rem;
    font-weight: 300;
    letter-spacing: 1px;
    text-transform: uppercase;
}

/* Navigation */
nav {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    font-family: 'Space Mono', monospace;
    font-size: 0.8rem;
}

nav a {
    color: var(--text-secondary);
    text-decoration: none;
    text-transform: uppercase;
    transition: color 0.3s ease;
}

nav a:hover { color: var(--accent); }

/* Post / Page Layout */
.post {
    background: rgba(15, 23, 42, 0.4);
    border-radius: 12px;
    padding: 2rem;
    border: 1px solid var(--glass-border);
    margin-bottom: 2rem;
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.post:hover {
    border-color: var(--accent-glow);
    transform: translateY(-2px);
}

.post-title {
    font-family: 'Tektur', sans-serif;
    font-size: 1.4rem;
    color: var(--accent);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
}

.post-title a { color: inherit; text-decoration: none; }

.post-meta {
    font-size: 0.7rem;
    color: var(--text-secondary);
    font-family: 'Space Mono', monospace;
    margin-bottom: 1.5rem;
    opacity: 0.8;
}

.post-content {
    color: var(--text-primary);
}

/* Cipher Block Styling (Auto-applied to pre/code) */
pre, code, .cipher-block {
    font-family: 'Space Mono', monospace;
    font-size: 0.9rem;
    background: rgba(0, 0, 0, 0.5) !important;
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    color: var(--accent);
    text-shadow: 0 0 8px var(--accent-glow);
    overflow-x: auto;
    display: block;
    margin: 1.5rem 0;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: space-between;
    margin-top: 2rem;
    font-family: 'Space Mono', monospace;
    font-size: 0.8rem;
}

/* Global Link Sanitization */
a {
    color: var(--accent);
    text-decoration: none;
    transition: all 0.3s ease;
}

a:hover {
    color: var(--accent-hover);
    text-shadow: 0 0 10px var(--accent-glow);
}

.post-content a {
    border-bottom: 1px dotted var(--accent);
    padding-bottom: 1px;
}

.post-content a:hover {
    border-bottom-style: solid;
    background: rgba(56, 189, 248, 0.05);
}

.pagination a {
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--glass-border) !important;
    padding: 0.75rem 1.25rem;
    color: var(--text-primary) !important;
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.pagination a:hover {
    background: var(--accent) !important;
    color: var(--bg-dark) !important;
}

footer {
    text-align: center;
    font-size: 0.7rem;
    color: var(--text-secondary);
    opacity: 0.6;
    margin-top: 2rem;
    border-top: 1px solid var(--glass-border);
    padding-top: 1rem;
    font-family: 'Space Mono', monospace;
}

/* Main Layout Grid */
.main-grid {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 2.5rem;
    align-items: start;
}

/* Sidebar Styling */
.sidebar {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.sidebar-block {
    background: rgba(15, 23, 42, 0.4);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 1.5rem;
}

.sidebar-title {
    font-family: 'Space Mono', monospace;
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-bottom: 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    letter-spacing: 1px;
}

.archive-list {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.archive-item {
    list-style-type: none !important;
    padding: 0.75rem;
    border-left: 2px solid transparent;
    transition: all 0.3s ease;
    background: rgba(255,255,255,0.02);
    border-radius: 4px;
}

.archive-item a {
    text-decoration: none !important;
    display: block;
    color: inherit !important;
}

.archive-item:hover {
    background: rgba(56, 189, 248, 0.05);
    border-left-color: var(--accent);
}

.archive-id {
    font-family: 'Tektur', sans-serif;
    font-size: 0.85rem;
    color: var(--accent) !important;
    text-transform: uppercase;
}

.active-log {
    background: rgba(56, 189, 248, 0.1);
    border-left-color: var(--accent);
}

.archive-date {
    font-family: 'Space Mono', monospace;
    font-size: 0.6rem;
    color: var(--text-secondary) !important;
    margin-top: 0.25rem;
}

.sidebar-footer {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--glass-border);
    font-family: 'Space Mono', monospace;
    font-size: 0.6rem;
    color: var(--text-secondary);
    opacity: 0.5;
}

/* Custom Scrollbars */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: rgba(0,0,0,0.1); }
::-webkit-scrollbar-thumb { background: var(--accent); border-radius: 3px; }

/* Responsive Grid */
@media (max-width: 1024px) {
    .main-grid {
        grid-template-columns: 1fr;
    }
    
    .sidebar {
        order: 2;
    }
}
