    #posts-container {
        display: flex;
        flex-wrap: wrap;
        gap: 20px;
    }

    .tg-post {
        flex: 1 1 280px;
        border: 1px solid #e0e0e0;
        border-radius: 12px;
        padding: 12px;
        background: #fff;
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        max-width: 280px;
        box-shadow: #8f8f8f 0 0 12px -5px;
    }

    .tg-post .gallery {
        display: grid;
        gap: 4px;
        border-radius: 6px;
        overflow: hidden;
    }

    .tg-post .gallery a {
        position: relative;
        display: block;
    }

    .tg-post .gallery img,
    .tg-post .gallery video {
        object-fit: cover;
        width: 100%;
        height: 100%;
        display: block;
        border-radius: 4px;
        cursor: pointer;
    }

    /* Play icon overlay */
    .tg-post .gallery .play-overlay {
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        width: 40px;
        height: 40px;
        background: url('data:image/svg+xml,%3Csvg width="40" height="40" viewBox="0 0 40 40" xmlns="http://www.w3.org/2000/svg"%3E%3Ccircle cx="20" cy="20" r="20" fill="rgba(0,0,0,0.5)"/%3E%3Cpath d="M16,12 L28,20 L16,28 Z" fill="white"/%3E%3C/svg%3E') no-repeat center center;
        background-size: contain;
        pointer-events: none;
        border-radius: 50%;
    }


    .tg-post .text {
        margin: 8px 0;
        font-size: 12px;
        white-space: pre-wrap;
        min-height: 2em;
    }

    .tg-post .footer {
        font-size: 12px;
        color: #888;
        display: flex;
        justify-content: space-between;
        margin-top: 6px;
        flex-direction: column;
        align-items: flex-end;
        margin-top: auto;
    }

    .tg-post a {
        text-decoration: none;
        color: #d22;
    }
    
    .gallery {
      display: grid;
      gap: 4px;
      width: 100%;
      aspect-ratio: 2 / 3;
      overflow: hidden;
    }
    
    .gallery-2 {
      grid-template-columns: 1fr 1fr;
    }
    
    .gallery-3 {
      grid-template-areas:
        "main side"
        "main side2";
      grid-template-columns: 2fr 1fr;
      grid-template-rows: 1fr 1fr;
    }
    .gallery-3 a:nth-child(1) { grid-area: main; }
    .gallery-3 a:nth-child(2) { grid-area: side; }
    .gallery-3 a:nth-child(3) { grid-area: side2; }
    
    .gallery-4 {
      grid-template-columns: 1fr 1fr;
      grid-template-rows: 1fr 1fr;
    }
    
    .gallery-5,
    .gallery-6 {
      grid-template-columns: repeat(3, 1fr);
      grid-template-rows: repeat(2, 1fr);
    }
    .gallery a img {
      object-fit: cover;
      width: 100%;
      height: 100%;
      display: block;
      border-radius: 6px;
    }
