.fall-dawn-container,
.fall-dawn-container * {
  box-sizing: border-box;
}

.fall-dawn-container {
  max-width: 500px;
  margin: 50px auto;
  padding: 20px;
  color: #000;
  border: 2px solid #6d4c41;
  border-radius: 15px;
  box-shadow: 0 0 15px rgba(0, 0, 0, 0.7);
  font-family: Georgia, "Times New Roman", serif;
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center;
  background-color: rgba(255, 255, 255, 0.5);
  text-align: center;
}

.fall-dawn-container .falldawn-logo {
  max-width: 100%;
  height: auto;
  margin-bottom: 20px;
}

.fall-dawn-counters {
  margin-top: 50px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.fall-dawn-counter-column {
  text-align: center;
  flex: 1;
}

.fall-dawn-counter-image {
  width: 100px;
  margin-bottom: 10px;
}

.fall-dawn-counter p {
  font-size: 50px;
  margin: 10px 0;
}

.fall-dawn-button-group {
  display: flex;
  justify-content: center;
  margin-top: 30px;
}

.fall-dawn-button-group button {
  margin: 5px;
  padding: 10px 20px;
  color: #fff;
  border: none;
  cursor: pointer;
  border-radius: 5px;
  font-size: 16px;
  min-height: 44px;
}

.fall-dawn-large-sign {
  font-size: 3em;
}

.fall-dawn-add-gold,
.fall-dawn-subtract-gold {
  background-color: #8b4513;
}

.fall-dawn-add-gold:hover,
.fall-dawn-subtract-gold:hover {
  background-color: #a0522d;
}

.fall-dawn-add-alaxite,
.fall-dawn-subtract-alaxite {
  background-color: #006400;
}

.fall-dawn-add-alaxite:hover,
.fall-dawn-subtract-alaxite:hover {
  background-color: #228b22;
}

.fall-dawn-gold-counter,
.fall-dawn-alaxite-counter {
  background: #fff;
  padding: 14px 30px;
  border-radius: 14px;
  border: 1px solid #ccc;
  font-weight: 500;
}

.fall-dawn-reset-counters {
  margin: 40px auto;
  background: #6d4c41;
  color: #fff;
  border: none;
  padding: 10px 20px;
  cursor: pointer;
  border-radius: 5px;
  display: block;
  min-height: 44px;
}

.fall-dawn-reset-counters:hover {
  background: #8d6e63;
}

.fall-dawn-modal[hidden] {
  display: none;
}

.fall-dawn-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.fall-dawn-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(16, 10, 6, 0.72);
  backdrop-filter: blur(3px);
}

.fall-dawn-modal-dialog {
  position: relative;
  z-index: 1;
  width: min(100%, 420px);
  padding: 24px;
  border: 1px solid rgba(109, 76, 65, 0.45);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(248, 241, 227, 0.98), rgba(233, 221, 198, 0.98));
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.32);
  color: #2d1d16;
  text-align: left;
}

.fall-dawn-modal-title {
  margin: 0 0 10px;
  font-size: 28px;
  line-height: 1.1;
}

.fall-dawn-modal-message {
  margin: 0 0 20px;
  font-size: 16px;
  line-height: 1.5;
}

.fall-dawn-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.fall-dawn-modal-actions button {
  min-height: 44px;
  padding: 10px 18px;
  border: 0;
  border-radius: 10px;
  cursor: pointer;
  font-size: 15px;
}

.fall-dawn-modal-cancel {
  background: rgba(71, 52, 45, 0.12);
  color: #47342d;
}

.fall-dawn-modal-confirm {
  background: #6d4c41;
  color: #fff;
}

.fall-dawn-modal-confirm:hover {
  background: #8d6e63;
}

.fall-dawn-toggle-selection {
  display: flex;
  justify-content: center;
  margin-bottom: 20px;
  width: 100%;
}

.fall-dawn-toggle-selection-button {
  background-color: rgba(0, 0, 0, 0.8);
  color: #fff;
  border: none;
  padding: 10px 20px;
  cursor: pointer;
  border-radius: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
}

.fall-dawn-toggle-selection-button:hover {
  background-color: rgba(0, 0, 0, 1);
}

.fall-dawn-arrow-icon {
  margin-right: 10px;
  font-weight: 700;
  min-width: 12px;
}

.fall-dawn-color-buttons {
  margin-top: 10px;
}

.fall-dawn-color-button {
  margin: 5px;
  padding: 10px 20px;
  border: none;
  cursor: pointer;
  color: #fff;
  border-radius: 5px;
  min-height: 44px;
}

.fall-dawn-color-button[data-color='green'] {
  background-color: #68a676;
}

.fall-dawn-color-button[data-color='red'] {
  background-color: #bb6b69;
}

.fall-dawn-color-button[data-color='blue'] {
  background-color: #4179a9;
}

.fall-dawn-color-button[data-color='yellow'] {
  background-color: #e3d272;
}

.fall-dawn-color-button:hover {
  opacity: 0.8;
}

.fall-dawn-container.fall-dawn-theme-green {
  background-color: #68a676;
}

.fall-dawn-container.fall-dawn-theme-red {
  background-color: #bb6b69;
}

.fall-dawn-container.fall-dawn-theme-blue {
  background-color: #4179a9;
}

.fall-dawn-container.fall-dawn-theme-yellow {
  background-color: #e3d272;
}

.fall-dawn-container.fall-dawn-theme-gray {
  background-color: #d4d4d4;
}

@media screen and (max-width: 600px) {
  .fall-dawn-container {
    max-width: 100vw;
    width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    margin-top: 0;
    margin-bottom: 0;
    padding: 12px;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    min-height: 100svh;
    height: auto;
    overflow: visible;
  }

  .fall-dawn-counters {
    margin-top: 24px;
    flex-direction: row;
    gap: 10px;
  }

  .fall-dawn-counter-column {
    min-width: 0;
  }

  .fall-dawn-counter p {
    font-size: 36px;
  }

  .fall-dawn-counter-image {
    width: 80px;
  }

  .fall-dawn-button-group {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 10px;
  }

  .fall-dawn-button-group button {
    flex: 1 1 50%;
    margin: 0;
    padding: 10px;
  }

  .fall-dawn-toggle-selection-button,
  .fall-dawn-reset-counters {
    width: 100%;
  }

  .fall-dawn-color-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    font-size: 13px;
    padding: 0;
  }

  .fall-dawn-color-button {
    width: 100%;
    margin: 0;
    padding: 10px;
  }

  .fall-dawn-small-text {
    font-size: 11px;
  }

  .fall-dawn-modal {
    padding: 12px;
  }

  .fall-dawn-modal-dialog {
    width: 100%;
    padding: 20px;
    border-radius: 16px;
  }

  .fall-dawn-modal-title {
    font-size: 24px;
  }

  .fall-dawn-modal-actions {
    flex-direction: column-reverse;
  }

  .fall-dawn-modal-actions button {
    width: 100%;
  }
}

