:root {
    --primary-color: #6366f1;
    --secondary-color: #4f46e5;
    --background-color: #f8fafc;
    --card-background: #ffffff;
    --text-color: #1e293b;
    --border-color: #e2e8f0;
    --text-secondary-color: #64748b;
}

body {
    background-color: var(--background-color);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: var(--text-color);
    line-height: 1.6;
}

.main-container {
    max-width: 768px;
    margin: 0 auto;
    padding: 0.5rem;
}

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

.header h1 {
    font-size: 2rem;
    font-weight: 700;
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.content-container {
    background: var(--card-background);
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.image-container, .video-container {
    width: 100%;
    text-align: center;
    background: var(--background-color);
    padding: 1rem;
    border-radius: 12px;
}

.generated-image, .generated-video {
    max-width: 100%;
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

.generated-image.loaded, .generated-video.loaded {
    opacity: 1;
}

.image-loading, .video-loading {
    position: relative;
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.video-loading { min-height: 300px; }

.image-loading.loaded::after, .video-loading.loaded::after {
    display: none;
}

.image-loading::after, .video-loading::after {
    content: '';
    position: absolute;
    width: 40px;
    height: 40px;
    border: 3px solid var(--background-color);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

.prompt-box {
    background: var(--background-color);
    padding: 1rem;
    border-radius: 12px;
    margin: 1rem 0;
}

.prompt-box h5 {
    color: var(--text-secondary-color);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.25rem;
}

.prompt-box p {
    margin: 0;
    font-size: 1rem;
    color: var(--text-color);
}

.action-buttons {
    display: flex;
    gap: 0.75rem;
    margin-top: 1rem;
    margin-bottom: 1rem;
}

.btn {
    padding: 0.6rem 1.2rem;
    border-radius: 10px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    transition: all 0.3s ease;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border: none;
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.2);
}

.btn-secondary {
    background: var(--background-color);
    color: var(--text-color);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: var(--border-color);
    transform: translateY(-1px);
}

.btn-success {
    background: #059669;
    border: none;
    color: white;
}

.btn-success:hover {
    background: #047857;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(5, 150, 105, 0.2);
}

.loading {
    text-align: center;
    padding: 2rem 1rem;
}

.loading-spinner {
    width: 2.5rem;
    height: 2.5rem;
    color: var(--primary-color);
}

.loading p {
    color: var(--text-secondary-color);
    margin-top: 0.75rem;
}

.status-info {
    text-align: center;
    margin-top: 0.75rem;
}

.status-badge {
    padding: 0.2rem 0.4rem;
    border-radius: 0.25rem;
    font-weight: 600;
    font-size: 0.9rem;
    color: white;
}

.status-badge.bg-success {
    background-color: #059669 !important;
}

.status-badge.bg-warning {
    background-color: #d97706 !important;
    color: white !important;
}

.status-badge.bg-primary {
    background-color: #2563eb !important;
}

.status-badge.bg-danger {
    background-color: #dc2626 !important;
}

.queue-badge {
    padding: 0.2rem 0.4rem;
    border-radius: 0.25rem;
    font-weight: 600;
    font-size: 0.9rem;
}

.video-notice {
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    border: 1px solid #f59e0b;
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 1rem;
    color: #92400e;
    font-size: 0.9rem;
}

.video-notice i {
    margin-right: 0.5rem;
}

/* 广告提示浮窗样式 */
.ad-notice-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.ad-notice-modal.active {
    display: flex;
    opacity: 1;
}

.ad-notice-container {
    background: var(--card-background);
    padding: 2rem;
    border-radius: 1.5rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    text-align: center;
    transform: translateY(20px);
    transition: transform 0.3s ease;
    max-width: 90%;
    width: 400px;
}

.ad-notice-modal.active .ad-notice-container {
    transform: translateY(0);
}

.ad-notice-container h4 {
    margin-bottom: 1rem;
    color: var(--text-color);
    font-size: 1.25rem;
    font-weight: 600;
}

.ad-notice-container p {
    color: var(--text-secondary-color);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.ad-notice-container .btn {
    padding: 0.8rem 1.5rem;
    font-size: 1rem;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.ad-notice-container .btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border: none;
}

.ad-notice-container .btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.2);
}

.copyright-notice {
    text-align: center;
    margin-bottom: 2rem;
    margin-top: 0.5rem;
}

@media (max-width: 768px) {
    .main-container {
        padding: 1rem;
    }
    .content-container {
        padding: 1rem;
    }
    .action-buttons {
        flex-direction: column;
    }
    .btn {
        width: 100%;
        justify-content: center;
    }
}

