:root {
    --primary: #6366f1;
    --primary-hover: #4f46e5;
    --bg-dark: #0f172a;
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --accent: #10b981;
}

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

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

.background-blobs {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.blob {
    position: absolute;
    width: 50vw;
    height: 50vw;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.2) 0%, rgba(99, 102, 241, 0) 70%);
    border-radius: 50%;
    filter: blur(80px);
    animation: float 20s infinite alternate;
}

.blob-1 { top: -10%; left: -10%; }
.blob-2 { bottom: -10%; right: -10%; background: radial-gradient(circle, rgba(16, 185, 129, 0.1) 0%, rgba(16, 185, 129, 0) 70%); }
.blob-3 { top: 40%; left: 40%; width: 30vw; height: 30vw; background: radial-gradient(circle, rgba(236, 72, 153, 0.1) 0%, rgba(236, 72, 153, 0) 70%); }

@keyframes float {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(10%, 10%) scale(1.1); }
}

.container {
    width: 100%;
    max-width: 900px;
    padding: 2rem;
    text-align: center;
}

header {
    margin-bottom: 3rem;
}

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

.logo-icon { font-size: 2.5rem; }

.logo h1 {
    font-size: 2.5rem;
    font-weight: 800;
    letter-spacing: -1px;
}

.logo h1 span {
    color: var(--primary);
}

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

.glass {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 2rem;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}

.upload-section {
    padding: 4rem 2rem;
    margin-bottom: 2rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.upload-section:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px 0 rgba(0, 0, 0, 0.5);
}

.drop-zone {
    border: 2px dashed var(--glass-border);
    border-radius: 1.5rem;
    padding: 3rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.drop-zone.active {
    border-color: var(--primary);
    background: rgba(99, 102, 241, 0.05);
}

.drop-content .icon {
    font-size: 4rem;
    margin-bottom: 1.5rem;
}

.drop-content h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.drop-content p {
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.btn-primary {
    background: var(--primary);
    color: white;
    border: none;
    padding: 0.8rem 2rem;
    border-radius: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease;
}

.btn-primary:hover {
    background: var(--primary-hover);
}

.loading {
    padding: 2rem;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid var(--glass-border);
    border-top: 4px solid var(--primary);
    border-radius: 50%;
    margin: 0 auto 1.5rem;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.progress-bar {
    width: 200px;
    height: 6px;
    background: var(--glass-border);
    border-radius: 3px;
    margin: 1rem auto;
    overflow: hidden;
}

.progress-fill {
    width: 40%;
    height: 100%;
    background: var(--primary);
    border-radius: 3px;
    animation: progress 2s infinite ease-in-out;
}

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

.results-section {
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.results-card {
    padding: 2.5rem;
    text-align: left;
    margin-bottom: 2rem;
}

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

.data-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
}

.data-item label {
    display: block;
    color: var(--text-secondary);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.5rem;
}

.data-item .value {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-primary);
}

.btn-secondary {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    color: var(--text-primary);
    padding: 0.5rem 1.2rem;
    border-radius: 0.8rem;
    cursor: pointer;
}

.raw-data {
    margin-top: 3rem;
    border-top: 1px solid var(--glass-border);
    padding-top: 1.5rem;
}

.toggle-raw {
    background: none;
    border: none;
    color: var(--primary);
    cursor: pointer;
    font-size: 0.9rem;
    text-decoration: underline;
}

pre {
    background: rgba(0, 0, 0, 0.3);
    padding: 1.5rem;
    border-radius: 1rem;
    margin-top: 1rem;
    font-size: 0.85rem;
    overflow-x: auto;
    white-space: pre-wrap;
    max-height: 200px;
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--primary);
    color: var(--primary);
    padding: 0.8rem 2rem;
    border-radius: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-outline:hover {
    background: var(--primary);
    color: white;
}

footer {
    margin-top: 4rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.hidden { display: none; }

@media (max-width: 600px) {
    .data-grid { grid-template-columns: 1fr; }
}
