/* 前台页面样式 */

.hero-section {
    text-align: center;
    padding: 40px 0;
}

.hero-section h2 {
    font-size: 32px;
    color: #2c3e50;
    margin-bottom: 10px;
}

.hero-section p {
    color: #7f8c8d;
    font-size: 16px;
}

.parse-section {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px;
}

.parse-form {
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.08);
}

.input-group {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.input-group input {
    flex: 1;
    min-width: 200px;
    padding: 14px 18px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 15px;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.input-group input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.input-group button {
    padding: 14px 20px;
    font-size: 15px;
    font-weight: 500;
    white-space: nowrap;
}

.platform-hints {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.hint-tag {
    background: linear-gradient(135deg, #f5f7fa 0%, #e4e8ec 100%);
    color: #4a5568;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
}

/* 加载状态 */
.loading-section {
    text-align: center;
    padding: 60px 20px;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #f0f0f0;
    border-top-color: #667eea;
    border-radius: 50%;
    margin: 0 auto 20px;
    animation: spin 1s linear infinite;
}

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

.loading-section p {
    color: #7f8c8d;
    font-size: 15px;
}

/* 错误状态 */
.error-section {
    max-width: 500px;
    margin: 40px auto;
    text-align: center;
}

.error-card {
    background: #fff3f3;
    border: 1px solid #ffcdcd;
    border-radius: 12px;
    padding: 40px;
}

.error-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.error-card p {
    color: #dc3545;
    font-size: 16px;
    margin-bottom: 20px;
}

/* 解析结果 */
.result-section {
    max-width: 1000px;
    margin: 30px auto;
    padding: 0 20px;
}

.result-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.08);
    overflow: hidden;
}

.result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid #eee;
    background: linear-gradient(135deg, #f8f9fa 0%, #fff 100%);
}

.result-header h3 {
    font-size: 18px;
    color: #2c3e50;
    margin: 0;
}

.result-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    padding: 30px;
}

/* 预览区域 */
.result-left {
    display: flex;
    flex-direction: column;
}

.preview-area {
    border-radius: 10px;
    overflow: hidden;
    background: #f8f9fa;
    aspect-ratio: 16/9;
    display: flex;
    align-items: center;
    justify-content: center;
}

.preview-area img,
.preview-area video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.3s ease;
}

/* 右侧信息 */
.result-right {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.desc-section {
    padding: 16px;
    background: #f8f9fa;
    border-radius: 8px;
}

.desc-wrapper {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.desc-wrapper p {
    color: #333;
    font-size: 14px;
    line-height: 1.6;
    margin: 0;
    word-break: break-all;
}

.desc-wrapper .btn-small {
    align-self: flex-start;
}

/* 小按钮样式 */
.btn-small {
    padding: 6px 12px !important;
    font-size: 13px !important;
    background: #e8f4f8 !important;
    color: #333 !important;
    border: 1px solid #d0e8ef !important;
}

.btn-small:hover {
    background: #d0e8ef !important;
}

/* 封面操作区域 */
.cover-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #e0e0e0;
}

/* 作者信息 */
.author-section {
    padding: 12px;
    background: white;
    border: 1px solid #eee;
    border-radius: 8px;
}

.author-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.author-info img {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
}

.author-info span {
    color: #2c3e50;
    font-weight: 500;
}

.action-section {
    margin-top: auto;
}

/* 视频下载按钮 */
#videoActions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: center;
}

/* 图片列表 */
.images-title {
    color: #4a5568;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 12px;
}

.images-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 10px;
}

.image-item {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    aspect-ratio: 1;
    background: #f0f0f0;
}

.image-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.image-download {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0,0,0,0.7);
    color: white;
    padding: 8px;
    text-align: center;
    font-size: 12px;
    cursor: pointer;
    transition: opacity 0.3s;
}

.image-download:hover {
    opacity: 0.9;
}

/* 功能特性区域 */
.features-section {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin: 60px auto;
    max-width: 900px;
    padding: 0 20px;
}

.feature-card {
    background: white;
    padding: 30px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    transition: transform 0.3s, box-shadow 0.3s;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

.feature-icon {
    font-size: 40px;
    margin-bottom: 16px;
}

.feature-card h3 {
    color: #2c3e50;
    font-size: 18px;
    margin-bottom: 10px;
}

.feature-card p {
    color: #7f8c8d;
    font-size: 14px;
    line-height: 1.6;
}

/* 页脚 */
.footer {
    text-align: center;
    padding: 30px;
    color: #7f8c8d;
    font-size: 14px;
}

/* 响应式 */
@media (max-width: 768px) {
    .hero-section h2 {
        font-size: 24px;
    }
    
    .input-group {
        flex-direction: column;
    }
    
    .input-group input,
    .input-group button {
        width: 100%;
    }
    
    .result-content {
        grid-template-columns: 1fr;
    }
    
    .features-section {
        grid-template-columns: 1fr;
    }
    
    .images-list {
        grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    }
    
    .desc-wrapper {
        align-items: stretch;
    }
    
    .btn-small {
        width: 100%;
        text-align: center;
    }
    
    .cover-actions {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .cover-actions .btn-small {
        width: 100%;
    }
}
