/* ========================================
   AI 视频生成器 - 样式文件
   ======================================== */

/* 渐变文字效果 */
.gradient-text {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* 开关按钮样式 - 简洁版 */
/* 默认状态 (未选中 = 私密付费) */
.toggle-bg {
    background-color: #4b5563; /* 灰色 */
}

.toggle-dot {
    background-color: #ffffff; /* 白色 */
    transform: translateX(0);
}

.toggle-icon {
    filter: grayscale(0);
}

.toggle-label {
    color: #9ca3af; /* 灰色文字 */
}

.toggle-hint::before {
    content: '私密付费 ¥0.20';
    color: #9ca3af;
}

/* 选中状态 (公开免费) */
#is-public:checked ~ .toggle-bg {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%); /* 主题紫色渐变 */
}

#is-public:checked ~ .toggle-dot {
    background-color: #ffffff;
    transform: translateX(1.5rem); /* 24px */
}

#is-public:checked ~ .toggle-dot .toggle-icon {
    opacity: 0; /* 隐藏锁图标 */
}

#is-public:checked ~ * .toggle-label {
    color: #c4b5fd; /* 紫色文字 */
}

#is-public:checked ~ * .toggle-hint::before {
    content: '公开免费';
    color: #c4b5fd;
}

/* 平滑过渡 */
.toggle-bg,
.toggle-dot,
.toggle-label,
.toggle-hint {
    transition: all 0.3s ease;
}

/* 悬停效果 */
.group:hover .toggle-bg {
    opacity: 0.9;
}

/* 呼吸覆盖层 */
#breathing-overlay {
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px);
    animation: breathe 3s ease-in-out infinite;
}

@keyframes breathe {
    0%, 100% {
        opacity: 0.95;
    }
    50% {
        opacity: 1;
    }
}

/* 按钮内进度条动画 */
#progress-bar {
    transition: width 0.5s ease-out;
    will-change: width;
}

/* 按钮进度状态 */
#generate-button {
    position: relative;
    overflow: hidden;
}

#generate-button:disabled {
    cursor: not-allowed;
    transform: none !important;
}

#generate-button:disabled:hover {
    transform: none !important;
}

/* 进度文字动画 */
#progress-text {
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

/* 视频卡片悬停效果 */
.video-card {
    transition: all 0.3s ease;
}

.video-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.3);
}

/* 文本截断 */
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* 滚动条样式 */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #1f2937; /* gray-800 */
}

::-webkit-scrollbar-thumb {
    background: #4b5563; /* gray-600 */
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #6b7280; /* gray-500 */
}

/* 加载动画 */
@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.animate-spin {
    animation: spin 1s linear infinite;
}

/* 按钮禁用状态 */
button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* 模态框动画 */
#video-modal {
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* 响应式视频容器 */
.aspect-video {
    aspect-ratio: 16 / 9;
}

/* 视频悬停播放按钮 */
.video-play-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 3rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.video-card:hover .video-play-overlay {
    opacity: 1;
}

/* 错误提示样式 */
#error-container {
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 成功提示样式 */
.success-message {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    padding: 1rem;
    border-radius: 0.5rem;
    animation: slideDown 0.3s ease-out;
}

/* 支付二维码容器 */
#qrcode {
    display: flex;
    justify-content: center;
    align-items: center;
}

#qrcode img {
    max-width: 100%;
    height: auto;
}

/* 视频预览缩略图 */
video[preload="metadata"] {
    object-fit: cover;
}

/* 移动端优化 */
@media (max-width: 768px) {
    .gradient-text {
        font-size: 2rem;
    }
    
    #video-modal .bg-gray-800 {
        margin: 1rem;
    }
    
    .grid {
        gap: 1rem;
    }
}

/* 加载状态的脉冲效果 */
.pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

/* 视频生成进度条特效 */
#progress-bar {
    background: linear-gradient(90deg, #8b5cf6, #ec4899, #8b5cf6);
    background-size: 200% 100%;
    animation: gradientShift 2s ease infinite;
}

@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* 按钮悬停效果增强 */
button {
    position: relative;
    overflow: hidden;
}

button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

button:hover::before {
    width: 300px;
    height: 300px;
}

/* 视频卡片网格优化 */
#gallery-grid {
    animation: fadeInUp 0.5s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========================================
   通知框样式
   ======================================== */

/* 通知卡片 */
.notification-card {
    background: linear-gradient(135deg, #1f2937 0%, #111827 100%);
    border: 1px solid #374151;
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
    animation: slideInRight 0.3s ease-out;
    max-width: 320px;
    position: relative;
    overflow: hidden;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* 通知卡片移除动画 */
.notification-card.removing {
    animation: slideOutRight 0.3s ease-out forwards;
}

@keyframes slideOutRight {
    from {
        opacity: 1;
        transform: translateX(0);
    }
    to {
        opacity: 0;
        transform: translateX(100%);
    }
}

/* 通知状态指示器 */
.notification-status {
    width: 4px;
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    border-radius: 12px 0 0 12px;
}

.notification-status.generating {
    background: linear-gradient(180deg, #8b5cf6, #ec4899);
    animation: pulseGlow 2s ease-in-out infinite;
}

.notification-status.completed {
    background: linear-gradient(180deg, #10b981, #059669);
}

.notification-status.failed {
    background: linear-gradient(180deg, #ef4444, #dc2626);
}

@keyframes pulseGlow {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.6;
    }
}

/* 加载旋转动画 */
.notification-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(139, 92, 246, 0.3);
    border-top-color: #8b5cf6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* 通知操作按钮 */
.notification-action {
    background: rgba(139, 92, 246, 0.1);
    border: 1px solid rgba(139, 92, 246, 0.3);
    color: #c4b5fd;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    transition: all 0.2s ease;
    cursor: pointer;
}

.notification-action:hover {
    background: rgba(139, 92, 246, 0.2);
    border-color: rgba(139, 92, 246, 0.5);
}

/* 关闭按钮 */
.notification-close {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    border: none;
    color: #9ca3af;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    z-index: 10;
    line-height: 1;
}

.notification-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    transform: scale(1.1);
}

/* 通知进度条 */
.notification-progress-bar {
    height: 2px;
    background: rgba(139, 92, 246, 0.2);
    border-radius: 2px;
    overflow: hidden;
    margin-top: 8px;
}

.notification-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #8b5cf6, #ec4899);
    transition: width 0.3s ease;
    border-radius: 2px;
}

/* 按钮加载状态 */
#generate-button.loading {
    position: relative;
}

#generate-button.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    right: 20px;
    width: 20px;
    height: 20px;
    margin-top: -10px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* ========================================
   导航栏样式
   ======================================== */

.nav-link {
    color: #9ca3af;
    font-weight: 500;
    transition: color 0.2s ease;
    padding: 0.5rem 0;
}

.nav-link:hover {
    color: #ffffff;
}

.nav-link.active {
    color: #a78bfa;
    font-weight: 600;
    position: relative;
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, #8b5cf6, #ec4899);
    border-radius: 2px;
}

/* ========================================
   我的视频页面样式
   ======================================== */

/* 筛选按钮 */
.filter-btn {
    padding: 8px 16px;
    border-radius: 8px;
    background: rgba(139, 92, 246, 0.1);
    border: 1px solid rgba(139, 92, 246, 0.3);
    color: #c4b5fd;
    font-size: 14px;
    transition: all 0.2s ease;
    cursor: pointer;
}

.filter-btn:hover {
    background: rgba(139, 92, 246, 0.2);
    border-color: rgba(139, 92, 246, 0.5);
}

.filter-btn.active {
    background: linear-gradient(135deg, #8b5cf6, #ec4899);
    border-color: transparent;
    color: white;
    font-weight: 600;
}

