/* ==========================================================
   Yeni (AI destekli) B4B sistemine yönlendirme bileşenleri
   - .ns-card   : login sayfasındaki duyuru kartı
   - .ns-modal  : Home sayfasında tek seferlik popup
   ========================================================== */

:root {
    --ns-bg-1: #0f1430;
    --ns-bg-2: #1c1f4a;
    --ns-text: #ffffff;
    --ns-muted: rgba(255, 255, 255, 0.72);
    --ns-accent-1: #f7c948;
    --ns-accent-2: #f5872b;
    --ns-glow: rgba(124, 92, 255, 0.55);
}

/* ---------- Login sayfası yerleşimi ---------- */
.login-stack {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 18px;
    width: 100%;
    max-width: 432px;
    padding: 0 16px;
    box-sizing: border-box;
}

/* ---------- Ortak: renkli animasyonlu çerçeve ---------- */
.ns-card,
.ns-modal__dialog {
    position: relative;
    isolation: isolate;
    color: var(--ns-text);
    background: linear-gradient(135deg, var(--ns-bg-1) 0%, var(--ns-bg-2) 100%);
    border-radius: 16px;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

    .ns-card::before,
    .ns-modal__dialog::before {
        content: "";
        position: absolute;
        inset: -2px;
        z-index: -1;
        border-radius: inherit;
        background: linear-gradient(120deg, #22d3ee, #7c5cff, #ec4899, #f5872b, #f7c948, #22d3ee);
        background-size: 300% 300%;
        animation: ns-border 6s linear infinite;
    }

    .ns-card::after,
    .ns-modal__dialog::after {
        content: "";
        position: absolute;
        inset: 0;
        z-index: -1;
        border-radius: inherit;
        background: radial-gradient(120% 80% at 100% 0%, rgba(124, 92, 255, 0.35) 0%, transparent 60%), linear-gradient(135deg, var(--ns-bg-1) 0%, var(--ns-bg-2) 100%);
    }

@keyframes ns-border {
    0% { background-position: 0% 50%; }
    100% { background-position: 300% 50%; }
}

.ns-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #1b1300;
    background: linear-gradient(90deg, var(--ns-accent-1), var(--ns-accent-2));
}

    .ns-badge__dot {
        width: 6px;
        height: 6px;
        border-radius: 50%;
        background: #1b1300;
        animation: ns-pulse 1.4s ease-in-out infinite;
    }

@keyframes ns-pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.35; transform: scale(0.7); }
}

.ns-icon {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: linear-gradient(135deg, #7c5cff, #22d3ee);
    box-shadow: 0 8px 24px var(--ns-glow);
}

    .ns-icon svg {
        width: 24px;
        height: 24px;
        fill: #fff;
    }

.ns-title {
    margin: 0;
    font-size: 17px;
    font-weight: 700;
    line-height: 1.3;
    color: var(--ns-text);
}

    .ns-title span {
        background: linear-gradient(90deg, #22d3ee, #a78bfa, #f472b6);
        -webkit-background-clip: text;
        background-clip: text;
        color: transparent;
    }

.ns-text {
    margin: 0;
    font-size: 13.5px;
    line-height: 1.55;
    color: var(--ns-muted);
}

    .ns-text strong {
        color: #fff;
        font-weight: 600;
    }

.ns-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 20px;
    border: 0;
    border-radius: 10px;
    font-size: 14.5px;
    font-weight: 700;
    text-decoration: none !important;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease;
    box-sizing: border-box;
}

.ns-btn--primary {
    color: #1b1300 !important;
    background: linear-gradient(90deg, var(--ns-accent-1), var(--ns-accent-2));
    box-shadow: 0 8px 22px rgba(245, 135, 43, 0.38);
}

    .ns-btn--primary:hover {
        transform: translateY(-1px);
        box-shadow: 0 12px 28px rgba(245, 135, 43, 0.5);
    }

    .ns-btn--primary svg {
        width: 16px;
        height: 16px;
        fill: currentColor;
        transition: transform 0.2s ease;
    }

    .ns-btn--primary:hover svg {
        transform: translateX(3px);
    }

.ns-btn--ghost {
    color: rgba(255, 255, 255, 0.85) !important;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.18);
}

    .ns-btn--ghost:hover {
        background: rgba(255, 255, 255, 0.14);
    }

.ns-btn:focus-visible {
    outline: 2px solid #22d3ee;
    outline-offset: 2px;
}

/* ---------- Login kartı ---------- */
.ns-card {
    width: 100%;
    padding: 18px 18px 16px;
    box-shadow: 0 0.9rem 1.7rem rgba(15, 20, 48, 0.35);
    animation: ns-rise 0.6s ease-out both;
    text-align: left;
}

.ns-card__head {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-bottom: 10px;
}

.ns-card__head-text {
    display: flex;
    flex-direction: column;
    gap: 6px;
    align-items: flex-start;
}

.ns-card .ns-text {
    margin-bottom: 14px;
}

.ns-card .ns-btn {
    width: 100%;
}

@keyframes ns-rise {
    from { opacity: 0; transform: translateY(14px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ---------- Home tek seferlik modal ---------- */
.ns-modal {
    position: fixed;
    inset: 0;
    z-index: 2147483000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: rgba(8, 10, 28, 0.62);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

    .ns-modal.is-open {
        opacity: 1;
        visibility: visible;
    }

.ns-modal__dialog {
    width: 100%;
    max-width: 520px;
    padding: 30px 28px 24px;
    text-align: center;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
    transform: translateY(20px) scale(0.97);
    transition: transform 0.35s cubic-bezier(.2, .9, .3, 1.2);
}

.ns-modal.is-open .ns-modal__dialog {
    transform: translateY(0) scale(1);
}

.ns-modal__close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    font-size: 20px;
    line-height: 34px;
    cursor: pointer;
    transition: background 0.2s;
}

    .ns-modal__close:hover {
        background: rgba(255, 255, 255, 0.18);
    }

.ns-modal .ns-icon {
    width: 64px;
    height: 64px;
    border-radius: 18px;
    margin: 6px auto 16px;
}

    .ns-modal .ns-icon svg {
        width: 34px;
        height: 34px;
    }

.ns-modal .ns-badge {
    margin-bottom: 12px;
}

.ns-modal .ns-title {
    font-size: 23px;
    margin-bottom: 10px;
}

.ns-modal .ns-text {
    font-size: 14.5px;
    margin: 0 auto 18px;
    max-width: 420px;
}

.ns-features {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin: 0 0 22px;
    padding: 0;
    list-style: none;
}

    .ns-features li {
        padding: 6px 12px;
        border-radius: 999px;
        font-size: 12.5px;
        color: #e6e8ff;
        background: rgba(124, 92, 255, 0.18);
        border: 1px solid rgba(167, 139, 250, 0.35);
    }

.ns-modal__actions {
    display: flex;
    gap: 10px;
}

    .ns-modal__actions .ns-btn {
        flex: 1 1 0;
    }

@media (max-width: 480px) {
    .ns-modal__dialog {
        padding: 26px 18px 18px;
    }

    .ns-modal .ns-title {
        font-size: 20px;
    }

    .ns-modal__actions {
        flex-direction: column-reverse;
    }
}

@media (prefers-reduced-motion: reduce) {
    .ns-card,
    .ns-card::before,
    .ns-modal__dialog::before,
    .ns-badge__dot {
        animation: none;
    }
}
