﻿:root{
  --bg1:#06101f;
  --bg2:#123b69;
  --panel:rgba(255,255,255,.12);
  --text:#f5fbff;
  --muted:#b8d6ee;
  --accent:#49d3ff;
  --gold:#ffd166;
  --good:#3ee07f;
  --bad:#ff6b6b;
  --shadow:0 18px 42px rgba(0,0,0,.30);
}

html,body{
  width:100%;
  max-width:100%;
  margin:0;
  overflow-x:hidden;
}

*{
  box-sizing:border-box;
  max-width:100%;
  -webkit-tap-highlight-color:transparent;
}

body{
  min-height:100svh;
  color:var(--text);
  font-family:"Microsoft YaHei",system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  background:radial-gradient(circle at top,#1c75bc 0,var(--bg2) 34%,var(--bg1) 100%);
}

.sky-bg::before,.sky-bg::after{
  content:"";
  position:fixed;
  width:320px;
  height:320px;
  border-radius:50%;
  filter:blur(10px);
  z-index:-1;
  pointer-events:none;
}
.sky-bg::before{right:-170px;top:-160px;background:rgba(73,211,255,.15)}
.sky-bg::after{left:-190px;bottom:-200px;background:rgba(255,209,102,.10)}

.app-shell{
  width:100%;
  max-width:1180px;
  margin:0 auto;
  padding:0 10px 28px;
}

.topbar,.dashboard,.control-panel,.question-card,.memo-panel{
  border:1px solid rgba(255,255,255,.18);
  background:var(--panel);
  backdrop-filter:blur(18px);
  box-shadow:var(--shadow);
}

.topbar{
  position:sticky;
  top:0;
  z-index:30;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  margin:0 -10px 12px;
  padding:10px 12px;
  border-radius:0 0 20px 20px;
}

.eyebrow{
  margin:0 0 2px;
  color:var(--gold);
  font-size:10px;
  letter-spacing:.12em;
  text-transform:uppercase;
}

h1{
  margin:0;
  font-size:clamp(22px,5vw,38px);
  line-height:1.15;
  white-space:nowrap;
}

button,select{font:inherit}
button{
  border:0;
  border-radius:15px;
  padding:12px 14px;
  color:var(--text);
  cursor:pointer;
  touch-action:manipulation;
}
button:active{transform:scale(.98)}
.primary{background:linear-gradient(135deg,#00b4d8,#4361ee);font-weight:800}
.ghost{background:rgba(255,255,255,.13);border:1px solid rgba(255,255,255,.16)}
.top-draw{flex:0 0 auto;min-width:82px;padding:11px 10px}

.card-zone{
  display:grid;
  grid-template-columns:minmax(0,1fr) 330px;
  gap:16px;
  align-items:start;
}

.question-card{
  position:relative;
  overflow:hidden;
  border-radius:26px;
  padding:22px;
}
.question-card::before{
  content:"✈";
  position:absolute;
  right:10px;
  bottom:-26px;
  font-size:130px;
  color:rgba(255,255,255,.055);
  transform:rotate(-16deg);
  pointer-events:none;
}

.card-topline{
  position:relative;
  z-index:1;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
}
#sourceBadge{
  min-width:0;
  padding:8px 10px;
  border-radius:999px;
  border:1px solid rgba(255,209,102,.28);
  background:rgba(255,209,102,.18);
  color:#ffe8a3;
  font-size:14px;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.icon-btn{
  flex:0 0 46px;
  width:46px;
  height:46px;
  padding:0;
  background:rgba(255,255,255,.10);
  font-size:24px;
}

#questionText{
  position:relative;
  z-index:1;
  margin:20px 0;
  font-size:clamp(23px,4vw,36px);
  line-height:1.42;
  word-break:break-word;
}

.options{
  position:relative;
  z-index:1;
  display:grid;
  gap:12px;
}
.option{
  width:100%;
  min-height:58px;
  padding:16px;
  border-radius:18px;
  border:1px solid rgba(255,255,255,.20);
  background:rgba(255,255,255,.13);
  text-align:left;
  font-size:clamp(17px,2.5vw,22px);
  line-height:1.45;
  white-space:normal;
  word-break:break-word;
}
.option b{color:var(--gold);margin-right:6px}
.option.correct{background:rgba(62,224,127,.24);border-color:rgba(62,224,127,.85)}
.option.wrong{background:rgba(255,107,107,.24);border-color:rgba(255,107,107,.85)}

.feedback{
  position:relative;
  z-index:1;
  min-height:56px;
  margin:13px 0;
  padding:13px 14px;
  border-radius:17px;
  background:rgba(0,0,0,.18);
  color:var(--muted);
  line-height:1.55;
  word-break:break-word;
}
.feedback.good{color:#c8ffdd;background:rgba(62,224,127,.18)}
.feedback.bad{color:#ffd6d6;background:rgba(255,107,107,.18)}

.answer-editor{
  position:relative;
  z-index:1;
  display:flex;
  gap:8px;
  align-items:center;
  flex-wrap:wrap;
  margin-bottom:12px;
}
.answer-editor button{min-width:50px;background:rgba(255,209,102,.28)}
.hidden{display:none}

.card-actions{
  position:relative;
  z-index:1;
  display:grid;
  grid-template-columns:1fr 1fr 1fr;
  gap:8px;
}
.card-actions button{padding:13px 8px}

.side-panel{display:grid;gap:12px}
.control-panel{
  display:grid;
  gap:10px;
  padding:14px;
  border-radius:22px;
}
label{
  display:grid;
  gap:6px;
  color:var(--muted);
  font-size:14px;
}
select{
  width:100%;
  padding:12px 13px;
  border-radius:14px;
  border:1px solid rgba(255,255,255,.22);
  background:rgba(7,17,31,.88);
  color:var(--text);
}
.full{width:100%}

.dashboard{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:8px;
  padding:10px;
  border-radius:22px;
}
.stat{
  min-width:0;
  padding:12px 6px;
  border-radius:15px;
  background:rgba(0,0,0,.18);
  text-align:center;
}
.stat:first-child{grid-column:span 2}
.stat b{display:block;color:var(--gold);font-size:23px}
.stat span{color:var(--muted);font-size:13px}

.memo-panel{
  padding:16px;
  border-radius:22px;
}
.memo-panel h3{margin:0 0 8px;color:var(--gold)}
.memo-panel ul{margin:0;padding-left:18px}
.memo-panel li{margin:8px 0;color:var(--muted);line-height:1.55}

@media (max-width:920px){
  .app-shell{max-width:760px;padding:0 8px 24px}
  .topbar{margin:0 -8px 10px;padding-left:10px;padding-right:10px}
  .card-zone{grid-template-columns:minmax(0,1fr);gap:12px}
  .question-card{min-height:0;padding:18px;border-radius:22px}
  .side-panel{display:flex;flex-direction:column}
  .control-panel{order:1}
  .dashboard{order:2;grid-template-columns:repeat(3,minmax(0,1fr));overflow:visible}
  .stat:first-child{grid-column:auto}
  .memo-panel{order:3}
  .sticky-actions{position:static;background:transparent;padding:0;margin:0}
}

@media (max-width:520px){
  .app-shell{padding:0 7px 18px}
  .topbar{margin:0 -7px 9px;border-radius:0 0 18px 18px}
  .topbar h1{font-size:22px}
  .top-draw{min-width:76px;padding:11px 8px}
  .question-card{padding:14px;border-radius:20px}
  .question-card::before{right:2px;bottom:-20px;font-size:92px}
  #sourceBadge{font-size:12px;padding:7px 9px}
  .icon-btn{flex-basis:44px;width:44px;height:44px}
  #questionText{margin:16px 0;font-size:22px;line-height:1.45}
  .option{min-height:58px;padding:15px;border-radius:17px;font-size:17px}
  .feedback{font-size:15px;margin:12px 0}
  .card-actions{grid-template-columns:1fr 1fr 1fr}
  .card-actions button{font-size:15px}
  .dashboard{grid-template-columns:repeat(2,minmax(0,1fr))}
  .stat:first-child{grid-column:span 2}
  .memo-panel{display:none}
}

@media (min-width:921px){
  .topbar{margin:0 0 16px;border-radius:22px}
  .question-card{position:sticky;top:86px}
}
