* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
  overscroll-behavior: none !important;
  overflow: hidden;
  height: 100%;
  margin: 0;
  padding: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: #e8e4dc;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    overflow: hidden;
}

.phone-wrapper {
    display: flex;
    align-items: center;
    gap: 0;
}

.phone-container {
    position: relative;
    width: 344px;
    height: 724px;
    display: flex;
    justify-content: center;
}

.phone-svg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
}

.phone-svg-normal {
    display: none;
}

.phone-container.normal-screen .phone-svg-full {
    display: none;
}

.phone-container.normal-screen .phone-svg-normal {
    display: block;
}

.phone-screen {
    position: relative;
    z-index: 2;
    width: 320px;
    height: 640px;
    background: #fff;
    border-radius: 40px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
    margin-top: 70px;
}

.phone-container.normal-screen {
    width: 344px;
    height: 582px;
}

.phone-container.normal-screen .phone-screen {
    width: 320px;
    height: 480px;
    border-radius: 20px;
}

.phone-container.normal-screen .content-area {
    overflow: hidden;
}

.phone-container.normal-screen .page {
    overflow: hidden;
}

.phone-container.normal-screen .page img {
    width: 100%;
    height: auto;
    object-fit: unset;
    cursor: pointer;
    user-select: none;
    -webkit-user-drag: none;
}

.content-area {
    flex: 1;
    position: relative;
    scrollbar-width: none;
    overflow: hidden;
}

.content-area::-webkit-scrollbar {
    display: none;
}

.page {
    width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
}

.page img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    cursor: pointer;
}

.swipe-arrow {
    position: absolute;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    pointer-events: none;
}

.arrow-icon {
    display: block;
    opacity: 0;
    animation: arrowUp 2s infinite ease-in-out;
}

@keyframes arrowUp {
    0% { opacity: 0; transform: translateY(8px); }
    25% { opacity: 1; }
    50% { opacity: 1; transform: translateY(-8px); }
    75% { opacity: 0; }
    100% { opacity: 0; transform: translateY(-18px); }
}

.side-controls {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    margin-left: 2px;
}

.qr-btn {
    width: 36px;
    height: 36px;
    background: #fff;
    border: 1px solid #e0e0e0;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #666;
    transition: all 0.2s;
}

.qr-btn:hover {
    background: #f5f5f5;
}

.qr-btn svg {
    width: 18px;
    height: 18px;
}

.nav-buttons {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: #fff;
    border: 1px solid #e0e0e0;
    overflow: hidden;
}

.nav-btn {
    width: 36px;
    height: 60px;
    background: #fff;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    writing-mode: vertical-rl;
    text-orientation: mixed;
    font-size: 12px;
    color: #666;
    transition: all 0.2s;
    padding: 0;
}

.nav-btn:hover {
    background: #f5f5f5;
}

.nav-btn span {
    writing-mode: vertical-rl;
    text-orientation: mixed;
    letter-spacing: 2px;
}

.page-indicator {
    padding: 8px 0;
    font-size: 11px;
    color: #999;
    display: flex;
    align-items: center;
    gap: 2px;
}

.screen-controls {
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow: hidden;
}

.screen-btn {
    width: 36px;
    height: 70px;
    background: #fff;
    border: 1px solid #e0e0e0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    writing-mode: vertical-rl;
    text-orientation: mixed;
    font-size: 12px;
    color: #666;
    transition: all 0.2s;
    padding: 0;
    margin-top: -1px;
}

.screen-btn.active {
    background: #4a7eff;
    color: #fff;
    border-color: #4a7eff;
}

.screen-btn:hover:not(.active) {
    background: #f5f5f5;
}

.screen-btn span {
    writing-mode: vertical-rl;
    text-orientation: mixed;
    letter-spacing: 2px;
}

.detail-modal {
    display: none;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 100;
    justify-content: center;
    align-items: center;
}

.detail-modal.show {
    display: flex;
}

.detail-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #fff;
    cursor: pointer;
}

.detail-container {
    position: relative;
    z-index: 101;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 0;
}

.detail-close {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.5);
    border: none;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    line-height: 1;
    z-index: 102;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.detail-close:hover {
    background: rgba(0, 0, 0, 0.7);
}

.detail-images {
    display: flex;
    flex-direction: column;
    gap: 16px;
    align-items: center;
    width: 100%;
    height: 100%;
    flex: 1;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(0,0,0,0.2) transparent;
    -webkit-overflow-scrolling: touch;
}

.detail-images::-webkit-scrollbar {
    width: 4px;
}

.detail-images::-webkit-scrollbar-track {
    background: transparent;
}

.detail-images::-webkit-scrollbar-thumb {
    background: rgba(0,0,0,0.15);
    border-radius: 2px;
}

.detail-images img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 4px;
}

.detail-images.single {
    gap: 0;
}

.hasDetail::before {
    content: '';
    position: absolute;
    bottom: 20px;
    right: 0;
    width: 100px;
    height: 43px;
    background: url('images/zhishi.png') no-repeat center center;
    background-size: cover;
    z-index: 102;
    cursor: pointer;
}

.swiper {
    width: 100%;
    height: 100%;
}

.swiper-wrapper {
    width: 100%;
    height: 100%;
}

.swiper-slide {
    width: 100%;
    height: 100%;
}

@media (max-width: 768px) {
    .page img {
        object-fit: unset;
    }
    
}


@media (max-width: 480px) {
    body {
        align-items: flex-start;
        padding-top: 0;
        overflow: auto;
        background: #fff;
    }

    .phone-wrapper {
        transform: none;
        width: 100%;
        max-width: 100%;
    }

    .phone-svg,
    .phone-svg-full,
    .phone-svg-normal {
        display: none !important;
    }

    .side-controls {
        display: none !important;
    }

    .phone-container {
        width: 100%;
        height: auto;
        position: static;
    }

    .phone-container.normal-screen {
        width: 100%;
        height: auto;
    }

    .phone-screen {
        width: 100vw;
        height: 100vh;
        border-radius: 0;
        margin-top: 0;
    }

    .phone-container.normal-screen .phone-screen {
        width: 100vw;
        height: 100vh;
        border-radius: 0;
    }

    .content-area {
        width: 100%;
        height: 100%;
    }

    .page {
        width: 100%;
        height: 100%;
    }

    .page img {
        width: 100%;
        height: 100%;
    }

    .phone-container.normal-screen .page img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    .detail-modal {
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
    }

    .detail-container {
        width: 100%;
        height: 100%;
    }

    .detail-images img {
        width: 100%;
        height: auto;
    }
}
