/* Reset & Base */
:root {
    --primary-color: #00ffcc; /* Vibrant Cyberpunk Green/Cyan */
    --primary-hover: #00d9a6;
    --secondary-color: #050b14; /* Deep Tech Blue/Black */
    --surface-color: #0d1522; /* Card Backgrounds */
    --text-primary: #f0f6fc;
    --text-secondary: #8b949e;
    --border-color: #1f2937;
    --link-color: #58a6ff;
    --accent-glow: 0 0 15px rgba(0, 255, 204, 0.4);
    --font-family-base: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --font-family-heading: "Space Grotesk", var(--font-family-base);
    --transition-speed: 0.3s;
}

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

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--secondary-color);
    background-image:
        radial-gradient(circle at 15% 50%, rgba(0, 255, 204, 0.03), transparent 25%),
        radial-gradient(circle at 85% 30%, rgba(88, 166, 255, 0.03), transparent 25%);
    color: var(--text-primary);
    font-family: var(--font-family-base);
    line-height: 1.7;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    font-size: 18px;
}

a {
    color: var(--link-color);
    text-decoration: none;
    transition: color var(--transition-speed) ease;
}

a:hover {
    color: var(--primary-color);
    text-shadow: 0 0 8px rgba(0, 255, 204, 0.3);
}

/* Layout */
header {
    background: rgba(13, 21, 34, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

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

.logo {
    font-family: var(--font-family-heading);
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -1px;
    display: flex;
    align-items: center;
    gap: 8px;
}

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

.nav-links {
    display: flex;
    gap: 30px;
}

.nav-links a {
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 1rem;
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -4px;
    left: 0;
    background-color: var(--primary-color);
    transition: width var(--transition-speed) ease;
}

.nav-links a:hover {
    color: var(--text-primary);
    text-shadow: none;
}

.nav-links a:hover::after {
    width: 100%;
}

main {
    flex: 1;
    padding: 60px 0;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-family-heading);
    color: #ffffff;
    margin-bottom: 1.2rem;
    line-height: 1.2;
    font-weight: 700;
}

h1 {
    font-size: 3rem;
    letter-spacing: -1px;
    margin-bottom: 1.5rem;
    background: linear-gradient(90deg, #fff, var(--text-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.article-header h1 {
    border-bottom: none;
    padding-bottom: 0;
}

h2 { font-size: 2.2rem; margin-top: 3rem; position: relative; padding-bottom: 10px; }
h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 3px;
    background: var(--primary-color);
    border-radius: 2px;
}

h3 { font-size: 1.6rem; margin-top: 2rem; color: #e1e7ef; }

p { margin-bottom: 1.5rem; color: #b3b9c5; }

ul, ol { margin-bottom: 1.5rem; padding-left: 2rem; color: #b3b9c5; }
li { margin-bottom: 0.5rem; }

/* AdSense CLS Armor (Phase 4 Requirement) */
.ad-container-leaderboard {
    min-height: 90px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 40px 0;
    background: rgba(255, 255, 255, 0.02);
    border: 1px dashed rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    position: relative;
    overflow: hidden;
}
.ad-container-leaderboard::before {
    content: 'Advertisement';
    position: absolute;
    top: 5px;
    left: 10px;
    font-size: 0.7rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
}
@media (max-width: 768px) {
    .ad-container-leaderboard {
        min-height: 250px;
    }
}

/* Blog List / Grid */
.article-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.article-card {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 2rem;
    transition: all var(--transition-speed) ease;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

.article-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--link-color));
    opacity: 0;
    transition: opacity var(--transition-speed) ease;
}

.article-card:hover {
    transform: translateY(-5px);
    border-color: rgba(0, 255, 204, 0.3);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), var(--accent-glow);
}

.article-card:hover::before {
    opacity: 1;
}

.article-title {
    font-family: var(--font-family-heading);
    font-size: 1.6rem;
    margin-bottom: 1rem;
    line-height: 1.3;
}

.article-title a {
    color: var(--text-primary);
}

.article-title a:hover {
    color: var(--primary-color);
    text-shadow: none;
    text-decoration: none;
}

.article-meta {
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-bottom: 1.5rem;
    display: flex;
    gap: 15px;
    align-items: center;
    font-weight: 500;
}

.article-excerpt {
    color: #a0a8b4;
    font-size: 1rem;
    flex-grow: 1;
    margin-bottom: 0;
}

/* Article Content Elements */
.article-content {
    background: var(--surface-color);
    padding: 3rem;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}

.article-header {
    margin-bottom: 3rem;
    text-align: center;
}

.author-bio {
    display: flex;
    align-items: center;
    gap: 20px;
    background: rgba(255,255,255,0.03);
    padding: 20px;
    border-radius: 8px;
    border-left: 4px solid var(--primary-color);
    margin: 40px 0;
}

.author-avatar {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary-color), var(--link-color));
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: bold;
    color: #000;
    font-size: 1.5rem;
}

.author-details h4 {
    margin: 0 0 5px 0;
    font-size: 1.2rem;
}
.author-details p {
    margin: 0;
    font-size: 0.95rem;
    color: var(--text-secondary);
}

/* Callouts / Warnings */
.disclaimer-box {
    background: rgba(255, 171, 0, 0.1);
    border: 1px solid rgba(255, 171, 0, 0.3);
    border-left: 4px solid #ffab00;
    padding: 1.5rem;
    border-radius: 6px;
    margin: 2rem 0;
}
.disclaimer-box p:last-child { margin-bottom: 0; }

.pro-tip {
    background: rgba(0, 255, 204, 0.05);
    border: 1px solid rgba(0, 255, 204, 0.2);
    border-left: 4px solid var(--primary-color);
    padding: 1.5rem;
    border-radius: 6px;
    margin: 2rem 0;
}
.pro-tip strong { color: var(--primary-color); }

/* Breadcrumbs */
.breadcrumbs {
    font-size: 0.9rem;
    margin-bottom: 2rem;
    color: var(--text-secondary);
}
.breadcrumbs a {
    color: var(--text-secondary);
}
.breadcrumbs a:hover {
    color: var(--primary-color);
}
.breadcrumbs span {
    margin: 0 10px;
    opacity: 0.5;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-color);
    color: var(--secondary-color);
    padding: 0.8rem 1.5rem;
    border-radius: 6px;
    font-weight: 700;
    text-decoration: none;
    margin-top: 1rem;
    transition: all var(--transition-speed) ease;
    border: none;
    cursor: pointer;
    font-family: var(--font-family-base);
}
.btn:hover {
    background: var(--primary-hover);
    box-shadow: var(--accent-glow);
    transform: translateY(-2px);
    text-decoration: none;
}

.btn-outline {
    background: transparent;
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
}
.btn-outline:hover {
    background: rgba(0, 255, 204, 0.1);
    color: var(--primary-color);
}

/* Forms */
.form-group {
    margin-bottom: 1.5rem;
}
label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #e1e7ef;
}
input, textarea {
    width: 100%;
    padding: 12px 15px;
    background-color: rgba(0,0,0,0.2);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    border-radius: 6px;
    font-family: var(--font-family-base);
    font-size: 1rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
input:focus, textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 255, 204, 0.15);
}

/* Footer */
footer {
    background-color: rgba(13, 21, 34, 0.9);
    border-top: 1px solid var(--border-color);
    padding: 4rem 0 2rem;
    margin-top: auto;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    margin-bottom: 3rem;
}

.footer-col h4 {
    color: var(--text-primary);
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
    border-bottom: none;
}

.footer-col ul {
    list-style: none;
    padding: 0;
}

.footer-col li {
    margin-bottom: 0.8rem;
}

.footer-col a {
    color: var(--text-secondary);
}

.footer-col a:hover {
    color: var(--primary-color);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255,255,255,0.05);
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 768px) {
    h1 { font-size: 2.2rem; }
    h2 { font-size: 1.8rem; }
    .nav-links { display: none; } /* Add a mobile menu toggle if needed later */
    .article-content { padding: 1.5rem; }
    .article-list { grid-template-columns: 1fr; }
}

/* 404 Page */
.error-page {
    text-align: center;
    padding: 8rem 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}
.error-code {
    font-size: 8rem;
    font-weight: 800;
    color: var(--primary-color);
    line-height: 1;
    margin-bottom: 1rem;
    text-shadow: var(--accent-glow);
    font-family: var(--font-family-heading);
}

/* Hero Section (Homepage) */
.hero {
    text-align: center;
    padding: 4rem 0 6rem;
    position: relative;
}
.hero p.lead {
    font-size: 1.4rem;
    color: var(--text-secondary);
    max-width: 800px;
    margin: 0 auto 2rem;
}

/* Store / Affiliate Modules */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    margin: 2rem 0;
}
.product-card {
    background: rgba(255,255,255,0.02);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.5rem;
    text-align: center;
    transition: all 0.2s ease;
}
.product-card:hover {
    border-color: var(--link-color);
    background: rgba(88, 166, 255, 0.05);
}
.product-img-placeholder {
    width: 100%;
    aspect-ratio: 1;
    background: #1f2937;
    border-radius: 6px;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    font-size: 2rem;
}
.product-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}
.product-price {
    color: var(--primary-color);
    font-weight: bold;
    font-size: 1.2rem;
    margin-bottom: 1rem;
}

/* Related Articles Section */
.related-articles {
    margin-top: 4rem;
    padding-top: 3rem;
    border-top: 1px solid var(--border-color);
}
.related-articles h3 {
    margin-bottom: 2rem;
}
.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}
.related-card {
    background: rgba(255,255,255,0.02);
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}
.related-card h4 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}
.related-card a {
    color: var(--text-primary);
}
.related-card a:hover {
    color: var(--primary-color);
}
