:root {
    --primary: #6366f1;
    --primary-light: #818cf8;
    --primary-dark: #4f46e5;
    --secondary: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --bg-main: #f9fafb;
    --bg-card: #ffffff;
    --bg-hover: #f3f4f6;
    --text-primary: #111827;
    --text-secondary: #6b7280;
    --text-muted: #9ca3af;
    --border-color: #e5e7eb;
    --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);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--bg-main);
    color: var(--text-primary);
    line-height: 1.5;
    min-height: 100vh;
    position: relative;
}
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(circle at 25% 25%, rgba(99, 102, 241, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 75% 75%, rgba(16, 185, 129, 0.05) 0%, transparent 50%);
    z-index: -1;
}
.container { max-width: 1400px; margin: 0 auto; padding: 20px; }
.header { background: var(--bg-card); border-radius: 16px; padding: 24px 32px; margin-bottom: 24px; box-shadow: var(--shadow-sm); border: 1px solid var(--border-color); animation: slideDown 0.5s ease-out; display: flex; justify-content: space-between; align-items: center; }
@keyframes slideDown { from { opacity: 0; transform: translateY(-20px); } to { opacity: 1; transform: translateY(0); } }
.header h1 { font-size: 2rem; font-weight: 700; color: var(--text-primary); background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.header-actions { display: flex; gap: 16px; }
.header-actions a { color: var(--text-secondary); text-decoration: none; padding: 8px 16px; border-radius: 8px; transition: all 0.2s ease; font-weight: 500; }
.header-actions a:hover { background: var(--bg-hover); color: var(--primary); }
.tabs { display: flex; gap: 4px; margin-bottom: 24px; background: var(--bg-card); padding: 4px; border-radius: 12px; box-shadow: var(--shadow-sm); animation: slideUp 0.6s ease-out; }
@keyframes slideUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
.tab { flex: 1; padding: 12px 20px; background: transparent; border: none; border-radius: 8px; font-size: 15px; font-weight: 600; color: var(--text-secondary); cursor: pointer; transition: all 0.2s ease; position: relative; }
.tab:hover:not(.active) { color: var(--text-primary); background: var(--bg-hover); }
.tab.active { background: var(--primary); color: white; box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1); }
.content { background: var(--bg-card); border-radius: 16px; padding: 32px; box-shadow: var(--shadow-md); min-height: 600px; animation: fadeIn 0.8s ease-out; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.section { display: none; animation: sectionFadeIn 0.3s ease-out; }
.section.active { display: block; }
@keyframes sectionFadeIn { from { opacity: 0; transform: translateX(10px); } to { opacity: 1; transform: translateX(0); } }
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 20px; margin-bottom: 32px; }
.stat-card { background: linear-gradient(135deg, var(--bg-card) 0%, rgba(99, 102, 241, 0.05) 100%); border-radius: 12px; padding: 24px; text-align: center; border: 1px solid var(--border-color); transition: all 0.3s ease; }
.stat-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: var(--primary-light); }
.stat-value { font-size: 2.5rem; font-weight: 700; color: var(--primary); line-height: 1; margin-bottom: 8px; }
.stat-label { color: var(--text-secondary); font-size: 0.875rem; font-weight: 500; }
table { width: 100%; border-collapse: separate; border-spacing: 0; }
thead { background: var(--bg-hover); }
th { padding: 12px 16px; text-align: left; font-weight: 600; color: var(--text-secondary); font-size: 0.875rem; border-bottom: 2px solid var(--border-color); }
td { padding: 16px; border-bottom: 1px solid var(--border-color); }
tbody tr { background: var(--bg-card); transition: all 0.2s ease; }
tbody tr:hover { background: var(--bg-hover); }
tbody tr:last-child td { border-bottom: none; }
.btn { padding: 8px 16px; border: none; border-radius: 8px; font-size: 14px; font-weight: 600; cursor: pointer; transition: all 0.2s ease; display: inline-flex; align-items: center; justify-content: center; gap: 4px; position: relative; overflow: hidden; }
.btn::before { content: ''; position: absolute; top: 0; left: -100%; width: 100%; height: 100%; background: rgba(255, 255, 255, 0.2); transition: left 0.3s ease; }
.btn:hover::before { left: 100%; }
.btn-primary { background: var(--primary); color: white; }
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3); }
.btn-success { background: var(--secondary); color: white; }
.btn-success:hover { background: #059669; transform: translateY(-1px); box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3); }
.btn-danger { background: var(--danger); color: white; }
.btn-danger:hover { background: #dc2626; transform: translateY(-1px); box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3); }
.btn-secondary { background: var(--bg-hover); color: var(--text-primary); border: 1px solid var(--border-color); }
.btn-secondary:hover { background: var(--border-color); }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; }
.btn-small { padding: 6px 12px; font-size: 13px; }
.status-badge { padding: 4px 12px; border-radius: 12px; font-size: 12px; font-weight: 600; display: inline-block; }
.status-active { background: rgba(16, 185, 129, 0.1); color: var(--secondary); }
.status-failed { background: rgba(239, 68, 68, 0.1); color: var(--danger); }
.form-group { margin-bottom: 20px; }
.form-label { display: block; margin-bottom: 8px; font-weight: 600; color: var(--text-primary); font-size: 0.875rem; }
.form-control { width: 100%; padding: 10px 12px; background: var(--bg-card); border: 2px solid var(--border-color); border-radius: 8px; color: var(--text-primary); font-size: 15px; transition: all 0.2s ease; }
.form-control:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1); }
.modal { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0, 0, 0, 0.5); backdrop-filter: blur(4px); z-index: 1000; }
.modal.active { display: flex; align-items: center; justify-content: center; animation: modalFadeIn 0.2s ease; }
@keyframes modalFadeIn { from { opacity: 0; } to { opacity: 1; } }
.modal-content { background: var(--bg-card); border-radius: 16px; padding: 32px; max-width: 500px; width: 90%; box-shadow: var(--shadow-xl); animation: modalSlideIn 0.3s ease; }
@keyframes modalSlideIn { from { transform: scale(0.95); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.modal-header { margin-bottom: 24px; }
.modal-title { font-size: 1.5rem; font-weight: 700; color: var(--text-primary); }
.modal-footer { margin-top: 24px; display: flex; justify-content: flex-end; gap: 12px; }
.image-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; }
.image-item { background: var(--bg-card); border-radius: 12px; overflow: hidden; cursor: pointer; transition: all 0.3s ease; border: 1px solid var(--border-color); }
.image-item:hover { transform: scale(1.02); box-shadow: var(--shadow-lg); border-color: var(--primary-light); }
.image-item img { width: 100%; height: 150px; object-fit: cover; }
.image-item-info { padding: 12px; font-size: 14px; color: var(--text-secondary); }
#batchActionBar { background: linear-gradient(135deg, var(--bg-hover) 0%, rgba(99, 102, 241, 0.05) 100%); border-radius: 12px; padding: 16px 20px; display: flex; flex-wrap: wrap; align-items: center; gap: 16px; border: 1px solid var(--border-color); }
#batchActionBar strong { color: var(--primary); font-size: 1.1rem; }
#imageSearchInput { background: var(--bg-card); border: 2px solid var(--border-color); border-radius: 8px; padding: 10px 16px; color: var(--text-primary); width: 300px; transition: all 0.2s ease; }
#imageSearchInput:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1); }
input[type="checkbox"] { width: 20px; height: 20px; cursor: pointer; position: relative; -webkit-appearance: none; appearance: none; background: var(--bg-card); border: 2px solid var(--border-color); border-radius: 4px; transition: all 0.2s ease; }
input[type="checkbox"]:checked { background: var(--primary); border-color: var(--primary); }
input[type="checkbox"]:checked::after { content: ''; position: absolute; top: 2px; left: 6px; width: 6px; height: 10px; border: solid white; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.pagination-controls { display: flex; justify-content: space-between; align-items: center; margin-top: 24px; flex-wrap: wrap; gap: 20px;}
.pagination-pages { display: flex; justify-content: center; align-items: center; gap: 8px; flex-wrap: wrap; }
.pagination-jump { display: flex; align-items: center; gap: 8px; }
.pagination-info { font-size: 14px; color: var(--text-secondary); font-weight: 500; }
.pagination-pages button { min-width: 40px; height: 40px; border-radius: 8px; font-weight: 600; }
.pagination-ellipsis { display: inline-flex; align-items: center; justify-content: center; min-width: 40px; height: 40px; color: var(--text-secondary); }
.js-loading .content { opacity: 0.5; pointer-events: none; }
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--bg-hover); border-radius: 5px; }
::-webkit-scrollbar-thumb { background: var(--border-color); border-radius: 5px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }
.random-icon { display: inline-block; width: 16px; height: 16px; margin-left: 8px; vertical-align: middle; color: var(--primary); }
@media (max-width: 768px) {
    .header { flex-direction: column; text-align: center; padding: 20px; }
    .header-actions { margin-top: 16px; justify-content: center; }
    .tabs { flex-direction: column; }
    .stats-grid { grid-template-columns: 1fr; }
    .content { padding: 20px; }
    .pagination-controls { justify-content: center; }
}