html, body {
    margin: 0;
    padding: 0;
    font-family: sans-serif;
    background: #f0f0f0;
    overflow: hidden;
  }

  body {
    margin: 0;
    padding: 0;
    font-family: sans-serif;
    background: #BDBCC1;
    overflow: hidden;
    /* background: url('/imatges/fonsbubble.png') repeat; */
  }

  
  header, footer {
    position: relative;
    text-align: center;
    background: #333;
    color: #fff;
    padding: 10px 0;
    box-sizing: border-box;
  }

  /* Variables per mides */
:root {
    --bubble-size: 80px;
    --gap: -1px;
    --header-height: 0px;
    --footer-height: 0px;
  }
  
  h1 {
    margin: 0;
    font-size: 1.5rem;
  }

  /* Botó per tornar a començar */
#restart-btn {
    position: absolute;
    right: 10px;
    top: 10px;
    background: #444;
    color: #fff;
    border: none;
    padding: 5px 10px;
    font-size: 0.9rem;
    cursor: pointer;
    border-radius: 3px;
  }
  #restart-btn:hover {
    background: #555;
  }
  
  /* main#bubble-container {
  display: grid;
  gap: var(--gap);
  padding: var(--gap);
  justify-content: center;
  align-content: center;
  overflow: hidden;
  box-sizing: border-box;
  height: calc(100vh - (var(--header-height) + var(--footer-height)));
  } */

  /* El container principal serà un contenidor flexible vertical */
main#bubble-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--gap);
    height: calc(100vh - (var(--header-height) + var(--footer-height)));
    padding: var(--gap);
    box-sizing: border-box;
    /* background: url('nom_del_teu_fons.png') repeat;  Si vols repetir un fons petit */
  }

/* Cada fila és un div que conté una sèrie de bombolles */
.row {
    display: flex;
    gap: var(--gap);
  }
  
  /* Les files senars es desplacen una mica per intercalar */
  .even-row {
    margin-right: calc(var(--bubble-size)/2);
  }
  .odd-row {
    margin-left: calc(var(--bubble-size)/2);
    margin-right: 5px;
  }
  
  .bubble {
    width: var(--bubble-size);
    height: var(--bubble-size);
    background-image: url('./imatges/bubble_full.png');
    background-size: cover;
    background-position: center;
    transition: transform 0.1s ease;
  }
  
  .bubble-css {
    width: var(--bubble-size);
    height: var(--bubble-size);
    background: #fff;
    border-radius: 50%;
    border: 2px solid #ccc;
    box-shadow: inset 0 0 5px rgba(0,0,0,0.2);
    transition: background 0.2s ease, box-shadow 0.2s ease, transform 0.1s ease;
  }

  .bubble:active {
    transform: scale(0.95);
  }
  
  .bubble.popped {
    background-image: url('./imatges/bubble_popped.png');
  }
  
  .bubble-css.popped {
    background: #eee;
    box-shadow: none;
    border: 2px solid #aaa;
  }

  @media (max-width: 600px) {
    h1 {
      font-size: 1.2rem;
    }
    .bubble {
      border-width: 1px;
    }
  }
  