/* =========================================================
   MC4FUN - PERFORMANCE & COMPLIANCE V2
   - Düşük cihazlarda otomatik Lite Mode
   - Ağır blur/fixed background/animasyon azaltma
   - Son Kayıtlar global panel tasarımı
   - Footer yasal link düzeni
========================================================= */

:root {
    --mc4-perf-card: rgba(8, 12, 29, .86);
    --mc4-perf-card-2: rgba(12, 17, 39, .94);
    --mc4-perf-border: rgba(139, 92, 246, .28);
    --mc4-perf-text: #f8fafc;
    --mc4-perf-muted: rgba(226, 232, 240, .68);
    --mc4-perf-gold: #facc15;
    --mc4-perf-purple: #8b5cf6;
}

/* Browser çizim maliyetini düşür */
html,
body {
    scroll-behavior: auto !important;
}

body,
#app,
.mc4-app,
.mc4-app-shell,
#mc4-page-content,
.mc4-page-content,
.mc4-home,
.mc4-store-page,
.mc4-charge-page {
    background-attachment: scroll !important;
}

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

img[loading="lazy"] {
    content-visibility: auto;
}

/* Ağır cam efekti yerine stabil premium kart */
.mc4-master-shell,
.mc4-global-nav-shell,
.mc4-glass,
.mc4-card,
.card,
.mc4-store-card,
.mc4-product-detail-card,
.mc4-master-footer,
.mc4-global-recent,
.mc4-footer-dropdown-menu,
.mc4-mobile-panel,
.mc4-mobile-drawer,
.mc4-table-scroll {
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
}

/* Gölge/glow optimizasyonu */
.mc4-master-shell,
.mc4-global-nav-shell,
.mc4-master-footer,
.mc4-glass,
.mc4-card,
.card,
.mc4-store-card,
.mc4-product-detail-card,
.mc4-global-recent {
    box-shadow:
        0 10px 26px rgba(0,0,0,.26),
        inset 0 1px 0 rgba(255,255,255,.05) !important;
}

/* Render isolation: uzun sayfalarda scroll daha stabil */
.mc4-global-recent,
.mc4-master-footer,
.mc4-store-card,
.mc4-product-detail-card,
.card {
    contain: layout paint;
}

/* Hover animasyonları kısa ve ucuz */
a,
button,
.card,
.mc4-store-card,
.mc4-product-action-btn,
.mc4-global-recent-player,
.mc4-master-nav-item {
    transition:
        transform .14s ease,
        opacity .14s ease,
        color .14s ease,
        background-color .14s ease,
        border-color .14s ease !important;
}

.card:hover,
.mc4-store-card:hover,
.mc4-product-action-btn:hover,
.mc4-global-recent-player:hover,
.mc4-master-nav-item:hover {
    transform: translateY(-2px) !important;
}

/* Sürekli animasyonları yavaşlat */
.mc4fun-credit-ready::before,
.mc4fun-credit-pulse-text,
.mc4-gold-donor,
.mc4-block-credit-item {
    animation-duration: 3.8s !important;
}

/* Lite Mode: mobil, düşük RAM/CPU veya veri tasarrufu */
html.mc4-lite *,
html.mc4-lite *::before,
html.mc4-lite *::after {
    animation: none !important;
    transition: none !important;
    text-shadow: none !important;
}

html.mc4-lite .mc4-master-shell,
html.mc4-lite .mc4-global-nav-shell,
html.mc4-lite .mc4-master-footer,
html.mc4-lite .mc4-glass,
html.mc4-lite .mc4-card,
html.mc4-lite .card,
html.mc4-lite .mc4-store-card,
html.mc4-lite .mc4-product-detail-card,
html.mc4-lite .mc4-global-recent {
    box-shadow: 0 6px 16px rgba(0,0,0,.22) !important;
}

html.mc4-lite .mc4-global-header-glow,
html.mc4-lite .mc4-master-glow,
html.mc4-lite .mc4-hero-glow,
html.mc4-lite .mc4-main-soft-bg,
html.mc4-lite .mc4-product-image-box::before,
html.mc4-lite .mc4-store-card::before {
    display: none !important;
}

@media only screen and (max-width: 980px), (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation: none !important;
        transition: none !important;
        scroll-behavior: auto !important;
    }

    .mc4-master-shell,
    .mc4-global-nav-shell,
    .mc4-master-footer,
    .mc4-glass,
    .mc4-card,
    .card,
    .mc4-store-card,
    .mc4-product-detail-card,
    .mc4-global-recent {
        box-shadow: 0 6px 16px rgba(0,0,0,.22) !important;
    }

    .mc4-global-header-glow,
    .mc4-master-glow,
    .mc4-hero-glow,
    .mc4-main-soft-bg {
        display: none !important;
    }

    .card:hover,
    .mc4-store-card:hover,
    .mc4-product-action-btn:hover,
    .mc4-global-recent-player:hover,
    .mc4-master-nav-item:hover {
        transform: none !important;
    }
}

@media (hover: none) {
    a:hover,
    button:hover,
    .card:hover,
    .mc4-store-card:hover,
    .mc4-product-action-btn:hover,
    .mc4-global-recent-player:hover,
    .mc4-master-nav-item:hover {
        transform: none !important;
    }
}

/* =========================================================
   SON KAYITLAR - GLOBAL PANEL
========================================================= */

.mc4-global-recent,
.mc4-recent {
    width: min(1180px, calc(100% - 32px));
    margin: 34px auto;
    padding: 22px;
    border-radius: 22px;
    border: 1px solid var(--mc4-perf-border);
    background:
        radial-gradient(circle at 16% 0%, rgba(139,92,246,.13), transparent 32%),
        linear-gradient(180deg, rgba(12,17,39,.84), rgba(6,10,24,.94));
    color: var(--mc4-perf-text);
    visibility: visible !important;
    opacity: 1 !important;
    height: auto !important;
    max-height: none !important;
    overflow: visible !important;
}

.mc4-global-recent-head,
.mc4-recent .mc4-section-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 18px;
}

.mc4-global-recent-kicker {
    display: inline-flex;
    margin-bottom: 6px;
    color: var(--mc4-perf-gold);
    font-size: 12px;
    font-weight: 900;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.mc4-global-recent h2,
.mc4-recent .mc4-section-title {
    margin: 0;
    color: #ffffff !important;
    font-size: clamp(20px, 2vw, 28px);
    line-height: 1.1;
    font-weight: 1000;
}

.mc4-global-recent p {
    margin: 6px 0 0;
    color: var(--mc4-perf-muted);
    font-size: 14px;
    font-weight: 700;
}

.mc4-global-recent-link,
.mc4-recent .mc4-all-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 38px;
    padding: 0 13px;
    border-radius: 12px;
    border: 1px solid rgba(250,204,21,.24);
    background: rgba(250,204,21,.08);
    color: #fde68a !important;
    font-size: 13px;
    font-weight: 900;
    text-decoration: none !important;
}

.mc4-global-recent-grid,
.mc4-recent-grid {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    visibility: visible !important;
    opacity: 1 !important;
    height: auto !important;
    max-height: none !important;
}

.mc4-global-recent-player,
.mc4-recent-player {
    min-height: 76px;
    padding: 12px;
    display: flex !important;
    align-items: center;
    gap: 12px;
    border-radius: 16px;
    border: 1px solid rgba(255,255,255,.08);
    background: linear-gradient(180deg, rgba(15,23,42,.76), rgba(3,7,18,.68));
    color: #ffffff !important;
    text-decoration: none !important;
    visibility: visible !important;
    opacity: 1 !important;
    height: auto !important;
    max-height: none !important;
    overflow: hidden !important;
}

.mc4-global-recent-player:hover,
.mc4-recent-player:hover {
    border-color: rgba(250,204,21,.34);
    background: linear-gradient(180deg, rgba(24,32,58,.82), rgba(6,10,24,.78));
}

.mc4-global-recent-avatar,
.mc4-recent-avatar,
.mc4-global-recent-player img,
.mc4-recent-player img {
    width: 52px !important;
    height: 52px !important;
    min-width: 52px !important;
    border-radius: 14px !important;
    image-rendering: pixelated;
    visibility: visible !important;
    opacity: 1 !important;
}

.mc4-global-recent-info {
    min-width: 0;
}

.mc4-global-recent-info strong,
.mc4-recent-player strong {
    display: block;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #ffffff !important;
    font-size: 15px;
    font-weight: 1000;
    line-height: 1.15;
}

.mc4-global-recent-info small,
.mc4-recent-player span {
    display: block;
    margin-top: 4px;
    color: rgba(226,232,240,.62) !important;
    font-size: 12px;
    font-weight: 800;
}

.mc4-global-recent-empty {
    padding: 18px;
    border-radius: 15px;
    background: rgba(15,23,42,.58);
    color: rgba(226,232,240,.72);
    text-align: center;
    font-weight: 800;
}

/* =========================================================
   FOOTER YASAL LİNKLER
========================================================= */

.mc4-footer-legal {
    grid-column: 1 / -1;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid rgba(255,255,255,.08);
}

.mc4-footer-legal a {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    padding: 0 11px;
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,.08);
    background: rgba(255,255,255,.045);
    color: rgba(226,232,240,.80) !important;
    font-size: 12px;
    font-weight: 800;
    text-decoration: none !important;
}

.mc4-footer-legal a:hover {
    border-color: rgba(250,204,21,.30);
    color: #fde68a !important;
    background: rgba(250,204,21,.08);
}

.mc4-master-footer-bottom {
    gap: 12px;
}

/* Eski floating imza/footer overlay kaldırıldı; footer yasal linklerin üstünü kapatmasın. */
.hanyuceks-footer-link {
    position: static !important;
    display: inline-flex !important;
    margin-left: auto;
    color: rgba(226,232,240,.58) !important;
    font-size: 11px !important;
    font-weight: 800 !important;
    text-decoration: none !important;
    text-shadow: none !important;
}

@media only screen and (max-width: 980px) {
    .mc4-global-recent,
    .mc4-recent {
        width: calc(100% - 22px);
        margin: 24px auto;
        padding: 16px;
        border-radius: 18px;
    }

    .mc4-global-recent-head,
    .mc4-recent .mc4-section-head {
        align-items: flex-start;
        flex-direction: column;
        gap: 10px;
    }

    .mc4-global-recent-grid,
    .mc4-recent-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .mc4-global-recent-player,
    .mc4-recent-player {
        min-height: 70px;
        padding: 10px;
    }

    .mc4-global-recent-avatar,
    .mc4-recent-avatar,
    .mc4-global-recent-player img,
    .mc4-recent-player img {
        width: 44px !important;
        height: 44px !important;
        min-width: 44px !important;
    }
}

@media only screen and (max-width: 540px) {
    .mc4-global-recent-grid,
    .mc4-recent-grid {
        grid-template-columns: 1fr;
    }

    .mc4-footer-legal {
        gap: 6px;
    }

    .mc4-footer-legal a {
        min-height: 30px;
        padding: 0 9px;
        font-size: 11px;
    }
}

/* Light mode uyumu */
html.mc4-theme-light .mc4-global-recent,
body.mc4-theme-light .mc4-global-recent,
html.mc4-theme-light .mc4-recent,
body.mc4-theme-light .mc4-recent {
    background:
        radial-gradient(circle at 16% 0%, rgba(99,102,241,.10), transparent 32%),
        linear-gradient(180deg, rgba(255,255,255,.90), rgba(241,245,249,.96)) !important;
    border-color: rgba(99,102,241,.22) !important;
    color: #111827 !important;
}

html.mc4-theme-light .mc4-global-recent h2,
body.mc4-theme-light .mc4-global-recent h2,
html.mc4-theme-light .mc4-recent .mc4-section-title,
body.mc4-theme-light .mc4-recent .mc4-section-title,
html.mc4-theme-light .mc4-global-recent-info strong,
body.mc4-theme-light .mc4-global-recent-info strong,
html.mc4-theme-light .mc4-recent-player strong,
body.mc4-theme-light .mc4-recent-player strong {
    color: #111827 !important;
}

html.mc4-theme-light .mc4-global-recent p,
body.mc4-theme-light .mc4-global-recent p,
html.mc4-theme-light .mc4-global-recent-info small,
body.mc4-theme-light .mc4-global-recent-info small,
html.mc4-theme-light .mc4-recent-player span,
body.mc4-theme-light .mc4-recent-player span {
    color: #475569 !important;
}

html.mc4-theme-light .mc4-global-recent-player,
body.mc4-theme-light .mc4-global-recent-player,
html.mc4-theme-light .mc4-recent-player,
body.mc4-theme-light .mc4-recent-player {
    background: linear-gradient(180deg, rgba(255,255,255,.82), rgba(241,245,249,.92)) !important;
    border-color: rgba(15,23,42,.08) !important;
}

html.mc4-theme-light .mc4-footer-legal,
body.mc4-theme-light .mc4-footer-legal {
    border-top-color: rgba(15,23,42,.10) !important;
}

html.mc4-theme-light .mc4-footer-legal a,
body.mc4-theme-light .mc4-footer-legal a {
    background: rgba(15,23,42,.045) !important;
    border-color: rgba(15,23,42,.08) !important;
    color: #334155 !important;
}

/* Auth sayfalarında yasal linkler */
.mc4-auth-legal-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    padding: 16px 14px 22px;
    background: #030712;
}

.mc4-auth-legal-links a {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 0 10px;
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,.08);
    background: rgba(255,255,255,.045);
    color: rgba(226,232,240,.78) !important;
    font-size: 11px;
    font-weight: 800;
    text-decoration: none !important;
}

.mc4-auth-legal-links a:hover {
    color: #fde68a !important;
    border-color: rgba(250,204,21,.28);
    background: rgba(250,204,21,.08);
}
