/*
 * Minimalistic dark theme for the StopBuying countdown page.
 * The layout is mobile‑friendly (390px wide) with generous padding.
 * Colours are restricted to black, white and Uniswap pink for the buy button.
 */
body {
  /* Deep navy background reminiscent of rugpull.game */
  background: #0a1430;
  color: #f5f5f5;
  font-family: 'Montserrat', sans-serif;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  min-height: 100vh;
}

#app {
  /* Let the container grow to fit its content instead of imposing a fixed
     width.  This allows the countdown and swap widget to expand
     horizontally to accommodate large digits. */
  width: auto;
  max-width: none;
  padding: 20px;
  box-sizing: border-box;
  margin: 0 auto;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.hidden {
  display: none;
}

/* Wallet warning banner rolls down from top when no wallet is detected.
   Now sits outside the main container and spans the full viewport width. */
#wallet-warning {
  background: #2a3860;
  color: #f0c838;
  padding: 10px 0;
  text-align: center;
  width: 100%;
  animation: slideDown 0.5s ease-out forwards;
}

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

.countdown-wrapper {
  text-align: center;
  margin-bottom: 20px;
}

.countdown {
  font-size: 5rem;
  font-weight: bold;
  line-height: 1;
  /* Use tabular numbers so each digit takes up the same width and the countdown doesn’t jump */
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
}

.countdown-label {
  font-size: 1rem;
  opacity: 0.7;
  margin-top: 4px;
}

.swap-wrapper {
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.swap-input-row,
.swap-output-row {
  display: flex;
  flex-direction: column;
}

label {
  font-size: 0.85rem;
  margin-bottom: 4px;
  color: #aab8d0;
}

.input-group {
  display: flex;
  align-items: center;
  /* Darker input wrapper with light border for a cohesive vibe */
  background: #152a50;
  color: #ffffff;
  border-radius: 8px;
  border: 1px solid #314f7f;
  overflow: hidden;
}

.input-group input {
  flex: 1;
  border: none;
  padding: 10px;
  font-size: 1rem;
  background: transparent;
  color: #ffffff;
}

.input-group input:focus {
  outline: none;
}

/* Colour placeholder text to be lighter for better contrast on dark inputs */
.input-group input::placeholder {
  /* White placeholder text so the number appears crisp like normal text */
  color: #ffffff;
}

/* Vendor prefixes for placeholder colour */
.input-group input::-webkit-input-placeholder {
  color: #ffffff;
}
.input-group input::-moz-placeholder {
  color: #ffffff;
}
.input-group input::-ms-input-placeholder {
  color: #ffffff;
}
}

/* Remove spinner arrows from number inputs */
input[type='number']::-webkit-outer-spin-button,
input[type='number']::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
input[type='number'] {
  -moz-appearance: textfield;
}

/* Unit labels for both input and output groups */
.unit {
  /* Fixed width for the unit labels to align ETH and STOP */
  width: 60px;
  justify-content: center;
  padding: 0 10px;
  background: #152a50;
  color: #ffffff;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  height: 100%;
  border-left: 1px solid #314f7f;
}

.swap-output {
  background: #152a50;
  color: #ffffff;
  padding: 10px;
  border: 1px solid #314f7f;
  border-radius: 8px;
  font-size: 1rem;
}

/* Output group uses the same styling as input group but is read‑only */
.output-group {
  display: flex;
  align-items: center;
  background: #152a50;
  color: #ffffff;
  border-radius: 8px;
  border: 1px solid #314f7f;
  overflow: hidden;
}

/* Value inside the output group grows to fill space */
.output-group .output-value {
  flex: 1;
  padding: 10px;
  font-size: 1rem;
  color: #ffffff;
  white-space: nowrap;
}

.button-row {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 20px;
}

.buy-btn,
 .unlock-btn {
  width: 100%;
  padding: 12px;
  border: 2px solid transparent;
  border-radius: 8px;
  font-size: 1.1rem;
  font-weight: bold;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: opacity 0.2s;
}

.buy-btn {
  /* Golden button with brown outline like Rugpull game */
  background: #f0c838;
  border-color: #7c4b15;
  color: #2a1905;
}

.unlock-btn {
  background: #32446d;
  border-color: #4c5f8e;
  color: #aab8d0;
}

.buy-btn:disabled,
.unlock-btn:disabled {
  opacity: 0.5;
  cursor: default;
}

.buy-btn:not(:disabled):hover {
  background: #ffe178;
  box-shadow: 0 0 10px #ffe178;
}

.unlock-btn:not(:disabled) {
  background: #f0c838;
  border-color: #7c4b15;
  color: #2a1905;
}

.unlock-btn:not(:disabled):hover {
  background: #ffe178;
  box-shadow: 0 0 10px #ffe178;
}

.label {
  line-height: 1;
}

.sub {
  font-size: 0.75rem;
  opacity: 0.7;
  margin-top: 4px;
}

.message {
  /* Full width feedback below the main container */
  min-height: 24px;
  font-size: 0.9rem;
  color: #f0c838;
  margin: 10px 0;
  text-align: center;
  width: 100%;
}

.links {
  text-align: center;
  font-size: 0.85rem;
  margin: 20px 0 10px 0;
  width: 100%;
  margin-top: auto;
}

.links a {
  color: #f0c838;
  text-decoration: underline;
  margin: 0 4px;
}