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

:root {
    --primary: #6C63FF;
    --primary-dark: #5A52D5;
    --primary-light: #8B85FF;
    --bg: #0F0F1A;
    --bg-secondary: #1A1A2E;
    --bg-card: #16213E;
    --text: #E8E8F0;
    --text-muted: #9A9AB0;
    --accent: #00D4AA;
    --shadow: rgba(108, 99, 255, 0.3);
    --border: rgba(255, 255, 255, 0.08);
    --header-margin: 0 24px;
    --content-margin: 0 48px;
    --radius: 16px;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    line-height: 1.6;
}

.header {
    margin: 12px 24px 0;
    position: sticky;
    top: 12px;
    z-index: 1000;
}

.header-inner {
    background: rgba(26, 26, 46, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
    box-shadow:
        0 8px 32px rgba(108, 99, 255, 0.15),
        0 2px 8px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
    transition: all 0.3s ease;
}

.header-inner:hover {
    box-shadow:
        0 12px 40px rgba(108, 99, 255, 0.25),
        0 4px 12px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.logo a {
    font-size: 1.5rem;
    font-weight: 700;
    text-decoration: none;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.5px;
}

.navbar {
    display: flex;
    align-items: center;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 8px;
}

.nav-link {
    text-decoration: none;
    color: var(--text-muted);
    font-size: 0.95rem;
    font-weight: 500;
    padding: 10px 20px;
    border-radius: 12px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.nav-link::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    border-radius: 3px;
    transition: width 0.3s ease;
}

.nav-link:hover::before,
.nav-link.active::before {
    width: 60%;
}

.nav-link:hover {
    color: var(--text);
    background: rgba(108, 99, 255, 0.1);
    box-shadow: 0 4px 15px rgba(108, 99, 255, 0.15);
    transform: translateY(-2px);
}

.nav-link.active {
    color: var(--primary-light);
    background: rgba(108, 99, 255, 0.12);
}

.nav-link i {
    margin-right: 6px;
}

.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: background 0.3s;
}

.hamburger:hover {
    background: rgba(108, 99, 255, 0.1);
}

.hamburger .bar {
    width: 25px;
    height: 3px;
    background: var(--text);
    border-radius: 3px;
    transition: all 0.3s ease;
}

.hamburger.active .bar:nth-child(1) {
    transform: rotate(45deg) translate(5px, 6px);
}

.hamburger.active .bar:nth-child(2) {
    opacity: 0;
}

.hamburger.active .bar:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -6px);
}

.ad-banner {
    margin: 16px 24px;
}

.ad-placeholder {
    background: var(--bg-secondary);
    border: 1px dashed var(--border);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
}

.main-wrapper {
    flex: 1;
    margin: 0 48px;
    padding: 24px 0;
}

.content-container {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 48px;
    min-height: 400px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.content-container h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 16px;
    background: linear-gradient(135deg, var(--text), var(--primary-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.content-container h2 {
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--text);
}

.content-container p {
    color: var(--text-muted);
    font-size: 1.05rem;
    line-height: 1.8;
    margin-bottom: 16px;
}

.welcome-section {
    text-align: center;
    padding: 60px 20px;
}

.welcome-section .icon {
    font-size: 4rem;
    margin-bottom: 24px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.welcome-section h1 {
    display: inline-block;
}

.welcome-section p {
    max-width: 600px;
    margin: 0 auto 24px;
}

.page-content {
    padding: 20px 0;
}

.page-content h1 {
    margin-bottom: 24px;
}

.page-content p {
    margin-bottom: 20px;
}

.page-content ul {
    list-style: none;
    padding: 0;
    margin-bottom: 20px;
}

.page-content ul li {
    padding: 8px 0 8px 24px;
    position: relative;
    color: var(--text-muted);
}

.page-content ul li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--primary);
}

.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
}

.post-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    display: block;
}

.post-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 32px rgba(108, 99, 255, 0.2);
    border-color: rgba(108, 99, 255, 0.3);
}

.post-thumb {
    width: 100%;
    height: 200px;
    overflow: hidden;
    background: var(--bg-card);
}

.post-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.post-card:hover .post-thumb img {
    transform: scale(1.05);
}

.post-thumb-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 2.5rem;
    background: linear-gradient(135deg, var(--bg-card), var(--bg-secondary));
}

.post-card-body {
    padding: 20px;
}

.post-category-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    background: rgba(108, 99, 255, 0.12);
    color: var(--primary-light);
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.post-card-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 8px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.post-card-desc {
    color: var(--text-muted);
    font-size: 0.85rem;
    line-height: 1.6;
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.post-card-meta {
    color: var(--text-muted);
    font-size: 0.8rem;
}

.post-card-meta i {
    margin-right: 4px;
    color: var(--primary);
}

.category-header {
    margin-bottom: 32px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border);
}

.category-header h1 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 8px;
    background: linear-gradient(135deg, var(--text), var(--primary-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.category-header p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 40px;
    padding-top: 24px;
}

.page-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    text-decoration: none;
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 500;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    transition: all 0.3s ease;
}

.page-btn:hover {
    color: var(--text);
    background: rgba(108, 99, 255, 0.1);
    border-color: rgba(108, 99, 255, 0.3);
}

.page-btn.active {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    border-color: transparent;
    box-shadow: 0 4px 12px rgba(108, 99, 255, 0.3);
}

.page-dots {
    color: var(--text-muted);
    padding: 0 4px;
}

.empty-state-front {
    text-align: center;
    padding: 60px 20px;
}

.empty-state-front i {
    font-size: 3rem;
    margin-bottom: 16px;
    color: var(--text-muted);
}

.empty-state-front h3 {
    font-size: 1.2rem;
    color: var(--text);
    margin-bottom: 8px;
}

.empty-state-front p {
    color: var(--text-muted);
}

.single-post-layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 32px;
}

.single-post-main {
    min-width: 0;
}

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

.post-category-link {
    display: inline-block;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    background: rgba(108, 99, 255, 0.12);
    color: var(--primary-light);
    text-decoration: none;
    margin-bottom: 16px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s;
}

.post-category-link:hover {
    background: rgba(108, 99, 255, 0.2);
}

.post-title {
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--text);
    line-height: 1.3;
    margin-bottom: 16px;
}

.post-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    color: var(--text-muted);
    font-size: 0.85rem;
}

.post-meta i {
    margin-right: 6px;
    color: var(--primary);
}

.post-featured-image {
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 32px;
}

.post-featured-image img {
    width: 100%;
    height: auto;
    display: block;
}

.post-body {
    color: var(--text);
    font-size: 1.05rem;
    line-height: 1.9;
}

.post-body h1 { font-size: 2rem; font-weight: 700; margin: 32px 0 16px; color: var(--text); }
.post-body h2 { font-size: 1.6rem; font-weight: 600; margin: 28px 0 14px; color: var(--text); }
.post-body h3 { font-size: 1.3rem; font-weight: 600; margin: 24px 0 12px; color: var(--text); }
.post-body p { margin-bottom: 18px; color: var(--text-muted); }
.post-body strong { color: var(--text); }
.post-body a { color: var(--primary-light); text-decoration: underline; }
.post-body a:hover { color: var(--accent); }
.post-body ul, .post-body ol { margin: 16px 0; padding-left: 28px; color: var(--text-muted); }
.post-body li { margin-bottom: 8px; }
.post-body blockquote {
    border-left: 4px solid var(--primary);
    padding: 16px 20px;
    margin: 20px 0;
    background: rgba(108, 99, 255, 0.05);
    border-radius: 0 12px 12px 0;
    color: var(--text-muted);
    font-style: italic;
}
.post-body pre {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px;
    margin: 20px 0;
    overflow-x: auto;
    font-size: 0.9rem;
}
.post-body code {
    background: rgba(108, 99, 255, 0.1);
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 0.9em;
    color: var(--primary-light);
}
.post-body img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    margin: 16px 0;
}
.post-body iframe {
    max-width: 100%;
    border-radius: 12px;
    margin: 16px 0;
}

.single-post-sidebar {
    position: sticky;
    top: 100px;
    align-self: start;
}

.sidebar-widget {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.widget-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--primary);
    display: inline-block;
}

.recent-posts-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.recent-post-item {
    display: flex;
    gap: 14px;
    text-decoration: none;
    padding: 10px;
    border-radius: 12px;
    transition: all 0.3s;
}

.recent-post-item:hover {
    background: rgba(108, 99, 255, 0.06);
}

.recent-post-thumb {
    width: 70px;
    height: 55px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
}

.recent-post-thumb-placeholder {
    width: 70px;
    height: 55px;
    border-radius: 8px;
    background: var(--bg-card);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    flex-shrink: 0;
    font-size: 1.2rem;
}

.recent-post-info h4 {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text);
    line-height: 1.4;
    margin-bottom: 4px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.recent-post-info span {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.no-posts-msg {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.footer {
    margin: 0 24px 12px;
}

.footer-inner {
    background: rgba(26, 26, 46, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 32px;
    box-shadow:
        0 -4px 20px rgba(108, 99, 255, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.footer-links {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 24px;
    margin-bottom: 20px;
}

.footer-links a {
    text-decoration: none;
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    padding: 6px 12px;
    border-radius: 8px;
}

.footer-links a:hover {
    color: var(--primary-light);
    background: rgba(108, 99, 255, 0.1);
}

.footer-copyright {
    text-align: center;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}

.footer-copyright p {
    color: var(--text-muted);
    font-size: 0.85rem;
}

@media (max-width: 768px) {
    .header {
        margin: 8px 12px 0;
        top: 8px;
    }

    .header-inner {
        padding: 0 20px;
        height: 60px;
    }

    .hamburger {
        display: flex;
        position: relative;
        z-index: 1001;
    }

    .navbar {
        position: fixed;
        top: 76px;
        right: -100%;
        width: 280px;
        height: auto;
        background: var(--bg-secondary);
        border: 1px solid var(--border);
        border-radius: 12px;
        flex-direction: column;
        justify-content: flex-start;
        padding: 12px;
        transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: -8px 8px 32px rgba(0, 0, 0, 0.5);
        z-index: 999;
    }

    .navbar.active {
        right: 12px;
    }

    .nav-links {
        flex-direction: column;
        gap: 4px;
        width: 100%;
    }

    .nav-link {
        padding: 14px 20px;
        font-size: 1rem;
        width: 100%;
        display: block;
    }

    .ad-banner {
        margin: 12px 12px;
    }

    .main-wrapper {
        margin: 0 12px;
    }

    .content-container {
        padding: 24px 20px;
        min-height: 300px;
    }

    .content-container h1 {
        font-size: 1.8rem;
    }

    .welcome-section {
        padding: 40px 10px;
    }

    .welcome-section .icon {
        font-size: 3rem;
    }

    .footer {
        margin: 0 12px 8px;
    }

    .footer-inner {
        padding: 24px 20px;
    }

    .footer-links {
        gap: 12px;
    }

    .footer-links a {
        font-size: 0.8rem;
    }

    .posts-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .single-post-layout {
        grid-template-columns: 1fr;
    }

    .post-title {
        font-size: 1.6rem;
    }

    .single-post-sidebar {
        position: static;
    }

    .category-header h1 {
        font-size: 1.5rem;
    }
}

.overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 998;
    backdrop-filter: blur(4px);
}

.overlay.active {
    display: block;
}

.error-page {
    text-align: center;
    padding: 80px 20px;
    min-height: 60vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.error-icon {
    font-size: 64px;
    color: var(--primary);
    margin-bottom: 20px;
    opacity: 0.7;
}

.error-code {
    font-size: 120px;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
    margin-bottom: 10px;
}

.error-title {
    font-size: 28px;
    color: var(--text);
    margin-bottom: 12px;
}

.error-desc {
    font-size: 16px;
    color: var(--text-muted);
    max-width: 500px;
    margin-bottom: 30px;
    line-height: 1.6;
}

.btn-home {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 28px;
    background: var(--primary);
    color: white;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
}

.btn-home:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px var(--shadow);
}
