/* NoTracePDF - Styles */

/* CSS Variables - Light Theme (Default) */
:root {
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-card: #ffffff;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --border-color: #e2e8f0;
    --shadow-color: rgba(0, 0, 0, 0.1);
    --shadow-lg-color: rgba(0, 0, 0, 0.15);
    
    --primary-color: #2563eb;
    --primary-hover: #1d4ed8;
    --primary-light: #dbeafe;
    --secondary-color: #64748b;
    --success-color: #10b981;
    --error-color: #ef4444;
    --warning-color: #f59e0b;
    
    --background: #f8fafc;
    --surface: #ffffff;
    --text: #1e293b;
    --border: #e2e8f0;
    
    --shadow: 0 1px 3px var(--shadow-color), 0 1px 2px var(--shadow-color);
    --shadow-lg: 0 10px 15px -3px var(--shadow-lg-color), 0 4px 6px -2px var(--shadow-color);
    --radius: 8px;
    --radius-lg: 12px;
    --transition: all 0.2s ease;
}

/* Dark Theme */
[data-theme="dark"] {
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-card: #1e293b;
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --border-color: #334155;
    --shadow-color: rgba(0, 0, 0, 0.3);
    --shadow-lg-color: rgba(0, 0, 0, 0.4);
    
    --background: #0f172a;
    --surface: #1e293b;
    --text: #f1f5f9;
    --border: #334155;
    
    --primary-light: #1e3a5f;
}

/* System Font Stack */
* {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* Reset */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* Base Styles */
html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    background-color: var(--background);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header */
.header {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

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

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

/* GitHub Link */
.github-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: var(--text-secondary);
    font-size: 14px;
    text-decoration: none;
    transition: var(--transition);
}

.github-link:hover {
    color: var(--text);
}

/* Language Toggle */
.lang-toggle {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0.5rem 0.75rem;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.75rem;
    color: var(--text-primary);
    min-width: 44px;
    gap: 4px;
}

.lang-flag {
    font-size: 1rem;
    line-height: 1;
}

.lang-toggle:hover {
    background: var(--border);
}

/* Theme Toggle */
.theme-toggle {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0.5rem;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Hide checkbox but keep functionality */
.theme-checkbox {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

/* Default (unchecked) = dark theme - show moon */
.theme-checkbox:not(:checked) + .theme-toggle .sun-icon {
    display: none !important;
}
.theme-checkbox:not(:checked) + .theme-toggle .moon-icon {
    display: block !important;
}

/* Checked = light theme - show sun */
.theme-checkbox:checked + .theme-toggle .sun-icon {
    display: block !important;
}
.theme-checkbox:checked + .theme-toggle .moon-icon {
    display: none !important;
}

/* Default (unchecked) = dark theme */
body {
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-card: #1e293b;
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --border-color: #334155;
    --background: #0f172a;
    --surface: #1e293b;
    --text: #f1f5f9;
    --border: #334155;
    --primary-light: #1e3a5f;
}

/* Light theme class (for checkbox toggle) */
body.light-theme {
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-card: #ffffff;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --border-color: #e2e8f0;
    --background: #f8fafc;
    --surface: #ffffff;
    --text: #1e293b;
    --border: #e2e8f0;
    --primary-light: #dbeafe;
}

/* Light theme with :has() selector */
body:has(.theme-checkbox:checked) {
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-card: #ffffff;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --border-color: #e2e8f0;
    --background: #f8fafc;
    --surface: #ffffff;
    --text: #1e293b;
    --border: #e2e8f0;
    --primary-light: #dbeafe;
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text);
    margin: 0;
}

.logo-icon {
    width: 32px;
    height: 32px;
    color: var(--primary-color);
}

.tagline {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

/* Theme Toggle */
.theme-toggle {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0.5rem;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.theme-toggle:hover {
    background: var(--border);
}

.theme-toggle svg {
    width: 20px;
    height: 20px;
    color: var(--text-primary);
}

.theme-toggle .moon-icon {
    display: none;
}

.theme-toggle .sun-icon {
    display: block;
}

[data-theme="dark"] .theme-toggle .moon-icon {
    display: block;
}

[data-theme="dark"] .theme-toggle .sun-icon {
    display: none;
}

/* Main Content */
.main-content {
    flex: 1;
    padding: 2rem 1.5rem;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
}

/* Section Title */
.section-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text);
    text-align: center;
}

/* Search Container */
.search-container {
    position: relative;
    max-width: 500px;
    margin: 0 auto 1.5rem;
}

.search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    color: var(--text-secondary);
    pointer-events: none;
}

.search-input {
    width: 100%;
    padding: 0.875rem 2.75rem;
    border: 2px solid var(--border);
    border-radius: var(--radius-lg);
    font-size: 1rem;
    background: var(--surface);
    color: var(--text);
    transition: var(--transition);
}

.search-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px var(--primary-light);
}

.search-input::placeholder {
    color: var(--text-secondary);
}

.search-clear {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.25rem;
    color: var(--text-secondary);
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-clear:hover {
    color: var(--text);
}

.search-clear svg {
    width: 20px;
    height: 20px;
}

.search-results-count {
    text-align: center;
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

/* Tool Section */
.tool-section {
    margin-bottom: 2.5rem;
}

.tool-section:last-child {
    margin-bottom: 0;
}

.tool-section-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--border);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Section-specific icon colors */
[data-section="organize"] .tool-section-title { border-color: #3b82f6; }
[data-section="organize"] .tool-icon { color: #3b82f6; }

[data-section="security"] .tool-section-title { border-color: #ef4444; }
[data-section="security"] .tool-icon { color: #ef4444; }

[data-section="compress"] .tool-section-title { border-color: #10b981; }
[data-section="compress"] .tool-icon { color: #10b981; }

[data-section="extract"] .tool-section-title { border-color: #8b5cf6; }
[data-section="extract"] .tool-icon { color: #8b5cf6; }

[data-section="convert-to"] .tool-section-title { border-color: #f59e0b; }
[data-section="convert-to"] .tool-icon { color: #f59e0b; }

[data-section="convert-from"] .tool-section-title { border-color: #06b6d4; }
[data-section="convert-from"] .tool-icon { color: #06b6d4; }

[data-section="watermark"] .tool-section-title { border-color: #ec4899; }
[data-section="watermark"] .tool-icon { color: #ec4899; }

[data-section="page"] .tool-section-title { border-color: #6366f1; }
[data-section="page"] .tool-icon { color: #6366f1; }

[data-section="advanced"] .tool-section-title { border-color: #14b8a6; }
[data-section="advanced"] .tool-icon { color: #14b8a6; }

/* Tool Grid - Mobile First */
.tool-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    padding: 0 0.5rem;
}

/* Tool Card */
.tool-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.tool-card:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.tool-icon {
    width: 48px;
    height: 48px;
    color: var(--primary-color);
    margin-bottom: 0.75rem;
}

.tool-icon svg {
    width: 100%;
    height: 100%;
}

.tool-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
    color: var(--text);
}

.tool-description {
    font-size: 0.75rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

/* Modal */
.modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.modal.hidden {
    display: none;
}

.modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
}

.modal-content {
    position: relative;
    background: var(--surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    animation: modalFadeIn 0.2s ease;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border);
}

.modal-title {
    font-size: 1.25rem;
    font-weight: 600;
}

.modal-close {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.25rem;
    color: var(--text-secondary);
    transition: var(--transition);
}

.modal-close:hover {
    color: var(--text);
}

.modal-close svg {
    width: 24px;
    height: 24px;
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border);
}

/* Upload Zone */
.upload-zone {
    border: 2px dashed var(--border);
    border-radius: var(--radius-lg);
    padding: 3rem 2rem;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    background: var(--background);
}

.upload-zone:hover,
.upload-zone.drag-over {
    border-color: var(--primary-color);
    background: var(--primary-light);
}

.upload-icon {
    width: 48px;
    height: 48px;
    margin: 0 auto 1rem;
    color: var(--primary-color);
}

.upload-icon svg {
    width: 100%;
    height: 100%;
}

.upload-text {
    font-size: 1rem;
    font-weight: 500;
    margin-bottom: 0.25rem;
    color: var(--text);
}

.upload-hint {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.file-input {
    display: none;
}

/* File List */
.file-list {
    margin-top: 1rem;
}

.file-list.hidden {
    display: none;
}

.file-list-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.files-container {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.file-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    background: var(--background);
    border-radius: var(--radius);
    font-size: 0.875rem;
}

.file-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex: 1;
    min-width: 0;
}

.file-icon {
    width: 20px;
    height: 20px;
    color: var(--primary-color);
    flex-shrink: 0;
}

.file-name {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.file-size {
    color: var(--text-secondary);
    font-size: 0.75rem;
    white-space: nowrap;
}

.file-remove {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.25rem;
    color: var(--text-secondary);
    transition: var(--transition);
    flex-shrink: 0;
}

.file-remove:hover {
    color: var(--error-color);
}

.file-remove svg {
    width: 18px;
    height: 18px;
}

/* Tool Options */
.tool-options {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
}

.tool-options.hidden {
    display: none;
}

.option-group {
    margin-bottom: 1rem;
}

.option-group:last-child {
    margin-bottom: 0;
}

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

.option-hint {
    font-size: 0.75rem;
    color: var(--text-secondary);
    font-weight: normal;
}

.option-input {
    width: 100%;
    padding: 0.625rem 0.875rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.875rem;
    transition: var(--transition);
}

.option-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px var(--primary-light);
}

.option-textarea {
    width: 100%;
    padding: 0.625rem 0.875rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.875rem;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    transition: var(--transition);
    resize: vertical;
    min-height: 100px;
}

.option-textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px var(--primary-light);
}

.option-select {
    width: 100%;
    padding: 0.625rem 0.875rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.875rem;
    background: var(--surface);
    cursor: pointer;
}

.option-select:focus {
    outline: none;
    border-color: var(--primary-color);
}

/* Radio/Checkbox Groups */
.option-group-inline {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.option-radio,
.option-checkbox {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-size: 0.875rem;
}

.option-radio input,
.option-checkbox input {
    accent-color: var(--primary-color);
}

/* Range Slider */
.range-container {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.range-input {
    flex: 1;
    accent-color: var(--primary-color);
}

.range-value {
    min-width: 40px;
    text-align: center;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

/* Progress Section */
.progress-section {
    margin-top: 1.5rem;
}

.progress-section.hidden {
    display: none;
}

.progress-bar {
    height: 8px;
    background: var(--border);
    border-radius: 4px;
    overflow: hidden;
}

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

.progress-text {
    text-align: center;
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-top: 0.5rem;
}

/* Result Section */
.result-section {
    text-align: center;
    padding: 2rem;
}

.result-section.hidden {
    display: none;
}

.result-success {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.result-icon {
    width: 64px;
    height: 64px;
    color: var(--success-color);
}

.result-message {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text);
}

.result-deleted {
    font-size: 0.875rem;
    color: var(--success-color);
    font-weight: 500;
}

/* Text Result */
.text-result {
    margin-top: 1rem;
}

.text-result.hidden {
    display: none;
}

.text-result h3 {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.text-result pre {
    background: var(--background);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem;
    font-family: "SF Mono", Monaco, "Cascadia Code", monospace;
    font-size: 0.75rem;
    white-space: pre-wrap;
    word-wrap: break-word;
    max-height: 300px;
    overflow-y: auto;
    margin-bottom: 1rem;
}

/* Error Section */
.error-section {
    text-align: center;
    padding: 2rem;
}

.error-section.hidden {
    display: none;
}

.error-message {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.error-icon {
    width: 48px;
    height: 48px;
    color: var(--error-color);
}

#error-text {
    font-size: 1rem;
    color: var(--error-color);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    border-radius: var(--radius);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    border: none;
}

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

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

.btn-primary:hover:not(:disabled) {
    background: var(--primary-hover);
}

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

.btn-secondary:hover:not(:disabled) {
    background: var(--background);
    border-color: var(--text-secondary);
}

/* Footer */
.footer {
    background: var(--surface);
    border-top: 1px solid var(--border);
    padding: 1.5rem;
    text-align: center;
}

.footer-text {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-weight: 500;
    color: var(--text);
    margin-bottom: 0.25rem;
}

.shield-icon {
    width: 20px;
    height: 20px;
    color: var(--success-color);
}

.footer-subtitle {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

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

/* PDF Preview Container */
.preview-container {
    margin-top: 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--background);
    overflow: hidden;
}

.preview-container.hidden {
    display: none;
}

.preview-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
}

.preview-filename {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 300px;
}

.preview-close {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.25rem;
    color: var(--text-secondary);
    transition: var(--transition);
}

.preview-close:hover {
    color: var(--text);
}

.preview-close svg {
    width: 20px;
    height: 20px;
}

.preview-canvas-wrapper {
    padding: 1rem;
    display: flex;
    justify-content: center;
    overflow: auto;
    max-height: 400px;
    background: var(--surface);
}

#preview-canvas {
    max-width: 100%;
    height: auto;
    box-shadow: var(--shadow);
}

.preview-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 0.75rem 1rem;
    background: var(--surface);
    border-top: 1px solid var(--border);
}

#preview-page-info {
    font-size: 0.875rem;
    color: var(--text-secondary);
    min-width: 100px;
    text-align: center;
}

.btn-small {
    padding: 0.375rem 0.75rem;
    font-size: 0.75rem;
}

/* Preview button in file list */
.preview-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.25rem;
    color: var(--text-secondary);
    transition: var(--transition);
    margin-right: 0.5rem;
}

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

.preview-btn svg {
    width: 18px;
    height: 18px;
}

.file-actions {
    display: flex;
    align-items: center;
}

/* =====================================================
   Responsive Design - Mobile First Approach
   ===================================================== */

/* Base styles are mobile (320px+) */

/* Small phones - base is already mobile */
/* No extra styles needed for 320px+ */

/* Large phones / Small tablets (480px+) */
@media (min-width: 480px) {
    .tool-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Tablets (768px+) */
@media (min-width: 768px) {
    .header {
        padding: 1rem 2rem;
    }
    
    .main-content {
        padding: 2rem;
    }
    
    .tool-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 1.25rem;
    }
    
    .section-title {
        font-size: 1.75rem;
    }
    
    .tool-card {
        padding: 1.25rem;
    }
    
    .tool-icon {
        width: 44px;
        height: 44px;
    }
    
    .tool-title {
        font-size: 1.05rem;
    }
    
    .tool-description {
        font-size: 0.8rem;
    }
    
    .modal-content {
        max-width: 550px;
    }
    
    .modal-footer {
        flex-direction: row;
        justify-content: flex-end;
    }
    
    .btn {
        width: auto;
    }
    
    .preview-filename {
        max-width: 400px;
    }
}

/* Desktops (1024px+) */
@media (min-width: 1024px) {
    .main-content {
        padding: 2rem 2.5rem;
    }
    
    .tool-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 1.5rem;
    }
    
    .section-title {
        font-size: 2rem;
        margin-bottom: 2rem;
    }
    
    .tool-card {
        padding: 1.5rem;
    }
    
    .tool-icon {
        width: 48px;
        height: 48px;
        margin-bottom: 0.75rem;
    }
    
    .tool-title {
        font-size: 1rem;
    }
    
    .tool-description {
        font-size: 0.8rem;
    }
}

/* Large desktops (1280px+) */
@media (min-width: 1280px) {
    .main-content {
        max-width: 1400px;
    }
    
    .tool-grid {
        grid-template-columns: repeat(5, 1fr);
    }
}

/* Extra large desktops (1536px+) */
@media (min-width: 1536px) {
    .tool-grid {
        grid-template-columns: repeat(6, 1fr);
    }
}

/* Touch-friendly adjustments */
@media (hover: none) and (pointer: coarse) {
    /* Increase touch targets */
    .tool-card {
        min-height: 120px;
    }
    
    .btn {
        min-height: 44px;
        padding: 0.75rem 1.25rem;
    }
    
    .file-remove,
    .preview-btn {
        min-width: 44px;
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .preview-btn svg,
    .file-remove svg {
        width: 24px;
        height: 24px;
    }
    
    /* Prevent hover effects on touch devices */
    .tool-card:hover {
        transform: none;
        box-shadow: var(--shadow);
    }
    
    .tool-card:active {
        transform: scale(0.98);
    }
}

/* Print styles */
@media print {
    .header,
    .footer,
    .theme-toggle,
    .preview-container {
        display: none !important;
    }
    
    .main-content {
        padding: 0;
    }
    
    .tool-grid {
        display: block;
    }
    
    .tool-card {
        break-inside: avoid;
        page-break-inside: avoid;
        margin-bottom: 1rem;
    }
}
