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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: #f0f4f0;
  color: #333;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.container {
  max-width: 720px;
  margin: 0 auto;
  padding: 20px;
  flex: 1;
}

header {
  text-align: center;
  margin-bottom: 30px;
}

.logo {
  width: 60px;
  height: 60px;
  margin-bottom: 10px;
}

h1 {
  font-size: 28px;
  color: #006a4d;
  font-weight: 700;
}

.subtitle {
  color: #666;
  font-size: 14px;
  margin-top: 4px;
}

section {
  background: #fff;
  border-radius: 10px;
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

h3 {
  font-size: 16px;
  color: #006a4d;
  margin-bottom: 15px;
  font-weight: 600;
}

.prev-inputs {
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
}

.input-group {
  flex: 1;
  min-width: 150px;
}

.input-group label {
  display: block;
  font-size: 13px;
  color: #555;
  margin-bottom: 5px;
  font-weight: 500;
}

input, select {
  width: 100%;
  padding: 10px 12px;
  border: 1.5px solid #ddd;
  border-radius: 6px;
  font-size: 14px;
  transition: border-color 0.2s;
  background: #fafafa;
}

input:focus, select:focus {
  outline: none;
  border-color: #006a4d;
  background: #fff;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
}

.section-header h3 {
  margin-bottom: 0;
}

.table-wrapper {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
}

thead th {
  background: #006a4d;
  color: #fff;
  padding: 10px 12px;
  font-size: 13px;
  text-align: left;
  font-weight: 600;
}

thead th:first-child {
  border-radius: 6px 0 0 0;
}

thead th:last-child {
  border-radius: 0 6px 0 0;
}

tbody tr {
  border-bottom: 1px solid #eee;
  transition: background 0.15s;
}

tbody tr:hover {
  background: #f5faf5;
}

tbody td {
  padding: 8px 6px;
}

tbody td:first-child {
  padding-left: 0;
}

tbody input, tbody select {
  font-size: 13px;
  padding: 8px 10px;
}

.btn {
  padding: 8px 16px;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.2s;
}

.btn-primary {
  background: #006a4d;
  color: #fff;
  width: 100%;
  padding: 14px;
  font-size: 16px;
  font-weight: 600;
  border-radius: 8px;
  margin-bottom: 20px;
}

.btn-primary:hover {
  background: #00543d;
}

.btn-outline {
  background: transparent;
  color: #006a4d;
  border: 2px solid #006a4d;
  width: 100%;
  padding: 10px;
  margin-top: 10px;
}

.btn-outline:hover {
  background: #006a4d;
  color: #fff;
}

.btn-secondary {
  background: #e8e8e8;
  color: #555;
  font-size: 13px;
  padding: 6px 12px;
}

.btn-secondary:hover {
  background: #d0d0d0;
}

.btn-remove {
  background: none;
  border: none;
  color: #cc0000;
  font-size: 20px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
  line-height: 1;
  opacity: 0.6;
  transition: opacity 0.2s;
}

.btn-remove:hover {
  opacity: 1;
}

.results-section {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.result-card {
  flex: 1;
  min-width: 180px;
  padding: 25px 20px;
  border-radius: 10px;
  text-align: center;
}

.credits-card {
  background: #e8f5e9;
  border: 2px solid #a5d6a7;
}

.cgpa-card {
  background: #e3f2fd;
  border: 2px solid #90caf9;
}

.result-label {
  display: block;
  font-size: 14px;
  color: #555;
  margin-bottom: 8px;
  font-weight: 500;
}

.result-value {
  display: block;
  font-size: 36px;
  font-weight: 700;
  color: #006a4d;
}

.cgpa-card .result-value {
  color: #1565c0;
}

footer {
  text-align: center;
  padding: 20px;
  color: #999;
  font-size: 13px;
}

@media (max-width: 600px) {
  .container {
    padding: 12px;
  }

  h1 {
    font-size: 22px;
  }

  section {
    padding: 15px;
  }

  .prev-inputs {
    flex-direction: column;
  }

  .input-group {
    min-width: 100%;
  }

  .results-section {
    flex-direction: column;
  }

  .result-card {
    min-width: 100%;
  }
}
