/**
 * 一人一册（一人一册）首页样式
 * @author  云蓝图科技
 * @date    2024年12月25日
 * @version 1.0.0
 */

/* ================================
   首页模块入口
================================ */
.home-modules {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    padding: 16px;
    background: #fff;
    border-radius: 12px;
    margin: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.home-module-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
}

.home-module-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    margin-bottom: 6px;
}

.home-module-icon.album {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
}

.home-module-icon.people {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: #fff;
}

.home-module-icon.place {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: #fff;
}

.home-module-icon.timeline {
    background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
    color: #fff;
}

.home-module-icon.tags {
    background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
    color: #fff;
}

.home-module-icon.blindbox {
    background: linear-gradient(135deg, #a18cd1 0%, #fbc2eb 100%);
    color: #fff;
}

.home-module-icon.today {
    background: linear-gradient(135deg, #ff9a9e 0%, #fecfef 100%);
    color: #fff;
}

.home-module-icon.search {
    background: linear-gradient(135deg, #d299c2 0%, #fef9d7 100%);
    color: #fff;
}

.home-module-name {
    font-size: 12px;
    color: #666;
}

/* ================================
   今日回忆
================================ */
.home-today {
    margin: 16px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    overflow: hidden;
    position: relative;
}

.home-today-bg {
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    height: 100%;
    opacity: 0.3;
    font-size: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    background:url("../../static/img/m_index01.png") no-repeat;
}

.home-today-content {
    position: relative;
    z-index: 1;
    padding: 20px;
    color: #fff;
}

.home-today-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
}

.home-today-desc {
    font-size: 14px;
    opacity: 0.9;
    margin-bottom: 12px;
}

.home-today-photos {
    display: flex;
    gap: 8px;
}

.home-today-photo {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.home-today-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.home-today-more {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    color: #fff;
}

.home-today-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.home-today-link {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
}

.home-today-link i {
    margin-left: 4px;
}

.home-today-date {
    font-weight: 600;
    margin-right: 8px;
}

.home-today-count {
    opacity: 0.9;
}

.home-today-photo {
    position: relative;
}

.home-today-photo a {
    display: block;
    width: 100%;
    height: 100%;
}

.home-today-year {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.6));
    color: #fff;
    font-size: 10px;
    padding: 4px;
    text-align: center;
}

/* 没有历史照片时的样式 */
.home-today-empty {
    background: linear-gradient(135deg, #e0e0e0 0%, #f5f5f5 100%);
}

.home-today-empty .home-today-content {
    color: #666;
}

.home-today-empty .home-today-desc {
    color: #999;
}

.home-today-upload-btn {
    display: inline-flex;
    align-items: center;
    padding: 10px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border-radius: 20px;
    font-size: 14px;
    margin-top: 12px;
}

.home-today-upload-btn i {
    margin-right: 6px;
}

/* ================================
   最近上传
================================ */
.home-recent {
    margin: 16px;
}

.home-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.home-section-title {
    font-size: 17px;
    font-weight: 600;
    color: #333;
}

.home-section-more {
    font-size: 13px;
    color: #999;
    display: flex;
    align-items: center;
}

.home-section-more i {
    margin-left: 4px;
    font-size: 12px;
}

.home-recent-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4px;
}

.home-recent-item {
    aspect-ratio: 1;
    border-radius: 8px;
    overflow: hidden;
    background: #f5f5f5;
}

.home-recent-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ================================
   相册推荐
================================ */
.home-albums {
    margin: 16px;
}

.home-albums-scroll {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding-bottom: 8px;
    -webkit-overflow-scrolling: touch;
}

.home-albums-scroll::-webkit-scrollbar {
    display: none;
}

.home-album-card {
    flex-shrink: 0;
    width: 140px;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.home-album-cover {
    width: 140px;
    height: 100px;
    overflow: hidden;
    background: #f5f5f5;
}

.home-album-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.home-album-info {
    padding: 10px;
}

.home-album-name {
    font-size: 14px;
    font-weight: 500;
    color: #333;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.home-album-count {
    font-size: 12px;
    color: #999;
    margin-top: 2px;
}

/* ================================
   家庭成员
================================ */
.home-family {
    margin: 16px;
}

.home-family-scroll {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.home-family-scroll::-webkit-scrollbar {
    display: none;
}

.home-family-item {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.home-family-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    overflow: hidden;
    background: #f5f5f5;
    margin-bottom: 6px;
    border: 2px solid #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.home-family-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.home-family-name {
    font-size: 12px;
    color: #666;
    max-width: 60px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-align: center;
}

.home-family-add {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: #ccc;
    margin-bottom: 6px;
}

/* ================================
   统计卡片
================================ */
.home-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin: 16px;
}

.home-stat-card {
    background: #fff;
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.home-stat-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    margin-bottom: 12px;
}

.home-stat-icon.photos {
    background: rgba(99, 102, 241, 0.1);
    color: #6366f1;
}

.home-stat-icon.albums {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
}

.home-stat-icon.people {
    background: rgba(245, 158, 11, 0.1);
    color: #f59e0b;
}

.home-stat-icon.places {
    background: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
}

.home-stat-num {
    font-size: 24px;
    font-weight: 700;
    color: #333;
    margin-bottom: 4px;
}

.home-stat-label {
    font-size: 13px;
    color: #999;
}

/* ================================
   记忆盲盒入口
================================ */
.home-blindbox {
    margin: 16px;
    background: linear-gradient(135deg, #a18cd1 0%, #fbc2eb 100%);
    border-radius: 12px;
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.home-blindbox-content {
    color: #fff;
}

.home-blindbox-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 4px;
}

.home-blindbox-desc {
    font-size: 13px;
    opacity: 0.9;
}

.home-blindbox-btn {
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: #fff;
}

/* ================================
   搜索栏
================================ */
.home-search {
    margin: 16px;
}

.home-search-input {
    display: flex;
    align-items: center;
    height: 44px;
    padding: 0 16px;
    background: #fff;
    border-radius: 22px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.home-search-input i {
    font-size: 18px;
    color: #999;
    margin-right: 10px;
}

.home-search-input span {
    font-size: 14px;
    color: #999;
}

/* ================================
   通知横幅
================================ */
.home-notice {
    margin: 0 16px;
    padding: 12px 16px;
    background: #fffbeb;
    border-radius: 8px;
    display: flex;
    align-items: center;
}

.home-notice-icon {
    width: 32px;
    height: 32px;
    background: #fef3c7;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: #f59e0b;
    margin-right: 12px;
    flex-shrink: 0;
}

.home-notice-text {
    flex: 1;
    font-size: 13px;
    color: #92400e;
}

.home-notice-close {
    font-size: 16px;
    color: #d97706;
    padding: 4px;
}

