/* 自定义样式 */

/* 模板卡片选中效果 */
.template-card {
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.template-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.template-card.selected {
    border-color: #3B82F6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* 海报画布样式 */
#poster-canvas {
    position: relative;
    overflow: hidden;
    background-size: cover;
    background-position: center;
}

/* 可编辑文本样式 */
#poster-headline, #poster-subheadline {
    transition: all 0.3s ease;
    padding: 8px;
    border-radius: 4px;
}

#poster-headline:hover, #poster-subheadline:hover {
    background-color: rgba(59, 130, 246, 0.1);
    outline: 2px dashed #3B82F6;
}

#poster-headline:focus, #poster-subheadline:focus {
    background-color: rgba(59, 130, 246, 0.1);
    outline: 2px solid #3B82F6;
}

/* 模板样式定义 */
.template-style-1 {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.template-style-2 {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
}

.template-style-3 {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: white;
}

/* 按钮加载状态 */
.btn-loading {
    position: relative;
    pointer-events: none;
}

.btn-loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    top: 50%;
    left: 50%;
    margin-left: -10px;
    margin-top: -10px;
    border: 2px solid transparent;
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 响应式调整 */
@media (max-width: 768px) {
    .template-card {
        margin-bottom: 1rem;
    }
    
    #poster-canvas {
        height: 300px;
    }
    
    #poster-headline {
        font-size: 1.5rem;
    }
    
    #poster-subheadline {
        font-size: 1rem;
    }
}

/* 动画效果 */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

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

/* 滚动平滑 */
html {
    scroll-behavior: smooth;
}

/* 输入框焦点效果增强 */
input:focus {
    transform: scale(1.02);
    transition: transform 0.2s ease;
}

/* 生成按钮悬停效果 */
#generate-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(59, 130, 246, 0.3);
}

/* 下载按钮悬停效果 */
#download-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(249, 115, 22, 0.3);
} 