/* Bulk Image Renamer - Light Theme */
:root {
    --bg: #f8f9fa;
    --bg-white: #ffffff;
    --text: #1a1a1a;
    --text-secondary: #555;
    --text-muted: #888;
    --primary: #2563eb;
    --primary-hover: #1d4ed8;
    --primary-light: rgba(99, 102, 241, 0.1);
    --success: #22c55e;
    --danger: #ef4444;
    --border: #e5e5e5;
    --radius: 8px;
    --radius-lg: 12px;
    --shadow: 0 2px 8px rgba(0,0,0,0.06);
    --shadow-lg: 0 8px 30px rgba(0,0,0,0.1);
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    line-height: 1.5;
}

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

/* Header */
.header { background: var(--bg-white); border-bottom: 1px solid var(--border); padding: 14px 20px; position: sticky; top: 0; z-index: 100; }
.header__inner { display: flex; align-items: center; justify-content: space-between; max-width: 1200px; margin: 0 auto; }
.back-btn { display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; background: #f5f5f5; border-radius: 10px; color: #333; margin-right: 12px; transition: all 0.2s; text-decoration: none; }
.back-btn:hover { background: var(--primary); color: white; }
.back-btn svg { width: 20px; height: 20px; }
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); font-size: 20px; font-weight: 700; }
.logo__icon { width: 28px; height: 28px; color: var(--primary); }
.nav { display: flex; gap: 8px; }
.nav__link { padding: 8px 16px; font-size: 14px; font-weight: 500; color: var(--text-secondary); text-decoration: none; border-radius: 8px; transition: all 0.2s; }
.nav__link:hover { background: var(--primary-light); color: var(--primary); }
.nav__link--active { background: var(--primary); color: white; }

/* Main */
.main { padding: 40px 0; min-height: calc(100vh - 140px); }

/* Hero */
.hero { text-align: center; margin-bottom: 40px; }
.hero__title { font-size: 32px; font-weight: 700; margin-bottom: 8px; }
.hero__desc { font-size: 16px; color: var(--text-secondary); }

/* Upload Section */
.upload-section { max-width: 600px; margin: 0 auto; }

.dropzone {
    background: var(--bg-white);
    border: 2px dashed var(--border);
    border-radius: var(--radius-lg);
    padding: 60px 40px;
    text-align: center;
    transition: all 0.3s;
}

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

.dropzone__icon { margin-bottom: 24px; }
.dropzone__icon svg { width: 80px; height: 80px; color: var(--primary); opacity: 0.6; }

.upload-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 28px;
    font-size: 16px;
    font-weight: 600;
    color: white;
    background: var(--primary);
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.2s;
}

.upload-btn:hover { background: var(--primary-hover); transform: translateY(-2px); }
.upload-btn svg { width: 20px; height: 20px; }

.dropzone__hint { margin-top: 16px; font-size: 14px; color: var(--text-muted); }
.dropzone__formats { margin-top: 8px; font-size: 13px; color: var(--text-muted); opacity: 0.7; }

/* Editor Section */
.editor-section { margin-top: 40px; }

.editor-grid {
    display: grid;
    grid-template-columns: 340px 1fr;
    gap: 24px;
    align-items: start;
}

/* Settings Panel */
.settings-panel {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow);
    position: sticky;
    top: 100px;
}

.panel-title { font-size: 18px; font-weight: 700; margin-bottom: 20px; }

.setting-group { margin-bottom: 20px; }

.setting-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text);
}

.setting-sublabel {
    display: block;
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.setting-input, .setting-select {
    width: 100%;
    padding: 12px 14px;
    font-size: 14px;
    font-family: inherit;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg-white);
    transition: border-color 0.2s;
}

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

.setting-input--small { max-width: 100%; }

.setting-row { display: flex; gap: 12px; }
.setting-col { flex: 1; }

/* Case Options */
.case-options { display: flex; gap: 8px; }

.case-btn {
    flex: 1;
    padding: 10px 12px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    background: var(--bg);
    border: 2px solid var(--border);
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.2s;
}

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

/* Action Buttons */
.action-buttons { display: flex; flex-direction: column; gap: 10px; margin-top: 24px; }

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 20px;
    font-size: 15px;
    font-weight: 600;
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.2s;
    border: none;
}

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

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

.btn--primary:hover:not(:disabled) { background: var(--primary-hover); transform: translateY(-2px); }
.btn--primary:disabled { opacity: 0.5; cursor: not-allowed; }

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

.btn--secondary:hover { border-color: var(--danger); color: var(--danger); }

.btn--outline {
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
    margin-top: 16px;
}

.btn--outline:hover { background: var(--primary-light); }

/* Privacy Note */
.privacy-note {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 20px;
    padding: 12px;
    background: #e8f5e9;
    border-radius: var(--radius);
    font-size: 13px;
    color: #2e7d32;
}

.privacy-note svg { width: 16px; height: 16px; flex-shrink: 0; }

/* Preview Panel */
.preview-panel {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow);
}

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

.file-count {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-muted);
    background: var(--bg);
    padding: 6px 12px;
    border-radius: 20px;
}

.preview-table-wrapper {
    max-height: 500px;
    overflow-y: auto;
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.preview-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.preview-table th {
    background: var(--bg);
    padding: 12px 10px;
    text-align: left;
    font-weight: 600;
    font-size: 12px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: sticky;
    top: 0;
    z-index: 1;
}

.preview-table td {
    padding: 10px;
    border-top: 1px solid var(--border);
    vertical-align: middle;
}

.th-num { width: 40px; text-align: center; }
.th-thumb { width: 50px; }
.th-arrow { width: 30px; text-align: center; }

.preview-table td:first-child { text-align: center; color: var(--text-muted); }

.thumb-img {
    width: 40px;
    height: 40px;
    object-fit: cover;
    border-radius: 4px;
    background: var(--bg);
}

.original-name {
    color: var(--text-muted);
    word-break: break-all;
    font-size: 13px;
}

.arrow-icon { color: var(--primary); }
.arrow-icon svg { width: 16px; height: 16px; }

.new-name {
    font-weight: 600;
    color: var(--primary);
    word-break: break-all;
}

.duplicate-warning {
    display: inline-block;
    padding: 2px 6px;
    font-size: 10px;
    font-weight: 600;
    color: white;
    background: var(--danger);
    border-radius: 4px;
    margin-left: 6px;
}

/* Processing Modal */
.processing-modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.processing-modal.active { display: flex; }

.processing-content {
    background: var(--bg-white);
    padding: 40px 60px;
    border-radius: var(--radius-lg);
    text-align: center;
}

.spinner {
    width: 48px;
    height: 48px;
    border: 4px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

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

#processing-text { font-size: 16px; font-weight: 500; margin-bottom: 16px; }

.progress-bar {
    width: 200px;
    height: 6px;
    background: var(--border);
    border-radius: 3px;
    overflow: hidden;
    margin: 0 auto;
}

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

/* Footer */
.footer {
    text-align: center;
    padding: 24px;
    font-size: 14px;
    color: var(--text-muted);
    border-top: 1px solid var(--border);
}

/* Responsive */
@media (max-width: 900px) {
    .editor-grid {
        grid-template-columns: 1fr;
    }
    
    .settings-panel {
        position: static;
    }
    
    .nav { display: none; }
}

@media (max-width: 600px) {
    .hero__title { font-size: 24px; }
    .dropzone { padding: 40px 20px; }
    .settings-panel, .preview-panel { padding: 16px; }
    .setting-row { flex-direction: column; gap: 10px; }
    .case-options { flex-wrap: wrap; }
    .preview-table { font-size: 12px; }
    .thumb-img { width: 32px; height: 32px; }
}

