/* Her sayfada yüklenen katman: token, font, temel, header, footer. */

@font-face {
    font-family: "Nunito";
    font-style: normal;
    font-weight: 400 900;
    font-display: swap;
    src: url("../fonts/nunito-latin.woff2") format("woff2");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
    font-family: "Nunito";
    font-style: normal;
    font-weight: 400 900;
    font-display: swap;
    src: url("../fonts/nunito-latin-ext.woff2") format("woff2");
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
    --purple-1: #8e2bb2;
    --purple-2: #64156f;
    --purple-3: #74208e;
    --mustard-line: #efbf1a;
    --mustard-line-strong: #e5b10a;
    --text-dark: #6b217d;
    --text-dark-2: #4e155d;
    --border-soft: #e4d1ea;
    --panel-light: linear-gradient(180deg, #fff 0%, #fbf7fd 100%);
    --online-dot: #22c55e;
    --shell-grad: linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,.02)), linear-gradient(180deg, var(--purple-1) 0%, var(--purple-2) 100%);
}

@view-transition { navigation: auto; }

* { box-sizing: border-box; }

html {
    min-height: 100%;
    background: var(--purple-2);
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

body {
    margin: 0;
    min-height: 100vh;
    overflow-x: hidden;
    font-family: "Nunito", "Segoe UI", Roboto, Arial, sans-serif;
    color: var(--text-dark);
    background: linear-gradient(180deg, var(--purple-1) 0%, var(--purple-3) 45%, var(--purple-2) 100%);
}

img, svg, video, canvas, iframe { max-width: 100%; }

[hidden] { display: none !important; }

.container { width: min(1540px, calc(100% - 78px)); margin: 0 auto; }

.screen-reader-text {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    border: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
}

/* Duyuru bandı */
.gsc-ann { position: relative; z-index: 90; background: var(--panel-light); border-bottom: 2px solid var(--mustard-line); box-shadow: 0 4px 18px rgba(78,21,93,.10); }
.gsc-ann-inner { position: relative; width: min(1540px, calc(100% - 78px)); margin: 0 auto; display: flex; align-items: center; padding: 14px 40px; }
.gsc-ann-text { margin: 0 auto; font-size: 13.5px; line-height: 1.5; font-weight: 700; color: #5c2f75; text-align: center; }
.gsc-ann-close { position: absolute; top: 50%; right: 0; transform: translateY(-50%); display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; padding: 0; border: 0; border-radius: 8px; background: transparent; color: #a184b0; cursor: pointer; transition: color .18s ease, background .18s ease; }
.gsc-ann-close:hover, .gsc-ann-close:focus-visible { color: #6b217d; background: rgba(110,33,125,.08); outline: none; }

/* Header */
.top-shell { position: relative; z-index: 100; padding: 20px 18px 0; }

.site-header {
    position: relative;
    width: min(1180px, calc(100% - 6px));
    margin: 0 auto;
    padding: 14px 18px;
    border: 1px solid rgba(255,255,255,.08);
    border-top: 5px solid var(--mustard-line);
    border-radius: 28px;
    background: var(--shell-grad);
}

.header-top { display: grid; grid-template-columns: 56px 1fr auto; align-items: center; gap: 16px; }
.header-left, .header-right { position: relative; display: flex; align-items: center; }
.header-left { gap: 10px; }
.header-right { justify-content: flex-end; gap: 10px; }
.header-top > *, .header-left > *, .header-right > * { min-width: 0; }

.site-logo { justify-self: center; display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }
.site-logo img { display: block; width: 100%; max-width: 340px; height: auto; }

.menu-toggle, .search-toggle, .header-auth-button, .header-notice-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    padding: 0;
    border: 2px solid var(--mustard-line);
    border-radius: 14px;
    background: rgba(255,255,255,.12);
    text-decoration: none;
    cursor: pointer;
    transition: transform .2s ease, background .2s ease, border-color .2s ease;
}

.menu-toggle:hover, .search-toggle:hover, .header-auth-button:hover, .header-notice-button:hover {
    transform: translate3d(0, -1px, 0);
    background: rgba(255,255,255,.18);
    border-color: #ffd15a;
}

.menu-toggle { flex-direction: column; gap: 5px; }
.menu-toggle span { display: block; width: 20px; height: 2px; border-radius: 999px; background: #fff4c7; transition: transform .2s ease, opacity .2s ease; }
.menu-toggle.is-active span:nth-child(1) { transform: translate3d(0, 7px, 0) rotate(45deg); }
.menu-toggle.is-active span:nth-child(2) { opacity: 0; }
.menu-toggle.is-active span:nth-child(3) { transform: translate3d(0, -7px, 0) rotate(-45deg); }

.search-toggle svg, .header-auth-button svg { display: block; width: 22px; height: 22px; fill: #fff4c7; }
.header-auth-button { position: relative; }
.header-auth-button svg { transition: transform .2s ease, fill .2s ease; }
.header-auth-button:hover svg { transform: scale(1.03); }

/* Üye: hesap düğmesi ve menüsü (/me ile doldurulur) */
.header-auth-button.is-logged-in { border-color: rgba(255,214,100,.98); background: linear-gradient(180deg, rgba(255,208,82,.22), rgba(255,190,32,.14)); }
.header-auth-button.is-logged-in svg { fill: #ffe18b; }
.header-auth-indicator { position: absolute; right: 8px; bottom: 8px; width: 9px; height: 9px; border-radius: 999px; background: rgba(255,255,255,.38); }
.header-auth-button.is-logged-in .header-auth-indicator { background: var(--online-dot); }
.header-account-wrap { position: relative; }

/* Açılır paneller */
.header-dropdown, .search-dropdown, .account-dropdown, .notice-dropdown {
    position: absolute;
    z-index: 50;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    will-change: transform, opacity;
    contain: layout paint style;
}

.header-dropdown, .search-dropdown {
    top: calc(100% + 12px);
    transform: translate3d(0, 8px, 0);
    transition: opacity .16s ease, transform .16s ease, visibility 0s linear .16s;
}

.header-dropdown { left: 0; width: 340px; }
.search-dropdown { right: 0; width: 360px; }

.header-dropdown.is-open, .search-dropdown.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translate3d(0, 0, 0);
    transition-delay: 0s;
}


.header-panel {
    overflow: hidden;
    border: 1px solid rgba(142,43,178,.1);
    border-top: 3px solid var(--mustard-line);
    border-radius: 22px;
    background: linear-gradient(180deg, rgba(255,255,255,.98) 0%, rgba(250,245,252,.98) 100%);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
}

/* Zayıf cihaz (html.is-low-end): paneller kaymadan açılır, arkaları bulanıklaştırılmaz. */
html.is-low-end .header-dropdown, html.is-low-end .search-dropdown, html.is-low-end .account-dropdown { transform: none; transition: none; will-change: auto; }
html.is-low-end .header-panel { -webkit-backdrop-filter: none; backdrop-filter: none; }

.header-panel-menu, .header-panel-search { padding: 14px; }
.header-panel-section + .header-panel-section { margin-top: 14px; }
.header-panel-section-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.header-panel-section-head span { font-size: 12px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: #7d35b2; opacity: .95; }
.mobile-only-block { display: none; }

.header-dropdown-links { display: flex; flex-direction: column; gap: 8px; }

.header-dropdown-links a {
    display: flex;
    align-items: center;
    gap: 13px;
    padding: 14px 15px;
    border: 1px solid rgba(142,43,178,.07);
    border-radius: 16px;
    text-decoration: none;
    background: var(--panel-light);
    transition: transform .2s ease, background .2s ease, border-color .2s ease;
}

.header-dropdown-links a:hover {
    transform: translate3d(0, -1px, 0);
    border-color: rgba(239,191,26,.24);
    background: linear-gradient(180deg, #fffdf8 0%, #fbf2dc 100%);
}

.gsc-menu-icon { flex-shrink: 0; width: 18px; height: 18px; overflow: visible; color: var(--purple-1); }
.header-dropdown-links a .gsc-nav-icon { width: 20px; height: 20px; }
.header-dropdown-links a:hover .gsc-nav-icon { color: #b9831a; }

.header-link-text { display: flex; flex-direction: column; min-width: 0; }
.header-link-title { display: block; margin-bottom: 3px; font-size: 14px; font-weight: 800; line-height: 1.2; color: var(--text-dark); }
.header-link-desc { display: block; font-size: 12px; line-height: 1.4; color: #7f6d86; }
.header-link-title, .header-link-desc { overflow-wrap: anywhere; word-break: break-word; }

/* Hesap menüsü (üye) */
.account-dropdown { top: calc(100% + 14px); right: 0; z-index: 40; width: 270px; transform: translate3d(0, 8px, 0); transition: opacity .18s ease, transform .18s ease, visibility .18s ease; }
.account-dropdown.is-open { opacity: 1; visibility: visible; pointer-events: auto; transform: translate3d(0, 0, 0); }
.header-panel-account { padding: 16px; border: 1px solid rgba(120,42,160,.12); border-top: 3px solid var(--mustard-line); border-radius: 22px; }
.header-panel-section-head--account { margin-bottom: 12px; }
.account-dropdown-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; padding-bottom: 14px; border-bottom: 1px solid rgba(120,42,160,.1); }
.account-dropdown-head > * { min-width: 0; }
.account-dropdown-avatar { flex-shrink: 0; width: 52px; height: 52px; }
.account-dropdown-avatar img, .account-dropdown-avatar .avatar { display: block; width: 52px; height: 52px; border: 1px solid rgba(120,42,160,.2); border-radius: 50%; object-fit: cover; }
.account-dropdown-meta { display: flex; flex-direction: column; flex: 1 1 auto; gap: 4px; min-width: 0; }
.account-dropdown-meta strong { font-size: 15px; line-height: 1.2; color: var(--text-dark); }
.account-dropdown-meta span { font-size: 12px; color: rgba(60,35,81,.72); overflow-wrap: anywhere; word-break: break-word; }
.account-dropdown-meta strong, .account-dropdown-meta span { display: block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.header-dropdown-links-account a { display: flex; align-items: center; gap: 10px; }
.header-panel-account--menu-like .header-dropdown-links a { gap: 10px; }

/* Arama */
.desktop-search-input-wrap, .mobile-search-input-wrap { position: relative; display: flex; align-items: center; }
.desktop-search-input-wrap svg, .mobile-search-input-wrap svg { position: absolute; left: 14px; width: 18px; height: 18px; fill: #8e7a95; pointer-events: none; }

.desktop-search-input-wrap input, .mobile-search-input-wrap input {
    width: 100%;
    height: 50px;
    padding: 0 16px 0 44px;
    border: 1px solid rgba(142,43,178,.12);
    border-radius: 16px;
    background: linear-gradient(180deg, #fff 0%, #fbf8fd 100%);
    color: var(--text-dark);
    font-size: 14px;
    outline: none;
    transition: border-color .2s ease;
}

.desktop-search-input-wrap input:focus, .mobile-search-input-wrap input:focus { border-color: rgba(239,191,26,.9); }
.desktop-search-input-wrap input::placeholder, .mobile-search-input-wrap input::placeholder { color: #8e7a95; }

.search-split { display: flex; flex-direction: column; gap: 2px; margin-top: 8px; }
.search-split-option { display: flex; align-items: center; gap: 10px; padding: 9px 11px; border-radius: 12px; color: var(--text-dark); font-size: 13px; font-weight: 600; text-decoration: none; transition: background .15s ease; }
.search-split-option:hover { background: rgba(244,190,0,.12); }
.search-split-icon { width: 18px; height: 18px; flex-shrink: 0; fill: currentColor; opacity: .65; }
.search-split-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.search-split-text b { font-weight: 800; }

.mobile-menu-search-card {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 12px;
    border: 1px solid rgba(142,43,178,.08);
    border-radius: 18px;
    background: linear-gradient(180deg, #fff 0%, #faf6fc 100%);
}

/* Bildirim balonu (ui.js toast) */
.gsc-popup-overlay {
    position: fixed;
    inset: 0;
    z-index: 2147483650;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(16, 10, 26, .45);
    -webkit-backdrop-filter: blur(3px);
    backdrop-filter: blur(3px);
    opacity: 0;
    visibility: hidden;
    transition: opacity .2s ease, visibility .2s ease;
}

.gsc-popup-overlay.is-open { opacity: 1; visibility: visible; }

.gsc-popup {
    width: min(360px, 100%);
    padding: 26px 24px 24px;
    border: 1px solid rgba(255, 255, 255, .1);
    border-top: 5px solid var(--mustard-line);
    border-radius: 22px;
    background: var(--shell-grad);
    box-shadow: 0 24px 60px rgba(0, 0, 0, .45);
    color: #fffaf1;
    text-align: center;
    transform: translate3d(0, 10px, 0) scale(.96);
    transition: transform .2s ease;
}

.gsc-popup-overlay.is-open .gsc-popup { transform: translate3d(0, 0, 0) scale(1); }

.gsc-popup-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    margin: 0 auto 14px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .12);
}

.gsc-popup-icon svg { width: 30px; height: 30px; fill: #fffaf1; }

.gsc-popup-text {
    margin: 0;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.5;
    color: #fffaf1;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.gsc-popup--success { border-top-color: #3ce000; }
.gsc-popup--success .gsc-popup-icon { background: rgba(95, 208, 122, .18); }
.gsc-popup--success .gsc-popup-icon svg { fill: #7fe79a; }
.gsc-popup--error { border-top-color: #ff1f1f; }
.gsc-popup--error .gsc-popup-icon { background: rgba(255, 126, 126, .18); }
.gsc-popup--error .gsc-popup-icon svg { fill: #ff9a9a; }

/* Paylaşılan içerik kabuğu (oyun, üyelik, statik, 404) */
.single-game-page { padding-top: 26px; padding-bottom: 40px; }
.single-game-page.container { width: min(1360px, calc(100% - 32px)); }
.single-game-card { padding: 0; border: 0; border-radius: 26px; background: transparent; color: #111827; }
.single-game-top-shell {
    max-width: 1120px;
    margin: 0 auto 24px;
    padding: 18px 18px 22px;
    border: 1px solid rgba(122,45,160,.16);
    border-radius: 26px;
    background: linear-gradient(180deg, #fff 0%, #fcf9fe 100%);
}

/* Footer */
.site-footer { margin-top: 44px; padding: 26px 0 30px; }

.footer-inner {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    padding: 22px 24px;
    border: 1px solid rgba(255,255,255,.08);
    border-top: 5px solid var(--mustard-line);
    border-radius: 24px;
    background: var(--shell-grad);
}

.footer-inner > *, .footer-right > * { min-width: 0; }
.footer-brand { max-width: 620px; }
.footer-logo { display: inline-flex; align-items: center; margin-bottom: 10px; }
.footer-logo img { display: block; width: 100%; max-width: 260px; height: auto; }
.footer-brand p { margin: 0; font-size: 15px; line-height: 1.7; color: #f8ebff; }
.footer-right { display: flex; flex-direction: column; align-items: flex-end; gap: 12px; margin-left: auto; }
.footer-links { display: flex; flex-wrap: wrap; align-items: center; gap: 18px; }
.footer-links a { font-size: 14px; font-weight: 700; text-decoration: none; color: #fff2bf; }
.footer-links a:hover { color: #fff; }
.footer-social-links { display: flex; flex-wrap: wrap; gap: 10px; }

.footer-social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 9px 14px;
    border: 1px solid rgba(255,255,255,.16);
    border-radius: 999px;
    background: rgba(255,255,255,.08);
    font-size: 13px;
    font-weight: 800;
    line-height: 1;
    text-decoration: none;
    color: #fff4c8;
    transition: transform .18s ease, background .18s ease, border-color .18s ease, color .18s ease;
}

.footer-social-links a:hover { transform: translate3d(0, -1px, 0); border-color: rgba(255,255,255,.26); background: rgba(255,255,255,.14); color: #fff; }
.footer-bottom { padding-top: 12px; }
.footer-copyright { margin: 0; font-size: 13px; font-weight: 700; line-height: 1.6; text-align: center; color: rgba(255,244,200,.92); }

/* Kırılımlar */
@media (max-width: 1400px) { .container { width: min(100%, calc(100% - 52px)); } }
@media (max-width: 1200px) { .container { width: min(100%, calc(100% - 34px)); } }
@media (max-width: 992px) { .container { width: min(100%, calc(100% - 26px)); } .single-game-top-shell { max-width: 100%; } }

@media (max-width: 768px) {
    .container { width: min(100%, calc(100% - 18px)); }

    .top-shell { position: sticky; top: 0; z-index: 2147481000; padding: 12px 8px 6px; transform: translate3d(0, 0, 0); backface-visibility: hidden; }
    .site-header { width: min(100%, calc(100% - 2px)); padding: 12px 14px; border-radius: 22px; }
    .header-top { grid-template-columns: 42px 1fr 42px; gap: 10px; }
    .header-left { position: static; width: 42px; justify-content: flex-start; }
    .header-right { width: 42px; justify-content: flex-end; }
    .site-logo { display: flex; width: 100%; }
    .site-logo img { width: auto; max-width: 275px; max-height: 62px; }
    .menu-toggle, .search-toggle { width: 42px; height: 42px; border-radius: 12px; }
    .desktop-only-tool { display: none !important; }
    .mobile-only-block { display: block; }
    .header-panel-menu, .header-panel-search, .header-panel-account { max-height: min(74vh, 560px); overflow-y: auto; overscroll-behavior: contain; contain: layout paint; }
    .header-dropdown, .search-dropdown, .account-dropdown { will-change: auto; }
    .header-dropdown { top: calc(100% + 10px); right: 0; width: auto; }

    .footer-inner { flex-direction: column; align-items: center; padding: 18px; text-align: center; }
    .footer-right { align-items: center; margin-left: 0; }
    .footer-links, .footer-social-links { justify-content: center; }
    .footer-logo img { max-width: 225px; }
    .single-game-top-shell { padding: 14px 14px 18px; border-radius: 20px; }
    .single-game-page.container { width: min(100%, calc(100% - 14px)); }
}

@media (max-width: 720px) {
    .gsc-ann-inner { width: calc(100% - 24px); padding: 12px 34px 12px 0; }
    .gsc-ann-text { font-size: 12.5px; text-align: left; margin: 0; }
}

@media (max-width: 430px) {
    .header-top { grid-template-columns: 42px minmax(0, 1fr); }
    .header-right { display: none; }
    .site-logo { grid-column: 2; justify-self: start; width: auto; max-width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
    .menu-toggle, .search-toggle, .header-auth-button, .header-auth-button svg, .header-dropdown-links a, .footer-social-links a { transition: none; }
    ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation: none; }
}

/* Sayfa iskeleti, bölüm başlığı ve boş durum (kart, kategori, oyuncu ve üye sayfaları ortak) */

.games-section { margin-bottom: 28px; }

.empty-text { font-size: 16px; color: #fff; }

.section-head { margin-bottom: 16px; }

section.categories-section:not(.categories-section--archive) > .section-head,
.related-games-section > .section-head {
    position: relative;
    padding: 14px 18px;
    border: 1px solid rgba(255, 255, 255, .08);
    border-top: 5px solid var(--mustard-line);
    border-radius: 28px;
    background: var(--shell-grad);
}

.section-head h1, .section-head h2 {
    margin: 0;
    font-size: 24px;
    font-weight: 800;
    letter-spacing: -.02em;
    line-height: 1.2;
    color: #fff;
}

.section-head p { margin: 8px 0 0; line-height: 1.6; }

.games-section--new .section-head p,
.games-section--popular .section-head p,
.categories-section--archive .section-head p { color: rgba(255, 255, 255, .88); }
