
:root {
  --primary: #EA580C;
  --primary-hover: #C2410C;
  --bg-light: #F8FAFC;
  --bg-white: #FFFFFF;
  --text-main: #0F172A;
  --text-muted: #475569;
  --border-color: #E2E8F0;
  --header-bg: #1E293B;
  --footer-bg: #0F172A;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: var(--bg-light);
  color: var(--text-main);
  line-height: 1.6;
}

/* Header */
header {
  background-color: var(--header-bg);
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: white;
}

.logo {
  font-size: 1.5rem;
  font-weight: bold;
  color: white;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.logo span {
  color: var(--primary);
}

nav ul {
  list-style: none;
  display: flex;
  gap: 1.5rem;
}

nav a {
  color: white;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s;
}

nav a:hover {
  color: var(--primary);
}

/* Main Container */
main {
  max-w-width: 1200px;
  margin: 0 auto;
  padding: 3rem 1rem;
  min-height: calc(100vh - 200px);
}

.container {
  max-width: 1000px;
  margin: 0 auto;
}

/* Typography */
h1 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  color: var(--text-main);
  line-height: 1.2;
}

h2 {
  font-size: 1.8rem;
  margin-top: 2rem;
  margin-bottom: 1rem;
  color: var(--text-main);
}

p {
  margin-bottom: 1.5rem;
  color: var(--text-muted);
}

/* Cards */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.card {
  background: var(--bg-white);
  border: 1px solid var(--border-color);
  border-radius: 0.75rem;
  padding: 1.5rem;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  transition: transform 0.2s, box-shadow 0.2s;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.card h3 {
  margin-bottom: 0.5rem;
  color: var(--text-main);
}

.card a {
  display: inline-block;
  margin-top: 1rem;
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
}

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

/* Forms */
.calculator-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin-top: 2rem;
}

@media (max-width: 768px) {
  .calculator-container {
    grid-template-columns: 1fr;
  }
}

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

label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: var(--text-main);
}

input[type="number"] {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--border-color);
  border-radius: 0.5rem;
  font-size: 1rem;
  font-family: inherit;
}

input[type="number"]:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(234, 88, 12, 0.2);
}

.btn {
  background-color: var(--primary);
  color: white;
  border: none;
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 0.5rem;
  cursor: pointer;
  transition: background-color 0.2s;
  width: 100%;
}

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

.btn-outline {
  background-color: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border-color);
  margin-top: 1rem;
}

.btn-outline:hover {
  background-color: var(--bg-light);
}

/* Results Panel */
.results-panel {
  background-color: var(--header-bg);
  color: white;
  padding: 2rem;
  border-radius: 0.75rem;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.results-panel h3 {
  margin-bottom: 1.5rem;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  padding-bottom: 0.5rem;
}

.result-item {
  margin-bottom: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.result-label {
  color: #94A3B8;
  font-size: 0.9rem;
}

.result-value {
  font-size: 1.25rem;
  font-weight: bold;
  color: white;
}

.result-value.highlight {
  color: var(--primary);
  font-size: 2rem;
}

.error-message {
  color: #EF4444;
  background-color: #FEE2E2;
  padding: 1rem;
  border-radius: 0.5rem;
  margin-bottom: 1rem;
  display: none;
}

/* Guides */
.guide-content {
  background: var(--bg-white);
  padding: 2rem;
  border-radius: 0.75rem;
  border: 1px solid var(--border-color);
  margin-top: 2rem;
}

.quick-answer {
  background-color: rgba(234, 88, 12, 0.1);
  border-left: 4px solid var(--primary);
  padding: 1.5rem;
  margin-bottom: 2rem;
  border-radius: 0 0.5rem 0.5rem 0;
}

.quick-answer h3 {
  color: var(--primary);
  margin-bottom: 0.5rem;
}

.math-breakdown {
  background-color: var(--bg-light);
  padding: 1.5rem;
  border-radius: 0.5rem;
  font-family: monospace;
  font-size: 1.1rem;
  margin: 1.5rem 0;
}

/* Footer */
footer {
  background-color: var(--footer-bg);
  color: #94A3B8;
  padding: 3rem 2rem;
  text-align: center;
  margin-top: 4rem;
}

footer a {
  color: #94A3B8;
  text-decoration: none;
  margin: 0 0.5rem;
}

footer a:hover {
  color: white;
}
