:root {
    --primary-color: #6366f1;
    --primary-hover: #4f46e5;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --bg-color: #f8fafc;
    --card-bg: rgba(255, 255, 255, 0.8);
    --border-color: rgba(255, 255, 255, 0.6);
    --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

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

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

/* Background Blobs */
.background-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    z-index: -1;
    opacity: 0.6;
}

.blob-1 {
    width: 400px;
    height: 400px;
    background-color: #c7d2fe;
    top: -100px;
    left: -100px;
    animation: float 20s infinite ease-in-out;
}

.blob-2 {
    width: 350px;
    height: 350px;
    background-color: #e9d5ff;
    bottom: -50px;
    right: -50px;
    animation: float 25s infinite ease-in-out reverse;
}

@keyframes float {

    0%,
    100% {
        transform: translate(0, 0);
    }

    50% {
        transform: translate(30px, 30px);
    }
}

.container {
    width: 100%;
    max-width: 800px;
    padding: 2rem;
    position: relative;
    z-index: 10;
    /* Ensure content is above blobs */
}

/* Top Navigation */
.top-nav {
    display: flex;
    align-items: center;
    margin-bottom: 2rem;
}

.logo-link {
    display: inline-block;
    transition: transform 0.2s;
}

.logo-link:hover {
    transform: scale(1.05);
}

.logo {
    height: 40px;
    /* Adjust based on logo aspect ratio */
    width: auto;
}

.hero-header {
    text-align: center;
    margin-bottom: 3rem;
    animation: fadeInDown 0.8s ease-out;
}

h1 {
    font-size: 2.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, #4f46e5, #9333ea);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.5rem;
}

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

/* Drop Zone */
.drop-zone {
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    border: 2px dashed #cbd5e1;
    border-radius: 20px;
    padding: 4rem 2rem;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    animation: fadeInUp 0.8s ease-out 0.2s backwards;
}

.drop-zone:hover,
.drop-zone.dragover {
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    background: rgba(255, 255, 255, 0.95);
}

.upload-icon {
    font-size: 4rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

.drop-zone h2 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.upload-btn {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
    color: white;
    border: none;
    padding: 0.8rem 2rem;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    margin: 1rem 0;
    transition: transform 0.2s;
    box-shadow: 0 4px 6px rgba(99, 102, 241, 0.3);
}

.upload-btn:hover {
    transform: scale(1.05);
}

.file-support-info {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-top: 1rem;
}

/* Loading */
.loading {
    text-align: center;
    padding: 3rem;
    animation: fadeIn 0.3s ease-out;
}

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

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

    100% {
        transform: rotate(360deg);
    }
}

/* Results */
.result-section {
    animation: fadeInUp 0.5s ease-out;
}

.file-info-card {
    background: white;
    padding: 1rem 1.5rem;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-sm);
}

.file-icon {
    width: 48px;
    height: 48px;
    background-color: #e0e7ff;
    color: var(--primary-color);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.file-details h3 {
    font-size: 1rem;
    margin-bottom: 0.2rem;
}

.file-details p {
    color: var(--text-muted);
    font-size: 0.875rem;
}

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

.stat-card {
    background: white;
    padding: 1.5rem;
    border-radius: 16px;
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    transition: transform 0.2s;
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.stat-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.char-icon {
    background: #fee2e2;
    color: #ef4444;
}

.char-ns-icon {
    background: #ffedd5;
    color: #f97316;
}

.word-icon {
    background: #dcfce7;
    color: #22c55e;
}

.space-icon {
    background: #dbeafe;
    color: #3b82f6;
}

.image-icon {
    background: #f3e8ff;
    color: #a855f7;
}

.stat-content h4 {
    color: var(--text-muted);
    font-size: 0.875rem;
    margin-bottom: 0.3rem;
    font-weight: 500;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-main);
}

.stat-sub {
    font-size: 0.75rem;
    color: #94a3b8;
}

.reset-btn {
    display: block;
    width: 100%;
    margin-top: 2rem;
    padding: 1rem;
    background: transparent;
    border: 2px solid #cbd5e1;
    color: var(--text-muted);
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.reset-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    background: rgba(99, 102, 241, 0.05);
}

/* Utilities */
.hidden {
    display: none !important;
}

/* Animations */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

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

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

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

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@media (max-width: 600px) {
    .container {
        padding: 1rem;
    }

    h1 {
        font-size: 2rem;
    }

    .stat-card {
        padding: 1.25rem;
    }
}