/* 移动端原型通用样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background-color: #f5f7fa;
    color: #1f2937;
    height: 100vh;
    overflow: hidden; /* 防止body滚动，由app-content滚动 */
}

/* 模拟手机容器 */
.mobile-container {
    max-width: 480px;
    height: 100%;
    margin: 0 auto;
    background: white;
    position: relative;
    display: flex;
    flex-direction: column;
    box-shadow: 0 0 20px rgba(0,0,0,0.05);
}

/* 顶部导航 */
.app-header {
    height: 56px;
    padding: 0 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: white;
    border-bottom: 1px solid #f0f0f0;
    flex-shrink: 0;
    z-index: 10;
}

.logo-text {
    font-size: 18px;
    font-weight: 700;
    color: #6366f1;
}

.header-right i {
    font-size: 20px;
    color: #4b5563;
}

/* 主要内容滚动区 */
.app-content {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    background: #f9fafb;
    scroll-behavior: smooth;
}

/* 底部导航 */
.bottom-nav {
    height: 60px;
    background: white;
    border-top: 1px solid #f0f0f0;
    display: flex;
    justify-content: space-around;
    align-items: center;
    flex-shrink: 0;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    color: #9ca3af;
    font-size: 10px;
    cursor: pointer;
    width: 100%;
    height: 100%;
}

.nav-item i {
    font-size: 20px;
    margin-bottom: 2px;
}

.nav-item.active {
    color: #6366f1;
}

/* Tab切换逻辑 */
.tab-pane {
    display: none;
    padding-bottom: 20px;
}

.tab-pane.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

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

/* 首页组件 */
.banner-swiper {
    padding: 16px;
}

.banner-item {
    height: 140px;
    border-radius: 16px;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: white;
    box-shadow: 0 8px 20px rgba(99, 102, 241, 0.2);
}

.banner-text h3 {
    font-size: 20px;
    margin-bottom: 4px;
}

.banner-text p {
    font-size: 12px;
    opacity: 0.9;
    margin-bottom: 12px;
}

.banner-btn {
    background: white;
    color: #6366f1;
    border: none;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.banner-img {
    font-size: 60px;
}

/* 金刚区 */
.quick-nav {
    display: flex;
    justify-content: space-around;
    padding: 8px 16px 24px;
    background: white;
    margin-bottom: 12px;
}

.quick-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.quick-icon {
    width: 48px;
    height: 48px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.quick-item span {
    font-size: 12px;
    color: #4b5563;
}

/* 分区标题 */
.section-header {
    padding: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: white;
}

.section-header h3 {
    font-size: 16px;
    font-weight: 700;
}

.more-link {
    font-size: 12px;
    color: #9ca3af;
}

/* 应用列表 */
.app-list {
    padding: 0 16px 16px;
    background: white;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.mobile-app-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    border: 1px solid #f0f0f0;
    border-radius: 12px;
    transition: all 0.2s;
}

.mobile-app-card:active {
    background: #f9fafb;
    transform: scale(0.98);
}

.app-icon-small {
    width: 48px;
    height: 48px;
    background: #f3f4f6;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.app-info {
    flex: 1;
}

.app-info h4 {
    font-size: 15px;
    margin-bottom: 4px;
}

.app-info p {
    font-size: 12px;
    color: #6b7280;
}

.try-btn {
    padding: 6px 16px;
    background: #f0f9ff;
    color: #0284c7;
    border: none;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

/* 广场 Tab */
.gallery-tabs {
    padding: 12px 16px;
    display: flex;
    gap: 24px;
    background: white;
    position: sticky;
    top: 0;
    z-index: 5;
    border-bottom: 1px solid #f0f0f0;
}

.g-tab {
    font-size: 14px;
    color: #6b7280;
    position: relative;
    padding-bottom: 8px;
}

.g-tab.active {
    color: #1f2937;
    font-weight: 600;
}

.g-tab.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 3px;
    background: #6366f1;
    border-radius: 2px;
}

.waterfall-grid {
    padding: 12px;
    column-count: 2;
    column-gap: 12px;
}

.feed-card {
    break-inside: avoid;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.feed-img {
    height: 180px; /* 模拟不同高度 */
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}
.feed-card:nth-child(2n) .feed-img {
    height: 220px;
}

.pet-emoji {
    font-size: 48px;
}

.feed-tag {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: rgba(0,0,0,0.5);
    color: white;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 10px;
}

.feed-info {
    padding: 10px;
}

.feed-title {
    font-size: 13px;
    margin-bottom: 8px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.feed-user {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 11px;
    color: #9ca3af;
}

.user-row {
    display: flex;
    align-items: center;
    gap: 4px;
}

.avatar {
    width: 16px;
    height: 16px;
    background: #f3f4f6;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
}

.like-row {
    display: flex;
    align-items: center;
    gap: 2px;
}

/* 我的 Tab */
.profile-header {
    padding: 40px 20px 30px;
    background: white;
    display: flex;
    align-items: center;
    gap: 16px;
}

.profile-avatar {
    width: 64px;
    height: 64px;
    background: #e0e7ff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    border: 2px solid white;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.profile-info h3 {
    font-size: 18px;
    margin-bottom: 4px;
}

.profile-info p {
    font-size: 12px;
    color: #9ca3af;
}

.profile-stats {
    display: flex;
    justify-content: space-around;
    padding: 0 20px 20px;
    background: white;
    margin-bottom: 12px;
}

.stat-box {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.stat-box .num {
    font-size: 18px;
    font-weight: 700;
    color: #1f2937;
}

.stat-box .label {
    font-size: 12px;
    color: #6b7280;
}

.menu-list {
    background: white;
    padding: 0 16px;
}

.menu-item {
    display: flex;
    align-items: center;
    padding: 16px 0;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
}

.menu-item:last-child {
    border-bottom: none;
}

.menu-item i {
    width: 24px;
    color: #4b5563;
    margin-right: 12px;
}

.menu-item span {
    font-size: 14px;
    flex: 1;
}

.menu-item .sub-text {
    font-size: 12px;
    color: #ef4444;
    margin-right: 8px;
}

.menu-item .arrow {
    width: auto;
    font-size: 12px;
    color: #d1d5db;
    margin-right: 0;
}
