/* ===== Reset ===== */

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; /* Slightly more modern font */
  background: #ffffff;
  color: #111111;
}

/* ===== Layout ===== */

.container {
  max-width: 500px;
  margin: 80px auto;
  padding: 40px 30px;
  border: 1px solid #e5e5e5;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05); /* Added a soft shadow for depth */
}

/* ===== Title ===== */

h1 {
  margin: 0 0 30px 0;
  font-size: 26px;
  font-weight: 600;
  text-align: center;
  color: #c40000;
}

/* ===== Input ===== */

input#username {
  width: 100%;
  padding: 12px;
  font-size: 15px;
  border: 1px solid #cccccc;
  border-radius: 4px;
  margin-bottom: 20px;
  transition: border-color 0.2s;
}

input#username:focus {
  outline: none;
  border-color: #c40000;
}

/* ===== Region Selector (The Squares) ===== */

.regions {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 25px;
}

/* Hide the actual radio circle */
.regions input[type="radio"] {
  display: none;
}

/* Style the label to look like a square button */
.regions label {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 50px;
  border: 2px solid #e5e5e5;
  border-radius: 4px;
  cursor: pointer;
  font-weight: bold;
  font-size: 14px;
  color: #555555;
  transition: all 0.2s ease;
}

/* Hover state for squares */
.regions label:hover {
  border-color: #c40000;
}

/* Selection Logic: When the hidden radio is checked, style the label immediately after it */
.regions input[type="radio"]:checked + label,
.regions label:has(input[type="radio"]:checked) { /* Support for different HTML structures */
  background: #c40000;
  border-color: #c40000;
  color: #ffffff;
}

/* Note: Since your HTML has <label><input> Text</label>, use this selector: */
.regions label:has(input:checked) {
  background: #c40000;
  border-color: #c40000;
  color: #ffffff;
}

/* ===== Buttons ===== */

.buttons {
  display: flex;
  gap: 10px;
}

.buttons button {
  flex: 1;
  padding: 14px;
  font-size: 16px;
  font-weight: 600;
  border-radius: 4px;
  border: none;
  background: #c40000;
  color: #ffffff;
  cursor: pointer;
  transition: background 0.2s;
}

.buttons button:hover {
  background: #a30000;
}

/* ===== Status & Stats ===== */

#status {
  margin-top: 25px;
  font-size: 14px;
  text-align: center;
  min-height: 20px;
  color: #333333;
}

.stats {
    margin-top: 20px;
    font-size: 12px;
    color: #999;
    text-align: center;
}