/* 
 * index.php 自定义样式
 * 包含登录弹窗等首页特定样式
 */

/* 登录弹窗居中样式 */
#loginModal .modal-dialog {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    margin: 0 !important;
    max-width: 770px !important;
    width: 770px !important;
}

/* 确保模态框内容不会被压缩 */
#loginModal .modal-content {
    min-width: 630px;
}

/* 前台样式预览高度限制 */
.template-preview {
    max-height: 350px !important;
    overflow: hidden !important;
}

.template-preview * {
    max-height: 350px !important;
}

.template-preview img {
    max-width: 100% !important;
    max-height: 350px !important;
    height: auto !important;
}

/* ========== 懒加载相关样式 ========== */

/* 加载指示器 */
.loading-indicator {
    text-align: center;
    padding: 20px;
    color: #999;
    font-size: 14px;
    margin-top: 20px;
}

.loading-indicator .loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 8px;
    vertical-align: middle;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* “已经到底了”提示 */
.no-more {
    text-align: center;
    padding: 20px;
    color: #ccc;
    font-size: 13px;
    border-top: 1px solid #eee;
    margin-top: 20px;
    margin-bottom: 20px;
}

/* 模板网格容器滚动优化 */
#template-grid {
    overflow-y: auto;
    -webkit-overflow-scrolling: touch; /* iOS平滑滚动 */
}

/* 加载触发器（隐藏） */
#lazy-load-trigger {
    height: 1px;
    width: 100%;
    visibility: hidden;
}
