/* LTX-2 Video Generator Styles */

:root {
    --primary: #6366f1;
    --primary-hover: #4f46e5;
    --bg: #0f0f0f;
    --surface: #1a1a1a;
    --surface-hover: #252525;
    --border: #333;
    --text: #f0f0f0;
    --text-muted: #888;
    --error: #ef4444;
    --success: #22c55e;
}

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

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

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem;
}

header {
    text-align: center;
    margin-bottom: 2rem;
}

header h1 {
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.subtitle {
    color: var(--text-muted);
}

/* Form Styles */
.form-group {
    margin-bottom: 1.5rem;
}

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

textarea {
    width: 100%;
    padding: 1rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    font-size: 1rem;
    font-family: inherit;
    resize: vertical;
    transition: border-color 0.2s;
}

textarea:focus {
    outline: none;
    border-color: var(--primary);
}

textarea::placeholder {
    color: var(--text-muted);
}

button[type="submit"] {
    width: 100%;
    padding: 1rem 2rem;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
}

button[type="submit"]:hover:not(:disabled) {
    background: var(--primary-hover);
}

button[type="submit"]:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid transparent;
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-right: 8px;
    vertical-align: middle;
}

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

/* Logs Section */
#logs-section {
    margin-top: 2rem;
}

#logs-section h2,
#result-section h2,
#error-section h2 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
}

.logs-container {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1rem;
    max-height: 300px;
    overflow-y: auto;
    font-family: 'Monaco', 'Menlo', monospace;
    font-size: 0.875rem;
}

.log-entry {
    padding: 0.25rem 0;
    color: var(--text-muted);
}

.log-entry::before {
    content: '▸ ';
    color: var(--primary);
}

/* Result Section */
#result-section {
    margin-top: 2rem;
}

.video-container {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
}

video {
    width: 100%;
    display: block;
}

.params-container {
    margin-top: 1rem;
    padding: 1rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 0.875rem;
}

.params-container h3 {
    font-size: 1rem;
    margin-bottom: 0.75rem;
    color: var(--text-muted);
}

.param-item {
    margin-bottom: 0.5rem;
}

.param-label {
    font-weight: 500;
    color: var(--primary);
}

.param-value {
    color: var(--text-muted);
    word-break: break-word;
}

/* Error Section */
#error-section {
    margin-top: 2rem;
}

.error-container {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid var(--error);
    border-radius: 8px;
    padding: 1rem;
    color: var(--error);
}

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

/* Footer */
footer {
    margin-top: 3rem;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.875rem;
}

footer a {
    color: var(--primary);
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
}

/* Responsive */
@media (max-width: 600px) {
    .container {
        padding: 1rem;
    }

    header h1 {
        font-size: 1.5rem;
    }
}
