:root{
  --bg:#0b1220;
  --panel:#0f172a;
  --card:#111b33;
  --text:#e8eefc;
  --muted:#9aa6c5;
  --border: rgba(255,255,255,0.08);
  --shadow: 0 10px 24px rgba(0,0,0,0.35);
}

*{ box-sizing:border-box; }
html,body{ height:100%; }
body{
  margin:0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
}

.app{
  height:100vh;
  display:flex;
}

.left{
  width: 420px;
  padding: 18px;
  overflow:auto;
  background: var(--panel);
  border-right: 1px solid var(--border);
}

.right{
  flex:1;
  display:flex;
  flex-direction:column;
  overflow:hidden;
}

h1{
  margin: 0 0 12px 0;
  font-size: 22px;
}
h2{
  margin: 0 0 8px 0;
  font-size: 14px;
  color: var(--muted);
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.card{
  background: var(--card);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  border-radius: 14px;
  padding: 12px;
  margin-bottom: 12px;
}

textarea, input, select, button{
  font: inherit;
}

textarea{
  width:100%;
  min-height: 110px;
  resize: vertical;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.04);
  color: var(--text);
  padding: 10px;
}

input[type="file"], input[type="text"], input:not([type]){
  width:100%;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.04);
  color: var(--text);
  padding: 10px;
}

input[type="color"]{
  width: 44px;
  height: 32px;
  padding: 0;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: transparent;
}

.row{
  display:flex;
  gap: 10px;
  align-items:center;
  margin-top: 10px;
}
.row.wrap{ flex-wrap: wrap; }

button{
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.06);
  color: var(--text);
  padding: 10px 12px;
  border-radius: 12px;
  cursor:pointer;
}
button:hover{ background: rgba(255,255,255,0.10); }
button.primary{
  background: rgba(59,130,246,0.28);
  border-color: rgba(59,130,246,0.45);
}

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

.pill{
  display:flex;
  align-items:center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 14px;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
}
.pill label{
  font-size: 12px;
  color: var(--muted);
  font-weight: 700;
}
.pill input[type="range"]{
  width: 180px;
}

.topbar{
  padding: 14px;
  border-bottom: 1px solid var(--border);
  background: rgba(255,255,255,0.02);
}

.actionRow{
  gap: 10px;
  margin-top: 10px;
  margin-bottom: 6px;
}

#progress{
  width:100%;
}

.readerWrap{
  flex:1;
  display:flex;
  align-items:center;
  justify-content:center;
  padding: 24px;
}

.reader{
  font-size: 42px;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.banner{
  position:absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(255,255,255,0.10);
  border: 1px solid var(--border);
  padding: 10px 14px;
  border-radius: 14px;
  box-shadow: var(--shadow);
  z-index: 10;
  max-width: 80%;
  white-space: nowrap;
  overflow:hidden;
  text-overflow: ellipsis;
}

.readerWrap.flash{
  animation: flash 0.4s ease-in-out;
}
@keyframes flash{
  0%{ background: rgba(255,255,255,0.00); }
  50%{ background: rgba(255,255,255,0.08); }
  100%{ background: rgba(255,255,255,0.00); }
}

.readerWrap.invert{
  filter: invert(1);
}

.reader.big{
  transform: scale(1.18);
}

#clips{
  list-style:none;
  margin: 10px 0 0 0;
  padding: 0;
}
#clips li{
  padding: 10px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.04);
  margin-bottom: 8px;
}
#clips li:hover{
  background: rgba(255,255,255,0.08);
}

body.focusMode .left{
  display:none;
}
body.focusMode .right{
  width:100%;
}
body.focusMode{
  background: #0e1730;
}
