/* Buttons */
button {
  height: 50px;
  width: 120px;
  font-size: 18px;
  font-weight: 600;
  background-color: transparent;
  color: white;
  border: 2px solid rgba(255, 255, 255, 0.8);
  border-radius: 12px;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  letter-spacing: 2px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  text-transform: uppercase;
  font-family: var(--font-score);
}

button:hover {
  background-color: rgba(255, 255, 255, 0.1);
  border-color: white;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

button:active {
  transform: translateY(0);
}

.button-container {
  position: fixed;
  right: 30px;
  bottom: 30px;
  display: flex;
  gap: 20px;
  z-index: 10000;
}

#nextbtn {
  background-color: rgba(255, 255, 255, 0.1);
  border-color: #27ae60;
  color: white;
}

#nextbtn:hover {
  background-color: #27ae60;
  border-color: #27ae60;
}

#nextbtn, #btn {
  position: relative;
  bottom: auto;
  right: auto;
}


/* Play Again Button (Small) */
.playbut {
  height: 44px;
  line-height: 44px;
  width: 160px;
  font-size: 18px;
  font-weight: bold;
  font-family: var(--font-score);
  color: #6B6B6B;
  background-color: white;
  border-radius: 9px;
  cursor: pointer;
  text-transform: uppercase;
  border: none;
  transition: transform 0.2s;
  text-align: center; /* Ensures text is centered */
  display: flex;
  justify-content: center;
  align-items: center;
}

.playbut:hover {
  transform: scale(1.05);
}


/* Play Again Button (Big/Celebration) */
.play-again {
    position: relative;
    margin-top: 20px;
    z-index: 150;
    text-decoration: none;
    color: grey;
    border: 2px solid white;
    border-radius: 10px;
    padding: 10px 20px;
    font-size: 16px;
    font-family: var(--font-score);
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: white;
    align-self: center;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.play-again:hover {
    background-color: #f0f0f0;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    transform: translateY(-2px);
}

.play-again a {
    text-decoration: none !important;
    color: inherit;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Animations */
@keyframes scorePop {
  0% { transform: scale(1); }
  50% { transform: scale(1.2); color: #27ae60; }
  100% { transform: scale(1); }
}

@keyframes popIn {
  0% { transform: scale(0.8); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.score-pop {
  animation: scorePop 0.4s ease-out;
}

.pop-in {
  animation: popIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.fade-in {
  animation: fadeIn 0.4s ease-in;
}

/* Modal Backdrop */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(2px);
  z-index: 9998;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.modal-backdrop.show {
  opacity: 1;
  pointer-events: auto;
}

/* Rules Modal - Restored Classic Colors with Modern Structure */
.rules {
  width: 360px;
  background-color: var(--color-rules-bg);
  color: white;
  border: 4px solid white;
  border-radius: 16px;
  padding: 25px;
  position: fixed;
  right: 25px;
  bottom: 110px;
  z-index: 9999;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
  transform: translateY(20px);
  opacity: 0;
  pointer-events: none;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.rules.show {
  transform: translateY(0) !important;
  opacity: 1 !important;
  pointer-events: auto !important;
  display: block !important;
}


.rules ul {
  list-style: none; /* Reset default */
  padding: 0;
  margin: 0;
}

.rules ul li {
  margin-bottom: 12px;
  font-size: 15px;
  line-height: 1.5;
  color: white;
  position: relative;
  padding-left: 20px;
}

.rules ul li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  width: 8px;
  height: 8px;
  background-color: #ffeb3b; /* Bright Yellow Markers */
  border-radius: 2px;
}

.game-text {
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 26px;
  font-weight: 800;
  font-family: var(--font-score);
  color: white;
  margin-bottom: 20px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.shutdown {
  height: 40px;
  width: 40px;
  background-color: #f44336;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  position: absolute;
  top: -15px;
  right: -15px;
  z-index: 10100;
  cursor: pointer;
  border: 3px solid white;
  box-shadow: 0 4px 15px rgba(0,0,0,0.2);
  transition: all 0.3s ease;
}

.shutdown:hover {
  transform: scale(1.1);
  background-color: #d32f2f;
}

.shutdown::before,
.shutdown::after {
  content: '';
  position: absolute;
  width: 24px;
  height: 4px;
  background-color: white;
  border-radius: 2px;
}

.shutdown::before {
  transform: rotate(45deg);
}

.shutdown::after {
  transform: rotate(-45deg);
}

.shutdown img {
  display: none; /* Use CSS cross instead */
}

/* New container for rules content to handle scrolling */
.rules-content {
  max-height: 50vh; /* Constrain height here */
  overflow-y: auto;
  padding-right: 5px; /* Add some padding for scrollbar */
}


