*{
  margin:0;
  padding:0;
  box-sizing:border-box;
  font-family:Inter,Segoe UI,Arial,sans-serif;
}

:root{
  --black:#07070d;
  --black2:#0d0d18;
  --card:#141421;
  --card2:rgba(255,255,255,.07);
  --white:#fff;
  --muted:#b9b9c9;
  --purple:#8b5cf6;
  --purple2:#a855f7;
  --border:rgba(255,255,255,.14);
}

html{
  scroll-behavior:smooth;
}

body{
  min-height:100vh;
  background:
    radial-gradient(circle at top left,rgba(168,85,247,.24),transparent 33%),
    radial-gradient(circle at bottom right,rgba(124,58,237,.18),transparent 32%),
    linear-gradient(135deg,#050509,#10101c 60%,#080812);
  color:var(--white);
  overflow-x:hidden;
}

.bg-blur{
  position:fixed;
  inset:0;
  z-index:-1;
  pointer-events:none;
}

.bg-blur::before,
.bg-blur::after{
  content:"";
  position:absolute;
  width:300px;
  height:300px;
  border-radius:50%;
  filter:blur(55px);
  opacity:.55;
  animation:floatBlob 7s ease-in-out infinite alternate;
}

.bg-blur::before{
  background:#8b5cf6;
  top:18%;
  left:8%;
}

.bg-blur::after{
  background:#a855f7;
  bottom:10%;
  right:8%;
  animation-delay:1.5s;
}

@keyframes floatBlob{
  from{transform:translateY(0) scale(1);}
  to{transform:translateY(-45px) scale(1.12);}
}

.navbar{
  width:min(1200px,92%);
  margin:auto;
  padding:22px 0;
  display:flex;
  justify-content:space-between;
  align-items:center;
  position:relative;
  z-index:10;
}

.logo{
  text-decoration:none;
  font-size:34px;
  font-weight:950;
  letter-spacing:.4px;
  transition:.3s;
}

.tool-text{
  color:white;
}

.era-text{
  color:var(--purple2);
  text-shadow:0 0 18px rgba(168,85,247,.35);
}

.logo:hover{
  transform:scale(1.05);
}

.nav-links{
  display:flex;
  gap:14px;
  align-items:center;
}

.nav-links a{
  color:white;
  text-decoration:none;
  font-weight:700;
  padding:10px 15px;
  border-radius:999px;
  transition:.25s;
}

.nav-links a:hover{
  background:rgba(168,85,247,.16);
  color:#d8c4ff;
}

.hero{
  width:min(1100px,92%);
  margin:40px auto 20px;
  min-height:72vh;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  text-align:center;
  animation:fadeUp .8s ease both;
}

.hero-tag{
  display:inline-block;
  background:rgba(168,85,247,.11);
  color:#d9c4ff;
  border:1px solid rgba(168,85,247,.45);
  padding:10px 18px;
  border-radius:999px;
  margin-bottom:22px;
  font-weight:800;
}

.hero h1{
  font-size:clamp(44px,8vw,86px);
  line-height:1.02;
  font-weight:950;
  letter-spacing:-2px;
}

.gradient-text{
  background:linear-gradient(90deg,#fff,#c084fc,#8b5cf6);
  -webkit-background-clip:text;
  -webkit-text-fill-color:transparent;
}

.hero p{
  max-width:760px;
  margin:24px auto 0;
  font-size:20px;
  color:var(--muted);
  line-height:1.7;
}

.hero-buttons{
  display:flex;
  justify-content:center;
  flex-wrap:wrap;
  gap:16px;
  margin-top:34px;
}

.btn,.btn-outline{
  display:inline-block;
  text-decoration:none;
  padding:15px 28px;
  border-radius:15px;
  font-weight:900;
  transition:.28s;
}

.btn{
  background:linear-gradient(135deg,#7c3aed,#a855f7);
  color:white;
  box-shadow:0 18px 45px rgba(168,85,247,.24);
  border:none;
  cursor:pointer;
}

.btn:hover{
  transform:translateY(-5px);
  box-shadow:0 24px 55px rgba(168,85,247,.42);
}

.btn-outline{
  color:white;
  border:1px solid rgba(255,255,255,.18);
  background:rgba(255,255,255,.04);
}

.btn-outline:hover{
  background:rgba(168,85,247,.18);
  border-color:#a855f7;
  transform:translateY(-5px);
}

.container{
  width:min(1200px,92%);
  margin:auto;
  padding:50px 0 90px;
}

.section-title{
  text-align:center;
  font-size:clamp(32px,5vw,48px);
  margin-bottom:45px;
}

.section-title span{
  color:#a855f7;
}

.tools-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(245px,1fr));
  gap:22px;
}

.tool-card{
  text-decoration:none;
  color:white;
  background:linear-gradient(180deg,rgba(255,255,255,.08),rgba(255,255,255,.035));
  border:1px solid var(--border);
  border-radius:24px;
  padding:26px;
  min-height:185px;
  backdrop-filter:blur(18px);
  transition:.35s ease;
  position:relative;
  overflow:hidden;
  animation:fadeUp .7s ease both;
}

.tool-card::before{
  content:"";
  position:absolute;
  inset:-1px;
  background:linear-gradient(135deg,rgba(168,85,247,.34),transparent 40%,rgba(255,255,255,.08));
  opacity:0;
  transition:.35s;
}

.tool-card:hover::before{
  opacity:1;
}

.tool-card:hover{
  transform:translateY(-12px);
  border-color:rgba(168,85,247,.75);
  box-shadow:0 28px 55px rgba(0,0,0,.35),0 0 35px rgba(168,85,247,.2);
}

.tool-card>*{
  position:relative;
  z-index:1;
}

.icon{
  font-size:44px;
  margin-bottom:18px;
}

.tool-card h3{
  font-size:22px;
  margin-bottom:10px;
}

.tool-card p{
  color:var(--muted);
  line-height:1.55;
}

.tool-page{
  width:min(760px,92%);
  margin:50px auto 100px;
}

.panel{
  background:linear-gradient(180deg,rgba(255,255,255,.09),rgba(255,255,255,.04));
  border:1px solid var(--border);
  backdrop-filter:blur(20px);
  border-radius:30px;
  padding:34px;
  animation:fadeUp .7s ease both;
  box-shadow:0 30px 70px rgba(0,0,0,.28);
}

.panel h1{
  font-size:clamp(30px,5vw,46px);
  margin-bottom:12px;
}

.panel p{
  color:var(--muted);
  margin-bottom:24px;
  line-height:1.6;
}

input,select,button{
  width:100%;
  padding:15px;
  border-radius:15px;
  border:1px solid rgba(255,255,255,.16);
  outline:none;
  font-size:16px;
  margin:9px 0;
}

input,select{
  background:rgba(0,0,0,.28);
  color:white;
}

input::placeholder{
  color:#89899a;
}

button{
  background:linear-gradient(135deg,#7c3aed,#a855f7);
  color:white;
  font-weight:900;
  cursor:pointer;
  transition:.25s;
}

button:hover{
  transform:translateY(-3px);
  box-shadow:0 15px 35px rgba(168,85,247,.32);
}

.result,.download{
  display:block;
  margin-top:16px;
  color:white;
  word-break:break-word;
  font-weight:800;
  line-height:1.5;
}

.download{
  color:#d8b4fe;
}

#qrcode{
  margin-top:20px;
  background:white;
  padding:14px;
  border-radius:16px;
  width:fit-content;
}

canvas,svg{
  max-width:100%;
  margin-top:15px;
}

.footer{
  width:min(1200px,92%);
  margin:auto;
  padding:28px 0;
  text-align:center;
  color:var(--muted);
  border-top:1px solid rgba(255,255,255,.08);
}

@keyframes fadeUp{
  from{opacity:0;transform:translateY(32px);}
  to{opacity:1;transform:translateY(0);}
}

@media(max-width:700px){
  .navbar{
    flex-direction:column;
    gap:14px;
  }

  .nav-links{
    flex-wrap:wrap;
    justify-content:center;
  }

  .hero{
    min-height:62vh;
    margin-top:10px;
  }

  .hero p{
    font-size:17px;
  }

  .panel{
    padding:24px;
  }
}


.help-section{
  width:min(900px,92%);
  margin:0 auto 90px;
  padding:20px 0;
  animation:fadeUp .8s ease both;
}

.help-box{
  background:linear-gradient(180deg,rgba(255,255,255,.09),rgba(255,255,255,.04));
  border:1px solid rgba(168,85,247,.35);
  border-radius:28px;
  padding:34px;
  text-align:center;
  box-shadow:0 25px 60px rgba(0,0,0,.28),0 0 35px rgba(168,85,247,.12);
}

.help-box h2{
  font-size:clamp(28px,5vw,42px);
  margin-bottom:14px;
}

.help-box p{
  color:var(--muted);
  max-width:650px;
  margin:0 auto 24px;
  font-size:18px;
  line-height:1.7;
}


/* Navbar + Tools upgrade */
.upgraded-nav{
  background:rgba(255,255,255,.045);
  border:1px solid rgba(255,255,255,.11);
  border-radius:24px;
  padding:16px 20px;
  margin-top:18px;
  backdrop-filter:blur(18px);
  box-shadow:0 20px 55px rgba(0,0,0,.24);
}

.nav-cta{
  background:linear-gradient(135deg,#7c3aed,#a855f7) !important;
  color:white !important;
  box-shadow:0 10px 28px rgba(168,85,247,.28);
}

.nav-cta:hover{
  transform:translateY(-3px);
  box-shadow:0 18px 38px rgba(168,85,247,.42);
}

.tools-page-head{
  text-align:center;
  padding-top:70px;
}

.tools-subtitle{
  color:var(--muted);
  font-size:19px;
  margin:-25px auto 45px;
  max-width:640px;
  line-height:1.7;
}

.upgraded-grid{
  grid-template-columns:repeat(auto-fit,minmax(260px,1fr));
}

.premium-card{
  min-height:230px;
  display:flex;
  flex-direction:column;
  justify-content:space-between;
  padding:28px;
}

.card-top{
  display:flex;
  align-items:center;
  justify-content:space-between;
  margin-bottom:22px;
}

.premium-card .icon{
  width:62px;
  height:62px;
  border-radius:20px;
  display:grid;
  place-items:center;
  font-size:34px;
  margin:0;
  background:rgba(168,85,247,.13);
  border:1px solid rgba(168,85,247,.28);
  transition:.35s ease;
}

.open-pill{
  opacity:0;
  transform:translateX(10px);
  font-size:13px;
  font-weight:900;
  color:#e9d5ff;
  background:rgba(168,85,247,.14);
  border:1px solid rgba(168,85,247,.25);
  padding:8px 10px;
  border-radius:999px;
  transition:.35s ease;
}

.premium-card:hover .open-pill{
  opacity:1;
  transform:translateX(0);
}

.premium-card:hover .icon{
  transform:scale(1.1) rotate(-4deg);
  box-shadow:0 0 28px rgba(168,85,247,.32);
}

.premium-card h3{
  font-size:24px;
  letter-spacing:-.4px;
}

.premium-card p{
  font-size:15.5px;
}

@media(max-width:700px){
  .upgraded-nav{
    width:min(94%,1200px);
  }

  .nav-cta{
    width:100%;
    text-align:center;
  }

  .premium-card{
    min-height:205px;
  }

  .open-pill{
    opacity:1;
    transform:none;
  }
}


/* Phone style calculator */
.calculator-panel{
  max-width:460px;
  margin-left:auto;
  margin-right:auto;
}

.phone-calculator{
  background:linear-gradient(180deg,#0b0b12,#050509);
  border:1px solid rgba(168,85,247,.35);
  border-radius:34px;
  padding:22px;
  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,.05),
    0 30px 80px rgba(0,0,0,.45),
    0 0 45px rgba(168,85,247,.18);
}

.calc-screen{
  min-height:145px;
  display:flex;
  flex-direction:column;
  justify-content:flex-end;
  align-items:flex-end;
  padding:18px 8px 24px;
}

#calcHistory{
  color:#9b8bb8;
  font-size:18px;
  min-height:26px;
  margin-bottom:8px;
  word-break:break-all;
  text-align:right;
}

#calcDisplay{
  width:100%;
  background:transparent;
  border:none;
  color:white;
  font-size:58px;
  font-weight:800;
  text-align:right;
  padding:0;
  margin:0;
  box-shadow:none;
}

.calc-buttons{
  display:grid;
  grid-template-columns:repeat(4,1fr);
  gap:12px;
}

.calc-btn{
  aspect-ratio:1/1;
  border-radius:22px;
  border:1px solid rgba(255,255,255,.08);
  background:#171722;
  color:white;
  font-size:25px;
  font-weight:800;
  margin:0;
  padding:0;
  box-shadow:0 10px 24px rgba(0,0,0,.25);
  transition:.18s ease;
}

.calc-btn:hover{
  transform:translateY(-3px) scale(1.02);
  box-shadow:0 16px 32px rgba(168,85,247,.22);
}

.calc-btn:active{
  transform:scale(.94);
}

.calc-btn.function{
  background:#252337;
  color:#d8b4fe;
}

.calc-btn.operator{
  background:linear-gradient(135deg,#6d28d9,#a855f7);
  color:white;
  box-shadow:0 12px 26px rgba(168,85,247,.28);
}

.calc-btn.equal{
  background:linear-gradient(135deg,#8b5cf6,#c084fc);
  color:white;
  box-shadow:0 14px 32px rgba(168,85,247,.42);
}

.calc-btn.zero{
  grid-column:span 2;
  aspect-ratio:auto;
  border-radius:22px;
  text-align:left;
  padding-left:28px;
}

@media(max-width:520px){
  .calculator-panel{
    max-width:100%;
  }

  .phone-calculator{
    padding:18px;
    border-radius:30px;
  }

  #calcDisplay{
    font-size:48px;
  }

  .calc-btn{
    font-size:22px;
    border-radius:18px;
  }
}
