:root {
    --primary: #2c3e50;
    --secondary: #3498db;
    --accent: #e74c3c;
    --bg-light: #ffffff;
    --bg-gray: #f8f9fa;
    --text-dark: #2c3e50;
    --text-light: #6c757d;
    --border: #e9ecef;
    --shadow: 0 2px 8px rgba(0,0,0,0.08);
    --shadow-lg: 0 4px 16px rgba(0,0,0,0.12);
}

@font-face {
    font-family: 'Special Elite';
    src: url('../fonts/SpecialElite-Regular.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    color: var(--text-dark);
    line-height: 1.6;
    background-color: var(--bg-gray);
    min-width: 1024px;
}

.container {
    width: 1200px;
    margin: 0 auto;
    background-color: var(--bg-light);
    box-shadow: var(--shadow-lg);
}

/* Header */
header {
    background-color: var(--bg-light);
    border-bottom: 1px solid var(--border);
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 30px;
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 15px;
}

.avatar {
    width: 47px;
    height: 60px;
    border: 2px solid #666;
    object-fit: cover;
}

.site-title h1 { 
    font-size: clamp(1.25rem, 3vw, 1.75rem);
    font-weight: 700;
    color: var(--primary);
    font-family: 'Special Elite', 'Courier New', monospace;
}   

.site-title p {
    font-size: 14px;
    color: var(--text-light);
    font-style: italic;
}

.user-links {
    display: flex;
    gap: 10px;
}

.user-links a {
    padding: 8px 20px;
    background-color: var(--secondary);
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    transition: background-color 0.2s;
}

.user-links a:hover {
    background-color: #2980b9;
}

/* Navigation */
nav {
    background-color: var(--primary);
}

.nav-content {
    display: flex;
    padding: 0 30px;
}

nav a {
    padding: 4px 24px;
    color: white;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: background-color 0.2s;
    letter-spacing: 0.3px;
}

nav a:hover {
    background-color: rgba(255,255,255,0.1);
}

nav a.active {
    background-color: rgba(255,255,255,0.15);
    font-weight: 600;
}

/* Main Content */
main {
    padding: 30px;
}

.content-grid {
    display: grid;
    grid-template-columns: 800px 340px;
    gap: 30px;
}

/* Cards */
.card {
    background-color: var(--bg-light);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 24px;
    margin-bottom: 24px;
}

.card-header {
    font-size: 22px;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 3px solid var(--secondary);
}

.card p {
    margin-bottom: 14px;
    color: var(--text-dark);
    font-size: 15px;
}

.card p:last-child {
    margin-bottom: 0;
}

.card a {
    color: var(--secondary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.card a:hover {
    color: #2980b9;
    text-decoration: underline;
}

/* News Posts */
.news-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.news-title {
    font-size: 22px;
    font-weight: 700;
    color: var(--primary);
}

.news-nav {
    display: flex;
    gap: 6px;
}

.news-nav button {
    padding: 6px 14px;
    font-size: 12px;
    background-color: var(--bg-gray);
    color: var(--text-dark);
    border: 1px solid var(--border);
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s;
}

.news-nav button:hover {
    background-color: var(--secondary);
    color: white;
    border-color: var(--secondary);
}

.news-nav button:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    background-color: var(--bg-gray);
    color: var(--text-light);
    border-color: var(--border);
}

.news-nav button:disabled:hover {
    background-color: var(--bg-gray);
    color: var(--text-light);
    border-color: var(--border);
}

.news-meta {
    font-size: 13px;
    color: var(--text-light);
    margin-bottom: 12px;
}

/* Sidebar cards will use the same .card styles */

.book-feature {
    text-align: center;
}

.book-image {
    max-width: 200px;
    width: 100%;
    border-radius: 6px;
    box-shadow: var(--shadow-lg);
    margin-bottom: 16px;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

/* Related Sites */
.related-list {
    list-style: none;
    padding-left: 0;
}

.related-list li {
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
}

.related-list li:last-child {
    border-bottom: none;
}

.related-list a {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--secondary);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s;
}

.related-list a::before {
    content: "→";
    font-weight: bold;
}

.related-list a:hover {
    color: #2980b9;
    padding-left: 6px;
}

/* Factory Tables */

.factory_table {
    border-collapse: collapse;
    width: 100%;
    margin-top: 10px;
}

.factory_table td {
    padding-left: 4px;
    font-size: smaller;
}

.factory_table th {
    text-align: center;
    font-size: smaller;
    font-weight:normal;
    color: brown;
    background-color: var(--bg-gray);
}

