/* ============================================================
   PUBG Mobile Codes - Ana tema
   Modern, mobil uyumlu, CSS değişkenleri ile tema desteği
   ============================================================ */

:root {
    --brand: #e2231a;
    --brand-dark: #b81b14;
    --brand-soft: rgba(226, 35, 26, .12);
    --accent: #00b06b;
    --warning: #f7a800;
    --info: #00a3ff;

    --bg: #0b0f16;
    --bg-alt: #111726;
    --surface: #151c2c;
    --surface-2: #1b2436;
    --border: #253048;
    --text: #e8eefc;
    --text-muted: #93a1bd;
    --shadow: 0 10px 30px rgba(0, 0, 0, .35);
    --radius: 14px;
    --radius-sm: 9px;
    --container: 1240px;
    /* Mobil yapışkan reklamın gerçek yüksekliği JS tarafından yazılır */
    --sticky-ad-height: 0px;
    --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

html[data-theme="light"] {
    --bg: #f4f6fb;
    --bg-alt: #ffffff;
    --surface: #ffffff;
    --surface-2: #f8fafc;
    --border: #e2e8f0;
    --text: #101828;
    --text-muted: #5b6b7f;
    --shadow: 0 8px 24px rgba(16, 24, 40, .08);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; /* Yatay taşmayı güvenlik ağı olarak kes (sticky konumlandırmayı bozmaz) */ overflow-x: clip; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font);
    font-size: 16px;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}

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

a { color: inherit; text-decoration: none; }
a:hover { color: var(--brand); }

h1, h2, h3, h4 { line-height: 1.25; margin: 0 0 .5em; font-weight: 800; letter-spacing: -.01em; }
h1 { font-size: clamp(1.6rem, 3.4vw, 2.4rem); }
h2 { font-size: clamp(1.25rem, 2.4vw, 1.7rem); }
h3 { font-size: 1.15rem; }

p { margin: 0 0 1em; }

code, pre { font-family: var(--mono); }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 18px; }

.sr-only {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

.skip-link {
    position: absolute; left: -9999px; top: 0; background: var(--brand); color: #fff;
    padding: 10px 16px; z-index: 999; border-radius: 0 0 10px 0;
}
.skip-link:focus { left: 0; }

/* ----------------------------------------------------------- Header */
.site-header {
    background: var(--bg-alt);
    border-bottom: 1px solid var(--border);
    /* Sabit değil: sayfa kaydırılırken yukarı kayıp gider */
    position: relative; z-index: 60;
}
.header-bar { border-bottom: 1px solid transparent; }
.header-inner { display: flex; align-items: center; gap: 14px; min-height: 66px; }

.brand { display: flex; align-items: center; gap: 10px; font-weight: 900; font-size: 1.25rem; min-width: 0; }
.brand-mark {
    width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center;
    background: linear-gradient(135deg, var(--brand), #ff6b3d); color: #fff; font-size: 1.1rem;
    box-shadow: 0 6px 16px rgba(226, 35, 26, .35);
}
.brand-logo { max-height: 40px; width: auto; }
.brand-text { background: linear-gradient(120deg, var(--text), var(--brand)); -webkit-background-clip: text; background-clip: text; color: transparent; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.main-nav { flex: 1; }
.nav-close { display: none; }
.main-nav ul { display: flex; gap: 4px; list-style: none; margin: 0; padding: 0; flex-wrap: wrap; }
.main-nav a {
    display: inline-block; padding: 9px 13px; border-radius: 10px; font-weight: 600;
    font-size: .93rem; color: var(--text-muted); transition: .18s;
}
.main-nav a:hover { background: var(--surface-2); color: var(--text); }
.main-nav a.is-active { background: var(--brand-soft); color: var(--brand); }

.header-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }

.search-form { position: relative; display: flex; align-items: center; background: var(--surface); border: 1px solid var(--border); border-radius: 999px; padding: 4px 6px 4px 14px; min-width: 260px; }
.search-form input { border: 0; background: transparent; color: var(--text); outline: none; font-size: .9rem; width: 100%; padding: 6px 0; }
.search-form button { border: 0; background: var(--brand); color: #fff; width: 32px; height: 32px; border-radius: 999px; display: grid; place-items: center; cursor: pointer; }
.search-form button:hover { background: var(--brand-dark); }

.search-suggest {
    position: absolute; top: calc(100% + 8px); left: 0; right: 0; background: var(--surface);
    border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow);
    padding: 8px; max-height: 380px; overflow: auto; z-index: 70;
}
.suggest-group { padding: 6px 8px 2px; font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: var(--text-muted); font-weight: 700; }
.suggest-item { display: flex; justify-content: space-between; gap: 10px; padding: 9px 10px; border-radius: 9px; font-size: .9rem; }
.suggest-item:hover { background: var(--surface-2); }
.suggest-item code { font-size: .8rem; color: var(--accent); }

.theme-toggle, .nav-toggle {
    background: var(--surface); border: 1px solid var(--border); color: var(--text);
    width: 38px; height: 38px; border-radius: 10px; cursor: pointer; display: grid; place-items: center; font-size: 1rem;
}
.theme-toggle:hover { border-color: var(--brand); color: var(--brand); }
.nav-toggle { display: none; flex-direction: column; gap: 4px; padding: 10px; }
.nav-toggle span { display: block; width: 18px; height: 2px; background: var(--text); border-radius: 2px; }

/* ----------------------------------------------------------- Hero */
.site-main { padding: 26px 0 40px; }

.hero {
    display: grid; grid-template-columns: 1.15fr .85fr; gap: 26px; align-items: center;
    background: radial-gradient(1000px 400px at 10% -10%, var(--brand-soft), transparent 60%), var(--surface);
    border: 1px solid var(--border); border-radius: 22px; padding: 34px; margin-bottom: 30px;
}
.hero-eyebrow { display: inline-block; background: var(--brand-soft); color: var(--brand); padding: 6px 12px; border-radius: 999px; font-size: .8rem; font-weight: 700; margin-bottom: 14px; }
.hero h1 { margin-bottom: .4em; }
.hero p { color: var(--text-muted); font-size: 1.02rem; max-width: 56ch; }
.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; margin: 18px 0 22px; }
.hero-stats { display: flex; gap: 26px; margin: 0; }
.hero-stats dt { font-size: 1.35rem; font-weight: 800; color: var(--brand); }
.hero-stats dd { margin: 0; font-size: .82rem; color: var(--text-muted); }

.hero-featured .hero-card { display: block; background: var(--surface-2); border: 1px solid var(--border); border-radius: 18px; overflow: hidden; transition: .2s; }
.hero-featured .hero-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.hero-card img { aspect-ratio: 16/9; object-fit: cover; width: 100%; }
.hero-card-body { padding: 16px; }
.hero-card-body h2 { font-size: 1.1rem; margin-bottom: .35em; }
.hero-card-body p { color: var(--text-muted); font-size: .89rem; margin: 0; }
.hero-chip { display: inline-block; font-size: .72rem; font-weight: 700; color: var(--brand); background: var(--brand-soft); padding: 3px 9px; border-radius: 999px; margin-bottom: 8px; }

/* ----------------------------------------------------------- Butonlar */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 11px 20px; border-radius: 10px; font-weight: 700; font-size: .93rem;
    border: 1px solid transparent; cursor: pointer; transition: .18s; text-align: center;
}
.btn-primary { background: var(--brand); color: #fff; box-shadow: 0 8px 20px rgba(226, 35, 26, .28); }
.btn-primary:hover { background: var(--brand-dark); color: #fff; }
.btn-ghost { background: var(--surface-2); border-color: var(--border); color: var(--text); }
.btn-ghost:hover { border-color: var(--brand); color: var(--brand); }
.btn-sm { padding: 8px 14px; font-size: .85rem; }
.btn-success { background: var(--accent); color: #fff; }

/* ----------------------------------------------------------- Bölümler */
.section { margin: 34px 0; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 16px; }
.section-head h2 { margin: 0; }
.section-link { color: var(--brand); font-weight: 600; font-size: .9rem; }

.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 18px; }

.two-col-home { display: grid; grid-template-columns: 2fr 1fr; gap: 30px; align-items: start; }

/* ----------------------------------------------------------- İçerik kartı */
.post-card {
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
    overflow: hidden; display: flex; flex-direction: column; transition: .2s;
}
.post-card:hover { transform: translateY(-4px); border-color: color-mix(in srgb, var(--brand) 45%, var(--border)); box-shadow: var(--shadow); }
.post-card-image { position: relative; display: block; }
.post-card-image img { aspect-ratio: 16/9; object-fit: cover; width: 100%; }
.post-badge {
    position: absolute; top: 10px; left: 10px; background: rgba(10, 14, 22, .82); color: #fff;
    font-size: .72rem; font-weight: 700; padding: 5px 10px; border-radius: 999px; backdrop-filter: blur(6px);
}
.post-card-body { padding: 15px; display: flex; flex-direction: column; gap: 7px; flex: 1; }
.post-cat { font-size: .74rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--brand); }
.post-card-title { font-size: 1.02rem; margin: 0; }
.post-card-title a { display: block; }
.post-card-excerpt { color: var(--text-muted); font-size: .88rem; margin: 0; flex: 1; }
.post-card-meta { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; font-size: .78rem; color: var(--text-muted); }
.dot { opacity: .6; }

/* ----------------------------------------------------------- Kod kartları */
.code-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(285px, 1fr)); gap: 14px; }
.code-grid.compact { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }

/* Kod listesi arasına otomatik yerleştirilen reklamlar */
.code-ad-slot { grid-column: 1 / -1; min-width: 0; }
.code-ad-slot.is-cell { grid-column: auto; }
.code-ad-slot .ad-block { margin: 0; height: 100%; }
.code-ad-slot .ad-block .ad-item { display: flex; align-items: center; justify-content: center; overflow-x: auto; }
.code-ad-slot .ad-item img,
.code-ad-slot .ad-item iframe { max-width: 100%; }

.code-card {
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
    padding: 14px; display: flex; flex-direction: column; justify-content: space-between; gap: 10px;
    border-left: 3px solid var(--accent); transition: .18s;
}
.code-card.is-expired { border-left-color: var(--text-muted); opacity: .78; }
.code-card:hover { border-color: color-mix(in srgb, var(--accent) 40%, var(--border)); }
.code-value { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.code-value code {
    font-size: 1rem; font-weight: 700; letter-spacing: .03em; word-break: break-all;
    background: var(--surface-2); border: 1px dashed var(--border); padding: 7px 11px; border-radius: var(--radius-sm); flex: 1;
}
.code-reward { font-size: .83rem; color: var(--text-muted); }
.code-game { font-size: .8rem; font-weight: 700; color: var(--info); }
.code-card-meta { display: flex; align-items: center; gap: 8px; justify-content: space-between; font-size: .76rem; color: var(--text-muted); }

.copy-btn {
    display: inline-flex; align-items: center; gap: 6px; background: var(--brand); color: #fff;
    border: 0; border-radius: var(--radius-sm); padding: 8px 12px; font-weight: 800; font-size: .78rem;
    letter-spacing: .04em; cursor: pointer; transition: .16s; white-space: nowrap;
}
.copy-btn:hover { background: var(--brand-dark); }
.copy-btn.is-copied { background: var(--accent); }
.copy-btn .copy-icon { font-size: .95rem; }

.badge { display: inline-block; font-size: .68rem; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; padding: 4px 8px; border-radius: 999px; }
.badge-active { background: rgba(0, 176, 107, .16); color: var(--accent); }
.badge-expired { background: rgba(147, 161, 189, .16); color: var(--text-muted); }
.badge-muted { background: var(--surface-2); color: var(--text-muted); }
.badge-success { background: rgba(0, 176, 107, .16); color: var(--accent); }
.badge-warning { background: rgba(247, 168, 0, .18); color: var(--warning); }
.badge-danger { background: rgba(226, 35, 26, .18); color: var(--brand); }

.codes-block { margin: 26px 0; }
.codes-count { font-size: .82rem; color: var(--text-muted); }
.codes-group { margin-bottom: 18px; }
.codes-group-title { display: flex; align-items: center; gap: 9px; font-size: 1rem; margin-bottom: 12px; cursor: pointer; }
.expired-group summary { list-style: none; }
.expired-group summary::-webkit-details-marker { display: none; }
.codes-disclaimer { font-size: .82rem; color: var(--text-muted); border-left: 3px solid var(--border); padding-left: 12px; }

.quick-copy-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 14px; margin: 16px 0; }
.qcb-label { font-weight: 700; font-size: .88rem; color: var(--accent); }

/* ----------------------------------------------------------- Arşiv / başlık */
.breadcrumb { display: flex; align-items: center; gap: 8px; font-size: .82rem; color: var(--text-muted); margin: 6px 0 14px; flex-wrap: wrap; }
.breadcrumb a:hover { color: var(--brand); }

.archive-header { margin-bottom: 22px; }
.archive-desc { color: var(--text-muted); max-width: 72ch; }
.archive-meta { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; font-size: .85rem; color: var(--text-muted); }
.sort-links { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.sort-links a { color: var(--text-muted); }
.sort-links a.is-active { color: var(--brand); font-weight: 700; }

.inline-search { display: flex; gap: 8px; margin-top: 16px; flex-wrap: wrap; }
.inline-search input, .inline-search select {
    background: var(--surface); border: 1px solid var(--border); color: var(--text);
    padding: 11px 14px; border-radius: var(--radius-sm); font-size: .92rem; min-width: 220px; flex: 1;
}
.inline-search input:focus, .inline-search select:focus { outline: 2px solid var(--brand); outline-offset: 1px; }

/* ----------------------------------------------------------- Layout (içerik + sidebar) */
.layout-grid { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 30px; align-items: start; }
.layout-main { min-width: 0; }

.sidebar { display: flex; flex-direction: column; gap: 18px; }
.widget { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; }
.widget-title { font-size: .95rem; text-transform: uppercase; letter-spacing: .06em; color: var(--text-muted); margin-bottom: 12px; }
.widget-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.widget-list li { display: flex; gap: 10px; font-size: .9rem; }
.list-index { color: var(--brand); font-weight: 800; }
.widget-games { list-style: none; margin: 0 0 12px; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.widget-games a { display: flex; align-items: center; gap: 10px; padding: 7px; border-radius: 10px; }
.widget-games a:hover { background: var(--surface-2); }
.widget-games img { width: 44px; height: 44px; border-radius: 9px; object-fit: cover; }
.wg-info { display: flex; flex-direction: column; }
.wg-info small { color: var(--text-muted); font-size: .76rem; }
.widget-more { font-size: .84rem; font-weight: 700; color: var(--brand); }

.tag-cloud { display: flex; flex-wrap: wrap; gap: 7px; }
.tag-chip { background: var(--surface-2); border: 1px solid var(--border); border-radius: 999px; padding: 5px 11px; font-size: .8rem; color: var(--text-muted); }
.tag-chip:hover { border-color: var(--brand); color: var(--brand); }

.rank-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.rank-list li { display: flex; gap: 12px; align-items: flex-start; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px; }
.rank { font-weight: 900; color: var(--brand); min-width: 22px; }
.rank-list small { display: block; color: var(--text-muted); font-size: .78rem; }

/* ----------------------------------------------------------- Kategori & oyun kartları */
.category-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; }
.category-tile {
    display: flex; flex-direction: column; gap: 6px; padding: 18px; border-radius: var(--radius);
    background: var(--surface); border: 1px solid var(--border); border-top: 3px solid var(--cat-color, var(--brand));
    transition: .18s;
}
.category-tile:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.cat-icon { font-size: 1.6rem; }
.cat-name { font-weight: 800; }
.cat-count, .cat-desc { font-size: .8rem; color: var(--text-muted); }
.category-tile.big { padding: 22px; }

.game-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.game-grid.large { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.game-tile {
    display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: var(--radius);
    background: var(--surface); border: 1px solid var(--border); transition: .18s;
}
.game-tile:hover { border-color: var(--brand); transform: translateY(-2px); }
.game-tile img { width: 52px; height: 52px; border-radius: 11px; object-fit: cover; flex-shrink: 0; }
.game-grid.large .game-tile img { width: 64px; height: 64px; }
.game-info { display: flex; flex-direction: column; min-width: 0; }
.game-info strong { font-size: .95rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.game-info small { color: var(--text-muted); font-size: .78rem; }
.game-arrow { margin-left: auto; color: var(--text-muted); }

.chip-row { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; margin-bottom: 18px; }
.chip { display: inline-flex; align-items: center; gap: 7px; padding: 7px 13px; border-radius: 999px; background: var(--surface); border: 1px solid var(--border); font-size: .84rem; white-space: nowrap; }
.chip span { background: var(--brand-soft); color: var(--brand); border-radius: 999px; padding: 1px 7px; font-size: .74rem; font-weight: 700; }
.chip:hover { border-color: var(--brand); }

/* ----------------------------------------------------------- İçerik detayı */
.single-post { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; }
.post-header h1 { margin-bottom: .4em; }
.post-lead { font-size: 1.06rem; color: var(--text-muted); }
.post-meta { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: .83rem; color: var(--text-muted); margin-bottom: 18px; }
.post-featured { margin: 0 0 22px; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); }
.post-featured img { width: 100%; aspect-ratio: 16/9; object-fit: cover; }

.post-content { font-size: 1.02rem; }
.post-content h2 { margin-top: 1.6em; }
.post-content h3 { margin-top: 1.4em; }
.post-content p { margin-bottom: 1.1em; }
.post-content ul, .post-content ol { padding-left: 22px; margin-bottom: 1.1em; }
.post-content li { margin-bottom: .4em; }
.post-content a { color: var(--brand); text-decoration: underline; text-underline-offset: 2px; }
.post-content img { border-radius: var(--radius-sm); margin: 14px 0; }
.post-content blockquote {
    border-left: 4px solid var(--brand); background: var(--surface-2); margin: 18px 0;
    padding: 12px 18px; border-radius: 0 var(--radius-sm) var(--radius-sm) 0; color: var(--text-muted);
}
.post-content pre {
    background: #0a0e17; color: #d9e2f1; border: 1px solid var(--border); border-radius: var(--radius-sm);
    padding: 14px 16px; overflow: auto; font-size: .88rem;
}
.post-content code { background: var(--surface-2); padding: 2px 6px; border-radius: 6px; font-size: .88em; }
.post-content pre code { background: none; padding: 0; }
.post-content table { width: 100%; border-collapse: collapse; margin: 18px 0; font-size: .92rem; display: block; overflow-x: auto; }
.post-content th, .post-content td { border: 1px solid var(--border); padding: 9px 12px; text-align: left; }
.post-content th { background: var(--surface-2); }
.post-content iframe { max-width: 100%; border-radius: var(--radius-sm); border: 0; margin: 14px 0; }
.post-content .pubg-code-inline {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    background: var(--surface-2); border: 1px dashed var(--brand); border-radius: var(--radius-sm); padding: 10px 14px; margin: 14px 0;
}

.game-cta { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px; margin: 18px 0; }

.how-to-redeem { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; margin: 22px 0; }

.share-row { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; margin-top: 26px; padding-top: 18px; border-top: 1px solid var(--border); font-size: .85rem; color: var(--text-muted); }
.share-btn { background: var(--surface-2); border: 1px solid var(--border); color: var(--text); padding: 7px 13px; border-radius: 999px; font-size: .82rem; cursor: pointer; }
.share-btn:hover { border-color: var(--brand); color: var(--brand); }

.game-header { display: flex; gap: 20px; align-items: flex-start; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; margin-bottom: 22px; }
.game-cover { width: 112px; height: 112px; border-radius: 16px; object-fit: cover; flex-shrink: 0; }
.game-meta { font-size: .86rem; color: var(--text-muted); display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.game-desc { color: var(--text-muted); margin: 10px 0 14px; }

.related-section { margin-top: 34px; }

/* ----------------------------------------------------------- Sayfalama */
.pagination { margin: 28px 0 8px; }
.pagination ul { display: flex; gap: 7px; list-style: none; margin: 0; padding: 0; flex-wrap: wrap; }
.pagination a, .pagination span {
    display: grid; place-items: center; min-width: 40px; height: 40px; padding: 0 12px;
    border-radius: 10px; background: var(--surface); border: 1px solid var(--border); font-weight: 600; font-size: .9rem;
}
.pagination a:hover { border-color: var(--brand); color: var(--brand); }
.pagination .active span { background: var(--brand); border-color: var(--brand); color: #fff; }
.pagination .dots span { border: 0; background: transparent; }

/* ----------------------------------------------------------- Reklamlar */
.ad-wrap { margin: 22px 0; }
.ad-slot, .widget-ad, .ad-block {
    text-align: center; background: color-mix(in srgb, var(--surface) 70%, transparent);
    border: 1px dashed var(--border); border-radius: var(--radius); padding: 10px; overflow: hidden;
}
.ad-label { display: block; font-size: .64rem; letter-spacing: .16em; text-transform: uppercase; color: var(--text-muted); opacity: .65; margin-bottom: 6px; }
.ad-item { margin: 0 auto; }
.ad-item img, .ad-item iframe, .ad-item ins { max-width: 100%; margin: 0 auto; }
.header-ad { padding-top: 10px; }
.header-ad .ad-slot { border: 0; background: transparent; padding: 4px; }

.sticky-ad { position: fixed; z-index: 55; }
.sticky-ad-mobile { left: 0; right: 0; bottom: 0; display: none; background: var(--bg-alt); border-top: 1px solid var(--border); padding: 4px 6px; }
.sticky-ad-desktop { right: 18px; bottom: 18px; width: 300px; display: none; }
.sticky-ad .ad-slot { margin: 0; }
/* Mobil banner mümkün olduğunca ince kalsın */
.sticky-ad-mobile .ad-block { padding: 2px; border: 0; background: transparent; }
.sticky-ad-mobile .ad-label { display: none; }

/* ----------------------------------------------------------- Footer */
.site-footer { background: var(--bg-alt); border-top: 1px solid var(--border); margin-top: 46px; padding-top: 40px; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 28px; padding-bottom: 30px; }
.footer-col h3 { font-size: .88rem; text-transform: uppercase; letter-spacing: .07em; color: var(--text-muted); }
.footer-col ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; font-size: .9rem; }
.footer-col ul a { color: var(--text-muted); }
.footer-col ul a:hover { color: var(--brand); }
.footer-about p { color: var(--text-muted); font-size: .9rem; margin-top: 12px; }
.brand-footer { font-size: 1.1rem; }
.social-links { display: flex; gap: 12px; flex-wrap: wrap; font-size: .86rem; }
.social-links a { color: var(--text-muted); }
.social-links a:hover { color: var(--brand); }
.footer-bottom { border-top: 1px solid var(--border); padding: 18px; display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap; font-size: .82rem; color: var(--text-muted); }
.footer-note { max-width: 60ch; }

/* ----------------------------------------------------------- Yardımcılar */
.empty-state { background: var(--surface); border: 1px dashed var(--border); border-radius: var(--radius); padding: 40px 24px; text-align: center; color: var(--text-muted); }
.empty-state h2 { color: var(--text); }
.error-page { text-align: center; padding: 60px 20px; max-width: 700px; margin: 0 auto; }
.error-code { font-size: 4rem; font-weight: 900; color: var(--brand); display: block; }
.error-page .inline-search { max-width: 460px; margin: 22px auto; }

.back-to-top {
    position: fixed; right: 18px; bottom: 84px; width: 42px; height: 42px; border-radius: 50%;
    background: var(--brand); color: #fff; border: 0; font-size: 1.1rem; cursor: pointer;
    display: none; place-items: center; z-index: 58; box-shadow: var(--shadow);
}
.back-to-top.is-visible { display: grid; }

.toast-stack { position: fixed; right: 18px; top: 82px; display: flex; flex-direction: column; gap: 10px; z-index: 999; }
.toast {
    background: var(--surface); border: 1px solid var(--border); border-left: 4px solid var(--accent);
    border-radius: var(--radius-sm); padding: 12px 16px; box-shadow: var(--shadow); font-size: .9rem;
    animation: toast-in .22s ease; max-width: 320px;
}
.toast.error { border-left-color: var(--brand); }
.toast.info { border-left-color: var(--info); }
@keyframes toast-in { from { opacity: 0; transform: translateX(20px); } to { opacity: 1; transform: none; } }

/* ----------------------------------------------------------- Duyarlı */
@media (max-width: 1080px) {
    .layout-grid { grid-template-columns: 1fr; }
    .sidebar { position: static; }
    .two-col-home { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
    .hero { grid-template-columns: 1fr; padding: 24px; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 780px) {
    .nav-toggle { display: flex; }
    .main-nav {
        position: fixed; inset: 0 0 0 auto; width: min(320px, 86vw); height: 100dvh;
        background: var(--bg-alt);
        border-left: 1px solid var(--border); padding: 70px 18px 24px; transform: translateX(105%);
        visibility: hidden;
        transition: transform .25s ease, visibility .25s ease; z-index: 65; overflow-y: auto;
        box-shadow: -20px 0 40px rgba(0, 0, 0, .35);
    }
    /* Üst menü artık sabit olmadığı için menüyü kapatacak her zaman görünür bir buton gerekir */
    .nav-close {
        display: grid; place-items: center; position: absolute; top: 16px; right: 16px;
        width: 40px; height: 40px; border-radius: 10px; cursor: pointer;
        background: var(--surface-2); border: 1px solid var(--border);
        color: var(--text); font-size: 1.05rem; line-height: 1;
    }
    .nav-close:hover { background: var(--surface); }
    .main-nav.is-open { transform: none; visibility: visible; }
    .main-nav ul { flex-direction: column; }
    .main-nav a { display: block; padding: 12px 14px; font-size: 1rem; color: var(--text); }
    .header-inner { gap: 10px; }
    .brand { font-size: 1.06rem; gap: 8px; }
    .brand-mark { width: 32px; height: 32px; font-size: 1rem; border-radius: 9px; }
    .search-form { min-width: 0; flex: 1 1 auto; }
    .search-form input { font-size: .85rem; }
    .header-actions { flex: 1; }
    .sticky-ad-mobile { display: block; }
    .sticky-ad-desktop { display: none; }
    /* Gövde, yapışkan reklamın gerçek yüksekliği kadar aşağıdan boşluk bırakır */
    body.has-sticky-mobile { padding-bottom: calc(var(--sticky-ad-height, 0px) + 8px); }
    .back-to-top { bottom: calc(var(--sticky-ad-height, 0px) + 16px); }
    /* Dokunma hedeflerini büyüt */
    .copy-btn { padding: 10px 14px; min-height: 42px; }
    .theme-toggle, .nav-toggle { width: 42px; height: 42px; }
    .single-post { padding: 18px; }
    .game-header { flex-direction: column; }
    .code-grid { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr; }
    .footer-bottom { flex-direction: column; }
}

@media (min-width: 1200px) {
    .sticky-ad-desktop { display: block; }
}

@media (max-width: 480px) {
    /* Uzun marka adlarında (ör. "PUBG Mobile Codes") arama alanına yer açmak için
       yalnızca marka simgesi gösterilir; site adı <title> ve şemada korunur. */
    .brand-text { display: none; }
    .header-inner { gap: 9px; }
}

@media (max-width: 380px) {
    .theme-toggle { display: none; }
}

@media print {
    .site-header, .site-footer, .sidebar, .sticky-ad, .toast-stack, .ad-slot { display: none !important; }
}
