/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap');

/* General body styling */
body {
  font-family: 'Roboto', sans-serif;
  background-color: #FFFFFF; /* White background */
  margin: 0;
  padding: 0;
  color: #334155; /* Darker gray for text (slate-700) */
  line-height: 1.6;
}

/* Header styling */
header {
  background-color: #F0F9FF; /* Very light pastel blue (sky-50) */
  padding: 20px 30px;
  color: #0F172A; /* Almost black for header text (slate-900) */
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  display: flex; /* Use flexbox for alignment */
  align-items: center; /* Vertically align items */
  justify-content: space-between; /* Space out logo, title, and links */
  flex-wrap: wrap; /* Allow items to wrap on smaller screens */
}

.header-logo-title {
  display: flex;
  align-items: center;
}

header .logo {
  height: 40px; /* Adjust as needed */
  width: auto;
  margin-right: 15px;
}

header h1 {
  font-size: 1.8em; /* Slightly reduced for a cleaner look */
  margin: 0;
  font-weight: 500;
  color: #0EA5E9; /* Sky blue for title (sky-500) */
}

header form {
  margin: 10px 0; /* Adjusted margin */
  display: flex;
  align-items: center;
}

header input[type="text"] {
  width: 280px;
  max-width: 100%;
  padding: 10px 15px;
  border: 1px solid #CBD5E1; /* Lighter border (slate-300) */
  border-radius: 20px; /* Slightly less rounded */
  font-size: 15px;
  outline: none;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

header input[type="text"]:focus {
  border-color: #60A5FA; /* Pastel blue focus (sky-400) */
  box-shadow: 0 0 0 2px rgba(96, 165, 250, 0.2);
}

header button {
  padding: 10px 20px;
  margin-left: 10px;
  border: none;
  border-radius: 20px;
  background-color: #7DD3FC; /* Lighter pastel blue button (sky-300) */
  color: #0F172A; /* Dark text on light button */
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

header button:hover {
  background-color: #38BDF8; /* Slightly darker pastel blue on hover (sky-400) */
}

.header-links {
  margin: 10px 0; /* Adjusted margin */
}

.header-links a {
  color: #3B82F6; /* Medium pastel blue for links (blue-500) */
  text-decoration: none;
  font-size: 15px;
  margin-left: 20px; /* Increased spacing */
  font-weight: 500;
  transition: color 0.3s ease;
}

.header-links a:hover {
  color: #2563EB; /* Darker blue on hover (blue-600) */
  text-decoration: underline;
}

/* Main container styling */
.container {
  padding: 25px 30px; /* Adjusted padding */
  max-width: 1200px;
  margin: 20px auto; /* Added top margin */
  background: #FFFFFF;
  border-radius: 6px; /* Subtle rounding */
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.07);
}

/* Current level and navigation styling */
.current-level {
  font-size: 1.1em; /* Slightly smaller */
  margin-bottom: 20px; /* Increased spacing */
  font-weight: 500;
  color: #475569; /* Medium gray (slate-600) */
}

.navigation {
  margin-bottom: 25px; /* Increased spacing */
}

.navigation a {
  color: #3B82F6; /* Medium pastel blue */
  text-decoration: none;
  font-weight: 500;
  margin-right: 20px; /* Increased spacing */
  padding: 8px 12px;
  border-radius: 5px;
  transition: background-color 0.3s ease, color 0.3s ease;
}

.navigation a:hover {
  background-color: #E0F2FE; /* Very light blue bg on hover (sky-100) */
  color: #2563EB; /* Darker blue text on hover */
}

/* Table styling */
table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 25px;
}

th, td {
  padding: 12px 15px; /* Adjusted padding */
  text-align: left;
  border-bottom: 1px solid #E2E8F0; /* Lighter border (slate-200) */
  font-size: 15px;
}

th {
  background-color: #F8FAFC; /* Very light gray for header (slate-50) */
  font-weight: 500;
  color: #334155; /* Darker gray (slate-700) */
}

th a {
  text-decoration: none;
  color: inherit;
}

th a:hover {
  color: #0EA5E9; /* Sky blue hover */
  text-decoration: underline;
}

tr:hover {
  background-color: #F8FAFC; /* Very light gray (slate-50) */
}

/* Link styling inside tables */
table td a {
  color: #3B82F6; /* Medium pastel blue */
  font-weight: 500;
  text-decoration: none;
  transition: color 0.3s ease;
}

table td a:hover {
  color: #2563EB; /* Darker blue */
  text-decoration: underline;
}

/* Pagination styling */
.pagination {
  text-align: center;
  margin-top: 30px; /* Increased spacing */
  margin-bottom: 10px; /* Added bottom margin */
}

.pagination a, .pagination span {
  margin: 0 6px; /* Increased spacing */
  padding: 8px 14px; /* Adjusted padding */
  text-decoration: none;
  border: 1px solid #CBD5E1; /* Lighter border (slate-300) */
  border-radius: 5px;
  font-size: 15px;
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

.pagination a {
  background-color: #FFFFFF;
  color: #3B82F6; /* Medium pastel blue */
}

.pagination a:hover {
  background-color: #E0F2FE; /* Lightest blue bg (sky-100) */
  border-color: #A5D8FF; /* Lighter pastel blue border */
  color: #2563EB;
}

.pagination .current {
  background-color: #7DD3FC; /* Lighter pastel blue (sky-300) */
  color: #0F172A; /* Dark text for contrast */
  border: 1px solid #7DD3FC;
}

/* Detail view table styling (for code.php) */
.record-details table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 25px;
}

.record-details th, .record-details td {
  padding: 12px 15px;
  border-bottom: 1px solid #E2E8F0; /* Lighter border (slate-200) */
  font-size: 15px;
}

.record-details th {
  background-color: #F8FAFC; /* Very light gray (slate-50) */
  width: 25%; /* Adjusted width */
  font-weight: 500;
  color: #334155; /* (slate-700) */
}

.record-details td {
    background-color: #FFFFFF;
}

/* Back link styling */
.back-link {
    display: inline-block;
    margin-top: 20px;
    padding: 10px 18px;
    color: #3B82F6;
    text-decoration: none;
    font-weight: 500;
    border: 1px solid #CBD5E1;
    border-radius: 5px;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.back-link:hover {
    background-color: #E0F2FE;
    color: #2563EB;
}
