/* =====================================================
   Norani Neuron Network v2.3 — Stylesheet
===================================================== */

.norani-neuron-wrapper {
    position: relative;
    width: 100%;
    min-height: 400px;
    background: #050813;
    overflow: visible; /* tooltip'in wrapper dışına taşmaması için */
    border-radius: 12px;
    box-sizing: border-box;
}

/* Arka plan görseli */
.norani-bg-image {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: 0;
    transition: opacity 0.6s ease;
}

/* Arka plan videosu */
.norani-bg-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
    transition: opacity 0.4s ease;
    display: none; /* JS tarafından gösterilir */
}

/* Animasyon içeriğini kırp (canvas, arka plan vb.) */
.norani-neuron-canvas,
.norani-bg-image,
.norani-bg-video {
    border-radius: 12px;
}

/* Canvas katmanı */
.norani-neuron-canvas {
    position: absolute;
    inset: 0;
    z-index: 1;
    display: block;
}

/* Metin katmanı */
.norani-text-layer {
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: none;
    overflow: hidden;
}

/* Uçuşan metin etiketleri */
.norani-floating-text {
    position: absolute;
    top: 0;
    left: 0;
    /* font, renk, boyut, kalınlık, hizalama editörden gelir */
    white-space: nowrap;
    will-change: transform;
    transition: opacity 0.35s ease, text-shadow 0.35s ease, color 0.35s ease;
    pointer-events: auto;
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
    padding: 4px 8px;
    border-radius: 4px;
    transform: translate(0, 0);
}

.norani-floating-text:hover,
.norani-floating-text.active {
    opacity: 1 !important;
    text-shadow: 0 0 12px currentColor, 0 0 24px currentColor;
    z-index: 10;
}

.norani-floating-text.sparkle {
    opacity: 1;
    text-shadow: 0 0 10px #00F5FF, 0 0 22px #00F5FF, 0 0 40px rgba(0,245,255,0.4);
}

/* ─── Tooltip ─────────────────────────────────────── */
.norani-tooltip {
    position: absolute; /* wrapper içinde kalır */
    z-index: 9999;
    pointer-events: auto;
    font-family: 'DM Sans', sans-serif;
    transition: opacity 0.25s ease, transform 0.25s ease;
    transform-origin: top left;
    box-sizing: border-box;
    overflow-y: auto;
}

/* Dinamik scrollbar — JS inline stilinin yanı sıra webkit için */
.norani-tooltip::-webkit-scrollbar {
    width: var(--tip-scroll-w, 4px);
}
.norani-tooltip::-webkit-scrollbar-track {
    background: transparent;
}
.norani-tooltip::-webkit-scrollbar-thumb {
    background: var(--tip-scroll-color, #00F5FF);
    border-radius: 99px;
}

.norani-tooltip.fade-out {
    opacity: 0;
    transform: scale(0.96);
    pointer-events: none;
}

.norani-tooltip h3 {
    display: none; /* Başlık kaldırıldı */
}

.norani-tooltip p,
.norani-tooltip .norani-desc {
    margin: 0 0 8px 0;
}

/* Editörden gelen zengin metin biçimlendirmesini koru */
.norani-tooltip .norani-desc strong { font-weight: bold; }
.norani-tooltip .norani-desc em { font-style: italic; }
.norani-tooltip .norani-desc u { text-decoration: underline; }
.norani-tooltip .norani-desc s { text-decoration: line-through; }
.norani-tooltip .norani-desc a { color: #00F5FF; text-decoration: underline; }
.norani-tooltip .norani-desc ul,
.norani-tooltip .norani-desc ol { margin: 4px 0 8px 18px; padding: 0; }
.norani-tooltip .norani-desc li { margin-bottom: 2px; }
.norani-tooltip .norani-desc p { margin: 0 0 6px; }

.norani-tooltip img {
    max-width: 100%;
    border-radius: 8px;
    margin: 8px 0;
    display: block;
    object-fit: contain; /* kırpma yok, tamamı görünsün */
    width: 100%;
    height: auto;
}

/* ─── Video Thumbnail ──────────────────────────────── */
.norani-video-thumb-wrap {
    position: relative;
    cursor: pointer;
    border-radius: 8px;
    overflow: hidden;
    margin: 8px 0;
    line-height: 0;
}

.norani-video-thumb-wrap:hover .norani-play-btn {
    background: rgba(0, 245, 255, 0.85);
    transform: translate(-50%, -50%) scale(1.1);
}

.norani-video-thumb-wrap:hover .norani-video-thumb {
    filter: brightness(0.7);
}

.norani-video-thumb {
    max-width: 100%;
    width: 100%;
    height: auto;
    object-fit: contain; /* kırpma yok */
    display: block;
    border-radius: 8px;
    transition: filter 0.25s ease;
}

.norani-play-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.25s ease, transform 0.25s ease;
}

.norani-play-btn svg {
    width: 18px;
    height: 18px;
    fill: #ffffff;
    margin-left: 3px; /* optik hizalama */
}

/* ─── Read more linki ──────────────────────────────── */
.norani-tooltip .norani-read-more {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-top: 6px;
    color: #00F5FF;
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: 500;
    transition: color 0.2s ease;
}

.norani-tooltip .norani-read-more:hover {
    color: #ffffff;
}

.norani-tooltip .norani-read-more svg {
    width: 13px;
    height: 13px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}


/* Mobil */
@media (max-width: 768px) {
    .norani-neuron-wrapper {
        border-radius: 8px;
    }

    .norani-tooltip {
        max-width: 220px;
        padding: 14px 15px;
    }
}

@media (max-width: 480px) {
    .norani-tooltip {
        max-width: 180px;
    }
}
