.russo-one-regular {
  font-family: "Russo One", sans-serif;
  font-weight: 100;
  font-style: normal;
}


/* --- TŁO STRONY --- */
html, body {
  height: 100%;
  margin: 0;
  background-color: #000;
  background-image:
    repeating-linear-gradient(
      45deg,
      rgba(255,255,255,0.03),
      rgba(255,255,255,0.03) 2px,
      transparent 2px,
      transparent 6px
    ),
    repeating-linear-gradient(
      -45deg,
      rgba(255,255,255,0.03),
      rgba(255,255,255,0.03) 2px,
      transparent 2px,
      transparent 6px
    );
  background-size: 20px 20px;
 
  position: relative;
}


/* Warstwa gradientowa dla głębi */
.background-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(ellipse at center, rgba(0,0,0,0) 40%, rgba(0,0,0,0.9) 100%);
  z-index: 0;
}

/* Animowane smugi światła */
.light-streak {
  position: fixed;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(90deg, transparent 0%, rgba(255,0,0,0.15) 50%, transparent 100%);
  transform: rotate(20deg);
  animation: moveStreak 8s linear infinite;
  z-index: 0;
}

.light-streak.delay {
  animation-delay: 4s;
  background: linear-gradient(90deg, transparent 0%, rgba(0,200,255,0.15) 50%, transparent 100%);
}

@keyframes moveStreak {
  0% { transform: translateX(-100%) rotate(20deg); }
  100% { transform: translateX(100%) rotate(20deg); }
}

/* --- KAFELKI --- */
.flip-card {
  max-height: 100vh;
  max-width: 100%;
  aspect-ratio: 2 / 3;
  z-index: 1;
  cursor: pointer;
  transition: transform 0.2s ease; /* płynna animacja */
}

.flip-card:active {
  transform: scale(0.95); /* lekko pomniejsza kafelek przy kliknięciu */
}

.flip-card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  max-height: 100vh;
  transition: transform 0.6s ease;
  transform-style: preserve-3d;
}

.flip-left:hover .flip-card-inner {
  transform: rotateY(-180deg);
}

.flip-left .flip-card-back {
  transform: rotateY(-180deg);
}

.flip-right:hover .flip-card-inner {
  transform: rotateY(180deg);
}

.flip-right .flip-card-back {
  transform: rotateY(180deg);
}


.flip-card-front,
.flip-card-back, .flip-card-back-2 {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  border-radius: 10px;
  overflow: hidden;
}

.flip-card-back {
  transform: rotateY(180deg);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;  /* tekst na dole */
  align-items: center;
  padding-bottom: 20px;       /* odstęp od dołu */
  position: relative;          /* potrzebne dla pseudo-elementu */
  text-align: center;
}

.flip-card-back::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100px; /* wysokość żółtego paska */
  background-color: rgba(255, 223, 0, 0.8);
  z-index: 0;
  border-top-left-radius: 10px;
  border-top-right-radius: 10px;
}

/* czarny pasek mniejszy niż żółty */
.flip-card-back::after {
  content: "";
  position: absolute;
  top: 25px; /* odsunięcie od góry, żeby pasek był w środku żółtego paska */
  left: 0;
  width: 100%;
  height: 50px; /* wysokość czarnego paska */
  background-image: repeating-linear-gradient(
    -45deg,        /* kąt pasków */
    black 0 35px,  /* szerokość czarnego segmentu */
    transparent 35px 80px /* przerwa 2x szerokości segmentu */
  );
  z-index: 1; /* nad żółtym tłem, pod tekstem */
}

.flip-card-back-2 {
  transform: rotateY(180deg);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;  /* tekst na dole */
  align-items: center;
  padding-bottom: 20px;       /* odstęp od dołu */
  position: relative;          /* potrzebne dla pseudo-elementu */
  text-align: center;
}

.flip-card-back-2::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100px; /* wysokość żółtego paska */
  background-color: rgba(0, 123, 255, 0.8); 
  z-index: 0;
  border-top-left-radius: 10px;
  border-top-right-radius: 10px;
}

.flip-card-back-2::after {
  content: "";
  position: absolute;
  top: 25px; /* odsunięcie od góry, żeby pasek był w środku żółtego paska */
  left: 0;
  width: 100%;
  height: 50px; /* wysokość czarnego paska */
  background-image: repeating-linear-gradient(
    45deg,        /* kąt pasków */
    white 0 35px,  /* szerokość czarnego segmentu */
    transparent 35px 80px /* przerwa 2x szerokości segmentu */
  );
  z-index: 1; /* nad żółtym tłem, pod tekstem */
}

/* Żółty blok pod tekstem na odwrocie */
.text-block {          /* tekst czarny dla kontrastu */
  font-weight: bold;
  font-size: 1.5rem;
  width: 100%;
  z-index: 1;
}

.bg-yellow {
  background-color: rgba(255, 223, 0, 0.8); /* półprzezroczysty żółty */
  color: #000;
}

.bg-blue {
    background-color: rgba(0, 123, 255, 0.8); /* półprzezroczysty niebieski */
    color: #fff;
}

.flip-card img {
  object-fit: cover;
  filter: brightness(0.9);
  transition: filter 0.3s;
}

.flip-card:hover img {
  filter: brightness(1);
}

.z-1 {
  z-index: 1;
}

.bg-motosport {
  background-image: url('../images/track-yellow.png');
  background-size: cover;
}

.bg-garage {
  background-image: url('../images/garage-blue.png');
  background-size: cover;
}