/* === FONTS === */
@font-face {
  font-family: 'Ferrum';
  src: url('Ferrum.woff2') format('woff2'),
    url('Ferrum.woff') format('woff');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

/* === LAYOUT === */
body {
  margin: 0;
  font-family: 'Arial', sans-serif;
  background-color: black;
}

.app-wrapper {
  min-height: 100vh;
  min-height: var(--app-height);
  display: flex;
  flex-direction: column;
  align-items: center;
  background-color: #101010;
  background-image: url(https://images4.alphacoders.com/863/863601.png);
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center;
  text-align: center;
}

.site-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: clamp(1rem, 4vw, 2rem);
}

.main-content {
  background-color: rgba(16, 16, 16, 0.92);
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.65);
  border-radius: 0.5rem;
  width: 100%;
  padding: 1.5rem 2rem;
  margin: 1rem auto 2rem;
}

/* === TYPOGRAPHY === */
h1 {
  transform: scaleX(1);
  color: #f5f5f5;
  font-family: "Ferrum", serif;
  font-size: clamp(3rem, 5vw, 4rem);
  -webkit-text-stroke: 0.4px black;
  position: relative;
}

h1::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 97.5%;
  height: clamp(0.05em, 0.1vw, 0.1em);
  background-color: #f5f5f5;
  box-shadow: 0 0 0 0.5px black, 0 0 0 0.5px black;
}

h2 {
  font-family: "Stint Ultra Expanded", serif;
  font-weight: 500;
  color: #D23F6C;
  margin-top: clamp(-0.75rem, -2.5vw, -0.6rem);
  font-size: clamp(1.48rem, 2.4vw, 1.9rem);
  text-shadow:
    -0.4px -0.4px 0 #000,
    0 -0.4px 0 #000,
    0.4px -0.4px 0 #000,
    -0.4px 0 0 #000,
    0.4px 0 0 #000,
    -0.4px 0.4px 0 #000,
    0 0.4px 0 #000,
    0.4px 0.4px 0 #000;
}

h3 {
  color: #ffaa33;
  font-size: clamp(1rem, 2.5vw, 1.2rem);
  margin-top: 2rem;
  margin-bottom: 0.75rem;
  font-family: 'Cinzel', serif;
  text-shadow: 0 0 4px #000;
}

.tip-title {
  color: #ffaa33;
  font-size: clamp(1.1rem, 2.5vw, 1.4rem);
  margin-top: 2rem;
  margin-bottom: 0.75rem;
  font-family: 'Cinzel', serif;
  text-shadow: 0 0 4px #000;
}

/* === EXPLANATION & INSTRUCTIONS === */
#explanation,
#instructions {
  color: #ddd;
  font-size: clamp(0.6rem, 1.5vw, 0.85rem);
  margin-bottom: 1rem;
}

#explanation ul {
  background-color: rgba(0, 0, 0, 0.5);
  border: 1px solid #ffaa33;
  border-left: 4px solid #ffaa33;
  border-radius: 0.5rem;
  color: #eee;
  padding: 1rem 1.5rem;
  list-style-type: square;
  width: fit-content;
  margin: 1.5rem auto 0;
  text-align: left;
  box-shadow: 0 0 12px rgba(255, 170, 51, 0.15);
  margin-bottom: 2rem;
}

/* === COUNTER === */
#counter-box {
  width: 280px;
  padding: 0 2rem;
  border-radius: 0.75rem;
  margin: 0 auto;
  background-color: transparent;
}

#black-hole {
  color: #ffcc00;
  font-weight: bold;
  font-family: "Cinzel", serif;
  font-size: clamp(0.8rem, 1.2vw, 1rem);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease, filter 0.4s ease;
  text-shadow: 0 0 10px #ff9900, 0 0 20px #ff3300;
  margin-bottom: 0.75rem;
}

#black-hole.visible {
  opacity: 1;
  pointer-events: auto;
  filter: drop-shadow(0 0 8px #ffaa33);
}

.column {
  aspect-ratio: 1 / 3;
  width: 100%;
  background-color: rgba(16, 16, 16, 0.6);
  display: flex;
  flex-direction: column;
  border-radius: 0.375rem;
}

.block {
  position: relative;
  flex: 1;
  box-sizing: border-box;
  border: 1px solid #333;
  background-color: rgba(0, 0, 0, 0.25);
  overflow: hidden;
}

.block::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: linear-gradient(to top, #ff9900, #ffaa33);
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 0;
}

.block.filled::before {
  opacity: 1;
}

.column .block:first-child {
  border-top: 2px solid #333;
  border-top-left-radius: 0.25rem;
  border-top-right-radius: 0.25rem;
}

.column .block:last-child {
  border-bottom: 2px solid #333;
  border-bottom-left-radius: 0.25rem;
  border-bottom-right-radius: 0.25rem;
}

.row .col-4:first-child .block {
  border-left: 2px solid #333;
}

.row .col-4:last-child .block {
  border-right: 2px solid #333;
}

.label {
  font-size: clamp(0.5rem, 1.5vw, 0.75rem);
  color: #ddd;
}

/* === RESET BUTTON === */
#reset-button {
  font-size: clamp(0.75rem, 1.5vw, 0.9rem);
  padding: clamp(0.25rem, 1vw, 0.4rem) clamp(1rem, 1.5vw, 1.4rem);
  background-color: #5500cc;
  color: #fff;
  border: none;
  border-radius: 0.25rem;
  box-shadow: 0 0 5px #5500cc;
  margin-top: 1rem;
}

#reset-button:active {
  background-color: #4100a9;
  box-shadow: 0 0 4px #4100a9;
}

#reset-button:focus {
  outline: none;
  box-shadow: 0 0 5px #aa55ff;
}

/* === FOOTER === */
#site-footer {
  background: linear-gradient(to bottom, #101010, #000000);
  color: #aaa;
  font-family: 'Arial', sans-serif;
  font-size: clamp(0.8rem, 1.2vw, 1rem);
  padding: 2rem 0;
  text-align: center;
  margin-top: auto;
  width: 100%;
  border-top: 2px solid #333333;
}

/* === MEDIA === */
@media (max-width: 576px) {
  .main-content {
    padding: 1rem;
    border-radius: 0;
  }

  #explanation ul {
    padding: 1rem;
    padding-left: 1.5rem;
  }

  #reset-button {
    margin-top: 1.5rem;
  }
}