:root{
  --bg:#0b0d12;
  --card:#121726;
  --card2:#0f1422;
  --text:#e8ecf5;
  --muted:#9aa7c0;
  --line:#22304d;
  --accent:#7aa2ff;
  --danger:#ff6b6b;
  --ok:#2ee59d;
  --shadow: 0 12px 30px rgba(0,0,0,.35);
  --radius: 14px;
}

*{ box-sizing: border-box; }
html,body{ height:100%; }
body{
  margin:0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial;
  background: var(--bg);
  color: var(--text);
}

.container{ width:min(1100px, 92vw); margin: 0 auto; }
.header{
  border-bottom:1px solid rgba(255,255,255,.06);
  background: rgba(10,12,18,.6);
  backdrop-filter: blur(10px);
  position: sticky;
  top:0;
  z-index:5;
}
.header .container{
  padding: 18px 0;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
}
h1{ margin:0; font-size: 20px; letter-spacing:.2px; }
h2{ margin:0 0 12px 0; font-size: 16px; }
h3.sub{ margin:0; font-size: 13px; color: var(--muted); font-weight:600; }

.grid{
  display:grid;
  grid-template-columns: 1fr 1.2fr;
  gap:16px;
  padding:16px 0 32px;
}
@media (max-width: 900px){
  .grid{ grid-template-columns: 1fr; }
}

.card{
  background: linear-gradient(180deg, rgba(255,255,255,.04), transparent 60%), var(--card);
  border: 1px solid rgba(255,255,255,.06);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
}

.row{ display:flex; gap:10px; align-items:center; }
.row.between{ justify-content:space-between; }
.stack{ display:flex; flex-direction:column; gap:10px; }
.grow{ flex:1; }
.grid2{
  display:grid;
  grid-template-columns: repeat(3, 1fr);
  gap:10px;
}
@media (max-width: 520px){
  .grid2{ grid-template-columns: repeat(2, 1fr); }
}

.label{ font-size: 12px; color: var(--muted); font-weight: 600; }
.input{
  width:100%;
  padding:10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.08);
  background: var(--card2);
  color: var(--text);
  outline:none;
}
.input:focus{ border-color: rgba(122,162,255,.55); box-shadow: 0 0 0 4px rgba(122,162,255,.12); }

.btn{
  padding:10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(122,162,255,.15);
  color: var(--text);
  cursor:pointer;
  font-weight: 600;
}
.btn:hover{ border-color: rgba(122,162,255,.45); }
.btn.ghost{ background: transparent; }
.btn.danger{ border-color: rgba(255,107,107,.35); color: #ffd7d7; }
.btn.danger:hover{ border-color: rgba(255,107,107,.7); }

.sep{
  border: none;
  border-top: 1px solid rgba(255,255,255,.08);
  margin: 16px 0;
}

.muted{ color: var(--muted); }
.small{ font-size: 12px; }

.list{
  margin-top:10px;
  display:flex;
  flex-direction:column;
  gap:8px;
}
.pill{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:10px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(255,255,255,.06);
}
.pill b{ font-size: 13px; }
.pill .actions{ display:flex; gap:8px; }

.selected{
  padding: 12px;
  border-radius: 12px;
  border: 1px dashed rgba(122,162,255,.35);
  background: rgba(122,162,255,.08);
}

.table{
  margin-top: 10px;
  overflow:auto;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.06);
}
table{
  width:100%;
  border-collapse: collapse;
  min-width: 760px;
}
th, td{
  padding: 10px 12px;
  border-bottom: 1px solid rgba(255,255,255,.06);
  font-size: 13px;
  white-space: nowrap;
}
th{ text-align:left; color: var(--muted); font-weight:700; background: rgba(255,255,255,.02); }

.footer{ padding-bottom: 26px; }

.quest-level-pill{
  display:inline-flex;
  align-items:center;
  padding:6px 12px;
  border-radius:999px;
  background: linear-gradient(90deg, rgba(122,162,255,.25), rgba(46,229,157,.2));
  border:1px solid rgba(122,162,255,.45);
  font-weight:700;
  letter-spacing:.2px;
}

.quest-progress-track{
  width:100%;
  height:10px;
  border-radius:999px;
  background: rgba(255,255,255,.08);
  overflow:hidden;
}

.quest-progress-fill{
  height:100%;
  border-radius:999px;
  background: linear-gradient(90deg, #7aa2ff, #2ee59d);
  transition: width .35s ease;
}

.quest-list{
  display:grid;
  grid-template-columns: 1fr;
  gap:10px;
}

.quest-item{
  padding:12px;
  border-radius:12px;
  border:1px solid rgba(255,255,255,.08);
  background: rgba(255,255,255,.03);
  display:flex;
  flex-direction:column;
  gap:10px;
}

.quest-rarity{
  font-size:11px;
  font-weight:700;
  padding:2px 8px;
  border-radius:999px;
  border:1px solid transparent;
}

.quest-rarity-common{
  color:#d9e2f9;
  border-color: rgba(122,162,255,.25);
  background: rgba(122,162,255,.12);
}

.quest-rarity-rare{
  color:#d6ffef;
  border-color: rgba(46,229,157,.35);
  background: rgba(46,229,157,.14);
}

.quest-rarity-epic{
  color:#ffe6c4;
  border-color: rgba(255,183,77,.35);
  background: rgba(255,183,77,.14);
}

.quest-rarity-legendary{
  color:#ffd6d6;
  border-color: rgba(255,107,107,.4);
  background: rgba(255,107,107,.16);
}

.quest-exp-tag{
  font-size:12px;
  font-weight:700;
  color:#bfffe1;
}

.quest-claim-btn:disabled{
  opacity:.6;
  cursor:not-allowed;
}

.quest-claimed-tag{
  font-size:12px;
  font-weight:700;
  color:#bfffe1;
  padding:4px 8px;
  border-radius:999px;
  border:1px solid rgba(46,229,157,.35);
  background: rgba(46,229,157,.12);
}

.quest-feedback-good{
  color: var(--ok);
}

.quest-feedback-warn{
  color: #ffd1a8;
}

.scroll {
  max-height: 260px;
  overflow-y: auto;
  padding-right: 6px;
}

/* scrollbar un peu plus clean (Chrome/Edge) */
.scroll::-webkit-scrollbar { width: 10px; }
.scroll::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,.12);
  border-radius: 999px;
}
.scroll::-webkit-scrollbar-track {
  background: rgba(255,255,255,.04);
  border-radius: 999px;
}

/* Animated gradient bubbles background */

body::before{
  content:"";
  position: fixed;
  inset: -20%;
  z-index: -1;
  pointer-events: none;

  background:
    radial-gradient(600px 400px at 20% 20%, rgba(122,162,255,.18), transparent 70%),
    radial-gradient(500px 350px at 80% 30%, rgba(46,229,157,.12), transparent 70%),
    radial-gradient(700px 450px at 50% 80%, rgba(122,162,255,.10), transparent 70%),
    radial-gradient(800px 450px at 30% 60%, rgba(241, 119, 119, 0.1), transparent 70%);

  animation: floatBubbles 40s ease-in-out infinite alternate;
}

@keyframes floatBubbles{
  0%{
    transform: translate3d(0,0,0) scale(1);
  }

  25%{
    transform: translate3d(-3%,2%,0) scale(1.05);
  }

  50%{
    transform: translate3d(4%,-3%,0) scale(1.08);
  }

  75%{
    transform: translate3d(-2%,-4%,0) scale(1.04);
  }

  100%{
    transform: translate3d(3%,3%,0) scale(1.06);
  }
}
