@import url('https://fonts.googleapis.com/css2?family=DM+Sans:opsz,wght@9..40,400;500;700&family=Inter:wght@300;400;500;600&display=swap');

:root {
    --bg-color: #050505;
    --bg-secondary: #0a0a0a;
    --text-primary: #e0e0e0;
    /* Slightly softer white */
    --text-secondary: #a0a0a0;
    --accent-color: #2ed573;
    --accent-glow: rgba(46, 213, 115, 0.15);
    --border-color: #222;
    --card-bg: #111;

    --font-sans: 'Inter', sans-serif;
    --font-display: 'DM Sans', sans-serif;

    --max-width: 1200px;
    --read-width: 680px;
    /* Optimal reading width */
}

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

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: var(--font-sans);
    line-height: 1.8;
    /* Relaxed reading */
    -webkit-font-smoothing: antialiased;
    font-size: 18px;
    /* Larger base size */
    overflow-x: hidden;
    /* Prevent horizontal scroll */
    width: 100%;
}

/* --- Layout --- */
.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
}

/* --- Typography --- */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-display);
    font-weight: 700;
    color: white;
    line-height: 1.3;
    letter-spacing: -0.02em;
    /* Tighten headers */
}

a {
    color: inherit;
    text-decoration: none;
    transition: 0.2s;
}

a:hover {
    color: var(--accent-color);
}

/* --- Components --- */
.btn {
    display: inline-block;
    padding: 14px 28px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    text-align: center;
}

.btn-primary {
    background-color: var(--accent-color);
    color: #000;
    box-shadow: 0 4px 14px var(--accent-glow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(46, 213, 115, 0.3);
}

.btn-block {
    display: block;
    width: 100%;
}

/* --- Header --- */
header {
    padding: 20px 0;
    border-bottom: 1px solid var(--border-color);
    background: rgba(5, 5, 5, 0.9);
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 1000;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 1.5rem;
    letter-spacing: -0.5px;
}

.logo span {
    color: var(--accent-color);
}

/* --- Magazine Layout --- */

/* Hero Section */
.article-hero {
    position: relative;
    height: 60vh;
    min-height: 400px;
    display: flex;
    align-items: flex-end;
    padding-bottom: 60px;
    margin-bottom: 60px;
    margin-top: -80px;
    /* Pull behind header */
    background: #111;
    /* Fallback */
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    z-index: 1;
    opacity: 0.6;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(5, 5, 5, 0.1) 0%, rgba(5, 5, 5, 1) 100%);
    z-index: 2;
}

.hero-content {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
}

.hero-category {
    background: var(--accent-color);
    color: #000;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 2px;
    padding: 6px 12px;
    font-size: 0.8rem;
    display: inline-block;
    margin-bottom: 20px;
    border-radius: 4px;
}

.hero-title {
    font-size: 3.5rem;
    line-height: 1.1;
    margin-bottom: 24px;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.8);
}

.hero-meta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.author-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 2px solid var(--accent-color);
}

.meta-text {
    text-align: left;
    display: flex;
    flex-direction: column;
}

.author-name {
    font-weight: 700;
    color: white;
}

.publish-date {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* Grid Layout */
.article-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    /* Prevent blowout */
    gap: 60px;
    position: relative;
    padding-bottom: 100px;
}

/* Main Content */
.article-body {
    font-size: 1.2rem;
    /* Reverted to match editor default */
    color: #e0e0e0;
    line-height: 1.8;
    max-width: 680px;
    /* Constrain reading width */
    margin: 0 auto;
    /* Center it if needed, though grid handles layout */
}

.article-lead {
    font-size: 1.4rem;
    font-weight: 300;
    color: white;
    line-height: 1.5;
    margin-bottom: 40px;
}

.article-divider {
    border: 0;
    height: 1px;
    background: linear-gradient(to right, var(--accent-color), transparent);
    margin-bottom: 40px;
    width: 100px;
}

/* Sidebar */
.article-sidebar {
    position: sticky;
    top: 100px;
    height: fit-content;
}

.sidebar-widget {
    background: #111;
    border: 1px solid var(--border-color);
    padding: 24px;
    border-radius: 12px;
    margin-bottom: 30px;
}

.sidebar-widget h3 {
    font-size: 1.1rem;
    margin-bottom: 15px;
    border-bottom: 2px solid var(--accent-color);
    display: inline-block;
    padding-bottom: 5px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.author-widget p {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin-bottom: 15px;
}

.text-link {
    color: var(--accent-color);
    font-weight: 600;
    font-size: 0.9rem;
}

.trending-list {
    list-style: none;
    padding: 0;
}

.trending-list li {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.trending-list li:last-child {
    border: 0;
    margin: 0;
    padding: 0;
}

.trending-list .number {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 700;
    color: #333;
}

.trending-list a {
    font-weight: 600;
    font-size: 1rem;
    line-height: 1.3;
}

.sticky-cta {
    background: linear-gradient(145deg, #1a1a1a, #0d0d0d);
    border: 1px solid var(--accent-color);
    text-align: center;
}

.sticky-cta h4 {
    font-size: 1.5rem;
    margin-bottom: 10px;
}

.sticky-cta p {
    font-size: 0.9rem;
    margin-bottom: 20px;
    color: var(--text-secondary);
}

/* Footer Form */
.article-footer-cta {
    background: #111;
    padding: 40px;
    border-radius: 16px;
    text-align: center;
    margin-top: 60px;
    border: 1px dashed #333;
}

.footer-form {
    display: flex;
    gap: 10px;
    max-width: 400px;
    margin: 20px auto 0;
}

.footer-form input {
    flex: 1;
    background: #000;
    border: 1px solid #333;
    padding: 12px;
    color: white;
    border-radius: 6px;
}

.footer-form button {
    background: var(--accent-color);
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    font-weight: 700;
    cursor: pointer;
}

/* Mobile */
@media (max-width: 900px) {
    .article-grid {
        grid-template-columns: 1fr;
    }

    .article-sidebar {
        position: static;
        margin-top: 60px;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .article-hero {
        height: 50vh;
    }
}

/* Block Spacing & Typography */
.article-content p {
    margin-bottom: 2.2em;
    /* More space between paragraphs */
    font-weight: 400;
}

.article-delimiter {
    text-align: center;
    font-size: 0;
    /* Hide text */
    color: transparent;
    height: 2px;
    background: var(--accent-color);
    margin: 3rem auto;
    width: 150px;
    border-radius: 2px;
}

.article-content h2 {
    font-size: 2.2rem;
    margin-top: 2.5em;
    margin-bottom: 0.8em;
    color: white;
    border-bottom: 1px solid #222;
    padding-bottom: 15px;
}

.article-content h3 {
    font-size: 1.75rem;
    margin-top: 2em;
    margin-bottom: 0.8em;
    color: white;
}

/* Lists */
.article-content ul,
.article-content ol {
    margin-bottom: 2.5em;
    padding-left: 2.5em;
    /* More indentation */
}

.article-content li {
    margin-bottom: 1em;
    /* More space between items */
    padding-left: 0.5em;
    position: relative;
}

.article-content ul {
    list-style: none;
}

.article-content ul li::before {
    content: "•";
    color: var(--accent-color);
    font-weight: bold;
    display: inline-block;
    width: 1em;
    margin-left: -1em;
    font-size: 1.2em;
    /* Larger bullet */
}

/* Quotes */
.article-quote {
    margin: 4rem 0;
    padding: 2rem 3rem;
    border-left: 4px solid var(--accent-color);
    background: linear-gradient(90deg, rgba(46, 213, 115, 0.05) 0%, transparent 100%);
}

.article-quote p {
    font-size: 1.3rem;
    /* Smaller quote text */
    font-family: var(--font-display);
    font-style: italic;
    color: white;
    margin-bottom: 0;
    line-height: 1.6;
}

.article-content a {
    border-bottom: 1px solid var(--accent-color);
}

.article-image {
    margin: 3rem 0;
}

.article-image img {
    width: 100%;
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.article-image figcaption {
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-top: 12px;
}

.article-quote {
    margin: 3rem 0;
    padding: 2rem;
    background: var(--card-bg);
    border-left: 4px solid var(--accent-color);
    border-radius: 0 12px 12px 0;
}

.article-quote p {
    font-family: var(--font-display);
    font-size: 1.4rem;
    font-style: italic;
    color: white;
    margin: 0;
}

.article-quote cite {
    display: block;
    margin-top: 10px;
    color: var(--text-secondary);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-style: normal;
}

.article-code {
    background: #0d0d0d;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    overflow-x: auto;
    font-family: 'Fira Code', monospace;
    font-size: 0.9rem;
    margin: 2rem 0;
    color: #e0e0e0;
}

.affiliate-cta {
    background: linear-gradient(145deg, #111 0%, #0a0a0a 100%);
    border: 1px solid var(--border-color);
    padding: 40px;
    border-radius: 16px;
    text-align: center;
    margin: 4rem 0;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.affiliate-cta .btn {
    font-size: 1.2rem;
    padding: 16px 40px;
}

.affiliate-disclosure {
    margin-top: 16px;
    font-size: 0.8rem;
    color: #555;
    text-transform: uppercase;
}

.inline-optin {
    background: var(--card-bg);
    border: 1px dashed #333;
    padding: 40px;
    text-align: center;
    margin: 4rem 0;
    border-radius: 16px;
}

.inline-optin h4 {
    font-size: 1.8rem;
    margin-bottom: 10px;
}

.inline-optin p {
    color: var(--text-secondary);
    margin-bottom: 24px;
}

.inline-optin .optin-form {
    display: flex;
    gap: 12px;
    justify-content: center;
    max-width: 500px;
    margin: 0 auto;
}

.inline-optin input {
    flex: 1;
    background: #050505;
    border: 1px solid var(--border-color);
    padding: 14px;
    border-radius: 8px;
    color: white;
}

.inline-optin button {
    background: var(--accent-color);
    border: none;
    padding: 14px 28px;
    border-radius: 8px;
    font-weight: 700;
    cursor: pointer;
    color: black;
}

.product-card-embed {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #111;
    padding: 20px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    margin: 3rem 0;
}

.product-info strong {
    font-size: 1.1rem;
    display: block;
}

/* --- Blog Browser --- */
.blog-header {
    text-align: center;
    padding: 80px 0 40px;
}

.blog-title {
    font-size: 4rem;
    margin-bottom: 20px;
    background: linear-gradient(to right, #fff, #888);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.filter-bar {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 60px;
    flex-wrap: wrap;
}

.filter-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid #333;
    color: #888;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s;
}

.filter-btn:hover,
.filter-btn.active {
    background: white;
    color: black;
    border-color: white;
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 40px;
    margin-bottom: 80px;
}

.blog-card {
    background: #111;
    border: 1px solid #222;
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.3s, border-color 0.3s;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.blog-card:hover {
    transform: translateY(-5px);
    border-color: #333;
}

.card-image {
    width: 100%;
    height: 240px;
    background-size: cover;
    background-position: center;
    position: relative;
}

.card-category {
    position: absolute;
    top: 15px;
    left: 15px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.75rem;
    text-transform: uppercase;
    font-weight: 700;
    backdrop-filter: blur(4px);
}

.card-content {
    padding: 24px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.card-title {
    font-size: 1.5rem;
    margin-bottom: 12px;
    line-height: 1.3;
}

.card-excerpt {
    color: #888;
    font-size: 0.95rem;
    margin-bottom: 20px;
    line-height: 1.6;
    flex-grow: 1;
}

.card-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    border-top: 1px solid #222;
    padding-top: 20px;
    margin-top: auto;
}

.meta-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
}

.meta-info {
    display: flex;
    flex-direction: column;
    font-size: 0.8rem;
}

.meta-author {
    color: white;
    font-weight: 600;
}

.meta-date {
    color: #666;
}

/* --- Footer --- */
footer {
    border-top: 1px solid var(--border-color);
    padding: 60px 0;
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.9rem;
}