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

a {
  color: inherit; /* blue colors for links too */
  text-decoration: inherit; /* no underline */
}

:root {
    --primary-red: #cc0000;
    --dark-red: #990000;
    --text-primary: #000000;
    --text-secondary: #666666;
    --text-light: #999999;
    --bg-primary: #ffffff;
    --bg-secondary: #f8f9fa;
    --border-light: #e5e5e5;
    --shadow: 0 2px 10px rgba(0,0,0,0.1);
    
    --tag-neuro: #007acc;
    --tag-evil: #cc0000;
    --tag-vedal: #24c700;
    --tag-swarm: #9933cc;
    --tag-misc: #666666;
    --tag-update: #c27e00;
}

html, body {
    height: 100%;
}

body {
    font-family: 'Noto Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--bg-primary);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.header {
    background: var(--bg-primary);
    border-bottom: 3px solid var(--primary-red);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow);
}

.nav-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
}

.logo h1 {
    font-family: 'Cal Sans', serif;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-red);
}

.logo .nn {
    color: var(--text-primary);
}

.nav {
    display: flex;
    gap: 30px;
    align-items: center;
}

.nav-link {
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 500;
    font-size: 0.95rem;
    padding: 8px 12px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
    background: var(--primary-red);
    color: white;
}

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 4px;
}

.mobile-menu-toggle span {
    width: 25px;
    height: 3px;
    background: var(--text-primary);
    transition: 0.3s;
}

/* Breaking Banner */
.breaking-banner {
    background: var(--primary-red);
    color: white;
    padding: 10px 0;
    text-align: center;
    font-weight: 500;
    display: none;
}

.breaking-label {
    background: rgba(255,255,255,0.2);
    padding: 4px 8px;
    border-radius: 4px;
    margin-right: 10px;
    font-size: 0.8rem;
    font-weight: 600;
}

/* Hero Section */
.hero-section {
    margin: 30px 0;
}

.hero-article {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    align-items: center;
    background: var(--bg-secondary);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.hero-image {
    position: relative;
}

.hero-image img {
    width: 100%;
    height: 300px;
    object-fit: cover;
}

.hero-content {
    padding: 30px;
}

.hero-content h2 {
    font-family: 'Cal Sans', serif;
    font-size: 1.8rem;
    margin-bottom: 15px;
    line-height: 1.3;
}

.hero-excerpt {
    color: var(--text-secondary);
    margin-bottom: 20px;
    font-size: 1.05rem;
}

/* Tags */
.tag-group {
    position: absolute;
    top: 15px;
    left: 15px;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.tag {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 600;
    color: white;
    text-transform: uppercase;
}

.tag-neuro { background: var(--tag-neuro); }
.tag-evil { background: var(--tag-evil); }
.tag-vedal { background: var(--tag-vedal); }
.tag-swarm { background: var(--tag-swarm); }
.tag-misc { background: var(--tag-misc); }
.tag-update { background: var(--tag-update); }

/* Content Grid */
.content-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 40px;
    margin-top: 40px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.section-header h3 {
    font-family: 'Cal Sans', serif;
    font-size: 1.5rem;
}

.tag-filter {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 6px 12px;
    border: 1px solid var(--border-light);
    background: white;
    border-radius: 20px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--primary-red);
    color: white;
    border-color: var(--primary-red);
}

/* Articles */
.articles-grid {
    display: grid;
    gap: 25px;
}

.article-card {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 20px;
    padding: 20px;
    background: var(--bg-secondary);
    border-radius: 8px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    cursor: pointer;
}

.article-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.article-image {
    position: relative;
}

.article-image img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    border-radius: 6px;
}

.article-content h4 {
    font-size: 1.1rem;
    margin-bottom: 10px;
    line-height: 1.4;
}

.article-content p {
    color: var(--text-secondary);
    margin-bottom: 15px;
    font-size: 0.9rem;
}


.post-content pre {
    background: var(--bg-tertiary);
    padding: 20px;
    border-radius: var(--border-radius);
    overflow-x: auto;
    margin: 20px 0;
    border-left: 4px solid var(--primary-red);
}

.post-content pre code {
    background: none;
    padding: 0;
    color: var(--text-primary);
}

.post-content .dialogue { border:1px solid var(--border-light); border-radius:8px; padding:12px; background:var(--bg-secondary); }
.post-content .dialogue .turn { display:flex; gap:8px; margin:8px 0; }
.post-content .dialogue .speaker { font-weight:600; color:var(--text-primary); min-width:90px; }
.post-content .dialogue .message { color:var(--text-primary); }


.post-content code {
    background: var(--bg-tertiary);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Space Mono', monospace;
    font-size: 0.9rem;
    color: var(--primary-red);
}


.post-content ul, .post-content ol {
    margin: 16px 0;
    padding-left: 30px;
}

.article-meta {
    display: flex;
    gap: 15px;
    font-size: 0.8rem;
    color: var(--text-light);
}

/* Sidebar */
.sidebar {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.trending-section,
.live-feed {
    background: var(--bg-secondary);
    padding: 25px;
    border-radius: 8px;
}

.trending-section h3,
.live-feed h3 {
    font-family: 'Cal Sans', serif;
    margin-bottom: 20px;
    font-size: 1.3rem;
}

.trending-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.trending-item {
    display: flex;
    align-items: center;
    gap: 15px;
}

.trending-number {
    background: var(--primary-red);
    color: white;
    width: 25px;
    height: 25px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 600;
}

.live-item {
    padding: 15px 0;
    border-bottom: 1px solid var(--border-light);
}

.live-item:last-child {
    border-bottom: none;
}

.live-time {
    color: var(--primary-red);
    font-weight: 600;
    font-size: 0.8rem;
}

.live-item p {
    margin-top: 5px;
    font-size: 0.9rem;
}

/* Footer */
.footer {
    background: var(--text-primary);
    color: white;
    margin-top: auto;
    padding: 40px 0;
}

.footer-content {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 40px;
}

.footer-brand h4 {
    font-family: 'Cal Sans', serif;
    font-size: 1.5rem;
    margin-bottom: 10px;
}

.footer-links {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.link-group h5 {
    margin-bottom: 15px;
    font-size: 1rem;
}

.link-group a {
    display: block;
    color: #ccc;
    text-decoration: none;
    margin-bottom: 8px;
    font-size: 0.9rem;
    transition: color 0.2s ease;
}

.link-group a:hover {
    color: white;
}

/* Login Page Styles */
.login-page {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.login-background img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.login-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
}

.login-container {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 400px;
    padding: 20px;
}

.login-card {
    background: var(--bg-primary);
    border-radius: 12px;
    padding: 40px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
    text-align: center;
}

.login-header h1 {
    font-family: 'Cal Sans', serif;
    font-size: 2.5rem;
    margin-bottom: 10px;
    color: var(--primary-red);
}

.login-header p {
    color: var(--text-secondary);
    margin-bottom: 30px;
}

.login-content h2 {
    margin-bottom: 15px;
    color: var(--text-primary);
}

.login-content p {
    color: var(--text-secondary);
    margin-bottom: 30px;
    line-height: 1.6;
}

.discord-login-btn {
    width: 100%;
    padding: 15px;
    background: #5865F2;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: background 0.2s ease;
    margin-bottom: 25px;
}

.discord-login-btn:hover {
    background: #4752C4;
}

.discord-login-btn svg {
    width: 20px;
    height: 20px;
}

.login-info {
    background: var(--bg-secondary);
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.login-info p {
    margin-bottom: 10px;
    font-size: 0.7rem;
}

.login-info strong {
    color: var(--text-primary);
}

.login-footer a {
    color: var(--primary-red);
    text-decoration: none;
    font-size: 0.9rem;
}

/* Page Content Styles */
.page-content {
    max-width: 800px;
    margin: 40px auto;
    padding: 0 20px;
}

.page-content h1 {
    font-family: 'Cal Sans', serif;
    font-size: 2.5rem;
    margin-bottom: 20px;
    color: var(--text-primary);
}

.page-intro {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 40px;
    line-height: 1.6;
}

/* Contact Page */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin-top: 40px;
}

.contact-info h2 {
    color: var(--text-primary);
    margin-bottom: 15px;
    margin-top: 30px;
}

.contact-info h2:first-child {
    margin-top: 0;
}

.contact-info ul {
    list-style: none;
    padding-left: 0;
}

.contact-info li {
    margin-bottom: 8px;
    color: var(--text-secondary);
}

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

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: var(--text-primary);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border-light);
    border-radius: 6px;
    font-size: 1rem;
    transition: border-color 0.2s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-red);
}

.submit-btn {
    background: var(--primary-red);
    color: white;
    padding: 12px 30px;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease;
}

.submit-btn:hover {
    background: var(--dark-red);
}

/* About Page */
.about-content h2 {
    color: var(--text-primary);
    margin: 30px 0 15px 0;
}

.coverage-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
    margin: 30px 0;
}

.coverage-item {
    background: var(--bg-secondary);
    padding: 25px;
    border-radius: 8px;
}

.coverage-item h3 {
    margin: 15px 0 10px 0;
    color: var(--text-primary);
}

.coverage-item p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Privacy Page */
.privacy-content h2 {
    color: var(--text-primary);
    margin: 30px 0 15px 0;
}

.privacy-content ul {
    margin: 15px 0;
    padding-left: 20px;
}

.privacy-content li {
    margin-bottom: 8px;
    color: var(--text-secondary);
}

/* Admin Dashboard */
.admin-dashboard {
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
}

.admin-header {
    margin-bottom: 40px;
}

.admin-header h1 {
    font-family: 'Cal Sans', serif;
    font-size: 2rem;
    margin-bottom: 20px;
}

.admin-tabs {
    display: flex;
    gap: 10px;
    border-bottom: 2px solid var(--border-light);
}

.tab-btn {
    padding: 12px 24px;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.tab-btn.active {
    border-bottom-color: var(--primary-red);
    color: var(--primary-red);
}

.tab-content {
    display: none;
    padding-top: 30px;
}

.tab-content.active {
    display: block;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.form-actions {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.preview-btn {
    background: var(--text-secondary);
    color: white;
    padding: 12px 30px;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    cursor: pointer;
}

.articles-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.article-item {
    background: var(--bg-secondary);
    padding: 20px;
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.article-info h3 {
    margin: 0 0 10px 0;
    font-size: 1.1rem;
}

.article-info p {
    color: var(--text-secondary);
    margin: 0 0 15px 0;
    font-size: 0.9rem;
}

.article-meta {
    display: flex;
    gap: 15px;
    align-items: center;
    flex-wrap: wrap;
}

.status {
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
}

.status-approved {
    background: #e8f5e8;
    color: #2e7d32;
}

.status-pending {
    background: #fff3e0;
    color: #f57c00;
}

.status-rejected {
    background: #ffebee;
    color: #c62828;
}

.article-actions {
    display: flex;
    gap: 10px;
    flex-shrink: 0;
}

.edit-btn, .delete-btn, .approve-btn, .reject-btn, .view-btn {
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    font-size: 0.9rem;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.edit-btn {
    background: var(--tag-neuro);
    color: white;
}

.delete-btn, .reject-btn {
    background: var(--primary-red);
    color: white;
}

.approve-btn {
    background: #4caf50;
    color: white;
}

.view-btn {
    background: var(--text-secondary);
    color: white;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
}

.modal-content {
    background-color: var(--bg-primary);
    margin: 5% auto;
    padding: 30px;
    border-radius: 8px;
    width: 80%;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover {
    color: black;
}

.cancel-btn {
    background: var(--text-light);
    color: white;
    padding: 12px 30px;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    cursor: pointer;
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logout-btn {
    background: var(--primary-red);
    color: white;
    padding: 6px 12px;
    border: none;
    border-radius: 4px;
    font-size: 0.9rem;
    cursor: pointer;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin: 40px 0;
}

.pagination button {
    padding: 10px 15px;
    border: 1px solid var(--border-light);
    background: white;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.pagination button:hover {
    background: var(--bg-secondary);
}

.pagination button.active {
    background: var(--primary-red);
    color: white;
    border-color: var(--primary-red);
}

.pagination button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Responsive Design */
@media (max-width: 968px) {
    .content-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .hero-article {
        grid-template-columns: 1fr;
    }
    
    .hero-image img {
        height: 250px;
    }
}

@media (max-width: 768px) {
    .nav {
        display: none;
    }
    
    .mobile-menu-toggle {
        display: flex;
    }
    
    .hero-content {
        padding: 20px;
    }
    
    .hero-content h2 {
        font-size: 1.5rem;
    }
    
    .article-card {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .article-image img {
        height: 200px;
    }
    
    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
    }
    
    .footer-links {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .logo h1 {
        font-size: 2rem;
    }
    
    .breaking-banner {
        font-size: 0.9rem;
    }
    
    .breaking-text {
        display: block;
        margin-top: 5px;
    }
    
    .hero-content h2 {
        font-size: 1.3rem;
    }
    
    .tag-filter {
        gap: 5px;
    }
    
    .filter-btn {
        padding: 4px 8px;
        font-size: 0.7rem;
    }
}

/* Article filtering */
.article-card.hidden {
    display: none;
}

/* Post-specific styles */
.post-article {
    max-width: 800px;
    margin: 30px auto;
    background: var(--bg-primary);
}

.post-header {
    margin-bottom: 30px;
}

.post-header h1 {
    font-family: 'Cal Sans', serif;
    font-size: 2.5rem;
    line-height: 1.2;
    margin: 20px 0;
    color: var(--text-primary);
}

.post-meta {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin: 25px 0;
    padding: 20px 0;
    border-top: 1px solid var(--border-light);
    border-bottom: 1px solid var(--border-light);
}

.author-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.author-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
}

.author-name {
    display: block;
    font-weight: 600;
    color: var(--text-primary);
}

.author-title {
    display: block;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.post-time {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    font-size: 0.9rem;
    color: var(--text-light);
    gap: 4px;
}

.post-image {
    margin: 30px 0;
}

.post-image img {
    width: 100%;
    height: 400px;
    object-fit: cover;
    border-radius: 8px;
}

.image-caption {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-top: 10px;
    font-style: italic;
    text-align: center;
}

.post-content {
    font-size: 1.1rem;
    line-height: 1.8;
}

.post-content .lead {
    font-size: 1.25rem;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 30px;
    line-height: 1.6;
}

.post-content h2 {
    font-family: 'Cal Sans', serif;
    font-size: 1.6rem;
    margin: 40px 0 20px 0;
    color: var(--text-primary);
}

.post-content p {
    margin-bottom: 20px;
    color: var(--text-primary);
}

.post-content blockquote {
    background: var(--bg-secondary);
    border-left: 4px solid var(--primary-red);
    padding: 25px;
    margin: 30px 0;
    border-radius: 4px;
}

.post-content blockquote p {
    font-size: 1.15rem;
    font-style: italic;
    margin-bottom: 10px;
    color: var(--text-primary);
}

.post-content blockquote cite {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-style: normal;
}

.post-content img {
    width:100%;

}

.form-group a,
.post-content a {
            color: #cc0000;
            text-decoration: none;
            border-bottom: 1px solid transparent;
            transition: border-bottom-color 0.2s ease;
        }
        .form-group a:hover,
        .post-content a:hover { border-bottom-color: #cc0000; }

.story-tags {
    margin-top: 40px;
    padding-top: 25px;
    border-top: 1px solid var(--border-light);
}

.story-tags strong {
    margin-right: 15px;
    color: var(--text-secondary);
}

/* Related Articles */
.related-articles {
    max-width: 800px;
    margin: 60px auto;
}

.related-articles h3 {
    font-family: 'Cal Sans', serif;
    font-size: 1.5rem;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--primary-red);
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
}

.related-card {
    background: var(--bg-secondary);
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.related-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.related-card img {
    width: 100%;
    height: 150px;
    object-fit: cover;
}

.related-content {
    padding: 20px;
}

.related-content h4 {
    font-size: 1rem;
    margin: 10px 0;
    line-height: 1.4;
}

.related-time {
    font-size: 0.8rem;
    color: var(--text-light);
}

/* Mobile responsiveness for post */
@media (max-width: 768px) {
    .post-header h1 {
        font-size: 2rem;
    }
    
    .post-meta {
        flex-direction: column;
        gap: 15px;
    }
    
    .post-time {
        align-items: flex-start;
    }
    
    .post-content {
        font-size: 1.05rem;
    }
    
    .post-content .lead {
        font-size: 1.15rem;
    }
    
    .related-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .post-header h1 {
        font-size: 1.8rem;
    }
    
    .post-image img {
        height: 250px;
    }
    
    .post-content h2 {
        font-size: 1.4rem;
    }
}

.warning-banner {
    background: #fff8e1;
    border: 1px solid #ffe082;
    color: #5d4037;
    padding: 12px 14px;
    border-radius: 6px;
    display: flex; gap: 10px; align-items: center; justify-content: space-between;
    margin: 20px auto; max-width: 800px;
}

.warning-dismiss {
    background: transparent; border: none; color: #8d6e63; cursor: pointer; font-weight: 600;
}

figcaption{font-size:.9rem;color:#666;margin-top:6px;text-align:center}