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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: #121212;
    color: #e0e0e0;
    min-height: 100vh;
}

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

/* Header */
.header {
    background: #121212;
    padding: 1rem 0;
    border-bottom: 1px solid #121212;
}

.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 25%;
    width: 100%;
}

.logo {
    font-size: 1.5rem;
    color: #e0e0e0;
    text-decoration: none;
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-link {
    color: #bbbbbb;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
    cursor: pointer;
}

.nav-link:hover,
.nav-link.active {
    color: #4f9eff;
}

/* Main Content */
.main {
    display: flex;
    gap: 2rem;
    padding: 2rem 0;
}

/* gif banner */
.bannerlayout {
    width: 100%;
    height: 200px;
    margin-bottom: 1rem;
    border-radius: 10px;
    overflow: hidden; 
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #000000;
}

.gifbanner {
    width: 90%;
    height: 90%;
    object-fit: cover;
    border-radius: 0;
    display: block;
}

.content {
    flex: 1;
    background: #121212;
    border-radius: 12px;
    padding: 0rem;
    max-width: 865px;
    min-height: calc(100vh - 80px - 60px);
}

.sidebar {
    width: 300px;
    background: #1e1e1e;
    box-shadow: 0 2px 8px rgba(0,0,0,0.6);
    border-radius: 12px;
    padding: 2rem;
    height: fit-content;
    margin-top: 0rem;
}

/* Home Page Styles */
.hero {
    margin-bottom: 2rem;
}

.hero h2 {
    margin-bottom: 1rem;
    color: #e0e0e0;
}

.hero p {
    font-size: 1.1rem;
    color: #cccccc;
    word-wrap: break-word;
    overflow-wrap: break-word;
    word-break: break-word;
    line-height: 1.6;
}

.btn {
    background: #333333;
    color: #e0e0e0;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.3s ease;
    text-decoration: none;
    display: inline-block;
    margin-top: 1rem;
}

.btn:hover {
    background: #4f9eff;
}

.about {
    margin-top: 1rem;
    background: #1e1e1e;
    box-shadow: 0 2px 8px rgba(0,0,0,0.6);
    border-radius: 12px;
    padding: 2rem;
}

.about h2 {
    margin-bottom: 1.5rem;
    color: #e0e0e0;
}

.about-content {
    display: flex;
    align-items: flex-start;
    gap: 2rem;
    flex-wrap: wrap;
}

.about-image-jpg {
    width: 170px;
    height: auto;
    border-radius: 10px;
    flex-shrink: 0;
    display: block;
}

.about-text {
    flex: 1;
    color: #e0e0e0;
    line-height: 1.6;
    text-align: left;
    align-self: stretch;
}

/* Footer */
.footer {
    background-color: #1f1f1f;
    color: #888;
    padding: 2rem 0 1rem;
    font-size: 0.95rem;
}

.footer-content {
    display: flex;
    flex-wrap: wrap;
}

.footer-about {
    flex: 1;
    min-width: 250px;
    padding-left: 32px;
    padding-bottom: 10px;
}

.footer-social {
    flex: 0;
    min-width: 120px;
    padding-left: 32px;
}

.footer-social h4 {
    margin-bottom: 10px;
}

.footer-social ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-social li {
    margin-bottom: 0.5rem;
}

.footer-social a {
    color: #bbbbbb;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-social a:hover {
    color: #4f9eff;
}

.footer-bottom {
    text-align: center;
    margin-top: 2rem;
    border-top: 1px solid #333;
    padding-top: 1rem;
    font-size: 0.85rem;
    color: #888;
}

/* Archive Page Styles */
.search-container {
    margin-bottom: 2rem;
}

.search-bar {
    width: 100%;
    padding: 1rem;
    border: 2px solid #444;
    border-radius: 50px;
    font-size: 1rem;
    background: #1e1e1e;
    color: #e0e0e0;
    outline: none;
    transition: border-color 0.3s ease;
}

.search-bar::placeholder {
    color: #888888;
}

.search-bar:focus {
    border-color: #4f9eff;
}

.articles-grid {
    display: grid;
    gap: 1.5rem;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 5px auto;
}

.article-gifs {
    width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
}

.article-card {
    background: #1e1e1e;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.6);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

.article-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.8);
}

.article-title {
    font-size: 1.3rem;
    font-weight: bold;
    color: #e0e0e0;
    margin-bottom: 0.5rem;
}

.article-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.9rem;
    color: #cccccc;
    margin-bottom: 1rem;
}

.article-excerpt {
    color: #cccccc;
    line-height: 1.6;
}

.tag {
    display: inline-block;
    background: #333333;
    color: #4f9eff;
    padding: 0.25rem 0.75rem;
    border-radius: 16px;
    font-size: 0.8rem;
    margin-right: 0.4rem;
    margin-bottom: 0.4rem;
}

/* Article View Styles */
.article-view {
    max-width: none;
}

.article-header {
    margin-bottom: 2rem;
}

.article-content {
    line-height: 1.7;
    color: #e0e0e0;
}

.article-content h1, .article-content h2, .article-content h3 {
    color: #e0e0e0;
    margin: 1.5rem 0 1rem 0;
}

.article-content h1 {
    font-size: 2rem;
    border-bottom: 2px solid #444;
    padding-bottom: 0.5rem;
}

.article-content h2 {
    font-size: 1.5rem;
}

.article-content h3 {
    font-size: 1.2rem;
}

.article-content p {
    margin-bottom: 1rem;
}

.article-content ul, .article-content ol { 
    padding-left: 1rem; 
    margin-bottom: 1rem;
    list-style-position: inside; 
}

.article-content li {
    margin-bottom: 0.5rem;
}

.article-content ol {
    padding-left: 1rem;
    list-style-position: inside;
    margin-bottom: 1rem;
}

.article-content ol li {
    margin-bottom: 0.5rem;
}

.article-content code {
    background: #282c34;
    color: #abb2bf;
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
}

.article-content pre {
    background: #282c34;
    padding: 1rem;
    border-radius: 8px;
    overflow-x: auto;
    margin: 1rem 0;
}

.article-content pre code {
    display: block;
    padding: 1rem;
    border-radius: 8px;
    background: #282c34;
    color: #abb2bf;
    overflow-x: auto;
    font-size: 0.95rem;
    font-family: 'Fira Code', monospace;
}

.article-cover {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 10px;
}

/* Blockquotes */
blockquote {
    border-left: 4px solid #444;
    padding-left: 1rem;
    color: #999;
    font-style: italic;
    margin: 1rem 0;
}

/* Tables */
.table-container {
    overflow-x: auto;
    max-width: 100%;
    margin-top: 1rem;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
    min-width: 600px;
}

th, td {
    padding: 0.75rem;
    border: 1px solid #444;
    text-align: left;
}

thead {
    background-color: #1f1f1f;
    color: #e0e0e0;
}

.back-btn {
    background: #333333;
    color: #e0e0e0;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.3s ease;
    text-decoration: none;
    display: inline-block;
    margin-top: 1rem;
}

.back-btn:hover {
    background: #4f9eff;
}

/* Loading State */
.loading {
    text-align: center;
    padding: 2rem;
    color: #bbbbbb;
}

.loading-spinner {
    border: 3px solid #333;
    border-top: 3px solid #4f9eff;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Sidebar Styles */
.sidebar h3 {
    color: #e0e0e0;
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.recent-posts {
    list-style: none;
}

.recent-posts li {
    padding: 0.75rem 0;
    border-bottom: 1px solid #444;
}

.recent-posts li:last-child {
    border-bottom: none;
}

.recent-posts a {
    color: #bbbbbb;
    text-decoration: none;
    font-size: 0.95rem;
    transition: color 0.3s ease;
}

.recent-posts a:hover {
    color: #4f9eff;
}

.categories {
    margin-top: 2rem;
}

.category-list {
    list-style: none;
}

.category-list li {
    padding: 0.5rem 0;
}

.category-list a {
    color: #bbbbbb;
    text-decoration: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: color 0.3s ease;
}

.category-list a:hover {
    color: #4f9eff;
}

.category-count {
    background: #333333;
    color: #4f9eff;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-size: 0.8rem;
}

/* Page States */
.page {
    display: none;
}

.page.active {
    display: block;
}

/* Responsive */
@media (max-width: 768px) {
    .main {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
    }

    .about-content {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .about-text {
        width: 100%;
        text-align: left;
    }

    .nav-links {
        gap: 1rem;
    }

    .hero h1 {
        font-size: 2rem;
    }
}

@media (max-width: 1200px) {
    .main {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        margin-top: 2rem;
    }

    .content {
        max-width: 100%;
    }
}
