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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #0a0a0f;
    color: #e0e0e0;
    line-height: 1.6;
}

/* Header */
.header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 2rem;
    background: rgba(10, 10, 15, 0.95);
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid #1a1a2e;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 700;
    font-size: 1.25rem;
    color: #fff;
}

.nav {
    display: flex;
    gap: 2rem;
}

.nav a {
    color: #888;
    text-decoration: none;
    transition: color 0.2s;
}

.nav a:hover {
    color: #fff;
}

/* Buttons */
.btn-primary {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: #fff;
    border: none;
    padding: 0.6rem 1.5rem;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: opacity 0.2s;
}

.btn-primary:hover {
    opacity: 0.9;
}

.btn-outline {
    background: transparent;
    color: #e0e0e0;
    border: 1px solid #333;
    padding: 0.6rem 1.5rem;
    border-radius: 8px;
    cursor: pointer;
    transition: border-color 0.2s;
}

.btn-outline:hover {
    border-color: #6366f1;
}

.btn-full {
    width: 100%;
}

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

/* Hero */
.hero {
    text-align: center;
    padding: 6rem 2rem;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, #fff, #888);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero p {
    font-size: 1.2rem;
    color: #888;
    margin-bottom: 2rem;
}

/* Workspace */
.workspace {
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem;
}

.upload-zone {
    border: 2px dashed #333;
    border-radius: 16px;
    padding: 4rem 2rem;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.3s;
}

.upload-zone:hover {
    border-color: #6366f1;
}

.upload-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.upload-hint {
    color: #555;
    font-size: 0.85rem;
    margin-top: 1rem;
}

.link {
    color: #6366f1;
    text-decoration: underline;
    cursor: pointer;
}

/* Preview */
.preview-panel {
    margin-top: 2rem;
    background: #12121a;
    border-radius: 16px;
    padding: 1.5rem;
}

.preview-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 200px;
    background: #0a0a0f;
    border-radius: 12px;
    overflow: hidden;
}

.preview-container img,
.preview-container video {
    max-width: 100%;
    max-height: 400px;
    border-radius: 8px;
}

.file-info {
    display: flex;
    justify-content: space-between;
    margin-top: 1rem;
    color: #888;
    font-size: 0.9rem;
}

/* Tools */
.tools-panel {
    margin-top: 2rem;
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.tool-card {
    background: #12121a;
    border: 1px solid #1a1a2e;
    border-radius: 12px;
    padding: 1.5rem;
    cursor: pointer;
    text-align: center;
    transition: border-color 0.2s, transform 0.2s;
    color: #e0e0e0;
}

.tool-card:hover {
    border-color: #6366f1;
    transform: translateY(-2px);
}

.tool-icon {
    font-size: 2rem;
    display: block;
    margin-bottom: 0.5rem;
}

.tool-name {
    display: block;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.tool-desc {
    display: block;
    font-size: 0.8rem;
    color: #666;
}

/* Processing */
.processing-panel {
    text-align: center;
    padding: 3rem;
}

.spinner {
    width: 48px;
    height: 48px;
    border: 3px solid #1a1a2e;
    border-top-color: #6366f1;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

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

.progress-bar {
    width: 100%;
    max-width: 300px;
    height: 4px;
    background: #1a1a2e;
    border-radius: 2px;
    margin: 1rem auto 0;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #6366f1, #8b5cf6);
    transition: width 0.3s;
}

/* Result */
.result-panel {
    margin-top: 2rem;
    text-align: center;
}

.result-preview {
    background: #12121a;
    border-radius: 12px;
    padding: 2rem;
    margin: 1rem 0;
    min-height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Features */
.features {
    max-width: 1000px;
    margin: 4rem auto;
    padding: 0 2rem;
}

.features h2 {
    text-align: center;
    margin-bottom: 2rem;
}

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

.feature-card {
    background: #12121a;
    border: 1px solid #1a1a2e;
    border-radius: 12px;
    padding: 1.5rem;
}

.feature-card h3 {
    margin-bottom: 0.5rem;
    color: #fff;
}

.feature-card p {
    color: #666;
    font-size: 0.9rem;
}

/* Modal */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal {
    background: #12121a;
    border: 1px solid #1a1a2e;
    border-radius: 16px;
    padding: 2rem;
    width: 100%;
    max-width: 400px;
    position: relative;
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    color: #666;
    font-size: 1.5rem;
    cursor: pointer;
}

.modal h2 {
    margin-bottom: 1.5rem;
}

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

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #888;
    font-size: 0.9rem;
}

.form-group input {
    width: 100%;
    padding: 0.75rem;
    background: #0a0a0f;
    border: 1px solid #1a1a2e;
    border-radius: 8px;
    color: #e0e0e0;
    font-size: 1rem;
}

.form-group input:focus {
    outline: none;
    border-color: #6366f1;
}

.auth-switch {
    text-align: center;
    margin-top: 1rem;
    color: #666;
    font-size: 0.9rem;
}

.auth-switch a {
    color: #6366f1;
}

/* Footer */
.footer {
    text-align: center;
    padding: 2rem;
    color: #444;
    border-top: 1px solid #1a1a2e;
    margin-top: 4rem;
}

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