/* 讯飞星火PPT生成器前台样式 */

/* 避免与WordPress主题冲突，使用更具体的选择器 */

/* 全局样式重置 - 只在插件容器内生效 */
.xfyun-ppt-generator-frontend * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.xfyun-ppt-generator-frontend {
    min-height: 100vh;
    display: flex;
    background-color: #ffffff;
    font-family: 'PingFang SC', 'Microsoft YaHei', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: #333;
    line-height: 1.6;
}

/* 左侧导航栏 */
.xfyun-ppt-generator-frontend .xfyun-sidebar {
    width: 80px;
    background-color: #f8f9fa;
    border-right: 1px solid #e5e7eb;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px 0;
}

.xfyun-ppt-generator-frontend .sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.xfyun-ppt-generator-frontend .nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 12px 16px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
}

.xfyun-ppt-generator-frontend .nav-item:hover {
    background-color: #f0f4ff;
}

.xfyun-ppt-generator-frontend .nav-item.active {
    background-color: #e6f0ff;
    color: #4a6cf7;
}

.xfyun-ppt-generator-frontend .nav-icon {
    font-size: 20px;
    margin-bottom: 4px;
}

.xfyun-ppt-generator-frontend .nav-text {
    font-size: 10px;
    font-weight: 500;
}

/* 主内容区域 */
.xfyun-ppt-generator-frontend .main-content {
    flex: 1;
    padding: 24px 32px;
    overflow-y: auto;
    background-color: #ffffff;
}

/* 顶部标题 */
.xfyun-ppt-generator-frontend .page-header {
    margin-bottom: 32px;
    text-align: left;
}

.xfyun-ppt-generator-frontend .page-title {
    font-size: 24px;
    font-weight: 700;
    color: #333;
}

.xfyun-ppt-generator-frontend .title-sub {
    font-size: 16px;
    font-weight: 400;
    color: #4a6cf7;
    margin-left: 8px;
}

/* 搜索区域 */
.xfyun-ppt-generator-frontend .search-section {
    margin-bottom: 32px;
}

.xfyun-ppt-generator-frontend .search-box {
    background-color: #ffffff;
    border-radius: 12px;
    padding: 20px;
    position: relative;
    margin-bottom: 20px;
    border: 1px solid #e5e7eb;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.xfyun-ppt-generator-frontend .search-input {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-size: 14px;
    margin-bottom: 16px;
    outline: none;
    transition: all 0.3s ease;
    background-color: #f8f9fa;
}

.xfyun-ppt-generator-frontend .search-input:focus {
    border-color: #4a6cf7;
    box-shadow: 0 0 0 2px rgba(74, 108, 247, 0.1);
    background-color: #ffffff;
}

.xfyun-ppt-generator-frontend .search-options {
    display: flex;
    gap: 10px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.xfyun-ppt-generator-frontend .option-btn {
    padding: 6px 12px;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    background-color: #ffffff;
    font-size: 12px;
    font-weight: 400;
    cursor: pointer;
    transition: all 0.3s ease;
}

.xfyun-ppt-generator-frontend .option-btn.active {
    background-color: #4a6cf7;
    color: white;
    border-color: #4a6cf7;
}

.xfyun-ppt-generator-frontend .option-btn:hover {
    border-color: #4a6cf7;
    color: #4a6cf7;
}

.xfyun-ppt-generator-frontend .search-icons {
    position: absolute;
    top: 20px;
    right: 20px;
    display: flex;
    gap: 12px;
}

.xfyun-ppt-generator-frontend .search-icon {
    font-size: 16px;
    cursor: pointer;
    color: #666;
    transition: color 0.3s ease;
}

.xfyun-ppt-generator-frontend .search-icon:hover {
    color: #4a6cf7;
}

/* 操作按钮 */
.xfyun-ppt-generator-frontend .action-buttons {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    margin-top: 16px;
}

.xfyun-ppt-generator-frontend .action-btn {
    padding: 10px 20px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background-color: #ffffff;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.xfyun-ppt-generator-frontend .action-icon {
    font-size: 16px;
}

.xfyun-ppt-generator-frontend .action-btn.active {
    background-color: #e6f0ff;
    color: #4a6cf7;
    border-color: #4a6cf7;
}

.xfyun-ppt-generator-frontend .action-btn:hover {
    border-color: #4a6cf7;
    color: #4a6cf7;
}

.xfyun-ppt-generator-frontend .action-btn.active:hover {
    background-color: #d6e7ff;
}

/* 演示工坊 */
.xfyun-ppt-generator-frontend .workshop-section {
    margin-bottom: 32px;
}

.xfyun-ppt-generator-frontend .section-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 16px;
    color: #333;
}

.xfyun-ppt-generator-frontend .workshop-banner {
    background: linear-gradient(135deg, #4a6cf7 0%, #6b8cff 100%);
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: none;
}

.xfyun-ppt-generator-frontend .banner-text {
    font-size: 14px;
    color: white;
    font-weight: 500;
}

.xfyun-ppt-generator-frontend .banner-link {
    font-size: 14px;
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    background-color: rgba(255, 255, 255, 0.2);
    padding: 4px 12px;
    border-radius: 16px;
}

.xfyun-ppt-generator-frontend .banner-link:hover {
    background-color: rgba(255, 255, 255, 0.3);
    text-decoration: none;
}

.xfyun-ppt-generator-frontend .workshop-grid {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    padding-bottom: 10px;
}

.xfyun-ppt-generator-frontend .workshop-card {
    min-width: 280px;
    background-color: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 20px;
    position: relative;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.xfyun-ppt-generator-frontend .workshop-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.xfyun-ppt-generator-frontend .workshop-card.featured {
    border-color: #4a6cf7;
    background-color: #f0f4ff;
    box-shadow: 0 4px 12px rgba(74, 108, 247, 0.1);
}

.xfyun-ppt-generator-frontend .workshop-icon {
    width: 48px;
    height: 48px;
    margin-bottom: 16px;
}

.xfyun-ppt-generator-frontend .workshop-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 4px;
}

.xfyun-ppt-generator-frontend .workshop-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
    color: #333;
}

.xfyun-ppt-generator-frontend .workshop-tag {
    display: inline-block;
    padding: 4px 12px;
    background-color: #e6f7ff;
    color: #00b4ff;
    border-radius: 12px;
    font-size: 10px;
    font-weight: 500;
    margin-bottom: 8px;
}

.xfyun-ppt-generator-frontend .workshop-desc {
    font-size: 14px;
    color: #666;
    line-height: 1.4;
    margin-top: 8px;
}

/* 最近项目 */
.xfyun-ppt-generator-frontend .recent-section {
    margin-bottom: 32px;
}

.xfyun-ppt-generator-frontend .section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.xfyun-ppt-generator-frontend .section-more {
    color: #4a6cf7;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.xfyun-ppt-generator-frontend .section-more:hover {
    text-decoration: underline;
}

.xfyun-ppt-generator-frontend .recent-item {
    background-color: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 0;
    display: flex;
    gap: 0;
    transition: all 0.3s ease;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.xfyun-ppt-generator-frontend .recent-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.xfyun-ppt-generator-frontend .recent-thumbnail {
    width: 150px;
    height: 100px;
    flex-shrink: 0;
}

.xfyun-ppt-generator-frontend .recent-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 0;
}

.xfyun-ppt-generator-frontend .recent-info {
    flex: 1;
    padding: 16px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.xfyun-ppt-generator-frontend .recent-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
    color: #333;
}

.xfyun-ppt-generator-frontend .recent-date {
    font-size: 12px;
    color: #999;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .xfyun-ppt-generator-frontend {
        flex-direction: column;
    }
    
    .xfyun-ppt-generator-frontend .xfyun-sidebar {
        width: 100%;
        height: 60px;
        flex-direction: row;
        justify-content: space-around;
        padding: 10px;
        border-right: none;
        border-bottom: 1px solid #e5e7eb;
    }
    
    .xfyun-ppt-generator-frontend .sidebar-nav {
        flex-direction: row;
        gap: 10px;
    }
    
    .xfyun-ppt-generator-frontend .nav-item {
        padding: 8px 12px;
    }
    
    .xfyun-ppt-generator-frontend .nav-text {
        display: none;
    }
    
    .xfyun-ppt-generator-frontend .main-content {
        padding: 16px;
    }
    
    .xfyun-ppt-generator-frontend .page-header {
        margin-bottom: 20px;
    }
    
    .xfyun-ppt-generator-frontend .page-title {
        font-size: 20px;
    }
    
    .xfyun-ppt-generator-frontend .title-sub {
        font-size: 14px;
    }
    
    .xfyun-ppt-generator-frontend .search-options {
        flex-wrap: wrap;
    }
    
    .xfyun-ppt-generator-frontend .action-buttons {
        flex-wrap: wrap;
    }
    
    .xfyun-ppt-generator-frontend .workshop-grid {
        flex-wrap: wrap;
    }
    
    .xfyun-ppt-generator-frontend .workshop-card {
        flex: 1;
        min-width: calc(50% - 8px);
    }
    
    .xfyun-ppt-generator-frontend .recent-item {
        flex-direction: column;
    }
    
    .xfyun-ppt-generator-frontend .recent-thumbnail {
        width: 100%;
        height: 120px;
    }
}

/* 滚动条样式 - 只在插件容器内生效 */
.xfyun-ppt-generator-frontend ::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

.xfyun-ppt-generator-frontend ::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.xfyun-ppt-generator-frontend ::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.xfyun-ppt-generator-frontend ::-webkit-scrollbar-thumb:hover {
    background: #a1a1a1;
}

/* 加载动画 */
@keyframes xfyun-ppt-pulse {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.05);
        opacity: 0.8;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.xfyun-ppt-generator-frontend .loading {
    animation: xfyun-ppt-pulse 1.5s infinite;
}

/* 成功/错误消息 */
.xfyun-ppt-generator-frontend .success-message {
    background-color: #d1fae5;
    color: #065f46;
    padding: 12px;
    border-radius: 6px;
    margin: 12px 0;
    border: 1px solid #a7f3d0;
    font-size: 14px;
}

.xfyun-ppt-generator-frontend .error-message {
    background-color: #fee2e2;
    color: #991b1b;
    padding: 12px;
    border-radius: 6px;
    margin: 12px 0;
    border: 1px solid #fecaca;
    font-size: 14px;
}