
/* =========================
   Megoldások (solutions view)
   ========================= */

.solutions-wrap{
  background: rgba(255,255,255,0.92);
  border-radius: 16px;
  padding: 14px;
}

.solutions-head{
  display:flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 10px;
}

.solutions-title{ font-size: 20px; font-weight: 900; }
.solutions-summary{ opacity: .75; font-weight: 800; margin-top: 4px; }

.solutions-controls{ display:flex; gap:10px; align-items:center; }

.solutions-list{
  max-height: 62vh;
  overflow: auto;
  padding-right: 6px;
}

.sol-card{
  background: rgba(255,255,255,0.88);
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: 14px;
  padding: 12px;
  margin: 10px 0;
}

.sol-qhead{
  display:flex;
  gap: 10px;
  align-items:flex-start;
}

.sol-qno{ font-weight: 900; min-width: 34px; }
.sol-qtext{ font-weight: 800; flex: 1; }
.sol-badge{ white-space: nowrap; }

.badge{
  display:inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  font-weight: 900;
  font-size: 12px;
}
.badge-ok{ background: rgba(46, 204, 113, 0.18); }
.badge-bad{ background: rgba(231, 76, 60, 0.18); }

.sol-opts{ margin-top: 10px; display:grid; gap: 8px; }
.sol-opt{
  display:flex;
  gap: 8px;
  align-items:flex-start;
  padding: 10px;
  border-radius: 12px;
  border: 1px solid rgba(0,0,0,0.08);
  background: rgba(255,255,255,0.75);
}
.sol-mark{ width: 18px; text-align:center; font-weight: 900; opacity: .85; }
.sol-text{ font-weight: 700; }

.sol-correct{ border-color: rgba(46, 204, 113, 0.55); background: rgba(46, 204, 113, 0.12); }
.sol-mine-wrong{ border-color: rgba(231, 76, 60, 0.55); background: rgba(231, 76, 60, 0.10); }
.sol-mine-correct{ border-color: rgba(46, 204, 113, 0.75); background: rgba(46, 204, 113, 0.18); }

body{font-family:system-ui,Segoe UI,Arial; margin:0; padding:0;}
#setupView, #loginView, #godView{max-width:980px; margin:24px auto; padding:0 12px;}
header, footer{max-width:980px; margin:24px auto; padding:0 12px;}
#appView.app-layout{margin:0; padding:0; width:100%; max-width:100%; min-height:100vh;}
.top{display:flex; justify-content:space-between; align-items:flex-start; gap:12px;}
.card{border:1px solid #ddd; border-radius:16px; padding:14px; margin:12px 0;}
.row{display:flex; gap:12px; flex-wrap:wrap; align-items:center;}
.between{justify-content:space-between;}
.grid2{display:grid; grid-template-columns:1fr 1fr; gap:12px;}
@media (max-width:760px){ .grid2{grid-template-columns:1fr;} }
label{display:block; margin:8px 0 4px; font-size:14px; color:#333;}
input,select,button{padding:10px; border-radius:12px; border:1px solid #ccc; width:100%; box-sizing:border-box;}
button{cursor:pointer; width:auto; min-width:160px;}
.btn{border:1px solid #bbb;}
.danger{border-color:#f2b8b8; background:#fff6f6;}
.hidden{display:none !important;}
.muted{color:#666;}
.small{font-size:13px;}
.mono{font-family:ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;}
code.mono{background:#f6f6f6; padding:2px 6px; border-radius:8px;}
#questionsWrap .q{border:1px solid #eee; border-radius:14px; padding:12px; margin:12px 0;}
#questionsWrap .ans{display:flex; gap:8px; align-items:center; margin:6px 0;}
.pill{display:inline-block; padding:2px 10px; border:1px solid #ccc; border-radius:999px; font-size:12px;}
table{width:100%; border-collapse:collapse;}
th,td{border-bottom:1px solid #eee; padding:8px; text-align:left; vertical-align:top;}
.btnsmall{padding:8px 10px; border-radius:10px; min-width:auto;}
#godButtonsCoins button, #godButtonsXp button{min-width:auto;}
hr.sep{border:none;border-top:1px solid #eee; margin:14px 0;}

/* App layout with sidebar */
#appView.app-layout{
  display:flex !important;
  gap:0; 
  margin:0; 
  padding:0; 
  width:100%; 
  max-width:100%; 
  min-height:100vh;
  visibility:visible !important;
}
#appView.hidden{display:none !important;}
#appView:not(.hidden).app-layout{display:flex !important;}
.app-sidebar{
  width:240px; 
  background:linear-gradient(135deg, #667eea 0%, #764ba2 100%); 
  color:white;
  padding:24px 16px; 
  flex-shrink:0;
  border-radius:0;
  display:flex;
  flex-direction:column;
  gap:24px;
  box-sizing:border-box;
}
.app-main{
  flex:1; 
  padding:20px; 
  overflow-y:auto;
  box-sizing:border-box;
  background:white;
}
.sidebar-profile{
  padding:0;
  margin:0;
}
.sidebar-profile h3{
  margin:0 0 12px 0; 
  font-size:18px; 
  font-weight:600;
  color:white;
}
.profile-stats{
  display:flex;
  flex-direction:column;
  gap:8px;
}
.stat-item{
  display:flex;
  justify-content:space-between;
  align-items:center;
  font-size:13px;
  background:rgba(255,255,255,0.2);
  padding:8px 10px;
  border-radius:8px;
}
.stat-label{
  opacity:0.9;
}
.stat-value{
  font-weight:600;
  font-size:14px;
}
.sidebar-menu{
  display:flex !important; 
  flex-direction:column !important; 
  gap:10px;
  flex:1;
}
.menu-item{
  background:rgba(255,255,255,0.15); 
  border:1px solid rgba(255,255,255,0.3); 
  padding:12px 14px; 
  border-radius:10px; 
  text-align:left; 
  cursor:pointer; 
  transition:all 0.2s;
  font-size:14px;
  width:100%;
  min-width:auto;
  color:white;
  font-weight:500;
  box-sizing:border-box;
  display:block;
}
.menu-item:hover{
  background:rgba(255,255,255,0.25); 
  border-color:rgba(255,255,255,0.5);
}
.menu-item.active{
  background:rgba(255,255,255,0.3); 
  border-color:white;
  box-shadow:0 0 10px rgba(0,0,0,0.2);
}
.menu-item.btnlogout{
  margin-top:auto;
  background:rgba(255,87,87,0.3);
  border-color:rgba(255,87,87,0.5);
}
.menu-item.btnlogout:hover{
  background:rgba(255,87,87,0.4);
}
.view-section{margin:12px 0;}
.view-section.hidden{display:none !important;}

@media (max-width:760px){
  #appView.app-layout{min-height:auto;}
  .app-layout{flex-direction:column; height:auto;}
  .app-sidebar{width:100%; border-radius:0; border-right:none; border-bottom:1px solid #ddd; padding:16px;}
  .app-main{padding:16px;}
}


/* Quiz/duel options + modal */
.opt{display:flex; gap:10px; align-items:flex-start; padding:10px 12px; border:1px solid #e7e7ef; border-radius:12px; margin-top:8px; cursor:pointer; background:#fff;}
.opt input{margin-top:3px;}
.modalbg{position:fixed; inset:0; background:rgba(0,0,0,.35); display:flex; align-items:center; justify-content:center; padding:14px; z-index:9999;}
.modal{max-width:720px; width:100%;}

/* === STAGE: karakter + hÄËttÄÂŠr elemek === */
.stage{
  height: 420px;              /* nyugodtan ÄËllÄÂ­tsd 380Ă˘âŹâ520 kÄÂśzÄÂśtt */
  width: 80%;
  border-radius: 18px;
  border: 1px solid rgba(0,0,0,0.08);
  background: #f6f7fb;
  position: relative;
  overflow: hidden;
  margin-bottom: 14px;        /* elvÄËlasztja a lentebbi rÄÂŠsztÄšâl */
}

/* hÄËttÄÂŠr rÄÂŠteg (kÄÂŠsÄšâbb ide jÄÂśn a hÄËz/utazÄËs/hÄËttÄÂŠrkÄÂŠp) */
.stage-bg{
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255,255,255,0.9), rgba(255,255,255,0.0));
  z-index: 1;
}

/* karakter */
.stage-avatar{
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  height: 95%;
  width: auto;
  object-fit: contain;
  z-index: 2;
  filter: drop-shadow(0 12px 18px rgba(0,0,0,0.18));
}

/* dÄÂ­sz tÄËrgyak rÄÂŠtege */
.stage-items{
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
}

/* mobilon ne legyen tÄĹl magas */
@media (max-width: 900px){
  .stage{
    height: 280px;
  }
}
.stage{
  position: relative;
  height: 420px;
  border-radius: 20px;
  overflow: hidden;
  background: linear-gradient(180deg,#f7f9ff,#e9edff);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}

.stage-layer{
  position: absolute;
  height: 320px;
  bottom: 20px;
  z-index: 2;
}

.stage-bg{
  position: absolute;
  inset: 0;
  z-index: 1;
}

.hidden{
  display: none !important;
}

/* ===== BlaseDuel Aula Ă˘âŹâ Top5 Ranglista + BlaseCoin plakÄËt ===== */
.bd-leaderboard{
  margin-top: 12px;
  border: 1px solid rgba(0,0,0,0.10);
  border-radius: 14px;
  padding: 10px;
  background: rgba(255,255,255,0.72);
}
.bd-lb-title{ font-weight: 800; margin-bottom: 8px; }
.bd-lb-list{ margin:0; padding-left: 18px; }
.bd-lb-list li{ margin:6px 0; display:flex; justify-content:space-between; gap:8px; }
.bd-lb-name{ overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.bd-lb-xp{ font-weight:700; opacity:0.85; }
.bd-lb-foot{ margin-top: 8px; font-size: 12px; opacity: 0.75; }

.bd-poster{
  margin-top: 12px;
  border-radius: 14px;
  padding: 12px;
  background: linear-gradient(135deg, rgba(255,215,0,0.35), rgba(255,255,255,0.85));
  border: 1px solid rgba(0,0,0,0.10);
}
.bd-poster-title{ font-weight: 900; font-size: 16px; }
.bd-poster-sub{ margin-top: 4px; font-weight: 700; opacity: 0.85; }
.bd-poster-small{ margin-top: 6px; font-size: 12px; opacity: 0.75; }

/* Ă˘ĹâŚ Aula hÄËttÄÂŠr (opcionÄËlis) */
#viewAula .card{
  position: relative;
  overflow: hidden;
}
#viewAula .card::before{
  content:"";
  position:absolute;
  inset:0;
  background-image: url("aula_bg.png");
  background-size: cover;
  background-position: center;
  opacity: 0.18;     /* ÄËllÄÂ­thatÄĹ: 0.10Ă˘âŹâ0.25 */
  pointer-events:none;
}
#viewAula .card > *{
  position: relative;
  z-index: 1;
}


/* ===== TĂśltĂśttsĂŠg (ĂŠhsĂŠg helyett) â 72 Ăłra alatt fogy el ===== */
.satiety-wrap{
  margin: 10px 0 16px 0;
  display:flex;
  justify-content:center;
}
.satiety-bar{
  width: 220px;
  height: 14px;
  border: 2px solid rgba(0,0,0,0.22);
  border-radius: 10px;
  overflow:hidden;
  background: rgba(0,0,0,0.08);
}
.satiety-fill{
  height:100%;
  width:100%;
  background: linear-gradient(90deg,#7bd88f,#f5c15a,#e05d5d);
  transition: width .30s ease;
}



/* Sidebar mini tĂśltĂśttsĂŠg csĂ­k */
.stat-energy .stat-value{ display:flex; justify-content:flex-end; }
.satiety-bar.satiety-mini{
  width: 120px;
  height: 10px;
  border: 2px solid rgba(255,255,255,0.65);
  background: rgba(255,255,255,0.18);
}
.satiety-bar.satiety-mini .satiety-fill{ border-radius: 0; }


/* ===== LOGIN NOTICE (adminbĂłl kiĂ­rt vĂĄltozĂĄsok) ===== */
.login-notice{
  margin-top: 10px;
  padding: 12px 12px;
  border-radius: 14px;
  border: 2px solid rgba(255, 99, 71, 0.55);
  background: linear-gradient(135deg, rgba(255,99,71,0.18), rgba(255,255,255,0.85));
  box-shadow: 0 10px 20px rgba(0,0,0,0.06);
  font-weight: 800;
  letter-spacing: 0.2px;
}
.login-notice .ln-title{
  display:flex;
  align-items:center;
  gap:8px;
  font-size: 14px;
  margin-bottom: 6px;
}
.login-notice .ln-body{
  font-weight: 700;
  font-size: 13px;
  white-space: pre-wrap;
}
.login-notice .ln-ts{
  margin-top: 6px;
  font-weight: 600;
  font-size: 11px;
  opacity: 0.75;
}
.login-notice.pulse{
  animation: lnPulse 1.2s ease-in-out infinite;
}
@keyframes lnPulse{
  0%,100%{ transform: translateY(0); }
  50%{ transform: translateY(-1px); }
}

/* --- Bolt kártyák (nagyobb, több egy sorban) --- */
#shopList{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
  align-items: stretch;
}
#shopList .card{
  padding: 14px;
}
#shopList .card img{
  width: 76px !important;
  height: 76px !important;
}


/* ===== LOGIN BACKGROUND (Index.png) ===== */
/* Kept simple: body gets the image; app view paints its own background over it. */
body{
  background: url('Index.png') center center / cover no-repeat fixed;
}

/* Make sure the main app area covers the background after login */
#appView{
  background: var(--page-bg, #f6f7fb);
}

/* Keep login card readable */
#loginView{
  background: rgba(255,255,255,0.94);
  backdrop-filter: blur(3px);
}


/* ==== Duel modal visual refresh ==== */
#duelModalBg{
  background: rgba(10, 12, 26, 0.52);
  backdrop-filter: blur(2px);
}

#duelModal{
  position: relative;
  overflow: hidden;
  max-width: 760px;
  border-radius: 22px;
  border: 1px solid rgba(255,255,255,0.24);
  box-shadow: 0 24px 70px rgba(0,0,0,0.38);
  background: #122;
  background-image: url("BlaseArena.png");
  background-size: cover;
  background-position: center;
  color: #142033;
}

#duelModal::before{
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255,255,255,0.80), rgba(255,255,255,0.88));
  backdrop-filter: blur(2px);
}

#duelModal > *{
  position: relative;
  z-index: 1;
}

#duelModalTitle{
  color: #10213f;
  text-shadow: 0 1px 0 rgba(255,255,255,0.55);
}

#duelQNum,
#duelStatus{
  background: rgba(255,255,255,0.78);
  border: 1px solid rgba(17,34,68,0.10);
  border-radius: 999px;
  padding: 6px 12px;
}

#duelQText{
  background: rgba(255,255,255,0.93);
  border: 1px solid rgba(17,34,68,0.10);
  border-radius: 16px;
  padding: 14px 16px;
  line-height: 1.45;
  color: #10213f;
  box-shadow: 0 10px 24px rgba(0,0,0,0.08);
}

#duelOpts{
  display: grid;
  gap: 10px;
}

#duelOpts .opt{
  background: rgba(255,255,255,0.96);
  border: 1px solid rgba(17,34,68,0.12);
  border-radius: 14px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.05);
  color: #11203d;
}

#duelOpts .opt:hover{
  background: #f4f8ff;
  border-color: rgba(55,95,190,0.25);
}

#duelOpts .opt input{
  accent-color: #3f63dd;
}

#duelPrevBtn,
#duelNextBtn,
#duelReviewBtn,
#duelCloseBtn{
  box-shadow: 0 8px 18px rgba(0,0,0,0.12);
}

@media (max-width: 760px){
  #duelModal{
    max-width: 100%;
    border-radius: 18px;
  }
  #duelQText{
    font-size: 16px !important;
  }
}


/* =========================
   Duel arena redesign
   ========================= */
.duel-modal{
  max-width: 1080px;
  padding: 18px;
  background: linear-gradient(180deg, #fbfbff 0%, #f1f3fb 100%);
}
.duel-modal-topbar{
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}
.duel-arena{
  display:grid;
  grid-template-columns: 220px minmax(0,1fr) 220px;
  gap: 18px;
  align-items: start;
}
.duel-side{
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:10px;
}
.duel-nameplate{
  width:100%;
  padding:12px 14px;
  border-radius:16px;
  background:#fff;
  border:2px solid #5a6c46;
  box-shadow: 0 4px 0 rgba(72,84,56,.45);
}
.duel-nameplate-label{
  font-size:12px;
  color:#3f4a35;
  font-weight:700;
}
.duel-nameplate-value{
  margin-top:6px;
  font-size:18px;
  font-weight:900;
  color:#223;
  word-break:break-word;
}
.duel-nameplate-sub{
  margin-top:2px;
  font-size:13px;
  color:#5c6476;
  font-weight:700;
}
.duel-avatar-ring{
  width:180px;
  height:180px;
  border-radius:50%;
  display:flex;
  align-items:center;
  justify-content:center;
  background: radial-gradient(circle at center, rgba(255,255,255,.98) 0%, rgba(237,239,248,.95) 62%, rgba(214,219,235,.85) 100%);
  border: 8px solid rgba(255,255,255,.92);
  box-shadow: inset 0 0 0 6px rgba(180,188,212,.7), 0 10px 24px rgba(0,0,0,.1);
}
.duel-avatar-ring-me{
  background: radial-gradient(circle at center, rgba(255,255,255,.98) 0%, rgba(239,250,245,.95) 62%, rgba(214,235,224,.88) 100%);
}
.duel-avatar{
  width:135px;
  height:135px;
  object-fit:contain;
  filter: drop-shadow(0 10px 16px rgba(0,0,0,.16));
}
.duel-avatar-caption{
  font-size:13px;
  color:#596174;
  font-weight:700;
  text-align:center;
}
.duel-center{
  min-width:0;
}
.duel-question-panel{
  margin-top:10px;
  padding:16px 18px;
  border-radius:18px;
  background: linear-gradient(180deg, #fffef9 0%, #fff8de 100%);
  border:2px solid #334f6f;
  box-shadow: 0 6px 0 rgba(38,63,90,.35);
}
.duel-question-label{
  font-size:13px;
  font-weight:900;
  color:#2d4a67;
  text-transform:uppercase;
  letter-spacing:.04em;
}
.duel-question-text{
  margin-top:8px;
  font-size:22px;
  line-height:1.35;
  font-weight:900;
  color:#1f2430;
}
.duel-options{
  margin-top:14px;
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
#duelOpts .opt{
  margin-top:0;
  min-height:84px;
  border-radius:16px;
  border:2px solid #c8cedf;
  background: linear-gradient(180deg, #ffffff 0%, #f4f6fc 100%);
  box-shadow: 0 4px 0 rgba(151,160,184,.35);
  padding: 14px 14px;
  align-items:center;
}
#duelOpts .opt:hover{
  transform: translateY(-1px);
}
#duelOpts .opt.is-selected{
  border-color:#375a7f;
  box-shadow: 0 0 0 3px rgba(55,90,127,.12), 0 6px 0 rgba(55,90,127,.28);
  background: linear-gradient(180deg, #f8fbff 0%, #e8f0fb 100%);
}
#duelOpts .opt input{
  margin:0;
  transform:scale(1.15);
}
#duelOpts .opt > div:last-child{
  font-weight:800;
  line-height:1.35;
}
.duel-nav-row{
  margin-top:14px;
  gap:10px;
  justify-content:space-between;
}
@media (max-width: 960px){
  .duel-arena{
    grid-template-columns: 1fr;
  }
  .duel-side{
    flex-direction:row;
    justify-content:center;
    flex-wrap:wrap;
  }
  .duel-side-enemy{
    order:1;
  }
  .duel-center{
    order:2;
  }
  .duel-side-me{
    order:3;
  }
  .duel-nameplate{
    max-width:320px;
  }
}
@media (max-width: 640px){
  .duel-modal{
    padding: 14px;
  }
  .duel-options{
    grid-template-columns: 1fr;
  }
  .duel-avatar-ring{
    width:140px;
    height:140px;
  }
  .duel-avatar{
    width:104px;
    height:104px;
  }
  .duel-question-text{
    font-size:19px;
  }
}


/* =========================
   Duel arena cinematic pass
   ========================= */
.duel-modal{
  position:relative;
  overflow:hidden;
  background:
    radial-gradient(circle at top, rgba(255,255,255,.92) 0%, rgba(255,255,255,.75) 18%, rgba(241,243,251,.88) 34%, rgba(228,233,247,.94) 58%, rgba(214,222,241,.96) 100%),
    linear-gradient(180deg, #edf2ff 0%, #dde5f7 100%);
}
.duel-modal::before{
  content:"";
  position:absolute;
  inset:0;
  pointer-events:none;
  background:
    radial-gradient(circle at 20% 18%, rgba(255,255,255,.95) 0%, rgba(255,255,255,0) 22%),
    radial-gradient(circle at 80% 24%, rgba(255,255,255,.72) 0%, rgba(255,255,255,0) 18%),
    repeating-linear-gradient(0deg, rgba(255,255,255,.18) 0 2px, rgba(255,255,255,0) 2px 18px);
  opacity:.7;
}
.duel-modal-topbar,
.duel-arena,
.duel-modal > .row:last-child{
  position:relative;
  z-index:1;
}
.duel-arena-stage{
  position:relative;
  padding:14px 14px 8px;
  border-radius:28px;
  background: linear-gradient(180deg, rgba(255,255,255,.36) 0%, rgba(255,255,255,.08) 100%);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.4);
}
.duel-stage-backdrop{
  position:absolute;
  inset:0;
  overflow:hidden;
  pointer-events:none;
  border-radius:28px;
}
.duel-stage-glow{
  position:absolute;
  top:12%;
  width:30%;
  height:48%;
  border-radius:50%;
  filter: blur(10px);
  opacity:.55;
  animation: duelGlowPulse 4.6s ease-in-out infinite;
}
.duel-stage-glow-left{
  left:2%;
  background: radial-gradient(circle at center, rgba(136, 190, 255, .58) 0%, rgba(136,190,255,.18) 42%, rgba(136,190,255,0) 72%);
}
.duel-stage-glow-right{
  right:2%;
  background: radial-gradient(circle at center, rgba(255, 196, 120, .62) 0%, rgba(255,196,120,.2) 40%, rgba(255,196,120,0) 72%);
  animation-delay: -2.2s;
}
.duel-stage-floor{
  position:absolute;
  left:50%;
  bottom:-12px;
  transform:translateX(-50%);
  width:82%;
  height:100px;
  border-radius:50%;
  background: radial-gradient(ellipse at center, rgba(133,144,177,.32) 0%, rgba(133,144,177,.16) 40%, rgba(133,144,177,0) 72%);
}
.duel-side,
.duel-center{
  position:relative;
  z-index:1;
}
.duel-avatar-ring{
  position:relative;
  animation: duelFloatEnemy 4.4s ease-in-out infinite;
}
.duel-avatar-ring::after{
  content:"";
  position:absolute;
  inset:-10px;
  border-radius:50%;
  border:2px solid rgba(255,255,255,.42);
  opacity:.72;
  animation: duelRingSpin 11s linear infinite;
}
.duel-avatar-ring-me{
  animation: duelFloatMe 4.8s ease-in-out infinite;
}
.duel-avatar-ring-me::after{
  border-color: rgba(171, 224, 194, .55);
}
.duel-nameplate{
  backdrop-filter: blur(4px);
}
.duel-vs-wrap{
  position:relative;
  display:flex;
  justify-content:center;
  align-items:center;
  margin:2px 0 10px;
  min-height:84px;
}
.duel-vs-badge{
  position:relative;
  z-index:2;
  min-width:108px;
  height:108px;
  border-radius:50%;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:34px;
  font-weight:1000;
  letter-spacing:.08em;
  color:#24324b;
  background: radial-gradient(circle at 30% 30%, #fffdf6 0%, #fff1b8 34%, #f7d56a 62%, #d7ac32 100%);
  border:6px solid rgba(255,255,255,.88);
  box-shadow: 0 0 0 6px rgba(215,172,50,.18), 0 12px 26px rgba(74,64,27,.22);
  animation: duelVsPulse 2.8s ease-in-out infinite;
}
.duel-vs-badge::before,
.duel-vs-badge::after{
  content:"";
  position:absolute;
  top:50%;
  width:120px;
  height:4px;
  border-radius:999px;
  transform:translateY(-50%);
  opacity:.75;
}
.duel-vs-badge::before{
  right:100%;
  margin-right:14px;
  background: linear-gradient(90deg, rgba(88,152,231,0) 0%, rgba(88,152,231,.85) 100%);
}
.duel-vs-badge::after{
  left:100%;
  margin-left:14px;
  background: linear-gradient(90deg, rgba(236,177,74,.85) 0%, rgba(236,177,74,0) 100%);
}
.duel-vs-spark{
  position:absolute;
  top:50%;
  width:90px;
  height:90px;
  border-radius:50%;
  transform:translateY(-50%);
  filter: blur(6px);
  opacity:.44;
}
.duel-vs-spark-left{
  left:24%;
  background: radial-gradient(circle, rgba(100,164,255,.8) 0%, rgba(100,164,255,0) 68%);
  animation: duelSparkDrift 3.8s ease-in-out infinite;
}
.duel-vs-spark-right{
  right:24%;
  background: radial-gradient(circle, rgba(255,184,78,.8) 0%, rgba(255,184,78,0) 68%);
  animation: duelSparkDrift 4.2s ease-in-out infinite reverse;
}
.duel-question-panel{
  position:relative;
  overflow:hidden;
}
.duel-question-panel::before{
  content:"";
  position:absolute;
  inset:0;
  pointer-events:none;
  background: linear-gradient(120deg, rgba(255,255,255,.38) 0%, rgba(255,255,255,0) 38%, rgba(255,255,255,.22) 100%);
}
#duelOpts .opt{
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease, background .16s ease;
}
#duelOpts .opt:hover{
  transform: translateY(-2px) scale(1.01);
}
#duelOpts .opt.is-selected{
  transform: translateY(-1px);
}
@keyframes duelFloatEnemy{
  0%,100%{ transform: translateY(0px); }
  50%{ transform: translateY(-7px); }
}
@keyframes duelFloatMe{
  0%,100%{ transform: translateY(0px); }
  50%{ transform: translateY(-9px); }
}
@keyframes duelGlowPulse{
  0%,100%{ transform: scale(1); opacity:.42; }
  50%{ transform: scale(1.09); opacity:.68; }
}
@keyframes duelRingSpin{
  from{ transform: rotate(0deg); }
  to{ transform: rotate(360deg); }
}
@keyframes duelVsPulse{
  0%,100%{ transform: scale(1); box-shadow: 0 0 0 6px rgba(215,172,50,.18), 0 12px 26px rgba(74,64,27,.22); }
  50%{ transform: scale(1.04); box-shadow: 0 0 0 10px rgba(215,172,50,.14), 0 14px 30px rgba(74,64,27,.28); }
}
@keyframes duelSparkDrift{
  0%,100%{ transform: translateY(-50%) scale(.9); opacity:.28; }
  50%{ transform: translateY(calc(-50% - 6px)) scale(1.12); opacity:.56; }
}
@media (max-width: 960px){
  .duel-vs-wrap{ min-height:72px; margin-top:0; }
  .duel-vs-badge{ min-width:88px; height:88px; font-size:28px; }
  .duel-vs-badge::before,
  .duel-vs-badge::after{ width:70px; }
  .duel-vs-spark-left{ left:12%; }
  .duel-vs-spark-right{ right:12%; }
}
@media (max-width: 640px){
  .duel-arena-stage{ padding:10px 10px 6px; }
  .duel-vs-wrap{ min-height:64px; }
  .duel-vs-badge{ min-width:76px; height:76px; font-size:24px; }
  .duel-vs-badge::before,
  .duel-vs-badge::after{ width:42px; margin-inline:8px; }
  .duel-stage-floor{ width:96%; }
}


/* ==== Duel UI compact + flash pass ==== */
#duelModal{
  max-width: 1020px;
  max-height: 92vh;
  overflow: auto;
}
.duel-modal{
  padding: 14px;
}
.duel-modal-topbar{
  margin-bottom: 6px;
}
.duel-arena{
  grid-template-columns: 180px minmax(0,1fr) 180px;
  gap: 12px;
}
.duel-arena-stage{
  padding: 10px 10px 4px;
  border-radius: 24px;
}
.duel-stage-backdrop{ border-radius: 24px; }
.duel-side{ gap: 8px; }
.duel-nameplate{
  padding: 10px 12px;
  border-radius: 14px;
}
.duel-nameplate-label{ font-size: 11px; }
.duel-nameplate-value{ margin-top: 4px; font-size: 16px; }
.duel-nameplate-sub{ font-size: 12px; }
.duel-avatar-ring{
  width: 146px;
  height: 146px;
  border-width: 6px;
}
.duel-avatar{
  width: 108px;
  height: 108px;
}
.duel-avatar-caption{ font-size: 12px; }
.duel-vs-wrap{
  min-height: 64px;
  margin: 0 0 6px;
}
.duel-vs-badge{
  min-width: 84px;
  height: 84px;
  font-size: 28px;
}
.duel-vs-badge::before,
.duel-vs-badge::after{
  width: 68px;
}
#duelQNum,
#duelStatus{
  padding: 5px 10px;
  font-size: 12px;
}
.duel-question-panel{
  margin-top: 6px;
  padding: 12px 14px;
  border-radius: 16px;
}
.duel-question-text{
  margin-top: 6px;
  font-size: 19px;
  line-height: 1.28;
}
.duel-options{
  margin-top: 10px;
  gap: 10px;
}
#duelOpts .opt{
  min-height: 68px;
  padding: 12px 12px;
  border-radius: 14px;
}
.duel-nav-row{
  margin-top: 10px;
}
#duelReviewBtn{ padding: 8px 12px; }

.duel-stage-flash{
  position: absolute;
  top: 8%;
  bottom: 12%;
  width: 3px;
  border-radius: 999px;
  opacity: 0;
  filter: blur(0.6px) drop-shadow(0 0 10px rgba(255,255,255,.9));
  mix-blend-mode: screen;
}
.duel-stage-flash::before{
  content: "";
  position: absolute;
  inset: -8px;
  background: linear-gradient(180deg, rgba(255,255,255,0) 0%, rgba(255,255,255,.98) 18%, rgba(163,214,255,.96) 46%, rgba(255,214,135,.94) 72%, rgba(255,255,255,0) 100%);
  clip-path: polygon(48% 0%, 70% 14%, 57% 28%, 80% 44%, 44% 58%, 66% 76%, 34% 100%, 50% 74%, 28% 56%, 52% 40%, 30% 22%);
}
.duel-stage-flash-a{ left: 46%; animation: duelFlashStrike 4.6s linear infinite; }
.duel-stage-flash-b{ left: 52%; animation: duelFlashStrike 5.3s linear infinite 1.3s; }
.duel-stage-flash-c{ left: 49%; animation: duelFlashStrike 6.1s linear infinite 2.4s; }
.duel-center::after{
  content: "";
  position: absolute;
  left: 50%;
  top: 58px;
  transform: translateX(-50%);
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,.52) 0%, rgba(255,255,255,.12) 34%, rgba(255,255,255,0) 72%);
  pointer-events: none;
  animation: duelFlashBloom 3.9s ease-in-out infinite;
}
@keyframes duelFlashStrike{
  0%, 78%, 100%{ opacity: 0; transform: translateY(-8px) scaleY(.72); }
  80%{ opacity: .16; }
  82%{ opacity: .96; transform: translateY(0) scaleY(1.06); }
  84%{ opacity: .38; }
  86%{ opacity: .92; transform: translateY(1px) scaleY(.98); }
  90%{ opacity: 0; transform: translateY(8px) scaleY(.7); }
}
@keyframes duelFlashBloom{
  0%, 74%, 100%{ opacity: .08; transform: translateX(-50%) scale(.86); }
  79%{ opacity: .16; }
  82%{ opacity: .56; transform: translateX(-50%) scale(1.06); }
  86%{ opacity: .18; }
}

@media (max-width: 960px){
  .duel-arena{ grid-template-columns: 1fr; }
  .duel-side-me{ order: 1; }
  .duel-center{ order: 2; }
  .duel-side-enemy{ order: 3; }
  .duel-side{
    flex-direction: row;
    justify-content: center;
    flex-wrap: wrap;
  }
  .duel-center::after{ top: 44px; }
}
@media (max-width: 640px){
  #duelModal{ max-height: 94vh; }
  .duel-modal{ padding: 10px; }
  .duel-avatar-ring{ width: 118px; height: 118px; }
  .duel-avatar{ width: 84px; height: 84px; }
  .duel-question-text{ font-size: 17px; }
  .duel-options{ grid-template-columns: 1fr; }
  .duel-vs-badge{ min-width: 72px; height: 72px; font-size: 23px; }
  .duel-vs-badge::before,
  .duel-vs-badge::after{ width: 36px; }
}

/* Párbaj közben ne látszódjon a megoldások gomb */
#duelReviewBtn{ display:none !important; }


/* ==== Duel no-scrollbars + challenge badge + strike effect ==== */
html.duel-open,
body.duel-open{
  overflow: hidden !important;
}
#duelModalBg,
#duelModal{
  scrollbar-width: none;
  -ms-overflow-style: none;
}
#duelModalBg::-webkit-scrollbar,
#duelModal::-webkit-scrollbar{
  width: 0;
  height: 0;
  display: none;
}
#duelModal{
  overflow: hidden;
}
.duel-arena-stage{
  min-height: 0;
}
.duel-challenge{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height: 32px;
  padding: 6px 14px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(255,225,133,.95), rgba(255,182,84,.94));
  border: 1px solid rgba(137,92,18,.28);
  color:#4b3200;
  font-weight:900;
  letter-spacing:.01em;
  box-shadow: 0 6px 16px rgba(80,53,8,.14), inset 0 1px 0 rgba(255,255,255,.55);
  animation: duelChallengePulse 2.2s ease-in-out infinite;
  text-align:center;
}
@keyframes duelChallengePulse{
  0%,100%{ transform: translateY(0) scale(1); box-shadow: 0 6px 16px rgba(80,53,8,.14), inset 0 1px 0 rgba(255,255,255,.55); }
  50%{ transform: translateY(-1px) scale(1.02); box-shadow: 0 9px 18px rgba(80,53,8,.18), inset 0 1px 0 rgba(255,255,255,.6); }
}
.duel-center{
  transform-origin:center center;
}
.duel-center.is-striking{
  animation: duelArenaShake .28s ease-in-out 1;
}
@keyframes duelArenaShake{
  0%{ transform: translateX(0); }
  20%{ transform: translateX(-4px); }
  40%{ transform: translateX(4px); }
  60%{ transform: translateX(-3px); }
  80%{ transform: translateX(3px); }
  100%{ transform: translateX(0); }
}
.duel-strike-layer{
  position:absolute;
  inset: 0;
  pointer-events:none;
  z-index: 5;
  overflow:hidden;
}
.duel-strike-flash,
.duel-strike-text{
  opacity:0;
}
.duel-strike-flash{
  position:absolute;
  left:50%;
  top:50%;
  width: 340px;
  height: 16px;
  transform: translate(-50%,-50%) rotate(-24deg) scale(.45);
  border-radius:999px;
  background: linear-gradient(90deg,
    rgba(255,255,255,0) 0%,
    rgba(169,222,255,.85) 18%,
    rgba(255,255,255,.98) 50%,
    rgba(255,210,141,.92) 82%,
    rgba(255,255,255,0) 100%);
  filter: blur(.4px) drop-shadow(0 0 10px rgba(255,255,255,.95)) drop-shadow(0 0 24px rgba(255,206,125,.75));
}
.duel-strike-text{
  position:absolute;
  left:50%;
  top:42%;
  transform: translate(-50%,-50%) scale(.7);
  padding: 8px 16px;
  border-radius: 999px;
  background: rgba(35,43,66,.86);
  color: #fff4c4;
  font-weight: 1000;
  letter-spacing: .08em;
  box-shadow: 0 12px 24px rgba(16,20,31,.25);
}
.duel-strike-layer.is-active .duel-strike-flash{
  animation: duelSlashFlash .42s ease-out 1;
}
.duel-strike-layer.is-active .duel-strike-text{
  animation: duelSlashText .55s ease-out 1;
}
@keyframes duelSlashFlash{
  0%{ opacity:0; transform: translate(-50%,-58%) rotate(-24deg) scale(.35); }
  22%{ opacity: 1; transform: translate(-50%,-50%) rotate(-24deg) scale(1.08); }
  55%{ opacity: .9; transform: translate(-50%,-48%) rotate(-24deg) scale(1); }
  100%{ opacity:0; transform: translate(-50%,-42%) rotate(-24deg) scale(1.1); }
}
@keyframes duelSlashText{
  0%{ opacity:0; transform: translate(-50%,-54%) scale(.6); }
  25%{ opacity:1; transform: translate(-50%,-50%) scale(1.05); }
  100%{ opacity:0; transform: translate(-50%,-46%) scale(1.02); }
}
@media (max-width: 640px){
  .duel-challenge{
    font-size: 12px;
    padding: 5px 10px;
  }
  .duel-strike-flash{
    width: 250px;
  }
  .duel-strike-text{
    font-size: 13px;
    padding: 7px 12px;
  }
}


/* ==== Duel compact-on-short-screens fix ==== */
@media (max-height: 820px){
  #duelModal{ max-height: 90vh; }
  .duel-modal{ padding: 10px; }
  .duel-modal-topbar{ margin-bottom: 4px; }
  .duel-arena{ grid-template-columns: 148px minmax(0,1fr) 148px; gap: 10px; }
  .duel-arena-stage{ padding: 8px 8px 2px; }
  .duel-side{ gap: 6px; }
  .duel-nameplate{ padding: 8px 10px; border-radius: 12px; }
  .duel-nameplate-label{ font-size: 10px; }
  .duel-nameplate-value{ font-size: 14px; margin-top: 2px; }
  .duel-nameplate-sub{ font-size: 11px; }
  .duel-avatar-ring{ width: 118px; height: 118px; border-width: 5px; }
  .duel-avatar{ width: 84px; height: 84px; }
  .duel-avatar-caption{ font-size: 11px; }
  .duel-vs-wrap{ min-height: 52px; margin: 0 0 4px; }
  .duel-vs-badge{ min-width: 68px; height: 68px; font-size: 24px; }
  .duel-vs-badge::before,
  .duel-vs-badge::after{ width: 38px; margin-inline: 8px; }
  #duelQNum,
  #duelStatus{ padding: 4px 8px; font-size: 11px; }
  .duel-question-panel{ margin-top: 4px; padding: 10px 12px; }
  .duel-question-label{ font-size: 11px; }
  .duel-question-text{ margin-top: 4px; font-size: 17px; line-height: 1.22; }
  .duel-options{ margin-top: 8px; gap: 8px; }
  #duelOpts .opt{ min-height: 56px; padding: 10px 10px; }
  #duelOpts .opt > div:last-child{ font-size: 14px; }
  .duel-nav-row{ margin-top: 8px; }
  #duelPrevBtn,
  #duelNextBtn{ padding-top: 8px; padding-bottom: 8px; }
}

@media (max-height: 720px){
  #duelModal{ max-height: 96vh; }
  .duel-modal{ padding: 8px; }
  .duel-arena{ grid-template-columns: 132px minmax(0,1fr) 132px; gap: 8px; }
  .duel-nameplate{ padding: 7px 9px; }
  .duel-nameplate-value{ font-size: 13px; }
  .duel-nameplate-sub{ font-size: 10px; }
  .duel-avatar-ring{ width: 102px; height: 102px; }
  .duel-avatar{ width: 74px; height: 74px; }
  .duel-vs-wrap{ min-height: 44px; }
  .duel-vs-badge{ min-width: 58px; height: 58px; font-size: 21px; }
  .duel-vs-badge::before,
  .duel-vs-badge::after{ width: 26px; }
  .duel-question-text{ font-size: 15px; }
  .duel-options{ gap: 6px; }
  #duelOpts .opt{ min-height: 48px; padding: 8px 9px; }
  #duelOpts .opt > div:last-child{ font-size: 13px; line-height: 1.18; }
  .duel-nav-row{ margin-top: 6px; }
}

@media (max-width: 900px) and (max-height: 820px){
  .duel-arena{ grid-template-columns: 1fr; }
  .duel-side-me{ order: 1; }
  .duel-center{ order: 2; }
  .duel-side-enemy{ order: 3; }
  .duel-side{ flex-direction: row; justify-content: center; flex-wrap: wrap; }
  .duel-avatar-ring{ width: 96px; height: 96px; }
  .duel-avatar{ width: 68px; height: 68px; }
}


.btnsmall.active{border-color:#667eea; box-shadow:0 0 0 2px rgba(102,126,234,.18) inset;}
