:root {
  --bg: #003b46;
  --text: #eae2b7;
  --card: #1e1e1e;
  --highlight: #f77f00;
  --input-bg: #1e1e1e;
  --input-text: #ffffff;
  --input-border: #444;
}

body.light {
  --bg: #ffe8d6;
  --text: #003049;
  --card: #ffe8d6;
  --highlight: #d62828;
  --input-bg: #ffffff;
  --input-text: #000000;
  --input-border: #ccc;
}

body {
  font-family: "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
  margin: 0;
  padding: 20px;
  transition: background 0.3s ease, color 0.3s ease;
}

header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 1.5em;
}

h1 {
  font-size: 1.8rem;
  margin: 0;
}

#toggleTheme {
  font-size: 1.2rem;
  background: var(--card);
  color: var(--text);
  border: 2px solid var(--highlight);
  border-radius: 8px;
  padding: 6px 12px;
  cursor: pointer;
  transition: all 0.3s ease;
}

#toggleTheme:hover {
  background: var(--highlight);
  color: var(--bg);
}

.converter {
  max-width: 600px;
  margin: 40px auto;
  background: var(--card);
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 0 10px #00000055;
}

.input-group {
  display: flex;
  flex-direction: column;
  margin-bottom: 1em;
  width: 100%;
}

label {
  margin-bottom: 6px;
  font-weight: bold;
}

select,
input[type="datetime-local"] {
  width: 100%;
  box-sizing: border-box;
  padding: 10px;
  min-height: 44px;
  font-family: inherit;
  font-size: 1rem;
  border-radius: 6px;
  border: 1px solid var(--input-border);
  background: var(--input-bg);
  color: var(--input-text);
  outline: none;
  transition: background 0.3s ease, color 0.3s ease;
}

/* Fix dropdown option colors in dark mode */
select option {
  background: var(--input-bg);
  color: var(--input-text);
}

select:focus,
input[type="datetime-local"]:focus,
button:focus {
  outline: 2px solid var(--highlight);
  outline-offset: 2px;
}

button#convertBtn {
  margin-top: 10px;
  width: 100%;
  padding: 10px;
  font-size: 1rem;
  background: var(--highlight);
  color: #000;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.3s ease;
}

button#convertBtn:hover {
  background: #ffa500; /* lighter than original highlight */
}

.result-box {
  margin-top: 1.5em;
  font-size: 1.2rem;
  font-weight: bold;
}

footer {
  margin-top: 40px;
  text-align: center;
  opacity: 0.7;
}

footer a {
  color: var(--text);
  text-decoration: underline;
}

/* Responsive Styles */
@media (max-width: 480px) {
  body {
    padding: 10px;
  }

  .converter {
    margin: 30px auto;
    padding: 16px;
  }

  h1 {
    font-size: 1.4rem;
    text-align: center;
  }

  header {
    flex-direction: column;
    align-items: center;
    gap: 10px;
  }

  #toggleTheme {
    padding: 6px 10px;
  }

  .result-box {
    font-size: 1rem;
    text-align: center;
  }
}
