/* ===== Anti-Winver Shared Interaction & Widget Layer ===== */

/* Grain / noise overlay for premium texture */
.grain-overlay {
    position: fixed;
    inset: 0;
    z-index: 60;
    pointer-events: none;
    opacity: 0.035;
    mix-blend-mode: overlay;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='120' height='120'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
}

/* Ambient aurora background */
.aurora { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.aurora span { position: absolute; border-radius: 50%; filter: blur(120px); opacity: 0.10; }
.aurora span:nth-child(1) { width: 500px; height: 500px; background: #ffffff; top: -10%; left: 10%; animation: drift1 22s ease-in-out infinite; }
.aurora span:nth-child(2) { width: 420px; height: 420px; background: #00ff88; bottom: -10%; right: 5%; animation: drift2 26s ease-in-out infinite; }
@keyframes drift1 { 0%, 100% { transform: translate(0,0) scale(1); } 50% { transform: translate(60px, 40px) scale(1.1); } }
@keyframes drift2 { 0%, 100% { transform: translate(0,0) scale(1); } 50% { transform: translate(-50px, -30px) scale(1.15); } }

/* 3D tilt cards */
.tilt { transform-style: preserve-3d; will-change: transform; transition: transform 0.15s ease-out; }

/* Mouse-tracked spotlight */
.spotlight { position: relative; overflow: hidden; }
.spotlight::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle 220px at var(--x, 50%) var(--y, 50%), rgba(255,255,255,0.08), transparent 70%);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}
.spotlight:hover::after { opacity: 1; }

/* Magnetic buttons */
.magnetic { transition: transform 0.2s ease-out; display: inline-block; }

/* Scramble text */
.scramble-text { display: inline-block; }

/* Active interactive terminal row */
.interactive-line.active-cmd {
    background: rgba(0, 255, 136, 0.07);
    border-color: rgba(0, 255, 136, 0.35);
}

/* ===== Aptitude-Inspired Floating Chat / Ticket Launcher ===== */
.aw-chat-launcher {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 90;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 18px;
    border-radius: 999px;
    background: rgba(12, 12, 12, 0.92);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.65), 0 0 20px rgba(0, 255, 136, 0.08);
    color: #ffffff;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    font-family: 'Plus Jakarta Sans', sans-serif;
}
.aw-chat-launcher:hover {
    border-color: rgba(0, 255, 136, 0.45);
    transform: translateY(-3px);
    box-shadow: 0 20px 48px rgba(0, 0, 0, 0.8), 0 0 24px rgba(0, 255, 136, 0.16);
}
.aw-chat-badge {
    background: rgba(0, 255, 136, 0.15);
    color: #00ff88;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.12em;
    padding: 3px 8px;
    border-radius: 999px;
    text-transform: uppercase;
}

/* Floating Support & Ticket Window */
.aw-chat-window {
    position: fixed;
    right: 24px;
    bottom: 84px;
    width: 380px;
    max-width: calc(100vw - 32px);
    z-index: 95;
    border-radius: 18px;
    background: rgba(10, 10, 10, 0.96);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 28px 64px rgba(0, 0, 0, 0.85);
    overflow: hidden;
    transform: translateY(16px) scale(0.97);
    opacity: 0;
    pointer-events: none;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
.aw-chat-window.open {
    transform: translateY(0) scale(1);
    opacity: 1;
    pointer-events: auto;
}

/* Client Portal Sign-In Modal */
.aw-modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 100;
    background: rgba(0, 0, 0, 0.78);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}
.aw-modal-backdrop.open {
    opacity: 1;
    pointer-events: auto;
}
.aw-modal-card {
    width: 100%;
    max-width: 440px;
    border-radius: 18px;
    background: #0b0b0b;
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 32px 80px rgba(0, 0, 0, 0.9);
    overflow: hidden;
    transform: translateY(12px);
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
.aw-modal-backdrop.open .aw-modal-card {
    transform: translateY(0);
}

/* Mobile Navigation Drawer */
.aw-mobile-drawer {
    position: fixed;
    top: 65px;
    left: 0;
    right: 0;
    z-index: 80;
    background: rgba(10, 10, 10, 0.96);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding: 20px 24px;
    display: none;
}
.aw-mobile-drawer.open {
    display: block;
}

/* PokeXperience-Style Bottom-Left Verified Subscriber Toast */
.aw-sub-toast {
    position: fixed;
    left: 24px;
    bottom: 24px;
    z-index: 88;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 15px;
    border-radius: 14px;
    background: rgba(14, 17, 22, 0.94);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.10);
    box-shadow: 0 14px 36px rgba(0, 0, 0, 0.7);
    color: #ffffff;
    font-family: 'Plus Jakarta Sans', sans-serif;
    transform: translateY(20px);
    opacity: 0;
    pointer-events: none;
    transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    max-width: calc(100vw - 48px);
}
.aw-sub-toast.visible {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
}
.aw-sub-toast-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: linear-gradient(135deg, rgba(0,255,136,0.18), rgba(255,255,255,0.06));
    border: 1px solid rgba(0, 255, 136, 0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 800;
    color: #00ff88;
    flex-shrink: 0;
}

