@font-face {
  font-family: 'LazyDog';
  src: url('/assets/fonts/lazy_dog.ttf') format('truetype');
}

@font-face {
  font-family: 'OctoberCrow';
  src: url('/assets/fonts/October_Crow.ttf') format('truetype');
}

:root {
    --primary-color: hsla(268, 100%, 7%, 0.851);
    --secondary-color: hsl(270, 100%, 14%);
    --text-color: hsl(0, 0%, 86%);
    --accent-color: hsl(141, 76%, 46%);
    --correct-color: hsl(120, 76%, 46%);
    --wrong-color: hsl(0, 76%, 46%);
    --border-radius: 11px;
    --cell-size: 100px;
    --game-max-width: 800px;
}

.game-container {
    max-width: var(--game-max-width);
    margin: 0 auto;
    padding: 50px;
    text-align: center;
    perspective: 1000px;
}

.game-header {
    text-align: center;
    margin-bottom: 20px;
    transform-style: preserve-3d;
}

.game-header h1 {
    color: var(--accent-color);
    font-size: 3rem;
    margin-top: 4rem;
    font-family: 'OctoberCrow', sans-serif !important;
    text-shadow: 0 0 10px hsl(141, 76%, 46%);
    font-weight: lighter;
}

.game-header h2 {
    color: var(--text-color);
    font-size: 1rem;
    margin-top: 1rem;
    margin-bottom: 1rem;
    font-family: 'LazyDog', sans-serif !important;
    text-shadow: 0 0 10px hsl(141, 76%, 46%);
    font-weight: lighter;
}

.game-button {
    padding: 12px 25px;
    font-size: 1rem;
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: all 0.3s ease;
    background-color: var(--accent-color);
    color: var(--text-color);
    font-family: 'LazyDog', sans-serif !important;
    text-transform: uppercase;
    position: relative;
    overflow: hidden;
    transform-style: preserve-3d;
    box-shadow: 0 0 6px transparent;
}

.game-button:hover {
    background-color: var(--secondary-color);
    transform: scale(1.05);
    box-shadow: 0 0 12px var(--accent-color);
}

.game-controls {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

#shareButton {
    background-color: var(--secondary-color);
}

#shareButton:hover {
    background-color: var(--accent-color);
    box-shadow: 0 0 15px var(--secondary-color);
}



.bingo-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 5px;
    justify-content: center;
    margin: 20px auto;
    background-color: var(--primary-color);
    padding: 11px;
    border-radius: var(--border-radius);
    border: 1px solid;
    border-image: linear-gradient(to top, #090013, #1cce5b, #090013) 1;
    max-width: calc(var(--cell-size) * 5 + 100px);
    transform-style: preserve-3d;
background: rgba(0, 0, 0, 0.05);
backdrop-filter: blur(6px);
box-shadow: 0 0 10px #000000, inset 0 0 5px #000000;
}

.bingo-cell {
    aspect-ratio: 1;
    background-color: hsla(270, 100%, 33%, 0.247);
    border: 1px solid var(--accent-color);
    border-radius: var(--border-radius);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    text-align: center;
    padding: 8px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    transform-style: preserve-3d;
    perspective: 800px;
    box-shadow: 0 0 10px #000000;
    box-shadow: inset 0 0 10px #000000;
}



.bingo-cell span {
    margin-top: 2px;
    font-size: 0.95rem;
    color: var(--text-color);
    font-family: 'LazyDog', sans-serif !important;
    text-shadow: 0 0 10px hsl(141, 76%, 46%);
}

.bingo-cell:hover {
    background-color: hsla(141, 76%, 46%, 0.37);
    transform: translateY(-3px);
    box-shadow: 0 0 10px hsl(141, 76%, 46%);
}

.bingo-cell.checked {
    background-color: hsla(141, 76%, 46%, 0.37);
    box-shadow: 0 0 10px var(--accent-color);
    border: 1px dashed var(--accent-color);
    animation: checkedPulse 0.5s ease;
}

.bingo-cell.checked::after {
    content: "✝";
    position: absolute;
    top: 0;
    right: 0;
    color: var(--accent-color);
    font-size: 2rem;
    transform: rotate(10deg);
    opacity: 0.7;
    filter: drop-shadow(0 0 2px var(--accent-color));
}

@keyframes checkedPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.bingo-cell.checked::after {
    content: "✝";
    position: absolute;
    top: 0;
    right: 0;
    color: var(--accent-color);
    font-size: 2rem;
    transform: rotate(10deg);
    opacity: 0.7;
    filter: drop-shadow(0 0 2px var(--accent-color));
}

.bingo-cell.winner {
    animation: glowingBorder 1s ease-in-out infinite;
    background-color: var(--accent-color);
}

@keyframes glowingBorder {
    0%, 100% {
        box-shadow: 0 0 10px var(--accent-color), 0 0 20px var(--accent-color);
    }
    50% {
        box-shadow: 0 0 20px var(--secondary-color), 0 0 30px var(--accent-color);
    }
}

.bingo-message {
    color: var(--accent-color);
    font-size: 2rem;
    text-align: center;
    margin: 20px 0;
    animation: pulse 1s infinite;
    text-shadow: 0 0 10px var(--accent-color);
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* Share notification */
.share-notification {
    background-color: var(--accent-color);
    color: var(--text-color);
    padding: 15px 30px;
    border-radius: var(--border-radius);
    font-family: 'LazyDog', sans-serif !important;
    box-shadow: 0 0 20px var(--secondary-color);
    display: none;
    opacity: 0;
    z-index: 1000;
    font-size: 1.2rem;
    text-align: center;
    min-width: 300px;
    max-width: 80%;
    pointer-events: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* Mobile styles */
@media (max-width: 768px) {

    

    :root {
        --cell-size: 80px;
    }

    .game-container {
        padding: 40px 20px;
    }

    .game-header h1 {
        font-size: 2rem;
        padding-top: 80px;
    }

    .bingo-grid {
        gap: 8px;
        padding: 5px;
    }

    .bingo-cell {
        padding: 6px;
    }

    .bingo-cell span {
        font-size: 0.7rem;
        line-height: 1.1;
    }

    .bingo-cell img {
        max-width: 50%;
        max-height: 50%;
    }

    .game-button {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    :root {
        --cell-size: 65px;
    }

    .game-container {
        padding: 30px 15px;
    }

    .game-header h1 {
        font-size: 1.8rem;
        padding-top: 10px;
    }

    .bingo-grid {
        gap: 5px;
        padding: 10px;
    }

    .bingo-cell {
        padding: 4px;
    }

    .bingo-cell span {
        font-size: 0.6rem;
    }

    .bingo-cell img {
        max-width: 45%;
        max-height: 45%;
        margin-bottom: 4px;
    }

    .bingo-cell.checked::after {
        font-size: 1.5rem;
    }

    .game-button {
        padding: 8px 16px;
        font-size: 0.8rem;
    }

    .bingo-message {
        font-size: 1.5rem;
    }
}

.bingo-bg {
  position: fixed;
  inset: 0;
background: url('/assets/images/FONDECRAN1.webp') no-repeat center center;
  background-size: cover;
  z-index: -1;
  animation: fantomeFloat 10s ease-in-out infinite;
  will-change: transform, background-position;
  pointer-events: none;
}

@keyframes fantomeFloat {
  0%   { transform: scale(1); background-position: 50% 50%; }
  50%  { transform: scale(1.05); background-position: 48% 52%; }
  100% { transform: scale(1); background-position: 50% 50%; }
}




.particles-floating {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}

.bingo-cell {
  position: relative;
  z-index: 1;
}

.particle {
  position: absolute;
  width: 6px;
  height: 6px;
  background-color: #1cce5b;
  border-radius: 50%;
  opacity: 0.5;
  animation: floatParticle ease-in-out infinite;
}

@keyframes floatParticle {
  0% {
    transform: translate(0, 0) scale(var(--scale));
    opacity: 0.4;
  }
  50% {
    transform: translate(var(--x), var(--y)) scale(var(--scale));
    opacity: 0.9;
  }
  100% {
    transform: translate(0, 0) scale(var(--scale));
    opacity: 0.4;
  }
}



#ghost-container {
  position: fixed;
  top: 0;
  left: 0;
  pointer-events: none;
  z-index: 9999;
}

.ghost-sprite {
  position: absolute;
  width: 60px;
  height: 60px;
  opacity: 0;
  filter: drop-shadow(0 0 10px rgba(28, 206, 91, 0.4));
  transition: transform 0.6s ease, opacity 0.6s ease, filter 0.3s ease;
  will-change: transform, opacity;
}




.game-rules {
  background: #110024d9;
  backdrop-filter: blur(4px);
  padding: 1rem 1.5rem;
  border-radius: 10px;
  border: 1px solid;
  border-image: linear-gradient(to right, #090013, #1cce5b, #090013) 1;
  margin-top: 2rem;
      line-height: 1.5;
      text-align: center;
}

.game-rules h3 {
  font-size: 1.3rem;
  font-weight: lighter;
  color: #1cce5b;
  margin-bottom: 1rem;
    border-bottom: 1px solid;
  border-image: linear-gradient(to right, #090013, #1cce5b, #090013) 1;
}

.game-rules p {
  font-size: 1rem;
  margin-bottom: 1rem;
}

.game-rules strong {
  font-weight: lighter;
  color: #1cce5b;
}