/* ═══════════════════════════════════════════════════
   IGO → SYGIC  ·  Cyber-Minimalist Design System
   ═══════════════════════════════════════════════════ */

/* ─── Design Tokens ─── */
:root {
    --c-void:       #070710;
    --c-obsidian:   #0c0c18;
    --c-charcoal:   #13131f;
    --c-surface:    #16162a;
    --c-border:     rgba(255,255,255,0.07);
    --c-border-hi:  rgba(0,245,255,0.35);

    --neon-cyan:    #00f5ff;
    --neon-purple:  #7b2fff;
    --neon-blue:    #3d8bff;
    --neon-violet:  #bf00ff;
    --holographic:  rgba(0,245,255,0.08);

    --grad-primary: linear-gradient(135deg, var(--neon-cyan) 0%, var(--neon-purple) 100%);
    --grad-glow:    linear-gradient(90deg, var(--neon-cyan), var(--neon-purple), var(--neon-cyan));

    --text-primary:   #f0f0ff;
    --text-secondary: #8888bb;
    --text-muted:     #55557a;

    --font-sans: 'Space Grotesk', system-ui, sans-serif;
    --font-mono: 'Space Mono', 'Courier New', monospace;

    --radius-card:   28px;
    --radius-md:     16px;
    --radius-sm:     10px;

    --blur-card:     blur(24px) saturate(160%);
    --blur-orb:      blur(120px);

    --shadow-card:   0 0 0 1px var(--c-border),
                     0 32px 64px -16px rgba(0,0,0,0.7),
                     0 0 80px -20px rgba(123,47,255,0.15);
    --shadow-btn:    0 8px 32px -6px rgba(0,245,255,0.4),
                     0 2px 8px rgba(0,0,0,0.5);
    --glow-cyan:     0 0 18px rgba(0,245,255,0.6),
                     0 0 40px rgba(0,245,255,0.25);
    --glow-purple:   0 0 18px rgba(123,47,255,0.6),
                     0 0 40px rgba(123,47,255,0.25);

    --transition-fast:  180ms cubic-bezier(.4,0,.2,1);
    --transition-base:  320ms cubic-bezier(.4,0,.2,1);
    --transition-slow:  600ms cubic-bezier(.22,1,.36,1);
}

/* ─── Reset ─── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
img { display: block; }

/* ─── Base ─── */
html {
    background: var(--c-void);
    color-scheme: dark;
}

body {
    font-family: var(--font-sans);
    background: var(--c-void);
    color: var(--text-primary);
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow-x: hidden;
    cursor: none;
}

/* ─── Custom Cursor ─── */
#cursor-dot {
    position: fixed;
    top: 0; left: 0;
    width: 6px; height: 6px;
    background: var(--neon-cyan);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    transform: translate(-50%, -50%);
    box-shadow: var(--glow-cyan);
    transition: transform 50ms linear, opacity var(--transition-fast);
}

#cursor-ring {
    position: fixed;
    top: 0; left: 0;
    width: 32px; height: 32px;
    border: 1px solid rgba(0,245,255,0.5);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9998;
    transform: translate(-50%, -50%);
    transition: transform 120ms cubic-bezier(.22,1,.36,1),
                width var(--transition-fast),
                height var(--transition-fast),
                border-color var(--transition-fast);
}

/* ─── Particle Canvas ─── */
#particle-canvas {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 1;
}

/* ─── Ambient Orbs ─── */
.ambient-layer {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.orb {
    position: absolute;
    border-radius: 50%;
    filter: var(--blur-orb);
    opacity: 0.55;
    will-change: transform;
    animation: orbFloat 20s ease-in-out infinite alternate;
}

.orb-1 {
    width: 600px; height: 600px;
    background: radial-gradient(circle, rgba(123,47,255,0.5) 0%, transparent 70%);
    top: -200px; left: -200px;
    animation-duration: 22s;
}

.orb-2 {
    width: 500px; height: 500px;
    background: radial-gradient(circle, rgba(0,245,255,0.4) 0%, transparent 70%);
    bottom: -150px; right: -150px;
    animation-duration: 18s;
    animation-delay: -9s;
}

.orb-3 {
    width: 350px; height: 350px;
    background: radial-gradient(circle, rgba(61,139,255,0.35) 0%, transparent 70%);
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    animation-duration: 26s;
    animation-delay: -13s;
    opacity: 0.3;
}

@keyframes orbFloat {
    0%   { transform: translate(0, 0) scale(1); }
    50%  { transform: translate(40px, -30px) scale(1.05); }
    100% { transform: translate(-20px, 20px) scale(0.97); }
}

/* ─── Grid Overlay ─── */
.grid-overlay {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 1;
    background-image:
        linear-gradient(rgba(0,245,255,0.028) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0,245,255,0.028) 1px, transparent 1px);
    background-size: 48px 48px;
    mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black 40%, transparent 100%);
}

/* ─── Scanline ─── */
.scanline-overlay {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 2;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(0,0,0,0.08) 2px,
        rgba(0,0,0,0.08) 4px
    );
    animation: scanMove 8s linear infinite;
}

@keyframes scanMove {
    from { background-position: 0 0; }
    to   { background-position: 0 80px; }
}

/* ─── Stage ─── */
.stage {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 500px;
    padding: 24px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

/* ─── Main Card ─── */
.card {
    position: relative;
    width: 100%;
    background: rgba(22, 22, 42, 0.72);
    backdrop-filter: var(--blur-card);
    -webkit-backdrop-filter: var(--blur-card);
    border-radius: var(--radius-card);
    border: 1px solid var(--c-border);
    box-shadow: var(--shadow-card);
    padding: 40px 36px 36px;
    overflow: hidden;
    animation: cardReveal var(--transition-slow) both;
    will-change: transform;
}

.card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(
        155deg,
        rgba(255,255,255,0.045) 0%,
        rgba(255,255,255,0) 50%,
        rgba(123,47,255,0.03) 100%
    );
    pointer-events: none;
    z-index: 0;
}

.card > * { position: relative; z-index: 1; }

@keyframes cardReveal {
    from {
        opacity: 0;
        transform: translateY(32px) scale(0.97);
        filter: blur(4px);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
        filter: blur(0);
    }
}

/* ─── Card Accent Bar ─── */
.card-accent-bar {
    position: absolute !important;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: var(--grad-glow);
    background-size: 200% 100%;
    border-radius: var(--radius-card) var(--radius-card) 0 0;
    animation: shimmerBar 3s linear infinite;
    z-index: 2 !important;
}

@keyframes shimmerBar {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ─── Logo Row ─── */
.logo-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-bottom: 32px;
    animation: fadeSlideIn 0.7s 0.2s both;
}

@keyframes fadeSlideIn {
    from { opacity: 0; transform: translateY(-12px); }
    to   { opacity: 1; transform: translateY(0); }
}

.logo-frame {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-img {
    height: 42px;
    width: auto;
    position: relative;
    z-index: 2;
    filter: drop-shadow(0 0 8px rgba(255,255,255,0.15));
    transition: filter var(--transition-base), transform var(--transition-base);
}

.logo-frame:hover .logo-img {
    filter: drop-shadow(0 0 14px rgba(0,245,255,0.6));
    transform: scale(1.06);
}

.logo-halo {
    position: absolute;
    inset: -10px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(0,245,255,0.12) 0%, transparent 70%);
    z-index: 1;
    animation: haloPulse 3s ease-in-out infinite alternate;
}

.logo-halo--sygic {
    background: radial-gradient(circle, rgba(123,47,255,0.15) 0%, transparent 70%);
    animation-delay: -1.5s;
}

@keyframes haloPulse {
    0%   { opacity: 0.6; transform: scale(0.95); }
    100% { opacity: 1;   transform: scale(1.1);  }
}

.arrow-wrap {
    display: flex;
    align-items: center;
    animation: arrowPulse 2s ease-in-out infinite;
}

.arrow-svg { width: 48px; height: 12px; }

@keyframes arrowPulse {
    0%, 100% { opacity: 0.7; transform: translateX(0); }
    50%       { opacity: 1;   transform: translateX(3px); }
}

/* ─── Headline ─── */
.headline-wrap {
    text-align: center;
    margin-bottom: 32px;
    animation: fadeSlideIn 0.7s 0.3s both;
}

.eyebrow {
    font-size: 0.72rem;
    font-family: var(--font-mono);
    color: var(--text-muted);
    letter-spacing: 0.15em;
    text-transform: uppercase;
    margin-bottom: 12px;
}

.eyebrow .mono { color: var(--neon-cyan); margin-right: 4px; }

.headline {
    font-size: clamp(2rem, 6vw, 2.6rem);
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.04em;
    margin-bottom: 14px;
}

.grad-text {
    background: var(--grad-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.sub {
    font-size: 0.88rem;
    color: var(--text-secondary);
    font-weight: 400;
    line-height: 1.6;
    max-width: 340px;
    margin: 0 auto;
}

/* ─── Drop Zone ─── */
.drop-zone {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 28px 20px;
    border: 1.5px dashed rgba(0,245,255,0.22);
    border-radius: var(--radius-md);
    cursor: none;
    transition: all var(--transition-base);
    background: rgba(0,245,255,0.02);
    margin-bottom: 16px;
    position: relative;
    overflow: hidden;
    animation: fadeSlideIn 0.7s 0.4s both;
}

.drop-zone:hover {
    border-color: rgba(0,245,255,0.6);
    background: rgba(0,245,255,0.05);
    transform: translateY(-2px);
    box-shadow: 0 8px 32px -8px rgba(0,245,255,0.15),
                inset 0 0 0 1px rgba(0,245,255,0.1);
}

.drop-icon {
    width: 44px; height: 44px;
    background: rgba(0,245,255,0.07);
    border: 1px solid rgba(0,245,255,0.18);
    border-radius: 12px;
    display: grid;
    place-content: center;
    margin-bottom: 4px;
    transition: all var(--transition-base);
}

.drop-zone:hover .drop-icon {
    background: rgba(0,245,255,0.14);
    border-color: rgba(0,245,255,0.4);
    box-shadow: var(--glow-cyan);
    transform: scale(1.1);
}

.drop-icon svg { width: 22px; height: 22px; }

.drop-main {
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--text-primary);
}

.drop-sub {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.drop-filename {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--neon-cyan);
    min-height: 1.2em;
    text-align: center;
    word-break: break-all;
    max-width: 100%;
}

.mono   { font-family: var(--font-mono); }
.accent { color: var(--neon-cyan); }

input[type="file"] { display: none; }

/* ─── Convert Button ─── */
.btn-convert {
    position: relative;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 16px 28px;
    background: var(--grad-primary);
    color: #fff;
    font-family: var(--font-sans);
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    border: none;
    border-radius: var(--radius-md);
    cursor: none;
    overflow: hidden;
    box-shadow: var(--shadow-btn);
    transition: transform var(--transition-fast), box-shadow var(--transition-fast);
    animation: fadeSlideIn 0.7s 0.5s both;
}

.btn-convert:hover {
    transform: translateY(-3px) scale(1.01);
    box-shadow: 0 12px 40px -8px rgba(0,245,255,0.55),
                0 4px 12px rgba(0,0,0,0.4);
}

.btn-convert:active { transform: translateY(0) scale(0.99); }

.btn-shine {
    position: absolute;
    top: 0; left: -100%;
    width: 60%; height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255,255,255,0.18),
        transparent
    );
    pointer-events: none;
    transition: left 500ms ease;
}

.btn-convert:hover .btn-shine { left: 150%; }

.btn-icon { width: 18px; height: 18px; flex-shrink: 0; }

/* ─── Progress ─── */
.progress-wrap {
    margin-top: 22px;
    animation: fadeSlideIn 0.4s both;
}

.progress-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.status-label {
    font-size: 0.74rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.status-pct {
    font-size: 0.7rem;
    color: var(--neon-cyan);
}

.pulse-dot {
    width: 7px; height: 7px;
    border-radius: 50%;
    background: var(--neon-cyan);
    box-shadow: 0 0 6px var(--neon-cyan);
    animation: dotPulse 1.4s ease-in-out infinite;
    flex-shrink: 0;
}

.pulse-dot--purple {
    background: var(--neon-purple);
    box-shadow: 0 0 6px var(--neon-purple);
}

@keyframes dotPulse {
    0%, 100% { opacity: 0.4; transform: scale(0.8); }
    50%       { opacity: 1;   transform: scale(1.2); }
}

.progress-track {
    width: 100%;
    height: 5px;
    background: rgba(255,255,255,0.06);
    border-radius: 99px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.04);
}

.progress-fill {
    height: 100%;
    width: 0%;
    border-radius: 99px;
    background: var(--grad-primary);
    transition: width 0.3s ease;
    box-shadow: 0 0 10px rgba(0,245,255,0.4);
}

.neon-fill {
    background: linear-gradient(90deg, var(--neon-cyan), var(--neon-blue));
    box-shadow: 0 0 10px rgba(0,245,255,0.5);
}

.convert-anim {
    background: var(--grad-glow);
    background-size: 200% 100%;
}

.working {
    animation: loadingBar 1.6s linear infinite;
    width: 100% !important;
}

@keyframes loadingBar {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.final-status {
    font-size: 0.77rem;
    color: var(--text-secondary);
    text-align: center;
    margin-top: 14px;
    font-family: var(--font-mono);
    letter-spacing: 0.03em;
}

/* ─── Result Card ─── */
.result-card {
    margin-top: 22px;
    padding: 28px 24px;
    background: rgba(0,245,255,0.04);
    border: 1px solid rgba(0,245,255,0.2);
    border-radius: var(--radius-md);
    text-align: center;
    animation: resultAppear 0.5s cubic-bezier(.22,1,.36,1) both;
    box-shadow: 0 0 40px -15px rgba(0,245,255,0.2),
                inset 0 1px 0 rgba(255,255,255,0.06);
}

@keyframes resultAppear {
    from { opacity: 0; transform: scale(0.95) translateY(8px); }
    to   { opacity: 1; transform: scale(1)    translateY(0);   }
}

#result-stats {
    display: none;
    width: 100%;
}

/* Stats Cards Grid */
.stats-cards-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin: 24px 0;
}

.stats-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-md);
    padding: 20px 12px;
    text-align: center;
    backdrop-filter: blur(5px);
}

.stats-card-number {
    font-size: 1.8rem;
    font-weight: 700;
    font-family: var(--font-sans);
    margin-bottom: 6px;
    letter-spacing: -0.02em;
}

.stats-card-number.text-blue {
    color: var(--neon-blue);
    text-shadow: 0 0 10px rgba(61,139,255,0.3);
}

.stats-card-label {
    font-size: 0.68rem;
    font-family: var(--font-mono);
    color: var(--text-muted);
    letter-spacing: 0.05em;
    font-weight: 600;
}

/* Stats list */
.stats-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 28px;
}

.stats-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 18px;
    background: rgba(255, 255, 255, 0.015);
    border: 1px solid rgba(255, 255, 255, 0.03);
    border-radius: var(--radius-sm);
    transition: background var(--transition-fast), border-color var(--transition-fast);
}

.stats-row:hover {
    background: rgba(255, 255, 255, 0.03);
    border-color: rgba(255, 255, 255, 0.06);
}

.stats-row-left {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.84rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.stats-row-icon {
    width: 20px;
    height: 20px;
    object-fit: contain;
    background: rgba(0, 0, 0, 0.45);
    border-radius: 4px;
    padding: 2px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    flex-shrink: 0;
}

.stats-row-right {
    font-family: var(--font-mono);
    color: var(--neon-cyan);
    font-weight: 700;
    font-size: 0.88rem;
    text-shadow: 0 0 8px rgba(0,245,255,0.2);
}

/* Vertical buttons arrangement in result */
.result-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: center;
    width: 100%;
}

.btn-reset {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    max-width: 280px;
    padding: 12px 24px;
    background: rgba(123, 47, 255, 0.12);
    border: 1px solid rgba(123, 47, 255, 0.3);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 0.88rem;
    font-weight: 600;
    cursor: none;
    transition: all var(--transition-base);
}

.btn-reset:hover {
    background: rgba(123, 47, 255, 0.22);
    border-color: rgba(123, 47, 255, 0.6);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px -8px rgba(123, 47, 255, 0.4);
}


.result-check {
    width: 52px; height: 52px;
    background: rgba(0,245,255,0.08);
    border: 1px solid rgba(0,245,255,0.25);
    border-radius: 50%;
    display: grid;
    place-content: center;
    margin: 0 auto 16px;
    box-shadow: var(--glow-cyan);
}

.result-check svg { width: 26px; height: 26px; }

.result-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.result-sub {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 22px;
}

.btn-map {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    max-width: 280px;
    padding: 12px 24px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all var(--transition-base);
    cursor: none;
}

.btn-map svg { width: 16px; height: 16px; flex-shrink: 0; }

.btn-map:hover {
    background: rgba(0,245,255,0.1);
    border-color: rgba(0,245,255,0.4);
    color: var(--neon-cyan);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px -8px rgba(0,245,255,0.25);
}

/* ─── Bottom Badge ─── */
.bottom-badge {
    font-family: var(--font-mono);
    font-size: 0.68rem;
    color: var(--text-muted);
    letter-spacing: 0.12em;
    animation: fadeSlideIn 0.7s 0.8s both;
}

/* ─── Drag Over State ─── */
.drop-zone.drag-over {
    border-color: var(--neon-cyan);
    background: rgba(0,245,255,0.08);
    box-shadow: 0 0 0 3px rgba(0,245,255,0.15), var(--glow-cyan);
}

/* ─── Responsive ─── */
@media (max-width: 540px) {
    .card {
        padding: 30px 24px 28px;
        border-radius: 20px;
    }
    .headline { font-size: 1.9rem; }
}

@media (max-width: 380px) {
    .card { padding: 24px 18px; }
    .logo-img { height: 34px; }
}

/* ─── Leaflet CSS Fix ─── */
.leaflet-container img.leaflet-tile {
    display: inline !important;
}
