* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Segoe UI', Arial, sans-serif;
}

body {
  background-color: #f4f7f6;
  color: #333;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

header {
  background-color: #2c3e50;
  color: white;
  padding: 2rem 1rem;
  text-align: center;
}

.back-link {
  color: #1abc9c;
  text-decoration: none;
  font-weight: bold;
  display: inline-block;
  margin-bottom: 1rem;
}

.container {
  max-width: 800px;
  margin: 2rem auto;
  padding: 0 1rem;
  flex: 1;
}

.tool-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
}

.tool-card {
  background: white;
  padding: 1.5rem;
  border-radius: 8px;
  box-shadow: 0 4px 6px rgba(0,0,0,0.05);
  text-decoration: none;
  color: inherit;
  border: 1px solid #e0e0e0;
  transition: transform 0.2s ease;
}

.tool-card:hover {
  transform: translateY(-4px);
}

.calculator-card {
  background: white;
  padding: 2rem;
  border-radius: 8px;
  box-shadow: 0 4px 6px rgba(0,0,0,0.05);
  max-width: 450px;
  margin: 0 auto;
}

label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: bold;
}

input[type="date"] {
  width: 100%;
  padding: 0.75rem;
  margin-bottom: 1rem;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 1rem;
}

button {
  width: 100%;
  padding: 0.75rem;
  background-color: #27ae60;
  color: white;
  border: none;
  border-radius: 4px;
  font-size: 1rem;
  cursor: pointer;
  font-weight: bold;
}

button:hover {
  background-color: #219150;
}

.result-box {
  margin-top: 1.5rem;
  padding: 1rem;
  background-color: #e8f8f5;
  border-left: 4px solid #27ae60;
  border-radius: 4px;
}

.error {
  margin-top: 1rem;
  color: #e74c3c;
  font-weight: bold;
}

footer {
  text-align: center;
  padding: 1rem;
  background-color: #2c3e50;
  color: white;
  margin-top: auto;
}