/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #374151;
    background-color: #ffffff;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Design System Variables */
:root {
    --primary-color: #4F46E5;
    --primary-hover: #4338CA;
    --primary-light: #EEF2FF;
    --secondary-color: #6B7280;
    --success-color: #10B981;
    --error-color: #EF4444;
    --warning-color: #F59E0B;
    
    --gray-50: #F9FAFB;
    --gray-100: #F3F4F6;
    --gray-200: #E5E7EB;
    --gray-300: #D1D5DB;
    --gray-400: #9CA3AF;
    --gray-500: #6B7280;
    --gray-600: #4B5563;
    --gray-700: #374151;
    --gray-800: #1F2937;
    --gray-900: #111827;
    
    --border-radius: 16px;
    --border-radius-sm: 8px;
    --border-radius-lg: 24px;
    
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --shadow-md: 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);
    
    --container-max-width: 1200px;
    --container-padding: 1rem;
}

/* Container */
.container {
    max-width: var(--container-max-width);
    margin: 0 auto;
    padding: 0 var(--container-padding);
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.25;
    margin-bottom: 0.5rem;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.125rem; }
h6 { font-size: 1rem; }

p {
    margin-bottom: 1rem;
}

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

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

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: var(--border-radius-sm);
    font-size: 1rem;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

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

.btn-primary:hover {
    background-color: var(--primary-hover);
    color: white;
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

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

.btn-secondary:hover {
    background-color: var(--gray-50);
    color: var(--gray-700);
    border-color: var(--gray-400);
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.125rem;
}

.btn-small {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

/* Header */
.header {
    background-color: white;
    border-bottom: 1px solid var(--gray-200);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-sm);
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 4rem;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--gray-900);
    font-weight: 600;
    font-size: 1.25rem;
}

.logo-text {
    color: var(--gray-900);
}

.nav {
    display: flex;
    align-items: center;
    gap: 2rem;
}

/* Main Navigation */
.main-nav {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.nav-link {
    display: flex;
    align-items: center;
    padding: 0.5rem 1rem;
    color: var(--gray-700);
    font-size: 0.95rem;
    font-weight: 500;
    border-radius: var(--border-radius-sm);
    transition: all 0.2s ease;
    white-space: nowrap;
}

.nav-link:hover {
    background-color: var(--gray-100);
    color: var(--primary-color);
}

.nav-link.active {
    background-color: var(--primary-light);
    color: var(--primary-color);
}

/* Search */
.search-container {
    position: relative;
    display: flex;
    align-items: center;
}

.search-input {
    width: 300px;
    padding: 0.5rem 1rem 0.5rem 2.5rem;
    border: 1px solid var(--gray-300);
    border-radius: var(--border-radius-sm);
    font-size: 0.875rem;
    transition: all 0.2s ease;
}

.search-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.search-icon {
    position: absolute;
    left: 0.75rem;
    color: var(--gray-400);
    pointer-events: none;
}

/* Language Selector */
.language-toggle {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.5rem;
    background: none;
    border: none;
    color: var(--gray-700);
    font-size: 0.875rem;
    cursor: pointer;
    border-radius: var(--border-radius-sm);
    transition: all 0.2s ease;
}

.language-toggle:hover {
    background-color: var(--gray-100);
}

/* Main Content */
.main {
    flex: 1;
    padding: 2rem 0;
}

/* Hero Section */
.hero {
    text-align: center;
    padding: 4rem 0;
    background: linear-gradient(135deg, var(--primary-light) 0%, white 100%);
}

.hero h1 {
    font-size: 3.5rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 1rem;
}

.hero p {
    font-size: 1.25rem;
    color: var(--gray-600);
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* iLovePDF-Style Homepage */
.hero-home {
    text-align: center;
    padding: 5rem 0 3rem;
    background: linear-gradient(135deg, #f8f9ff 0%, #ffffff 100%);
}

.hero-home h1 {
    font-size: 2.75rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 1.5rem;
    line-height: 1.2;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.hero-subtitle {
    font-size: 1.125rem;
    color: var(--gray-600);
    margin-bottom: 0;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
}

.all-tools-section {
    padding: 3rem 0 5rem;
    background: white;
}

.tools-grid-home {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.tool-card-home {
    background: white;
    padding: 2rem 1.5rem;
    border-radius: 12px;
    border: 1px solid var(--gray-200);
    transition: all 0.3s ease;
    text-align: left;
}

.tool-card-home:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.1);
    border-color: var(--primary-color);
}

.tool-icon-home {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    display: block;
}

.tool-card-home h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.tool-card-home h3 a {
    color: var(--gray-900);
    text-decoration: none;
    transition: color 0.2s ease;
}

.tool-card-home h3 a:hover {
    color: var(--primary-color);
}

.tool-card-home p {
    font-size: 0.9375rem;
    color: var(--gray-600);
    line-height: 1.5;
    margin-bottom: 0;
}

/* Trust Section */
.trust-section {
    padding: 5rem 0;
    background: var(--gray-50);
    text-align: center;
}

.trust-section h2 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 1rem;
}

.trust-section > .container > p {
    font-size: 1.125rem;
    color: var(--gray-600);
    max-width: 700px;
    margin: 0 auto 3rem;
    line-height: 1.6;
}

.trust-badges {
    display: flex;
    justify-content: center;
    gap: 4rem;
    flex-wrap: wrap;
    margin-top: 3rem;
}

.trust-badge {
    text-align: center;
}

.trust-badge svg {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.trust-badge p {
    font-size: 1rem;
    font-weight: 600;
    color: var(--gray-700);
    margin: 0;
}

/* Features Grid */
.features {
    padding: 4rem 0;
}

.features h2 {
    text-align: center;
    margin-bottom: 3rem;
    color: var(--gray-900);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.feature-card {
    background: white;
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    text-align: center;
    transition: all 0.2s ease;
    border: 1px solid var(--gray-200);
}

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

.feature-icon {
    width: 3rem;
    height: 3rem;
    background: var(--primary-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    color: var(--primary-color);
}

.feature-card h3 {
    margin-bottom: 0.5rem;
    color: var(--gray-900);
}

.feature-card p {
    color: var(--gray-600);
    margin-bottom: 1rem;
}

.feature-card .btn {
    margin-top: auto;
}

/* Tool Template */
.tool-page {
    max-width: 1000px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.tool-header {
    text-align: center;
    margin-bottom: 3rem;
}

.tool-header h1 {
    color: var(--gray-900);
    margin-bottom: 1rem;
}

.tool-header p {
    font-size: 1.125rem;
    color: var(--gray-600);
    max-width: 600px;
    margin: 0 auto;
}

.tool-content {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 3rem;
    align-items: start;
}

.tool-main {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    padding: 2rem;
    border: 1px solid var(--gray-200);
}

.tool-sidebar {
    background: var(--gray-50);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    border: 1px solid var(--gray-200);
}

/* Dropzone */
.dropzone {
    border: 2px dashed var(--gray-300);
    border-radius: var(--border-radius);
    padding: 3rem 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-bottom: 2rem;
}

.dropzone.compact-dropzone {
    padding: 2.5rem 2rem;
    margin-bottom: 2.5rem;
}

.dropzone:hover,
.dropzone.dragover {
    border-color: var(--primary-color);
    background-color: var(--primary-light);
}

.dropzone-icon {
    width: 3rem;
    height: 3rem;
    margin: 0 auto 1rem;
    color: var(--gray-400);
}

.dropzone h3 {
    color: var(--gray-700);
    margin-bottom: 0.5rem;
}

.dropzone p {
    color: var(--gray-500);
    margin-bottom: 0;
}

.dropzone.dragover .dropzone-icon,
.dropzone.dragover h3 {
    color: var(--primary-color);
}

/* File List */
.file-list {
    margin-bottom: 2rem;
}

.file-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--gray-50);
    border-radius: var(--border-radius-sm);
    margin-bottom: 0.5rem;
    border: 1px solid var(--gray-200);
}

.file-drag-handle {
    cursor: grab;
    color: var(--gray-400);
}

.file-drag-handle:active {
    cursor: grabbing;
}

.file-info {
    flex: 1;
}

.file-name {
    font-weight: 500;
    color: var(--gray-900);
    margin-bottom: 0.25rem;
}

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

.file-remove {
    background: none;
    border: none;
    color: var(--gray-400);
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.file-remove:hover {
    color: var(--error-color);
    background-color: rgba(239, 68, 68, 0.1);
}

/* Tool Actions */
.tool-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 2rem;
}

/* Result Area */
.result-area {
    padding: 2rem;
    background: var(--gray-50);
    border-radius: var(--border-radius);
    text-align: center;
    border: 1px solid var(--gray-200);
}

.result-preview {
    margin-bottom: 1rem;
}

.result-thumbnail {
    width: 100px;
    height: 140px;
    background: white;
    border: 1px solid var(--gray-300);
    border-radius: var(--border-radius-sm);
    margin: 0 auto 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gray-400);
}

/* PDF Preview */
.pdf-preview-container {
    width: 100%;
    margin-top: 2rem;
    padding: 1.5rem;
    background: var(--gray-50);
    border-radius: var(--border-radius);
    border: 1px solid var(--gray-200);
}

.pdf-preview-container h4 {
    margin-bottom: 1rem;
    color: var(--gray-900);
    font-size: 1.25rem;
    font-weight: 600;
}

.page-selection-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
    padding: 0.75rem;
    background: white;
    border-radius: var(--border-radius-sm);
    border: 1px solid var(--gray-200);
}

.selected-count {
    font-weight: 500;
    color: var(--gray-700);
}

.page-selection-info .btn {
    padding: 0.25rem 0.75rem;
    font-size: 0.875rem;
}

.pdf-pages-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 1rem;
    max-height: 400px;
    overflow-y: auto;
    padding: 1rem;
    background: white;
    border-radius: var(--border-radius-sm);
    border: 1px solid var(--gray-200);
}

.pdf-page-thumbnail {
    position: relative;
    cursor: pointer;
    border-radius: var(--border-radius-sm);
    overflow: hidden;
    transition: all 0.2s ease;
    border: 2px solid transparent;
}

.pdf-page-thumbnail:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.pdf-page-thumbnail.selected {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
}

.pdf-page-thumbnail[draggable="true"] {
    cursor: grab;
}

.pdf-page-thumbnail[draggable="true"]:active {
    cursor: grabbing;
}

.pdf-page-thumbnail.confirmed-range {
    border-color: var(--success-color);
    box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.2);
    opacity: 0.7;
}

.pdf-page-thumbnail.confirmed-range input[type="checkbox"] {
    opacity: 0.5;
    cursor: not-allowed;
}

.range-selection-buttons {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.confirmed-ranges {
    margin-top: 1rem;
    padding: 1rem;
    background: var(--gray-50);
    border-radius: var(--border-radius-sm);
    border: 1px solid var(--gray-200);
}

.confirmed-ranges h5 {
    margin-bottom: 0.75rem;
    color: var(--gray-700);
    font-weight: 600;
}

.ranges-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.confirmed-range-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem;
    background: white;
    border-radius: var(--border-radius-sm);
    border: 1px solid var(--gray-200);
}

.range-badge {
    background: var(--success-color);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: var(--border-radius-sm);
    font-size: 0.75rem;
    font-weight: 600;
}

.range-text {
    font-weight: 500;
    color: var(--gray-700);
}

.range-count {
    color: var(--gray-500);
    font-size: 0.875rem;
}

.selection-buttons {
    display: flex;
    gap: 0.5rem;
}

.drag-handle {
    position: absolute;
    top: 5px;
    right: 5px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 2px 4px;
    border-radius: 3px;
    font-size: 12px;
    cursor: grab;
    user-select: none;
    z-index: 10;
}

.drag-handle:hover {
    background: rgba(0, 0, 0, 0.9);
}

.drag-handle:active {
    cursor: grabbing;
}

.page-thumbnail {
    position: relative;
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: var(--border-radius-sm);
    overflow: hidden;
}

.page-thumbnail canvas {
    width: 100%;
    height: auto;
    display: block;
}

.page-number {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    text-align: center;
    padding: 0.25rem;
    font-size: 0.75rem;
    font-weight: 500;
}

.page-checkbox {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: white;
    border-radius: 50%;
    padding: 0.25rem;
    box-shadow: var(--shadow-sm);
}

.page-checkbox input[type="checkbox"] {
    margin: 0;
    cursor: pointer;
}

.more-pages-info {
    grid-column: 1 / -1;
    text-align: center;
    padding: 1rem;
    background: var(--gray-100);
    border-radius: var(--border-radius-sm);
    color: var(--gray-600);
    font-size: 0.875rem;
}

.pdf-preview {
    margin-bottom: 1.5rem;
    border: 1px solid var(--gray-300);
    border-radius: var(--border-radius);
    overflow: hidden;
    background: white;
}

.pdf-preview iframe {
    width: 100%;
    height: 400px;
    border: none;
    display: block;
}

.preview-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.preview-actions .btn {
    min-width: 160px;
}

/* FAQ */
.faq {
    padding: 4rem 0;
    background: var(--gray-50);
}

.faq h2 {
    text-align: center;
    margin-bottom: 3rem;
    color: var(--gray-900);
}

.faq-list {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    background: white;
    border-radius: var(--border-radius-sm);
    margin-bottom: 1rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--gray-200);
}

.faq-question {
    width: 100%;
    padding: 1.5rem;
    background: none;
    border: none;
    text-align: left;
    font-size: 1.125rem;
    font-weight: 500;
    color: var(--gray-900);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.faq-answer {
    padding: 0 1.5rem 1.5rem;
    color: var(--gray-600);
    display: none;
}

.faq-item.active .faq-answer {
    display: block;
}

/* Tool FAQ */
.tool-faq {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--color-gray-200);
}

.tool-faq h2 {
    margin-bottom: 1.5rem;
    color: var(--color-gray-900);
    font-size: 1.5rem;
    font-weight: 600;
    text-align: left;
}

.tool-faq .faq-item {
    margin-bottom: 1rem;
    padding: 1.25rem;
}

.tool-faq .faq-item h3 {
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

.tool-faq .faq-item p {
    font-size: 0.9rem;
}

/* Footer */
.footer {
    background-color: var(--gray-900);
    color: white;
    padding: 3rem 0 1rem;
    margin-top: auto;
}

.footer-content {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 3rem;
    margin-bottom: 2rem;
}

.footer-section .logo {
    margin-bottom: 1rem;
}

.footer-section .logo-text {
    color: white;
}

.footer-description {
    color: var(--gray-400);
    margin-bottom: 1rem;
}

.privacy-badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--gray-400);
    background: rgba(79, 70, 229, 0.1);
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius-sm);
    border: 1px solid rgba(79, 70, 229, 0.2);
}

.footer-links {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.footer-column h3 {
    color: white;
    margin-bottom: 1rem;
    font-size: 1rem;
}

.footer-column ul {
    list-style: none;
}

.footer-column li {
    margin-bottom: 0.5rem;
}

.footer-column a {
    color: var(--gray-400);
    transition: color 0.2s ease;
}

.footer-column a:hover {
    color: white;
}

.footer-bottom {
    border-top: 1px solid var(--gray-800);
    padding-top: 1rem;
    text-align: center;
    color: var(--gray-400);
    font-size: 0.875rem;
}

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

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Loading States */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.spinner {
    display: inline-block;
    width: 1rem;
    height: 1rem;
    border: 2px solid var(--gray-300);
    border-radius: 50%;
    border-top-color: var(--primary-color);
    animation: spin 1s ease-in-out infinite;
}

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

/* Error States */
.error {
    color: var(--error-color);
    background-color: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    padding: 1rem;
    border-radius: var(--border-radius-sm);
    margin-bottom: 1rem;
}

.success {
    color: var(--success-color);
    background-color: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.2);
    padding: 1rem;
    border-radius: var(--border-radius-sm);
    margin-bottom: 1rem;
}

/* ===== COMPRESSION TOOL STYLES ===== */
.compression-settings {
    background: var(--surface-color);
    border-radius: var(--border-radius-lg);
    padding: 2rem;
    margin: 2rem 0;
    border: 1px solid var(--border-color);
}

.compression-settings h3 {
    margin: 0 0 1.5rem 0;
    color: var(--text-primary);
    font-size: 1.25rem;
    font-weight: 600;
}

.quality-selector {
    margin-bottom: 2rem;
}

.quality-label {
    display: block;
    margin-bottom: 1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.quality-options {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.quality-option {
    position: relative;
}

.quality-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.quality-option-label {
    display: block;
    padding: 1.5rem;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius-md);
    cursor: pointer;
    transition: all 0.2s ease;
    background: var(--background-color);
}

.quality-option input[type="radio"]:checked + .quality-option-label {
    border-color: var(--primary-color);
    background: var(--primary-color-light);
    box-shadow: var(--shadow-sm);
}

.quality-option-label:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow-sm);
}

.quality-title {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.quality-desc {
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
}

.quality-reduction {
    color: var(--primary-color);
    font-size: 0.875rem;
    font-weight: 500;
}

.file-size-info {
    background: var(--background-color);
    border-radius: var(--border-radius-md);
    padding: 1.5rem;
    border: 1px solid var(--border-color);
}

.size-comparison {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.original-size,
.estimated-size {
    text-align: center;
}

.size-label {
    display: block;
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.size-value {
    display: block;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
}

.estimated-size .size-value {
    color: var(--primary-color);
}

.compression-results {
    background: var(--surface-color);
    border-radius: var(--border-radius-lg);
    padding: 2rem;
    border: 1px solid var(--border-color);
}

.results-header {
    text-align: center;
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
}

.results-header h3 {
    margin: 0 0 1.5rem 0;
    color: var(--success-color);
    font-size: 1.5rem;
}

.savings-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
}

.savings-item {
    text-align: center;
}

.savings-label {
    display: block;
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 0.25rem;
}

.savings-value {
    display: block;
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
}

.compressed-files {
    margin-bottom: 2rem;
}

.compressed-file {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    margin-bottom: 1rem;
    background: var(--background-color);
}

.compressed-file:last-child {
    margin-bottom: 0;
}

.file-info {
    flex: 1;
}

.file-name {
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.file-sizes {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
}

.original-size {
    color: var(--text-secondary);
}

.arrow {
    color: var(--text-secondary);
}

.compressed-size {
    color: var(--success-color);
    font-weight: 500;
}

.file-actions {
    margin-left: 1rem;
}

.results-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: var(--border-color);
    border-radius: 4px;
    overflow: hidden;
    margin-top: 1rem;
}

.progress-fill {
    height: 100%;
    background: var(--primary-color);
    border-radius: 4px;
    transition: width 0.3s ease;
    width: 0%;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 0 1rem;
    }
    
    .header-content {
        flex-direction: column;
        height: auto;
        padding: 1rem 0;
        gap: 1rem;
    }
    
    .nav {
        gap: 1rem;
        flex-wrap: wrap;
    }
    
    .main-nav {
        gap: 0.75rem;
        flex-wrap: wrap;
    }
    
    .nav-link {
        padding: 0.4rem 0.75rem;
        font-size: 0.9rem;
    }
    
    .search-input {
        width: 200px;
    }
    
    /* Compression tool responsive styles */
    .quality-options {
        grid-template-columns: 1fr;
    }
    
    .size-comparison {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .savings-summary {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    
    .compressed-file {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .file-actions {
        margin-left: 0;
        width: 100%;
    }
    
    .results-actions {
        flex-direction: column;
        align-items: stretch;
    }
    
    .hero h1 {
        font-size: 2.5rem;
    }
    
    .hero-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .tool-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .tool-actions {
        flex-direction: column;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .footer-links {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 2rem;
    }
    
    .tool-main,
    .tool-sidebar {
        padding: 1rem;
    }
    
    .dropzone {
        padding: 2rem 1rem;
    }
}

@media (max-width: 640px) {
    .pdf-preview iframe {
        height: 300px;
    }
    
    .preview-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .preview-actions .btn {
        width: 100%;
        max-width: 280px;
    }
}

/* Info sections */
.info-section, .features-section, .security-section {
    margin: 50px 0;
    padding: 40px 0;
}

.info-section h2, .features-section h2, .security-section h2 {
    text-align: center;
    margin-bottom: 40px;
    font-size: 2.2rem;
    color: var(--gray-900);
    font-weight: 600;
}

/* Steps grid */
.steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    max-width: 1000px;
    margin: 0 auto;
}

.step-item {
    text-align: center;
    padding: 30px 20px;
    background: var(--gray-50);
    border-radius: var(--border-radius);
    border: 1px solid var(--gray-200);
}

.step-number {
    width: 50px;
    height: 50px;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: bold;
    margin: 0 auto 20px;
}

.step-item h3 {
    margin-bottom: 15px;
    color: var(--gray-900);
    font-size: 1.3rem;
}

.step-item p {
    color: var(--gray-600);
    line-height: 1.6;
}

/* Benefits section spacing */
.benefits-section {
    margin-top: 4rem;
    padding: 3rem 0;
}

/* Benefits grid */
.benefits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    max-width: 1000px;
    margin: 0 auto;
}

.benefit-item {
    background: white;
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    text-align: center;
    transition: all 0.2s ease;
    border: 1px solid var(--gray-200);
}

.benefit-item:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.benefit-item h3 {
    margin-bottom: 1rem;
    color: var(--gray-900);
    font-size: 1.25rem;
    font-weight: 600;
}

.benefit-item p {
    color: var(--gray-600);
    line-height: 1.6;
    margin: 0;
}

/* Features grid */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    max-width: 1000px;
    margin: 0 auto;
}

.feature-item {
    text-align: center;
    padding: 30px 20px;
    background: white;
    border-radius: var(--border-radius);
    border: 1px solid var(--gray-200);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.feature-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.feature-icon {
    width: 50px;
    height: 50px;
    color: var(--primary-color);
    margin: 0 auto 20px;
}

.feature-item h3 {
    margin-bottom: 15px;
    color: var(--gray-900);
    font-size: 1.3rem;
}

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

/* Security grid */
.security-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    max-width: 1000px;
    margin: 0 auto;
}

.security-item {
    padding: 30px;
    background: var(--gray-50);
    border-radius: var(--border-radius);
    border: 1px solid var(--gray-200);
    border-left: 4px solid var(--success-color);
}

.security-icon {
    width: 40px;
    height: 40px;
    color: var(--success-color);
    margin-bottom: 20px;
}

.security-item h3 {
    margin-bottom: 15px;
    color: var(--gray-900);
    font-size: 1.3rem;
}

.security-item p {
    color: var(--gray-600);
    line-height: 1.6;
}

/* FAQ Section */
.faq-section {
    background-color: var(--gray-50);
    padding: 4rem 0;
    margin-top: 4rem;
}

.faq-section h2 {
    text-align: center;
    font-size: 2rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 3rem;
}

.faq-list {
    max-width: 800px;
    margin: 0 auto;
    display: grid;
    gap: 1.5rem;
}

.faq-item {
    background: white;
    border-radius: var(--border-radius);
    padding: 2rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--gray-200);
    transition: all 0.2s ease;
}

.faq-item:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.faq-item h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 1rem;
    line-height: 1.4;
}

.faq-item p {
    color: var(--gray-600);
    line-height: 1.6;
    font-size: 1rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .steps-grid, .features-grid, .security-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .info-section, .features-section, .security-section {
        margin: 30px 0;
        padding: 20px 0;
    }
    
    .info-section h2, .features-section h2, .security-section h2 {
        font-size: 1.8rem;
        margin-bottom: 30px;
    }
    
    .faq-section {
        padding: 3rem 0;
        margin-top: 3rem;
    }
    
    .faq-section h2 {
        font-size: 1.75rem;
        margin-bottom: 2rem;
    }
    
    .faq-item {
        padding: 1.5rem;
    }
    
    .faq-item h3 {
        font-size: 1.125rem;
    }
}

/* Tool-specific Styles */
.tool-dropzone {
    margin-bottom: 2rem;
}

.dropzone {
    border: 3px dashed var(--gray-300);
    border-radius: var(--border-radius);
    padding: 4rem 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: var(--gray-50);
}

.dropzone:hover {
    border-color: var(--primary-color);
    background: var(--primary-light);
}

.dropzone.dragover {
    border-color: var(--primary-color);
    background: var(--primary-light);
    transform: scale(1.02);
}

.dropzone-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.dropzone h3 {
    margin-bottom: 0.5rem;
    color: var(--gray-700);
}

.dropzone p {
    color: var(--gray-500);
}

/* Page Grid Styles */
#pages-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.page-item {
    position: relative;
}

.page-preview {
    border: 2px solid var(--gray-200);
    border-radius: var(--border-radius-sm);
    padding: 1rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: white;
}

.page-preview:hover {
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.page-preview.selected {
    border-color: var(--primary-color);
    background: var(--primary-light);
}

.page-number {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 0.5rem;
}

.page-thumbnail {
    font-size: 3rem;
    margin: 1rem 0;
}

.selected-badge {
    display: inline-block;
    background: var(--primary-color);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-top: 0.5rem;
}

/* Rotate PDF Tool Specific Styles */
.rotate-page-item {
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    padding: 1rem;
    text-align: center;
    transition: all 0.3s ease;
}

.rotate-page-item:hover {
    border-color: #FF6B6B;
    box-shadow: 0 4px 12px rgba(255, 107, 107, 0.2);
}

.page-preview-container {
    position: relative;
    width: 100%;
    min-height: 200px;
    background: #f5f5f5;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    margin-bottom: 1rem;
}

.page-canvas {
    max-width: 100%;
    max-height: 100%;
    display: block;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.page-number-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    background: rgba(255, 107, 107, 0.9);
    color: white;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.page-controls {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    margin-top: 0.5rem;
    flex-wrap: wrap;
}

.rotation-status {
    margin-top: 0.5rem;
    font-size: 0.875rem;
    color: #666;
    font-weight: 500;
}

.spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #FF6B6B;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

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

/* Delete PDF Tool Specific Styles */
.delete-page-item .page-preview-container {
    cursor: pointer;
    position: relative;
    transition: all 0.3s ease;
}

.delete-page-item .page-preview-container:hover {
    transform: scale(1.02);
}

.delete-page-item .page-preview-container.selected-for-delete {
    border: 3px solid #ff4444;
}

.delete-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 68, 68, 0.85);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    backdrop-filter: blur(2px);
}

.delete-icon {
    font-size: 3rem;
    margin-bottom: 0.5rem;
    animation: shake 0.5s ease;
}

.delete-text {
    color: white;
    font-weight: bold;
    font-size: 1rem;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    75% { transform: translateX(10px); }
}

.selection-info {
    background: #f0f0f0;
    padding: 1rem;
    border-radius: 8px;
    text-align: center;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: #333;
}

/* Extract PDF Tool Specific Styles */
.extract-page-item .page-preview-container {
    cursor: pointer;
    position: relative;
    transition: all 0.3s ease;
}

.extract-page-item .page-preview-container:hover {
    transform: scale(1.02);
}

.extract-page-item .page-preview-container.selected-for-extract {
    border: 3px solid #4CAF50;
}

.extract-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(76, 175, 80, 0.85);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    backdrop-filter: blur(2px);
}

.extract-icon {
    font-size: 3.5rem;
    margin-bottom: 0.5rem;
    color: white;
    font-weight: bold;
}

.extract-text {
    color: white;
    font-weight: bold;
    font-size: 1rem;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

/* Add Page Numbers Tool Styles */
.pagenumber-settings-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin: 2rem 0;
}

@media (max-width: 768px) {
    .pagenumber-settings-grid {
        grid-template-columns: 1fr;
    }
}

.settings-panel {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    border: 2px solid #e0e0e0;
}

.preview-panel {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    border: 2px solid #e0e0e0;
}

.preview-panel h4 {
    margin-top: 0;
    color: #333;
}

.preview-container {
    position: relative;
    border: 1px solid #ddd;
    border-radius: 4px;
    overflow: hidden;
    background: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
}

.preview-container canvas {
    max-width: 100%;
    height: auto;
    display: block;
}

.preview-number-overlay {
    position: absolute;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: bold;
    pointer-events: none;
}

.preview-number-overlay.pos-bottom-center {
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
}

.preview-number-overlay.pos-bottom-right {
    bottom: 20px;
    right: 20px;
}

.preview-number-overlay.pos-bottom-left {
    bottom: 20px;
    left: 20px;
}

.preview-number-overlay.pos-top-center {
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
}

.preview-number-overlay.pos-top-right {
    top: 20px;
    right: 20px;
}

.preview-number-overlay.pos-top-left {
    top: 20px;
    left: 20px;
}

.position-selector {
    margin: 1rem 0;
}

.position-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
    max-width: 200px;
}

.pos-btn {
    width: 60px;
    height: 60px;
    border: 2px solid #ddd;
    background: white;
    border-radius: 8px;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.pos-btn:hover {
    border-color: #FF6B6B;
    background: #fff5f5;
    transform: scale(1.1);
}

.pos-btn.active {
    border-color: #FF6B6B;
    background: #FF6B6B;
    color: white;
}

.pagenumber-preview-item .page-preview-container {
    position: relative;
}

#all-pages-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
    margin: 1rem 0;
}

/* Watermark Tool Styles */
.watermark-settings-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin: 2rem 0;
}

@media (max-width: 768px) {
    .watermark-settings-grid {
        grid-template-columns: 1fr;
    }
}

.watermark-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(45deg);
    font-weight: bold;
    font-family: 'Helvetica', sans-serif;
    pointer-events: none;
    white-space: nowrap;
    text-transform: uppercase;
    user-select: none;
}

.watermark-preview-item .page-preview-container {
    position: relative;
}

#watermark-all-pages-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
    margin: 1rem 0;
}

/* Sign PDF Tool Styles */
.sign-settings-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin: 2rem 0;
}

@media (max-width: 768px) {
    .sign-settings-grid {
        grid-template-columns: 1fr;
    }
}

.signature-container {
    border: 2px dashed #ddd;
    border-radius: 8px;
    padding: 1rem;
    background: white;
    margin: 1rem 0;
}

#signature-canvas {
    border: 1px solid #ccc;
    border-radius: 4px;
    cursor: crosshair;
    display: block;
    margin: 0 auto;
    background: white;
}

.signature-overlay {
    position: absolute;
    pointer-events: none;
    background: white;
    border: 1px solid #ccc;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.signature-overlay.pos-bottom-right {
    bottom: 50px;
    right: 50px;
}

.signature-overlay.pos-bottom-left {
    bottom: 50px;
    left: 50px;
}

.signature-overlay.pos-top-right {
    top: 50px;
    right: 50px;
}

.signature-overlay.pos-top-left {
    top: 50px;
    left: 50px;
}

.signature-overlay.pos-center {
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

#sign-preview-canvas {
    cursor: crosshair;
}

#sign-preview-canvas:hover {
    opacity: 0.95;
}

.position-grid-sign {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
    max-width: 200px;
}

.sign-preview-item .page-preview-container {
    position: relative;
}

#sign-all-pages-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
    margin: 1rem 0;
}

/* Reorder List Styles */
#pages-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin: 2rem 0;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.reorder-page-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: white;
    border: 2px solid var(--gray-200);
    border-radius: var(--border-radius-sm);
    cursor: move;
    transition: all 0.3s ease;
}

.reorder-page-item:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow-md);
    transform: translateX(4px);
}

.reorder-page-item.dragging {
    opacity: 0.4;
    transform: scale(0.95);
}

.reorder-page-item.drag-over {
    border-color: #4CAF50;
    background: #f1f8f4;
    transform: scale(1.02);
}

.drag-handle {
    font-size: 1.5rem;
    color: var(--gray-400);
    cursor: grab;
    padding: 0.5rem;
    transition: color 0.2s;
}

.drag-handle:active {
    cursor: grabbing;
}

.reorder-page-item:hover .drag-handle {
    color: var(--primary-color);
}

.page-preview-mini {
    width: 60px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f5f5f5;
    border-radius: 4px;
    overflow: hidden;
}

.reorder-canvas {
    max-width: 100%;
    max-height: 100%;
    display: block;
}

.page-info-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.original-page {
    font-weight: 600;
    color: var(--gray-700);
    font-size: 0.95rem;
}

.new-position {
    color: var(--gray-500);
    font-size: 0.85rem;
}

.page-info {
    flex: 1;
    font-weight: 600;
    color: var(--gray-700);
}

.position-info {
    color: var(--gray-500);
    font-size: 0.875rem;
}

/* Form Styles */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 0.5rem;
}

.form-group input[type="text"],
.form-group input[type="number"],
.form-group input[type="password"],
.form-group select {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid var(--gray-200);
    border-radius: var(--border-radius-sm);
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
}

.form-group input[type="range"] {
    width: 70%;
    margin-right: 1rem;
}

.form-group input[type="checkbox"] {
    margin-right: 0.5rem;
}

/* Signature Canvas */
.signature-container {
    margin: 2rem 0;
}

#signature-canvas {
    border: 2px solid var(--gray-300);
    border-radius: var(--border-radius-sm);
    cursor: crosshair;
    background: white;
    display: block;
    margin: 0 auto;
}

/* Selection Info */
.selection-info {
    text-align: center;
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--primary-color);
    margin: 1rem 0;
    padding: 1rem;
    background: var(--primary-light);
    border-radius: var(--border-radius-sm);
}

/* Alert Styles */
.alert {
    padding: 1rem 1.5rem;
    border-radius: var(--border-radius-sm);
    margin: 1.5rem 0;
}

.alert-info {
    background: #DBEAFE;
    border: 2px solid #3B82F6;
    color: #1E40AF;
}

.alert strong {
    font-weight: 700;
}

/* Tool Note */
.tool-note {
    margin-top: 1rem;
    font-size: 0.875rem;
    color: var(--gray-500);
    text-align: center;
}

/* Rotation Controls */
.rotation-controls {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin: 2rem 0;
}

.rotation-btn {
    padding: 0.75rem 1.5rem;
    border: 2px solid var(--gray-300);
    border-radius: var(--border-radius-sm);
    background: white;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.rotation-btn:hover {
    border-color: var(--primary-color);
    background: var(--primary-light);
}

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

/* Format Options */
.format-options {
    display: flex;
    gap: 1rem;
    margin: 1.5rem 0;
}

.format-btn {
    flex: 1;
    padding: 1rem;
    border: 2px solid var(--gray-300);
    border-radius: var(--border-radius-sm);
    background: white;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

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

.format-btn.active {
    border-color: var(--primary-color);
    background: var(--primary-light);
    color: var(--primary-color);
}

/* Responsive Design for Tools */
@media (max-width: 768px) {
    #pages-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 1rem;
    }
    
    .dropzone {
        padding: 3rem 1rem;
    }
    
    .dropzone-icon {
        font-size: 3rem;
    }
    
    .rotation-controls {
        flex-direction: column;
    }
    
    #signature-canvas {
        width: 100%;
        height: 100px;
    }
}

/* Step Indicator Styles */
.tool-steps {
    margin: 2rem 0 3rem 0;
}

.step-indicator {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 600px;
    margin: 0 auto;
    position: relative;
}

.step-indicator::before {
    content: '';
    position: absolute;
    top: 20px;
    left: 15%;
    right: 15%;
    height: 2px;
    background: var(--gray-300);
    z-index: 0;
}

.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 1;
}

.step-number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--gray-300);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    margin-bottom: 0.5rem;
    transition: all 0.3s ease;
}

.step.active .step-number {
    background: var(--primary-color);
    box-shadow: 0 0 0 4px var(--primary-light);
}

.step-label {
    font-size: 0.875rem;
    color: var(--gray-600);
    font-weight: 600;
}

.step.active .step-label {
    color: var(--primary-color);
}

/* Tool Step Content */
.tool-step-content {
    min-height: 400px;
}

/* Config Container */
.config-container {
    display: grid;
    gap: 2rem;
}

.config-preview {
    background: white;
    padding: 2rem;
    border-radius: var(--border-radius);
    border: 2px solid var(--gray-200);
}

.preview-box {
    margin-top: 2rem;
    padding: 1.5rem;
    background: var(--gray-50);
    border-radius: var(--border-radius-sm);
    border: 2px dashed var(--gray-300);
}

.preview-box h4 {
    margin-bottom: 1rem;
    color: var(--gray-700);
}

.preview-box p {
    margin: 0.5rem 0;
    color: var(--gray-600);
}

.preview-box strong {
    color: var(--gray-700);
}

/* Image Preview Container */
.image-preview-container {
    text-align: center;
    padding: 2rem;
}

.image-preview-container img {
    display: block;
    margin: 1rem auto;
}

/* Responsive for Step Indicator */
@media (max-width: 768px) {
    .step-indicator {
        max-width: 100%;
    }
    
    .step-label {
        font-size: 0.75rem;
    }
    
    .step-number {
        width: 35px;
        height: 35px;
        font-size: 0.875rem;
    }
    
    .config-container {
        grid-template-columns: 1fr;
    }
}

/* Image to PDF Styles */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 2rem 0 1.5rem 0;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--gray-200);
}

.section-header h3 {
    margin: 0;
    color: var(--gray-700);
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

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

.image-card {
    background: white;
    border: 2px solid var(--gray-200);
    border-radius: var(--border-radius-sm);
    padding: 1rem;
    transition: all 0.3s ease;
}

.image-card:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow-md);
}

.image-card-preview {
    width: 100%;
    height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gray-50);
    border-radius: var(--border-radius-sm);
    overflow: hidden;
    margin-bottom: 0.75rem;
}

.image-card-preview img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.image-card-info {
    margin-bottom: 0.75rem;
}

.image-name {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--gray-700);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 0.25rem;
}

.image-order {
    font-size: 0.75rem;
    color: var(--gray-500);
}

.image-card-actions {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
}

.btn-icon {
    width: 32px;
    height: 32px;
    border: 2px solid var(--gray-300);
    background: white;
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.btn-icon:hover:not(:disabled) {
    border-color: var(--primary-color);
    background: var(--primary-light);
    color: var(--primary-color);
}

.btn-icon:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.btn-icon.btn-danger:hover:not(:disabled) {
    border-color: var(--error-color);
    background: #FEE2E2;
    color: var(--error-color);
}

.conversion-settings {
    background: white;
    padding: 2rem;
    border-radius: var(--border-radius);
    border: 2px solid var(--gray-200);
    margin: 2rem 0;
}

.conversion-settings h3 {
    margin-bottom: 1.5rem;
    color: var(--gray-700);
}

/* Responsive for Image Grid */
@media (max-width: 768px) {
    .images-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 1rem;
    }
    
    .image-card-preview {
        height: 120px;
    }
    
    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .section-header .btn {
        width: 100%;
    }
    
    /* Homepage Responsive */
    .hero-home h1 {
        font-size: 2rem;
        padding: 0 1rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
        padding: 0 1rem;
    }
    
    .tools-grid-home {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .trust-badges {
        gap: 2rem;
    }
    
    .trust-section h2 {
        font-size: 1.5rem;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .tools-grid-home {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .hero-home h1 {
        font-size: 2.25rem;
    }
}

@media (min-width: 1025px) {
    .tools-grid-home {
        grid-template-columns: repeat(3, 1fr);
    }
}
