:root {
  --primary-color: #0056b3;
  --primary-hover: #004494;
  --secondary-color: #28a745;
  --secondary-hover: #218838;
  --background-color: #f4f4f9;
  --card-background: #ffffff;
  --text-color: #333;
  --light-text-color: #666;
  --border-color: #ddd;
  --tag-bg: #e0e0e0;
  --shadow-color: rgba(0,0,0,0.1);
  --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
}

body {
  font-family: var(--font-family);
  padding: 0;
  margin: 0;
  background: var(--background-color);
  color: var(--text-color);
  line-height: 1.6;
}

.container {
  max-width: 900px;
  margin: 2rem auto;
  padding: 0 1rem;
}

.main-header {
  background-color: var(--primary-color);
  color: white;
  padding: 2rem 1rem;
  text-align: center;
}

.main-header h1 {
  margin: 0;
  font-size: 2.5rem;
}

.subtitle {
  margin: 0.5rem 0 0;
  font-size: 1.1rem;
  opacity: 0.9;
}

.case {
  background: var(--card-background);
  border-radius: 8px;
  padding: 1.5rem;
  margin: 1rem 0;
  box-shadow: 0 4px 8px var(--shadow-color);
  border-left: 5px solid var(--primary-color);
  transition: transform 0.2s ease-in-out;
}

.case:hover {
    transform: translateY(-3px);
}

.case h3 {
  color: var(--primary-color);
  margin-top: 0;
  font-size: 1.5rem;
}

.case a {
  color: var(--primary-hover);
  text-decoration: none;
  font-weight: bold;
}

.case a:hover {
  text-decoration: underline;
}

.tags span {
  background: var(--tag-bg);
  padding: 0.3rem 0.6rem;
  border-radius: 4px;
  margin-right: 0.5rem;
  font-size: 0.8rem;
  color: #555;
  display: inline-block;
  margin-bottom: 0.5rem;
  text-transform: capitalize;
}

.case-date {
  font-size: 0.85rem;
  color: var(--light-text-color);
}

.filter-bar {
  margin-bottom: 1rem;
  display: flex;
  gap: 0.5rem;
}

.filter-bar input[type="text"] {
  flex-grow: 1;
  padding: 0.75rem;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  font-size: 1rem;
}

.filter-bar button {
  padding: 0.75rem 1.5rem;
  border: none;
  background-color: #6c757d;
  color: white;
  border-radius: 4px;
  cursor: pointer;
  font-size: 1rem;
  transition: background-color 0.2s;
}

.filter-bar button:hover {
  background-color: #5a6268;
}

.case-count-info {
    margin-bottom: 1rem;
    font-size: 0.9rem;
    color: var(--light-text-color);
    text-align: center;
}

.loader {
    text-align: center;
    padding: 2rem;
    font-size: 1.2rem;
    color: var(--light-text-color);
}

.no-results {
    text-align: center;
    padding: 2rem;
    font-size: 1.2rem;
    color: var(--light-text-color);
}

.add-case-form {
  background: var(--card-background);
  border-radius: 8px;
  padding: 2rem;
  margin-top: 3rem;
  box-shadow: 0 4px 8px var(--shadow-color);
  border-top: 5px solid var(--secondary-color);
}

.add-case-form h2 {
  margin-top: 0;
  color: var(--primary-color);
}

.form-group {
    margin-bottom: 1.5rem;
}

.add-case-form label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: bold;
  color: #555;
}

.add-case-form input,
.add-case-form textarea {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  box-sizing: border-box; /* Important for 100% width */
  font-size: 1rem;
}

.add-case-form textarea {
  resize: vertical;
  min-height: 100px;
}

.submit-btn {
  padding: 0.75rem 1.5rem;
  border: none;
  background-color: var(--secondary-color);
  color: white;
  border-radius: 4px;
  cursor: pointer;
  font-size: 1.1rem;
  font-weight: bold;
  transition: background-color 0.2s;
  width: 100%;
}

.submit-btn:hover {
  background-color: var(--secondary-hover);
}

.main-footer {
    text-align: center;
    padding: 2rem 1rem;
    margin-top: 2rem;
    color: var(--light-text-color);
    font-size: 0.9rem;
}

/* Responsive Design */
@media (max-width: 600px) {
    .main-header h1 {
        font-size: 2rem;
    }
    .filter-bar {
        flex-direction: column;
    }
}
