/* ============================================
   约拍平台全局样式 (app.css)
   配合Tailwind CSS使用
   ============================================ */

/* 安全区域适配(iPhone刘海屏) */
.safe-area-bottom {
    padding-bottom: env(safe-area-inset-bottom, 0);
}

/* 文字截断 */
.line-clamp-1 { display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.line-clamp-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.line-clamp-3 { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

/* 图片上传预览 */
.upload-zone {
    border: 2px dashed #e5e7eb;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
}
.upload-zone:hover, .upload-zone.dragover {
    border-color: #ec4899;
    background-color: #fdf2f8;
}
.upload-preview {
    position: relative;
    display: inline-block;
}
.upload-preview .remove-btn {
    position: absolute;
    top: -6px;
    right: -6px;
    width: 20px;
    height: 20px;
    background: #ef4444;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    cursor: pointer;
    line-height: 1;
}

/* 瀑布流布局(作品) */
.masonry {
    columns: 2;
    column-gap: 12px;
}
@media (min-width: 768px) {
    .masonry { columns: 3; }
}
@media (min-width: 1024px) {
    .masonry { columns: 4; }
}
.masonry-item {
    break-inside: avoid;
    margin-bottom: 12px;
}

/* 标签选择器 */
.tag-select {
    display: inline-flex;
    align-items: center;
    padding: 6px 14px;
    border: 1px solid #e5e7eb;
    border-radius: 999px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
    user-select: none;
}
.tag-select:hover { border-color: #ec4899; }
.tag-select.active {
    border-color: #ec4899;
    background-color: #fdf2f8;
    color: #ec4899;
}

/* 模态框 */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 100;
    display: flex;
    align-items: flex-end;
    justify-content: center;
}
@media (min-width: 768px) {
    .modal-overlay { align-items: center; }
}
.modal-content {
    background: white;
    border-radius: 16px 16px 0 0;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
    animation: slideUp 0.3s ease;
}
@media (min-width: 768px) {
    .modal-content {
        max-width: 500px;
        border-radius: 16px;
        animation: fadeIn 0.2s ease;
    }
}
@keyframes slideUp { from { transform: translateY(100%); } to { transform: translateY(0); } }
@keyframes fadeIn { from { opacity: 0; transform: scale(0.95); } to { opacity: 1; transform: scale(1); } }

/* 评分星星 */
.star-rating { display: inline-flex; gap: 4px; }
.star-rating .star {
    width: 20px;
    height: 20px;
    cursor: pointer;
    color: #d1d5db;
    transition: color 0.2s;
}
.star-rating .star.active { color: #f59e0b; }
.star-rating .star:hover { color: #fbbf24; }

/* 加载动画 */
.loading-spinner {
    width: 24px;
    height: 24px;
    border: 3px solid #f3f4f6;
    border-top-color: #ec4899;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* 下拉刷新提示 */
.pull-indicator {
    text-align: center;
    padding: 10px;
    color: #9ca3af;
    font-size: 13px;
}

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #9ca3af;
}
.empty-state svg {
    width: 80px;
    height: 80px;
    margin: 0 auto 16px;
    color: #d1d5db;
}
