.polaroid-container {
  max-width: 500px;
  width: 100%;
  margin: auto; /* centra orizzontalmente e aggiunge spazio sopra/sotto */
  padding: 20px;      /* spazio interno opzionale */
}

    .polaroid {
        display: flex;
        padding: 1 rem;
        flex-direction: column;
        height: 100%; /* oppure una dimensione fissa, es. 600px */
        max-height: 90vh; /* utile per evitare che esca dallo schermo */
        border: 10px solid white;
        background-color: #fff;
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
        overflow: hidden;
    }

    .brand-logo {
      height: 30px;
    }
    .hashtag {
      font-weight: bold;
      color: #b22222;
    }
    .polaroid-header {
        flex: 0 0 auto;
        padding: 10px;
        display: flex;
        justify-content: space-between;
        align-items: center;
        background: #fff;
    }

    video#camera {
        filter: sepia(0.5) contrast(1.1) brightness(1.05) saturate(0.6) blur(0.5px);
        flex: 1 1 auto;
        width: 100%;
        object-fit: cover; /* evita deformazioni */
        background-color: black;
    }

    .camera-attiva.polaroid {
        
        height: 90vh;
        max-height: 100%;
        }

    .polaroid-footer {
        flex: 0 0 auto;
        padding: 10px;
        background: #fff;
        display: flex;
        flex-direction: column;
        gap: 10px;
    }

    #customText {
        width: 100%;
        height: 100%;
        box-sizing: border-box; /* opzionale, ma utile */
        border: 2px solid var(--colore-primario);
        padding: 8px;
        font-size: 1em;
    }

    .polaroid-footer input {
      width: 100%;
      padding: 6px;
      border: 1px solid #5d0e0e;
      border-radius: 6px;
    }
    .controls button {
      margin: 6px 4px;
      padding: 8px 12px;
      border: none;
      border-radius: 8px;
      background: #800000;
      color: white;
      cursor: pointer;
    }
    .controls button:hover {
      background: #a00000;
    }
    .photo-container {
      margin-top: 20px;
      text-align: center;
    }
    .photo-container.hidden {
      display: none;
    }
    .photo-actions button {
      margin: 6px;
      padding: 8px 12px;
    }
    .gallery {
      margin-top: 20px;
      display: flex;
      gap: 8px;
      flex-wrap: wrap;
    }
    .gallery img {
      width: 80px;
      height: 80px;
      object-fit: cover;
      border: 2px solid #ccc;
      cursor: pointer;
    }