:root {
  --bg-color: #f4f6f8;
  --card-color: #ffffff;
  --text-color: #1a1a1a;
  --accent: #4f46e5;
  --border: #dcdcdc;
}

body.dark {
  --bg-color: #0f172a;
  --card-color: #1e293b;
  --text-color: #f8fafc;
  --accent: #6366f1;
  --border: #334155;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: var(--bg-color);
  color: var(--text-color);
}

.container {
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
}

.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.header h1 {
  font-size: 1.5rem;
}

#themeToggle {
  background: none;
  border: none;
  font-size: 1.3rem;
  cursor: pointer;
}

.card {
  background-color: var(--card-color);
  border-radius: 12px;
  padding: 25px;
  width: 100%;
  max-width: 420px;
  display: flex;
  flex-direction: column;
  gap: 15px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.08);
}

.input-group {
  display: flex;
  flex-direction: column;
}

label {
  font-size: 0.9rem;
  margin-bottom: 5px;
}

input {
  padding: 10px;
  border-radius: 8px;
  border: 1px solid var(--border);
  font-size: 1rem;
}

input:focus {
  outline: none;
  border-color: var(--accent);
}

.preset-buttons {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.preset-buttons button {
  flex: 1;
  padding: 8px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background-color: transparent;
  cursor: pointer;
  font-size: 0.85rem;
}

.calculate-btn {
  background-color: var(--accent);
  color: white;
  border: none;
  padding: 12px;
  font-size: 1rem;
  border-radius: 10px;
  cursor: pointer;
}

.calculate-btn:hover {
  opacity: 0.9;
}

.result {
  text-align: center;
  font-weight: 600;
  margin-top: 10px;
  line-height: 1.6;
}

/* Mobile Optimization */
@media (max-width: 480px) {
  .header h1 {
    font-size: 1.25rem;
  }
}
