/* Basic Set */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Segoe UI', sans-serif;
}

/* Page Background */
body {
  background-color: linear-gradient(to bottom right, #e1f0ff, #f4f9ff);
  color: #333;
  padding: 40px;
}


/* Left box = Table section */
.left {
  flex: 1 1 500px;
}

/* Heading */
h1 {
  text-align: center;
  color: #003366;
  font-size: 2.5rem;
  font-weight: bold;
  margin-bottom: 30px;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

/* Table styling */
table {
  width: 100%;
  border-collapse: collapse;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 0 10px rgba(0, 51, 102, 0.15);
  background-color: #fff;
}

/* ========== Hover 效果：表格列 ========== */
tbody tr:hover {
  background-color: #dceaff;
  transition: background-color 0.3s ease;
}

/* ========== Focus 效果：輸入框 ========== */
input[type="text"]:focus {
  outline: none;
  border: 2px solid #0077cc;
  box-shadow: 0 0 6px rgba(0, 119, 204, 0.3);
  transition: border-color 0.3s, box-shadow 0.3s;
}

/* Table headers */
th {
  background-color: #0077cc;
  color: white;
  padding: 15px;
  text-align: left;
}

/* Table cells */
td {
  padding: 15px;
  border-bottom: 1px solid #ddd;
  vertical-align: top;
}

/* Table row colours */
tr.countryInfo-row td {
  background-color: #eaf4fb;
}

tr.postcode-row td {
  background-color: #f5faff;
}

tr.weather-row td {
  background-color: #f0f8ff;
}

/* Labels */
label {
  display: block;
  font-weight: bold;
  margin-bottom: 5px;
  color: #005999;
}

/* Input fields */
input[type="text"] {
  padding: 10px;
  width: 100%;
  max-width: 250px;
  border: 1px solid #ccc;
  border-radius: 6px;
}

/* Buttons */
button {
  margin-top: 10px;
  padding: 10px 20px;
  background-color: #0077cc;
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.3s ease;
}

button:hover {
  background-color: #005fa3;
  transform: scale(1.05);
}

/* API result */

#countryInfoResult,
#postcodeResult,
#weatherResult {
  font-size: 1rem;
  color: #003366;
  font-weight: 500;

  transition: font-size 0.3s ease, color 0.3s ease;
}

#countryInfoResult:hover,
#postcodeResult:hover,
#weatherResult:hover {
  font-size: 1.3rem; 
  color: #cc0025;    
}


/* Footer */
footer {
  margin-top: 60px;
  padding: 20px;
  text-align: center;
  font-size: 0.9rem;
  color: #666;
  background-color: #f4f9ff;
  border-top: 1px solid #ccc;
}