/* Base Reset & Layout */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  color: #222;
  background-color: #fff;
  padding: 2rem;
}

/* Navigation */
nav {
  background-color: #f9f9f9;
  border-bottom: 1px solid #ddd;
  padding: 1rem 0;
  margin-bottom: 2rem;
}

nav ul {
  list-style: none;
  display: flex;
  justify-content: center;
  gap: 2rem;
}

nav ul li {
  display: inline;
}

nav a {
  color: #007bff;
  text-decoration: none;
  font-weight: 500;
}

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

/* Form Container */
.form-container {
  max-width: 1000px;
  margin: 2rem auto;
  padding: 2rem;
  background-color: #f8f9fa;
  border: 1px solid #ddd;
  border-radius: 6px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.form-container h2 {
  text-align: center;
  margin-bottom: 1.5rem;
}

/* Form Layout */
.styled-form .form-group {
  display: flex;
  flex-direction: row;
  align-items: center;
  margin-bottom: 1rem;
}

.styled-form .form-group label {
  width: 150px;
  font-weight: 500;
}

.styled-form .form-group input[type="text"],
.styled-form .form-group input[type="email"],
.styled-form .form-group input[type="password"] {
  flex: 1;
  padding: 0.5rem;
  border: 1px solid #ccc;
  border-radius: 4px;
}

.styled-form .form-group.checkbox {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Buttons */
.styled-form button,
.button-link {
  width: 100%;
  padding: 0.75rem;
  font-weight: 600;
  background-color: #007bff;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  margin-top: 1rem;
  display: inline-block;
  text-align: center;
  text-decoration: none;
  transition: background-color 0.2s;
}

.styled-form button:hover,
.button-link:hover {
  background-color: #0056b3;
}

/* Tables */
.form-container table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1.5rem;
}

.form-container th,
.form-container td {
  border: 1px solid #ccc;
  padding: 1rem;
  text-align: left;
}

.form-container th {
  background-color: #f0f0f0;
}

/* Footer */
footer {
  text-align: center;
  margin-top: 2rem;
  font-size: 0.9rem;
  color: #666;
}

/* Responsive */
@media (max-width: 768px) {
  nav ul {
    flex-direction: column;
    gap: 1rem;
  }

  .form-container {
    padding: 1rem;
  }

  .styled-form .form-group {
    flex-direction: column;
    align-items: flex-start;
  }

  .styled-form .form-group label {
    width: 100%;
    margin-bottom: 0.5rem;
  }

  .form-container table,
  .form-container thead,
  .form-container tbody,
  .form-container th,
  .form-container td,
  .form-container tr {
    display: block;
    width: 100%;
  }

  .form-container tr {
    margin-bottom: 1rem;
  }

  .form-container td {
    border: none;
    padding: 0.5rem 0;
    position: relative;
  }

  .form-container td::before {
    content: attr(data-label);
    font-weight: bold;
    display: block;
    margin-bottom: 0.25rem;
    color: #555;
  }
}

.styled-form select {
  flex: 1;
  padding: 0.5rem;
  border: 1px solid #ccc;
  border-radius: 4px;
  background-color: white;
}
