/* Batch Image Resizer - Installer Styles */

:root {
    --primary: #7c3aed;
    --primary-dark: #6d28d9;
    --primary-light: #a78bfa;
    --success: #10b981;
    --success-light: #d1fae5;
    --error: #ef4444;
    --error-light: #fee2e2;
    --warning: #f59e0b;
    --warning-light: #fef3c7;
    --bg-dark: #0f172a;
    --bg-card: #1e293b;
    --bg-input: #334155;
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --border: #334155;
    --radius: 12px;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
}

* {
    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-dark);
    color: var(--text-primary);
    min-height: 100vh;
    line-height: 1.6;
}

.installer-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

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

.logo-text {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
}

.version {
    color: var(--text-muted);
    font-size: 0.875rem;
    font-family: monospace;
}

/* Main Layout */
.installer-main {
    flex: 1;
    display: flex;
}

.installer-sidebar {
    width: 280px;
    background: var(--bg-card);
    border-right: 1px solid var(--border);
    padding: 2rem 0;
}

.step-nav {
    display: flex;
    flex-direction: column;
}

.step-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.5rem;
    color: var(--text-secondary);
    transition: all 0.2s;
    position: relative;
}

.step-item:not(:last-child)::after {
    content: '';
    position: absolute;
    left: 2.25rem;
    bottom: -0.5rem;
    width: 2px;
    height: 1rem;
    background: var(--border);
}

.step-item.active {
    color: var(--text-primary);
    background: rgba(124, 58, 237, 0.1);
}

.step-item.completed {
    color: var(--success);
}

.step-item.completed .step-number {
    background: var(--success);
    color: white;
}

.step-number {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--bg-input);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    font-weight: 600;
    flex-shrink: 0;
}

.step-item.active .step-number {
    background: var(--primary);
    color: white;
}

.step-label {
    font-size: 0.9375rem;
    font-weight: 500;
}

/* Content Area */
.installer-content {
    flex: 1;
    padding: 2.5rem;
    overflow-y: auto;
}

/* Cards */
.card {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 2rem;
    margin-bottom: 1.5rem;
    border: 1px solid var(--border);
}

.card-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.card-subtitle {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

/* Forms */
.form-group {
    margin-bottom: 1.5rem;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

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

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="url"],
select {
    width: 100%;
    padding: 0.75rem 1rem;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 0.9375rem;
    transition: all 0.2s;
}

input:focus,
select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.2);
}

input::placeholder {
    color: var(--text-muted);
}

.input-hint {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.5rem;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-size: 0.9375rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
    text-decoration: none;
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.0625rem;
}

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

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

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

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

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

/* Requirements List */
.requirements-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.requirement-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    background: var(--bg-input);
    border-radius: 8px;
    border-left: 4px solid var(--border);
}

.requirement-item.passed {
    border-left-color: var(--success);
    background: rgba(16, 185, 129, 0.1);
}

.requirement-item.failed {
    border-left-color: var(--error);
    background: rgba(239, 68, 68, 0.1);
}

.requirement-item.warning {
    border-left-color: var(--warning);
    background: rgba(245, 158, 11, 0.1);
}

.requirement-name {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 500;
}

.requirement-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 4.25rem;
    padding: 0.125rem 0.5rem;
    border-radius: 999px;
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.requirement-status-passed {
    background: rgba(16, 185, 129, 0.16);
    color: #86efac;
}

.requirement-status-failed {
    background: rgba(239, 68, 68, 0.16);
    color: #fca5a5;
}

.requirement-value {
    font-family: monospace;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

/* Alerts */
.alert {
    padding: 1rem 1.25rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
}

.alert-error {
    background: var(--error-light);
    border: 1px solid var(--error);
    color: #991b1b;
}

.alert-success {
    background: var(--success-light);
    border: 1px solid var(--success);
    color: #065f46;
}

/* Loading States */
.loading {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Progress Bar */
.progress-container {
    margin: 2rem 0;
}

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

.progress-fill {
    width: 0;
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--primary-light));
    border-radius: 4px;
    transition: width 0.5s ease;
}

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

.install-error {
    margin: 1rem 0;
    padding: 1rem;
    border-radius: 8px;
    background: rgba(239, 68, 68, 0.12);
    border: 1px solid rgba(239, 68, 68, 0.45);
    color: #fecaca;
    font-size: 0.875rem;
    line-height: 1.5;
    white-space: pre-wrap;
}

/* Footer */
.installer-footer {
    background: var(--bg-card);
    border-top: 1px solid var(--border);
    padding: 1rem 2rem;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.875rem;
}

/* Navigation Buttons */
.nav-buttons {
    display: flex;
    justify-content: space-between;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
}

.nav-buttons-centered {
    justify-content: center;
    border-top: 0;
    padding-top: 0;
}

/* Welcome Page Specific */
.welcome-content {
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}

.welcome-icon {
    width: 80px;
    height: 80px;
    color: var(--primary);
    margin-bottom: 1.5rem;
}

.welcome-content h1 {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 1rem;
}

.welcome-content p {
    color: var(--text-secondary);
    margin-bottom: 2rem;
    font-size: 1.125rem;
    line-height: 1.7;
}

.feature-list {
    text-align: left;
    background: var(--bg-input);
    border-radius: var(--radius);
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.feature-list li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0;
    color: var(--text-secondary);
}

.feature-list .check {
    position: relative;
    width: 1rem;
    height: 1rem;
    border: 1px solid rgba(16, 185, 129, 0.65);
    border-radius: 999px;
    background: rgba(16, 185, 129, 0.12);
    flex-shrink: 0;
}

.feature-list .check::after {
    content: '';
    position: absolute;
    left: 0.27rem;
    top: 0.3rem;
    width: 0.42rem;
    height: 0.22rem;
    border-left: 2px solid var(--success);
    border-bottom: 2px solid var(--success);
    transform: rotate(-45deg);
}

/* Database Test Result */
.test-result {
    margin-top: 1rem;
    padding: 1rem;
    border-radius: 8px;
    display: none;
}

.test-result.show {
    display: block;
}

.test-result.success {
    background: var(--success-light);
    border: 1px solid var(--success);
}

.test-result.error {
    background: var(--error-light);
    border: 1px solid var(--error);
}

/* Success Page */
.success-page {
    text-align: center;
    padding: 3rem;
}

.success-icon {
    width: 100px;
    height: 100px;
    color: var(--success);
    margin-bottom: 1.5rem;
}

.success-title {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 1rem;
}

.success-message {
    color: var(--text-secondary);
    font-size: 1.125rem;
    margin-bottom: 2rem;
}

.warning-box {
    background: var(--warning-light);
    border: 1px solid var(--warning);
    border-radius: 8px;
    padding: 1.25rem;
    margin: 1.5rem 0;
    text-align: left;
}

.warning-box h4 {
    color: #92400e;
    margin-bottom: 0.5rem;
}

.warning-box p {
    color: #a16207;
    font-size: 0.9375rem;
}

.warning-box code {
    background: rgba(245, 158, 11, 0.2);
    padding: 0.125rem 0.375rem;
    border-radius: 4px;
    font-family: monospace;
}

.security-command {
    margin-top: 0.5rem;
}

.success-actions {
    margin-top: 2rem;
}

.success-note {
    margin-top: 1rem;
    color: var(--text-muted);
    font-size: 0.875rem;
}

/* Responsive */
@media (max-width: 768px) {
    .installer-sidebar {
        display: none;
    }
    
    .installer-content {
        padding: 1.5rem;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .nav-buttons {
        flex-direction: column;
        gap: 1rem;
    }
    
    .nav-buttons .btn {
        width: 100%;
    }
}

/* Hidden utility */
.hidden {
    display: none !important;
}
