/**
 * Novara LEGEND - WOW Experience
 * Premium loaders, onboarding, micro-interactions, hover physics
 */

/* === PREMIUM LOADER (boot-up) === */
.novara-wow-loader {
    position: fixed;
    inset: 0;
    background: radial-gradient(circle at center, #1a0a0d 0%, #0A0A0F 100%);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    transition: opacity 600ms cubic-bezier(0.4, 0, 0.2, 1),
                visibility 600ms;
}

.novara-wow-loader.is-loaded {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.novara-wow-loader__logo {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 4rem;
    font-weight: 900;
    color: white;
    letter-spacing: -0.04em;
    position: relative;
    animation: novara-wow-logo-pulse 2s ease-in-out infinite;
}

.novara-wow-loader__logo::after {
    content: '';
    position: absolute;
    right: -16px;
    top: 50%;
    transform: translateY(-50%);
    width: 12px;
    height: 12px;
    background: #E63946;
    border-radius: 50%;
    box-shadow: 0 0 24px #E63946, 0 0 48px rgba(230, 57, 70, 0.5);
    animation: novara-wow-dot 1.5s ease-in-out infinite;
}

.novara-wow-loader__bar {
    width: 200px;
    height: 2px;
    background: rgba(255, 255, 255, 0.1);
    margin-top: 32px;
    border-radius: 1px;
    overflow: hidden;
    position: relative;
}

.novara-wow-loader__bar::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, #E63946, transparent);
    animation: novara-wow-progress 1.8s ease-in-out infinite;
}

@keyframes novara-wow-logo-pulse {
    0%, 100% { transform: scale(1); }
    50%      { transform: scale(1.03); }
}

@keyframes novara-wow-dot {
    0%, 100% { transform: translateY(-50%) scale(1); opacity: 1; }
    50%      { transform: translateY(-50%) scale(1.4); opacity: 0.6; }
}

@keyframes novara-wow-progress {
    0%   { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* === MAGNETIC BUTTONS === */
.novara-magnetic {
    position: relative;
    display: inline-block;
    transition: transform 200ms cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform;
}

.novara-magnetic:hover {
    transition-duration: 100ms;
}

/* === LIQUID HOVER CARDS === */
.novara-card-liquid {
    position: relative;
    overflow: hidden;
    transform-style: preserve-3d;
    transition: transform 500ms cubic-bezier(0.16, 1, 0.3, 1);
}

.novara-card-liquid::before {
    content: '';
    position: absolute;
    inset: -50%;
    background: radial-gradient(circle at var(--mouse-x, 50%) var(--mouse-y, 50%),
                rgba(230, 57, 70, 0.15) 0%,
                transparent 50%);
    opacity: 0;
    transition: opacity 400ms ease;
    pointer-events: none;
    z-index: 1;
}

.novara-card-liquid:hover::before {
    opacity: 1;
}

.novara-card-liquid > * {
    position: relative;
    z-index: 2;
}

/* === SHIMMER CARD HOVER === */
.novara-card-shimmer {
    position: relative;
    overflow: hidden;
}

.novara-card-shimmer::after {
    content: '';
    position: absolute;
    top: 0;
    left: -75%;
    width: 50%;
    height: 100%;
    background: linear-gradient(120deg,
        transparent 0%,
        rgba(255, 255, 255, 0.4) 50%,
        transparent 100%);
    transform: skewX(-20deg);
    transition: left 600ms cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
}

.novara-card-shimmer:hover::after {
    left: 125%;
}

/* === FLOATING ACTION FEEDBACK === */
.novara-action-feedback {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    background: rgba(10, 10, 15, 0.95);
    backdrop-filter: blur(20px);
    color: white;
    padding: 32px 48px;
    border-radius: 20px;
    font-size: 18px;
    font-weight: 600;
    box-shadow: 0 32px 80px rgba(0, 0, 0, 0.4);
    z-index: 99997;
    opacity: 0;
    transition: all 400ms cubic-bezier(0.34, 1.56, 0.64, 1);
    pointer-events: none;
    display: flex;
    align-items: center;
    gap: 16px;
}

.novara-action-feedback.is-visible {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
}

.novara-action-feedback__icon {
    font-size: 32px;
}

/* === EMPTY STATES === */
.novara-empty-state {
    text-align: center;
    padding: 80px 32px;
    max-width: 480px;
    margin: 0 auto;
}

.novara-empty-state__illustration {
    width: 120px;
    height: 120px;
    margin: 0 auto 24px;
    background: linear-gradient(135deg, rgba(230, 57, 70, 0.1), rgba(230, 57, 70, 0.02));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    animation: novara-empty-float 3s ease-in-out infinite;
}

@keyframes novara-empty-float {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-8px); }
}

.novara-empty-state__title {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.75rem;
    font-weight: 800;
    margin: 0 0 12px;
    color: var(--text-primary, #0A0A0F);
}

.novara-empty-state__description {
    color: var(--text-secondary, #6b7280);
    line-height: 1.6;
    margin: 0 0 24px;
}

/* === ELEGANT TOAST === */
.novara-wow-toast {
    position: fixed;
    bottom: 32px;
    right: 32px;
    background: white;
    border-radius: 16px;
    padding: 16px 24px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.12),
                0 0 0 1px rgba(0, 0, 0, 0.05);
    max-width: 360px;
    z-index: 99996;
    transform: translateX(120%);
    opacity: 0;
    transition: all 500ms cubic-bezier(0.34, 1.56, 0.64, 1);
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.novara-wow-toast.is-visible {
    transform: translateX(0);
    opacity: 1;
}

.novara-wow-toast__icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: linear-gradient(135deg, #E63946, #c1121f);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}

.novara-wow-toast__title {
    font-weight: 700;
    margin: 0 0 4px;
    font-size: 14px;
    color: #0A0A0F;
}

.novara-wow-toast__message {
    font-size: 13px;
    color: #6b7280;
    margin: 0;
    line-height: 1.5;
}

/* === ONBOARDING CARD === */
.novara-onboarding {
    position: fixed;
    bottom: 32px;
    left: 32px;
    background: linear-gradient(135deg, #E63946, #c1121f);
    color: white;
    padding: 24px;
    border-radius: 20px;
    max-width: 320px;
    box-shadow: 0 24px 64px rgba(230, 57, 70, 0.4);
    z-index: 99995;
    transform: translateY(120%);
    opacity: 0;
    transition: all 600ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

.novara-onboarding.is-visible {
    transform: translateY(0);
    opacity: 1;
}

.novara-onboarding__close {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.novara-onboarding__title {
    font-size: 16px;
    font-weight: 700;
    margin: 0 0 8px;
    padding-right: 24px;
}

.novara-onboarding__text {
    font-size: 13px;
    line-height: 1.5;
    margin: 0 0 16px;
    opacity: 0.9;
}

.novara-onboarding__btn {
    background: white;
    color: #c1121f;
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    font-size: 13px;
    transition: transform 0.2s;
}

.novara-onboarding__btn:hover {
    transform: translateY(-1px);
}

/* === UNIFIED VISUAL LANGUAGE (TOKENS) === */
:root {
    /* Spacing rhythm (8pt grid) */
    --novara-space-1: 4px;
    --novara-space-2: 8px;
    --novara-space-3: 16px;
    --novara-space-4: 24px;
    --novara-space-5: 32px;
    --novara-space-6: 48px;
    --novara-space-7: 64px;
    --novara-space-8: 96px;

    /* Elevation hierarchy */
    --novara-elev-0: none;
    --novara-elev-1: 0 1px 2px rgba(0,0,0,0.04), 0 1px 3px rgba(0,0,0,0.06);
    --novara-elev-2: 0 4px 6px rgba(0,0,0,0.04), 0 2px 4px rgba(0,0,0,0.06);
    --novara-elev-3: 0 10px 15px rgba(0,0,0,0.08), 0 4px 6px rgba(0,0,0,0.05);
    --novara-elev-4: 0 20px 25px rgba(0,0,0,0.10), 0 10px 10px rgba(0,0,0,0.04);
    --novara-elev-5: 0 25px 50px rgba(0,0,0,0.15);

    /* Animation curves */
    --novara-ease-out:     cubic-bezier(0.16, 1, 0.3, 1);
    --novara-ease-in-out:  cubic-bezier(0.4, 0, 0.2, 1);
    --novara-ease-spring:  cubic-bezier(0.34, 1.56, 0.64, 1);
    --novara-ease-snappy:  cubic-bezier(0.4, 0, 0.6, 1);

    /* Timing scale */
    --novara-duration-instant: 100ms;
    --novara-duration-fast:    200ms;
    --novara-duration-base:    300ms;
    --novara-duration-slow:    500ms;
    --novara-duration-slower:  800ms;
}

/* === DARK MODE === */
[data-theme="dark"] .novara-wow-toast {
    background: rgba(20, 20, 25, 0.95);
    backdrop-filter: blur(20px);
    color: white;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5),
                0 0 0 1px rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .novara-wow-toast__title    { color: white; }
[data-theme="dark"] .novara-wow-toast__message  { color: #9ca3af; }

/* === REDUCED MOTION === */
@media (prefers-reduced-motion: reduce) {
    .novara-wow-loader__logo,
    .novara-wow-loader__bar::after,
    .novara-empty-state__illustration {
        animation: none !important;
    }
    .novara-card-liquid::before,
    .novara-card-shimmer::after {
        display: none !important;
    }
}
