/* N143PW Gallery Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
    overflow: hidden;
    background: #000;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    color: #fff;
    -webkit-tap-highlight-color: transparent;
    touch-action: pan-x pan-y;
}

/* Info Overlay */
.info-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    opacity: 1;
    transition: opacity 0.5s ease;
}

.info-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

.info-content {
    text-align: center;
    padding: 2rem;
    max-width: 400px;
}

.info-content h1 {
    font-size: 3rem;
    font-weight: 300;
    letter-spacing: 0.5rem;
    margin-bottom: 0.5rem;
}

.info-content .tagline {
    font-size: 1rem;
    color: #888;
    margin-bottom: 2rem;
    font-style: italic;
}

.aircraft-info {
    margin-bottom: 2rem;
    text-align: left;
    background: rgba(255, 255, 255, 0.05);
    padding: 1.5rem;
    border-radius: 8px;
}

.aircraft-info p {
    margin: 0.5rem 0;
    font-size: 0.95rem;
    color: #ccc;
}

.aircraft-info strong {
    color: #fff;
}

.enter-btn {
    background: #fff;
    color: #000;
    border: none;
    padding: 1rem 2.5rem;
    font-size: 1rem;
    border-radius: 50px;
    cursor: pointer;
    transition: transform 0.2s, background 0.2s;
}

.enter-btn:hover {
    transform: scale(1.05);
    background: #eee;
}

.hint {
    margin-top: 1.5rem;
    font-size: 0.8rem;
    color: #666;
}

/* Gallery */
.gallery {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000;
}

/* Image Container */
.image-container {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.image-container img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.image-container img.loading {
    opacity: 0;
}

/* Navigation Buttons */
.nav-btn {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    width: 60px;
    height: 60px;
    background: rgba(0, 0, 0, 0.5);
    border: none;
    border-radius: 50%;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s, background 0.2s;
    z-index: 10;
}

.nav-btn svg {
    width: 28px;
    height: 28px;
}

.gallery:hover .nav-btn,
.gallery.touch-active .nav-btn {
    opacity: 0.7;
}

.nav-btn:hover {
    opacity: 1 !important;
    background: rgba(0, 0, 0, 0.8);
}

.prev-btn {
    left: 20px;
}

.next-btn {
    right: 20px;
}

/* Bottom Controls */
.controls {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    opacity: 0;
    transition: opacity 0.3s;
    z-index: 10;
}

.gallery:hover .controls,
.gallery.touch-active .controls {
    opacity: 1;
}

.control-btn {
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 50%;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.control-btn svg {
    width: 22px;
    height: 22px;
}

.control-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.counter {
    font-size: 0.9rem;
    color: #fff;
    font-variant-numeric: tabular-nums;
}

/* Loader */
.loader {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 5;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s;
}

.loader.visible {
    opacity: 1;
}

.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); }
}

/* Mobile Adjustments */
@media (max-width: 768px) {
    .nav-btn {
        width: 50px;
        height: 50px;
    }

    .nav-btn svg {
        width: 24px;
        height: 24px;
    }

    .prev-btn {
        left: 10px;
    }

    .next-btn {
        right: 10px;
    }

    .controls {
        padding: 1rem;
    }

    .info-content h1 {
        font-size: 2.5rem;
    }
}

/* Portrait mode on mobile - show nav buttons always */
@media (max-width: 768px) and (orientation: portrait) {
    .gallery .nav-btn {
        opacity: 0.5;
    }

    .gallery .controls {
        opacity: 1;
    }
}

/* Landscape mode on mobile */
@media (max-height: 500px) and (orientation: landscape) {
    .controls {
        padding: 0.5rem 1rem;
    }

    .nav-btn {
        width: 44px;
        height: 44px;
    }

    .control-btn {
        width: 36px;
        height: 36px;
    }

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

/* Hide cursor when inactive */
.gallery.cursor-hidden {
    cursor: none;
}

.gallery.cursor-hidden .nav-btn,
.gallery.cursor-hidden .controls {
    opacity: 0;
}

/* Swipe feedback */
.image-container.swiping img {
    transition: none;
}

/* Fullscreen adjustments */
:fullscreen .gallery,
:-webkit-full-screen .gallery {
    background: #000;
}

/* Prefers reduced motion */
@media (prefers-reduced-motion: reduce) {
    * {
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
    }
}
