:root {
    --bg-color: #0d0e15;
    --panel-bg: rgba(255, 255, 255, 0.03);
    --panel-border: rgba(255, 255, 255, 0.08);
    --text-primary: #ffffff;
    --text-secondary: #94a3b8;
    --accent: #3b82f6;
    --accent-glow: rgba(59, 130, 246, 0.5);
    --success: #10b981;
    --error: #ef4444;
}

* {
    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;
    flex-direction: column;
    align-items: center;
    position: relative;
    overflow-x: hidden;
}

/* Background Orbs for aesthetic */
.background-orbs {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}

.background-orbs::before,
.background-orbs::after {
    content: '';
    position: absolute;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.15;
    animation: float 20s infinite alternate ease-in-out;
}

.background-orbs::before {
    background: #3b82f6;
    top: -10%;
    left: -10%;
}

.background-orbs::after {
    background: #8b5cf6;
    bottom: -10%;
    right: -10%;
    animation-delay: -10s;
}

@keyframes float {
    0% { transform: translate(0, 0); }
    100% { transform: translate(100px, 100px); }
}

.container {
    max-width: 900px;
    width: 100%;
    padding: 4rem 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
}

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

.badge {
    display: inline-block;
    padding: 0.4rem 1rem;
    background: rgba(59, 130, 246, 0.1);
    color: #60a5fa;
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 100px;
    font-size: 0.85rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 1.5rem;
}

h1 {
    font-size: 3.5rem;
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 1rem;
    letter-spacing: -1px;
}

h1 span {
    background: linear-gradient(135deg, #60a5fa, #c084fc);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

header p {
    color: var(--text-secondary);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

.glass-panel {
    background: var(--panel-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--panel-border);
    border-radius: 24px;
    padding: 3rem;
    width: 100%;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    animation: fadeUp 1s ease-out;
}

.file-inputs {
    display: flex;
    gap: 2rem;
    margin-bottom: 2rem;
}

@media (max-width: 768px) {
    .file-inputs {
        flex-direction: column;
    }
}

.drop-zone {
    flex: 1;
    position: relative;
    border: 2px dashed var(--panel-border);
    border-radius: 16px;
    padding: 2.5rem 1.5rem;
    text-align: center;
    transition: all 0.3s ease;
    background: rgba(0, 0, 0, 0.2);
    cursor: pointer;
}

.drop-zone:hover, .drop-zone.dragover {
    border-color: var(--accent);
    background: rgba(59, 130, 246, 0.05);
}

.drop-zone .icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.drop-zone h3 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.drop-zone p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.drop-zone span {
    color: var(--accent);
}

.file-name {
    display: block;
    font-size: 0.8rem !important;
    background: rgba(255,255,255,0.05);
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    word-break: break-all;
    max-width: 90%;
    margin: 0 auto;
}

.drop-zone.has-file {
    border-color: var(--success);
    background: rgba(16, 185, 129, 0.05);
}

.primary-btn {
    width: 100%;
    padding: 1rem 2rem;
    background: linear-gradient(135deg, #2563eb, #7c3aed);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 10px 20px -10px var(--accent-glow);
}

.primary-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 15px 25px -10px var(--accent-glow);
}

.primary-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    background: #334155;
    box-shadow: none;
}

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

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

.hidden {
    display: none !important;
}

/* Status Area */
.status-area {
    text-align: center;
    padding: 2rem 0;
}

.progress-bar {
    width: 100%;
    height: 6px;
    background: rgba(255,255,255,0.1);
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 1rem;
}

.progress-fill {
    width: 30%;
    height: 100%;
    background: linear-gradient(90deg, #3b82f6, #8b5cf6, #3b82f6);
    background-size: 200% 100%;
    border-radius: 10px;
    animation: progressFlow 2s linear infinite, widthExpand 30s ease-out forwards;
}

@keyframes progressFlow {
    0% { background-position: 100% 0; }
    100% { background-position: -100% 0; }
}
@keyframes widthExpand {
    0% { width: 10%; }
    70% { width: 85%; }
    100% { width: 95%; }
}

.status-subtext {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-top: 0.5rem;
}

/* Result Area */
.result-area, .error-area {
    text-align: center;
    padding: 2rem 0;
    animation: fadeUp 0.5s ease-out;
}

.success-icon {
    width: 60px;
    height: 60px;
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin: 0 auto 1.5rem;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.error-icon {
    width: 60px;
    height: 60px;
    background: rgba(239, 68, 68, 0.1);
    color: var(--error);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin: 0 auto 1.5rem;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.result-area h3 {
    font-size: 1.5rem;
    margin-bottom: 2rem;
}

.action-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 2rem;
}

.btn {
    text-decoration: none;
    padding: 0.8rem 1.5rem;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.2s;
    border: 1px solid transparent;
}

.btn-pdf {
    background: rgba(239, 68, 68, 0.1);
    color: #fca5a5;
    border-color: rgba(239, 68, 68, 0.2);
}
.btn-pdf:hover { background: rgba(239, 68, 68, 0.2); }

.btn-json {
    background: rgba(59, 130, 246, 0.1);
    color: #93c5fd;
    border-color: rgba(59, 130, 246, 0.2);
}
.btn-json:hover { background: rgba(59, 130, 246, 0.2); }

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
    border-color: var(--panel-border);
    cursor: pointer;
}
.btn-ghost:hover {
    color: white;
    background: rgba(255,255,255,0.05);
}

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

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