/*
Author: Samuel Boye
Date: 11/05/2025
Class: CSS 305
Assignment: Assignment 4b for Hostinger
Description: Enhanced styling for the simple form and database table.
*/

/* ---------- Base Reset ---------- */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background-color: #eaf6ff;
  background-image: linear-gradient(180deg, rgba(17, 107, 163, 0.08) 0%, rgba(39,143,208,0.03) 40%, rgba(255,255,255,0) 100%);
  background-repeat: no-repeat;
  background-attachment: fixed;
  color: #111;
  line-height: 1.6;
  padding: 40px;
}

/* ---------- Main Layout ---------- */
main {
  max-width: 650px;
  background: #fff;
  margin: 0 auto;
  padding: 25px 30px;
  border-radius: 10px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

h1 {
  text-align: center;
  margin-bottom: 20px;
  color: #333;
  letter-spacing: 0.5px;
}

/* ---------- Form Styling ---------- */
form section {
  margin-bottom: 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

label {
  flex: 0 0 130px;
  font-weight: 600;
}

input[type="text"],
input[type="email"] {
  flex: 1;
  padding: 8px;
  border: 1px solid #aaa;
  border-radius: 5px;
  transition: border-color 0.2s ease-in-out;
}

input[type="text"]:focus,
input[type="email"]:focus {
  border-color: #007bff;
  outline: none;
}

footer {
  text-align: center;
  margin-top: 15px;
}

input[type="submit"] {
  padding: 10px 18px;
  border: none;
  background: #007bff;
  color: #fff;
  border-radius: 5px;
  font-weight: bold;
  letter-spacing: 0.3px;
  cursor: pointer;
  transition: background 0.25s ease;
}

input[type="submit"]:hover {
  background: #0056b3;
}

/* ---------- Messages ---------- */
.ok {
  background: #d7f5d7;
  border: 1px solid #3c763d;
  padding: 10px;
  border-radius: 5px;
  color: #2e6b2e;
  margin-bottom: 15px;
}

.error {
  background: #fbdcdc;
  border: 1px solid #a94442;
  padding: 10px;
  border-radius: 5px;
  color: #8a1f1f;
  margin-bottom: 15px;
}

/* ---------- Table Styling ---------- */
table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 18px;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

th, td {
  padding: 10px;
  text-align: left;
  border-bottom: 1px solid #ddd;
}

th {
  background: #007bff;
  color: white;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-size: 0.9em;
}

tbody tr:nth-child(even) {
  background-color: #f8f9fa;
}

tbody tr:hover {
  background-color: #e9f3ff;
}

p a {
  color: #007bff;
  text-decoration: none;
}

p a:hover {
  text-decoration: underline;
}
