:root {
    --primary: #4361ee;
    --primary-dark: #3a56d4;
    --secondary: #7209b7;
    --light: #f8f9fa;
    --dark: #212529;
    --success: #4cc9f0;
    --warning: #f72585;
    --gray: #6c757d;
    --light-gray: #e9ecef;
    --border-radius: 12px;
    --box-shadow: 0 10px 20px rgba(0,0,0,0.1);
    --transition: all 0.3s ease;

    /* Enhanced Typography */
    --font-primary: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
    --font-secondary: 'Poppins', 'Segoe UI', system-ui, sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;

    --font-size-xs: 0.75rem;
    --font-size-sm: 0.875rem;
    --font-size-base: 1rem;
    --font-size-lg: 1.125rem;
    --font-size-xl: 1.25rem;
    --font-size-2xl: 1.5rem;
    --font-size-3xl: 1.875rem;
    --font-size-4xl: 2.25rem;
    --font-size-5xl: 3rem;

    --font-weight-light: 300;
    --font-weight-normal: 400;
    --font-weight-medium: 500;
    --font-weight-semibold: 600;
    --font-weight-bold: 700;

    --line-height-tight: 1.25;
    --line-height-normal: 1.5;
    --line-height-relaxed: 1.75;
    --line-height-loose: 2;

    --letter-spacing-tight: -0.025em;
    --letter-spacing-normal: 0;
    --letter-spacing-wide: 0.025em;
    --letter-spacing-wider: 0.05em;
}

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Poppins:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500;600&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: var(--font-primary);
    font-weight: var(--font-weight-normal);
    line-height: var(--line-height-normal);
    letter-spacing: var(--letter-spacing-normal);
}
/* Fix for drag and drop area */
.upload-area {
    cursor: pointer;
    transition: all 0.3s ease;
}

.upload-area.dragover {
    background-color: rgba(67, 97, 238, 0.1) !important;
    border-color: var(--primary) !important;
    transform: scale(1.02);
}

.preview-filename {
    font-size: 0.9rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 80%;
    display: inline-block;
}

/* Fix for buttons in preview items */
.preview-item .btn {
    font-size: 0.8rem;
    padding: 5px 10px;
    margin-top: 5px;
}

/* Better visual feedback for drag and drop */
@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(67, 97, 238, 0.4); }
    70% { box-shadow: 0 0 0 10px rgba(67, 97, 238, 0); }
    100% { box-shadow: 0 0 0 0 rgba(67, 97, 238, 0); }
}

.dragover {
    animation: pulse 1.5s infinite;
}

/* Fix for sortable items */
.sortable-ghost {
    opacity: 0.4;
    background: var(--light-gray);
    border: 2px dashed var(--primary);
}

.sortable-chosen {
    background: var(--light);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.sortable-drag {
    opacity: 0.8;
    transform: rotate(2deg);
}

/* Ensure file input is accessible */
.file-input {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}
body {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    min-height: 100vh;
    color: var(--dark);
    padding: 20px;
    font-family: var(--font-primary);
    font-size: var(--font-size-base);
    line-height: var(--line-height-relaxed);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

p {
    margin-bottom: 1rem;
    line-height: var(--line-height-relaxed);
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--primary-dark);
}

strong, b {
    font-weight: var(--font-weight-semibold);
}

em, i {
    font-style: italic;
}

code {
    font-family: var(--font-mono);
    background: var(--light-gray);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.9em;
    color: var(--warning);
}

pre {
    font-family: var(--font-mono);
    background: var(--light);
    padding: 15px;
    border-radius: var(--border-radius);
    overflow-x: auto;
    border: 1px solid var(--light-gray);
    line-height: var(--line-height-normal);
}

blockquote {
    border-left: 4px solid var(--primary);
    padding-left: 15px;
    margin: 20px 0;
    font-style: italic;
    color: var(--gray);
}

.container {
    max-width: 1200px;
    margin: 24px auto 0;
}

/* Navigation Styles */
.navbar {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    padding: 15px 25px;
    margin-bottom: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-left {
    display: flex;
    align-items: center;
    gap: 15px;
}

.sidebar-toggle {
    background: var(--light);
    border: 1px solid var(--light-gray);
    border-radius: 8px;
    padding: 10px 12px;
    cursor: pointer;
    color: var(--dark);
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.sidebar-toggle:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--dark);
    font-weight: bold;
    font-size: 1.2rem;
}

.nav-text {
    font-family: var(--font-primary);
    font-weight: 800;
    font-size: 2rem;
    letter-spacing: -0.5px;
    line-height: 1.1;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: transparent;
}

.nav-logo {
    height: 40px;
    width: auto;
}

.nav-brand .logo-icon {
    background: var(--primary);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.nav-center {
    flex: 1;
    display: flex;
    justify-content: center;
}

.nav-menu {
    display: flex;
    gap: 20px;
    list-style: none;
}

.nav-item {
    position: relative;
}

.nav-link {
    color: var(--dark);
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 8px;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 5px;
}

.nav-link:hover, .nav-link.active {
    background: var(--primary);
    color: white;
}

.dropdown-toggle {
    cursor: pointer;
}

.dropdown-toggle.active .fa-chevron-down {
    transform: rotate(180deg);
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    border-radius: 8px;
    box-shadow: var(--box-shadow);
    min-width: 200px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1000;
    border: 1px solid var(--light-gray);
}

.dropdown-menu.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu li {
    list-style: none;
}

.dropdown-menu a {
    display: block;
    padding: 12px 16px;
    color: var(--dark);
    text-decoration: none;
    transition: var(--transition);
    border-radius: 0;
}

.dropdown-menu a:hover {
    background: var(--light);
    color: var(--primary);
}

.dropdown-item {
    display: block;
    padding: 12px 16px;
    color: var(--dark);
    text-decoration: none;
    transition: var(--transition);
    border-radius: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.dropdown-item:hover {
    background: var(--light);
    color: var(--primary);
}

.dropdown-menu a:first-child {
    border-radius: 8px 8px 0 0;
}

.dropdown-menu a:last-child {
    border-radius: 0 0 8px 8px;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.nav-btn {
    background: var(--light);
    border: 1px solid var(--light-gray);
    border-radius: 8px;
    padding: 10px 12px;
    cursor: pointer;
    color: var(--dark);
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--font-size-sm);
    position: relative;
}

.nav-btn:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(67, 97, 238, 0.3);
}

.nav-btn:active {
    transform: translateY(0);
}

#languageToggle {
    position: relative;
}

#languageToggle::after {
    content: attr(title);
    position: absolute;
    bottom: -35px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--dark);
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 0.75rem;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    pointer-events: none;
    z-index: 1000;
}

#languageToggle::before {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-bottom-color: var(--dark);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    pointer-events: none;
}

#languageToggle:hover::after,
#languageToggle:hover::before {
    opacity: 1;
    visibility: visible;
}

.github-btn {
    background: var(--secondary);
    color: white;
    border: 1px solid var(--secondary);
}

.github-btn:hover {
    background: #5a189a;
    border-color: #5a189a;
}

/* Main content styles */
header {
    text-align: center;
    padding: 30px 20px;
    margin-bottom: 30px;
}

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

.logo-image {
    height: 60px;
    width: auto;
}

.logo-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.logo-icon {
    background: var(--primary);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
    box-shadow: var(--box-shadow);
}

h1 {
    font-family: var(--font-secondary);
    font-size: var(--font-size-4xl);
    font-weight: var(--font-weight-bold);
    background: linear-gradient(to right, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    margin-bottom: 10px;
    line-height: var(--line-height-tight);
    letter-spacing: var(--letter-spacing-tight);
}

.brand-subtitle {
    font-size: var(--font-size-lg);
    color: var(--gray-600);
    font-weight: var(--font-weight-normal);
    margin-top: -5px;
}

h2 {
    font-family: var(--font-secondary);
    font-size: var(--font-size-3xl);
    font-weight: var(--font-weight-semibold);
    color: var(--dark);
    margin-bottom: 15px;
    line-height: var(--line-height-tight);
}

h3 {
    font-family: var(--font-secondary);
    font-size: var(--font-size-2xl);
    font-weight: var(--font-weight-semibold);
    color: var(--dark);
    margin-bottom: 12px;
    line-height: var(--line-height-tight);
}

h4 {
    font-family: var(--font-primary);
    font-size: var(--font-size-lg);
    font-weight: var(--font-weight-medium);
    color: var(--dark);
    margin-bottom: 10px;
}

h5, h6 {
    font-family: var(--font-primary);
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-medium);
    color: var(--dark);
    margin-bottom: 8px;
}

.tagline {
    font-size: var(--font-size-lg);
    color: var(--gray);
    max-width: 600px;
    margin: 0 auto 25px;
    line-height: var(--line-height-relaxed);
    font-weight: var(--font-weight-light);
}

/* Tool Switch Button */
.tool-switch {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 20px;
    padding: 15px 25px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: var(--border-radius);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
}

.switch-label {
    font-size: 1rem;
    font-weight: 500;
    color: var(--dark);
    transition: color 0.3s ease;
}

.switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 30px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: 0.4s;
    border-radius: 30px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 22px;
    width: 22px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: 0.4s;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

input:checked + .slider {
    background: linear-gradient(to right, var(--primary), var(--secondary));
}

input:checked + .slider:before {
    transform: translateX(30px);
}

.switch:hover .slider {
    box-shadow: 0 0 8px rgba(67, 97, 238, 0.3);
}

.app-card {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    overflow: hidden;
    margin-bottom: 30px;
}

.card-header {
    background: linear-gradient(to right, var(--primary), var(--secondary));
    color: white;
    padding: 25px;
    text-align: center;
}

.card-header h2 {
    font-size: 1.8rem;
    margin-bottom: 10px;
}

.card-body {
    padding: 30px;
}

.upload-area {
    border: 3px dashed var(--light-gray);
    border-radius: var(--border-radius);
    padding: 60px 30px;
    text-align: center;
    transition: var(--transition);
    margin-bottom: 30px;
    cursor: pointer;
}

.upload-area:hover, .upload-area.dragover {
    border-color: var(--primary);
    background-color: rgba(67, 97, 238, 0.05);
}

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

.upload-text {
    font-size: 1.3rem;
    margin-bottom: 15px;
    color: var(--dark);
}

.upload-subtext {
    color: var(--gray);
    margin-bottom: 25px;
}

.btn {
    display: inline-block;
    background: var(--primary);
    color: white;
    border: none;
    padding: 14px 28px;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
    text-decoration: none;
    box-shadow: 0 4px 6px rgba(67, 97, 238, 0.2);
}

.btn:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(67, 97, 238, 0.3);
}

.btn-secondary {
    background: var(--secondary);
}

.btn-secondary:hover {
    background: #5e08a0;
}

/* File list styles for PDF merger */
.file-list {
    margin-top: 30px;
    padding: 20px;
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

.file-list h3 {
    margin-bottom: 15px;
    color: var(--dark);
    font-size: 1.2rem;
}

.file-items {
    list-style: none;
    padding: 0;
    margin: 0;
}

.file-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px;
    background: var(--light);
    border-radius: 8px;
    margin-bottom: 10px;
    border: 1px solid var(--light-gray);
    transition: var(--transition);
    cursor: move;
}

.file-item:hover {
    background: white;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.file-info {
    display: flex;
    align-items: center;
    flex-grow: 1;
}

.file-info i {
    color: var(--primary);
    margin-right: 12px;
    font-size: 1.2rem;
}

.file-name {
    font-weight: 500;
    color: var(--dark);
    margin-right: 10px;
}

.file-size {
    color: var(--gray);
    font-size: 0.9rem;
}

.remove-btn {
    background: var(--warning);
    color: white;
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    flex-shrink: 0;
}

.remove-btn:hover {
    background: #d61f69;
    transform: scale(1.1);
}

/* Progress bar styles */
.progress-bar {
    width: 100%;
    height: 20px;
    background: var(--light-gray);
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 10px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--success));
    width: 0%;
    transition: width 0.3s ease;
}

.btn-success {
    background: var(--success);
}

.btn-warning {
    background: var(--warning);
}

.file-input {
    display: none;
}

.controls {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: center;
    margin-top: 25px;
}

.option-group {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-top: 25px;
    justify-content: center;
}

.option {
    display: flex;
    align-items: center;
    gap: 8px;
}

.option label {
    color: var(--dark);
    font-weight: 500;
}

select {
    padding: 10px 15px;
    border-radius: 8px;
    border: 1px solid var(--light-gray);
    background: white;
    color: var(--dark);
    font-size: 1rem;
}

.preview-section {
    margin-top: 40px;
}

.preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 15px;
}

.preview-header h3 {
    font-size: 1.5rem;
    color: var(--dark);
}

.preview-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

.preview-item {
    background: var(--light);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0,0,0,0.08);
    transition: var(--transition);
}

.preview-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0,0,0,0.1);
}

.preview-img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
    background: #f0f0f0;
}

.preview-info {
    padding: 15px;
}

.preview-info h4 {
    margin-bottom: 8px;
    color: var(--dark);
}

.preview-info p {
    color: var(--gray);
    font-size: 0.9rem;
}

.hidden {
    display: none;
}

.loading {
    text-align: center;
    padding: 40px;
}

.spinner {
    width: 60px;
    height: 60px;
    border: 5px solid rgba(67, 97, 238, 0.2);
    border-top-color: var(--primary);
    border-radius: 50%;
    margin: 0 auto 20px;
    animation: spin 1s linear infinite;
}

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

.stats {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    gap: 20px;
    margin-top: 30px;
    padding: 25px;
    background: var(--light);
    border-radius: var(--border-radius);
}

.stat-item {
    text-align: center;
    flex: 1;
    min-width: 150px;
}

.stat-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 5px;
}

.stat-label {
    color: var(--gray);
    font-size: 1rem;
}

.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    margin-top: 40px;
}

.feature-card {
    background: white;
    padding: 25px;
    border-radius: var(--border-radius);
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    text-align: center;
    transition: var(--transition);
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.feature-icon {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 20px;
}

.feature-card h3 {
    margin-bottom: 15px;
    color: var(--dark);
}

.feature-card p {
    color: var(--gray);
    line-height: 1.6;
}

/* Tools Bookmark Section - Centered */
.tools-bookmark {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    padding: 14px 0 10px 0;
    border-bottom: 1px solid var(--primary-dark);
    box-shadow: 0 2px 8px rgba(67, 97, 238, 0.04);
    z-index: 10;
    border-radius: 0 0 18px 18px;
}

.tool-bookmark-item {
    display: flex;
    align-items: center;
    gap: 6px;
    background: white;
    color: var(--primary);
    border-radius: 18px;
    padding: 7px 18px;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    box-shadow: 0 1px 4px rgba(67, 97, 238, 0.06);
    transition: background 0.2s, color 0.2s, box-shadow 0.2s;
}

.tool-bookmark-item:hover {
    background: var(--primary-dark);
    color: white;
    box-shadow: 0 2px 8px rgba(67, 97, 238, 0.12);
}

@media (max-width: 768px) {
    .navbar {
        flex-direction: column;
        gap: 15px;
        padding: 15px 20px;
    }

    .nav-center {
        order: 2;
        width: 100%;
    }

    .nav-menu {
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px;
    }

    .nav-item {
        flex: 1;
        min-width: 120px;
        text-align: center;
    }

    .dropdown-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        border: none;
        background: transparent;
        display: none;
    }

    .dropdown-menu.open {
        display: block;
    }

    .dropdown-menu li {
        margin: 5px 0;
    }

    .dropdown-menu a {
        background: var(--light);
        border-radius: 6px;
        margin: 2px 0;
    }

    .nav-actions {
        order: 1;
        justify-content: space-between;
        width: 100%;
    }

    h1 {
        font-size: 2.2rem;
    }

    .card-body {
        padding: 20px;
    }

    .upload-area {
        padding: 40px 20px;
    }

    .controls {
        flex-direction: column;
        align-items: center;
    }

    .btn {
        width: 100%;
        max-width: 300px;
    }
}
/* Tabs for multiple tools */
.tabs {
    display: flex;
    justify-content: center;
    margin: 30px 0;
    gap: 10px;
}

.tab-btn {
    padding: 12px 30px;
    background: white;
    border: 2px solid var(--light-gray);
    border-radius: var(--border-radius);
    font-size: 1rem;
    font-weight: 600;
    color: var(--dark);
    cursor: pointer;
    transition: var(--transition);
}

.tab-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.tab-btn.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* Sortable styles */
.sortable-ghost {
    opacity: 0.4;
    background: var(--light-gray);
}

.sortable-chosen {
    background: var(--light-gray);
}

.sortable-drag {
    opacity: 1;
}

.preview-item {
    position: relative;
    cursor: move;
}

.preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    background: rgba(0,0,0,0.05);
    border-bottom: 1px solid var(--light-gray);
}

.preview-header span {
    font-weight: 500;
    font-size: 0.9rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.remove-btn {
    background: none;
    border: none;
    color: var(--warning);
    cursor: pointer;
    padding: 5px;
    border-radius: 4px;
    transition: var(--transition);
}

.remove-btn:hover {
    background: rgba(247, 37, 133, 0.1);
}

.preview-info {
    display: flex;
    justify-content: space-between;
    padding: 10px 15px;
    font-size: 0.85rem;
    color: var(--gray);
}

.preview-actions {
    display: flex;
    justify-content: space-between;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--light-gray);
}

/* Checkbox styling */
.option label[for^="imageOrder"],
.option label[for^="compressImages"],
.option label[for^="addPageNumbers"] {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.option input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

/* Navigation highlight */
.nav-link.active {
    position: relative;
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 3px;
    background: var(--primary);
    border-radius: 2px;
}

/* Tool selection page */
.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.tool-card {
    background: white;
    border-radius: var(--border-radius);
    padding: 30px;
    text-align: center;
    box-shadow: var(--box-shadow);
    transition: var(--transition);
    text-decoration: none;
    color: inherit;
    display: block;
}

.tool-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
}

.tool-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    color: white;
    font-size: 32px;
}

.tool-card h3 {
    margin-bottom: 15px;
    color: var(--dark);
}

.tool-card p {
    color: var(--gray);
    line-height: 1.6;
}
/* Footer Styles */
.footer {
    background: linear-gradient(135deg, #212529 0%, #343a40 100%);
    color: white;
    padding: 50px 20px 30px;
    margin-top: 60px;
    border-radius: var(--border-radius) var(--border-radius) 0 0;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}

.footer-main {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-start;
    gap: 40px;
    margin-bottom: 40px;
    padding-bottom: 30px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    text-align: left;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 15px;
    flex: 1;
    min-width: 250px;
}

.footer-logo-image {
    height: 50px;
    width: auto;
}

.logo-icon.small {
    width: 40px;
    height: 40px;
    font-size: 20px;
}

.footer-brand h3 {
    color: white;
    margin-bottom: 5px;
    font-size: 1.5rem;
}

.footer-brand p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
    flex: 2;
}

.link-group {
    text-align: left;
}

.link-group h4 {
    color: white;
    margin-bottom: 15px;
    font-size: 1.1rem;
    font-weight: 600;
}

.link-group a {
    display: block;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    margin-bottom: 10px;
    transition: var(--transition);
}

.link-group a:hover {
    color: var(--primary);
    transform: translateX(5px);
}

.footer-bottom {
    text-align: center;
}

.footer-tech {
    margin-bottom: 20px;
}

.footer-tech p {
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 5px;
}

.footer-actions {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 25px;
}

.github-link, .reset-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: white;
    text-decoration: none;
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    transition: var(--transition);
}

.github-link:hover {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

.reset-link:hover {
    background: rgba(247, 37, 133, 0.2);
    color: #f72585;
}

.footer-copyright {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.9rem;
    margin-top: 20px;
}

.footer-copyright p {
    margin-bottom: 8px;
}

.disclaimer {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.4);
}

/* Navigation Updates */
.navbar {
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.nav-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--dark);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 5px;
}

.dropdown {
    position: relative;
}

.dropdown-toggle {
    display: flex;
    align-items: center;
    gap: 5px;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    padding: 10px 0;
    min-width: 200px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: var(--transition);
    z-index: 1000;
}

.dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 20px;
    color: var(--dark);
    text-decoration: none;
    transition: var(--transition);
}

.dropdown-item:hover {
    background: var(--light-gray);
    color: var(--primary);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.github-btn {
    background: #333;
    color: white;
    padding: 8px 16px;
    border-radius: 8px;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    transition: var(--transition);
}

.github-btn:hover {
    background: #444;
    transform: translateY(-2px);
}

/* Mobile Navigation */
@media (max-width: 768px) {
    .nav-toggle {
        display: block;
    }
    
    .nav-menu {
        display: none;
        width: 100%;
        flex-direction: column;
        background: white;
        position: absolute;
        top: 100%;
        left: 0;
        border-radius: var(--border-radius);
        box-shadow: var(--box-shadow);
        padding: 20px;
        z-index: 1000;
    }
    
    .nav-menu.active {
        display: flex;
    }
    
    .nav-menu li {
        width: 100%;
        margin-bottom: 10px;
    }
    
    .nav-link {
        display: block;
        width: 100%;
        text-align: left;
    }
    
    .dropdown-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        padding-left: 20px;
        display: none;
    }
    
    .dropdown.active .dropdown-menu {
        display: block;
    }
    
    .footer-main {
        flex-direction: column;
        text-align: center;
        gap: 30px;
    }
    
    .footer-logo {
        justify-content: center;
        text-align: center;
    }
    
    .footer-links {
        justify-content: center;
        text-align: center;
        gap: 30px;
    }
    
    .link-group {
        text-align: center;
    }
}

@media (max-width: 900px) {
    .tools-bookmark {
        justify-content: center;
    }
}

/* Right-align the Tools dropdown menu in navbar */
.nav-item.dropdown {
    position: relative;
}
.nav-item.dropdown .dropdown-menu {
    left: auto;
    right: 0;
}
