:root {
    --primary-blue: #00d4ff;
    --secondary-blue: #44aaff;
    --dark-blue: #0a1628;
    --deep-blue: #050d1a;
    --accent-cyan: #00ffcc;
    --accent-gold: #ffd700;
    --accent-orange: #ff8a65;
    --data-glow: #00e5ff;
    --surface-white: #e3f2fd;
    --cursor-color: #ff00ff;
    --cursor-hover: #ff6600;
    --price-green: #00e676;
    --price-red: #ff5252;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Rajdhani', sans-serif;
    overflow: hidden;
    background: linear-gradient(135deg, var(--deep-blue) 0%, var(--dark-blue) 100%);
    color: var(--surface-white);
    cursor: none !important;
}

* {
    cursor: none !important;
}

.leaflet-container,
.leaflet-grab,
.leaflet-dragging,
.leaflet-marker-icon,
.leaflet-clickable,
.leaflet-interactive {
    cursor: none !important;
}

/* ===== LOADING SCREEN ===== */
#loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: radial-gradient(ellipse at center, var(--dark-blue) 0%, var(--deep-blue) 100%);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.8s ease-out;
}

#loading-screen.hidden {
    opacity: 0;
    pointer-events: none;
}

.logo-container {
    text-align: center;
    margin-bottom: 60px;
    animation: pulseGlow 3s ease-in-out infinite;
}

@keyframes pulseGlow {
    0%, 100% { filter: drop-shadow(0 0 20px var(--primary-blue)); }
    50% { filter: drop-shadow(0 0 40px var(--accent-cyan)); }
}

.main-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 4rem;
    font-weight: 900;
    background: linear-gradient(45deg, var(--primary-blue), var(--accent-cyan), var(--accent-gold));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: 8px;
    margin-bottom: 10px;
    text-transform: uppercase;
}

.subtitle {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.8rem;
    color: var(--secondary-blue);
    letter-spacing: 4px;
    text-transform: uppercase;
    position: relative;
}

.subtitle::before,
.subtitle::after {
    content: '\25C6';
    color: var(--accent-gold);
    margin: 0 15px;
    animation: rotate 2s linear infinite;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.loading-container {
    width: 500px;
    padding: 30px;
    background: rgba(0, 212, 255, 0.05);
    border: 2px solid var(--primary-blue);
    border-radius: 15px;
    box-shadow: 0 0 30px rgba(0, 212, 255, 0.3);
}

.loading-status {
    font-family: 'Rajdhani', sans-serif;
    font-size: 1rem;
    color: var(--data-glow);
    margin-bottom: 15px;
    text-align: left;
    min-height: 24px;
    font-weight: 600;
}

.progress-bar-container {
    width: 100%;
    height: 30px;
    background: rgba(5, 13, 26, 0.8);
    border: 2px solid var(--primary-blue);
    border-radius: 15px;
    overflow: hidden;
    position: relative;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg,
        var(--primary-blue) 0%,
        var(--accent-cyan) 50%,
        var(--accent-gold) 100%);
    width: 0%;
    transition: width 0.3s ease;
    box-shadow: 0 0 20px var(--primary-blue);
    position: relative;
}

.progress-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.3) 50%,
        transparent 100%);
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.network-animation {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    pointer-events: none;
    opacity: 0.2;
}

/* ===== MAIN APP ===== */
#app {
    width: 100vw;
    height: 100vh;
    display: none;
}

#app.active {
    display: block;
}

/* ===== MAP ===== */
#map {
    width: 100%;
    height: 100%;
    background: var(--deep-blue);
}

.leaflet-container {
    background: linear-gradient(135deg, #0d1f3c 0%, #0a1628 100%);
    transition: filter 0.3s ease;
}

.leaflet-tile {
    filter: saturate(0.8) brightness(0.85) contrast(1.1);
}

/* ===== HEADER ===== */
.app-header {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    padding: 15px 30px;
    background: linear-gradient(180deg, rgba(5, 13, 26, 0.95) 0%, transparent 100%);
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    backdrop-filter: blur(10px);
}

.header-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.6rem;
    background: linear-gradient(45deg, var(--primary-blue), var(--accent-cyan));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 700;
}

.header-subtitle {
    font-size: 0.85rem;
    color: var(--secondary-blue);
    letter-spacing: 2px;
}

.header-controls {
    display: flex;
    align-items: center;
    gap: 20px;
}

.stats-display {
    font-family: 'Orbitron', sans-serif;
    font-size: 0.85rem;
    color: var(--accent-cyan);
    display: flex;
    align-items: center;
    gap: 10px;
}

.stat-separator {
    color: rgba(0, 212, 255, 0.3);
}

.btn-import {
    font-family: 'Orbitron', sans-serif;
    font-size: 0.85rem;
    font-weight: 700;
    padding: 10px 20px;
    background: rgba(0, 212, 255, 0.1);
    border: 2px solid var(--primary-blue);
    border-radius: 8px;
    color: var(--primary-blue);
    letter-spacing: 1px;
    transition: all 0.3s ease;
    cursor: none !important;
}

.btn-import:hover {
    background: rgba(0, 212, 255, 0.2);
    box-shadow: 0 0 25px rgba(0, 212, 255, 0.4);
    transform: translateY(-1px);
}

.btn-clear {
    font-family: 'Orbitron', sans-serif;
    font-size: 0.85rem;
    font-weight: 700;
    padding: 10px 20px;
    background: rgba(255, 80, 80, 0.1);
    border: 2px solid #ff5050;
    border-radius: 8px;
    color: #ff5050;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    cursor: none !important;
}

.btn-clear:hover {
    background: rgba(255, 80, 80, 0.2);
    box-shadow: 0 0 25px rgba(255, 80, 80, 0.4);
    transform: translateY(-1px);
}

/* ===== PROPERTY MARKERS ===== */
.property-marker {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    transition: all 0.3s ease;
    box-shadow: 0 0 15px rgba(0, 212, 255, 0.5);
    animation: markerPulse 2.5s ease-in-out infinite;
    position: relative;
}

@keyframes markerPulse {
    0%, 100% { transform: scale(1); box-shadow: 0 0 15px rgba(0, 212, 255, 0.5); }
    50% { transform: scale(1.08); box-shadow: 0 0 30px rgba(0, 212, 255, 0.7); }
}

.property-marker:hover {
    transform: scale(1.3) !important;
    animation: none;
    z-index: 10000 !important;
}

/* Thumbnail Preview on marker hover */
.thumbnail-preview {
    position: absolute;
    bottom: 50px;
    left: 50%;
    transform: translateX(-50%) scale(0);
    min-width: 200px;
    padding: 12px 16px;
    background: linear-gradient(135deg, rgba(5, 13, 26, 0.97) 0%, rgba(10, 22, 40, 0.97) 100%);
    border: 2px solid var(--primary-blue);
    border-radius: 10px;
    box-shadow: 0 0 25px rgba(0, 212, 255, 0.5);
    pointer-events: none;
    transition: transform 0.3s ease;
    z-index: 10000;
    text-align: center;
}

.property-marker:hover .thumbnail-preview {
    transform: translateX(-50%) scale(1);
}

.thumbnail-price {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.3rem;
    font-weight: 900;
    color: var(--accent-gold);
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
    margin-bottom: 6px;
}

.thumbnail-info {
    font-family: 'Rajdhani', sans-serif;
    font-size: 0.85rem;
    color: var(--accent-cyan);
    line-height: 1.4;
}

/* Hover Legend Callout */
.hover-legend {
    position: absolute;
    top: 50%;
    left: 55px;
    transform: translateY(-50%);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 10001;
}

.property-marker:hover .hover-legend {
    opacity: 1;
}

.legend-line {
    position: absolute;
    left: 0;
    top: 50%;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--primary-blue), var(--accent-cyan));
    box-shadow: 0 0 15px var(--primary-blue);
    transform-origin: left center;
    animation: drawLine 0.4s ease-out forwards;
}

@keyframes drawLine {
    from { width: 0; }
    to { width: 80px; }
}

.legend-name {
    position: absolute;
    left: 90px;
    top: 50%;
    transform: translateY(-50%);
    font-family: 'Orbitron', sans-serif;
    font-size: 1.1rem;
    color: var(--primary-blue);
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    white-space: nowrap;
    text-shadow:
        0 0 10px var(--primary-blue),
        0 0 20px var(--primary-blue),
        2px 2px 4px rgba(0, 0, 0, 0.8);
}

.legend-name::after {
    content: '';
    display: inline-block;
    width: 2px;
    height: 1.2em;
    background: var(--accent-cyan);
    margin-left: 4px;
    animation: blinkCursor 0.7s step-end infinite;
    vertical-align: middle;
}

@keyframes blinkCursor {
    from, to { opacity: 0; }
    50% { opacity: 1; }
}

/* ===== CUSTOM POPUP ===== */
.leaflet-popup-content-wrapper {
    background: linear-gradient(135deg, rgba(5, 13, 26, 0.98) 0%, rgba(10, 22, 40, 0.98) 100%);
    border: 2px solid var(--primary-blue);
    border-radius: 15px;
    box-shadow: 0 0 40px rgba(0, 212, 255, 0.5);
    padding: 0;
    overflow: hidden;
}

.leaflet-popup-tip {
    background: var(--dark-blue);
    border: 2px solid var(--primary-blue);
    border-top: none;
    border-right: none;
}

.leaflet-popup-close-button {
    color: var(--accent-cyan) !important;
    font-size: 24px !important;
    font-weight: bold !important;
    padding: 8px !important;
}

.leaflet-popup-close-button:hover {
    color: var(--accent-gold) !important;
}

.popup-content {
    padding: 20px;
    font-family: 'Rajdhani', sans-serif;
}

.popup-header {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary-blue);
}

.popup-icon {
    width: 40px;
    height: 40px;
    background: rgba(0, 212, 255, 0.2);
    border: 2px solid var(--primary-blue);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
    font-size: 20px;
}

.popup-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.1rem;
    color: var(--primary-blue);
    font-weight: 700;
    text-transform: uppercase;
}

.popup-price {
    font-family: 'Orbitron', sans-serif;
    font-size: 2rem;
    font-weight: 900;
    color: var(--accent-gold);
    text-shadow: 0 0 15px rgba(255, 215, 0, 0.4);
    margin-bottom: 10px;
}

.popup-description {
    color: var(--surface-white);
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 12px;
}

.popup-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding-top: 10px;
    border-top: 1px solid rgba(0, 212, 255, 0.3);
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 5px;
    color: var(--data-glow);
    font-size: 0.9rem;
    background: rgba(0, 212, 255, 0.08);
    padding: 4px 10px;
    border-radius: 6px;
    border: 1px solid rgba(0, 212, 255, 0.15);
}

.meta-label {
    color: var(--accent-cyan);
    font-weight: 600;
}

/* ===== MAP BLUR ON MARKER HOVER ===== */
.map-blurred .leaflet-container {
    filter: blur(3px) brightness(0.7);
}

/* ===== KNN PANEL ===== */
.knn-panel {
    position: absolute;
    bottom: 30px;
    left: 30px;
    width: 340px;
    background: linear-gradient(135deg, rgba(5, 13, 26, 0.96) 0%, rgba(10, 22, 40, 0.96) 100%);
    border: 2px solid var(--primary-blue);
    border-radius: 15px;
    box-shadow: 0 0 30px rgba(0, 212, 255, 0.3);
    z-index: 1000;
    backdrop-filter: blur(15px);
    overflow: hidden;
}

.panel-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 15px 20px;
    background: rgba(0, 212, 255, 0.08);
    border-bottom: 1px solid rgba(0, 212, 255, 0.2);
}

.panel-icon {
    font-size: 1.3rem;
}

.panel-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 0.95rem;
    color: var(--primary-blue);
    font-weight: 700;
    letter-spacing: 1px;
    flex: 1;
}

.btn-close-panel {
    background: none;
    border: none;
    color: var(--accent-cyan);
    font-size: 1.4rem;
    cursor: none !important;
    transition: color 0.2s;
}

.btn-close-panel:hover {
    color: var(--accent-gold);
}

.panel-body {
    padding: 20px;
}

.knn-slider-group {
    margin-bottom: 20px;
}

.knn-slider-group label {
    font-family: 'Orbitron', sans-serif;
    font-size: 0.8rem;
    color: var(--accent-cyan);
    letter-spacing: 1px;
    display: block;
    margin-bottom: 10px;
}

.knn-slider-group input[type="range"] {
    -webkit-appearance: none;
    width: calc(100% - 50px);
    height: 6px;
    background: rgba(0, 212, 255, 0.15);
    border-radius: 3px;
    outline: none;
    vertical-align: middle;
}

.knn-slider-group input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    background: var(--primary-blue);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--primary-blue);
    cursor: none !important;
}

.k-value {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--accent-gold);
    margin-left: 12px;
}

.knn-filters {
    display: flex;
    gap: 10px;
    margin-bottom: 18px;
}

.filter-group {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.filter-group label {
    font-family: 'Orbitron', sans-serif;
    font-size: 0.7rem;
    color: var(--accent-cyan);
    letter-spacing: 1px;
    margin-bottom: 6px;
}

.filter-group select,
.filter-group input[type="number"] {
    background: rgba(0, 212, 255, 0.08);
    border: 1px solid rgba(0, 212, 255, 0.25);
    border-radius: 6px;
    color: var(--text-primary);
    font-family: 'Rajdhani', sans-serif;
    font-size: 0.95rem;
    padding: 6px 10px;
    outline: none;
    cursor: none !important;
    transition: border-color 0.3s;
}

.filter-group select:focus,
.filter-group input[type="number"]:focus {
    border-color: var(--accent-cyan);
    box-shadow: 0 0 8px rgba(0, 212, 255, 0.2);
}

.filter-group select option {
    background: #0a1628;
    color: var(--text-primary);
}

.result-filters {
    font-family: 'Rajdhani', sans-serif;
    font-size: 0.85rem;
    color: var(--accent-gold);
    margin-bottom: 6px;
    letter-spacing: 0.5px;
}

.knn-result {
    padding: 15px;
    background: rgba(0, 212, 255, 0.06);
    border: 1px solid rgba(0, 212, 255, 0.15);
    border-radius: 10px;
    margin-bottom: 15px;
    text-align: center;
}

.result-label {
    font-size: 0.9rem;
    color: var(--secondary-blue);
}

.result-price {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.8rem;
    font-weight: 900;
    color: var(--accent-gold);
    text-shadow: 0 0 15px rgba(255, 215, 0, 0.4);
    margin: 8px 0;
}

.result-perm2 {
    font-family: 'Orbitron', sans-serif;
    font-size: 1rem;
    color: var(--accent-cyan);
    margin-bottom: 5px;
}

.result-details {
    font-size: 0.85rem;
    color: var(--secondary-blue);
}

.knn-neighbors {
    max-height: 200px;
    overflow-y: auto;
}

.knn-neighbors::-webkit-scrollbar {
    width: 4px;
}

.knn-neighbors::-webkit-scrollbar-track {
    background: rgba(0, 212, 255, 0.05);
}

.knn-neighbors::-webkit-scrollbar-thumb {
    background: var(--primary-blue);
    border-radius: 2px;
}

.neighbor-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background: rgba(0, 212, 255, 0.04);
    border-radius: 6px;
    margin-bottom: 6px;
    border-left: 3px solid var(--primary-blue);
    font-size: 0.85rem;
    transition: background 0.2s;
}

.neighbor-item:hover {
    background: rgba(0, 212, 255, 0.1);
}

.neighbor-name {
    color: var(--surface-white);
    flex: 1;
}

.neighbor-distance {
    color: var(--secondary-blue);
    font-size: 0.75rem;
    margin: 0 10px;
}

.neighbor-price {
    font-family: 'Orbitron', sans-serif;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--accent-gold);
}

/* ===== ESTIMATION CALLOUT ON MAP ===== */
.estimation-callout {
    position: absolute;
    z-index: 1001;
    min-width: 250px;
    background: linear-gradient(135deg, rgba(5, 13, 26, 0.97) 0%, rgba(10, 22, 40, 0.97) 100%);
    border: 2px solid var(--accent-gold);
    border-radius: 12px;
    box-shadow: 0 0 35px rgba(255, 215, 0, 0.4);
    padding: 18px;
    pointer-events: none;
    animation: calloutAppear 0.3s ease-out;
}

@keyframes calloutAppear {
    from { opacity: 0; transform: scale(0.8); }
    to { opacity: 1; transform: scale(1); }
}

.callout-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(255, 215, 0, 0.3);
}

.callout-icon {
    font-size: 1.2rem;
}

.callout-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 0.85rem;
    color: var(--accent-gold);
    font-weight: 700;
    letter-spacing: 1px;
}

.callout-price {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.8rem;
    font-weight: 900;
    color: var(--accent-gold);
    text-shadow: 0 0 15px rgba(255, 215, 0, 0.4);
    margin-bottom: 8px;
}

.callout-details {
    font-size: 0.85rem;
    color: var(--accent-cyan);
    line-height: 1.5;
}

.callout-meta {
    font-size: 0.75rem;
    color: var(--secondary-blue);
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid rgba(0, 212, 255, 0.15);
}

/* ===== KNN ESTIMATION MARKER ===== */
.estimation-marker {
    width: 24px;
    height: 24px;
    background: radial-gradient(circle, var(--accent-gold) 0%, rgba(255, 215, 0, 0.2) 100%);
    border: 3px solid var(--accent-gold);
    border-radius: 50%;
    box-shadow: 0 0 25px rgba(255, 215, 0, 0.6);
    animation: estimationPulse 1.5s ease-in-out infinite;
}

@keyframes estimationPulse {
    0%, 100% { transform: scale(1); box-shadow: 0 0 25px rgba(255, 215, 0, 0.6); }
    50% { transform: scale(1.2); box-shadow: 0 0 40px rgba(255, 215, 0, 0.9); }
}

/* KNN radius circle */
.knn-radius-circle {
    fill: rgba(0, 212, 255, 0.06);
    stroke: var(--primary-blue);
    stroke-width: 2;
    stroke-dasharray: 8, 4;
}

/* KNN connection lines */
.knn-connection-line {
    stroke: var(--accent-gold);
    stroke-width: 1.5;
    stroke-dasharray: 5, 5;
    opacity: 0.6;
}

/* ===== CUSTOM CURSOR ===== */
#custom-cursor {
    position: fixed;
    width: 24px;
    height: 24px;
    border: 3px solid var(--cursor-color);
    border-radius: 50%;
    pointer-events: none;
    z-index: 10002;
    transform: translate(-50%, -50%);
    transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow:
        0 0 10px var(--cursor-color),
        0 0 20px var(--cursor-color),
        inset 0 0 10px rgba(255, 0, 255, 0.3);
    backdrop-filter: blur(2px);
}

#custom-cursor::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 8px;
    height: 8px;
    background: var(--cursor-color);
    border-radius: 50%;
    transition: all 0.2s ease;
    box-shadow: 0 0 8px var(--cursor-color);
}

#custom-cursor::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 2px;
    height: 16px;
    background: var(--cursor-color);
    box-shadow:
        0 0 5px var(--cursor-color),
        8px 0 0 var(--cursor-color),
        -8px 0 0 var(--cursor-color),
        0 8px 0 var(--cursor-color),
        0 -8px 0 var(--cursor-color);
    opacity: 0.6;
}

#custom-cursor.on-poi {
    width: 40px;
    height: 40px;
    border-color: var(--cursor-hover);
    border-width: 4px;
    box-shadow:
        0 0 20px var(--cursor-hover),
        0 0 40px var(--cursor-hover),
        inset 0 0 15px rgba(255, 102, 0, 0.4);
    animation: cursorPulse 0.8s ease-in-out infinite;
}

#custom-cursor.on-poi::before {
    width: 12px;
    height: 12px;
    background: var(--cursor-hover);
    box-shadow: 0 0 12px var(--cursor-hover);
}

#custom-cursor.on-poi::after {
    opacity: 1;
    background: var(--cursor-hover);
    box-shadow:
        0 0 8px var(--cursor-hover),
        12px 0 0 var(--cursor-hover),
        -12px 0 0 var(--cursor-hover),
        0 12px 0 var(--cursor-hover),
        0 -12px 0 var(--cursor-hover);
}

@keyframes cursorPulse {
    0%, 100% {
        transform: translate(-50%, -50%) scale(1) rotate(0deg);
    }
    50% {
        transform: translate(-50%, -50%) scale(1.15) rotate(90deg);
    }
}

#custom-cursor.clicking {
    animation: cursorClick 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes cursorClick {
    0% { transform: translate(-50%, -50%) scale(1); border-width: 3px; }
    50% { transform: translate(-50%, -50%) scale(0.8); border-width: 6px; }
    100% { transform: translate(-50%, -50%) scale(1); border-width: 3px; }
}

/* ===== NOTIFICATION TOAST ===== */
.toast {
    position: fixed;
    top: 80px;
    right: 30px;
    padding: 15px 25px;
    background: linear-gradient(135deg, rgba(5, 13, 26, 0.97) 0%, rgba(10, 22, 40, 0.97) 100%);
    border: 2px solid var(--accent-cyan);
    border-radius: 10px;
    box-shadow: 0 0 25px rgba(0, 255, 204, 0.4);
    z-index: 2000;
    font-family: 'Rajdhani', sans-serif;
    font-size: 1rem;
    color: var(--accent-cyan);
    animation: toastIn 0.4s ease-out;
}

.toast.error {
    border-color: var(--price-red);
    color: var(--price-red);
    box-shadow: 0 0 25px rgba(255, 82, 82, 0.4);
}

.toast.success {
    border-color: var(--price-green);
    color: var(--price-green);
    box-shadow: 0 0 25px rgba(0, 230, 118, 0.4);
}

@keyframes toastIn {
    from { opacity: 0; transform: translateX(50px); }
    to { opacity: 1; transform: translateX(0); }
}

/* ===== CANVAS ===== */
#network-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .main-title {
        font-size: 2.5rem;
        letter-spacing: 4px;
    }

    .subtitle {
        font-size: 1.2rem;
    }

    .loading-container {
        width: 90%;
    }

    .header-title {
        font-size: 1.2rem;
    }

    .knn-panel {
        width: calc(100% - 20px);
        left: 10px;
        bottom: 10px;
    }

    .app-header {
        flex-direction: column;
        gap: 10px;
        padding: 10px 15px;
    }

    .header-controls {
        width: 100%;
        justify-content: space-between;
    }
}
