:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --secondary: #06b6d4;
    --success: #10b981;
    --bg: #0f172a;
    --card-bg: rgba(30, 41, 59, 0.8);
    --text: #e5e7eb;
    --border: #334155;
}

body {
    font-family: 'Inter', 'Segoe UI', Arial, sans-serif;
    background: linear-gradient(135deg, #020617, #0f172a);
    margin: 0;
    padding: 0;
    color: var(--text);
}

/* Container */
.container {
    max-width: 850px;
    margin: 60px auto;
    padding: 30px;
    border-radius: 16px;
    background: var(--card-bg);
    backdrop-filter: blur(14px);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(255,255,255,0.05);
    animation: fadeIn 0.6s ease;
}

/* Heading */
h1 {
    text-align: center;
    font-weight: 600;
    margin-bottom: 20px;
}

/* File input */
input[type="file"] {
    display: block;
    margin: 25px auto;
    padding: 14px;
    border: 2px dashed var(--border);
    border-radius: 10px;
    background-color: #020617;
    color: #94a3b8;
    transition: all 0.3s ease;
    cursor: pointer;
}

input[type="file"]:hover {
    border-color: var(--primary);
    background-color: #020617;
}

/* Buttons */
.button-container {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 10px;
}

button {
    padding: 12px 26px;
    border-radius: 8px;
    border: none;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.25s ease;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

/* Merge button */
#mergeButton {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
}

#mergeButton:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99,102,241,0.4);
}

/* LOADING STATE */
#mergeButton.loading {
    pointer-events: none;
    opacity: 0.9;
}

/* Spinner FIXED (visible now) */
#mergeButton.loading::after {
    content: "";
    width: 18px;
    height: 18px;
    border: 3px solid rgba(255,255,255,0.3);
    border-top: 3px solid white;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}

/* Success */
#mergeButton.success {
    background: var(--success);
}

/* Download button */
#downloadButton {
    background: linear-gradient(135deg, var(--secondary), #0891b2);
    color: white;
    display: none;
}

#downloadButton.show {
    display: inline-flex;
    animation: fadeIn 0.4s ease;
}

#downloadButton:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(6,182,212,0.4);
}

/* Output */
#output {
    margin-top: 30px;
    padding: 15px;
    background: #020617;
    border-radius: 10px;
    border: 1px solid var(--border);
}

/* JSON preview */
pre {
    white-space: pre-wrap;
    word-wrap: break-word;
    background: #020617;
    color: #38bdf8;
    padding: 15px;
    border-radius: 10px;
    font-size: 14px;
    max-height: 320px;
    overflow-y: auto;
    line-height: 1.5;
}

code {
    font-family: 'Fira Code', monospace;
    font-size: 14px;
}

/* Scrollbar */
pre::-webkit-scrollbar {
    width: 8px;
}

pre::-webkit-scrollbar-thumb {
    background: #334155;
    border-radius: 5px;
}

/* Animations */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* keys - green */
.hljs-attr { color: #22c55e !important; }   
/* strings - blue */
.hljs-string { color: #38bdf8 !important; } 
/* numbers - purple */
.hljs-number { color: #c084fc !important; } 