/* ==========================================================================
   Yeni siteye giriş butonu — sağ altta yüzen kullanıcı simgesi + giriş penceresi (modal)
   Sınıflar "yeni-site-" önekiyle ayrıdır; eski sitenin stilleriyle çakışmaz.
   ========================================================================== */

.yeni-site-butonu {
    position: fixed;
    right: max(20px, env(safe-area-inset-right));
    bottom: max(20px, env(safe-area-inset-bottom));
    z-index: 2147483000;
    display: flex;
    align-items: center;
    text-decoration: none;
    -webkit-tap-highlight-color: transparent;
}

/* ---- Daire: yüzen, parlayan simge --------------------------------------- */

.yeni-site-butonu__daire {
    position: relative;
    display: grid;
    place-items: center;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    color: #fff;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 55%, #ec4899 100%);
    box-shadow: 0 14px 30px -6px rgba(99, 102, 241, .55), 0 4px 10px rgba(17, 24, 39, .18), inset 0 1px 0 rgba(255, 255, 255, .35);
    animation: yeniSiteYuz 3.6s ease-in-out infinite;
    transition: transform .3s cubic-bezier(.2, .8, .2, 1), box-shadow .3s ease;
}
/* Nabız halkası */
.yeni-site-butonu__daire::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 2px solid rgba(139, 92, 246, .55);
    animation: yeniSiteNabiz 2.6s ease-out infinite;
    pointer-events: none;
}
.yeni-site-butonu:hover .yeni-site-butonu__daire,
.yeni-site-butonu:focus-visible .yeni-site-butonu__daire {
    transform: scale(1.09);
    box-shadow: 0 18px 38px -6px rgba(99, 102, 241, .7), 0 6px 14px rgba(17, 24, 39, .2), inset 0 1px 0 rgba(255, 255, 255, .4);
    animation-play-state: paused;
}
.yeni-site-butonu:active .yeni-site-butonu__daire { transform: scale(.96); }
.yeni-site-butonu:focus-visible { outline: none; }
.yeni-site-butonu:focus-visible .yeni-site-butonu__daire { outline: 3px solid #fff; outline-offset: 2px; box-shadow: 0 0 0 6px rgba(99, 102, 241, .55), 0 14px 30px -6px rgba(99, 102, 241, .55); }

.yeni-site-butonu__ikon { display: block; filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .25)); }

/* ---- Giriş penceresi (modal) ---------------------------------------------- */

.yeni-site-modal {
    position: fixed;
    inset: 0;
    z-index: 2147483001;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: rgba(18, 14, 46, .58);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    animation: yeniSiteModalGir .2s ease;
}
.yeni-site-modal[hidden] { display: none; }

.yeni-site-modal__kutu {
    position: relative;
    display: flex;
    justify-content: center;
    width: min(468px, 100vw);
    max-height: 100%;
}

/* Çerçeve: yeni sitenin giriş kartı. Boyunu kart bildirir (yeni-site-butonu.js); hazır olana dek yükleniyor göstergesi. */
.yeni-site-modal__cerceve {
    display: block;
    width: 100%;
    height: 340px;
    max-height: 100%;
    border: 0;
    background: transparent;
    color-scheme: light;
    opacity: 0;
    transform: translateY(12px) scale(.98);
    transition: opacity .22s ease, transform .26s cubic-bezier(.2, .8, .2, 1);
}
.yeni-site-modal--hazir .yeni-site-modal__cerceve { opacity: 1; transform: none; }

.yeni-site-modal__yukleniyor {
    position: absolute;
    inset: 14px;
    display: grid;
    place-items: center;
    border-radius: 24px;
    background: #fff;
    box-shadow: 0 24px 60px -12px rgba(18, 14, 46, .45);
    transition: opacity .2s ease, visibility .2s;
}
.yeni-site-modal__yukleniyor span {
    width: 30px;
    height: 30px;
    border: 3px solid rgba(99, 102, 241, .22);
    border-top-color: #6366f1;
    border-radius: 50%;
    animation: yeniSiteDon .8s linear infinite;
}
.yeni-site-modal--hazir .yeni-site-modal__yukleniyor { opacity: 0; visibility: hidden; }

/* ---- Hareketler --------------------------------------------------------- */

@keyframes yeniSiteYuz {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-8px); }
}
@keyframes yeniSiteNabiz {
    0%   { transform: scale(1); opacity: .9; }
    70%  { transform: scale(1.7); opacity: 0; }
    100% { transform: scale(1.7); opacity: 0; }
}
@keyframes yeniSiteModalGir { from { opacity: 0; } to { opacity: 1; } }
@keyframes yeniSiteDon { to { transform: rotate(360deg); } }

/* ---- Dar ekran / erişilebilirlik / yazdırma ------------------------------ */

@media (max-width: 480px) {
    .yeni-site-butonu { right: max(14px, env(safe-area-inset-right)); bottom: max(14px, env(safe-area-inset-bottom)); }
    .yeni-site-butonu__daire { width: 58px; height: 58px; }
    .yeni-site-modal__yukleniyor { inset: 10px; border-radius: 20px; }
}

@media (prefers-reduced-motion: reduce) {
    .yeni-site-butonu__daire,
    .yeni-site-butonu__daire::before,
    .yeni-site-modal,
    .yeni-site-modal__yukleniyor span { animation: none; }
    .yeni-site-butonu__daire::before { display: none; }
    .yeni-site-modal__cerceve { transition: none; transform: none; }
}

@media print {
    .yeni-site-butonu,
    .yeni-site-modal { display: none; }
}
