:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --bg: #f8fafc;
    --surface: #ffffff;
    --text: #1e293b;
    --text-muted: #64748b;
    --border: #e2e8f0;
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.1);
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
}

header {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 1rem 2rem;
    position: sticky;
    top: 0;
    z-index: 100;
}

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

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

.nav-menu {
    display: flex;
    gap: 0.5rem;
    list-style: none;
}

.nav-menu a {
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    color: var(--text);
    text-decoration: none;
    font-size: 0.875rem;
    transition: all 0.2s;
}

.nav-menu a:hover,
.nav-menu a.active {
    background: var(--primary);
    color: white;
}

main {
    max-width: 1400px;
    margin: 2rem auto;
    padding: 0 2rem;
}

.page-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.page-description {
    color: var(--text-muted);
    margin-bottom: 2rem;
}

.card {
    background: var(--surface);
    border-radius: 1rem;
    padding: 2rem;
    box-shadow: var(--shadow);
    margin-bottom: 1.5rem;
}

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

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

.drop-zone i {
    font-size: 3rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.drop-zone-text {
    font-size: 1.125rem;
    color: var(--text);
    margin-bottom: 0.5rem;
}

.drop-zone-hint {
    font-size: 0.875rem;
    color: var(--text-muted);
}

input[type="file"] {
    display: none;
}

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

.form-label {
    display: block;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.form-input,
.form-select {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    font-size: 1rem;
    transition: border-color 0.2s;
}

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

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

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 0.5rem;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

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

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

.btn-secondary {
    background: var(--bg);
    color: var(--text);
}

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

.file-list {
    margin-top: 1.5rem;
}

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

.file-thumb {
    width: 60px;
    height: 60px;
    border-radius: 0.5rem;
    object-fit: cover;
}

.file-info {
    flex: 1;
}

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

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

.file-remove {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 0.25rem;
    transition: all 0.2s;
}

.file-remove:hover {
    background: #fee2e2;
    color: #dc2626;
}

.preview-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 1.5rem;
}

.preview-item {
    position: relative;
    background: var(--bg);
    border-radius: 0.5rem;
    overflow: hidden;
}

.preview-item img {
    width: 100%;
    height: 150px;
    object-fit: cover;
}

.preview-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 0.5rem;
    font-size: 0.75rem;
}

.progress-bar {
    height: 4px;
    background: var(--border);
    border-radius: 2px;
    overflow: hidden;
    margin-top: 1rem;
}

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

.result-section {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
}

.result-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1rem;
}

.result-item {
    background: var(--bg);
    border-radius: 0.5rem;
    padding: 1rem;
    text-align: center;
}

.result-item img {
    max-width: 100%;
    max-height: 200px;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
}

.download-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--primary);
    color: white;
    text-decoration: none;
    border-radius: 0.5rem;
    font-size: 0.875rem;
}

.empty-state {
    text-align: center;
    padding: 4rem 2rem;
}

.empty-state-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.empty-state h2 {
    margin-bottom: 0.5rem;
}

.empty-state p {
    color: var(--text-muted);
}

@media (max-width: 768px) {
    .nav-menu {
        flex-wrap: wrap;
        justify-content: center;
    }

    nav {
        flex-direction: column;
        gap: 1rem;
    }

    main {
        padding: 0 1rem;
    }
}
