/* CSS Variables for theming */
:root {
    --bg-primary: #0a0a0a;
    --bg-secondary: #1a1a2e;
    --bg-tertiary: #16213e;
    --text-primary: #ffffff;
    --text-secondary: #888;
    --accent-primary: #00d4ff;
    --accent-secondary: #ff00ff;
    --accent-success: #00ff88;
    --accent-warning: #ffa502;
    --accent-error: #ff4757;
    --card-bg: rgba(255, 255, 255, 0.05);
    --card-border: rgba(255, 255, 255, 0.1);
    --shadow: rgba(0, 0, 0, 0.3);
}

/* Light theme variables */
[data-theme="light"] {
    --bg-primary: #f8f9fa;
    --bg-secondary: #e9ecef;
    --bg-tertiary: #dee2e6;
    --text-primary: #212529;
    --text-secondary: #6c757d;
    --accent-primary: #007bff;
    --accent-secondary: #e83e8c;
    --accent-success: #28a745;
    --accent-warning: #ffc107;
    --accent-error: #dc3545;
    --card-bg: rgba(0, 0, 0, 0.05);
    --card-border: rgba(0, 0, 0, 0.1);
    --shadow: rgba(0, 0, 0, 0.1);
}

/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Roboto', sans-serif;
    background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 50%, var(--bg-tertiary) 100%);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
    transition: all 0.3s ease;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    position: relative;
    z-index: 2;
}

/* Header */
.header {
    text-align: center;
    margin-bottom: 40px;
    padding: 30px 0;
    position: relative;
}

.theme-toggle {
    position: absolute;
    top: 20px;
    right: 20px;
}

.theme-btn {
    background: linear-gradient(45deg, #00d4ff, #ff00ff);
    border: none;
    border-radius: 25px;
    padding: 10px 20px;
    color: #ffffff;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 15px rgba(0, 212, 255, 0.3);
}

.theme-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 212, 255, 0.4);
}

.theme-icon {
    font-size: 1.1rem;
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-bottom: 15px;
}

.vr-logo {
    background: linear-gradient(45deg, #00d4ff, #ff00ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-family: 'Orbitron', monospace;
    font-size: 3rem;
    font-weight: 900;
    text-shadow: 0 0 20px rgba(0, 212, 255, 0.5);
}

.header h1 {
    font-family: 'Orbitron', monospace;
    font-size: 2.5rem;
    font-weight: 700;
    background: linear-gradient(45deg, #ffffff, #00d4ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 0 30px rgba(0, 212, 255, 0.3);
}

.subtitle {
    font-size: 1.1rem;
    color: #888;
    font-weight: 300;
    letter-spacing: 1px;
}

/* Main content */
.main-content {
    margin-bottom: 40px;
}

/* Search section */
.search-section {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 40px;
    margin-bottom: 40px;
    text-align: center;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.search-container {
    display: flex;
    gap: 15px;
    max-width: 600px;
    margin: 0 auto 20px;
}

.username-input {
    flex: 1;
    padding: 15px 20px;
    border: 2px solid rgba(0, 212, 255, 0.3);
    border-radius: 15px;
    background: rgba(0, 0, 0, 0.3);
    color: #ffffff;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.username-input:focus {
    outline: none;
    border-color: #00d4ff;
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.3);
    background: rgba(0, 0, 0, 0.5);
}

.username-input::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.analyze-btn {
    padding: 15px 30px;
    background: linear-gradient(45deg, #00d4ff, #ff00ff);
    border: none;
    border-radius: 15px;
    color: #ffffff;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    min-width: 140px;
}

.analyze-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(0, 212, 255, 0.4);
}

.btn-glow {
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s ease;
}

.analyze-btn:hover .btn-glow {
    left: 100%;
}

.search-hint {
    color: #888;
    font-size: 0.9rem;
    font-style: italic;
}

/* Loading section */
.loading-section {
    text-align: center;
    padding: 60px 20px;
}

.loading-spinner {
    width: 80px;
    height: 80px;
    border: 4px solid rgba(0, 212, 255, 0.2);
    border-top: 4px solid #00d4ff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 30px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-text {
    font-size: 1.3rem;
    color: #00d4ff;
    margin-bottom: 30px;
    font-weight: 500;
}

.loading-progress {
    max-width: 400px;
    margin: 0 auto;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 15px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #00d4ff, #ff00ff);
    width: 0%;
    transition: width 0.3s ease;
    border-radius: 4px;
}

.progress-text {
    font-size: 0.9rem;
    color: #888;
}

/* Results section */
.results-section {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.results-header h2 {
    font-family: 'Orbitron', monospace;
    font-size: 2rem;
    color: #00d4ff;
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #00ff88;
    font-size: 0.9rem;
}

.status-dot {
    width: 8px;
    height: 8px;
    background: #00ff88;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Results grid */
.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.info-card {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(0, 212, 255, 0.2);
    border-radius: 15px;
    padding: 20px;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.info-card:hover {
    border-color: #00d4ff;
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.2);
    transform: translateY(-2px);
}

.card-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

.card-icon {
    font-size: 1.5rem;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 212, 255, 0.1);
    border-radius: 10px;
}

.card-header h3 {
    font-size: 1.1rem;
    color: #00d4ff;
    font-weight: 500;
}

.card-content {
    font-size: 1rem;
    color: #ffffff;
    word-break: break-all;
    line-height: 1.4;
    padding: 10px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Map section */
.map-section {
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--card-border);
    border-radius: 20px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 8px 32px var(--shadow);
    transition: all 0.3s ease;
}

.map-section:hover {
    border-color: var(--accent-primary);
    box-shadow: 0 12px 40px var(--shadow);
}

.map-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.map-header h3 {
    font-family: 'Orbitron', monospace;
    font-size: 1.3rem;
    color: #00d4ff;
    margin: 0;
}

.map-info {
    display: flex;
    gap: 20px;
    font-size: 0.9rem;
    color: #888;
}

.map-container {
    position: relative;
    height: 400px;
    border-radius: 15px;
    overflow: hidden;
    border: 1px solid rgba(0, 212, 255, 0.2);
}

.interactive-map {
    width: 100%;
    height: 100%;
    background: #1a1a2e;
}

.map-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1000;
}

.location-pin {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    animation: pinBounce 2s ease-in-out infinite;
}

.pin-icon {
    font-size: 2rem;
    filter: drop-shadow(0 0 10px rgba(0, 212, 255, 0.8));
}

.pin-label {
    background: rgba(0, 0, 0, 0.8);
    color: #ffffff;
    padding: 5px 10px;
    border-radius: 8px;
    font-size: 0.8rem;
    margin-top: 5px;
    white-space: nowrap;
}

@keyframes pinBounce {
    0%, 100% { transform: translate(-50%, -50%) scale(1); }
    50% { transform: translate(-50%, -50%) scale(1.1); }
}

/* Leaflet map customization */
.leaflet-control-zoom a {
    background: var(--card-bg) !important;
    color: var(--text-primary) !important;
    border: 1px solid var(--card-border) !important;
    backdrop-filter: blur(10px);
}

.leaflet-control-zoom a:hover {
    background: var(--accent-primary) !important;
    color: var(--text-primary) !important;
}

.leaflet-popup-content-wrapper {
    background: var(--card-bg) !important;
    color: var(--text-primary) !important;
    border: 1px solid var(--card-border) !important;
    backdrop-filter: blur(10px);
}

.leaflet-popup-tip {
    background: var(--card-bg) !important;
    border: 1px solid var(--card-border) !important;
}

/* Action buttons */
.action-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.refresh-btn, .export-btn {
    padding: 12px 25px;
    border: none;
    border-radius: 12px;
    color: #ffffff;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.refresh-btn {
    background: linear-gradient(45deg, #ff6b35, #f7931e);
}

.export-btn {
    background: linear-gradient(45deg, #00ff88, #00d4ff);
}

.refresh-btn:hover, .export-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

/* Footer */
.footer {
    text-align: center;
    padding: 30px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: 40px;
}

.footer-content p {
    color: #888;
    font-size: 0.9rem;
    margin-bottom: 8px;
}

/* Particles background */
.particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
}

.particle {
    position: absolute;
    width: 2px;
    height: 2px;
    background: #00d4ff;
    border-radius: 50%;
    animation: float 6s infinite linear;
}

@keyframes float {
    0% {
        transform: translateY(100vh) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(-100px) rotate(360deg);
        opacity: 0;
    }
}

/* Responsive design */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    .header h1 {
        font-size: 2rem;
    }
    
    .vr-logo {
        font-size: 2.5rem;
    }
    
    .theme-toggle {
        position: static;
        margin-top: 20px;
    }
    
    .map-header {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }
    
    .map-info {
        flex-direction: column;
        gap: 10px;
    }
    
    .search-container {
        flex-direction: column;
    }
    
    .results-grid {
        grid-template-columns: 1fr;
    }
    
    .action-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .refresh-btn, .export-btn {
        width: 100%;
        max-width: 300px;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .search-section, .results-section {
        padding: 25px 20px;
    }
    
    .header h1 {
        font-size: 1.8rem;
    }
    
    .vr-logo {
        font-size: 2rem;
    }
}
