:root {
    --bg-color: #0b0f19;
    --card-bg: rgba(22, 30, 49, 0.85);
    --border-color: rgba(255, 255, 255, 0.08);
    --primary: #6366f1;
    --primary-hover: #4f46e5;
    --primary-glow: rgba(99, 102, 241, 0.35);
    --accent: #10b981;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --radius-lg: 16px;
    --radius-md: 10px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-color);
    background-image: 
        radial-gradient(at 0% 0%, rgba(99, 102, 241, 0.15) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(16, 185, 129, 0.1) 0px, transparent 50%);
    color: var(--text-main);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    padding: 30px 20px;
}

.app-container {
    width: 100%;
    max-width: 900px;
}

.top-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.badge {
    background: rgba(99, 102, 241, 0.15);
    border: 1px solid rgba(99, 102, 241, 0.3);
    color: #818cf8;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.settings-btn {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    padding: 6px 14px;
    border-radius: 8px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
}

.settings-btn:hover {
    background: rgba(255, 255, 255, 0.12);
    color: var(--text-main);
}

.app-header {
    text-align: center;
    margin-bottom: 30px;
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 8px;
}

.logo-icon {
    font-size: 32px;
}

.logo h1 {
    font-size: 32px;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.logo h1 span {
    background: linear-gradient(135deg, #818cf8, #c084fc);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.subtitle {
    color: var(--text-muted);
    font-size: 15px;
}

.main-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    backdrop-filter: blur(16px);
    padding: 32px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.tabs {
    display: flex;
    gap: 12px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 16px;
    margin-bottom: 24px;
}

.tab-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 15px;
    font-weight: 600;
    padding: 10px 18px;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.tab-btn:hover {
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.05);
}

.tab-btn.active {
    color: #fff;
    background: var(--primary);
    box-shadow: 0 4px 12px var(--primary-glow);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.input-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-muted);
}

textarea, input[type="text"] {
    width: 100%;
    background: rgba(15, 23, 42, 0.7);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: #fff;
    padding: 14px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
    font-family: inherit;
    margin-bottom: 18px;
}

textarea:focus, input[type="text"]:focus {
    border-color: var(--primary);
}

.primary-btn {
    width: 100%;
    background: linear-gradient(135deg, var(--primary), #4f46e5);
    border: none;
    color: #fff;
    padding: 14px;
    font-size: 16px;
    font-weight: 600;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.15s;
    box-shadow: 0 4px 14px var(--primary-glow);
}

.primary-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 18px var(--primary-glow);
}

.secondary-btn {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--border-color);
    color: #fff;
    padding: 12px 20px;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-weight: 500;
}

.drop-zone {
    border: 2px dashed rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-md);
    padding: 40px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    background: rgba(15, 23, 42, 0.4);
}

.drop-zone:hover, .drop-zone.dragover {
    border-color: var(--primary);
    background: rgba(99, 102, 241, 0.05);
}

.drop-icon {
    font-size: 40px;
    margin-bottom: 12px;
}

.drop-text {
    font-size: 15px;
    color: var(--text-main);
    margin-bottom: 6px;
}

.drop-text span {
    color: #818cf8;
    text-decoration: underline;
}

.drop-hint {
    font-size: 13px;
    color: var(--text-muted);
}

.selected-file {
    margin-top: 16px;
    padding: 14px;
    background: rgba(255, 255, 255, 0.04);
    border-radius: var(--radius-md);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.selected-file button {
    width: auto;
    padding: 8px 18px;
    font-size: 14px;
}

.loading-container {
    text-align: center;
    padding: 40px 20px;
}

.spinner {
    width: 48px;
    height: 48px;
    border: 4px solid rgba(255, 255, 255, 0.1);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading-text {
    font-size: 16px;
    color: var(--text-main);
    margin-bottom: 20px;
}

.steps-indicator {
    display: flex;
    justify-content: center;
    gap: 16px;
    font-size: 13px;
    color: var(--text-muted);
}

.step-item.active {
    color: var(--primary);
    font-weight: 600;
}

.results-container {
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid var(--border-color);
}

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 24px;
    gap: 20px;
    flex-wrap: wrap;
}

.result-title {
    font-size: 20px;
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 6px;
}

.result-meta {
    font-size: 13px;
    color: var(--text-muted);
}

.zip-btn {
    background: linear-gradient(135deg, #10b981, #059669);
    color: #fff;
    padding: 10px 20px;
    border-radius: var(--radius-md);
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
    white-space: nowrap;
}

.preview-area {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 24px;
}

@media (max-width: 768px) {
    .preview-area { grid-template-columns: 1fr; }
}

.preview-card {
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 16px;
}

.preview-card h3 {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.preview-card video {
    width: 100%;
    border-radius: 6px;
    max-height: 240px;
    background: #000;
}

.preview-card audio {
    width: 100%;
    margin-top: 20px;
}

.assets-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

.asset-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.2s;
}

.asset-card:hover {
    background: rgba(255, 255, 255, 0.06);
}

.asset-info {
    display: flex;
    align-items: center;
    gap: 14px;
}

.asset-icon {
    font-size: 24px;
}

.asset-title {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 4px;
}

.asset-meta {
    font-size: 13px;
    color: var(--text-muted);
    display: flex;
    gap: 12px;
}

.asset-actions {
    display: flex;
    gap: 10px;
}

.download-link {
    background: rgba(99, 102, 241, 0.15);
    color: #818cf8;
    border: 1px solid rgba(99, 102, 241, 0.3);
    padding: 8px 16px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.2s;
}

.download-link:hover {
    background: var(--primary);
    color: #fff;
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-card {
    background: #1e293b;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 30px;
    max-width: 500px;
    width: 90%;
}

.modal-card h3 {
    margin-bottom: 12px;
}

.modal-hint {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.5;
    margin-bottom: 20px;
}

.modal-actions {
    display: flex;
    gap: 12px;
    margin-top: 10px;
}

.modal-actions button {
    flex: 1;
}

.hidden {
    display: none !important;
}

.app-footer {
    text-align: center;
    margin-top: 30px;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.3);
}


.progress-bar-container {
    width: 100%;
    max-width: 400px;
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    margin: 16px auto;
    overflow: hidden;
}

.progress-bar {
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, #6366f1, #10b981);
    transition: width 0.3s ease;
}
