body {
  font-family: sans-serif;
  display: flex;
  justify-content: center;
  background: #222;
  color: #eee;
  margin: 0;
  padding: 20px;
}

#app {
  width: 100%;
  max-width: 400px; /* portrait-phone-ish */
}

h1 {
  text-align: center;
  font-size: 1.4em;
}

#input-area {
  position: relative;
}

#guesses-remaining {
  text-align: center;
  margin: 10px 0;
}

#guess-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

#guess-table td {
  padding: 6px;
  border-bottom: 1px solid #444;
}

#guess-table td:nth-child(1) {
  width: 1em;
  padding-right: 4px;
}

#guess-table td:nth-child(2) {
  /* country name — no explicit width, takes remaining space */
}

#guess-table td:nth-child(3) {
  width: 3.5em;
  text-align: right;
  padding-right: 12px;
}

#guess-table td:nth-child(4) {
  width: 70px; /* match your .flag-morph width + a little padding */
  text-align: right;
  padding-right: 0px;
}

#goal-flag-container {
  width: 100%;
  margin-bottom: 12px;
}

#goal-flag-canvas {
  display: block;
  width: 100%;
  height: auto;
  background: #333;
  border: 1px solid #555;
  border-radius: 4px;
}

#game-message {
  text-align: center;
  font-weight: bold;
  min-height: 1.2em;
}

.flag-morph {
  position: relative;
  width: 60px;
  height: 40px;
}

.flag-layer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #333;
}

.flag-layer.match {
  opacity: 0;
  transition: opacity 0.6s ease;
}

.flag-layer.match.visible {
  opacity: 1;
}