:root{
  --bg:#0b1220;
  --card: rgba(255,255,255,0.06);
  --stroke: rgba(255,255,255,0.12);
  --text:#e9eefc;
  --muted: rgba(233,238,252,0.75);
  --red:#ff3b5c;
  --red2:#ff5f75;
  --shadow: 0 25px 70px rgba(0,0,0,0.55);
  --radius: 18px;
}

*{ box-sizing:border-box; }

body{
  margin:0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial;
  color: var(--text);
  background: radial-gradient(1000px 650px at 15% 10%, rgba(255,59,92,0.22), transparent 60%),
              radial-gradient(900px 600px at 90% 20%, rgba(80,255,200,0.15), transparent 55%),
              radial-gradient(900px 700px at 50% 110%, rgba(120,140,255,0.12), transparent 60%),
              var(--bg);
  min-height:100vh;
  overflow-x:hidden;
}

/* Background bubbles */
.bubbles{
  position:fixed;
  inset:0;
  pointer-events:none;
  z-index:0;
  overflow:hidden;
}

.bubble{
  position:absolute;
  bottom:-120px;
  border-radius:50%;
  background: radial-gradient(circle at 30% 30%, rgba(255,255,255,0.35), rgba(255,59,92,0.22));
  opacity:0.55;
  animation: floatUp linear infinite;
  box-shadow: 0 0 30px rgba(255,59,92,0.15);
}

.b1{ width:60px; height:60px; left:8%; animation-duration: 8s; }
.b2{ width:90px; height:90px; left:28%; animation-duration: 10s; animation-delay: 1s; }
.b3{ width:45px; height:45px; left:50%; animation-duration: 7s; animation-delay: 2s; }
.b4{ width:110px; height:110px; left:70%; animation-duration: 12s; animation-delay: .7s; }
.b5{ width:65px; height:65px; left:85%; animation-duration: 9s; animation-delay: 1.8s; }
.b6{ width:40px; height:40px; left:15%; animation-duration: 6s; animation-delay: 2.5s; }

@keyframes floatUp{
  0%{ transform: translateY(0) translateX(0) scale(1); opacity:0.0; }
  10%{ opacity:0.55; }
  100%{ transform: translateY(-120vh) translateX(80px) scale(1.2); opacity:0.0; }
}

.wrap{
  position:relative;
  z-index:1;
  width:min(1150px, 92vw);
  margin:0 auto;
  padding:30px 0 70px;
}

/* Header */
.topbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:18px;
  flex-wrap:wrap;
  margin-bottom:24px;
  opacity:0;
  transform:translateY(-14px);
  animation: slideDown 900ms ease forwards;
}
@keyframes slideDown{
  to{ opacity:1; transform:translateY(0); }
}

.brand{
  display:flex;
  align-items:center;
  gap:12px;
}

.logo{
  width:44px;
  height:44px;
  border-radius:14px;
  background: linear-gradient(135deg, rgba(255,59,92,0.9), rgba(255,95,117,0.65));
  box-shadow: 0 14px 40px rgba(255,59,92,0.22);
  display:grid;
  place-items:center;
  position:relative;
  overflow:hidden;
}
.logo::after{
  content:"";
  position:absolute;
  inset:-40%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.28), transparent);
  transform: rotate(20deg);
  animation: shine 2.6s infinite;
}
@keyframes shine{
  0%{ transform: translateX(-60%) rotate(20deg); }
  100%{ transform: translateX(60%) rotate(20deg); }
}

.brand h1{ margin:0; font-size:18px; }
.brand p{ margin:0; color:var(--muted); font-size:13px; }

/* Buttons */
.btn{
  border: 1px solid var(--stroke);
  background: rgba(255,255,255,0.06);
  color: var(--text);
  padding: 10px 14px;
  border-radius: 14px;
  cursor:pointer;
  transition: transform .18s ease, background .18s ease, border-color .18s ease;
  display:inline-flex;
  align-items:center;
  gap:8px;
  user-select:none;
}
.btn:hover{
  transform: translateY(-2px);
  background: rgba(255,255,255,0.09);
  border-color: rgba(255,255,255,0.18);
}
.btn:active{ transform: translateY(0); }

.btn.red{
  border:none;
  background: linear-gradient(135deg, var(--red), var(--red2));
  box-shadow: 0 18px 45px rgba(255,59,92,0.22);
}
.btn.red:hover{ filter: brightness(1.06); }

/* Emergency pulse */
.pulse{ position:relative; }
.pulse::after{
  content:"";
  position:absolute;
  inset:-6px;
  border-radius: 16px;
  border:2px solid rgba(255,59,92,0.55);
  animation: pulse 1.4s infinite;
  opacity:0.0;
}
@keyframes pulse{
  0%{ transform: scale(0.9); opacity:0.0; }
  40%{ opacity:0.55; }
  100%{ transform: scale(1.2); opacity:0.0; }
}

/* Layout */
.grid{
  display:grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap:18px;
}
@media(max-width:980px){
  .grid{ grid-template-columns:1fr; }
}

/* Cards */
.card{
  background: var(--card);
  border: 1px solid var(--stroke);
  border-radius: var(--radius);
  padding:18px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
  opacity:0;
  transform: translateY(18px);
  animation: fadeUp 800ms ease forwards;
}
.delay1{ animation-delay: .12s; }
.delay2{ animation-delay: .22s; }

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

.card h2{ margin:0 0 10px; font-size:17px; }
.hint{ margin:0 0 16px; color:var(--muted); font-size:13px; }

.row{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap:12px;
}
@media(max-width:520px){
  .row{ grid-template-columns:1fr; }
}

label{
  display:block;
  font-size:12px;
  color: var(--muted);
  margin-bottom:6px;
}

input, select{
  width:100%;
  padding:12px 12px;
  border-radius:14px;
  border:1px solid rgba(255,255,255,0.14);
  background: rgba(0,0,0,0.25);
  color: var(--text);
  outline:none;
  transition: border-color .18s ease, transform .18s ease;
}
input:focus, select:focus{
  border-color: rgba(255,59,92,0.6);
  transform: translateY(-1px);
}

.actions{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  margin-top:14px;
}

.tag{
  display:inline-flex;
  border:1px solid rgba(255,255,255,0.12);
  padding:8px 10px;
  border-radius:999px;
  color: var(--muted);
  font-size:12px;
  margin-top: 10px;
}

/* Results */
.results{
  display:flex;
  flex-direction:column;
  gap:12px;
  margin-top: 14px;
}

.result-card{
  border:1px solid rgba(255,255,255,0.14);
  background: rgba(0,0,0,0.22);
  border-radius: 16px;
  padding: 12px;
  animation: popIn .35s ease forwards;
  transform: scale(0.96);
  opacity:0;
}
@keyframes popIn{
  to { transform: scale(1); opacity:1; }
}

.result-top{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:10px;
}

.badge{
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  border:1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.06);
}

.status{
  font-size:12px;
  color: var(--muted);
}

.small{
  font-size: 13px;
  color: var(--muted);
  margin-top: 6px;
}

.result-actions{
  display:flex;
  gap:10px;
  margin-top: 10px;
  flex-wrap:wrap;
}

/* Footer */
.footer{
  margin-top: 20px;
  text-align:center;
  color: var(--muted);
  font-size: 13px;
}
  
.header-actions{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
}

.toggle-box{
  display:flex;
  align-items:center;
  gap:10px;
  padding:10px;
  border:1px solid rgba(255,255,255,0.12);
  border-radius:14px;
  background: rgba(0,0,0,0.18);
}

.toggle-label{
  margin:0;
  font-size: 13px;
  color: rgba(233,238,252,0.85);
  cursor:pointer;
}

.my-loc{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:8px;
  padding:10px;
  border:1px solid rgba(255,255,255,0.12);
  border-radius:14px;
  background: rgba(0,0,0,0.18);
}

.muted{
  color: rgba(233,238,252,0.65);
}

/* delete button look */
.btn.danger{
  border: 1px solid rgba(255,59,92,0.35);
  background: rgba(255,59,92,0.12);
}
.btn.danger:hover{
  border-color: rgba(255,59,92,0.55);
}
