@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@100;200;300;400;500;600;700&display=swap");

:root {
  --primary: #2f2f2f;
  --secondary: #007acc;
  --secondary-light: #00b4d8;
  --input-bg: rgba(255, 255, 255, 0.1);
  --border-radius: 1.2rem;
  --shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
  --transition: all 0.3s ease;
}

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

html {
  font-size: 62.5%;
  font-family: "Poppins", sans-serif;
  scroll-behavior: smooth;
}

body {
  font-size: 1.6rem;
  background-color: #1a1a1a;
  color: white;
}

/* ✅ Full-screen background */
.background {
  background-image: url("background.png");
  min-height: 100vh;
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center;
  position: relative;
  isolation: isolate;
}

.background::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.4); /* overlay */
  z-index: -1;
}

/* ✅ Centered & responsive container */
.container {
  width: 100%;
  max-width: 1000px;
  margin: 0 auto;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  gap: 4rem;
}

/* ✅ Responsive box */
.box {
  width: 100%;
  background-color: var(--primary);
  border: 0.4rem solid var(--secondary);
  box-shadow: var(--shadow);
  border-radius: var(--border-radius);
  padding: 3rem;
  height: auto;
}

/* ✅ Text */
.content {
  text-align: center;
  color: white;
}
.content h2 {
  font-size: clamp(2.8rem, 5vw, 5rem);
  font-weight: 500;
  margin-bottom: 1rem;
}
.content h1 {
  font-size: clamp(3.6rem, 7vw, 7rem);
  font-weight: 700;
  color: var(--secondary-light);
}

/* ✅ Form grid */
.calculate-form {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 3rem 5rem;
  padding: 3rem;
  place-content: center;
  place-items: center;
}

/* ✅ Input fields */
input {
  height: 4.4rem;
  padding: 0 2rem;
  border-radius: 0.8rem;
  background-color: var(--input-bg);
  border: 1px solid white;
  color: white;
  font-size: 1.6rem;
  width: 100%;
  max-width: 30rem;
  transition: var(--transition);
  backdrop-filter: blur(4px);
}
input::placeholder {
  color: #ccc;
}
input:focus {
  outline: none;
  border: 2px solid var(--secondary);
  background-color: rgba(255, 255, 255, 0.15);
}

/* ✅ Button */
.calculate-form button {
  grid-column: 1 / 3;
}

.primary-btn {
  font-size: 2rem;
  width: 18rem;
  padding: 1.2rem 2rem;
  border-radius: 0.8rem;
  background: linear-gradient(135deg, var(--secondary), var(--secondary-light));
  color: white;
  border: none;
  cursor: pointer;
  transition: var(--transition);
}
.primary-btn:hover {
  opacity: 0.95;
  transform: scale(1.02);
}
.primary-btn:active {
  transform: scale(0.98);
}

/* ✅ Result text */
.result {
  color: #ffffff;
  text-align: center;
  font-size: 2rem;
  padding: 1rem;
}

/* ✅ Responsive Design */
@media (max-width: 1024px) {
  .calculate-form {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .calculate-form button {
    grid-column: 1 / 2;
  }

  .primary-btn {
    width: 100%;
  }
}

@media (max-width: 768px) {
  .container {
    padding: 1.5rem;
  }

  .box {
    padding: 2rem;
  }

  .result {
    font-size: 1.6rem;
  }
}
