/* CSS Variables - Professional Theme */
:root {
    --color-primary-dark: #14532D;
    --color-primary: #1B4D3E;
    --color-primary-light: #40916C;
    --color-accent: #10b981;
    --color-accent-light: #34d399;
    --color-success: #10b981;
    --color-success-light: #34d399;
    --color-warning: #f59e0b;
    --color-danger: #ef4444;
    --color-text: #1f2937;
    --color-text-light: #6b7280;
    --color-bg: #f8fafc;
    --color-bg-white: #ffffff;
    --color-border: #e5e7eb;
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --shadow-sm: 0 1px 2px 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);
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Reset */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-family);
    background: var(--color-bg);
    color: var(--color-text);
    line-height: 1.6;
    min-height: 100vh;
}

/* Auth Modal */
.auth-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 1rem;
    animation: fadeIn 0.3s ease;
}

.auth-modal.hidden {
    display: none;
}

.auth-modal-content {
    background: var(--color-bg-white);
    border-radius: var(--radius-xl);
    width: 100%;
    max-width: 440px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-xl);
    animation: scaleIn 0.3s ease;
}

.auth-header {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-light) 100%);
    color: white;
    padding: 2.5rem 2rem;
    text-align: center;
}

.auth-header h1 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.auth-subtitle {
    opacity: 0.9;
    font-size: 1rem;
}

#loginRegisterView,
#resetPasswordView {
    padding: 2rem;
}

#loginRegisterView h2,
#resetPasswordView h2 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.auth-description {
    color: var(--color-text-light);
    margin-bottom: 1.5rem;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.auth-error {
    background: #fef2f2;
    color: #dc2626;
    padding: 0.75rem;
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    border: 1px solid #fecaca;
    animation: slideUp 0.3s ease;
}

.auth-success {
    background: #f0fdf4;
    color: #16a34a;
    padding: 0.75rem;
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    border: 1px solid #bbf7d0;
    animation: slideUp 0.3s ease;
}

.auth-switch {
    margin-top: 1.5rem;
    text-align: center;
    color: var(--color-text-light);
}

.auth-benefits {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--color-border);
}

.auth-benefits h3 {
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--color-text);
}

.auth-benefits ul {
    list-style: none;
    font-size: 0.875rem;
    color: var(--color-text-light);
}

.auth-benefits li {
    padding: 0.25rem 0;
    padding-left: 1.5rem;
    position: relative;
}

.auth-benefits li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--color-success);
    font-weight: bold;
}

.disclaimer-box {
    background: var(--color-bg);
    padding: 1rem;
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    border: 1px solid var(--color-border);
}

/* App Container */
.app-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header - Professional Gradient */
.app-header {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-light) 100%);
    color: white;
    padding: 1.25rem 2rem;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-md);
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-left h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
}

.logo-link {
    text-decoration: none;
}

.tagline {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.85);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* User Menu */
.user-menu {
    position: relative;
}

.user-menu.hidden {
    display: none;
}

.user-menu-trigger {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s;
}

.user-menu-trigger:hover {
    background: rgba(255, 255, 255, 0.25);
}

.user-initial {
    width: 2rem;
    height: 2rem;
    background: white;
    color: var(--color-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}

.chevron {
    width: 1rem;
    height: 1rem;
    color: rgba(255, 255, 255, 0.85);
}

.user-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 0.5rem;
    background: var(--color-bg-white);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    min-width: 200px;
    z-index: 200;
    animation: slideUp 0.2s ease;
}

.user-dropdown.hidden {
    display: none;
}

.dropdown-header {
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    color: var(--color-text-light);
    border-bottom: 1px solid var(--color-border);
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.75rem 1rem;
    border: none;
    background: none;
    text-align: left;
    cursor: pointer;
    color: var(--color-text);
    transition: background 0.2s;
}

.dropdown-item:hover {
    background: var(--color-bg);
}

.dropdown-item svg {
    width: 1rem;
    height: 1rem;
}

/* Main Content */
.main-content {
    flex: 1;
    max-width: 1000px;
    margin: 0 auto;
    padding: 2rem;
    width: 100%;
    animation: slideUp 0.5s ease;
}

/* Step Indicator */
.step-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 2rem;
    padding: 1rem;
    background: var(--color-bg-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.step-number {
    width: 2.5rem;
    height: 2.5rem;
    background: var(--color-bg);
    border: 2px solid var(--color-border);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    color: var(--color-text-light);
    transition: all 0.3s;
}

.step.active .step-number,
.step.completed .step-number {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-light) 100%);
    border-color: var(--color-primary);
    color: white;
}

.step-label {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--color-text-light);
}

.step.active .step-label {
    color: var(--color-primary);
    font-weight: 600;
}

.step-line {
    width: 60px;
    height: 2px;
    background: var(--color-border);
    margin: 0 0.5rem;
    margin-bottom: 1.5rem;
}

/* Cards */
.card {
    background: var(--color-bg-white);
    border-radius: var(--radius-lg);
    padding: 1.75rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--color-border);
    transition: box-shadow 0.2s;
}

.card:hover {
    box-shadow: var(--shadow-lg);
}

.card h2 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--color-text);
}

.section-description {
    color: var(--color-text-light);
    font-size: 0.875rem;
    margin-bottom: 1.5rem;
}

/* Step Content */
.step-content {
    display: none;
}

.step-content.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

/* Form Elements */
.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--color-text);
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
select {
    padding: 0.75rem 1rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.2s;
    background: var(--color-bg-white);
}

input:focus,
select:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(27, 77, 62, 0.15);
}

input[type="range"] {
    width: 100%;
    cursor: pointer;
    accent-color: var(--color-primary);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
    font-family: inherit;
}

.btn svg {
    width: 1.25rem;
    height: 1.25rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-light) 100%);
    color: white;
    box-shadow: 0 2px 4px rgba(27, 77, 62, 0.2);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(27, 77, 62, 0.3);
}

.btn-success {
    background: linear-gradient(135deg, var(--color-success) 0%, var(--color-accent-light) 100%);
    color: white;
    box-shadow: 0 2px 4px rgba(16, 185, 129, 0.2);
}

.btn-success:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(16, 185, 129, 0.3);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--color-border);
    color: var(--color-text);
}

.btn-outline:hover {
    background: var(--color-bg);
    border-color: var(--color-primary);
    color: var(--color-primary);
}

.btn-full {
    width: 100%;
}

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

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.btn-link {
    background: none;
    border: none;
    color: var(--color-primary);
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 500;
}

.btn-link:hover {
    text-decoration: underline;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

.btn-close {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    color: var(--color-text-light);
    transition: color 0.2s;
}

.btn-close:hover {
    color: var(--color-text);
}

/* Help Button */
.btn-help {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    border-radius: var(--radius-md);
    transition: all 0.2s;
}

.btn-help:hover {
    background: rgba(255, 255, 255, 0.25);
}

/* Drop Zone */
.drop-zone {
    border: 2px dashed var(--color-border);
    border-radius: var(--radius-lg);
    padding: 3rem 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    background: var(--color-bg);
}

.drop-zone:hover,
.drop-zone.dragover {
    border-color: var(--color-primary);
    background: rgba(27, 77, 62, 0.05);
}

.drop-zone svg {
    color: var(--color-primary-light);
    margin-bottom: 1rem;
}

.drop-zone p {
    color: var(--color-text-light);
    margin-bottom: 0.5rem;
}

.browse-link {
    color: var(--color-primary);
    font-weight: 500;
    cursor: pointer;
}

.supported-formats {
    font-size: 0.75rem;
    color: var(--color-text-light);
    margin-top: 0.5rem;
}

/* File List */
.file-list {
    margin-top: 1.5rem;
    animation: slideUp 0.3s ease;
}

.file-list h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.file-list-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem;
    background: var(--color-bg);
    border-radius: var(--radius-md);
    margin-bottom: 0.5rem;
}

.file-list-item img {
    width: 48px;
    height: 48px;
    object-fit: cover;
    border-radius: var(--radius-sm);
}

.file-info {
    flex: 1;
}

.file-name {
    font-weight: 500;
    font-size: 0.875rem;
}

.file-meta {
    font-size: 0.75rem;
    color: var(--color-text-light);
}

.file-remove {
    background: none;
    border: none;
    color: var(--color-danger);
    cursor: pointer;
    padding: 0.5rem;
}

#addMoreBtn {
    margin-top: 1rem;
}

/* Format Showcase */
.format-showcase {
    margin-top: 2rem;
    padding: 1.5rem;
    background: var(--color-bg-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.format-showcase h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    text-align: center;
}

.format-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
}

.format-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1rem;
    background: var(--color-bg);
    border-radius: var(--radius-md);
    text-align: center;
}

.format-from,
.format-to {
    font-weight: 600;
    color: var(--color-primary);
}

.format-arrow {
    color: var(--color-text-light);
    margin: 0.25rem 0;
}

.format-desc {
    font-size: 0.75rem;
    color: var(--color-text-light);
    margin-top: 0.25rem;
}

/* Edit Tools */
.edit-tools {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}

.tool-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 1.5rem;
    background: var(--color-bg);
    border: 2px solid var(--color-border);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s;
    color: var(--color-text);
}

.tool-btn:hover {
    border-color: var(--color-primary-light);
    background: rgba(27, 77, 62, 0.05);
}

.tool-btn.active {
    border-color: var(--color-primary);
    background: rgba(27, 77, 62, 0.1);
    color: var(--color-primary);
}

.tool-btn svg {
    width: 24px;
    height: 24px;
}

.tool-btn span {
    font-size: 0.75rem;
    font-weight: 500;
}

/* Tool Panels */
.tool-panel {
    padding: 1.5rem;
    background: var(--color-bg);
    border-radius: var(--radius-md);
    margin-bottom: 1.5rem;
    animation: slideUp 0.3s ease;
}

.tool-panel h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.tool-panel p {
    font-size: 0.875rem;
    color: var(--color-text-light);
    margin-bottom: 1rem;
}

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

.tool-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.tolerance-control,
.custom-rotation {
    margin-bottom: 1rem;
}

.tolerance-control label,
.custom-rotation label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

/* Crop Presets */
.crop-presets,
.resize-presets {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.preset-btn {
    padding: 0.5rem 1rem;
    background: var(--color-bg-white);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    cursor: pointer;
    font-size: 0.875rem;
    transition: all 0.2s;
}

.preset-btn:hover {
    border-color: var(--color-primary);
}

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

/* Rotate Buttons */
.rotate-buttons {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.rotate-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    padding: 0.75rem 1rem;
    background: var(--color-bg-white);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s;
}

.rotate-btn:hover {
    border-color: var(--color-primary);
    background: rgba(27, 77, 62, 0.05);
}

.rotate-btn span {
    font-size: 0.75rem;
}

/* Resize Inputs */
.resize-inputs {
    display: flex;
    align-items: flex-end;
    gap: 1rem;
    margin-bottom: 1rem;
}

.resize-inputs .form-group {
    flex: 1;
}

.aspect-lock {
    padding: 0.75rem;
    background: var(--color-bg-white);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    cursor: pointer;
    color: var(--color-text-light);
    transition: all 0.2s;
}

.aspect-lock:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
}

.aspect-lock.active {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: white;
}

/* Canvas Container */
.canvas-container {
    position: relative;
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 300px;
    max-height: 500px;
    overflow: hidden;
}

#editCanvas {
    max-width: 100%;
    max-height: 480px;
    cursor: crosshair;
}

.crop-overlay {
    position: absolute;
    border: 2px dashed var(--color-primary);
    background: rgba(27, 77, 62, 0.1);
    pointer-events: none;
}

/* Image Navigation */
.image-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-top: 1rem;
}

#imageCounter {
    font-size: 0.875rem;
    color: var(--color-text-light);
}

/* Format Options */
.format-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.format-tab {
    padding: 0.5rem 1rem;
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s;
}

.format-tab:hover {
    border-color: var(--color-primary-light);
}

.format-tab.active {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-light) 100%);
    border-color: var(--color-primary);
    color: white;
}

.format-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.format-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1.25rem;
    background: var(--color-bg);
    border: 2px solid var(--color-border);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s;
}

.format-option:hover {
    border-color: var(--color-primary-light);
    transform: translateY(-2px);
}

.format-option.selected {
    border-color: var(--color-primary);
    background: rgba(27, 77, 62, 0.1);
}

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

.format-info {
    font-size: 0.75rem;
    color: var(--color-text-light);
    margin-top: 0.25rem;
}

/* Quality Control */
.quality-control {
    padding: 1rem;
    background: var(--color-bg);
    border-radius: var(--radius-md);
}

.quality-control label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

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

/* ICO Size Control */
.ico-size-control {
    padding: 1rem;
    background: var(--color-bg);
    border-radius: var(--radius-md);
    margin-top: 1rem;
}

.ico-size-control label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 0.75rem;
}

.ico-sizes {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

/* Download List */
.download-list {
    margin-bottom: 1.5rem;
}

.download-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--color-bg);
    border-radius: var(--radius-md);
    margin-bottom: 0.75rem;
}

.download-item img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: var(--radius-sm);
    background: white;
}

.download-item-info {
    flex: 1;
}

.download-item-name {
    font-weight: 500;
}

.download-item-meta {
    font-size: 0.75rem;
    color: var(--color-text-light);
}

.download-item-btn {
    padding: 0.5rem 1rem;
}

/* Download Actions */
.download-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Step Navigation */
.step-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--color-border);
}

/* Footer */
.app-footer {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-light) 100%);
    color: white;
    padding: 2rem;
    text-align: center;
    margin-top: auto;
}

.footer-promo {
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.footer-promo a {
    color: white;
    text-decoration: none;
    font-weight: 500;
}

.footer-promo a:hover {
    text-decoration: underline;
}

.footer-badges {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.badge {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    padding: 0.35rem 0.85rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
    backdrop-filter: blur(4px);
}

.disclaimer {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 0.5rem;
}

.copyright {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.7);
}

/* Help Modal */
.help-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 1rem;
    animation: fadeIn 0.3s ease;
}

.help-modal.hidden {
    display: none;
}

.help-modal-content {
    background: var(--color-bg-white);
    border-radius: var(--radius-xl);
    width: 100%;
    max-width: 600px;
    max-height: 80vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-xl);
    animation: scaleIn 0.3s ease;
}

.help-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid var(--color-border);
    background: var(--color-bg);
}

.help-header h2 {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0;
    color: var(--color-text);
}

.help-tabs {
    display: flex;
    gap: 0.5rem;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--color-border);
    overflow-x: auto;
    background: var(--color-bg-white);
}

.help-tab {
    padding: 0.5rem 1rem;
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--color-text-light);
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s;
}

.help-tab:hover {
    background: var(--color-border);
}

.help-tab.active {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-light) 100%);
    border-color: var(--color-primary);
    color: white;
}

.help-content {
    padding: 1.5rem;
    overflow-y: auto;
    flex: 1;
}

.help-panel.hidden {
    display: none;
}

.help-panel h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--color-text);
}

.help-notice {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-light) 100%);
    color: white;
    padding: 1rem 1.25rem;
    border-radius: var(--radius-md);
    margin-bottom: 1.5rem;
    text-align: center;
}

.help-steps {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.help-steps li {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.step-num {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 1.75rem;
    height: 1.75rem;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-light) 100%);
    color: white;
    border-radius: 50%;
    font-size: 0.875rem;
    font-weight: 600;
    flex-shrink: 0;
}

.help-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.help-list li {
    padding-left: 1.5rem;
    position: relative;
}

.help-list li::before {
    content: "•";
    position: absolute;
    left: 0;
    color: var(--color-primary);
    font-weight: bold;
}

.help-tip {
    margin-top: 1.5rem;
    padding: 1rem;
    background: var(--color-bg);
    border-radius: var(--radius-md);
    border-left: 3px solid var(--color-primary);
}

/* Checkbox */
.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    cursor: pointer;
    font-size: 0.875rem;
}

.checkbox-label input {
    margin-top: 0.25rem;
    accent-color: var(--color-primary);
}

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

/* Responsive */
@media (max-width: 768px) {
    .app-header {
        padding: 1rem;
    }

    .header-content {
        flex-direction: column;
        gap: 0.75rem;
        text-align: center;
    }

    .header-right {
        width: 100%;
        justify-content: center;
    }

    .main-content {
        padding: 1rem;
    }

    .card {
        padding: 1.25rem;
    }

    .step-indicator {
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .step-line {
        display: none;
    }

    .edit-tools {
        justify-content: center;
    }

    .format-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .format-options {
        grid-template-columns: repeat(2, 1fr);
    }

    .step-navigation {
        flex-direction: column;
        gap: 1rem;
    }

    .step-navigation .btn {
        width: 100%;
    }

    .resize-inputs {
        flex-direction: column;
    }

    .app-footer {
        padding: 1.5rem 1rem;
    }
}

/* Loading Overlay */
#loadingOverlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

#loadingOverlay.active {
    display: flex;
}

.loading-content {
    text-align: center;
    color: white;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top-color: var(--color-accent);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

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

#loadingMessage {
    font-size: 1rem;
    margin: 0;
}

/* Toast Notifications */
.toast {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    padding: 0.875rem 1.5rem;
    background: var(--color-text);
    color: white;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    z-index: 9999;
    opacity: 0;
    transition: all 0.3s ease;
    max-width: 90%;
    text-align: center;
}

.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.toast-success {
    background: var(--color-success);
}

.toast-error {
    background: var(--color-danger);
}

.toast-info {
    background: var(--color-primary);
}

.toast-warning {
    background: var(--color-warning);
    color: var(--color-text);
}

/* File List in Sidebar */
.file-list {
    margin-top: 1rem;
    border-top: 1px solid var(--color-border);
    padding-top: 1rem;
}

.file-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: background 0.2s;
}

.file-item:hover {
    background: var(--color-bg);
}

.file-item.active {
    background: rgba(27, 77, 62, 0.1);
    color: var(--color-primary);
}

.file-name {
    font-size: 0.875rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
}

.file-remove {
    background: none;
    border: none;
    color: var(--color-text-light);
    cursor: pointer;
    font-size: 1.25rem;
    line-height: 1;
    padding: 0.25rem;
    opacity: 0;
    transition: opacity 0.2s;
}

.file-item:hover .file-remove {
    opacity: 1;
}

.file-remove:hover {
    color: var(--color-danger);
}

/* Download List */
.download-list {
    margin-top: 1.5rem;
}

.download-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    background: var(--color-bg);
    border-radius: var(--radius-md);
    margin-bottom: 0.75rem;
}

.download-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.download-name {
    font-weight: 500;
}

.download-size {
    font-size: 0.75rem;
    color: var(--color-text-light);
}

.download-btn {
    padding: 0.5rem 1rem;
    background: var(--color-primary);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-weight: 500;
    transition: background 0.2s;
}

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

/* Tools Dropdown Menu */
.tools-dropdown {
    position: relative;
}

.btn-tools {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: var(--radius-md);
    color: white;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-tools:hover {
    background: rgba(255, 255, 255, 0.25);
}

.btn-tools .chevron {
    transition: transform 0.2s;
}

.tools-dropdown:hover .btn-tools .chevron {
    transform: rotate(180deg);
}

.tools-menu {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    width: 300px;
    background: var(--color-bg-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s;
    z-index: 1000;
    overflow: hidden;
}

.tools-dropdown:hover .tools-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.tools-menu-header {
    padding: 1rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-text-light);
    background: var(--color-bg);
    border-bottom: 1px solid var(--color-border);
}

.tool-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    text-decoration: none;
    color: var(--color-text);
    transition: background 0.2s;
}

.tool-item:hover {
    background: var(--color-bg);
}

.tool-item.active {
    background: rgba(27, 77, 62, 0.1);
    border-left: 3px solid var(--color-primary);
}

.tool-icon {
    font-size: 1.5rem;
    width: 2.5rem;
    height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-bg);
    border-radius: var(--radius-md);
}

.tool-item.active .tool-icon {
    background: rgba(27, 77, 62, 0.15);
}

.tool-info {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

.tool-name {
    font-weight: 600;
    font-size: 0.875rem;
}

.tool-desc {
    font-size: 0.75rem;
    color: var(--color-text-light);
}

.tools-menu-footer {
    padding: 0.75rem 1rem;
    font-size: 0.7rem;
    color: var(--color-text-light);
    background: var(--color-bg);
    border-top: 1px solid var(--color-border);
    text-align: center;
}
