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

html {
    overflow-x: hidden;
    width: 100%;
    height: 100%;
}

body {
    font-family: "Tuffy", sans-serif;
    font-style: normal;
    background-color: rgba(255, 255, 255, 0.71);
    min-height: 100vh;
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
    padding: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    touch-action: pan-y;
}

.container {
    max-width: 700px;
    width: 100%;
    background: linear-gradient(135deg, #dce8f0 0%, #FFE5EC 100%);
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    position: relative;
}

.header {
    padding: 50px 0 0 0;
    text-align: center;
    position: relative;
}

.moon-icon {
    position: absolute;
    left: 30px;
    top: 50%;
    transform: translateY(-50%);
    width: 120px;
    height: 120px;
}

h1 {
    font-family: "Parisienne", cursive;
    font-size: 3em;
    color: #6b5b4f;
    font-weight: 600;
    margin-bottom: 10px;
    line-height: 1.3;
}

.subTitle {
    font-size: 1.2em;
    color: #8b7355;
    letter-spacing: 3px;
    font-weight: normal;
    text-transform: uppercase;
}

.content {
    padding: 40px 30px;
}

.section {
    background: #fdf6ea;
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 25px;
    display: flex;
    gap: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.section.has-image {
    cursor: pointer;
    position: relative;
}

.section:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
}

.image-badge {
    display: none;
    position: absolute;
    top: 15px;
    right: 15px;
    background: linear-gradient(135deg, #E8B4B8, #C67882);
    color: white;
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 0.9em;
    font-weight: bold;
    align-items: center;
    gap: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s;
}

.image-badge.active {
    display: flex;
}

.section:hover .image-badge {
    transform: scale(1.1);
}

.camera-icon {
    width: 18px;
    height: 18px;
}

.icon-container {
    min-width: 100px;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 15px;
    flex-shrink: 0;
}

.icon-img {
    height: 90px;
}

.icon-svg {
    width: 100px;
    height: 100px;
}

.section-content {
    flex: 1;
}

.section-title {
    font-size: 1.8em;
    color: #6e5f57;
    font-weight: bold;
}

.section-text {
    font-size: 1.3em;
    font-weight: 500;
    color: #6e5f57;
}

.highlight {
    font-weight: bold;
}

@media (max-width: 768px) {
    body {
        padding: 15px;
    }

    h1 {
        font-size: 1.8em;
    }

    .moon-icon {
        width: 60px;
        height: 60px;
        left: 15px;
    }

    .header {
        padding: 30px 20px 30px 85px;
    }

    .section {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .icon-container {
        min-width: 90px;
        height: 90px;
    }

    .icon-svg {
        width: 90px;
        height: 90px;
    }

    .section-title {
        font-size: 1.5em;
    }

    .section-text {
        font-size: 1em;
    }

    .content {
        padding: 30px 20px;
    }
}

@media (max-width: 480px) {
    body {
        padding: 0;
    }

    .container {
        border-radius: unset;
    }

    h1 {
        font-size: 1.4em;
    }

    .subTitle {
        font-size: 0.9em;
        letter-spacing: 2px;
    }

    .overlay-content {
        max-width: 95%;
        max-height: 85%;
    }

    .overlay-image {
        max-height: 70vh;
    }

    .close-btn {
        top: -35px;
        font-size: 35px;
    }

    .nav-btn {
        padding: 8px 15px;
        font-size: 20px;
        -webkit-tap-highlight-color: transparent;
    }

    .spinner {
        width: 40px;
        height: 40px;
        border-width: 4px;
    }
}

/* Overlay styles */
.overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    -webkit-overflow-scrolling: touch;
    touch-action: manipulation;
}

.overlay.active {
    display: flex;
}

.overlay-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 200px;
    min-width: 200px;
}

.overlay-image {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 10px;
    will-change: opacity;
    transform: translateZ(0);
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    transition: opacity 0.3s ease;
}

.close-btn {
    position: absolute;
    top: -40px;
    right: 0;
    background: none;
    border: none;
    color: white;
    font-size: 40px;
    cursor: pointer;
    padding: 0;
    width: 40px;
    height: 40px;
    line-height: 1;
    transition: transform 0.2s;
}

.close-btn:hover {
    transform: scale(1.2);
}

.gallery-controls {
    display: flex;
    gap: 20px;
    margin-top: 20px;
    align-items: center;
}

.nav-btn {
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid white;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 10px 20px;
    border-radius: 5px;
    transition: background 0.3s;
}

.nav-btn:hover {
    background: rgba(255, 255, 255, 0.4);
}

.nav-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.image-counter {
    color: white;
    font-size: 18px;
}

/* Loading spinner */
.spinner-container {
    display: none;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
}

.spinner-container.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid rgba(255, 255, 255, 0.3);
    border-top: 5px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    will-change: transform;
    transform: translateZ(0);
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.overlay-image.loading {
    opacity: 0;
    visibility: hidden;
}
