/* Add padding to all elements except the board container */
body > *:not(.board-b72b1) {
  padding-left: 24px;
  padding-right: 24px;
}

.blob-bg {
  position: fixed;
  width: 100%;
  height: 100%;
  z-index: -1;
  overflow: hidden;
  top: 0;
  left: 0;
}

.blob {
  position: absolute;
  width: 350px;
  height: 350px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1.5px solid rgba(255, 255, 255, 0.4);
  box-shadow:
    inset 0 15px 20px rgba(255, 255, 255, 0.9),   /* Strong bright highlight inside */
    inset 0 -15px 25px rgba(0, 0, 0, 0.15),      /* Deeper shadow inside */
    0 0 30px rgba(255, 255, 255, 0.35);          /* Soft outer glow */

  /* Colorful base with shiny highlights */
  background-image:
    linear-gradient(135deg, rgba(255, 255, 255, 0.25), transparent 80%),
    radial-gradient(circle at 35% 35%, rgba(255, 255, 255, 0.85), transparent 45%),
    radial-gradient(circle at 70% 70%, rgba(255, 255, 255, 0.35), transparent 70%);
  background-blend-mode: screen;

  opacity: 0.35;
  animation: blobFloatAround 25s ease-in-out infinite;
}

/* Different colored blobs */
.blob:nth-child(1) {
  background-color: rgba(255, 100, 150, 0.25);  /* Pink */
  animation-delay: 0s;
}

.blob:nth-child(2) {
  background-color: rgba(100, 180, 255, 0.3);   /* Light Blue */
  animation-delay: -7s;
}

.blob:nth-child(3) {
  background-color: rgba(255, 210, 100, 0.3);   /* Warm Yellow */
  animation-delay: -14s;
}

.blob:nth-child(4) {
  background-color: rgba(150, 255, 190, 0.3);   /* Mint Green */
  animation-delay: -21s;
}

@keyframes blobFloatAround {
  0% {
    transform: translate(0, 0) scale(1);
  }
  25% {
    transform: translate(60px, -30px) scale(1.03);
  }
  50% {
    transform: translate(-40px, 40px) scale(1.06);
  }
  75% {
    transform: translate(30px, 50px) scale(1.02);
  }
  100% {
    transform: translate(0, 0) scale(1);
  }
}

/* Container for triangles */
.triangle-bg {
  position: fixed;
  bottom: 40px; /* small offset from bottom */
  left: 50%;
  transform: translateX(-50%);
  width: 400px;  /* smaller width for clustering */
  height: 400px; /* square area */
  z-index: -1;
  overflow: visible;
  pointer-events: none;
}

/* Clustered triangles */
.triangle {
  position: absolute;
  width: 200px;
  height: 200px;
  clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1.5px solid rgba(255, 255, 255, 0.4);
  box-shadow:
    inset 0 15px 20px rgba(255, 255, 255, 0.9),
    inset 0 -15px 25px rgba(0, 0, 0, 0.15),
    0 0 30px rgba(255, 255, 255, 0.35);
  background-image:
    linear-gradient(135deg, rgba(255, 255, 255, 0.25), transparent 80%),
    radial-gradient(circle at 35% 35%, rgba(255, 255, 255, 0.85), transparent 45%),
    radial-gradient(circle at 70% 70%, rgba(255, 255, 255, 0.35), transparent 70%);
  background-blend-mode: screen;
  opacity: 0.35;
  animation: triangleFloatAround 20s ease-in-out infinite;
}

/* Position triangles close together */
.triangle:nth-child(1) {
  top: 10px;
  left: 10px;
  background-color: rgba(255, 150, 50, 0.3);
  animation-delay: 0s;
}

.triangle:nth-child(2) {
  top: 50px;
  left: 80px;
  background-color: rgba(255, 100, 150, 0.25);
  animation-delay: -6s;
}

.triangle:nth-child(3) {
  top: 100px;
  left: 150px;
  background-color: rgba(100, 180, 255, 0.3);
  animation-delay: -12s;
}

@keyframes triangleFloatAround {
  0% {
    transform: translate(0, 0) scale(1);
  }
  25% {
    transform: translate(15px, 10px) scale(1.03);
  }
  50% {
    transform: translate(-10px, -10px) scale(1.06);
  }
  75% {
    transform: translate(5px, 10px) scale(1.02);
  }
  100% {
    transform: translate(0, 0) scale(1);
  }
}

/* Container for squares */
.square-bg {
  position: fixed;
  top: 50%;
  right: 40px;
  transform: translateY(-50%);
  width: 400px;
  height: 400px;
  z-index: -1;
  overflow: visible;
  pointer-events: none;
}

/* Clustered squares */
.square {
  position: absolute;
  width: 200px;
  height: 200px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1.5px solid rgba(255, 255, 255, 0.4);
  box-shadow:
    inset 0 15px 20px rgba(255, 255, 255, 0.9),
    inset 0 -15px 25px rgba(0, 0, 0, 0.15),
    0 0 30px rgba(255, 255, 255, 0.35);
  background-image:
    linear-gradient(135deg, rgba(255, 255, 255, 0.25), transparent 80%),
    radial-gradient(circle at 35% 35%, rgba(255, 255, 255, 0.85), transparent 45%),
    radial-gradient(circle at 70% 70%, rgba(255, 255, 255, 0.35), transparent 70%);
  background-blend-mode: screen;
  opacity: 0.35;
  animation: squareFloatAround 20s ease-in-out infinite;
}

/* Position squares close together */
.square:nth-child(1) {
  top: 20px;
  left: 20px;
  background-color: rgba(100, 180, 255, 0.3);
  animation-delay: 0s;
}

.square:nth-child(2) {
  top: 70px;
  left: 90px;
  background-color: rgba(150, 255, 190, 0.3);
  animation-delay: -6s;
}

.square:nth-child(3) {
  top: 120px;
  left: 160px;
  background-color: rgba(255, 210, 100, 0.3);
  animation-delay: -12s;
}

@keyframes squareFloatAround {
  0% {
    transform: translate(0, 0) scale(1);
  }
  25% {
    transform: translate(-15px, 10px) scale(1.03);
  }
  50% {
    transform: translate(10px, -10px) scale(1.06);
  }
  75% {
    transform: translate(-5px, 10px) scale(1.02);
  }
  100% {
    transform: translate(0, 0) scale(1);
  }
}

html, body {
  height: 100%;
  margin: 0;
  display: flex;
  flex-direction: column;
}

/* ========== CHESSBOARD STYLES ========== */
.clearfix-7da63 {
  clear: both;
}

.board-b72b1 {
  border: 2px solid #404040;
  box-sizing: border-box;
  width: 100%;
  height: 100%;
  display: flex;
  flex-wrap: wrap;
}

.square-55d63 {
  width: 12.5%;
  height: 12.5%;
  position: relative;
  user-select: none;
  display: flex;
  justify-content: center;
  align-items: center;
  box-sizing: border-box;
}

.white-1e1d7 {
  background-color: #f0d9b5;
  color: #b58863;
}

.black-3c85d {
  background-color: #b58863;
  color: #f0d9b5;
}

.highlight1-32417,
.highlight2-9c5d2 {
  box-shadow: inset 0 0 3px 3px #ff0;
}

.notation-322f9 {
  cursor: default;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 14px;
  position: absolute;
}

.alpha-d2270 {
  bottom: 1px;
  right: 3px;
}

.numeric-fc462 {
  top: 2px;
  left: 2px;
}

.square-legal {
  background-color: rgba(0, 255, 0, 0.3) !important;
}

.square-selected {
  background-color: rgba(0, 0, 255, 0.4) !important;
}

.piece-417db {
  cursor: grab;
  transition: transform 0.2s ease;
  will-change: transform;
}

.piece-417db:active {
  cursor: grabbing;
  transform: scale(1.05);
}

/* ========== GLOBAL STYLES ========== */
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  font-family: sans-serif;
  background: #f5f5f5;
  color: #222;
  user-select: none;
}

a {
  text-decoration: none;
  color: inherit;
}

/* ========== HEADER ========== */
#header-strcuture-container {
  width: 90%;
  max-width: 1100px;
  margin: 40px auto 60px;
  padding: 18px 32px;
  border-radius: 16px;
  background: #fff;
  border: 1px solid #ccc;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

#header-image-container {
  width: 120px;
  height: 50px;
  background-size: contain;
  background-repeat: no-repeat;
}

#header-links-container ul {
  list-style: none;
  display: flex;
  gap: 20px;
  margin: 0;
  padding: 0;
  align-items: center;
}

#header-links-container li a {
  padding: 10px 16px;
  font-weight: bold;
  font-size: 1rem;
  background: #e0e0e0;
  border-radius: 8px;
}

#header-links-container li a:hover {
  background: #d0d0d0;
}

/* ========== HERO SECTION ========== */
#hero-main-container {
  width: 90%;
  max-width: 1100px;
  margin: 0 auto 60px;
  padding: 40px;
  border-radius: 16px;
  background: #ffffff;
  border: 1px solid #ddd;
  display: flex;
  gap: 40px;
  align-items: center;
  flex-wrap: wrap;
}

#hero-main-container img {
  max-width: 300px;
  width: 100%;
  border-radius: 12px;
}

@media (max-width: 768px) {
  #hero-main-container {
    flex-direction: column;
    padding: 30px 20px;
    gap: 20px;
  }
}

/* ========== MAIN SECTIONS ========== */
#main-play-section,
#main-puzzle-section {
  margin: 0 auto 50px;
  width: 90%;
  max-width: 1100px;
  padding: 30px;
  border-radius: 16px;
  background: #ffffff;
  border: 1px solid #ccc;
  display: flex;
  flex-wrap: wrap;
  gap: 30px;
  justify-content: space-between;
  align-items: center;
}

form {
  max-width: 480px;
  margin: 20px auto;
  padding: 24px 30px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 6px 18px rgba(0,0,0,0.1);
  display: flex;
  flex-direction: column;
  gap: 18px; /* space between form fields */
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

form label {
  font-weight: 600;
  margin-bottom: 6px;
  color: #333;
  display: block;
}

input,
textarea,
select {
  padding: 8px 12px; /* internal padding */
  margin: 8px 0;     /* vertical spacing outside the element */
  border: 1.5px solid #ccc;
  border-radius: 6px;
  font-size: 1rem;
  transition: border-color 0.3s ease;
}

input:focus,
textarea:focus,
select:focus {
  border-color: #005bbb;
  outline: none;
}

.standard-btn {
  padding: 10px 20px;
  margin: 8px;
  background: #ddd;
  border-radius: 6px;
  font-size: 1rem;
  cursor: pointer;
  text-align: center;
  display: inline-block;
  border: none;
  text-decoration: none;
  color: inherit;
}

.standard-btn:hover {
  background: #bbb;
}

#main-play-section-text,
#main-puzzle-section-text {
  flex: 1;
  min-width: 260px;
}

#main-play-section-text h2,
#main-puzzle-section-text h2 {
  font-size: 2rem;
  font-weight: bold;
  margin-bottom: 16px;
}

#main-play-section-text p,
#main-puzzle-section-text p {
  font-size: 1rem;
  color: #444;
}

#main-play-section-directory,
#main-puzzle-section-directory {
  flex: 1;
  min-width: 260px;
  display: flex;
  justify-content: center;
}

#matchmaking-play-dir,
#random-puzzle-dir {
  padding: 24px 32px;
  background: rgba(255, 255, 255, 0.65);
  border-radius: 16px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  border: 1px solid rgba(0, 0, 0, 0.05);
  text-align: center;
  max-width: 100%;
  transition: box-shadow 0.3s ease, transform 0.3s ease;
}

#matchmaking-play-dir:hover,
#random-puzzle-dir:hover {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  transform: translateY(-4px);
}

/* ========== GAME & PUZZLE BOARD CONTAINER ========== */
.game-container,
.puzzle-container {
  width: 100%;
  max-width: 600px;
  aspect-ratio: 1 / 1;
  border-radius: 16px;
  background: #f9f9f9;
  display: flex;
  justify-content: center; /* Center content horizontally */
  align-items: center;     /* Center content vertically */
  border: 1px solid #ccc;
  padding: 20px;           /* Add inner spacing */
  box-sizing: border-box;
  position: relative;      /* For absolute children, if any */
}

@media (max-width: 768px) {
  .game-container,
  .puzzle-container {
    max-width: 90vw;
  }
}

/* ========== RESULT MESSAGE ========== */
#result-message {
  font-size: 1.2rem;
  font-weight: bold;
  color: #333;
  background-color: #e0f0ff;
  border: 1px solid #b0d4ff;
  border-radius: 8px;
  padding: 20px;
  text-align: center;
  margin-bottom: 20px;
}

/* ========== FOOTER ========== */
#footer-structure-container {
  margin-top: auto; /* Push footer to the bottom */
}

#footer-structure-container footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
  padding: 30px 20px;
}

#footer-structure-text p {
  margin: 0;
  font-size: 0.9rem;
}

#footer-structure-text a {
  color: #0066cc;
  text-decoration: underline;
}

#footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  gap: 15px;
}

#footer-links li a {
  color: #333;
  font-weight: bold;
}

#footer-links li a:hover {
  color: #0066cc;
  text-decoration: underline;
}