* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background: linear-gradient(135deg, #0f0f23 0%, #1a1a2e 50%, #16213e 100%);
  min-height: 100vh;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  overflow-x: hidden;
  touch-action: manipulation;
  -webkit-overflow-scrolling: touch;
}

/* Animated background particles */
.bg-particles {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  overflow: hidden;
}

.particle {
  position: absolute;
  background: rgba(0, 176, 173, 0.3);
  border-radius: 50%;
  animation: float 6s ease-in-out infinite;
}

.particle:nth-child(1) {
  width: 4px;
  height: 4px;
  left: 10%;
  animation-delay: 0s;
}
.particle:nth-child(2) {
  width: 6px;
  height: 6px;
  left: 20%;
  animation-delay: 1s;
}
.particle:nth-child(3) {
  width: 3px;
  height: 3px;
  left: 30%;
  animation-delay: 2s;
}
.particle:nth-child(4) {
  width: 8px;
  height: 8px;
  left: 40%;
  animation-delay: 3s;
}
.particle:nth-child(5) {
  width: 5px;
  height: 5px;
  left: 50%;
  animation-delay: 4s;
}
.particle:nth-child(6) {
  width: 7px;
  height: 7px;
  left: 60%;
  animation-delay: 5s;
}
.particle:nth-child(7) {
  width: 4px;
  height: 4px;
  left: 70%;
  animation-delay: 0.5s;
}
.particle:nth-child(8) {
  width: 6px;
  height: 6px;
  left: 80%;
  animation-delay: 1.5s;
}
.particle:nth-child(9) {
  width: 3px;
  height: 3px;
  left: 90%;
  animation-delay: 2.5s;
}

@keyframes float {
  0%,
  100% {
    transform: translateY(100vh) rotate(0deg);
    opacity: 0;
  }
  10% {
    opacity: 1;
  }
  90% {
    opacity: 1;
  }
  100% {
    transform: translateY(-100px) rotate(360deg);
    opacity: 0;
  }
}

/* Glowing grid background */
.grid-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -2;
  background-image:
    linear-gradient(rgba(0, 176, 173, 0.1) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 176, 173, 0.1) 1px, transparent 1px);
  background-size: 50px 50px;
  animation: gridPulse 4s ease-in-out infinite;
}

@keyframes gridPulse {
  0%,
  100% {
    opacity: 0.3;
  }
  50% {
    opacity: 0.6;
  }
}

/* Main container styling */
.main-wrapper {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  overflow: hidden;
}

.game-frame {
  position: relative;
  padding: 30px;
  background: linear-gradient(
    45deg,
    rgba(0, 176, 173, 0.1),
    rgba(22, 33, 62, 0.2)
  );
  border-radius: 20px;
  border: 2px solid rgba(0, 176, 173, 0.3);
  box-shadow:
    0 0 30px rgba(0, 176, 173, 0.2),
    inset 0 0 20px rgba(0, 176, 173, 0.05);
  backdrop-filter: blur(10px);
  width: 100%;
  max-width: 800px;
  overflow: hidden;
}

.game-frame::before {
  content: "";
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  background: linear-gradient(45deg, #00b0ad, #16213e, #00b0ad);
  border-radius: 20px;
  z-index: -1;
  animation: borderGlow 3s ease-in-out infinite;
}

@keyframes borderGlow {
  0%,
  100% {
    opacity: 0.5;
  }
  50% {
    opacity: 1;
  }
}

.game-container {
  width: 100%;
  height: auto;
  background: linear-gradient(135deg, #00b0ad 0%, #008b89 100%);
  border-radius: 12px;
  padding: 25px;
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  position: relative;
  overflow: hidden;
}

.game-container::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(
    45deg,
    transparent,
    rgba(255, 255, 255, 0.1),
    transparent
  );
  animation: shine 3s linear infinite;
  pointer-events: none;
}

@keyframes shine {
  0% {
    transform: translateX(-100%) translateY(-100%) rotate(45deg);
  }
  100% {
    transform: translateX(100%) translateY(100%) rotate(45deg);
  }
}

/* Game header styles */
.game-header {
  width: 100%;
  text-align: center;
  margin-bottom: 20px;
}

.match-the-logo {
  font-size: 24px;
  font-weight: bold;
  color: white;
  margin-bottom: 10px;
}

.match-pairs-of-identical-logos-as-fast-as-you-can- {
  font-size: 16px;
  color: #ddd;
  margin-bottom: 20px;
}

.frame-175 {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 20px;
}

.line-31,
.line-32 {
  height: 2px;
  background: white;
  flex-grow: 1;
  max-width: 100px;
}

._00---04---25---30 {
  font-size: 18px;
  color: white;
  margin: 0 10px;
}

/* Modal styles */
.modal-content {
  background: linear-gradient(135deg, #16213e 0%, #1a1a2e 100%);
  color: white;
  border: 1px solid #00b0ad;
}

.modal-header {
  border-bottom: 1px solid #00b0ad;
}

.modal-footer {
  border-top: 1px solid #00b0ad;
}

.btn-close {
  filter: invert(1);
}

/* Score table styles */
.score-table {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  color: white;
}

.stars {
  list-style: none;
  display: flex;
  padding: 0;
}

.stars li {
  margin: 0 5px;
}

.fa-star {
  color: gold;
}

.fa-star-o {
  color: #555;
}

.restart {
  cursor: pointer;
  color: white;
}

/* Corner decorations */
.corner-decoration {
  position: absolute;
  width: 20px;
  height: 20px;
  border: 2px solid #00b0ad;
}

.corner-top-left {
  top: 10px;
  left: 10px;
  border-right: none;
  border-bottom: none;
  border-radius: 8px 0 0 0;
}

.corner-top-right {
  top: 10px;
  right: 10px;
  border-left: none;
  border-bottom: none;
  border-radius: 0 8px 0 0;
}

.corner-bottom-left {
  bottom: 10px;
  left: 10px;
  border-right: none;
  border-top: none;
  border-radius: 0 0 0 8px;
}

.corner-bottom-right {
  bottom: 10px;
  right: 10px;
  border-left: none;
  border-top: none;
  border-radius: 0 0 8px 0;
}

/* Gaming UI elements */
.ui-accent {
  position: absolute;
  top: -15px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(90deg, #00b0ad, #16213e, #00b0ad);
  height: 3px;
  width: 60%;
  border-radius: 2px;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%,
  100% {
    width: 60%;
    opacity: 0.8;
  }
  50% {
    width: 80%;
    opacity: 1;
  }
}

.side-accent {
  position: absolute;
  top: 50%;
  width: 3px;
  height: 40%;
  background: linear-gradient(180deg, #00b0ad, transparent);
  transform: translateY(-50%);
  border-radius: 2px;
}

.side-accent.left {
  left: -15px;
  animation: slideLeft 2s ease-in-out infinite;
}

.side-accent.right {
  right: -15px;
  animation: slideRight 2s ease-in-out infinite;
}

@keyframes slideLeft {
  0%,
  100% {
    height: 40%;
    opacity: 0.6;
  }
  50% {
    height: 60%;
    opacity: 1;
  }
}

@keyframes slideRight {
  0%,
  100% {
    height: 40%;
    opacity: 0.6;
  }
  50% {
    height: 60%;
    opacity: 1;
  }
}

/* Game title enhancement */
.game-title {
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
  position: relative;
  margin-bottom: 30px;
}

.game-title::after {
  content: "";
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 50px;
  height: 2px;
  background: linear-gradient(90deg, transparent, #ffffff, transparent);
}

/* Status indicators */
.status-indicators {
  position: absolute;
  top: 15px;
  right: 15px;
  display: flex;
  gap: 8px;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  animation: statusBlink 2s ease-in-out infinite;
}

.status-dot.green {
  background: #00ff88;
  animation-delay: 0s;
}
.status-dot.yellow {
  background: #ffaa00;
  animation-delay: 0.5s;
}
.status-dot.red {
  background: #ff4444;
  animation-delay: 1s;
}

@keyframes statusBlink {
  0%,
  80%,
  100% {
    opacity: 1;
  }
  40% {
    opacity: 0.3;
  }
}

/* Game specific styles */
.card {
  height: 125px;
  width: 125px;
  margin: 5px;
  position: relative;
  cursor: pointer;
  border-radius: 8px;
  background-color: #fff;
  perspective: 1000px;
  transform-style: preserve-3d;
  transition: transform 0.5s;
}

.card.flipped {
  transform: rotateY(180deg);
}

.card-front,
.card-back {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
}

.card-front {
  background-color: #fff;
  transform: rotateY(180deg);
}

.card-back {
  background-color: #00b0ad;
  color: white;
}

.card-image {
  max-width: 90%;
  max-height: 90%;
  object-fit: contain;
}

.deck {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: repeat(3, 1fr);
  gap: 10px;
  justify-items: center;
  align-items: center;
  max-width: 600px;
  margin: 0 auto;
  padding: 0;
}

.fs-10 {
  font-size: 10px;
}

.fs-12 {
  font-size: 12px;
}

.fs-14 {
  font-size: 14px;
}

.fs-16 {
  font-size: 16px;
}

.matched {
  transform: scale(1);
  opacity: 1;
  cursor: default;
}

@keyframes shake {
  from,
  to {
    transform: translate3d(0, 0, 0);
  }
  20%,
  60% {
    transform: translate3d(-3px, 0, 0);
  }
  40%,
  80% {
    transform: translate3d(3px, 0, 0);
  }
}

/* Score table styles */
.score-table {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  color: white;
  flex-wrap: wrap;
  gap: 10px;
}

.stars {
  list-style: none;
  display: flex;
  padding: 0;
  margin: 0;
}

.stars li {
  margin: 0 5px;
}

.fa-star {
  color: gold;
}

.fa-star-o {
  color: #555;
}

.restart {
  cursor: pointer;
  color: white;
}

/* Responsive adjustments */
@media only screen and (max-width: 768px) {
  .game-frame {
    padding: 15px;
    margin: 10px;
  }

  .game-container {
    padding: 15px;
  }

  .main-wrapper {
    padding: 10px;
    align-items: flex-start;
  }

  .card {
    height: 80px;
    width: 80px;
  }

  .deck {
    grid-template-columns: repeat(4, 1fr);
    max-width: 360px;
    gap: 5px;
  }

  .score-table {
    flex-direction: column;
    align-items: center;
    gap: 10px;
  }

  .match-the-logo {
    font-size: 20px;
  }

  .match-pairs-of-identical-logos-as-fast-as-you-can- {
    font-size: 14px;
  }
}

@media only screen and (max-width: 480px) {
  .card {
    height: 70px;
    width: 70px;
  }

  .deck {
    max-width: 320px;
  }

  .game-header img {
    width: 40% !important;
  }

  ._00---04---25---30 {
    font-size: 16px;
  }
}

@media only screen and (max-width: 360px) {
  .card {
    height: 60px;
    width: 60px;
  }

  .deck {
    max-width: 280px;
  }
}

/* Pyro animation */
.pyro {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1000;
}

.before,
.after {
  position: absolute;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  box-shadow: 0 0 10px 2px;
  animation:
    1s bang ease-out infinite backwards,
    1s gravity ease-in infinite backwards,
    5s position linear infinite backwards;
}

.after {
  animation-delay: 1.25s, 1.25s, 1.25s;
  animation-duration: 1.25s, 1.25s, 6.25s;
}

@keyframes bang {
  to {
    box-shadow:
      195px -172.5px 0 2px rgba(255, 0, 0, 0.8),
      159px -325.5px 0 1px rgba(255, 165, 0, 0.8),
      238.5px -18px 0 3px rgba(255, 255, 0, 0.8),
      30px -349.5px 0 0 rgba(0, 255, 0, 0.8),
      349.5px -63px 0 1px rgba(0, 0, 255, 0.8),
      211.5px -211.5px 0 2px rgba(75, 0, 130, 0.8),
      73.5px -283.5px 0 0 rgba(238, 130, 238, 0.8),
      283.5px -73.5px 0 1px rgba(255, 192, 203, 0.8),
      18px -238.5px 0 2px rgba(255, 0, 0, 0.8),
      -18px -349.5px 0 0 rgba(255, 165, 0, 0.8),
      -159px -283.5px 0 1px rgba(255, 255, 0, 0.8),
      -349.5px -18px 0 3px rgba(0, 255, 0, 0.8),
      -238.5px -172.5px 0 2px rgba(0, 0, 255, 0.8),
      -211.5px -211.5px 0 2px rgba(75, 0, 130, 0.8),
      -73.5px -325.5px 0 1px rgba(238, 130, 238, 0.8),
      -283.5px -73.5px 0 0 rgba(255, 192, 203, 0.8),
      -195px -172.5px 0 2px rgba(255, 0, 0, 0.8);
  }
}

@keyframes gravity {
  to {
    transform: translateY(200px);
    opacity: 0;
  }
}

@keyframes position {
  0%,
  19.9% {
    margin-top: 10%;
    margin-left: 40%;
  }
  20%,
  39.9% {
    margin-top: 40%;
    margin-left: 30%;
  }
  40%,
  59.9% {
    margin-top: 20%;
    margin-left: 70%;
  }
  60%,
  79.9% {
    margin-top: 30%;
    margin-left: 20%;
  }
  80%,
  99.9% {
    margin-top: 30%;
    margin-left: 80%;
  }
}
/* Styles for the new Register of Interest Modal */
#registerModal .modal-content {
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
  color: #fff;
  border: 1px solid #00b0ad;
  border-radius: 15px;
}

#registerModal .modal-body {
  padding: 2rem;
}

#registerModal h2 {
  color: #00b0ad;
  font-weight: bold;
}

#registerModal .form-label {
  color: #ccc;
}

#registerModal .form-control,
#registerModal .form-select {
  background-color: rgba(0, 0, 0, 0.2);
  border: 1px solid #00b0ad;
  color: #fff;
}

#registerModal .form-control:focus,
#registerModal .form-select:focus {
  background-color: rgba(0, 0, 0, 0.3);
  border-color: #1abc9c;
  color: #fff;
  box-shadow: 0 0 0 0.25rem rgba(0, 176, 173, 0.25);
}

#registerModal .form-control::placeholder {
  color: #888;
}

#registerModal .form-select {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%2300B0AD' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
}

#registerModal .form-check-label {
  color: #ccc;
}

#registerModal .form-check-input {
  background-color: rgba(0, 0, 0, 0.2);
  border: 1px solid #00b0ad;
}

#registerModal .form-check-input:checked {
  background-color: #00b0ad;
  border-color: #00b0ad;
}

#registerModal .small {
  color: #aaa;
}

#registerModal .btn-secondary-custom {
  background-color: #00b0ad;
  border-color: #00b0ad;
  color: #fff;
  padding: 0.75rem 1.5rem;
  font-weight: bold;
  transition: all 0.3s ease;
}

#registerModal .btn-secondary-custom:hover {
  background-color: #1abc9c;
  border-color: #1abc9c;
  box-shadow: 0 0 15px rgba(0, 176, 173, 0.5);
  transform: translateY(-2px);
}

.btn-outline-secondary-custom {
  background-color: #757a7aff;
  border-color: #515858ff;
  color: #fff;
  padding: 0.75rem 1.5rem;
  font-weight: bold;
  transition: all 0.3s ease;
}

.btn-outline-secondary-custom:hover {
  background-color: #a1aba9ff;
  border-color: #76807eff;
  box-shadow: 0 0 15px rgba(58, 94, 93, 0.5);
  transform: translateY(-2px);
}

#registerModal .text-danger {
  color: #ff4444 !important;
}
