:root {
    --primary: #2563eb;
    --primary-hover: #1d4ed8;
    --secondary: #64748b;
    --background: #f8fafc;
    --text: #0f172a;
    --text-muted: #64748b;
    --white: #ffffff;
    --border: #e2e8f0;
    --radius: 0.75rem;
    --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--background);
    color: var(--text);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

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

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

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary);
}

.logo i {
    width: 28px;
    height: 28px;
}

.nav-link {
    text-decoration: none;
    color: var(--secondary);
    font-weight: 500;
    font-size: 0.9375rem;
    transition: color 0.2s;
}

.nav-link:hover {
    color: var(--primary);
}

.hero {
    text-align: center;
    padding: 4rem 0 3rem;
}

.hero h1 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    letter-spacing: -0.025em;
}

.hero p {
    font-size: 1.125rem;
    color: var(--text-muted);
}

.converter-box {
    background: var(--white);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    padding: 2rem;
    box-shadow: var(--shadow);
    margin-bottom: 4rem;
}

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

.drop-zone:hover, .drop-zone.drag-over {
    border-color: var(--primary);
    background: #eff6ff;
}

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

.drop-zone h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.drop-zone p {
    color: var(--text-muted);
}

.file-types {
    display: block;
    margin-top: 1.5rem;
    font-size: 0.8125rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.privacy-note {
    margin-top: 1rem;
    font-size: 0.75rem;
    color: var(--secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
}

.hidden {
    display: none;
}

/* Image List Styles */
#image-list-container {
    margin-top: 2rem;
}

.list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.list-header h2 {
    font-size: 1.125rem;
}

.image-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.image-item {
    aspect-ratio: 1;
    position: relative;
    border-radius: 0.5rem;
    overflow: hidden;
    border: 1px solid var(--border);
    background: #f1f5f9;
    cursor: grab;
}

.image-item:active {
    cursor: grabbing;
}

.image-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.image-item .remove-btn {
    position: absolute;
    top: 0.25rem;
    right: 0.25rem;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ef4444;
    cursor: pointer;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.image-item .order-badge {
    position: absolute;
    bottom: 0.25rem;
    left: 0.25rem;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.75rem;
}

/* Options Panel Styles */
.options-panel {
    border-top: 1px solid var(--border);
    padding-top: 2rem;
    margin-top: 2rem;
}

.options-panel h2 {
    font-size: 1.125rem;
    margin-bottom: 1.5rem;
}

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

.option-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

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

select {
    padding: 0.625rem;
    border-radius: 0.5rem;
    border: 1px solid var(--border);
    background: var(--white);
    font-family: inherit;
    font-size: 0.9375rem;
}

.actions {
    margin-top: 2.5rem;
    text-align: center;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    border-radius: 0.5rem;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
    font-size: 1rem;
}

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

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

.btn-primary:disabled {
    background: var(--secondary);
    cursor: not-allowed;
}

.btn-outline {
    background: transparent;
    border-color: var(--border);
    color: var(--secondary);
}

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

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

.btn-lg {
    padding: 1rem 2.5rem;
}

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

.spin {
    animation: spin 1s linear infinite;
}

/* Info Section */
.info-section {
    padding: 4rem 0;
}

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

.info-card {
    text-align: center;
    padding: 2rem;
}

.info-card i {
    width: 32px;
    height: 32px;
    color: var(--primary);
    margin-bottom: 1.5rem;
}

.info-card h3 {
    margin-bottom: 0.75rem;
}

.info-card p {
    color: var(--text-muted);
}

footer {
    padding: 3rem 0;
    text-align: center;
    border-top: 1px solid var(--border);
    color: var(--text-muted);
}

/* Responsive */
@media (max-width: 640px) {
    .hero h1 {
        font-size: 1.75rem;
    }
    
    .converter-box {
        padding: 1.5rem;
    }
    
    .drop-zone {
        padding: 2rem 1rem;
    }

    .image-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    }
}
