/* common-styles.css - Общие стили для обеих страниц */

html, body {
    min-height: 100%;
    margin: 0;
    font-family: Inter, Roboto, Arial, Helvetica, sans-serif;
    position: relative;
    background: linear-gradient(135deg, rgb(193 208 138) 0%, rgb(118 170 137) 50%, rgba(237, 221, 83, 1) 100%);
    background-attachment: fixed;
}

body::after {
    content: "";
    position: fixed;
    inset: 0;
    background: url('https://telegram.org/img/tgme/pattern.svg') repeat center center fixed;
    opacity: 0.3;
    pointer-events: none;
    z-index: 0;
}

.page {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: normal;
    min-height: 100vh;
    padding: 10px;
    box-sizing: border-box;
    position: relative;
    z-index: 1;
    gap: 15px;
}

.post {
    width: 100%;
    max-width: 600px;
    background: #fff;
    border-radius: 10px;
    padding: 6px;
    box-shadow: 0 3px 10px rgba(18, 26, 40, 0.04);
    border: 0.3px solid rgba(0, 0, 0, 0.03);
}

.post-header {
    display: flex;
    align-items: center;
    padding: 8px 10px;
    border-bottom: 0.3px solid rgba(0, 0, 0, 0.05);
}

.post-header .avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    overflow: hidden;
    margin-right: 10px;
    background: #f0f0f0;
}

.post-header .avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.post-header .meta {
    display: flex;
    flex-direction: column;
}

.post-header .name {
    font-weight: 600;
    font-size: 15px;
}

.post-header .time {
    font-size: 12px;
    color: #777;
}

.images-row {
    display: flex;
    gap: 4px;
    justify-content: center;
}

.image-card {
    flex: 1;
    display: flex;
    flex-direction: column;
    border: 0.3px solid rgba(0, 0, 0, 0.05);
    border-radius: 4px;
    overflow: hidden;
}

.img-wrap {
    height: 500px;
    overflow: hidden;
    cursor: pointer;
    position: relative;
}

.img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.2s ease;
}

.img-wrap:hover img {
    transform: scale(1.02);
}

.caption {
    padding: 8px 10px;
    font-size: 12px;
    text-align: center;
    line-height: 1.5;
}

/* Fullscreen overlay styles */
.fullscreen-overlay {
    position: fixed;
    inset: 0;
    background: rgba(11, 16, 22, 0.92);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    cursor: zoom-in;
    transition: opacity 0.2s ease;
}

.fullscreen-overlay.zoomed {
    cursor: grab;
    overflow: hidden;
}

.fullscreen-overlay.zoomed.dragging {
    cursor: grabbing;
}

.fullscreen-container {
    position: relative;
    max-width: 95%;
    max-height: 95%;
    transition: transform 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.fullscreen-overlay.zoomed .fullscreen-container {
    max-width: none;
    max-height: none;
}

.fullscreen-overlay img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 3px;
    user-select: none;
    -webkit-user-drag: none;
    display: block;
}

.fullscreen-overlay.zoomed img {
    max-width: none;
    max-height: none;
    width: auto;
    height: auto;
    cursor: grab;
}

.fullscreen-overlay.zoomed.dragging img {
    cursor: grabbing;
}

.fullscreen-close {
    position: absolute;
    top: 15px;
    right: 20px;
    color: white;
    font-size: 32px;
    font-weight: bold;
    cursor: pointer;
    z-index: 10000;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
    transition: background 0.2s ease;
}

.fullscreen-close:hover {
    background: rgba(0, 0, 0, 0.8);
}

@media (max-width: 780px) {
    .img-wrap {
        height: 300px;
    }
    .page {
        gap: 10px;
    }
}
