* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* ==================== 首页样式 ==================== */
.home-page {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    min-height: 100vh;
    min-height: 100dvh;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
    overflow-x: hidden;
    overflow-y: auto;
}

.home-container {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.home-content {
    text-align: center;
    width: 100%;
    max-width: 900px;
}

.home-title {
    font-size: 48px;
    color: #fff;
    margin-bottom: 10px;
    font-weight: 300;
    letter-spacing: 4px;
    text-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.home-subtitle {
    color: rgba(255,255,255,0.6);
    font-size: 18px;
    margin-bottom: 50px;
    letter-spacing: 2px;
}

.album-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    padding: 20px;
}

.album-card {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
    min-height: 400px;
    -webkit-tap-highlight-color: transparent;
}

.album-card:active {
    transform: scale(0.98);
}

.album-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 30px 60px rgba(0,0,0,0.4);
}

.album-card-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    transition: transform 0.6s ease;
}

.album-card:hover .album-card-bg {
    transform: scale(1.1);
}

.album-card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        to top,
        rgba(0,0,0,0.8) 0%,
        rgba(0,0,0,0.3) 50%,
        rgba(0,0,0,0.1) 100%
    );
}

.album-card-content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    height: 100%;
    padding: 40px 30px;
    text-align: center;
}

.album-icon {
    font-size: 60px;
    margin-bottom: 15px;
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.3));
}

.album-title {
    color: #fff;
    font-size: 32px;
    font-weight: 600;
    margin-bottom: 8px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}
.album-title2 {
    color: #fff;
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 8px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.album-desc {
    color: rgba(255,255,255,0.7);
    font-size: 14px;
    margin-bottom: 20px;
    letter-spacing: 1px;
}

.album-btn {
    background: rgba(255,255,255,0.2);
    color: #fff;
    border: 1px solid rgba(255,255,255,0.3);
    padding: 12px 30px;
    border-radius: 50px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    letter-spacing: 1px;
}

.album-card:hover .album-btn {
    background: rgba(255,255,255,0.3);
    border-color: rgba(255,255,255,0.5);
}

/* ==================== 首页 - 平板适配 ==================== */
@media (max-width: 1024px) and (min-width: 769px) {
    .home-container {
        padding: 30px 25px;
    }

    .home-title {
        font-size: 40px;
        letter-spacing: 3px;
    }

    .home-subtitle {
        font-size: 16px;
        margin-bottom: 40px;
        letter-spacing: 1.5px;
    }

    .album-cards {
        grid-template-columns: repeat(2, 1fr);
        gap: 25px;
        padding: 15px;
    }

    .album-card {
        min-height: 380px;
        border-radius: 18px;
    }

    .album-icon {
        font-size: 55px;
    }

    .album-title {
        font-size: 28px;
    }

    .album-desc {
        font-size: 13px;
    }

    .album-btn {
        padding: 11px 28px;
        font-size: 15px;
    }
}

/* ==================== 首页 - 手机横屏适配 ==================== */
@media (max-width: 768px) and (orientation: landscape) {
    .home-container {
        padding: 20px;
    }

    .home-title {
        font-size: 28px;
        margin-bottom: 5px;
    }

    .home-subtitle {
        font-size: 14px;
        margin-bottom: 20px;
    }

    .album-cards {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
        padding: 10px;
    }

    .album-card {
        min-height: 280px;
        border-radius: 15px;
    }

    .album-card-content {
        padding: 20px 15px;
    }

    .album-icon {
        font-size: 40px;
        margin-bottom: 10px;
    }

    .album-title {
        font-size: 22px;
    }

    .album-desc {
        font-size: 11px;
        margin-bottom: 12px;
    }

    .album-btn {
        padding: 8px 20px;
        font-size: 13px;
    }
}

/* ==================== 首页 - 手机竖屏适配 ==================== */
@media (max-width: 768px) and (orientation: portrait) {
    .home-container {
        padding: 30px 20px;
        align-items: flex-start;
        padding-top: 60px;
    }

    .home-title {
        font-size: 36px;
        letter-spacing: 3px;
    }

    .home-subtitle {
        font-size: 15px;
        margin-bottom: 35px;
        letter-spacing: 1.5px;
    }

    .album-cards {
        grid-template-columns: 1fr;
        gap: 25px;
        padding: 10px;
    }

    .album-card {
        min-height: 350px;
        border-radius: 18px;
    }

    .album-card-content {
        padding: 35px 25px;
    }

    .album-icon {
        font-size: 55px;
        margin-bottom: 12px;
    }

    .album-title {
        font-size: 28px;
    }

    .album-desc {
        font-size: 13px;
        margin-bottom: 18px;
    }

    .album-btn {
        padding: 11px 28px;
        font-size: 15px;
    }
}

/* ==================== 首页 - 小屏手机适配 ==================== */
@media (max-width: 480px) {
    .home-container {
        padding: 25px 15px;
        padding-top: 40px;
    }

    .home-title {
        font-size: 28px;
        letter-spacing: 2px;
    }

    .home-subtitle {
        font-size: 13px;
        margin-bottom: 25px;
        letter-spacing: 1px;
    }

    .album-cards {
        gap: 20px;
        padding: 5px;
    }

    .album-card {
        min-height: 300px;
        border-radius: 15px;
    }

    .album-card-content {
        padding: 25px 20px;
    }

    .album-icon {
        font-size: 45px;
        margin-bottom: 10px;
    }

    .album-title {
        font-size: 24px;
    }

    .album-desc {
        font-size: 12px;
        margin-bottom: 15px;
    }

    .album-btn {
        padding: 10px 24px;
        font-size: 14px;
    }
}

/* ==================== 首页 - 超小屏手机适配 ==================== */
@media (max-width: 360px) {
    .home-container {
        padding: 20px 10px;
        padding-top: 30px;
    }

    .home-title {
        font-size: 24px;
    }

    .home-subtitle {
        font-size: 12px;
        margin-bottom: 20px;
    }

    .album-card {
        min-height: 250px;
        border-radius: 12px;
    }

    .album-card-content {
        padding: 20px 15px;
    }

    .album-icon {
        font-size: 38px;
    }

    .album-title {
        font-size: 20px;
    }

    .album-btn {
        padding: 8px 20px;
        font-size: 13px;
    }
}

/* ==================== 首页 - 大屏优化 ==================== */
@media (min-width: 1400px) {
    .home-content {
        max-width: 1200px;
    }

    .home-title {
        font-size: 60px;
    }

    .home-subtitle {
        font-size: 22px;
        margin-bottom: 60px;
    }

    .album-cards {
        gap: 40px;
    }

    .album-card {
        min-height: 500px;
        border-radius: 25px;
    }

    .album-icon {
        font-size: 80px;
    }

    .album-title {
        font-size: 40px;
    }

    .album-desc {
        font-size: 16px;
    }

    .album-btn {
        padding: 15px 40px;
        font-size: 18px;
    }
}

/* ==================== 浏览器样式 ==================== */
body {
    background: #000;
    overflow: hidden;
    height: 100vh;
    height: 100dvh;
    width: 100vw;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
    -webkit-user-select: none;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
}

/* 返回按钮 */
.back-btn {
    position: fixed;
    top: 15px;
    left: 15px;
    z-index: 20;
    background: rgba(0,0,0,0.5);
    color: #fff;
    border: 1px solid rgba(255,255,255,0.2);
    padding: 8px 16px;
    border-radius: 25px;
    cursor: pointer;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    transition: all 0.3s ease;
    -webkit-tap-highlight-color: transparent;
}

.back-btn:hover {
    background: rgba(255,255,255,0.2);
    transform: translateX(-3px);
}

.back-btn:active {
    transform: scale(0.95);
}

/* 浏览器标题 */
.viewer-title {
    position: absolute;
    top: 50%;
    left: 20px;
    transform: translateY(-50%) rotate(-90deg);
    transform-origin: left center;
    color: rgba(255,255,255,0.3);
    font-size: 14px;
    letter-spacing: 8px;
    z-index: 5;
    pointer-events: none;
    white-space: nowrap;
}

/* 主视图容器 */
.viewer {
    position: relative;
    width: 100%;
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
    background: #000;
}

/* 幻灯片容器 */
.slides-container {
    display: flex;
    transition: transform 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    height: 100%;
    will-change: transform;
}

.slide {
    min-width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

/* 背景图片层 */
.slide-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    filter: blur(20px);
    opacity: 0.3;
    transform: scale(1.1);
    transition: opacity 0.5s ease;
    z-index: 1;
}

/* 主图片 */
.slide img {
    position: relative;
    z-index: 2;
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    pointer-events: none;
    opacity: 0;
    transform: scale(0.95);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.slide img.loaded {
    opacity: 1;
    transform: scale(1);
}

/* 加载指示器 */
.loading-indicator {
    position: absolute;
    z-index: 3;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    transition: opacity 0.4s ease;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255, 255, 255, 0.2);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading-text {
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
}

/* 导航按钮 */
.nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.15);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 28px;
    cursor: pointer;
    z-index: 10;
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    opacity: 0.6;
    -webkit-tap-highlight-color: transparent;
}

.nav-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    opacity: 1;
    transform: translateY(-50%) scale(1.1);
}

.nav-btn:active {
    transform: translateY(-50%) scale(0.95);
}

.prev-btn {
    left: 20px;
    padding-right: 3px;
}

.next-btn {
    right: 20px;
    padding-left: 3px;
}

/* 顶部信息栏 */
.top-bar {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    padding: 15px 20px;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    z-index: 10;
    background: linear-gradient(to bottom, rgba(0,0,0,0.5) 0%, transparent 100%);
    pointer-events: none;
}

.counter {
    background: rgba(0, 0, 0, 0.5);
    color: white;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    pointer-events: auto;
}

.image-name {
    color: rgba(255, 255, 255, 0.6);
    font-size: 12px;
    pointer-events: auto;
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin-right: auto;
    padding-right: 10px;
}

/* 缩略图栏 */
.thumbnail-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 15px 0;
    z-index: 10;
    transform: translateY(100%);
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.thumbnail-bar.active {
    transform: translateY(0);
}

.thumbnail-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px 10px;
}

.thumbnail-title {
    color: white;
    font-size: 14px;
    font-weight: 500;
}

.thumbnail-close {
    color: rgba(255, 255, 255, 0.7);
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    padding: 5px;
}

.thumbnail-container {
    display: flex;
    gap: 10px;
    padding: 0 20px;
    overflow-x: auto;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.3) transparent;
}

.thumbnail-container::-webkit-scrollbar {
    height: 5px;
}

.thumbnail-container::-webkit-scrollbar-track {
    background: transparent;
}

.thumbnail-container::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 3px;
}

.thumbnail {
    width: 64px;
    height: 85px;
    flex-shrink: 0;
    border-radius: 6px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.25s ease;
    position: relative;
    -webkit-tap-highlight-color: transparent;
}

.thumbnail:hover {
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-3px);
}

.thumbnail:active {
    transform: scale(0.95);
}

.thumbnail.active {
    border-color: #ff4757;
    box-shadow: 0 0 15px rgba(255, 71, 87, 0.5);
    transform: translateY(-3px);
}

.thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 底部控制栏 */
.bottom-controls {
    position: absolute;
    bottom: 25px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 12px;
    z-index: 10;
    transition: bottom 0.35s ease;
}

.bottom-controls.shifted {
    bottom: 130px;
}

.control-btn {
    background: rgba(255, 255, 255, 0.15);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 10px 18px;
    border-radius: 25px;
    cursor: pointer;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    font-size: 13px;
    transition: all 0.3s ease;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 5px;
    -webkit-tap-highlight-color: transparent;
}

.control-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

.control-btn:active {
    transform: scale(0.95);
}

/* 提示文字 */
.hint-text {
    position: absolute;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255, 255, 255, 0.5);
    font-size: 12px;
    z-index: 5;
    pointer-events: none;
    transition: opacity 1s ease;
}

/* ==================== 浏览器 - 平板适配 ==================== */
@media (max-width: 1024px) and (min-width: 769px) {
    .back-btn {
        top: 15px;
        left: 15px;
        padding: 8px 16px;
        font-size: 14px;
    }

    .nav-btn {
        width: 48px;
        height: 48px;
        font-size: 26px;
    }

    .prev-btn { left: 20px; }
    .next-btn { right: 20px; }

    .thumbnail {
        width: 60px;
        height: 80px;
    }
}

/* ==================== 浏览器 - 手机适配 ==================== */
@media (max-width: 768px) {
    .back-btn {
        top: 12px;
        left: 10px;
        padding: 7px 14px;
        font-size: 13px;
        gap: 4px;
    }

    .back-btn svg {
        width: 20px;
        height: 20px;
    }

    .viewer-title {
        display: none;
    }

    .nav-btn {
        width: 42px;
        height: 42px;
        font-size: 24px;
        opacity: 0.7;
    }

    .prev-btn { left: 10px; }
    .next-btn { right: 10px; }

    .top-bar {
        padding: 12px 15px;
    }

    .counter {
        font-size: 12px;
        padding: 5px 12px;
    }

    .image-name {
        font-size: 11px;
        max-width: 150px;
    }

    .thumbnail-bar {
        padding: 12px 0;
    }

    .thumbnail {
        width: 54px;
        height: 72px;
    }

    .thumbnail-container {
        gap: 8px;
        padding: 0 15px;
    }

    .thumbnail-header {
        padding: 0 15px 8px;
    }

    .bottom-controls {
        bottom: 20px;
        gap: 10px;
    }

    .bottom-controls.shifted {
        bottom: 110px;
    }

    .control-btn {
        padding: 8px 14px;
        font-size: 12px;
    }

    .hint-text {
        bottom: 80px;
        font-size: 11px;
    }
}

/* ==================== 浏览器 - 小屏手机适配 ==================== */
@media (max-width: 480px) {
    .back-btn {
        top: 10px;
        left: 8px;
        padding: 6px 12px;
        font-size: 12px;
    }

    .back-btn svg {
        width: 18px;
        height: 18px;
    }

    .nav-btn {
        width: 38px;
        height: 38px;
        font-size: 20px;
        opacity: 0.8;
    }

    .prev-btn { left: 8px; }
    .next-btn { right: 8px; }

    .top-bar {
        padding: 10px 12px;
    }

    .counter {
        font-size: 11px;
        padding: 4px 10px;
    }

    .image-name {
        font-size: 10px;
        max-width: 120px;
    }

    .thumbnail {
        width: 48px;
        height: 64px;
    }

    .thumbnail-container {
        gap: 6px;
        padding: 0 12px;
    }

    .thumbnail-header {
        padding: 0 12px 6px;
    }

    .thumbnail-title {
        font-size: 13px;
    }

    .bottom-controls {
        bottom: 18px;
        gap: 8px;
    }

    .bottom-controls.shifted {
        bottom: 100px;
    }

    .control-btn {
        padding: 7px 12px;
        font-size: 11px;
    }

    .hint-text {
        bottom: 70px;
        font-size: 10px;
    }

    .slide-bg {
        filter: blur(15px);
        opacity: 0.25;
    }
}

/* ==================== 浏览器 - 超小屏手机适配 ==================== */
@media (max-width: 360px) {
    .back-btn {
        padding: 5px 10px;
        font-size: 11px;
        gap: 3px;
    }

    .back-btn svg {
        width: 16px;
        height: 16px;
    }

    .nav-btn {
        width: 34px;
        height: 34px;
        font-size: 18px;
    }

    .prev-btn { left: 5px; }
    .next-btn { right: 5px; }

    .thumbnail {
        width: 44px;
        height: 58px;
    }

    .control-btn {
        padding: 6px 10px;
        font-size: 10px;
    }
}

/* ==================== 浏览器 - 横屏适配 ==================== */
@media (max-width: 768px) and (orientation: landscape) {
    .viewer-title {
        display: block;
        font-size: 12px;
        letter-spacing: 6px;
        left: 10px;
    }

    .thumbnail {
        width: 50px;
        height: 66px;
    }

    .bottom-controls.shifted {
        bottom: 100px;
    }

    .thumbnail-bar {
        padding: 10px 0;
    }
}

/* ==================== 浏览器 - 大屏优化 ==================== */
@media (min-width: 1400px) {
    .nav-btn {
        width: 60px;
        height: 60px;
        font-size: 34px;
    }

    .prev-btn { left: 40px; }
    .next-btn { right: 40px; }

    .thumbnail {
        width: 76px;
        height: 100px;
    }

    .counter {
        font-size: 15px;
        padding: 8px 18px;
    }

    .control-btn {
        padding: 12px 24px;
        font-size: 15px;
    }
}

/* ==================== 触摸设备优化 ==================== */
@media (hover: none) and (pointer: coarse) {
    .album-card:hover {
        transform: none;
    }

    .album-card:active {
        transform: scale(0.97);
    }

    .nav-btn:hover {
        transform: translateY(-50%);
    }

    .nav-btn:active {
        transform: translateY(-50%) scale(0.9);
    }

    .control-btn:hover {
        transform: none;
    }

    .control-btn:active {
        transform: scale(0.95);
    }
}

/* ==================== 暗色模式适配 ==================== */
@media (prefers-color-scheme: dark) {
    .home-page {
        background: linear-gradient(135deg, #0a0a1a 0%, #0d1b2a 50%, #1b2838 100%);
    }
}

/* ==================== 高对比度模式 ==================== */
@media (prefers-contrast: high) {
    .album-card-overlay {
        background: rgba(0,0,0,0.9);
    }

    .album-title {
        text-shadow: 0 2px 8px rgba(0,0,0,0.8);
    }
}