:root {
    --bg-color: #050508;
    --bg-secondary: #0a0b12;
    --text-main: #f0f4f8;
    --text-muted: #8c9bb3;
    --primary: #00e5ff;
    --primary-glow: rgba(0, 229, 255, 0.4);
    --secondary: #7b2cbf;
    --accent: #ff007f;
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    --gold: #fec601;
    --gold-hover: #ffcc33;
    --gold-glow: rgba(254, 198, 1, 0.4);
}

/* Background Ambient Glow */
body::before {
    content: '';
    position: fixed;
    top: -20%;
    left: -10%;
    width: 50vw;
    height: 50vw;
    background: radial-gradient(circle, var(--primary-glow) 0%, transparent 60%);
    filter: blur(100px);
    z-index: -1;
    opacity: 0.5;
    pointer-events: none;
}

body::after {
    content: '';
    position: fixed;
    bottom: -20%;
    right: -10%;
    width: 60vw;
    height: 60vw;
    background: radial-gradient(circle, rgba(123, 44, 191, 0.3) 0%, transparent 60%);
    filter: blur(120px);
    z-index: -1;
    opacity: 0.5;
    pointer-events: none;
}

/* Blog Container */
.blog-container {
    padding-top: 72px;
    /* Standard header height */
}

/* Hero Section Sync */
.blog-hero {
    padding: 100px 0 60px !important;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.gradient-text {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.section-badge {
    display: inline-block;
    padding: 0.4rem 1.2rem;
    background: rgba(0, 229, 255, 0.1);
    border: 1px solid rgba(0, 229, 255, 0.2);
    color: var(--primary);
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 1.5rem;
}

.blog-hero h1 {
    font-size: clamp(2.5rem, 8vw, 4.2rem);
    font-weight: 900;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    color: var(--text-main);
}

@media (max-width: 768px) {
    .blog-hero {
        padding: 80px 0 40px !important;
    }

    .blog-hero h1 {
        font-size: 2.2rem;
    }
}

.blog-hero p {
    font-size: 0.95rem;
    /* Reduced from 1.1rem */
    color: var(--text-muted);
    max-width: 700px;
    margin: 0 auto 2rem;
    line-height: 1.6;
}

/* Specific adjustment for single posts hero to be even tighter */
.single-post-hero {
    padding: 60px 0 30px !important;
}

.single-post-hero h1 {
    font-size: clamp(2rem, 6vw, 3rem);
    margin-bottom: 0;
}

/* Sub-header mimics PrivateMovieZ categories nav */
/* Refined Sub-header & Search */
.blog-sub-header {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: 50px;
    padding: 10px 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 2rem auto 4rem;
    max-width: 900px;
    gap: 20px;
    flex-wrap: wrap;
    backdrop-filter: blur(10px);
}

@media (max-width: 768px) {
    .blog-sub-header {
        border-radius: 12px;
        justify-content: center;
        padding: 15px;
    }
}

.blog-categories ul {
    list-style: none;
    display: flex;
    gap: 20px;
    margin: 0;
    padding: 0;
}

.blog-sub-header a {
    color: var(--text-main);
    font-size: 0.9rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
}

.blog-sub-header a:hover {
    color: var(--primary);
}

.blog-sub-header a i {
    color: var(--primary);
}

/* Premium Search Form */
.blog-search {
    flex-grow: 0;
}

.blog-search form {
    display: flex;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 30px;
    overflow: hidden;
    transition: var(--transition);
}

.blog-search form:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 10px rgba(0, 229, 255, 0.2);
}

.blog-search label {
    margin-bottom: 0px;
    display: flex;
    align-items: center;
}

/* Hide WP default search labels */
.blog-search .screen-reader-text,
.blog-search label>span:first-child {
    border: 0;
    clip: rect(1px, 1px, 1px, 1px);
    -webkit-clip-path: inset(50%);
    clip-path: inset(50%);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    width: 1px;
    word-wrap: normal !important;
}

.blog-search input[type="text"],
.blog-search input[type="search"] {
    background: transparent;
    border: none;
    padding: 8px 15px;
    color: var(--text-main);
    outline: none;
    font-size: 0.9rem;
    width: 160px;
}

.blog-search button,
.blog-search input[type="submit"] {
    background: var(--primary);
    color: #000;
    border: none;
    padding: 8px 20px;
    cursor: pointer;
    font-family: inherit;
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    transition: var(--transition);
}

.blog-search button:hover,
.blog-search input[type="submit"]:hover {
    background: var(--gold);
}

/* Helper: Hidden but accessible text */
.screen-reader-text {
    clip: rect(1px, 1px, 1px, 1px);
    position: absolute !important;
    height: 1px;
    width: 1px;
    overflow: hidden;
}

/* Navigation & Header Components */
.nav-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.nav-currency {
    position: relative;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-main);
}

.currency-selected {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    transition: var(--transition);
}

.currency-selected:hover {
    border-color: var(--primary);
}

.currency-selected span {
    color: var(--primary);
}

.currency-dropdown {
    position: absolute;
    top: calc(100% + 15px);
    right: 0;
    background: #0d0e1a;
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 6px;
    min-width: 130px;
    display: none;
    z-index: 1000;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(20px);
}

.currency-dropdown.show {
    display: block;
    animation: fadeInDown 0.3s ease;
}

/* Overhauled Currency Item Styles for precise alignment */
.nav-currency .currency-dropdown .currency-item {
    padding: 10px 16px !important;
    border-radius: 8px;
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 12px !important;
    transition: var(--transition);
    cursor: pointer;
    color: var(--text-muted);
    width: 100% !important;
    box-sizing: border-box !important;
}

.nav-currency .currency-dropdown .currency-item span {
    width: 20px !important;
    display: inline-flex !important;
    justify-content: center !important;
    align-items: center !important;
    font-weight: 700;
    color: var(--text-muted);
    flex: 0 0 auto !important;
    margin: 0 !important;
    transition: var(--transition);
}

.nav-currency .currency-dropdown .currency-item:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-main);
}

.nav-currency .currency-dropdown .currency-item:hover span {
    color: var(--primary);
}

.nav-currency .currency-dropdown .currency-item.active {
    color: var(--primary);
    background: rgba(0, 229, 255, 0.1);
}

.nav-currency .currency-dropdown .currency-item.active span {
    color: var(--primary);
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Post Grid Layout */
.post-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

@media (max-width: 768px) {
    .post-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 15px;
    }
}

.post-card {
    background: var(--bg-secondary);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    overflow: hidden;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.post-card:hover {
    transform: translateY(-5px);
    border-color: rgba(0, 229, 255, 0.3);
    box-shadow: 0 5px 20px rgba(0, 229, 255, 0.1);
}

.post-thumbnail {
    width: 100%;
    position: relative;
    padding-top: 150%;
    /* 2:3 Aspect ratio like movie posters */
    overflow: hidden;
    background: var(--bg-color);
}

.post-thumbnail img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.post-card:hover .post-thumbnail img {
    transform: scale(1.05);
}

.post-info {
    padding: 15px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.post-meta {
    margin-bottom: 8px;
}

.post-cat {
    background: rgba(0, 229, 255, 0.1);
    color: var(--primary);
    font-size: 0.75rem;
    padding: 3px 8px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
    display: inline-block;
}

.post-title {
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.post-title a {
    color: var(--text-main);
    text-decoration: none;
}

.post-title a:hover {
    color: var(--primary);
}

.post-date {
    font-size: 0.8rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 5px;
    margin-top: auto;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin: 40px 0;
}

.pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: var(--bg-secondary);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    color: var(--text-main);
    transition: var(--transition);
    text-decoration: none;
}

.pagination .page-numbers:hover,
.pagination .page-numbers.current {
    background: var(--primary);
    color: #000;
    border-color: var(--primary);
}

/* Single Post Content Styling for readability */
.single-post-wrapper {
    max-width: 900px;
    margin: 0 auto;
    padding-top: 20px;
}

.single-post-content {
    font-size: 1.15rem;
    line-height: 1.8;
    color: var(--text-main);
    overflow-wrap: break-word;
    word-wrap: break-word;
}

/* Post Content Safety: Keep everything in layout */
.single-post-content img,
.single-post-content figure,
.single-post-content table,
.single-post-content iframe,
.single-post-content video {
    max-width: 100% !important;
    height: auto !important;
    border-radius: 12px;
}

.single-post-content table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 2rem;
    display: block;
    overflow-x: auto;
}

.single-post-content pre,
.single-post-content code {
    max-width: 100%;
    white-space: pre-wrap;
    word-break: break-all;
    background: var(--bg-secondary);
    padding: 15px;
    border-radius: 8px;
    border: 1px solid var(--glass-border);
}

.single-post-content h2,
.single-post-content h3 {
    margin-top: 1.5em;
    margin-bottom: 0.5em;
    color: var(--text-main);
}

.single-post-content p {
    margin-bottom: 1.5em;
}

.single-post-content a {
    color: var(--primary);
    text-decoration: underline;
}

.single-post-content a:hover {
    color: var(--gold);
}

/* Performance & Smooth Scrolling Classes */
html,
body {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    text-rendering: optimizeLegibility;
}

img {
    max-width: 100%;
    height: auto;
    content-visibility: auto;
}

.post-card {
    will-change: transform;
    /* CSS containment for performance */
    contain: layout style;
}