/*
Theme Name: EZ CD Key Gaming
Theme URI: https://ezcdkey.com
Author: EZ CD Key
Description: Custom dark gaming theme for the EZ CD Key blog — purple neon accents, card grid, giveaway CTAs.
Version: 1.0
License: GPL-2.0-or-later
Text Domain: ezcdkey
*/

:root {
    --bg: #0a0a11;
    --bg-soft: #0f0f1a;
    --card: #13131f;
    --card-hover: #181828;
    --border: #232338;
    --text: #e8e8f2;
    --muted: #9a9ab2;
    --accent: #7c3aed;
    --accent2: #a78bfa;
    --gradient: linear-gradient(135deg, #7c3aed, #5b21b6);
    --radius: 16px;
    --maxw: 1200px;
}

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

html { scroll-behavior: smooth; }

body {
    background: var(--bg);
    color: var(--text);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 16px;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}

body::before {
    content: '';
    position: fixed;
    inset: 0;
    background:
        radial-gradient(600px 400px at 85% -10%, rgba(124, 58, 237, 0.14), transparent 60%),
        radial-gradient(500px 350px at 0% 20%, rgba(91, 33, 182, 0.10), transparent 60%);
    pointer-events: none;
    z-index: 0;
}

a { color: var(--accent2); text-decoration: none; transition: color .2s; }
a:hover { color: #c4b5fd; }

img { max-width: 100%; height: auto; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; position: relative; z-index: 1; }

/* ============ HEADER ============ */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(10, 10, 17, 0.85);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--border);
}

.header-inner {
    display: flex;
    align-items: center;
    gap: 24px;
    height: 68px;
}

.brand {
    font-weight: 800;
    font-size: 1.25rem;
    letter-spacing: -0.02em;
    color: #fff;
    white-space: nowrap;
}

.brand .ez {
    background: linear-gradient(135deg, #a78bfa, #7c3aed);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.main-nav {
    display: flex;
    gap: 4px;
    overflow-x: auto;
    scrollbar-width: none;
    flex: 1;
}
.main-nav::-webkit-scrollbar { display: none; }

.main-nav a {
    color: var(--muted);
    font-size: .92rem;
    font-weight: 500;
    padding: 8px 14px;
    border-radius: 10px;
    white-space: nowrap;
}
.main-nav a:hover, .main-nav a.active { color: #fff; background: rgba(124, 58, 237, 0.15); }

.cta-btn {
    background: var(--gradient);
    color: #fff !important;
    font-weight: 700;
    font-size: .9rem;
    padding: 10px 20px;
    border-radius: 12px;
    white-space: nowrap;
    box-shadow: 0 4px 20px rgba(124, 58, 237, 0.35);
    transition: transform .2s, box-shadow .2s;
}
.cta-btn:hover { transform: translateY(-2px); box-shadow: 0 6px 28px rgba(124, 58, 237, 0.5); }

/* ============ HERO ============ */
.hero {
    text-align: center;
    padding: 72px 20px 56px;
    position: relative;
}

.hero-badge {
    display: inline-block;
    font-size: .8rem;
    font-weight: 600;
    color: var(--accent2);
    background: rgba(124, 58, 237, 0.12);
    border: 1px solid rgba(124, 58, 237, 0.3);
    padding: 6px 16px;
    border-radius: 999px;
    margin-bottom: 20px;
}

.hero h1 {
    font-size: clamp(2.1rem, 5vw, 3.4rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.15;
    margin-bottom: 18px;
}

.hero h1 .grad {
    background: linear-gradient(135deg, #c4b5fd, #7c3aed);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero p {
    color: var(--muted);
    font-size: 1.1rem;
    max-width: 620px;
    margin: 0 auto 30px;
}

.hero-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

.btn-primary {
    background: var(--gradient);
    color: #fff !important;
    font-weight: 700;
    padding: 14px 30px;
    border-radius: 14px;
    font-size: 1rem;
    box-shadow: 0 6px 26px rgba(124, 58, 237, 0.4);
    transition: transform .2s, box-shadow .2s;
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 34px rgba(124, 58, 237, 0.55); }

.btn-ghost {
    color: var(--text) !important;
    font-weight: 600;
    padding: 14px 30px;
    border-radius: 14px;
    border: 1px solid var(--border);
    background: rgba(255,255,255,0.03);
    transition: border-color .2s, background .2s;
}
.btn-ghost:hover { border-color: var(--accent); background: rgba(124, 58, 237, 0.08); }

/* ============ SECTION HEADINGS ============ */
.section-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin: 40px 0 24px;
}
.section-head h2 { font-size: 1.5rem; font-weight: 800; letter-spacing: -0.02em; }
.section-head a { font-size: .9rem; color: var(--muted); }
.section-head a:hover { color: var(--accent2); }

/* ============ POST GRID ============ */
.post-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 22px;
    padding-bottom: 30px;
}

.post-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform .25s, border-color .25s, box-shadow .25s;
}
.post-card:hover {
    transform: translateY(-5px);
    border-color: rgba(124, 58, 237, 0.5);
    box-shadow: 0 14px 40px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(124, 58, 237, 0.2);
}

.card-cover {
    position: relative;
    aspect-ratio: 16 / 8.2;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.card-cover::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 40%, rgba(10,10,17,0.55));
}
.card-cover .cover-emoji {
    font-size: 3.4rem;
    filter: drop-shadow(0 6px 18px rgba(0,0,0,0.4));
    transition: transform .3s;
}
.post-card:hover .cover-emoji { transform: scale(1.15) rotate(-4deg); }

.card-body { padding: 20px 22px 22px; display: flex; flex-direction: column; flex: 1; }

.card-cat {
    font-size: .72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--accent2);
    margin-bottom: 10px;
}

.card-title { font-size: 1.12rem; font-weight: 700; line-height: 1.4; margin-bottom: 10px; }
.card-title a { color: var(--text); }
.card-title a:hover { color: var(--accent2); }

.card-excerpt { color: var(--muted); font-size: .9rem; flex: 1; }

.card-meta {
    display: flex;
    gap: 14px;
    color: #6d6d85;
    font-size: .8rem;
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid var(--border);
}

/* ============ SINGLE POST ============ */
.article-wrap { max-width: 780px; margin: 0 auto; padding: 48px 20px 40px; position: relative; z-index: 1; }

.article-head { margin-bottom: 34px; }
.article-head .card-cat { font-size: .8rem; }

.article-head h1 {
    font-size: clamp(1.7rem, 4vw, 2.5rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.2;
    margin: 8px 0 16px;
}

.article-meta { color: #6d6d85; font-size: .88rem; display: flex; gap: 16px; flex-wrap: wrap; }

.article-content { font-size: 1.05rem; color: #d4d4e2; }
.article-content > * + * { margin-top: 1.15em; }
.article-content h2 {
    font-size: 1.45rem;
    font-weight: 800;
    color: #fff;
    letter-spacing: -0.01em;
    margin-top: 2em;
    padding-top: .4em;
}
.article-content h3 { font-size: 1.15rem; font-weight: 700; color: #f1f1fa; margin-top: 1.6em; }
.article-content ul, .article-content ol { padding-left: 1.4em; }
.article-content li { margin-top: .45em; }
.article-content li::marker { color: var(--accent2); }
.article-content strong { color: #fff; }
.article-content code {
    background: rgba(124, 58, 237, 0.12);
    border: 1px solid rgba(124, 58, 237, 0.25);
    padding: 2px 7px;
    border-radius: 6px;
    font-size: .88em;
    color: var(--accent2);
}
.article-content blockquote {
    border-left: 3px solid var(--accent);
    padding: 4px 0 4px 20px;
    color: var(--muted);
    font-style: italic;
}

/* Giveaway CTA box */
.giveaway-box {
    margin: 48px 0 8px;
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.14), rgba(91, 33, 182, 0.08));
    border: 1px solid rgba(124, 58, 237, 0.35);
    border-radius: var(--radius);
    padding: 30px;
    text-align: center;
}
.giveaway-box h3 { font-size: 1.3rem; font-weight: 800; margin-bottom: 8px; }
.giveaway-box p { color: var(--muted); margin-bottom: 18px; }

/* Post navigation */
.post-nav { display: flex; gap: 14px; margin-top: 34px; }
.post-nav a {
    flex: 1;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 14px 18px;
    color: var(--text);
    font-size: .9rem;
    transition: border-color .2s;
}
.post-nav a:hover { border-color: var(--accent); }
.post-nav .nav-label { display: block; color: #6d6d85; font-size: .75rem; margin-bottom: 4px; }
.post-nav .next { text-align: right; }

/* ============ PAGES ============ */
.page-title { font-size: 2rem; font-weight: 800; letter-spacing: -0.02em; margin-bottom: 26px; }

/* ============ ARCHIVE ============ */
.archive-head { padding: 44px 0 6px; }
.archive-head .kicker { color: var(--accent2); font-size: .85rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; }
.archive-head h1 { font-size: 2rem; font-weight: 800; letter-spacing: -0.02em; }
.archive-head p { color: var(--muted); margin-top: 6px; }

/* ============ PAGINATION ============ */
.pagination { display: flex; justify-content: center; padding: 10px 0 50px; }
.pagination .nav-links { display: flex; gap: 8px; }
.pagination a, .pagination span.current, .pagination span.dots {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    height: 42px;
    padding: 0 12px;
    border-radius: 10px;
    background: var(--card);
    border: 1px solid var(--border);
    color: var(--muted);
    font-weight: 600;
    font-size: .9rem;
}
.pagination a:hover { border-color: var(--accent); color: #fff; }
.pagination span.current { background: var(--gradient); border-color: transparent; color: #fff; }

/* ============ FOOTER ============ */
.site-footer {
    border-top: 1px solid var(--border);
    background: var(--bg-soft);
    margin-top: 40px;
    position: relative;
    z-index: 1;
}
.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 40px;
    padding: 46px 0 30px;
}
.footer-grid h4 { font-size: .95rem; font-weight: 700; margin-bottom: 14px; color: #fff; }
.footer-grid p { color: var(--muted); font-size: .9rem; max-width: 340px; }
.footer-grid ul { list-style: none; }
.footer-grid li { margin-bottom: 9px; }
.footer-grid li a { color: var(--muted); font-size: .9rem; }
.footer-grid li a:hover { color: var(--accent2); }
.footer-bottom {
    border-top: 1px solid var(--border);
    padding: 20px 0;
    text-align: center;
    color: #6d6d85;
    font-size: .82rem;
}

/* ============ 404 / SEARCH ============ */
.empty-state { text-align: center; padding: 90px 20px; }
.empty-state .big { font-size: 4rem; margin-bottom: 14px; }
.empty-state h1 { font-size: 1.6rem; margin-bottom: 10px; }
.empty-state p { color: var(--muted); margin-bottom: 24px; }

.search-form { display: flex; gap: 10px; max-width: 420px; margin: 0 auto; }
.search-form input[type="search"] {
    flex: 1;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 12px 16px;
    color: var(--text);
    font-size: .95rem;
    font-family: inherit;
    outline: none;
}
.search-form input[type="search"]:focus { border-color: var(--accent); }
.search-form button {
    background: var(--gradient);
    color: #fff;
    border: none;
    border-radius: 12px;
    padding: 12px 22px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
}

/* ============ RESPONSIVE ============ */
@media (max-width: 760px) {
    .header-inner { gap: 12px; }
    .hero { padding: 48px 16px 40px; }
    .footer-grid { grid-template-columns: 1fr; gap: 28px; }
    .post-nav { flex-direction: column; }
    .article-wrap { padding-top: 32px; }
}
