body {
    font-family: Arial, sans-serif;
    background: #f0f2f5;
    margin: 0;
    padding: 20px;
}

#feed {
    max-width: 800px;
    margin: 0 auto;
}

/* KARTA POSTA – jak FB */
.post {
    background: #fff;
    padding: 16px;
    margin-bottom: 25px;
    border-radius: 10px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.08);
    opacity: 0;
    transition: opacity .4s ease;
}

.post.visible {
    opacity: 1;
}

/* NAGŁÓWEK POSTA */
.post-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid #ddd;
}

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

.page-name {
    font-size: 16px;
    font-weight: 700;
    color: #1c1e21;
}

/* DATA */
.date {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #eef3ff;
    color: #1d3c78;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    width: fit-content;
    margin-top: 4px;
}

.date-icon svg {
    width: 16px;
    height: 16px;
    fill: #1d3c78;
}

/* TREŚĆ POSTA */
.post-message {
    font-size: 15px;
    line-height: 1.5;
    color: #1c1e21;
    margin-bottom: 12px;
}

/* MEDIA – miniatury 300x300 */
.single-img,
.gallery-img {
    width: 100%;
    max-width: 300px;
    height: 300px;
    object-fit: cover;
    border-radius: 8px;
    margin-top: 8px;
    cursor: pointer;
}

/* MINIATURA WIDEO – DUŻA + 16:9 + WYŚRODKOWANA */
.video-thumb {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: 8px;
    background: black;
    cursor: pointer;
    margin-top: 10px;
}

.video-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

/* Ikona play */
.play-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 42px;
    color: white;
    text-shadow: 0 0 10px black;
    pointer-events: none;
}

/* GALERIA */
.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 10px;
    margin-top: 10px;
}

/* PRZYCISK */
.btn {
    display: inline-block;
    background: #1877f2;
    color: white;
    padding: 10px 18px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: bold;
    font-size: 15px;
    margin-top: 14px;
    transition: background 0.25s ease, transform 0.15s ease;
}

.btn:hover {
    background: #0f5dc8;
    transform: translateY(-2px);
}

/* LIGHTBOX */
.lightbox {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100vw; height: 100vh;
    background: rgba(0,0,0,.85);
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

/* KONTENER LIGHTBOXA */
.lightbox-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

/* OBRAZY W LIGHTBOXIE */
#lightboxImage {
    max-width: 90vw;
    max-height: 90vh;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 8px;
}

/* WIDEO W LIGHTBOXIE */
#lightboxVideo {
    max-width: 90vw;
    max-height: 90vh;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 8px;
}

/* fade-in */
.lightbox-fade {
    opacity: 0;
    transition: opacity .35s ease;
}

.lightbox-fade.show {
    opacity: 1;
}

/* STRZAŁKI – KRÓTKIE, KWADRATOWE, DOMYŚLNIE UKRYTE */
.nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 28px;
    font-weight: bold;
    color: #e5e5e5;
    cursor: pointer;
    padding: 10px 14px;
    background: rgba(0,0,0,0.55);
    border-radius: 6px;
    user-select: none;
    transition: background .25s ease, color .25s ease, transform .15s ease, opacity .2s ease;
    z-index: 99999;
    opacity: 0;
}

/* Strzałki pojawiają się tylko przy hover na zawartości lightboxa */
.lightbox-content:hover .nav-btn {
    opacity: 1;
}

.nav-btn:hover {
    background: rgba(0,0,0,0.75);
    color: #ffffff;
    transform: translateY(-50%) scale(1.08);
}

.nav-prev { left: 20px; }
.nav-next { right: 20px; }

/* X */
.close {
    position: absolute;
    top: -40px;
    right: 0;
    font-size: 40px;
    color: white;
    cursor: pointer;
}

/* SKELETON LOADER */
#skeleton-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 10px 0;
}

.skeleton {
    background: #eee;
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 25px;
    padding: 15px;
}

.skeleton .shimmer {
    animation: shimmer 1.6s infinite linear;
    background: linear-gradient(
        to right,
        #e0e0e0 0%,
        #f5f5f5 20%,
        #e0e0e0 40%,
        #e0e0e0 100%
    );
    background-size: 1000px 100%;
}

.skeleton-line {
    height: 14px;
    margin-bottom: 10px;
    border-radius: 4px;
}

.skeleton-line.short { width: 40%; }
.skeleton-line.medium { width: 70%; }
.skeleton-line.long { width: 100%; }

.skeleton-photo {
    width: 100%;
    height: 250px;
    border-radius: 6px;
    margin-top: 10px;
}

@keyframes shimmer {
    0% { background-position: -1000px 0; }
    100% { background-position: 1000px 0; }
}