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

body {
    background-color: #0f1117;
    color: #ffffff;
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
}

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

header {
    padding: 20px 0;
}

header h1 {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 5px;
}

.subtitle {
    font-size: 14px;
    color: #a0a0a0;
    margin: 0;
}

.model-tabs {
    display: flex;
    margin: 20px 0;
    border-bottom: 1px solid #292d39;
}

.model-tab {
    background: none;
    border: none;
    color: #a0a0a0;
    padding: 10px 20px;
    font-size: 14px;
    cursor: pointer;
    position: relative;
}

.model-tab.active {
    color: #ffffff;
    font-weight: 500;
}

.model-tab.active::after {
    content: "";
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: #3b82f6;
}

.main-content {
    display: flex;
    gap: 20px;
}

.left-panel {
    flex: 1;
    background-color: #191d28;
    border-radius: 8px;
    padding: 20px;
}

.right-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.section-label {
    color: #a0a0a0;
    font-size: 14px;
    margin-bottom: 10px;
}

.input-section {
    margin-bottom: 24px;
}

/* Image upload area */
.image-upload-area {
    border: 2px dashed #444859;
    border-radius: 8px;
    height: 150px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.image-upload-area:hover {
    border-color: #3b82f6;
    background-color: rgba(59, 130, 246, 0.05);
}

.upload-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
}

.upload-text {
    text-align: center;
}

.upload-text p {
    margin: 0;
    font-size: 14px;
    color: #ffffff;
}

.upload-text p.small {
    font-size: 12px;
    color: #a0a0a0;
    margin-top: 5px;
}

.hidden-input {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    opacity: 0;
    cursor: pointer;
}

/* Prompt textarea */
#prompt-input {
    width: 100%;
    height: 100px;
    background-color: #242836;
    border: 1px solid #444859;
    border-radius: 6px;
    padding: 12px;
    color: #ffffff;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    resize: none;
}

#prompt-input:focus {
    outline: none;
    border-color: #3b82f6;
}

/* Ratio options */
.ratio-options {
    display: flex;
    gap: 10px;
}

.ratio-option {
    background-color: #242836;
    border: 1px solid #444859;
    border-radius: 6px;
    padding: 8px 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #ffffff;
}

.ratio-option.active {
    border-color: #3b82f6;
    background-color: rgba(59, 130, 246, 0.1);
}

.ratio-icon {
    font-size: 16px;
}

/* Seed input */
.text-input {
    width: 100%;
    height: 40px;
    background-color: #242836;
    border: 1px solid #444859;
    border-radius: 6px;
    padding: 0 12px;
    color: #ffffff;
    font-size: 14px;
}

.text-input:focus {
    outline: none;
    border-color: #3b82f6;
}

/* Generate button */
.generate-button {
    width: 100%;
    background-color: #3b82f6;
    border: none;
    border-radius: 6px;
    padding: 12px;
    color: #ffffff;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.generate-button:hover {
    background-color: #2563eb;
}

.generate-button:disabled {
    background-color: #4b5563;
    cursor: not-allowed;
}

.generate-icon {
    font-size: 16px;
}

/* Right panel styles */
.video-display {
    background-color: #191d28;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.video-container {
    position: relative;
    width: 100%;
    border-radius: 0;
    overflow: hidden;
    flex: 1;
    background-color: #000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.video-container video {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.video-controls {
    padding: 12px;
    display: flex;
    justify-content: center;
    background-color: #191d28;
}

.pagination-dots {
    display: flex;
    gap: 8px;
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #444859;
    cursor: pointer;
}

.dot.active {
    background-color: #3b82f6;
}

/* Loading state */
.loading-spinner {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    color: #3b82f6;
}

/* Image preview when uploaded */
.image-preview {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
}

.image-preview-container {
    position: relative;
    width: 100%;
    height: 150px;
}

.loading-spinner {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.spinner {
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top: 4px solid #3b82f6;
    width: 30px;
    height: 30px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.error-message {
    color: #f44336;
    background-color: #ffebee;
    padding: 10px;
    border-radius: 5px;
    margin-top: 10px;
}

/* Modal styles */
.modal {
    display: none;
    position: fixed;
    z-index: 100;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
}

.modal-content {
    background-color: #191d28;
    margin: 10% auto;
    padding: 20px;
    border-radius: 8px;
    width: 80%;
    max-width: 500px;
}

.modal h2 {
    margin-bottom: 15px;
    color: #fff;
}

.close-modal {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close-modal:hover {
    color: #fff;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
}

.form-group input {
    width: 100%;
    padding: 8px;
    border: 1px solid #444859;
    border-radius: 4px;
    background-color: #242836;
    color: #fff;
}

#save-api-key {
    background-color: #3b82f6;
    color: white;
    padding: 10px 15px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}

#save-api-key:hover {
    background-color: #2563eb;
}

#result-status {
    margin: 20px 0;
    padding: 15px;
    border-radius: 8px;
    background-color: #242836;
}

.status-item {
    margin-bottom: 10px;
}

.status-label {
    font-weight: bold;
    margin-right: 10px;
}

.task-id-container {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 10px 0;
}

.copy-button {
    background-color: #3b82f6;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 5px 10px;
    cursor: pointer;
    font-size: 12px;
}

.copy-button:hover {
    background-color: #2563eb;
}

/* Responsive design */
@media (max-width: 768px) {
    .main-content {
        flex-direction: column;
    }
}
