/* 
   Cursor Base Styles
   Temel yapı, konumlandırma ve emoji ayarları.
*/

:root {
    --cursor-border-width: 2px;
    --cursor-gap: 4px;
    /* Varsayılan Değerler */
    --cursor-size: 50px;
    --cursor-speed: 1s;
    --cursor-color: #a855f7;
}

/* 
   Özel imleç aktifken mouse'u gizle.
   Sistem varsayılan modunda bu class olmayacağı için mouse görünür olacak.
*/
body.custom-cursor-active {
    cursor: none !important;
}

/* =========================================
   BASE CONTAINER & MAIN
   ========================================= */

/* Tüm siteyi kaplayan wrapper (Gerekirse) */
.cursor-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 99999;
    overflow: hidden;
}

/* JS tarafından oluşturulan ana container */
.custom-cursor-container {
    position: fixed;
    top: 0;
    left: 0;
    pointer-events: none;
    z-index: 10000;
}

/* Ana İmleç Elementi */
.cursor-main {
    position: absolute;
    top: 0;
    left: 0;
    width: var(--cursor-size);
    height: var(--cursor-size);
    margin-left: calc(var(--cursor-size) / -2);
    margin-top: calc(var(--cursor-size) / -2);
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    will-change: transform;
}

/* Emoji */
.cursor-emoji {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 1.8rem;
    line-height: 1;
    z-index: 100;
    filter: drop-shadow(0 0 5px rgba(0, 0, 0, 0.5));
}

/* Halka Temel Stili */
.cursor-ring {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    z-index: 1;
    pointer-events: none;
    box-sizing: border-box;
}

/* =========================================
   ADMIN PREVIEW OVERRIDES
   ========================================= */
.cursor-preview {
    position: relative;
    width: 80px;
    height: 80px;
    margin: 0 auto 12px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 12px;
    overflow: hidden;
    display: block;
}

.cursor-preview .cursor-emoji {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 1.8rem;
    z-index: 100;
    margin: 0 !important;
}

.cursor-preview .cursor-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 50px !important;
    height: 50px !important;
    margin-left: -25px !important;
    margin-top: -25px !important;
    transform: none !important;
    z-index: 1;
    /* Admin panelinde animasyonların durması istenirse burası açılabilir */
    /* animation-play-state: paused !important; */
}

/* =========================================
   SYSTEM DEFAULT (GİZLEME)
   ========================================= */
.cursor-main[data-type="system_default"] {
    display: none !important;
}

.cursor-ring-system_default {
    display: none !important;
}

/* =========================================
   CLICK & TRAIL EFFECTS (ORTAK)
   ========================================= */
.click-effect {
    position: fixed;
    pointer-events: none;
    z-index: 99998;
}

.cursor-trail {
    position: fixed;
    pointer-events: none;
    z-index: 99997;
    will-change: transform, opacity;
}

/* Mobile Disable */
@media (max-width: 1024px),
(hover: none) {
    .custom-cursor-container {
        display: none !important;
    }

    /* Mobilde cursor:none'ı iptal et, normal imleç/dokunmatik davranış dönsün */
    body,
    body.custom-cursor-active {
        cursor: auto !important;
    }
}