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

:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --success: #10b981;
    --danger: #ef4444;
    --bg: #0f172a;
    --panel: #1e293b;
    --text: #f1f5f9;
    --text-muted: #94a3b8;
    --border: #334155;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg);
    color: var(--text);
    height: 100vh;
    width: 100vw;
    overflow: hidden;
}

.app-container {
    display: flex;
    flex-direction: column;
    height: 100vh;
    width: 100vw;
}

.header {
    background: var(--panel);
    border-bottom: 1px solid var(--border);
    padding: 16px 24px;
    flex-shrink: 0;
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-icon {
    font-size: 32px;
}

.logo h1 {
    font-size: 24px;
    font-weight: 700;
}

.tagline {
    font-size: 12px;
    color: var(--text-muted);
}

.header-stats {
    display: flex;
    gap: 32px;
}

.stat {
    text-align: right;
}

.stat span:first-child {
    display: block;
    font-size: 20px;
    font-weight: 600;
    color: var(--primary);
}

.stat span:last-child {
    font-size: 11px;
    color: var(--text-muted);
}

.main-content {
    display: flex;
    flex: 1;
    overflow: hidden;
}

.sidebar {
    width: 320px;
    background: var(--panel);
    border-right: 1px solid var(--border);
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    overflow-y: auto;
}

.panel {
    background: #1a2332;
    border-radius: 12px;
    padding: 20px;
    border: 1px solid var(--border);
}

.panel h3 {
    font-size: 14px;
    margin-bottom: 16px;
    color: var(--text);
    font-weight: 600;
}

.drop-zone {
    border: 2px dashed var(--border);
    border-radius: 12px;
    padding: 32px 20px;
    text-align: center;
    transition: all 0.2s;
    cursor: pointer;
}

.drop-zone.dragover {
    border-color: var(--primary);
    background: rgba(99, 102, 241, 0.05);
}

.drop-icon {
    font-size: 40px;
    margin-bottom: 12px;
}

.drop-zone p {
    font-size: 14px;
    margin-bottom: 4px;
}

.drop-sub {
    color: var(--text-muted);
    font-size: 12px;
}

.supported-formats {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 12px;
    text-align: center;
}

.setting {
    margin-bottom: 16px;
}

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

.setting input[type="range"],
.setting input[type="number"],
.setting select {
    width: 100%;
    padding: 8px 12px;
    background: #0f172a;
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    font-size: 14px;
}

.setting input[type="range"] {
    padding: 0;
    accent-color: var(--primary);
}

.btn {
    padding: 10px 18px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-primary { background: var(--primary); color: white; }
.btn-success { background: var(--success); color: white; }
.btn-danger { background: var(--danger); color: white; }
.btn-secondary { background: #475569; color: white; }

.btn:hover { filter: brightness(1.1); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.full-width {
    width: 100%;
    margin-bottom: 8px;
}

.images-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 20px;
    overflow: hidden;
}

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

.images-header h3 {
    font-size: 18px;
}

.images-grid {
    flex: 1;
    overflow-y: auto;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
    padding-bottom: 20px;
}

.empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}

.empty-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.image-card {
    background: var(--panel);
    border-radius: 12px;
    border: 1px solid var(--border);
    overflow: hidden;
}

.image-preview {
    height: 160px;
    background: #0f172a;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

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

.image-info {
    padding: 14px;
}

.image-name {
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 8px;
}

.size-comparison {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    margin-bottom: 10px;
}

.size-item {
    display: flex;
    flex-direction: column;
}

.size-label {
    color: var(--text-muted);
    font-size: 10px;
}

.size-value {
    font-weight: 600;
}

.size-value.compressed {
    color: var(--success);
}

.card-actions {
    display: flex;
    gap: 8px;
}

.card-actions button {
    flex: 1;
    padding: 7px;
    font-size: 12px;
}
