/* Base Reset */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}


/* --- Navigation Bar --- */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 5%;
    
    /* Frosted glass effect */
    background: rgba(9, 9, 11, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    
    z-index: 1000; /* Keeps it above the PDF merger card */
}

/* Logo / Brand */
.nav-brand {
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -0.5px;
    display: flex;
    align-items: center;
    gap: 8px;
    
    /* Gradient text matching the header */
    background: linear-gradient(to right, #818cf8, #c084fc);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    cursor: pointer;
}

.logo-icon {
    -webkit-text-fill-color: initial; /* Keeps the emoji colorful */
}

/* Center Navigation Links */
.nav-links {
    display: flex;
    list-style: none;
    gap: 32px;
}

.nav-links a {
    text-decoration: none;
    color: #a1a1aa;
    font-size: 15px;
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
    padding: 4px 0;
}

/* Glowing text on hover */
.nav-links a:hover, 
.nav-links a.active {
    color: #f4f4f5;
    text-shadow: 0 0 10px rgba(168, 85, 247, 0.4);
}

/* Smooth animated underline effect */
.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0%;
    height: 2px;
    background: linear-gradient(to right, #6366f1, #a855f7);
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 2px;
    box-shadow: 0 0 8px rgba(168, 85, 247, 0.5);
}

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}

/* Nav Action Button */
.btn-nav {
    background-color: transparent;
    border: 1px solid #3f3f46;
    color: #e4e4e7;
    padding: 8px 18px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-nav:hover {
    background-color: rgba(99, 102, 241, 0.1);
    border-color: #6366f1;
    color: #fff;
    box-shadow: 0 0 15px rgba(99, 102, 241, 0.3);
}

/* Adjust the main body padding so the nav bar doesn't overlap the merger card */
body {
    padding-top: 80px; 
}
body {
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    /* Deep dark space background */
    background-color: #09090b;
    background-image: 
        radial-gradient(at 0% 0%, rgba(99, 102, 241, 0.15) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(168, 85, 247, 0.15) 0px, transparent 50%);
    background-attachment: fixed;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    color: #e4e4e7;
    padding: 20px;
}

/* Main Container - The Dark Card */
.merger-container {
    background-color: #18181b; /* Sleek dark surface */
    width: 100%;
    max-width: 550px;
    border-radius: 20px;
    padding: 36px;
    
    /* Subtle neon border glow */
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7), 
                0 0 0 1px rgba(255, 255, 255, 0.05) inset;
}

header {
    text-align: center;
    margin-bottom: 32px;
}

header h1 {
    font-size: 28px;
    font-weight: 800;
    letter-spacing: -0.5px;
    /* Gradient text effect */
    background: linear-gradient(to right, #818cf8, #c084fc);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 8px;
}

header p {
    color: #a1a1aa;
    font-size: 15px;
}

/* Upload Zone */
.upload-zone {
    background-color: #0f0f11;
    border: 2px dashed #27272a;
    border-radius: 16px;
    padding: 48px 20px;
    text-align: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    margin-bottom: 28px;
    position: relative;
    overflow: hidden;
}

.upload-zone:hover {
    border-color: #6366f1;
    background-color: rgba(99, 102, 241, 0.03);
}

.upload-zone.dragover {
    border-color: #a855f7;
    background-color: rgba(168, 85, 247, 0.08);
    transform: scale(1.02);
}

.upload-icon {
    font-size: 48px;
    margin-bottom: 16px;
    filter: drop-shadow(0 0 12px rgba(168, 85, 247, 0.4));
}

.upload-zone p {
    color: #d4d4d8;
    font-size: 16px;
    font-weight: 500;
}

.or-text {
    margin: 14px 0;
    color: #52525b !important;
    font-size: 14px !important;
    text-transform: uppercase;
    letter-spacing: 2px;
}

/* Browse Button */
.btn-browse {
    background-color: #27272a;
    border: 1px solid #3f3f46;
    color: #f4f4f5;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.2s ease;
    display: inline-block;
}

.btn-browse:hover {
    background-color: #3f3f46;
    border-color: #6366f1;
    color: #fff;
    box-shadow: 0 0 15px rgba(99, 102, 241, 0.3);
}

/* File List */
.file-list-container {
    margin-bottom: 28px;
}

.file-list-container h3 {
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 16px;
    color: #71717a;
    font-weight: 700;
}

.file-list {
    list-style: none;
    max-height: 200px;
    overflow-y: auto;
}

/* Custom Scrollbar for the list */
.file-list::-webkit-scrollbar {
    width: 6px;
}
.file-list::-webkit-scrollbar-track {
    background: #18181b;
}
.file-list::-webkit-scrollbar-thumb {
    background: #3f3f46;
    border-radius: 10px;
}

.file-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #1f1f22;
    border: 1px solid #27272a;
    padding: 14px 20px;
    border-radius: 10px;
    margin-bottom: 10px;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.file-item:hover {
    transform: translateX(4px);
    border-color: #3f3f46;
}

.file-name {
    font-size: 14px;
    color: #e4e4e7;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 10px;
}

.file-name::before {
    content: "📄";
    font-size: 16px;
}

.remove-btn {
    color: #ef4444;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    padding: 4px 8px;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.remove-btn:hover {
    background-color: rgba(239, 68, 68, 0.1);
    color: #f87171;
}

/* Primary Action Button (The glowing merge button) */
.btn-merge {
    background: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);
    color: #ffffff;
    border: none;
    padding: 18px 24px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 0.5px;
    cursor: pointer;
    width: 100%;
    transition: all 0.3s ease;
    box-shadow: 0 10px 20px -5px rgba(129, 140, 248, 0.4);
    position: relative;
    overflow: hidden;
}

.btn-merge:hover {
    box-shadow: 0 15px 25px -5px rgba(168, 85, 247, 0.5);
    transform: translateY(-2px);
}

.btn-merge:active {
    transform: translateY(1px);
    box-shadow: 0 5px 10px -5px rgba(168, 85, 247, 0.5);
}

.btn-merge:disabled {
    opacity: 0.7;
    cursor: wait;
    transform: none;
    box-shadow: none;
}

.empty-state {
    justify-content: center;
    border-style: dashed;
    color: #71717a;
}

.empty-state .file-name::before {
    content: "📂";
}