/* Modern Light Theme for Solar Panel Charge Time Calculator */
:root {
  --primary: #4ade80;
  --primary-dark: #22c55e;
  --background: #f8fafc;
  --card-bg: #ffffff;
  --text: #334155;
  --text-dark: #1e293b;
  --border: #e2e8f0;
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  background-color: var(--background);
  color: var(--text);
  line-height: 1.6;
  padding: 2rem 1rem;
  max-width: 800px;
  margin: 0 auto;
}

h1 {
  color: var(--text-dark);
  text-align: center;
  margin-bottom: 2rem;
  font-size: 2.25rem;
  font-weight: 700;
}

p {
  margin-bottom: 1.25rem;
  font-size: 1.1rem;
}

input[type="number"] {
  width: 100%;
  max-width: 200px;
  padding: 0.75rem;
  margin-top: 0.5rem;
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  background-color: var(--card-bg);
  font-size: 1rem;
  color: var(--text-dark);
  transition: border-color 0.2s ease;
}

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

/* Remove spinner buttons from number inputs */
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

input[type="number"] {
  -moz-appearance: textfield;
}

button {
  background-color: var(--primary);
  color: white;
  border: none;
  border-radius: 0.5rem;
  padding: 0.875rem 2rem;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  display: block;
  margin: 1rem auto 2rem;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

button:hover {
  background-color: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.15);
}

button:active {
  transform: translateY(0);
}

#r {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--primary-dark);
  margin-bottom: 2rem;
  padding: 1rem;
  background-color: var(--card-bg);
  border-radius: 0.5rem;
  box-shadow: var(--shadow);
  min-height: 3.5rem;
  display: flex;
  align-items: center;
}

#article {
  background-color: var(--card-bg);
  border-radius: 0.75rem;
  padding: 2rem;
  margin-top: 2rem;
  box-shadow: var(--shadow);
}

#article p {
  margin-bottom: 1rem;
  color: var(--text);
}

#article hr {
  border: 0;
  height: 1px;
  background-color: var(--border);
  margin-bottom: 1.5rem;
}

/* Improve field layout */
p:has(input) {
  display: flex;
  flex-direction: column;
  max-width: 400px;
  margin-left: auto;
  margin-right: auto;
}

/* Responsive adjustments */
@media (max-width: 640px) {
  h1 {
    font-size: 1.875rem;
  }
  
  p {
    font-size: 1rem;
  }
  
  button {
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
  }
  
  #article {
    padding: 1.5rem;
  }
}