/* styles.css */

/* Import the font */
body {
  font-family: 'Montserrat', sans-serif;
  background: linear-gradient(135deg, #2c3e50 0%, #4ca1af 100%);
  color: #ecf0f1;
  margin: 0;
  padding: 0;
}

.container {
  max-width: 800px;
  margin: 50px auto;
  text-align: center;
}

h1 {
  font-weight: 600;
  margin-bottom: 20px;
}

#stats {
  margin-bottom: 20px;
  font-size: 1.2em;
}

#stats span {
  margin: 0 15px;
}

#difficulty-selection {
  margin-bottom: 20px;
}

#difficulty-selection h2 {
  margin-bottom: 10px;
}

#difficulty-selection label {
  margin-right: 15px;
}

#advanced-settings label {
  display: block;
  margin: 5px 0;
}

#advanced-settings input {
  width: 50px;
}

#game-container {
  display: inline-block;
  margin-top: 20px;
  background-color: #34495e;
  padding: 10px;
  border-radius: 10px;
  position: relative; /* For absolute positioning of wall indicators */
}

table {
  border-collapse: collapse;
  margin: 0 auto;
  overflow: visible;
}

td {
  overflow: visible;
}

.cell {
  width: 60px;
  height: 60px;
  border: 2px solid #ecf0f1;
  position: relative;
  cursor: pointer;
  background-color: #1abc9c; /* Original cell background */
  transition: background-color 0.3s, transform 0.2s;
  box-sizing: border-box;
  overflow: visible; /* Allow wall indicators to be visible */
}

/* Make .cell:hover slightly brighter than .cell */
.cell:hover {
  background-color: #48d1b0; /* A lighter shade of the cell background */
  transform: scale(1.05);
}

/* Make .cell.pre-filled slightly darker than .cell */
.cell.pre-filled {
  background-color: #169f87; /* A darker shade of the cell background */
  cursor: default;
}


.symbol-img {
  width: 32px;
  height: 32px;
}

.cell.error {
  background-color: #e74c3c !important;
}

/* Ensure the .error class doesn't affect child elements */
.cell.error .wall-indicator {
  color: #ecf0f1; /* Keep the wall indicators visible */
}

/* Style the .symbol div */
.symbol {
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Wall Indicator Styles */
.wall-indicator {
  position: absolute;
  z-index: 10;
  font-size: 16px; /* Adjust as needed */
  font-weight: bold;
  color: #ecf0f1;
  line-height: 1;
}

.wall-indicator.right {
  top: 50%;
  left: 100%;
  transform: translate(-50%, -50%);
}

.wall-indicator.down {
  top: 100%;
  left: 50%;
  transform: translate(-50%, -50%);
}

@media (max-width: 600px) {
  .wall-indicator {
    font-size: 12px; /* Adjust for smaller screens */
  }
}

#buttons {
  margin-top: 20px;
}

button {
  background-color: #e74c3c;
  color: #ecf0f1;
  border: none;
  padding: 12px 20px;
  font-size: 1em;
  cursor: pointer;
  margin: 5px;
  border-radius: 5px;
  transition: background-color 0.3s, transform 0.2s;
}

button:hover {
  background-color: #c0392b;
  transform: translateY(-2px);
}

#splash-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(44, 62, 80, 0.95);
  color: #ecf0f1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

#splash-screen h1 {
  font-size: 3em;
  margin-bottom: 20px;
}

#splash-screen p {
  font-size: 1.2em;
  max-width: 600px;
  text-align: center;
  margin-bottom: 30px;
}

#start-game-button {
  background-color: #e74c3c;
  color: #ecf0f1;
  border: none;
  padding: 15px 25px;
  font-size: 1.2em;
  cursor: pointer;
  border-radius: 5px;
  transition: background-color 0.3s;
}

#start-game-button:hover {
  background-color: #c0392b;
}

@keyframes winAnimation {
  0% { background-color: #1abc9c; }
 50% { background-color: #f1c40f; }
  100% { background-color: #1abc9c; }
}

.cell.win {
  animation: winAnimation 1s ease-in-out;
}

/* Game Instructions */
#instructions {
  margin-top: 30px;
  text-align: left;
}

#instructions h2 {
  font-size: 1.8em;
  margin-bottom: 10px;
}

#instructions ul {
  list-style-type: disc;
  margin-left: 20px;
}

#instructions ul ul {
  list-style-type: circle;
}

#instructions li {
  font-size: 1em; /* Ensure consistent font size */
}

/* Instructions Icon Style */
.instruction-icon {
  font-weight: bold;
  font-size: inherit; /* Inherit font size from parent */
  color: #ecf0f1;
  margin: 0 2px;
  vertical-align: middle;
}

@media (max-width: 600px) {
  .cell {
    width: 40px;
    height: 40px;
  }

  .symbol-img {
    width: 24px;
    height: 24px;
  }

  h1 {
    font-size: 2em;
  }

  #splash-screen h1 {
    font-size: 2.5em;
  }
}

/* Loading Overlay Styles */
#loading-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(44, 62, 80, 0.8);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 100;
}

#loading-overlay img {
  width: 100px;
  height: 100px;
}
