* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background: #eef1f5;
    color: #2d2d2d;
    line-height: 1.8;
}

.site-wrapper {
    max-width: 1340px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ===== HEADER ===== */
header {
    background: linear-gradient(135deg, #1a1a2e, #16213e, #0f3460);
    color: #fff;
    border-radius: 0 0 16px 16px;
    padding: 44px 0 32px;
    text-align: center;
    margin-bottom: 20px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.18);
    position: relative;
    overflow: hidden;
}

header::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 30% 50%, rgba(79, 195, 247, 0.06) 0%, transparent 50%);
    pointer-events: none;
}

header h1 {
    font-size: 3.1rem;
    letter-spacing: 3px;
    text-transform: uppercase;
    position: relative;
}

header h1 a {
    color: #fff;
    text-decoration: none;
}

.accent {
    color: #4fc3f7;
}

.tagline {
    color: #90a4ae;
    font-size: 1rem;
    margin-top: 6px;
    font-style: italic;
    letter-spacing: 1.5px;
    position: relative;
}

/* ===== LAYOUT: MAIN + SIDEBAR ===== */
.content-wrapper {
    display: flex;
    gap: 25px;
    align-items: flex-start;
}

main {
    flex: 1;
    min-width: 0;
}

.sidebar {
    width: 320px;
    flex-shrink: 0;
    position: sticky;
    top: 20px;
}

.sidebar-box {
    background: #fff;
    border: 1px solid #dfe3e8;
    border-radius: 10px;
    padding: 22px;
    margin-bottom: 20px;
    box-shadow: 0 1px 6px rgba(0, 0, 0, 0.03);
}

.sidebar-box h3 {
    font-size: 1.1rem;
    margin-bottom: 8px;
    color: #1a1a2e;
    border-bottom: 2px solid #4fc3f7;
    display: inline-block;
    padding-bottom: 4px;
}

.sidebar-box p {
    font-size: 0.9rem;
    color: #666;
}

/* ===== POST CARDS ===== */
.post-card {
    background: #fff;
    border: 1px solid #dfe3e8;
    border-radius: 10px;
    padding: 26px 28px;
    margin-bottom: 18px;
    transition: transform 0.2s, box-shadow 0.2s;
    border-left: 4px solid #4fc3f7;
    box-shadow: 0 1px 6px rgba(0, 0, 0, 0.03);
}

.post-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 22px rgba(0, 0, 0, 0.08);
}

.post-card h2 {
    font-size: 1.25rem;
    margin-bottom: 8px;
    line-height: 1.4;
}

.post-card h2 a {
    color: #1a1a2e;
    text-decoration: none;
    transition: color 0.2s;
}

.post-card h2 a:hover {
    color: #4fc3f7;
}

.meta {
    font-size: 0.82rem;
    color: #999;
    margin-bottom: 8px;
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}

.meta .date {
    background: #eef1f5;
    padding: 3px 12px;
    border-radius: 20px;
    font-size: 0.78rem;
    color: #666;
}

.meta .author {
    font-style: italic;
}

.excerpt {
    color: #555;
    margin: 10px 0 16px;
    font-size: 0.93rem;
}

.read-more {
    color: #fff;
    background: #1a1a2e;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.85rem;
    padding: 8px 20px;
    border-radius: 6px;
    display: inline-block;
    transition: background 0.2s, transform 0.2s;
}

.read-more:hover {
    background: #4fc3f7;
    color: #1a1a2e;
    transform: translateX(2px);
}

/* ===== AD CONTAINERS ===== */
.ad-container {
    text-align: center;
    margin: 18px 0;
    padding: 10px;
    background: #f8f9fa;
    border: 1px dashed #ddd;
    border-radius: 8px;
    overflow: hidden;
}

.ad-leaderboard {
    margin: 18px auto;
    max-width: 100%;
}

.ad-between-posts {
    margin: 20px 0;
}

.ad-in-content {
    margin: 25px auto;
    max-width: 100%;
}

.ad-sidebar {
    margin-bottom: 20px;
}

/* ===== SINGLE POST ===== */
.single-post-main {
    flex: 1;
}

.back-link {
    display: inline-block;
    margin-bottom: 18px;
    color: #fff;
    background: #1a1a2e;
    text-decoration: none;
    font-size: 0.88rem;
    padding: 8px 18px;
    border-radius: 6px;
    transition: background 0.2s;
}

.back-link:hover {
    background: #4fc3f7;
    color: #1a1a2e;
}

.post-full {
    background: #fff;
    border: 1px solid #dfe3e8;
    border-radius: 10px;
    padding: 40px 42px;
    box-shadow: 0 1px 6px rgba(0, 0, 0, 0.03);
}

.post-full h1 {
    font-size: 2.1rem;
    margin-bottom: 10px;
    line-height: 1.3;
    color: #1a1a2e;
}

.post-full .meta {
    margin-bottom: 25px;
    padding-bottom: 18px;
    border-bottom: 2px solid #eef1f5;
}

.post-full .content p {
    margin-bottom: 18px;
    font-size: 1.05rem;
    color: #444;
}

.post-full .content h2 {
    margin: 32px 0 12px;
    font-size: 1.5rem;
    color: #1a1a2e;
    border-bottom: 2px solid #4fc3f7;
    padding-bottom: 6px;
    display: inline-block;
}

.post-full .content h3 {
    margin: 26px 0 10px;
    font-size: 1.25rem;
    color: #1a1a2e;
}

.post-full .content h4 {
    margin: 22px 0 8px;
    font-size: 1.1rem;
    color: #1a1a2e;
}

.post-full .content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 20px 0;
}

.post-full .content a {
    color: #2196F3;
}

.post-full .content a:hover {
    text-decoration: underline;
}

.post-full .content ul,
.post-full .content ol {
    margin: 15px 0 15px 28px;
    color: #444;
}

.post-full .content li {
    margin-bottom: 6px;
}

.post-full .content blockquote {
    border-left: 4px solid #4fc3f7;
    padding: 15px 22px;
    margin: 22px 0;
    color: #555;
    font-style: italic;
    background: #f8f9fa;
    border-radius: 0 8px 8px 0;
}

.post-full .content pre,
.post-full .content code {
    background: #f5f5f5;
    padding: 3px 7px;
    border-radius: 4px;
    font-size: 0.92rem;
    font-family: 'Courier New', monospace;
}

.post-full .content pre {
    padding: 18px;
    overflow-x: auto;
    margin: 18px 0;
    border: 1px solid #e0e0e0;
}

.post-full .content table {
    width: 100%;
    border-collapse: collapse;
    margin: 18px 0;
}

.post-full .content th,
.post-full .content td {
    border: 1px solid #dfe3e8;
    padding: 10px 14px;
    text-align: left;
}

.post-full .content th {
    background: #eef1f5;
    font-weight: 700;
}

/* ===== NOT FOUND ===== */
.not-found {
    text-align: center;
    padding: 80px 0;
    background: #fff;
    border-radius: 10px;
}

.not-found h1 {
    font-size: 2rem;
    margin-bottom: 10px;
    color: #1a1a2e;
}

.not-found a {
    color: #4fc3f7;
    font-weight: 600;
}

/* ===== FOOTER ===== */
footer {
    text-align: center;
    padding: 22px 0;
    margin-top: 25px;
    color: #999;
    font-size: 0.85rem;
    border-top: 1px solid #dfe3e8;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1000px) {
    .content-wrapper {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        position: static;
    }

    .ad-leaderboard div,
    .ad-between-posts div,
    .ad-in-content div {
        min-width: auto !important;
    }
}

@media (max-width: 600px) {
    .site-wrapper {
        padding: 0 10px;
    }

    header h1 {
        font-size: 2rem;
    }

    header {
        padding: 25px 10px 20px;
    }

    .post-card {
        padding: 18px 16px;
    }

    .post-full {
        padding: 22px 18px;
    }

    .post-full h1 {
        font-size: 1.4rem;
    }

    .post-full .content p {
        font-size: 0.98rem;
    }

    .ad-container {
        padding: 5px;
    }

    .ad-leaderboard div,
    .ad-between-posts div,
    .ad-in-content div {
        min-width: auto !important;
    }
}
