/* ==========================================
   JONAS MEDIA DATABASE NEXUS
   Futuristic Interface Styling
   ========================================== */

/* ========== FONTS & RESET ========== */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=JetBrains+Mono:wght@300;400;500&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --color-bg: #0a0a0a;
    --color-surface: #121212;
    --color-primary: #ffffff;
    --color-accent: #ff4444;
    --color-glow: #00ffff;
    --color-glass: rgba(255, 255, 255, 0.05);
    --color-border: rgba(255, 255, 255, 0.1);
    --color-text: #e0e0e0;
    --color-text-dim: #888888;
    --font-primary: 'Inter', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
}

body {
    font-family: var(--font-primary);
    background: var(--color-bg);
    color: var(--color-text);
    overflow: hidden;
    min-height: 100vh;
    position: relative;
}

/* ========== BOOT SCREEN ========== */
#boot-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: var(--color-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    animation: fadeIn 0.5s ease;
}

.boot-content {
    text-align: center;
    max-width: 600px;
    width: 90%;
}

.boot-logo {
    font-size: 3rem;
    font-weight: 700;
    letter-spacing: 0.5rem;
    margin-bottom: 2rem;
    background: linear-gradient(135deg, #ffffff, #888888);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: glowPulse 2s ease-in-out infinite;
}

.boot-text {
    font-family: var(--font-mono);
    font-size: 0.9rem;
    letter-spacing: 0.3rem;
    color: var(--color-text-dim);
    margin-bottom: 2rem;
}

.boot-progress {
    width: 100%;
    height: 2px;
    background: var(--color-border);
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 1rem;
}

.boot-progress-bar {
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, var(--color-accent), var(--color-glow));
    animation: bootProgress 3s ease-in-out forwards;
    box-shadow: 0 0 20px var(--color-glow);
}

.boot-status {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--color-text-dim);
    animation: bootTextCycle 3s ease-in-out;
}

@keyframes bootProgress {
    0% { width: 0%; }
    100% { width: 100%; }
}

@keyframes glowPulse {
    0%, 100% { opacity: 1; text-shadow: 0 0 20px rgba(255, 255, 255, 0.3); }
    50% { opacity: 0.8; text-shadow: 0 0 30px rgba(255, 255, 255, 0.5); }
}

/* ========== MAIN INTERFACE ========== */
#main-interface {
    width: 100vw;
    height: 100vh;
    position: relative;
    animation: fadeIn 1s ease;
}

/* ========== HEADER ========== */
.main-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 80px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 3rem;
    background: rgba(10, 10, 10, 0.8);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--color-border);
    z-index: 1000;
}

.header-left {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 0.3rem;
    color: var(--color-primary);
}

.subtitle {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    letter-spacing: 0.2rem;
    color: var(--color-text-dim);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    letter-spacing: 0.1rem;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--color-glow);
    box-shadow: 0 0 10px var(--color-glow);
    animation: pulse 2s ease-in-out infinite;
}

.time-display {
    font-family: var(--font-mono);
    font-size: 0.9rem;
    color: var(--color-text-dim);
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* ========== GLOBE CONTAINER ========== */
#globe-container {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 600px;
    height: 600px;
    z-index: 1;
}

#globe-canvas {
    width: 100%;
    height: 100%;
}

.globe-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.data-stream {
    position: absolute;
    width: 4px;
    height: 4px;
    background: var(--color-glow);
    border-radius: 50%;
    box-shadow: 0 0 15px var(--color-glow);
    animation: dataStreamFloat 3s ease-in-out infinite;
}

@keyframes dataStreamFloat {
    0%, 100% { transform: translateY(0px); opacity: 1; }
    50% { transform: translateY(-20px); opacity: 0.5; }
}

/* ========== DASHBOARD PANELS ========== */
.dashboard-grid {
    position: fixed;
    top: 100px;
    left: 0;
    right: 0;
    bottom: 20px;
    padding: 2rem;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(2, 1fr);
    gap: 1.5rem;
    z-index: 100;
}

.glass-panel {
    background: var(--color-glass);
    backdrop-filter: blur(20px);
    border: 1px solid var(--color-border);
    border-radius: 12px;
    padding: 1.5rem;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.glass-panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.03), transparent);
    animation: shimmer 3s infinite;
}

.glass-panel:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-5px);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

@keyframes shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* ========== PANEL HEADER ========== */
.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--color-border);
}

.panel-title {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.15rem;
    color: var(--color-primary);
}

.panel-status {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    letter-spacing: 0.1rem;
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.05);
}

.panel-status.syncing {
    color: #00ffff;
    border: 1px solid rgba(0, 255, 255, 0.3);
    animation: statusBlink 2s infinite;
}

.panel-status.online {
    color: #00ff88;
    border: 1px solid rgba(0, 255, 136, 0.3);
}

.panel-status.scanning {
    color: #ff8800;
    border: 1px solid rgba(255, 136, 0, 0.3);
    animation: statusBlink 1.5s infinite;
}

@keyframes statusBlink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* ========== PANEL CONTENT ========== */
.panel-content {
    position: relative;
    z-index: 10;
}

/* System Stats */
.stat-row {
    display: grid;
    grid-template-columns: 100px 1fr 60px;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.stat-label {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--color-text-dim);
}

.stat-bar {
    height: 6px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
    overflow: hidden;
}

.stat-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--color-glow), var(--color-accent));
    border-radius: 3px;
    transition: width 1s ease;
    box-shadow: 0 0 10px var(--color-glow);
    animation: statPulse 2s ease-in-out infinite;
}

.stat-value {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--color-text);
    text-align: right;
}

@keyframes statPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* Projects */
.project-item {
    display: grid;
    grid-template-columns: 80px 1fr 60px;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem;
    margin-bottom: 0.5rem;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--color-border);
    border-radius: 6px;
    transition: all 0.3s ease;
}

.project-item:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.2);
}

.project-id {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--color-text-dim);
}

.project-name {
    font-size: 0.85rem;
    color: var(--color-text);
}

.project-progress {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--color-glow);
    text-align: right;
}

/* Data Log */
.data-log {
    max-height: 200px;
    overflow: hidden;
}

.log-entry {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--color-text-dim);
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    animation: logFadeIn 0.5s ease;
}

@keyframes logFadeIn {
    from { opacity: 0; transform: translateX(-10px); }
    to { opacity: 1; transform: translateX(0); }
}

/* Network Visualization */
.network-visualization {
    width: 100%;
    height: 200px;
}

.connection-line {
    stroke: var(--color-border);
    stroke-width: 1;
    animation: lineFlow 2s ease-in-out infinite;
}

.node {
    fill: var(--color-glow);
    filter: drop-shadow(0 0 5px var(--color-glow));
    animation: nodePulse 2s ease-in-out infinite;
}

@keyframes lineFlow {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 1; }
}

@keyframes nodePulse {
    0%, 100% { r: 5; opacity: 1; }
    50% { r: 6; opacity: 0.7; }
}

/* ========== FLOATING DATA POINTS ========== */
.floating-data-points {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 50;
}

.data-point {
    position: absolute;
    width: 6px;
    height: 6px;
    background: var(--color-glow);
    border-radius: 50%;
    box-shadow: 0 0 20px var(--color-glow);
    animation: floatAround 8s ease-in-out infinite;
}

@keyframes floatAround {
    0%, 100% { transform: translate(0, 0); }
    25% { transform: translate(20px, -30px); }
    50% { transform: translate(-15px, -50px); }
    75% { transform: translate(30px, -20px); }
}

/* ========== GRID OVERLAY ========== */
.grid-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
    background-size: 50px 50px;
    pointer-events: none;
    z-index: 1;
    opacity: 0.3;
}

/* ========== ANIMATIONS ========== */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* ========== RESPONSIVE ========== */
@media (max-width: 1400px) {
    .dashboard-grid {
        gap: 1rem;
        padding: 1.5rem;
    }
    
    #globe-container {
        width: 450px;
        height: 450px;
    }
}

@media (max-width: 1024px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
        grid-template-rows: repeat(4, auto);
    }
    
    #globe-container {
        width: 350px;
        height: 350px;
    }
    
    .main-header {
        padding: 0 1.5rem;
    }
}
