@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;600;700&display=swap');

body {
  font-family: 'Montserrat', sans-serif;
  background: linear-gradient(135deg, #0f0c29, #302b63, #24243e);
  margin: 0;
  padding: 0;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  min-height: 100vh;
  color: #fff;
  overflow-x: hidden;
}

.container {
  background: rgba(20, 20, 30, 0.95);
  margin-top: 50px;
  padding: 30px;
  border-radius: 20px;
  width: 400px;
  box-shadow: 0 8px 30px rgba(0,0,0,0.5);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  animation: fadeInUp 0.8s ease forwards;
}

h1, h2 {
  text-align: center;
  color: #fff;
  margin-bottom: 20px;
}

.input-group {
  margin-bottom: 20px;
  position: relative;
  transition: 0.3s;
}

label {
  display: block;
  margin-bottom: 6px;
  font-weight: 600;
  color: #ff79c6;
  letter-spacing: 0.5px;
  transition: 0.3s;
}

input, select {
  width: 100%;
  padding: 10px;
  border-radius: 12px;
  border: 1px solid #444;
  background: rgba(30, 30, 40, 0.8);
  color: #fff;
  outline: none;
  transition: all 0.3s;
}

input:focus, select:focus {
  border: 1px solid #ff6ec7;
  box-shadow: 0 0 5px #ff6ec7;
  transform: scale(1.02);
}

#subjectsContainer > div {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
  animation: slideInLeft 0.6s ease forwards;
}

input[type="number"] {
  -moz-appearance: textfield;
}
input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.btn-group {
  display: flex;
  justify-content: space-between;
  margin: 20px 0;
  gap: 10px;
}

button {
  padding: 12px 18px;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  font-weight: 600;
  letter-spacing: 0.5px;
  transition: all 0.3s ease;
  background: linear-gradient(45deg, #ff6ec7, #7873f5);
  color: #fff;
  box-shadow: 0 4px 15px rgba(0,0,0,0.3);
  position: relative;
  overflow: hidden;
}

button::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: rgba(255,255,255,0.05);
  transform: rotate(45deg);
  transition: all 0.5s;
}

button:hover::before {
  top: -10%;
  left: -10%;
}

button:hover {
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 8px 20px rgba(0,0,0,0.5);
}

.calculate-btn {
  width: 100%;
  background: linear-gradient(45deg, #27ae60, #2ecc71);
}

.calculate-btn:hover {
  background: linear-gradient(45deg, #1e8449, #28b463);
  transform: scale(1.05) rotate(-1deg);
  box-shadow: 0 8px 20px rgba(0,0,0,0.5);
}

.result {
  margin-top: 25px;
  font-size: 20px;
  text-align: center;
  color: #ff79c6;
  font-weight: 700;
}

@keyframes fadeInUp {
  0% { opacity: 0; transform: translateY(30px); }
  100% { opacity: 1; transform: translateY(0); }
}

@keyframes slideInLeft {
  0% { opacity: 0; transform: translateX(-30px); }
  100% { opacity: 1; transform: translateX(0); }
}

input:hover, select:hover {
  border-color: #ff6ec7;
  box-shadow: 0 0 5px #ff6ec7;
}

.container:hover {
  transform: translateY(-5px);
  transition: transform 0.4s ease;
}
