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

body {
  font-family: 'Poppins', sans-serif;
  background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 10px;
  padding-top: 10px; /* Added to push content slightly below the top */
}

.container {
  max-width: 360px;
  width: 100%;
  background: white;
  border-radius: 12px;
  padding: 5px;
  text-align: center;
  animation: fadeIn 1s ease-in-out;
  height: 650px; /* Fixed height of 650px */
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

h1 {
  font-size: 22px;
  color: #2c3e50;
  margin-bottom: 0px;
  font-weight: 600;
}

.message {
  font-size: 18px;
  color: #34495e;
  margin: 5px 0 5px 0;
  min-height: 72px;
  transition: font-size 0.3s ease;
}

.message.large {
  font-size: 24px;
  font-weight: 600;
}

.quit-btn {
  padding: 10px 20px;
  font-size: 16px;
  border: none;
  border-radius: 20px;
  cursor: pointer;
  color: white;
  background: #e74c3c;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  margin: 10px auto;
  visibility: visible;
}

.quit-btn.hidden {
  visibility: hidden;
}

.quit-btn:hover {
  background: #c0392b;
  transform: translateY(-2px);
  box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
}

.quit-btn:active {
  transform: translateY(0);
  box-shadow: none;
}

.quit-btn::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: width 0.4s ease, height 0.4s ease;
}

.quit-btn:active::after {
  width: 150px;
  height: 150px;
}

.quit-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.coin-container {
  height: 250px; /* Bounding box height set to 250px */
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 10px 0;
}

.coin-container img {
  width: 250px; 
  height: 250px; 
  transition: transform 0.3s ease;
}

.controls {
  height: 120px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.gamble-text {
  font-size: 24px;
  font-weight: bold;
  color: #e74c3c;
  margin-bottom: 0px;
  visibility: visible;
}

.gamble-text.hidden {
  visibility: hidden;
}

.button-group {
  display: flex;
  gap: 5px;
  visibility: visible;
}

.button-group.hidden {
  visibility: hidden;
}

.flip-btn {
  padding: 10px 20px;
  font-size: 16px;
  border: none;
  border-radius: 20px;
  cursor: pointer;
  color: white;
  background: #3498db;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.flip-btn:hover {
  background: #2980b9;
  transform: translateY(-2px);
  box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
}

.flip-btn:active {
  transform: translateY(0);
  box-shadow: none;
}

.flip-btn::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: width 0.4s ease, height 0.4s ease;
}

.flip-btn:active::after {
  width: 150px;
  height: 150px;
}

.flip-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
