/**
 * Defapi Sora 2 Frontend Styles
 */

.defapi-form-container {
    max-width: 600px;
    margin: 20px 0;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 8px;
    border: 1px solid #e5e5e5;
}

.defapi-form-group {
    margin-bottom: 20px;
}

.defapi-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
}

.defapi-form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.defapi-form-group select {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: white;
}

.defapi-button {
    background: #2271b1;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    transition: background 0.3s;
}

.defapi-button:hover {
    background: #135e96;
}

.defapi-success {
    margin-top: 20px;
    padding: 15px;
    background: #d1e7dd;
    border: 1px solid #badbcc;
    border-radius: 4px;
    color: #0f5132;
}

.defapi-error {
    margin-top: 20px;
    padding: 15px;
    background: #f8d7da;
    border: 1px solid #f5c2c7;
    border-radius: 4px;
    color: #842029;
}

.defapi-info {
    margin-top: 20px;
    padding: 15px;
    background: #cfe2ff;
    border: 1px solid #b6d4fe;
    border-radius: 4px;
    color: #084298;
}

.defapi-loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #2271b1;
    border-radius: 50%;
    animation: defapi-spin 1s linear infinite;
    margin-right: 10px;
    vertical-align: middle;
}

.defapi-loading-small {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #2271b1;
    border-radius: 50%;
    animation: defapi-spin 1s linear infinite;
}

@keyframes defapi-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.defapi-video-status {
    margin-top: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.defapi-video-result {
    margin-top: 15px;
}

.defapi-video-result video {
    max-width: 100%;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* History styles */
.defapi-history {
    margin: 20px 0;
}

.defapi-history h3 {
    margin-bottom: 15px;
}

.defapi-history-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.defapi-history-item {
    background: #f9f9f9;
    border-radius: 8px;
    padding: 15px;
    border: 1px solid #e5e5e5;
}

.defapi-history-video {
    width: 100%;
    border-radius: 4px;
    margin-bottom: 10px;
}

.defapi-history-pending {
    text-align: center;
    padding: 40px 20px;
    background: #f5f5f5;
    border-radius: 4px;
}

.defapi-history-failed {
    text-align: center;
    padding: 40px 20px;
    background: #f8d7da;
    border-radius: 4px;
    color: #842029;
}

.defapi-history-prompt {
    font-size: 13px;
    color: #666;
    margin: 10px 0 5px;
    line-height: 1.4;
}

.defapi-history-date {
    font-size: 11px;
    color: #999;
    margin: 5px 0 0;
}

.defapi-task-id {
    font-size: 10px;
    font-family: monospace;
    color: #888;
    word-break: break-all;
}