:root {
    --bg-color: #0b0f19;
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --accent-glow: rgba(99, 102, 241, 0.4);
    --border-color: rgba(255, 255, 255, 0.1);
    --card-bg: rgba(17, 24, 39, 0.6);
    --btn-primary: #6366f1;
    --btn-hover: #4f46e5;
    --success: #10b981;
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem;
    overflow-x: hidden;
}

/* Background animated globes */
.background-globes {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: -1;
}

.globe {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.5;
    animation: float 20s infinite ease-in-out alternate;
}

.globe-1 {
    width: 400px;
    height: 400px;
    background: #6366f1;
    top: -100px;
    left: -100px;
}

.globe-2 {
    width: 500px;
    height: 500px;
    background: #3b82f6;
    bottom: -150px;
    right: -100px;
    animation-delay: -5s;
}

@keyframes float {
    0% {
        transform: translateY(0) translateX(0) scale(1);
    }

    100% {
        transform: translateY(50px) translateX(50px) scale(1.1);
    }
}

/* Container Glassmorphism */
.container {
    width: 100%;
    max-width: 800px;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    padding: 3rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    transition: all 0.3s ease;
}

header {
    text-align: center;
    margin-bottom: 3rem;
}

.logo-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 0.5rem;
}

.logo-icon {
    font-size: 2rem;
    background: linear-gradient(135deg, #6366f1, #3b82f6);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

h1 {
    font-size: 2.5rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

h1 span {
    color: #3b82f6;
}

.subtitle {
    color: var(--text-secondary);
    font-size: 1.1rem;
    font-weight: 400;
}

/* Controls */
.controls {
    margin-bottom: 2rem;
    position: relative;
}

label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.input-group {
    display: flex;
    gap: 1rem;
    margin-bottom: 0.75rem;
}

input {
    flex: 1;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1rem 1.25rem;
    color: var(--text-primary);
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.3s ease;
}

input:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 15px var(--accent-glow);
    background: rgba(0, 0, 0, 0.4);
}

.btn-primary {
    background: linear-gradient(135deg, var(--btn-primary), var(--btn-hover));
    color: white;
    border: none;
    border-radius: 12px;
    padding: 0 2rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 140px;
    box-shadow: 0 4px 14px 0 rgba(99, 102, 241, 0.39);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.23);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-primary:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.helper-text {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* Loading Spinner */
.loader {
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

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

/* Results Area */
.results-area {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.results-header h2 {
    font-size: 1.5rem;
    font-weight: 600;
}

.status-badge {
    background: rgba(16, 185, 129, 0.2);
    color: var(--success);
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
    font-size: 0.875rem;
    font-weight: 500;
    border: 1px solid rgba(16, 185, 129, 0.4);
}

.json-viewer {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.95rem;
    line-height: 1.5;
    color: #e2e8f0;
    overflow-x: auto;
    white-space: pre-wrap;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.5);
}

/* Animations */
.fade-in {
    animation: fadeIn 0.8s ease-out;
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Dashboard Additions */
.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.glass-panel {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.kpi-card {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.kpi-card h3 {
    font-size: 1rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 1rem;
}

.kpi-value {
    font-size: 4rem;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 0.5rem;
    transition: color 0.3s ease;
}

.kpi-subtitle {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.chart-card {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 250px;
}

.details-section h3 {
    margin-bottom: 1rem;
    color: var(--text-primary);
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.5rem;
}
.trend-section {
    position: relative;
    padding: 1.5rem;
    background: rgba(17, 24, 39, 0.4);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    margin-top: 2rem;
}

.trend-section h3 {
    text-align: center;
    margin-bottom: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-size: 0.9rem;
    color: var(--text-secondary);
}
