/* ======================================== */
/*           AI动漫页面样式                  */
/* ======================================== */

.ai-anime-content {
    display: none; /* 默认隐藏，通过JS控制显示 */
    position: fixed;
    left: var(--sidebar-width);
    top: 60px; /* 与motion-replace-content保持一致 */
    width: calc(100% - var(--sidebar-width));
    height: calc(100vh - 60px); /* 调整高度以匹配top值 */
    background: transparent; /* 设置为透明 */
    z-index: 5; /* 降低z-index，避免覆盖其他内容 */
}

/* AI动漫创建面板 */
.anime-create-panel {
    width: var(--quick-create-width);
    height: calc(100vh - 60px); /* 调整高度以匹配top值 */
    background: var(--sidebar-bg-light); /* 与motion-upload-section保持一致 */
    border-right: 1px solid var(--border-color);
    display: none; /* 默认隐藏 */
    flex-direction: column;
    position: fixed;
    left: var(--sidebar-width);
    top: 60px; /* 与motion-upload-section保持一致 */
    z-index: 5; /* 与内容区域保持一致 */
    overflow-y: auto;
    transition: transform 0.3s ease;
}

.anime-create-panel .quick-create-tabs {
    display: flex;
    gap: 0;
    padding: 20px 20px 0 20px;
    border-bottom: 1px solid var(--border-color);
}

.anime-create-panel .quick-tab-btn {
    flex: 1;
    padding: 8px 12px;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 13px;
    cursor: pointer;
    transition: all 0.3s ease;
    border-bottom: 2px solid transparent;
    position: relative;
}

.anime-create-panel .quick-tab-btn:hover {
    color: var(--text-primary);
}

.anime-create-panel .quick-tab-btn.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

.anime-create-panel .quick-create-content {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
}

.anime-create-panel .quick-form {
    display: none;
}

.anime-create-panel .quick-form.active {
    display: block;
}

.anime-create-panel .form-group {
    margin-bottom: 20px;
}

.anime-create-panel .label-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.anime-create-panel .form-label {
    font-size: 14px;
    color: var(--text-primary);
    font-weight: 500;
}

.anime-create-panel .form-label.required::after {
    content: '*';
    color: var(--danger-color);
    margin-left: 4px;
}

.anime-create-panel .cost-hint {
    font-size: 12px;
    color: var(--warning-color);
    display: flex;
    align-items: center;
    gap: 4px;
}

.anime-create-panel .form-input {
    width: 100%;
    padding: 10px 12px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-primary);
    font-size: 14px;
    transition: all 0.3s ease;
}

.anime-create-panel .form-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(74, 222, 128, 0.1);
}

.anime-create-panel .form-textarea {
    resize: vertical;
    min-height: 80px;
}

.anime-create-panel .upload-area {
    border: 2px dashed var(--border-color);
    border-radius: 8px;
    padding: 30px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.anime-create-panel .upload-area:hover {
    border-color: var(--primary-color);
    background: rgba(74, 222, 128, 0.05);
}

.anime-create-panel .upload-icon {
    font-size: 48px;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.anime-create-panel .upload-area p {
    color: var(--text-primary);
    margin-bottom: 5px;
}

.anime-create-panel .upload-area span {
    color: var(--text-secondary);
    font-size: 12px;
    display: block;
}

.anime-create-panel .size-hint {
    margin-top: 5px;
    color: var(--text-secondary) !important;
}

.anime-create-panel .video-preview {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
}

.anime-create-panel .video-preview video {
    width: 100%;
    border-radius: 8px;
}

.anime-create-panel .remove-video-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.7);
    border: none;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.anime-create-panel .remove-video-btn:hover {
    background: var(--danger-color);
}

.anime-create-panel .char-counter {
    text-align: right;
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 5px;
}

.anime-create-panel .ratio-options {
    display: flex;
    gap: 10px;
}

.anime-create-panel .ratio-option {
    flex: 1;
    padding: 12px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.anime-create-panel .ratio-option:hover {
    border-color: var(--primary-color);
}

.anime-create-panel .ratio-option.selected {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.anime-create-panel .quick-create-buttons {
    margin-top: 20px;
}

.anime-create-panel .create-btn-quick {
    width: 100%;
    padding: 12px 24px;
    background: var(--gradient-primary);
    border: none;
    border-radius: 8px;
    color: white;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.anime-create-panel .create-btn-quick:hover {
    transform: translateY(-2px);
    box-shadow: var(--glow-primary);
}

.anime-create-panel .create-btn-quick:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* 右侧作品展示容器 */
.anime-container {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
    position: fixed;
    left: calc(var(--sidebar-width) + var(--quick-create-width) + 20px);
    top: 90px;
    right: 30px;
    bottom: 30px;
    overflow-y: auto;
}

.anime-container:hover {
    border-color: rgba(74, 222, 128, 0.3);
    box-shadow: 0 4px 20px rgba(74, 222, 128, 0.1);
}

.anime-section {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.section-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-title i {
    color: var(--primary-color);
}

.anime-works-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    flex: 1;
    overflow-y: auto;
    max-height: calc(100vh - 200px);
    padding-right: 10px;
}

.anime-works-grid::-webkit-scrollbar {
    width: 8px;
}

.anime-works-grid::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
}

.anime-works-grid::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 10px;
}

.anime-works-grid::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary);
}

/* 右侧区块样式 */
.right-section {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 24px;
    transition: all 0.3s ease;
}

.right-section:hover {
    border-color: var(--primary-color);
    box-shadow: var(--glow-primary);
}

/* 区块标题 */
.right-section-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.right-section-title i {
    color: var(--primary-color);
    font-size: 20px;
}

/* 视频滑块容器 */
.video-slider-container {
    position: relative;
    display: flex;
    align-items: center;
    gap: 15px;
}

.video-slider-wrapper {
    flex: 1;
    overflow: hidden;
    position: relative;
}

.video-slider {
    display: flex;
    gap: 15px;
    transition: transform 0.3s ease;
    min-height: 200px;
}

/* 滑块按钮 */
.slider-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--card-bg-hover);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.slider-btn:hover:not(:disabled) {
    background: var(--primary-color);
    border-color: var(--primary-color);
    box-shadow: var(--glow-primary);
}

.slider-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

/* 动漫卡片样式 */
.anime-card {
    min-width: 200px;
    background: var(--card-bg-hover);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
}

.anime-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary-color);
    box-shadow: var(--glow-primary);
}

.anime-thumbnail {
    position: relative;
    width: 100%;
    height: 150px;
    overflow: hidden;
    background: #000;
}

.anime-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.anime-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.anime-card:hover .anime-overlay {
    opacity: 1;
}

.anime-action-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--primary-color);
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.anime-action-btn:hover {
    transform: scale(1.2);
    box-shadow: var(--glow-primary);
}

.anime-info {
    padding: 15px;
}

.anime-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.anime-date {
    font-size: 12px;
    color: var(--text-secondary);
}

/* 作品容器 */
.works-container-mini {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
    min-height: 200px;
}

/* 加载状态 */
.works-loading-mini,
.loading-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px;
    color: var(--text-secondary);
    gap: 10px;
}

.works-loading-mini i,
.loading-state i {
    font-size: 32px;
    animation: spin 1s linear infinite;
}

/* 空状态 */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px;
    color: var(--text-secondary);
    gap: 10px;
}

.empty-state i {
    font-size: 48px;
    opacity: 0.5;
}

.empty-state p {
    font-size: 14px;
}

/* 旋转动画 */
@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* 响应式设计 */
@media (max-width: 1200px) {
    .ai-anime-content {
        padding: 20px;
    }
}

@media (max-width: 768px) {
    .ai-anime-content {
        padding: 15px;
    }
    
    .works-container-mini {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
    
    .anime-card {
        min-width: 150px;
    }
}

