:root {
  --bg: #f4f6fb;
  --card: #ffffff;
  --text: #111827;
  --muted: #6b7280;

  --primary: #6d28d9;
  --primary-soft: rgba(109, 40, 217, 0.12);

  --success: #22c55e;
  --danger: #ef4444;

  --shadow: 0 10px 25px rgba(0,0,0,0.06);
  --radius: 16px;
}

body{
  margin:0;
  font-family:"Segoe UI", Arial, sans-serif;

  background:
    radial-gradient(
      circle at top right,
      rgba(139,92,246,.18),
      transparent 30%
    ),
    radial-gradient(
      circle at bottom left,
      rgba(167,139,250,.12),
      transparent 30%
    ),
    #f6f7fb;

  color:var(--text);
}



/* ================= APP ================= */
.app {
  max-width: 900px;
  margin: 20px auto;
  padding: 0 16px;
}

/* ================= CARD SYSTEM ================= */
.card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 14px;
}

/* ================= SEARCH ================= */
.search-card {
  margin-top: 10px;
  margin-bottom: 12px;
}
.search-card h2 {
  margin: 0;
  font-size: 16px;
}

.search-card p {
  margin: 4px 0 12px;
  font-size: 13px;
  color: var(--muted);
}

.hint {
  font-size: 12px;
  color: var(--muted);
  margin-top: 8px;
}

/* ================= LOADING ================= */
.loading {
  text-align: center;
  margin: 20px 0;
  color: var(--primary);
  font-weight: 600;
}

.hidden {
  display: none;
}

/* ================= DASHBOARD ================= */
.dashboard{
  display:flex;
  flex-direction:column;
  gap:28px;
  margin-top:8px;
  animation:fadeUp .35s ease;
}

/* ================= BADGE ================= */
.badge{

  padding:8px 14px;

  border-radius:999px;

  font-size:11px;

  letter-spacing:.5px;

  font-weight:800;

color: #ffffff;
}

.badge-purple {
  background: #7c3aed;
}

.badge-blue {
  background: #2563eb;
}


/* ================= ERROR ================= */
.error-card {
  border: 1px solid rgba(239,68,68,0.2);
}

.error-title {
  font-weight: 800;
  color: var(--danger);
}

.error-msg {
  margin-top: 4px;
  font-size: 13px;
  color: var(--muted);
}

/* ================= NEW RESULT UI ================= */

.result{
  margin-top: 32px;
}

.mid-label{
  font-size:11px;
  color:#9ca3af;
  text-transform:uppercase;
}

.mid-value{
  font-size:24px;
  font-weight:900;
}

.product-name{
  margin-top:16px;
  margin-bottom:22px;
  color:#111827;
  font-size:22px;
  font-weight:800;
  line-height:1.5;
}

.hero-info strong{
  display:block;
  margin-top:6px;
  font-size:16px;
}

.section-header{
  margin-bottom:24px;
}

.minmax-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:14px;
}

.min-card{
  background:
    linear-gradient(
      135deg,
      rgba(34,197,94,.08),
      rgba(34,197,94,.02)
    );
  border:1px solid rgba(34,197,94,.15);
}

.max-card{
  background:
    linear-gradient(
      135deg,
      rgba(239,68,68,.08),
      rgba(239,68,68,.02)
    );
  border:1px solid rgba(239,68,68,.15);
}


/* ================= NEW UI ================= */

.hero-card{

  background:
    linear-gradient(
      135deg,
      rgba(255,255,255,.35),
      rgba(255,255,255,.25)
    );

  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);

  border:1px solid rgba(255,255,255,.35);

  border-radius:28px;

  padding:26px;

  box-shadow:
    0 20px 40px rgba(15,23,42,.06);
}

.hero-header{
  display:flex;
  justify-content:space-between;
  align-items:center;
}

.hero-info{
  margin-top:18px;
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:12px;
}

.hero-info-item{

  background: rgba(255,255,255,.50);

  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);

  border: 1px solid rgba(255,255,255,.40);

  border-radius:16px;

  padding:14px;

  box-shadow:
    0 8px 20px rgba(0,0,0,.03);
}

.hero-info-item span{
  display:block;
  font-size:12px;
  color:#6b7280;
}

.hero-info-item strong{
  display:block;
  margin-top:5px;
}

.section-card{

  position:relative;
  overflow:hidden;

  background: rgba(255,255,255,.35);

  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);

  border: 1px solid rgba(255,255,255,.35);

  border-radius:28px;

  padding:28px;

  box-shadow:
    0 20px 40px rgba(0,0,0,.06);
}

.section-card::before{
  content:"";

  position:absolute;

  width:240px;
  height:240px;

  border-radius:50%;

  background:
    radial-gradient(
      circle,
      rgba(167,139,250,.20),
      transparent 70%
    );

  top:-140px;
  right:-100px;
}

.section-card::after{
  content:"";

  position:absolute;

  width:160px;
  height:160px;

  border-radius:50%;

  background:
    radial-gradient(
      circle,
      rgba(196,181,253,.14),
      transparent 70%
    );

  left:-60px;
  bottom:-60px;
}

.section-card > *{
  position:relative;
  z-index:2;
}



.section-top{
  display:flex;
  justify-content:space-between;
  align-items:center;
}

.section-title-new{
  font-size:18px;
  font-weight:800;
  color:#111827;
}

.sub-title{
  margin-bottom:18px;

  font-size:15px;
  font-weight:700;
  color:#4b5563;
}

.box-title{
  margin-top:38px;
}

.value-card{

  background:
    linear-gradient(
      180deg,
      rgba(255,255,255,.95),
      rgba(248,250,252,.9)
    );

  border:
    1px solid
    rgba(255,255,255,.9);

  backdrop-filter:blur(12px);

  border-radius:22px;

  padding:22px;

  box-shadow:
    0 8px 24px rgba(0,0,0,.04);
justify-content:center;
  align-items:center;

  text-align:center;
}

.section-card::before{

  content:"";

  display:block;

  width:42px;
  height:4px;

  border-radius:999px;

  background:
    linear-gradient(
      90deg,
      #6d28d9,
      #a78bfa
    );

  margin-bottom:18px;
}

.value-card span{
  font-size:12px;
  color:#6b7280;
}

.value-card:hover{

  transform:translateY(-2px);

  box-shadow:
    0 16px 30px rgba(0,0,0,.05);
}

.value-card h2{

  margin-top:10px;

  font-size:34px;
  font-weight:900;

  color:#111827;
}

.min-card,
.max-card,
.active-card-lite{

  position:relative;
  overflow:hidden;

  background: rgba(255,255,255,.35);

  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);

  border: 1px solid rgba(255,255,255,.35);

  box-shadow:
    0 10px 25px rgba(0,0,0,.04);
}

.min-card::before,
.max-card::before,
.active-card-lite::before{

  content:"";

  position:absolute;

  width:80px;
  height:80px;

  border-radius:50%;

  background:
    radial-gradient(
      circle,
      rgba(167,139,250,.10),
      transparent 70%
    );

  top:-30px;
  right:-30px;
}


@keyframes fadeUp{
  from{
    opacity:0;
    transform:translateY(12px);
  }
  to{
    opacity:1;
    transform:translateY(0);
  }
}

@media(max-width:600px){

  .hero-info{
    grid-template-columns:1fr;
  }

  .minmax-grid{
    grid-template-columns:1fr 1fr;
  }

  .value-card h2{
    font-size:24px;
  }

}

.hero-header-app{

  background:
    linear-gradient(
      135deg,
      #6d28d9,
      #8b5cf6
    );

  padding:
    40px 24px
    90px;

  color:white;

  border-radius:
    0 0 32px 32px;

  box-shadow:
    0 20px 40px
    rgba(109,40,217,.25);

position:relative;
overflow:hidden;
}

.hero-header-app::before{
  content:"";

  position:absolute;

  width:320px;
  height:320px;

  border-radius:50%;

  background:
    radial-gradient(
      circle,
      rgba(255,255,255,.12),
      transparent 70%
    );

  top:-180px;
  right:-120px;
}

.hero-header-app::after{
  content:"";

  position:absolute;

  width:180px;
  height:180px;

  border-radius:50%;

  background:
    radial-gradient(
      circle,
      rgba(255,255,255,.08),
      transparent 70%
    );

  bottom:-70px;
  left:-40px;
}

.hero-content{
  max-width:900px;
  margin:auto;
}

.hero-header-app h1{

  margin:0;

  font-size:28px;
  font-weight:800;
}

.hero-header-app p{

  margin-top:10px;

  max-width:320px;

  opacity:.9;

  line-height:1.6;
}

.search-card{

  margin-top:-55px;

  background: rgba(255,255,255,.25);

  backdrop-filter: blur(32px);
  -webkit-backdrop-filter: blur(32px);

  border: 1px solid rgba(255,255,255,.30);

  border-radius:28px;

  padding:24px;

  box-shadow:
    0 8px 32px rgba(31,38,135,.12);
}

.input-wrapper{

  display:flex;
  align-items:center;

  background:#f8fafc;

  border-radius:18px;

  padding:0 16px;

  height:58px;

  border:1px solid #e5e7eb;
}

.search-icon{
  margin-right:12px;
  font-size:18px;
}

.input-wrapper input{

  flex:1;

  border:none;
  background:none;

  outline:none;

  font-size:16px;
}

.search-wrapper button{

  width:100%;

  margin-top:14px;

  height:56px;

  border:none;

  border-radius:18px;

  background:
    linear-gradient(
      135deg,
      #6d28d9,
      #8b5cf6
    );

  color:white;

  font-weight:700;

  font-size:15px;

  cursor:pointer;

  transition:.25s;
}

.search-wrapper button:hover{
  transform:translateY(-2px);
}

.hero-brand{
  display:flex;
  align-items:center;
  gap:16px;
}

.hero-icon{
width:64px;
  height:64px;
  border-radius:20px;

  display:flex;
  align-items:center;
  justify-content:center;

  font-weight:900;
  font-size:18px;

  background:rgba(255,255,255,.18);

  backdrop-filter:blur(12px);
}

.hero-logo{
  width:42px;
  height:42px;
  object-fit:contain;
  border-radius:12px;
}

.hero-brand h1{
  margin:0;
  font-size:26px;
  font-weight:800;
}

.hero-brand p{
  margin:4px 0 0;
  opacity:.9;
}


.bg-decoration{
  position:fixed;

  inset:0;

  pointer-events:none;

  z-index:-1;

  overflow:hidden;
}

.bubble-1{

  position:absolute;

  width:650px;
  height:650px;

  top:-220px;
  right:-180px;

  border-radius:50%;

  background:
    radial-gradient(
      circle,
      rgba(139,92,246,.35) 0%,
      rgba(139,92,246,.18) 45%,
      transparent 75%
    );

  filter:blur(35px);
}

.bubble-2{

  position:absolute;

  width:500px;
  height:500px;

  top:35%;

  left:-220px;

  border-radius:50%;

  background:
    radial-gradient(
      circle,
      rgba(167,139,250,.28) 0%,
      rgba(167,139,250,.15) 50%,
      transparent 75%
    );

  filter:blur(30px);
}

.bubble-3{

  position:absolute;

  width:450px;
  height:450px;

  bottom:-180px;

  right:10%;

  border-radius:50%;

  background:
    radial-gradient(
      circle,
      rgba(196,181,253,.25) 0%,
      rgba(196,181,253,.12) 50%,
      transparent 75%
    );

  filter:blur(25px);
}

.bubble-4{

  position:absolute;

  width:180px;
  height:180px;

  top:220px;
  right:80px;

  border-radius:50%;

  background:
    rgba(139,92,246,.12);

  border:
    1px solid rgba(255,255,255,.35);

  backdrop-filter:blur(10px);
}

@keyframes floatBubble{

  0%{
    transform:translateY(0);
  }

  50%{
    transform:translateY(-20px);
  }

  100%{
    transform:translateY(0);
  }

}

.bubble-1{
  animation:floatBubble 12s ease-in-out infinite;
}

.bubble-2{
  animation:floatBubble 16s ease-in-out infinite;
}

.bubble-3{
  animation:floatBubble 20s ease-in-out infinite;
}

.app{
  position:relative;
  z-index:1;
}


.weigher-full-card{
  margin-top:14px;

  background: rgba(255,255,255,.35);

  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);

  border:1px solid rgba(255,255,255,.35);

  border-radius:22px;
  padding:24px;

  text-align:center;

  box-shadow:
    0 10px 25px rgba(0,0,0,.04);

  position:relative;
  overflow:hidden;
}

.weigher-full-card::before{

  content:"";

  position:absolute;

  width:100px;
  height:100px;

  border-radius:50%;

  top:-40px;
  right:-40px;

  background:
    radial-gradient(
      circle,
      rgba(167,139,250,.12),
      transparent 70%
    );
}


.weigher-display{

  margin-top:10px;

  font-size:32px;

  font-weight:900;

  color:#111827;

  line-height:1.2;
}

.weigher-display span{

  font-size:18px;

  font-weight:600;

  color:#6b7280;
}

@media(max-width:600px){

  .weigher-display{

    font-size:26px;
  }

  .weigher-display span{

    display:block;

    margin-top:4px;

    font-size:15px;
  }

}

.stdcw{
  font-size:12px;
  color:#6b7280;
  letter-spacing:1px;
}

.install-btn{
  position: fixed;
  bottom: 20px;
  right: 20px;

  border: none;
  border-radius: 50px;

  padding: 14px 20px;

  background: #6d28d9;
  color: white;

  font-weight: 600;
  font-size: 14px;

  cursor: pointer;

  box-shadow:
    0 8px 20px rgba(109,40,217,.3);

  z-index: 9999;

  transition: .3s;
}

.install-btn:hover{
  transform: translateY(-2px);
}


/* SPLASH SCREEN */

#splash-screen{
  position:fixed;
  inset:0;

  background:
  linear-gradient(
    135deg,
    #6d28d9,
    #8b5cf6
  );

  display:flex;
  justify-content:center;
  align-items:center;

  z-index:99999;

  transition:.5s ease;
}

.splash-content{
  text-align:center;
  color:white;
}

.splash-logo{
  width:120px;
  height:120px;

  border-radius:24px;

  animation:
    pulse 2s infinite;
}

.splash-content h1{
  margin-top:20px;
  margin-bottom:5px;

  letter-spacing:2px;
}

.splash-content p{
  opacity:.85;
}

.loader{
  margin:25px auto 0;

  width:40px;
  height:40px;

  border:4px solid rgba(255,255,255,.3);

  border-top:4px solid white;

  border-radius:50%;

  animation:spin 1s linear infinite;
}

@keyframes spin{
  to{
    transform:rotate(360deg);
  }
}

@keyframes pulse{
  0%{
    transform:scale(1);
  }
  50%{
    transform:scale(1.05);
  }
  100%{
    transform:scale(1);
  }
}

.splash-hide{
  opacity:0;
  visibility:hidden;
}


