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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: #0a0a0f;
    color: #e0e0e0;
    min-height: 100vh;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 20px;
}

header {
    text-align: center;
    padding: 30px 0;
    border-bottom: 1px solid #222;
    margin-bottom: 30px;
}

header h1 {
    font-size: 2rem;
    color: #ff6b6b;
    margin-bottom: 8px;
}

header p {
    color: #888;
    font-size: 0.9rem;
}

.submit-section {
    background: #1a1a2e;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 30px;
}

.submit-section h2 {
    font-size: 1.2rem;
    margin-bottom: 16px;
}

.form-row {
    display: flex;
    gap: 12px;
    align-items: center;
}

.form-row input {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid #333;
    border-radius: 8px;
    background: #0a0a0f;
    color: #fff;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.2s;
}

.form-row input:focus {
    border-color: #ff6b6b;
}

.form-row button {
    padding: 12px 28px;
    border: none;
    border-radius: 8px;
    background: #ff6b6b;
    color: #fff;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.form-row button:hover {
    background: #e05555;
}

.form-row button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.msg {
    margin-top: 12px;
    font-size: 0.9rem;
}

.msg.success { color: #4caf50; }
.msg.error { color: #ff5252; }
.msg.info { color: #2196f3; }

.jobs-section h2 {
    font-size: 1.2rem;
    margin-bottom: 16px;
}

.jobs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}

.job-card {
    background: #1a1a2e;
    border-radius: 12px;
    padding: 16px;
    border: 1px solid #222;
    transition: border-color 0.2s;
}

.job-card.status-done {
    border-color: #4caf50;
}

.job-card.status-failed {
    border-color: #ff5252;
}

.job-card.status-downloading,
.job-card.status-processing {
    border-color: #ffa726;
}

.job-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.job-header h3 {
    font-size: 1rem;
}

.badge {
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.badge-pending { background: #37474f; color: #90a4ae; }
.badge-downloading { background: #e65100; color: #fff; }
.badge-processing { background: #ff8f00; color: #fff; }
.badge-done { background: #1b5e20; color: #81c784; }
.badge-failed { background: #b71c1c; color: #ef9a9a; }

.job-progress {
    color: #888;
    font-size: 0.85rem;
    margin-bottom: 4px;
}

.job-error {
    color: #ff5252;
    font-size: 0.8rem;
    margin-top: 4px;
    padding: 6px;
    background: rgba(255, 82, 82, 0.1);
    border-radius: 6px;
}

.job-video {
    margin-top: 12px;
}

.job-video a {
    display: block;
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    text-decoration: none;
}

.thumb {
    width: 100%;
    aspect-ratio: 16/9;
    object-fit: cover;
    border-radius: 8px;
    display: block;
}

.play-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    padding: 8px 20px;
    border-radius: 20px;
    font-size: 0.9rem;
}

.play-link {
    display: block;
    padding: 12px;
    text-align: center;
    background: #4caf50;
    color: #fff;
    border-radius: 8px;
    font-weight: 600;
    transition: background 0.2s;
}

.play-link:hover {
    background: #388e3c;
}

@media (max-width: 600px) {
    .form-row {
        flex-direction: column;
    }
    .form-row button {
        width: 100%;
    }
}
