
:root {
    --bg-color: #101217;
    --green: rgb(86, 222, 147);
    --white: #ffffff;
    --pulse-color: rgba(255, 255, 255, 0.1);
  }
  
  body {
    margin: 0;
    padding: 1rem;
    background: var(--bg-color);
    color: var(--white);
    font-family: system-ui, sans-serif;
  }
  
  .feed {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    max-width: 600px;
    margin: auto;
  }
  
  .cardType {
    background: #1a1d24;
    border-radius: 1rem;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    transition: all 0.3s ease;
  }
  
  .meta-row {
    display: flex; /* Keep flex for this row to easily align items */
    gap: 0.5rem;
    flex-wrap: wrap;
    justify-content: space-between; /* Distribute space between meta and gallery button */
    align-items: center; /* Vertically align items in this row */
  }
  
  .meta-placeholder {
    height: 1rem;
    width: 60%;
    border-radius: 0.5rem;
    background: var(--pulse-color);
    animation: pulse 1.2s infinite ease-in-out;
  }
  
  .content-row {
    display: flex;
    flex-direction: row;
    gap: 1rem;
  }
  
  .image-placeholder {
    width: 100px;
    height: 100px;
    flex-shrink: 0;
    background: rgb(86, 222, 147);
    border-radius: 1rem;
    cursor: pointer;
    border: none;
    transition: transform 0.3s ease;
  }
  
  .text-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    justify-content: space-between;
  }
  
  .synopsis-container {
    display: inline; /* Keep it inline to flow with text */
    line-height: 1.5;
    min-height: 1rem;
  }
  
  .synopsis-placeholder {
    display: inline; /* This is crucial: make it truly inline */
    background: var(--pulse-color);
    animation: pulse 1.2s infinite ease-in-out;
    border-radius: 0.25rem;
    white-space: normal; /* Allow wrapping */
    overflow: visible;
  }
  
  button.meta-expand-btn,
  button.synopsis-expand-btn,
  button.gallery-btn { /* Added gallery-btn */
    background: none;
    border: none;
    color: var(--green);
    font-size: 1.1rem;
    padding: 0;
    cursor: pointer;
    margin-left: 0.25rem;
    user-select: none;
    line-height: 1;
    height: 1rem;
    vertical-align: bottom; /* Align with the bottom of the text line */
    flex-shrink: 0; /* Prevents button from shrinking in meta-row */
  }
  
  /* Style for the new Gallery button */
  button.gallery-btn {
      margin-left: auto; /* Push it to the right */
      padding: 0.25rem 0.75rem; /* Add some padding for better clickability */
    background-color: var(--green);
    color: var(--bg-color);
    font-weight: bold;
      border-radius: 0.5rem; /* Rounded corners */
      font-size: 0.9rem; /* Slightly smaller font for a button */
      height: auto; /* Adjust height based on padding */
  }
  
  @keyframes pulse {
    0% { background-color: var(--pulse-color); }
    50% { background-color: rgba(255, 255, 255, 0.05); }
    100% { background-color: var(--pulse-color); }
  }
  
  .overlayModal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.7);
    backdrop-filter: blur(8px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 20999;
  }
  
  .overlayModal.hidden {
    display: none;
  }
  
  .modal-content {
    background: #1a1d24;
    color: var(--white);
    padding: 1.5rem;
    z-index: 3000;
    border-radius: 1rem;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
    font-size: 1.1rem;
    line-height: 1.5;
    white-space: pre-wrap;
    display: flex;
    flex-direction: column;
    align-items: center;
  }
  
  .modal-image {
    width: 90vw;
    max-width: 400px;
    aspect-ratio: 1 / 1;
    background: rgb(86, 222, 147);
    border-radius: 1rem;
    margin-bottom: 1rem;
    user-select: none;
    transform: scale(0.8);
    transition: transform 0.3s ease;
  }
  
  /* Specific style for the large gallery image */
  .modal-image.gallery-large {
      width: 90vw; /* Make it wider */
      max-width: 500px; /* Adjust max-width as needed */
      height: auto; /* Let height adjust to aspect ratio */
      aspect-ratio: 16 / 9; /* Example aspect ratio for wider image */
      background: rgb(86, 222, 147); /* Keep green color */
  }
  
  
  .modal-header {
    margin: 0 0 1rem 0;
    font-weight: 700;
    font-size: 1.3rem;
    text-align: center;
    width: 100%;
    color: rgb(86, 222, 147);
  }
  
  .modal-text {
    width: 100%;
    white-space: pre-wrap;
  }
  
  @media (max-width: 400px) {
    .content-row {
      flex-direction: column;
    }
  
    .image-placeholder {
      width: 100%;
      aspect-ratio: 1 / 1;
    }
  
    .meta-row {
        flex-direction: column;
        align-items: flex-start;
    }
  
    button.gallery-btn {
        margin-left: 0; /* Reset margin for small screens */
        margin-top: 0.5rem; /* Add some space below meta */
    }
  }