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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    overflow: hidden;
    height: 100vh;
    display: flex;
    flex-direction: column;
}

.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background-color: #ffffff;
    border-bottom: 1px solid #e0e0e0;
    padding: 15px 20px;
    z-index: 1000;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.header h1 {
    font-size: clamp(20px, 5vw, 32px);
    font-weight: 600;
    color: #333;
    text-align: center;
}

.image-container {
    flex: 1;
    position: relative;
    overflow: auto;
    -webkit-overflow-scrolling: touch;
    margin-top: 70px; /* Adjust based on header height */
    background-color: #f5f5f5;
}

.image-wrapper {
    position: relative;
    display: inline-block;
    min-width: 100%;
    text-align: center;
    padding: 20px;
}

.main-image {
    max-width: 100%;
    width: auto;
    height: auto;
    display: block;
    margin: 0 auto;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    border: 1px solid #ddd;
    background-color: white;
}

/* Desktop styles */
@media (min-width: 1128px) {
    .main-image {
        width: 1088px;
        max-width: none;
    }
}

/* Touch device enhancements */
@media (pointer: coarse) {
    .image-container {
        overflow: auto;
    }

    .image-wrapper {
        transform-origin: 0 0;
    }
}

/* Loading placeholder */
.image-placeholder {
    width: 100%;
    max-width: 1088px;
    height: 804px;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    font-size: 18px;
}

@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}
