@import url("https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700&display=swap");

:root {
  /* Light Theme Variables */
  --bg-color: #f8fafc;
  --text-color: #1e293b;
  --text-muted: #64748b;
  --primary-color: #1db954;
  --primary-hover: #1ed760;
  --card-bg: #ffffff;
  --border-color: #e2e8f0;
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --radius-lg: 16px;
  --radius-md: 8px;
  --radius-full: 9999px;
  --input-bg: #f1f5f9;
  --nav-bg: rgba(255, 255, 255, 0.8);
}

body {
  background-color: var(--bg-color);
  color: var(--text-color);
  font-family: "Plus Jakarta Sans", "Nunito", sans-serif;
  margin: 0;
  padding: 40px 20px;
  line-height: 1.6;
  transition: background-color 0.3s ease, color 0.3s ease;
}

.container {
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
  background: var(--card-bg);
  padding: 40px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border-color);
  transition: all 0.3s ease;
}

h1 {
  font-size: 2.5em;
  font-weight: 700;
  margin-bottom: 30px;
  color: var(--text-color);
  letter-spacing: -0.025em;
}

h1 span {
  color: var(--primary-color);
}

form {
  margin: 0 auto;
  width: 100%;
  max-width: 600px;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 40px;
  gap: 16px;
}

input[type="text"] {
  padding: 16px 24px;
  font-size: 1rem;
  box-sizing: border-box;
  border: 2px solid transparent;
  border-radius: var(--radius-full);
  width: 100%;
  background-color: var(--input-bg);
  color: var(--text-color);
  transition: all 0.2s ease;
  font-family: inherit;
}

input[type="text"]:focus {
  outline: none;
  background-color: var(--card-bg);
  border-color: var(--primary-color);
  box-shadow: 0 0 0 4px rgba(29, 185, 84, 0.1);
}

input[type="text"]::placeholder {
  color: var(--text-muted);
}

button[type="submit"] {
  width: 100%;
  padding: 16px 24px;
  border: none;
  border-radius: var(--radius-full);
  background-color: var(--primary-color);
  color: white;
  font-size: 1.1em;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
}

button[type="submit"]:hover {
  background-color: var(--primary-hover);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

button[type="submit"]:active {
  transform: translateY(0);
}

.card {
  background-color: var(--card-bg);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  margin: 20px 0;
  padding: 24px;
  display: flex;
  flex-direction: row;
  align-items: center;
  transition: all 0.3s ease;
  border: 1px solid var(--border-color);
  text-align: left;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary-color);
}

.card img {
  width: 120px;
  height: 120px;
  border-radius: var(--radius-md);
  margin-right: 24px;
  object-fit: cover;
  box-shadow: var(--shadow-md);
}

.card-details {
  flex: 1;
}

.card-title {
  margin: 0 0 8px 0;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-color);
}

.card-text {
  margin: 0 0 4px 0;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.card-link {
  display: inline-block;
  margin-top: 12px;
  text-decoration: none;
  color: var(--primary-color);
  font-weight: 600;
  font-size: 0.9rem;
  transition: color 0.2s ease;
}

.card-link:hover {
  color: var(--primary-hover);
  text-decoration: underline;
}

/* Navbar */
.navbar {
  max-width: 800px;
  margin: 0 auto 40px auto;
  background-color: var(--nav-bg);
  padding: 16px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-color);
  display: flex;
  justify-content: center;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  position: sticky;
  top: 20px;
  z-index: 100;
  box-shadow: var(--shadow-md);
}

.navbar ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 8px;
}

.navbar a {
  text-decoration: none;
  color: var(--text-color);
  font-size: 0.95em;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: var(--radius-full);
  transition: all 0.2s ease;
}

.navbar a:hover,
.navbar a.active {
  background-color: var(--primary-color);
  color: white;
}

/* Utility & Misc */
.logo {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  margin-bottom: 40px;
}

.logo img {
  width: 48px;
  height: 48px;
  transition: transform 0.3s ease;
}

.logo img:hover {
  transform: rotate(15deg);
}

table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin-top: 24px;
}

th,
td {
  padding: 16px;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
}

th {
  background-color: var(--bg-color);
  font-weight: 600;
  color: var(--text-color);
}

th:first-child {
  border-top-left-radius: var(--radius-md);
}

th:last-child {
  border-top-right-radius: var(--radius-md);
}

/* Modal */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
}

.modal-content {
  background-color: var(--card-bg);
  margin: 10% auto;
  padding: 32px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-lg);
  width: 90%;
  max-width: 600px;
  position: relative;
  animation: slideIn 0.3s ease;
}

.close {
  color: var(--text-muted);
  float: right;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
  transition: color 0.2s ease;
  line-height: 1;
}

.close:hover,
.close:focus {
  color: var(--text-color);
  text-decoration: none;
}

@keyframes slideIn {
  from {
    transform: translateY(-20px);
    opacity: 0;
  }

  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* Animations */
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.loading {
  border: 4px solid var(--border-color);
  border-top: 4px solid var(--primary-color);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  animation: spin 1s linear infinite;
  margin: 20px auto;
  display: none;
}

/* Dark Mode */
@media (prefers-color-scheme: dark) {
  :root {
    --bg-color: #0f172a;
    --text-color: #f1f5f9;
    --text-muted: #94a3b8;
    --primary-color: #22c55e;
    --primary-hover: #4ade80;
    --card-bg: #1e293b;
    --border-color: #334155;
    --input-bg: #0f172a;
    --nav-bg: rgba(30, 41, 59, 0.8);
  }

  /* Make shadows more subtle in dark mode */
  .container,
  .card,
  .navbar {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
  }

  input[type="text"]:focus {
    box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.2);
  }

  th {
    background-color: #0f172a;
  }
}

/* Mobile */
@media (max-width: 768px) {
  .container {
    padding: 24px;
    margin: 10px;
  }

  .card {
    flex-direction: column;
    text-align: center;
  }

  .card img {
    margin: 0 0 16px 0;
    width: 100%;
    max-width: 200px;
    height: auto;
  }

  .navbar ul {
    flex-wrap: wrap;
    justify-content: center;
  }
}