@import url('https://fonts.googleapis.com/css2?family=Chakra+Petch:ital,wght@0,300;0,400;0,500;0,600;0,700;1,300;1,400;1,500;1,600;1,700&display=swap');

:root {
    --primary: 245, 158, 11;
    --bg-color: #0a0a0a;
    --card-bg: #161616;
    --sponsor-card-bg: #161616;
    --text-primary: #f8fafc;
    --text-secondary: #9ca3af;
    --accent: #f59e0b;
    --accent-hover: #d97706;
    --gradient: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    --font-main: 'Chakra Petch', system-ui, -apple-system, sans-serif;
    --layout-max-width: 1300px;
    --layout-padding-x: 2rem;
    --topbar-height: 100px;
    --topbar-main-height: 58px;
    --topbar-sub-height: 40px;
    --desktop-sidebar-width: 255px;
    --desktop-sidebar-collapsed-width: 68px;
    --layout-sidebar-offset: 0px;

    /* Marka turuncu/altin + koyu yuzeyler */
    --brand-red: #f59e0b;
    --brand-red-hover: #fbbf24;
    --brand-red-dark: #b45309;
    --brand-red-mid: #f59e0b;
    --brand-red-soft: #fcd34d;
    --brand-red-pale: #fef3c7;
    --surface-900: #050505;
    --surface-800: #111111;
    --surface-700: #1c1c1c;
    --surface-600: #2a2a2a;
    --text-on-dark: #f1f5f9;
    --text-light: #ffffff;
    --text-on-accent: #000000;
    --text-gray: #6b7280;
    --text-muted: #8a9aa6;
    --section-title-color: #5f6b78;
    --success-color: #10b981;
    --danger-color: #ef4444;
    --border-subtle: rgba(255, 255, 255, 0.05);
    --border-soft: rgba(255, 255, 255, 0.1);
}

.section-title,
.social-section-title {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 14px;
    padding: 0;
    font-size: 1rem;
    font-weight: 800;
    color: var(--text-on-dark, #f1f5f9);
    text-transform: none;
    letter-spacing: -0.015em;
    line-height: 1.2;
}

.section-title__icon {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 9px;
    background: rgba(var(--primary), 0.1);
    border: 1px solid rgba(var(--primary), 0.2);
    color: var(--brand-red, #f59e0b);
    font-size: 16px;
    line-height: 1;
}

.section-title__label {
    min-width: 0;
}

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

body {
    background-color: var(--bg-color, #0a0a0a);
    color: var(--text-primary);
    font-family: var(--font-main);
    line-height: 1.6;
    overflow-x: clip;
    padding-top: var(--topbar-height);
}

html, body {
    /* Normal scroll handling */
}

/*
 * iOS Safari: input/textarea/select font-size < 16px ise odaklanınca sayfayı zoomlar.
 * Mobilde form kontrollerini 16px yaparak otomatik zoom'u engelle.
 */
@media (max-width: 1024px) {
    input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="file"]):not([type="color"]):not([type="button"]):not([type="submit"]):not([type="reset"]):not([type="image"]):not([type="hidden"]),
    textarea,
    select,
    .select2-container .select2-selection,
    .select2-container .select2-search__field,
    [contenteditable="true"] {
        font-size: 16px !important;
    }
}

/* Tüm site genel scroll stili (koyu tema) */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
    background: transparent;
}

::-webkit-scrollbar-track {
    background: var(--bg-color);
}

::-webkit-scrollbar-thumb {
    background: var(--surface-700);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--brand-red);
}

/* Sadece ana sayfa (body/html) scrollbar'ı topbar altında başlasın */
html::-webkit-scrollbar,
body::-webkit-scrollbar {
    width: 8px;
    height: 8px;
    background: var(--surface-800); /* Topbar arka plan rengi */
}

html::-webkit-scrollbar-track,
body::-webkit-scrollbar-track {
    margin-top: var(--topbar-height);
    background: var(--bg-color);
}

main {
    max-width: var(--layout-max-width);
    margin: 1rem auto;
    padding: 0;
}

/* Sol / sağ sticky banner (yalnızca masaüstü) */
.site-main-shell {
    width: 100%;
    max-width: var(--layout-max-width);
    margin: 0 auto;
    box-sizing: border-box;
}

.site-main-shell > main#pjax-container {
    max-width: none;
    width: 100%;
    margin: 1rem 0;
    min-width: 0;
}

.side-banner-rail {
    display: none;
}

.side-banner-sticky {
    position: sticky;
    /* Viewport ortası — üste yapışmaz */
    top: max(12px, calc((100vh - 750px) / 2));
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    width: 150px;
    margin-inline: auto;
}

.side-banner-link {
    display: block;
    width: 150px;
    height: 750px;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--border-subtle, rgba(255, 255, 255, 0.05));
    background: var(--surface-800, #111);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.side-banner-link:hover {
    border-color: rgba(var(--primary), 0.45);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.45);
}

.side-banner-link img {
    width: 150px;
    height: 750px;
    object-fit: cover;
    display: block;
}

@media (min-width: 1600px) {
    .site-main-shell.has-side-banners {
        display: grid;
        grid-template-columns: 150px minmax(0, 1fr) 150px;
        gap: 12px;
        align-items: stretch;
        max-width: calc(var(--layout-max-width) + 150px + 150px + 24px);
        padding: 0 8px;
    }

    .site-main-shell.has-side-banners .side-banner-rail {
        display: block;
        min-height: 100%;
        padding-top: 1rem;
        padding-bottom: 1rem;
        box-sizing: border-box;
    }
}

@media (min-width: 1025px) {
    body.sidebar-pos-sol {
        --layout-sidebar-offset: var(--desktop-sidebar-width);
        padding-left: var(--layout-sidebar-offset);
        transition: padding-left 0.28s cubic-bezier(0.4, 0, 0.2, 1);
    }

    body.sidebar-pos-sol.sidebar-collapsed {
        --layout-sidebar-offset: var(--desktop-sidebar-collapsed-width);
    }
}

/* Anasayfa bölümleri — main ile aynı genişlik (ek max-width / yatay padding yok) */
main .social-section,
main .qa-section,
main .events-section,
main .tickets-section,
main .games-section,
main .winners-section,
main .sizden-gelenler-section,
main .social-points-section,
main .bonuses-story-section,
main .live-matches-section,
main .main-slider {
    width: 100%;
    max-width: none;
    margin-left: 0;
    margin-right: 0;
    padding-left: 0;
    padding-right: 0;
    box-sizing: border-box;
}

.hero {
    text-align: center;
    padding: 6rem 0;
}

.hero h1 {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    letter-spacing: -0.025em;
}

.hero p {
    color: var(--text-secondary);
    font-size: 1.25rem;
    max-width: 600px;
    margin: 0 auto 2.5rem;
}

.btn {
    background: var(--gradient);
    color: white;
    padding: 0.75rem 2rem;
    border-radius: 9999px;
    text-decoration: none;
    font-weight: 600;
    transition: transform 0.3s ease;
    display: inline-block;
}

.btn:hover {
    transform: translateY(-2px);
}

footer {
    padding: 4rem 2rem;
    text-align: center;
    border-top: 1px solid var(--surface-700);
    color: var(--text-secondary);
}

@media (max-width: 1024px) {
    main {
        display: flex;
        flex-direction: column;
        gap: 16px;
        margin: 0 auto;
        width: 100%;
        max-width: 100vw;
        box-sizing: border-box;
        overflow-x: hidden;
        padding: 12px 12px calc(var(--mobile-nav-height, 64px) + 16px + env(safe-area-inset-bottom, 0px)) !important;
    }

    main .section-title,
    main .social-section-header {
        margin-bottom: 14px;
    }

    main .social-section-header .social-section-title {
        margin-bottom: 0;
    }

    main .main-slider,
    main .social-section,
    main .qa-section,
    main .quick-links-section,
    main .tickets-section,
    main .games-section,
    main .winners-section,
    main .sizden-gelenler-section,
    main .events-section,
    main .social-points-section,
    main .bonuses-story-section,
    main .live-matches-section {
        margin-top: 0;
        margin-bottom: 0;
        padding-top: 0;
        padding-bottom: 0;
    }
}

#pjax-container {
    transition: opacity 0.3s ease;
}

@keyframes globalPageFadeIn {
    0% {
        opacity: 0;
        transform: translateY(15px);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.auth-page-wrapper {
    animation: globalPageFadeIn 0.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

/* PJAX soft-nav: CSS globalPageFadeIn'i kapat, tek animasyon .pjax-animate olsun
   (çift F5 hissi olmasın). .pjax-animate eklenince aşağıdaki kural devreye girer. */
html.pjax-active .auth-page-wrapper,
html.pjax-active .profile-page-wrapper,
html.pjax-active .policy-wrapper {
    animation: none;
}

html.pjax-active .auth-page-wrapper.pjax-animate,
html.pjax-active .profile-page-wrapper.pjax-animate,
html.pjax-active .policy-wrapper.pjax-animate {
    animation: pjax-fade-up 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
}

/* Quill Editor Frontend Output Styles */
.ql-editor ul {
    list-style-type: disc;
    padding-left: 20px;
    margin-bottom: 10px;
}
.ql-editor ol {
    list-style-type: decimal;
    padding-left: 20px;
    margin-bottom: 10px;
}
.ql-editor li {
    margin-bottom: 5px;
}
.ql-editor p {
    margin-bottom: 10px;
}
.ql-editor strong {
    font-weight: bold;
}
.ql-editor em {
    font-style: italic;
}

.icon-sm {
    font-size: 0.7rem;
}

.search-btn-size {
    height: 38px;
    width: 38px;
}

.notif-wrapper {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.notif-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: var(--brand-red, #f59e0b);
    color: var(--text-on-accent, #000);
    font-size: 10px;
    font-weight: 800;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--surface-800, #0a0a0a);
    pointer-events: none;
}

.flex-center-align {
    display: flex;
    align-items: center;
}

.ud-notif-badge {
    background: var(--brand-red, #f59e0b);
    color: var(--text-on-accent, #000);
    font-size: 10px;
    font-weight: 800;
    padding: 2px 6px;
    border-radius: 10px;
    margin-left: auto;
}

.sidebar-btn--login {
    background: var(--surface-700, #1c1c1c);
    border-color: var(--surface-600, #2a2a2a);
}

.sidebar-btn--register {
    background: var(--brand-red, #f59e0b);
    border-color: var(--brand-red, #f59e0b);
    color: var(--text-on-accent, #000) !important;
    font-weight: 800;
}


.sg-nav-btn-inline {
    width: auto !important;
    padding: 0 12px !important;
    text-decoration: none;
    font-size: 11px;
    font-weight: 700;
    gap: 4px;
    white-space: nowrap;
}

.icon-14 {
    font-size: 14px;
}

.flex-center-gap {
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.empty-state-text {
    grid-column: 1 / -1;
    text-align: center;
    color: var(--text-gray);
    padding: 2rem;
}

/* Ortak boş sayfa / boş liste durumu */
.page-empty-state {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 12px;
    width: 100%;
    padding: 64px 24px;
    min-height: 220px;
    box-sizing: border-box;
    color: var(--text-secondary, #9ca3af);
    background: color-mix(in srgb, var(--surface-800, #111) 40%, transparent);
    border: 1px dashed rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    backdrop-filter: blur(10px);
}

.page-empty-state[hidden] {
    display: none !important;
}

.page-empty-state__icon {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    background: rgba(var(--primary), 0.08);
    border: 1px solid rgba(var(--primary), 0.18);
    margin-bottom: 4px;
}

.page-empty-state__icon i {
    font-size: 26px;
    color: var(--brand-red, #f59e0b);
    line-height: 1;
}

.page-empty-state h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    color: var(--text-on-dark, #e2e8f0);
    letter-spacing: -0.01em;
}

.page-empty-state p {
    margin: 0;
    max-width: 380px;
    font-size: 13px;
    line-height: 1.55;
    font-weight: 500;
    color: var(--text-secondary, #94a3b8);
}

.flex-center-content {
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.social-btn-disabled {
    background: rgba(255,255,255,0.05);
    color: var(--text-gray);
    cursor: not-allowed;
    border: 1px solid rgba(255,255,255,0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.social-btn-inline {
    text-decoration: none;
    text-align: center;
}
