*{
  margin:0;
  padding:0;
  box-sizing:border-box;
}

body{
  font-family:'Inter',sans-serif;
  background:#0f172a;
  min-height:100vh;
  display:flex;
  justify-content:center;
  align-items:center;
  padding:20px;
  overflow-x:hidden;
  position:relative;
  color:white;
}

/* Background Glow */

.bg-glow{
  position:fixed;
  width:500px;
  height:500px;
  background:radial-gradient(circle,#2563eb55,transparent 70%);
  top:-120px;
  right:-120px;
  z-index:0;
  pointer-events:none;
}

.container{
  width:100%;
  max-width:760px;
  position:relative;
  z-index:2;
}

.calculator-card{
  background:rgba(15,23,42,0.85);
  backdrop-filter:blur(18px);
  border:1px solid rgba(255,255,255,0.08);
  border-radius:28px;
  padding:35px;
  box-shadow:
  0 10px 40px rgba(0,0,0,0.45),
  inset 0 1px 0 rgba(255,255,255,0.04);
}

h1{
  font-size:38px;
  margin-bottom:10px;
  font-weight:700;
  background:linear-gradient(to right,#60a5fa,#22d3ee);
  -webkit-background-clip:text;
  -webkit-text-fill-color:transparent;
}

.subtitle{
  color:#cbd5e1;
  margin-bottom:30px;
  line-height:1.7;
}

.input-group{
  margin-bottom:24px;
}

.input-group label{
  display:block;
  margin-bottom:12px;
  font-weight:600;
  color:#f1f5f9;
}

.date-row{
  display:grid;
  grid-template-columns:1fr 1fr 1fr;
  gap:15px;
}

select,
input{
  width:100%;
  padding:15px;
  border-radius:16px;
  border:1px solid rgba(255,255,255,0.08);
  background:#111827;
  color:white;
  font-size:15px;
  outline:none;
  transition:0.35s ease;
}

select:focus,
input:focus{
  border-color:#3b82f6;
  box-shadow:0 0 0 4px rgba(59,130,246,0.2);
  transform:translateY(-2px);
}

select:hover,
input:hover{
  border-color:#60a5fa;
}

/* Buttons */

.buttons{
  display:flex;
  gap:15px;
  margin-top:10px;
  margin-bottom:28px;
  flex-wrap:wrap;
}

#calculateBtn{
  flex:1;
  background:linear-gradient(135deg,#2563eb,#06b6d4);
  border:none;
  color:white;
  padding:15px 24px;
  border-radius:16px;
  font-size:16px;
  font-weight:600;
  cursor:pointer;
  transition:0.35s ease;
  box-shadow:0 10px 25px rgba(37,99,235,0.35);
}

#calculateBtn:hover{
  transform:translateY(-3px) scale(1.02);
  box-shadow:0 14px 35px rgba(37,99,235,0.45);
}

#calculateBtn:active{
  transform:scale(0.97);
}

.clear-btn{
  background:#1e293b;
  border:1px solid rgba(255,255,255,0.08);
  color:white;
  padding:15px 24px;
  border-radius:16px;
  cursor:pointer;
  transition:0.3s;
}

.clear-btn:hover{
  background:#334155;
  transform:translateY(-2px);
}

/* Error */

#errorBox{
  display:none;
  background:#7f1d1d;
  border:1px solid #ef4444;
  color:#fecaca;
  padding:15px;
  border-radius:16px;
  margin-bottom:20px;
}

/* Results */

.results{
  display:none;
  animation:fadeIn 0.5s ease;
}

/* Main Result */

.primary-result{
  background:linear-gradient(135deg,#172554,#0f766e);
  border-radius:22px;
  padding:24px;
  margin-bottom:25px;
  border:1px solid rgba(255,255,255,0.08);
  box-shadow:0 10px 30px rgba(0,0,0,0.25);
}

.primary-result h2{
  font-size:28px;
  line-height:1.5;
  color:white;
}

/* Breakdown */

.breakdown{
  display:grid;
  grid-template-columns:repeat(2,1fr);
  gap:16px;
  margin-bottom:25px;
}

.break-item{
  background:#111827;
  border:1px solid rgba(255,255,255,0.06);
  border-radius:18px;
  padding:20px;
  transition:0.3s ease;
}

.break-item:hover{
  transform:translateY(-4px);
  border-color:#3b82f6;
}

.break-item span{
  display:block;
  color:#94a3b8;
  margin-bottom:10px;
  font-size:14px;
}

.break-item strong{
  font-size:24px;
  color:white;
}

/* Birthday Box */

.birthday-box{
  background:linear-gradient(135deg,#1e1b4b,#312e81);
  border-radius:22px;
  padding:22px;
  border:1px solid rgba(255,255,255,0.08);
}

.birthday-box h3{
  margin-bottom:12px;
  font-size:22px;
}

.birthday-box p{
  color:#cbd5e1;
  line-height:1.7;
}

/* Animation */

@keyframes fadeIn{
  from{
    opacity:0;
    transform:translateY(15px);
  }

  to{
    opacity:1;
    transform:translateY(0);
  }
}

/* Tablet */

@media(max-width:768px){

  .calculator-card{
    padding:28px;
  }

  h1{
    font-size:32px;
  }

}

/* Mobile */

@media(max-width:600px){

  body{
    padding:14px;
    align-items:flex-start;
  }

  .calculator-card{
    padding:22px;
    border-radius:24px;
  }

  .date-row{
    grid-template-columns:1fr;
  }

  .buttons{
    flex-direction:column;
  }

  .breakdown{
    grid-template-columns:1fr;
  }

  h1{
    font-size:28px;
  }

  .primary-result h2{
    font-size:22px;
  }

}

/* Small Mobile */

@media(max-width:380px){

  .calculator-card{
    padding:18px;
  }

  h1{
    font-size:24px;
  }

  select,
  input{
    padding:13px;
  }

  #calculateBtn,
  .clear-btn{
    padding:13px;
    font-size:14px;
  }

}