/* =========================================
   1. CSS VARIABLES & RESET
   ========================================= */
   :root {
    /* Color Palette */
    --primary-color: #4f46e5;     /* Indigo */
    --primary-hover: #4338ca;
    
    --text-main: #1f2937;         /* Dark Gray */
    --text-muted: #6b7280;        /* Medium Gray */
    --text-light: #9ca3af;        /* Light Gray */
    
    --bg-body: #f3f4f6;           /* Off-white background */
    --bg-card: #ffffff;           /* White cards */
    --bg-header: #ffffff;
    
    --border-color: #e5e7eb;
    
    /* Category Colors */
    --color-pdf: #ef4444;         /* Red */
    --color-img: #8b5cf6;         /* Purple */
    --color-vid: #06b6d4;         /* Cyan */
    --color-txt: #f59e0b;         /* Amber */
    --color-util: #10b981;        /* Emerald */
    
    /* Functional Colors */
    --success: #22c55e;
    --danger: #ef4444;
    --warning: #f59e0b;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --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);
    
    /* Transition */
    --transition-speed: 0.3s;
    
    /* Layout */
    --container-width: 1200px;
    --header-height: 70px;
}

[data-theme="dark"] {
    --primary-color: #6366f1;
    --primary-hover: #818cf8;
    
    --text-main: #f9fafb;
    --text-muted: #d1d5db;
    --text-light: #9ca3af;
    
    --bg-body: #111827;
    --bg-card: #1f2937;
    --bg-header: #1f2937;
    
    --border-color: #374151;
    
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-body);
    color: var(--text-main);
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    transition: background-color var(--transition-speed), color var(--transition-speed);
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.2s;
}

ul, ol {
    list-style: none;
}

button, input, select, textarea {
    font-family: inherit;
}

.hidden {
    display: none !important;
}

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
}

/* =========================================
   2. HEADER
   ========================================= */
.site-header {
    background-color: var(--bg-header);
    height: var(--header-height);
    display: flex;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-sm);
    transition: background-color var(--transition-speed), border-color var(--transition-speed);
}

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

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

.logo i {
    color: var(--primary-color);
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 20px;
}

.nav-link {
    font-weight: 500;
    color: var(--text-muted);
}

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

.btn-icon {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: background-color 0.2s;
}

.btn-icon:hover {
    background-color: rgba(0,0,0,0.05);
    color: var(--primary-color);
}

[data-theme="dark"] .btn-icon:hover {
    background-color: rgba(255,255,255,0.1);
}

/* =========================================
   3. HERO SECTION (Homepage)
   ========================================= */
.hero {
    padding: 80px 0 60px;
    text-align: center;
}

.hero-title {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 16px;
    letter-spacing: -0.025em;
    background: linear-gradient(135deg, var(--primary-color), var(--color-img));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto 40px;
}

.search-wrapper {
    max-width: 500px;
    margin: 0 auto;
    position: relative;
}

.search-wrapper input {
    width: 100%;
    padding: 16px 20px 16px 48px;
    border-radius: 50px;
    border: 1px solid var(--border-color);
    background-color: var(--bg-card);
    color: var(--text-main);
    font-size: 1rem;
    box-shadow: var(--shadow-md);
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

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

.search-icon {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-light);
}

/* =========================================
   4. MAIN CONTENT (Homepage)
   ========================================= */
.tools-wrapper {
    padding-bottom: 80px;
    flex: 1;
}

.tool-category {
    margin-bottom: 60px;
}

.category-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 12px;
}

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

.tool-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 24px;
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

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

.icon-box {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 16px;
}

/* Specific Category Colors */
.pdf-color { color: var(--color-pdf); background-color: rgba(239, 68, 68, 0.1); }
.img-color { color: var(--color-img); background-color: rgba(139, 92, 246, 0.1); }
.vid-color { color: var(--color-vid); background-color: rgba(6, 182, 212, 0.1); }
.txt-color { color: var(--color-txt); background-color: rgba(245, 158, 11, 0.1); }
.util-color { color: var(--color-util); background-color: rgba(16, 185, 129, 0.1); }

/* File Info Icons in Tool Workspace (Solid) */
.file-icon.pdf-color { background-color: var(--color-pdf); color: white; }
.file-icon.img-color { background-color: var(--color-img); color: white; }
.file-icon.vid-color { background-color: var(--color-vid); color: white; }

.tool-name {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-main);
}

.tool-desc {
    font-size: 0.875rem;
    color: var(--text-muted);
    line-height: 1.5;
}

.no-results {
    text-align: center;
    padding: 60px;
    color: var(--text-muted);
}
.no-results i { font-size: 3rem; margin-bottom: 16px; opacity: 0.5; }

/* =========================================
   5. TOOL WORKSPACE (Specific Tools)
   ========================================= */
.tool-workspace {
    padding: 40px 0;
    flex: 1;
}

.tool-box {
    background-color: var(--bg-card);
    border-radius: 16px;
    box-shadow: var(--shadow-md);
    padding: 40px;
    max-width: 800px;
    margin: 0 auto;
    border: 1px solid var(--border-color);
}

.tool-header {
    text-align: center;
    margin-bottom: 40px;
}

.icon-circle {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    margin: 0 auto 16px;
}

.tool-header h1 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.tool-header p {
    color: var(--text-muted);
}

/* Upload Area */
.upload-area {
    margin-bottom: 30px;
}

.drop-zone {
    border: 2px dashed var(--border-color);
    border-radius: 16px;
    padding: 40px 20px;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.2s, background-color 0.2s;
}

.drop-zone:hover, .drop-zone.drag-over {
    border-color: var(--primary-color);
    background-color: rgba(79, 70, 229, 0.03);
}

.drop-icon {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 16px;
}

.drop-text {
    font-size: 1.1rem;
    font-weight: 500;
    margin-bottom: 8px;
}

.drop-subtext {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 24px;
}

/* Preview Area */
.preview-area {
    text-align: center;
}

.file-info-card {
    display: flex;
    align-items: center;
    background-color: var(--bg-body);
    padding: 16px;
    border-radius: 12px;
    margin-bottom: 24px;
    text-align: left;
    border: 1px solid var(--border-color);
}

.file-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    margin-right: 16px;
    flex-shrink: 0;
}

.file-details {
    flex: 1;
    overflow: hidden;
}

.file-name {
    display: block;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.file-size {
    display: block;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.btn-icon-small {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-muted);
    font-size: 1rem;
    padding: 8px;
    border-radius: 50%;
    transition: 0.2s;
}

.btn-icon-small:hover {
    background-color: rgba(0,0,0,0.1);
    color: var(--danger);
}

/* Image Preview */
.image-preview-container {
    max-width: 100%;
    max-height: 400px;
    margin: 0 auto 20px;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    display: inline-block;
    position: relative;
}

.image-preview-container img {
    max-width: 100%;
    max-height: 400px;
    display: block;
}

.checkerboard-bg {
    background-image: linear-gradient(45deg, #e0e0e0 25%, transparent 25%), 
                      linear-gradient(-45deg, #e0e0e0 25%, transparent 25%), 
                      linear-gradient(45deg, transparent 75%, #e0e0e0 75%), 
                      linear-gradient(-45deg, transparent 75%, #e0e0e0 75%);
    background-size: 20px 20px;
    background-position: 0 0, 0 10px, 10px -10px, -10px 0px;
    background-color: #fff;
}

/* Tool Options */
.tool-options {
    background-color: var(--bg-body);
    padding: 24px;
    border-radius: 12px;
    margin-bottom: 24px;
    text-align: left;
}

.option-label {
    display: block;
    font-weight: 600;
    margin-bottom: 12px;
    font-size: 0.95rem;
}

.option-label-small {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-muted);
    margin-bottom: 6px;
}

/* Radio Cards (Grid) */
.radio-group, .format-grid {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.radio-group-vertical {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.radio-option, .radio-card {
    cursor: pointer;
    position: relative;
}

.radio-option input, .radio-card input {
    position: absolute;
    opacity: 0;
}

.radio-tile, .card-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background-color: var(--bg-card);
    border: 2px solid var(--border-color);
    border-radius: 8px;
    padding: 12px 20px;
    transition: 0.2s;
    min-width: 80px;
    text-align: center;
}

/* Horizontal flex for vertical lists styling */
.radio-group-vertical .radio-tile {
    flex-direction: row;
    justify-content: flex-start;
    padding: 16px;
    text-align: left;
}

.radio-icon {
    font-size: 1.5rem;
    margin-right: 16px;
    color: var(--text-light);
}

.radio-option input:checked + .radio-tile,
.radio-card input:checked + .card-content {
    border-color: var(--primary-color);
    background-color: rgba(79, 70, 229, 0.05);
    color: var(--primary-color);
}

.radio-option input:checked + .radio-tile .radio-icon {
    color: var(--primary-color);
}

.radio-title { font-weight: 600; display: block; }
.radio-desc { font-size: 0.8rem; color: var(--text-muted); margin-top: 4px; display: block; }

.format-ext { font-weight: 700; font-size: 1.1rem; }
.format-desc { font-size: 0.75rem; margin-top: 4px; }

/* Inputs & Forms */
.input-group {
    margin-bottom: 16px;
    width: 100%;
}

.form-input, .form-select {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background-color: var(--bg-card);
    color: var(--text-main);
    outline: none;
    transition: border-color 0.2s;
}

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

/* Range Sliders */
.styled-range {
    -webkit-appearance: none;
    width: 100%;
    height: 6px;
    border-radius: 5px;
    background: var(--border-color);
    outline: none;
}

.styled-range::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--primary-color);
    cursor: pointer;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.5);
}

.range-header, .range-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    margin-bottom: 8px;
    color: var(--text-muted);
}

/* Checkboxes */
.checkbox-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.checkbox-wrapper input {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.checkbox-wrapper label {
    cursor: pointer;
    font-size: 0.95rem;
}

/* Action Buttons */
.action-buttons {
    margin-top: 30px;
}

.btn-primary, .btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.2s;
    text-decoration: none;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
    padding: 12px 24px;
}

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

.btn-secondary {
    background-color: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-main);
    padding: 10px 20px;
}

.btn-secondary:hover {
    background-color: var(--bg-body);
    border-color: var(--text-light);
}

.btn-large {
    font-size: 1.1rem;
    padding: 14px 32px;
    width: 100%;
    max-width: 300px;
}

.btn-full {
    width: 100%;
}

/* Processing Area */
.processing-area {
    text-align: center;
    padding: 40px 0;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(79, 70, 229, 0.1);
    border-left-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

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

.progress-bar-container {
    width: 100%;
    max-width: 400px;
    height: 8px;
    background-color: var(--bg-body);
    border-radius: 4px;
    margin: 16px auto 0;
    overflow: hidden;
}

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

/* Result Area */
.result-area {
    text-align: center;
}

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

.result-area h2 {
    margin-bottom: 8px;
}

.download-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    margin-top: 30px;
}

/* =========================================
   6. INFO SECTION (SEO Text)
   ========================================= */
.info-section {
    background-color: var(--bg-body);
    padding: 60px 0;
    border-top: 1px solid var(--border-color);
}

.info-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
}

.info-block h3 {
    font-size: 1.25rem;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-main);
}

.info-block i {
    color: var(--primary-color);
}

.info-block p, .info-block li {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
}

.info-block ol {
    padding-left: 20px;
}

.info-block li {
    margin-bottom: 8px;
    list-style-type: decimal;
}

/* =========================================
   7. FOOTER
   ========================================= */
.site-footer {
    background-color: #1f2937; /* Always dark */
    color: #f9fafb;
    padding: 40px 0;
    margin-top: auto;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-brand span {
    font-weight: 700;
    font-size: 1.2rem;
}

.footer-brand p {
    font-size: 0.85rem;
    color: #9ca3af;
    margin-top: 4px;
}

.footer-links {
    display: flex;
    gap: 24px;
}

.footer-links a {
    color: #d1d5db;
    font-size: 0.9rem;
}

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

/* =========================================
   8. SPECIFIC TOOL STYLES
   ========================================= */

/* Resize Controls */
.resize-controls {
    display: flex;
    align-items: flex-end;
    gap: 10px;
}
.link-aspect-ratio { margin-bottom: 16px; }
.link-aspect-ratio button.active { color: var(--primary-color); background-color: rgba(79, 70, 229, 0.1); }

/* Stats Box */
.stats-box {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    background: var(--bg-body);
    padding: 16px;
    border-radius: 8px;
    margin: 20px auto;
    display: inline-flex;
}
.stat-item { display: flex; flex-direction: column; }
.stat-label { font-size: 0.75rem; color: var(--text-muted); font-weight: 600; text-transform: uppercase; }
.stat-value { font-size: 1.2rem; font-weight: 700; }
.text-green { color: var(--success); }
.text-blue { color: var(--color-vid); }

/* Cropper/Editor Controls */
.tool-controls-panel {
    background: var(--bg-body);
    padding: 16px;
    border-radius: 8px;
    margin-top: 16px;
}
.button-group { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.btn-option { padding: 6px 12px; border: 1px solid var(--border-color); background: var(--bg-card); border-radius: 4px; cursor: pointer; color: var(--text-main); transition: 0.2s; }
.btn-option.active, .btn-option:hover { background: var(--primary-color); color: white; border-color: var(--primary-color); }

.icon-actions { display: flex; gap: 8px; margin-top: 8px; }
.btn-icon-square { width: 36px; height: 36px; border: 1px solid var(--border-color); background: var(--bg-card); border-radius: 4px; color: var(--text-main); cursor: pointer; display: flex; align-items: center; justify-content: center; transition: 0.2s; }
.btn-icon-square:hover { background: #f9fafb; border-color: var(--text-light); }

/* PDF Merge List */
.file-list-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 12px;
    margin: 20px 0;
}
.file-item-card {
    background: var(--bg-body);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 12px;
    position: relative;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.file-item-card i { font-size: 2rem; color: var(--color-pdf); margin-bottom: 8px; }
.file-item-card .filename { font-size: 0.8rem; word-break: break-all; }
.file-item-card .remove-btn {
    position: absolute; top: 4px; right: 4px;
    background: transparent; border: none; color: var(--text-light);
    cursor: pointer; font-size: 1.1rem;
}
.file-item-card .remove-btn:hover { color: var(--danger); }

/* Text Editor Dual Pane */
.dual-pane-editor {
    display: flex;
    gap: 20px;
    margin-top: 20px;
    flex-direction: column;
}
@media (min-width: 768px) {
    .dual-pane-editor { flex-direction: row; }
}
.editor-pane { flex: 1; display: flex; flex-direction: column; }
.editor-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    padding: 0 4px;
}
.toolbar-label { font-weight: 600; font-size: 0.9rem; }
.text-editor-input {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-card);
    color: var(--text-main);
    resize: vertical;
    font-size: 0.95rem;
    line-height: 1.5;
}
.code-font { font-family: 'Courier New', Courier, monospace; font-size: 0.9rem; }
.medium-height { min-height: 250px; }
.large-height { min-height: 400px; }
.bg-light { background-color: var(--bg-body); }
.text-danger { color: var(--danger); }

/* File Size Converter */
.input-block-centered { text-align: center; margin: 20px 0; }
.combined-input-group { display: inline-flex; max-width: 400px; width: 100%; }
.combined-input-group input { border-top-right-radius: 0; border-bottom-right-radius: 0; text-align: right; }
.combined-input-group select { border-top-left-radius: 0; border-bottom-left-radius: 0; width: 150px; background-color: var(--bg-body); border-left: none; }
.large-text { font-size: 1.5rem; padding: 12px; height: auto; }

.results-display-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}
.result-card {
    background: var(--bg-body);
    padding: 12px;
    border-radius: 8px;
    border: 1px solid transparent;
}
.result-card.highlight {
    background: rgba(79, 70, 229, 0.05);
    border-color: var(--primary-color);
}
.unit-label { font-size: 0.75rem; color: var(--text-muted); }
.unit-value { font-size: 1.1rem; font-weight: 600; color: var(--text-main); overflow-wrap: break-word; }

/* Tabs */
.tab-navigation { margin-bottom: 20px; }
.tab-btn {
    padding: 10px 20px;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    color: var(--text-muted);
    font-weight: 600;
    cursor: pointer;
}
.tab-btn.active { color: var(--primary-color); border-bottom-color: var(--primary-color); }
.tab-btn i { margin-right: 6px; }

/* QR Code */
.qr-preview-box {
    width: 200px;
    height: 200px;
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    background: white; /* QR always white bg */
    border-radius: 8px;
    margin: 0 auto;
}
.qr-preview-box img { max-width: 100%; }

/* Video Player */
.video-preview-container {
    width: 100%;
    max-width: 600px;
    margin: 0 auto 20px;
    background: #000;
    border-radius: 8px;
    overflow: hidden;
}
#videoPlayer { width: 100%; display: block; }
.time-inputs-row { display: flex; align-items: flex-end; justify-content: center; gap: 10px; margin: 20px 0; }
.time-input-wrapper { position: relative; }
.btn-set-time {
    position: absolute; right: 0; top: 0; bottom: 0;
    width: 30px; background: transparent; border: none;
    border-left: 1px solid var(--border-color);
    color: var(--text-muted); cursor: pointer;
}
.btn-set-time:hover { color: var(--primary-color); }
.separator-dash { align-self: center; font-weight: bold; padding-bottom: 12px; }

/* Stats Dashboard (Word Count) */
.stats-dashboard {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}
.stat-card {
    background: var(--bg-body);
    padding: 16px;
    border-radius: 12px;
    text-align: center;
    border: 1px solid var(--border-color);
}
.stat-card.primary { background: var(--primary-color); color: white; border: none; }
.stat-card.primary .stat-label { color: rgba(255,255,255,0.8); }
.stat-number { display: block; font-size: 2rem; font-weight: 700; line-height: 1.2; }
.stat-label { font-size: 0.85rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; }


/* =========================================
   10. AD & MOBILE RESPONSIVENESS FIXES
   ========================================= */

/* --- Ad Styles --- */
.ad-container {
    padding: 20px 0;
    text-align: center;
    min-height: 90px;
}

.ad-sidebar {
    position: fixed;
    top: 120px;
    width: 160px;
    height: 600px;
    z-index: 99;
}

.ad-sidebar.left {
    left: 20px;
}

.ad-sidebar.right {
    right: 20px;
}


/* --- MOBILE & RESPONSIVE FIXES --- */

/* 1. For Desktops: Create space for the side ads */
/* This will only apply on very wide screens */
@media (min-width: 1600px) {
    body {
        /* Add padding on the sides to push content away from the ads */
        padding-left: 190px;  /* 160px for ad + 30px buffer */
        padding-right: 190px;
    }
}


/* 2. For Laptops & Tablets: Hide the side ads to prevent overlap */
/* This is the most important fix */
@media (max-width: 1599px) {
    .ad-sidebar {
        display: none;
    }
}


/* 3. For General Tablets & Phones: Reduce padding and font sizes */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2.25rem; /* Make hero title smaller */
    }
    .hero-subtitle {
        font-size: 1.1rem; /* Make hero subtitle smaller */
    }
    
    .container {
        padding: 0 15px; /* Reduce side padding */
    }

    .tool-box {
        padding: 30px 20px; /* Reduce tool box padding */
    }

    .footer-content {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }
    
    .stats-dashboard {
        grid-template-columns: repeat(2, 1fr);
    }
}


/* 4. For Small Phones: Make everything even more compact */
@media (max-width: 480px) {
    .hero-title {
        font-size: 1.8rem;
    }

    .tool-box {
        padding: 24px 15px; /* Further reduce padding */
    }
    
    .stat-number {
        font-size: 1.5rem; /* Make stat numbers smaller */
    }

    .tools-grid {
        grid-template-columns: 1fr;
    }
}
/* --- Add this at the bottom of style.css --- */

/* 5. Mobile-Only Ad Container */
/* By default, hide this container */
.ad-container-mobile {
    display: none;
}

/* On screens smaller than a laptop, show it */
@media (max-width: 1599px) {
    .ad-container-mobile {
        display: block; /* Show the ad container */
        padding: 20px 0;
        text-align: center;
        min-height: 90px;
    }
}
/* =========================================
   11. FOOTER SHARE BUTTONS
   ========================================= */

.footer-content {
    flex-wrap: wrap; /* Allow items to wrap on smaller screens */
}

.footer-share {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    margin: 20px 0; /* Add margin for spacing on mobile */
}

.share-label {
    font-size: 0.9rem;
    color: #9ca3af;
    font-weight: 500;
}

.share-buttons {
    display: flex;
    gap: 10px;
}

.share-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid #4b5563; /* Dark gray border */
    color: #d1d5db; /* Light gray icon */
    font-size: 1rem;
    text-decoration: none;
    cursor: pointer;
    background-color: transparent;
    transition: all 0.2s ease;
}

/* Hover Effects */
.share-btn.facebook:hover {
    background-color: #1877F2;
    color: white;
    border-color: #1877F2;
}

.share-btn.whatsapp:hover {
    background-color: #25D366;
    color: white;
    border-color: #25D366;
}

.share-btn.telegram:hover {
    background-color: #2AABEE;
    color: white;
    border-color: #2AABEE;
}

.share-btn.copy-link:hover {
    background-color: #6b7280;
    color: white;
    border-color: #6b7280;
}

/* Make sure Font Awesome solid and brands are loaded for these icons */
/* PDF Merge Drag Handle */
.file-item-card .drag-handle {
    position: absolute;
    top: 50%;
    left: 8px;
    transform: translateY(-50%);
    color: var(--text-light);
    cursor: grab;
    opacity: 0.5;
}
.file-item-card:hover .drag-handle {
    opacity: 1;
}