/* ===== 복불복 카드 게임 전용 스타일 ===== */

.game-container {
  background: none;
  padding: 0px;
  border-radius: 12px;
  box-shadow: none;
  width: 600px; /* Set to 600px as requested */
  margin: 40px auto;
}

.game-container h1 {
  margin: 0 0 16px;
  font-size: 22px;
  color: #111827;
}

.cards {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 16px;
}

.card {
  width: 70px;
  height: 100px;
  perspective: 600px;
  cursor: pointer;
}

.card .inner {
  width: 100%;
  height: 100%;
  transition: transform 0.6s;
  transform-style: preserve-3d;
  position: relative;
}

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

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

.card .front {
  background: #2563eb;
  color: #fff;
  font-size: 20px;
}

.card .back {
  background: #f3f4f6;
  border: 2px solid #ccc;
  transform: rotateY(180deg);
  font-size: 16px;
}

.card .back.pass {
  background: #10b981;
  color: #fff;
}

.card .back.fail {
  background: #ef4444;
  color: #fff;
}

.result {
  margin-top: 14px;
  font-weight: bold;
  color: #111827;
  min-height: 24px;
  text-align: center; /* Center the result message */
}

.settings {
    text-align: center; /* Center buttons and inputs */
    margin-bottom: 20px; /* Space below settings */
    /* margin-top: 40px; Removed as h1 now controls gap */
}

.settings label {
    display: inline-block; /* Allow labels to sit next to inputs */
    margin: 5px 10px; /* Spacing between labels/inputs */
    font-weight: bold;
}

.settings input[type="number"] {
    padding: 8px 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 16px;
    width: 60px; /* Adjust width as needed */
    text-align: center;
    line-height: 1.2;
    height: 38px; /* Consistent height with buttons */
    box-sizing: border-box;
}

.settings button {
    margin: 5px; /* Space between buttons */
    padding: 0px 20px;
    font-size: 16px;
    cursor: pointer;
    border: 1px solid #ccc;
    border-radius: 5px;
    background-color: #f0f0f0;
    line-height: 1.2;
    height: 42px; /* Consistent height */
    box-sizing: border-box;
}

.settings button:hover {
    background-color: #e0e0e0;
}

.settings {
    display: flex; /* Use flexbox for better alignment of setting items */
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 10px; /* Space between setting items */
    margin-bottom: 20px;
}

.setting-item {
    display: flex;
    align-items: center;
    gap: 5px;
}

.count-btn {
    padding: 8px 12px; /* Smaller padding for +/- buttons */
    font-size: 16px;
    cursor: pointer;
    border: 1px solid #ccc;
    border-radius: 5px;
    background-color: #f0f0f0;
    line-height: 1.2;
    height: 38px; /* Consistent height */
    box-sizing: border-box;
}

.count-btn:hover {
    background-color: #e0e0e0;
}

.count-display {
    display: inline-block;
    min-width: 30px; /* Ensure enough space for numbers */
    text-align: center;
    font-size: 18px;
    font-weight: bold;
    padding: 8px 0;
    line-height: 1.2;
    height: 38px; /* Consistent height */
    box-sizing: border-box;
    border: 1px solid transparent; /* To align with buttons */
}

.game-actions {
    width: 100%; /* Ensure it takes full width within its flex parent */
    text-align: center; /* Center the buttons inside */
    margin-top: 10px; /* Add some space above these buttons */
}
