/* Essential Header & Navigation Styles */
body {
    background: #0a0a0a;
    color: #e0e0e0;
    font-family: 'Inter', Arial, sans-serif;
    font-size: 16px;
    margin: 0;
    padding: 0;
}

.main-header, .header {
    background: rgba(10, 10, 10, 0.95);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    border-bottom: 1px solid #333;
    height: 70px;
    display: flex;
    align-items: center;
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    padding: 0 30px;
    height: 70px;
}

.logo {
    font-size: 1.6em;
    font-weight: 700;
    color: #fff;
    text-decoration: none;
    margin-right: 20px;
    letter-spacing: 1px;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 30px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-menu li a {
    color: #ffffff;
    text-decoration: none;
    font-weight: 400;
    font-size: 14px;
    transition: color 0.3s ease;
    padding-bottom: 6px;
    position: relative;
    display: inline-block;
}

.nav-menu li a:hover,
.nav-menu li a.active {
    color: #667eea;
}

.nav-menu li a::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 2px;
    background: #667eea;
    transform: scaleX(0);
    transform-origin: bottom right;
    transition: transform 0.25s ease-out;
}

.nav-menu li a:hover::after,
.nav-menu li a.active::after {
    transform: scaleX(1);
    transform-origin: bottom left;
}

.nav-toggle {
    display: none;
    cursor: pointer;
    background: transparent;
    border: none;
    padding: 0;
    z-index: 1001;
    position: relative;
    width: 25px;
    height: 21px;
}

.nav-toggle:hover .hamburger,
.nav-toggle:hover .hamburger::before,
.nav-toggle:hover .hamburger::after {
    background-color: #667eea;
}

.hamburger,
.hamburger::before,
.hamburger::after {
    content: '';
    display: block;
    position: absolute;
    width: 25px;
    height: 3px;
    background-color: white;
    border-radius: 2px;
    transition: all 0.3s ease-in-out;
}

.hamburger {
    top: 9px;
}

.hamburger::before {
    top: -9px;
}

.hamburger::after {
    bottom: -9px;
}

.nav-toggle.active .hamburger {
    background-color: transparent;
}

.nav-toggle.active .hamburger::before {
    top: 0;
    transform: rotate(45deg);
}

.nav-toggle.active .hamburger::after {
    top: 0;
    transform: rotate(-45deg);
}

@media (max-width: 768px) {
    .nav-menu {
        display: none;
        position: absolute;
        top: 70px;
        left: 0;
        right: 0;
        background: #02070c;
        flex-direction: column;
        width: 100%;
        text-align: left;
        padding: 10px 0;
        border-top: 1px solid #333;
        gap: 0;
    }
    .nav-menu.active {
        display: flex;
    }
    .nav-menu li {
        width: 100%;
        margin-left: 50px;
        padding: 0 25px;
    }
    .nav-menu li a {
        display: inline-block;
        width: auto;
        padding: 15px 0;
    }
    .nav-toggle {
        display: block;
    }
}

.page-container {
    margin-top: 70px;
    min-height: calc(100vh - 70px);
}

/* Main Page */
.main-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Categories */
.categories-section {
    padding: 40px 0;
    border-bottom: 1px solid #333;
}

.categories-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 30px;
    color: #fff;
}

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

.category-card {
    background: linear-gradient(135deg, #1a1a1a, #2a2a2a);
    border: 1px solid #333;
    border-radius: 12px;
    padding: 25px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.category-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, #667eea, transparent);
    transition: left 0.5s ease;
}

.category-card:hover::before {
    left: 100%;
}

.category-card:hover {
    transform: translateY(-5px);
    border-color: #667eea;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.1);
}

.category-icon {
    font-size: 48px;
    margin-bottom: 20px;
    display: block;
}

.category-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 10px;
    color: #fff;
}

.category-count {
    color: #888;
    font-size: 14px;
}

/* Hero Section */
.hero {
    text-align: center;
    padding: 80px 0;
    background: linear-gradient(135deg, #1a1a1a, #2a2a2a);
    margin: 40px 0;
    border-radius: 12px;
    border: 1px solid #333;
}

.hero h1 {
    font-size: 48px;
    font-weight: 700;
    margin-bottom: 20px;
    color: #fff;
    line-height: 1.2;
}

.hero p {
    font-size: 20px;
    color: #888;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.5;
}

/* Blog Grid */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
    padding: 40px 0;
}

/* Article Card */
.article-card {
    background: linear-gradient(135deg, #1a1a1a, #2a2a2a);
    border: 1px solid #333;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    cursor: pointer;
}

.article-card:hover {
    transform: translateY(-5px);
    border-color: #667eea;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.1);
}

.article-image {
    width: 100%;
    height: 200px;
    background: linear-gradient(45deg, #667eea 0%, #764ba2 100%);
    position: relative;
}

.article-content {
    padding: 25px;
}

.article-meta {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    font-size: 12px;
    color: #666;
}

.article-title {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 12px;
    line-height: 1.4;
    color: #fff;
}

.article-excerpt {
    color: #888;
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 20px;
}

.article-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag {
    background: rgba(102, 126, 234, 0.1);
    color: #667eea;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
    border: 1px solid rgba(102, 126, 234, 0.2);
}

/* Content with Sidebar */
.content-with-sidebar {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 40px;
    margin-top: 40px;
}

/* Sidebar */
.sidebar {
    background: linear-gradient(135deg, #1a1a1a, #2a2a2a);
    border: 1px solid #333;
    border-radius: 12px;
    padding: 25px;
    height: fit-content;
    position: sticky;
    top: 90px;
}

.sidebar h3 {
    font-size: 18px;
    margin-bottom: 20px;
    color: #fff;
}

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

.popular-posts li {
    padding: 15px 0;
    border-bottom: 1px solid #333;
}

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

.popular-posts a {
    text-decoration: none;
    color: #e0e0e0;
    font-weight: 400;
    line-height: 1.4;
    transition: color 0.3s ease;
}

.popular-posts a:hover {
    color: #667eea;
}

.popular-date {
    font-size: 11px;
    color: #666;
    margin-top: 5px;
}

/* Blog Post Page */
.blog-post-page {
    display: none;
    max-width: 800px;
    margin: 0 auto;
    padding: 40px 20px;
}

.blog-post-page.active {
    display: block;
}

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

.post-meta {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
    font-size: 14px;
    color: #666;
}

.post-title {
    font-size: 42px;
    font-weight: 700;
    line-height: 1.2;
    color: #fff;
    margin-bottom: 20px;
}

.post-subtitle {
    font-size: 18px;
    color: #888;
    line-height: 1.5;
    margin-bottom: 30px;
}

.post-content {
    font-size: 16px;
    line-height: 1.8;
    color: #e0e0e0;
}

.post-content p {
    margin-bottom: 24px;
}

.post-content h2 {
    font-size: 28px;
    margin: 40px 0 20px 0;
    color: #fff;
}

.post-content h3 {
    font-size: 22px;
    margin: 30px 0 15px 0;
    color: #fff;
}

.post-content ul,
.post-content ol {
    margin-left: 2em;
    margin-bottom: 1.2em;
    padding-left: 1.2em;
}
.post-content ul {
    list-style-type: disc;
}
.post-content ol {
    list-style-type: decimal;
}
.post-content li {
    margin-bottom: 0.5em;
    line-height: 1.7;
}
.post-content ul ul,
.post-content ol ol,
.post-content ul ol,
.post-content ol ul {
    margin-left: 1.5em;
    margin-bottom: 0.5em;
}
.post-content pre {
    background: #181c24;
    color: #38bdf8;
    border-radius: 6px;
    padding: 14px 18px;
    margin: 18px 0;
    font-size: 15px;
    overflow-x: auto;
}
.post-content code {
    background: #23283a;
    color: #38bdf8;
    border-radius: 4px;
    padding: 2px 6px;
    font-size: 15px;
}
.post-content blockquote {
    border-left: 4px solid #667eea;
    background: #181c24;
    color: #b3c0e0;
    margin: 18px 0;
    padding: 16px 24px;
    font-style: italic;
    border-radius: 6px;
}

.post-sidebar {
    position: fixed;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    background: linear-gradient(135deg, #1a1a1a, #2a2a2a);
    border: 1px solid #333;
    border-radius: 12px;
    padding: 20px;
    width: 280px;
}

.sidebar-section {
    margin-bottom: 25px;
}

.sidebar-section:last-child {
    margin-bottom: 0;
}

.sidebar-section h4 {
    font-size: 14px;
    font-weight: 600;
    color: #888;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.post-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.share-buttons {
    display: flex;
    gap: 10px;
}

.share-btn {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    border: 1px solid #333;
    background: transparent;
    color: #888;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.share-btn:hover {
    color: #667eea;
    border-color: #667eea;
}

.github-edit {
    color: #888;
    text-decoration: none;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: color 0.3s ease;
}

.github-edit:hover {
    color: #667eea;
}

.back-button {
    background: transparent;
    border: 1px solid #333;
    color: #888;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    margin-bottom: 30px;
    transition: all 0.3s ease;
}

.back-button:hover {
    color: #667eea;
    border-color: #667eea;
}

/* Responsive */
@media (max-width: 1200px) {
    .post-sidebar {
        position: static;
        transform: none;
        width: 100%;
        margin-top: 40px;
    }
}

@media (max-width: 768px) {
    .hero h1 {
        font-size: 36px;
    }

    .categories-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }

    .blog-grid {
        grid-template-columns: 1fr;
    }

    .content-with-sidebar {
        grid-template-columns: 1fr;
    }

    .post-title {
        font-size: 32px;
    }
}

/* Hide main content when blog post is active */
.main-content.hidden {
    display: none;
}

#random-post a,
#random-post {
    color: #ff0000;
    transition: color 0.8s;
    font-weight: 600;
    text-decoration: none;
}

#random-post a:hover,
#random-post:hover {
    color: #38bdf8; /* Sky blue */
}

textarea {
    color: #fff;
    background: #181c24;
    border: 1px solid #333;
    font-family: inherit;
    font-size: 16px;
    padding: 10px;
    border-radius: 6px;
    transition: border-color 0.3s;
}

textarea:focus {
    border-color: #667eea;
    outline: none;
}

/* Tabbed Guide Styles */
.tab-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 32px;
    border-bottom: 1px solid #333;
    padding-bottom: 8px;
}
.tab-btn {
    background: none;
    border: none;
    color: #888;
    font-size: 15px;
    font-weight: 500;
    padding: 8px 18px;
    cursor: pointer;
    border-radius: 6px 6px 0 0;
    transition: background 0.2s, color 0.2s;
    position: relative;
}
.tab-btn.active {
    color: #fff;
    background: #181c24;
    border-bottom: 2px solid #667eea;
    z-index: 1;
}
.tab-btn:hover {
    color: #667eea;
    background: #23283a;
}
.tab-panel {
    display: none;
    animation: fadeIn 0.3s;
    margin-bottom: 24px;
}
.tab-panel.active {
    display: block;
}
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: none; }
} 
