:root {
  --bg: #ffffff;
  --text: #333;
  --card-bg: #f9f9f9;
  --accent: #2e86c1;
  --success-bg: #d4edda;
  --fail-bg: #f8d7da;
  --success-text: #155724;
  --fail-text: #721c24;
}

body.dark {
  --bg: #1c1c1c;
  --text: #e0e0e0;
  --card-bg: #2b2b2b;
  --accent: #5dade2;
  --success-bg: #2e7d32;
  --fail-bg: #c62828;
  --success-text: #e8f5e9;
  --fail-text: #ffebee;
}

* {
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', sans-serif;
  background-color: var(--bg);
  color: var(--text);
  margin: 0;
  padding: 20px;
  transition: background 0.3s, color 0.3s;
}

.container {
  max-width: 500px;
  margin: auto;
  background-color: var(--card-bg);
  border-radius: 15px;
  padding: 25px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

h2 {
  text-align: center;
  margin-bottom: 20px;
  color: var(--accent);
}

.materia-card {
  background-color: var(--bg);
  padding: 15px;
  margin-bottom: 10px;
  border-left: 5px solid var(--accent);
  border-radius: 8px;
}

input[type="text"], input[type="number"] {
  width: 45%;
  padding: 10px;
  margin-right: 5%;
  margin-bottom: 10px;
  border: 1px solid #ccc;
  border-radius: 8px;
  background-color: white;
}

input#nombreEstudiante {
  width: 100%;
  padding: 10px;
  margin-bottom: 15px;
  border: 1px solid #ccc;
  border-radius: 8px;
}

body.dark input {
  background-color: #444;
  color: white;
  border: 1px solid #666;
}

button {
  padding: 10px 15px;
  margin: 10px 5px 0 0;
  border: none;
  border-radius: 8px;
  background-color: var(--accent);
  color: white;
  cursor: pointer;
  font-weight: bold;
  transition: background-color 0.2s;
}

button:hover {
  filter: brightness(0.9);
}

#resultado {
  margin-top: 20px;
  font-size: 18px;
  text-align: center;
  padding: 10px;
  border-radius: 8px;
  font-weight: bold;
}

footer.creditos {
  text-align: center;
  font-size: 14px;
  margin-top: 30px;
  color: var(--text);
  opacity: 0.6;
}

@media (max-width: 600px) {
  input[type="text"], input[type="number"] {
    width: 100%;
    margin-right: 0;
  }
}
