@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@500;600;700;800&display=swap');

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

body{
  font-family:'Plus Jakarta Sans', sans-serif;
  background:#e9e6ff;
  color:#0f172a;
  padding:16px 14px;
}

.container{
  max-width:720px;
  margin:0 auto;
}

/* HEADER - Same as yours */
header{
  margin:8px 6px 20px 6px;
}
header h1{
  font-size:40px;
  font-weight:800;
  letter-spacing:-1px;
  color:#12132d;
  display:flex;
  align-items:center;
  gap:8px;
  line-height:1;
}
header h1 span{
  font-size:36px;
  filter: drop-shadow(0 4px 8px rgba(255,200,0,0.4));
}
header p{
  color:#7c7ca0;
  font-size:16px;
  font-weight:500;
  margin-top:8px;
}

/* NEW CARD DESIGN - EXACT AS YOUR SCREENSHOT */
.ai-card{
  background:#ffffff;
  border-radius:32px;
  padding:12px;
  box-shadow:0 20px 50px rgba(95, 88, 255, 0.15), 0 4px 12px rgba(0,0,0,0.05);
  border:1px solid rgba(255,255,255,0.8);
}
.ai-card-inner{
  background:#f7f8fb;
  border:1.8px solid #e9ebf2;
  border-radius:24px;
  padding:20px 18px 16px;
}

#q{
  width:100%;
  border:none;
  outline:none;
  background:transparent;
  font-size:19px;
  font-weight:500;
  color:#111;
  padding:6px 4px 22px;
  font-family:'Plus Jakarta Sans', sans-serif;
}
#q::placeholder{
  color:#98a0b8;
  font-weight:500;
}

/* Bottom row: camera | mic | Ask */
.action-row{
  display:flex;
  align-items:center;
  gap:12px;
  margin-top:4px;
}

#imgBtn{
  width:56px;
  height:56px;
  min-width:56px;
  border-radius:16px;
  border:1.5px solid #e9ebf2;
  background:#ffffff;
  font-size:22px;
  cursor:pointer;
  display:flex;
  align-items:center;
  justify-content:center;
}
#micBtn{
  width:64px;
  height:64px;
  min-width:64px;
  border-radius:50%;
  border:none;
  background:#ede8ff;
  font-size:28px;
  cursor:pointer;
  display:flex;
  align-items:center;
  justify-content:center;
  transition:0.2s;
}
#askBtn{
  flex:1;
  background:#3658ff;
  color:#fff;
  border:none;
  height:58px;
  border-radius:999px;
  font-size:20px;
  font-weight:700;
  cursor:pointer;
  box-shadow:0 10px 24px rgba(54, 88, 255, 0.38);
  transition:0.2s;
}
#imgBtn:active, #micBtn:active, #askBtn:active{
  transform:scale(0.96);
}

#micBtn.listening{
  animation:pulse 1s infinite;
  background:#ffe2e6;
}
@keyframes pulse{
  0%{transform:scale(1)}
  50%{transform:scale(1.08)}
  100%{transform:scale(1)}
}

/* HISTORY & OUTPUT - same as yours */
#history{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  margin:20px 2px 8px 2px;
}
.h-item{
  background:#ffffff;
  border:1px solid #f0efff;
  padding:11px 18px;
  border-radius:999px;
  font-size:16px;
  font-weight:500;
  color:#1e293b;
  cursor:pointer;
  display:inline-flex;
  align-items:center;
  gap:8px;
  max-width:48%;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
  box-shadow:0 2px 10px rgba(0,0,0,0.03);
}
#loader{
  display:none;
  text-align:center;
  padding:24px;
  font-weight:700;
  font-size:16px;
  color:#3658ff;
}
.card{
  background:#ffffff;
  border-radius:26px;
  padding:22px;
  margin-top:22px;
  box-shadow:0 12px 32px rgba(0,0,0,0.06);
  border:1px solid #f5f3ff;
}
.badge{
  display:inline-block;
  background:#eef0ff;
  color:#3658ff;
  padding:6px 14px;
  border-radius:999px;
  font-size:13px;
  font-weight:700;
  margin-bottom:16px;
}
.card h2{
  font-size:23px;
  font-weight:800;
  line-height:1.3;
  color:#12132d;
  margin-bottom:14px;
}
.card .p, .p{
  font-size:21px !important;
  line-height:1.70 !important;
  color:#1e293b;
  font-weight:500;
  white-space:pre-line;
  word-break:break-word;
}
#ocrStatus{
  font-size:13px;
  color:#3658ff;
  margin:10px 6px;
  font-weight:600;
}

@media(max-width:480px){
  header h1{font-size:36px}
  #q{font-size:18px}
}
/* Image answer fix */
.card img{
  width:100%;
  border-radius:18px;
  margin:14px 0;
  display:block;
}
.actions{
  margin-top:16px;
  display:flex;
  gap:10px;
}
.actions button{
  background:#f1f5f9;
  border:1px solid #e2e8f0;
  padding:10px 18px;
  border-radius:999px;
  font-weight:600;
  cursor:pointer;
}