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

:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --success: #10b981;
    --bg: #0f172a;
    --bg-light: #1e293b;
    --bg-lighter: #334155;
    --text: #f1f5f9;
    --text-dim: #94a3b8;
    --border: #475569;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    color: var(--text);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 900px;
    margin: 0 auto;
}

header {
    text-align: center;
    margin-bottom: 40px;
    padding: 20px;
}

h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.subtitle {
    color: var(--text-dim);
    font-size: 1.1rem;
}

main {
    background: var(--bg-light);
    border-radius: 16px;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.upload-section {
    margin-bottom: 40px;
}

.drop-zone {
    border: 3px dashed var(--border);
    border-radius: 12px;
    padding: 60px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: var(--bg);
}

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

.drop-zone.drag-over {
    border-color: var(--primary);
    background: rgba(99, 102, 241, 0.1);
    transform: scale(1.02);
}

.upload-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 20px;
    color: var(--primary);
}

.drop-zone h2 {
    font-size: 1.5rem;
    margin-bottom: 10px;
}

.drop-zone p {
    color: var(--text-dim);
    margin-bottom: 5px;
}

.supported-formats {
    font-size: 0.9rem;
    color: var(--text-dim);
    margin-top: 15px;
}

.format-note {
    font-size: 0.85rem;
    color: #fbbf24;
    margin-top: 8px;
    opacity: 0.9;
}

.processing-section {
    text-align: center;
    padding: 40px 20px;
}

.spinner {
    width: 60px;
    height: 60px;
    border: 4px solid var(--bg-lighter);
    border-top-color: var(--primary);
    border-radius: 50%;
    margin: 0 auto 20px;
    animation: spin 1s linear infinite;
}

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

.processing-section p {
    font-size: 1.2rem;
    margin-bottom: 20px;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: var(--bg);
    border-radius: 4px;
    overflow: hidden;
    margin-top: 20px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--primary-dark));
    transition: width 0.3s ease;
    width: 0%;
}

.results-section {
    text-align: center;
    padding: 20px;
}

.results-header {
    margin-bottom: 30px;
}

.success-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 15px;
    color: var(--success);
}

.results-header h2 {
    font-size: 1.8rem;
    color: var(--success);
}

.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.stat-item {
    background: var(--bg);
    padding: 25px;
    border-radius: 12px;
    border: 1px solid var(--border);
}

.stat-number {
    display: block;
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--primary);
    margin-bottom: 5px;
}

.stat-label {
    display: block;
    color: var(--text-dim);
    font-size: 0.9rem;
}

.download-btn,
.secondary-btn {
    padding: 16px 32px;
    font-size: 1.1rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin: 10px;
}

.download-btn {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
}

.download-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(99, 102, 241, 0.4);
}

.download-btn svg {
    width: 20px;
    height: 20px;
}

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

.secondary-btn:hover {
    background: var(--bg-lighter);
    transform: translateY(-2px);
}

.info-section {
    background: var(--bg);
    border-radius: 12px;
    padding: 30px;
    border: 1px solid var(--border);
}

.info-section h3 {
    font-size: 1.3rem;
    margin-bottom: 20px;
    color: var(--primary);
}

.removal-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.removal-item {
    display: flex;
    gap: 15px;
    align-items: start;
}

.removal-icon {
    font-size: 2rem;
    flex-shrink: 0;
}

.removal-item strong {
    display: block;
    margin-bottom: 5px;
    color: var(--text);
}

.removal-item p {
    color: var(--text-dim);
    font-size: 0.9rem;
    line-height: 1.5;
}

footer {
    text-align: center;
    margin-top: 30px;
    padding: 20px;
    color: var(--text-dim);
    font-size: 0.9rem;
}

/* Project list */
.project-list {
    margin-top: 24px;
}

.project-list-title {
    font-size: 1.2rem;
    margin-bottom: 16px;
    color: var(--primary);
}

.project-item {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 14px 16px;
    margin-bottom: 10px;
}

.project-item .project-file-name {
    color: var(--text-dim);
    font-size: 0.85rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 180px;
    flex-shrink: 0;
}

.project-item .project-arrow {
    color: var(--text-dim);
    flex-shrink: 0;
    font-size: 1.1rem;
}

.project-item .project-name-wrap {
    display: flex;
    align-items: center;
    flex: 1;
    min-width: 0;
    background: var(--bg-light);
    border: 1px solid var(--border);
    border-radius: 6px;
    overflow: hidden;
}

.project-item .project-name-input {
    flex: 1;
    min-width: 0;
    background: transparent;
    border: none;
    color: var(--text);
    padding: 8px 10px;
    font-size: 0.95rem;
    outline: none;
}

.project-item .project-name-input:focus {
    box-shadow: inset 0 0 0 1px var(--primary);
}

.project-item .project-name-suffix {
    color: var(--text-dim);
    font-size: 0.9rem;
    padding-right: 10px;
    flex-shrink: 0;
}

.project-item .project-remove-btn {
    background: none;
    border: none;
    color: var(--text-dim);
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    flex-shrink: 0;
    transition: color 0.2s;
    display: flex;
    align-items: center;
}

.project-item .project-remove-btn:hover {
    color: #ef4444;
}

.project-list-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 16px;
    gap: 12px;
}

.add-more-btn {
    padding: 10px 20px !important;
    font-size: 0.95rem !important;
}

.process-btn {
    padding: 14px 28px !important;
}

/* Download list */
.download-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 20px 0;
    text-align: left;
}

.download-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 12px 16px;
}

.download-item-name {
    font-weight: 600;
    color: var(--text);
}

.download-item-btn {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    border: none;
    border-radius: 6px;
    padding: 8px 16px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.download-item-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
}

.hidden {
    display: none !important;
}

/* Responsive design */
@media (max-width: 768px) {
    h1 {
        font-size: 2rem;
    }

    main {
        padding: 20px;
    }

    .stats {
        grid-template-columns: 1fr;
    }

    .drop-zone {
        padding: 40px 15px;
    }
}
