/* === FONTS === */
@font-face {
  font-family: 'Roba High';
  src: url('fonts/RobaV0.5High-Semibold.woff2') format('woff2'),
       url('fonts/RobaV0.5High-Semibold.woff') format('woff');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Roba Low';
  src: url('fonts/RobaV0.5Low-Medium.woff2') format('woff2'),
       url('fonts/RobaV0.5Low-Medium.woff') format('woff');
  font-weight: 500; /* Medium */
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Roba Low';
  src: url('fonts/RobaV0.5Low-Semibold.woff2') format('woff2'),
       url('fonts/RobaV0.5Low-Semibold.woff') format('woff');
  font-weight: 600; /* Semibold */
  font-style: normal;
  font-display: swap;
}

/* === VARIABLES === */

:root {
  --color-blue: #004ea8;
  --color-red: #f04b0f;
  --color-green: #009b37;
  --color-yellow: #ffe400;
}

/* === BASE === */

html, body {
  font-family: 'Roba Low', sans-serif;
  font-weight: 500;
  margin: 0;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Roba Low', sans-serif;
  font-weight: 600;
}

h2 {
  font-size: clamp(1.8rem, 0.75rem + 1.5vw, 3rem);
  margin: 0.5rem;
}

p {
  font-size: clamp(1.25rem, 0.75rem + 1.5vw, 2rem);
  text-align: center;
}

/* === BUTTONS === */

button {
  font-family: 'Roba Low', sans-serif;
  font-weight: 600;
  border: none;
  border-radius: 9999px; 
  padding: 0.6rem 1.1rem;
  background: #2563eb;
  color: #ffffff;
  cursor: pointer;
  transition: background-color 0.15s ease, transform 0.05s ease;
  height: 75px;
  font-size: 1.5rem;
}

button:hover {
  background: #1d4ed8;
}

button:active {
  transform: translateY(1px);
}

button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

#submit-hint-btn, #submit-code-btn {
  position: absolute;
  top: 0;
  right: -35px;
  width: 75px;
  height: 75px;

  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0;

  outline: 5px solid #cbd5e1;
}

#submit-hint-btn svg, 
#submit-code-btn svg {
  width: 50%; 
  height: auto;
  fill: white;
  transform: translateY(-2px) translateX(0px); 
}

#start-btn, .start-btn, .restart-btn { 
  position: fixed;
  right: 3rem;
  bottom: 3rem;
  width: 150px;
  height: 150px;
  /* align-self: center; */
} 

@media (max-width: 768px) {
  #start-btn, .start-btn, .restart-btn {
    right: 1.5rem;
    bottom: 3rem;
    width: 110px;
    height: 110px;
  }
}

/* === INPUTS === */

.inputs {
  display: flex;
  flex-wrap: wrap;       /* allow wrapping into column */
  justify-content: center;
  gap: 1rem;
}

.input-group {
  position: relative;
  margin: 0 50px 0 50px;
  left: calc(-75px/4); /* optical compensation based on input height*/
} 

#hint-input,
#code-input {
    height: 75px;
    width: 280px;
    padding: 0.6rem 0.8rem;
    font-family: 'Roba Low', sans-serif;
    font-weight: 600; /* Roba Low Semibold */
    font-size: 2rem;
    color: #2563eb;
    caret-color: #2563eb;
    border: 5px solid #cbd5e1;
    outline: none;
    box-sizing: border-box;
}

#hint-input {
    background: #e4ffe3;
}

#code-input {
    background: #ffe7c7;
}

#hint-input:focus,
#code-input:focus {
    border-color: #2563eb;
}

/* === TIMER === */

#countdown-timer {
  font-family: 'Roba High', sans-serif;
  font-weight: 600;
  font-size: 14vh;
  color: white;
  text-shadow: 5px 8px 3px rgba(0, 0, 255, 0.5);
}

#timer-container {
  position: fixed;
  z-index: 10001;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
}

#timer-container.paused #countdown-timer {
  color: red; 
}

/* === PAUSE OVERLAY === */

#pause-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 9999;
  color: white;
  background: #004EA8;
  background: linear-gradient(0deg, rgba(0, 78, 168, 0.9) 60%, rgba(0, 78, 168, 0) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}

#pause-overlay[hidden] {
  display: none !important;
}

#pause-btn { 
  position: fixed;
  top: 15vh;
} 

.pause-message > p {
  font-size: 3rem;
  font-weight: 600;
}

/* === MAIN SCREENS === */

.screen {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  width: 100%;
  overflow: hidden;
}

.screen .bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;       /* cover both width and height */
  object-position: center; /* keep centered */
  z-index: 0;
  pointer-events: none;
}

.screen .overlay {
  position: relative;
  z-index: 1;
  margin-top: 25vh;
  display: flex;
  flex-direction: column; 
  align-items: center; 
  gap: 1rem;
}

.screen .overlay > p {
  text-align: center;
  max-width: 80vw;
  color: white;
  text-shadow: 2px 4px 3px rgba(0, 0, 255, 0.8);
  height: 50px;
}

/* === MODALS === */

#modal-hint-content[hidden],
#modal-code-content[hidden],
#modal-nothing-content[hidden],
#modal-penalty-content[hidden] {
  display: none;
}

#modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 900; 
  display: flex;
  align-items: center;
  /* justify-content: center; */
  background: #004EA8;
  background: linear-gradient(0deg, rgba(0, 78, 168, 0.90) 33%, rgba(0, 78, 168, 0) 66%);
}

#modal-overlay[hidden] {
  display: none !important;
}

#modal-hint-content, #modal-code-content, #modal-nothing-content, #modal-penalty-content {
  position: fixed;
  top: 25vh;
  bottom: 10vw;
  left: 10vw;
  right: 10vw;
  color: white;
  background: gray;
  border: solid 5px;

  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
}

#modal-hint-content, #modal-nothing-content {
  background: var(--color-green);
  border-color: var(--color-blue);
}

#modal-code-content {
  background: var(--color-blue);
  border-color: var(--color-red);
}

#modal-penalty-content {
  background: var(--color-red);
  border-color: var(--color-blue);
}

#hint-text, #code-text {
  max-width: 80%;
  font-size: clamp(1.3rem, 0.75rem + 1.5vw, 3rem);
  text-align: center;
}

#hint-image, #code-image {
  height: 20vh;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.card-operations {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem; 
}

.card-operations > p {
  margin: 0;
}

.card-operations[hidden] {
  display: none !important;
}

.close-modal-btn {
  margin-bottom: 1rem;
}

/* === NUMBERS === */

.number-circle {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  width: 2em;
  height: 2em;
  border-radius: 50%;
  margin: 5px; 
  position: relative;
  z-index: 0;
}

.number-circle::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%; 
  background: var(--color-blue);
  z-index: -2;
}

#modal-code-content .number-circle {
  outline: solid white 2px;
}

#code-token.number-circle {
  border-radius: 10%;
}

.discard-numbers .number-circle {
  text-shadow: 0 0 5px var(--color-blue), 0 0 5px var(--color-blue), 0 0 5px var(--color-blue);
}

.discard-numbers .number-circle::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: linear-gradient(
    45deg,
    transparent calc(50% - 1px),
    white calc(50% - 1px),
    white calc(50% + 1px),
    transparent calc(50% + 1px)
  );
}

/* === OTHER === */

footer {
  position: fixed;
  bottom: 0;
  text-align: center;
  width: 100%;
}

#impressum {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  text-align: center;

  /* padding: 1rem;
  box-sizing: border-box; */
}

#impressum p {
  font-size: clamp(0.9rem, 0.5rem + 1vw, 1rem);
  color: white;
  max-width: 33vw;
  margin: 0 auto 2.6rem auto;
  text-shadow: 2px 4px 5px rgba(0, 0, 255, 0.5);
}

.logo {
  position: absolute;
  bottom: 3rem;
  left: 3rem;
  height: 150px;
}

@media (max-width: 768px) {
  .logo {
    left: 1.5rem;
    bottom: 3rem;
    height: 110px;
  }

  /* Add this new block */
  #impressum p {
    max-width: 90vw;
    margin-bottom: calc(3rem + 110px + 1rem); 
  }
}