:root{
  --bg: #ffffff;
  --fg: #0f172a;
  --muted: #5b6b57;
  --brand: #2E3C29;
  --border: rgba(46, 60, 41, 0.18);
  --shadow: 0 16px 40px rgba(15, 23, 42, 0.08);
  --shadow2: 0 8px 18px rgba(15, 23, 42, 0.08);
}

*{ box-sizing:border-box; }
html,body{ height:100%; }
body{
  margin:0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, "Noto Sans", "Liberation Sans", sans-serif;
  background: radial-gradient(900px 500px at 20% 0%, rgba(46, 60, 41, 0.10), transparent 60%),
              radial-gradient(900px 500px at 80% 0%, rgba(46, 60, 41, 0.06), transparent 55%),
              var(--bg);
  color:var(--fg);
}

.wrap{
  max-width: 920px;
  margin: 0 auto;
  padding: 28px 18px 60px;
}

.header{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:16px;
  margin-bottom: 16px;
}

.brand{
  display:flex;
  flex-direction:column;
  gap:6px;
}

.brand h1{
  margin:0;
  font-size: 28px;
  letter-spacing: -0.02em;
  color: rgba(46, 60, 41, 0.98);
}

.brand p{
  margin:0;
  color: var(--muted);
  line-height: 1.45;
  max-width: 58ch;
}

.card{
  background: rgba(255,255,255,0.82);
  backdrop-filter: blur(8px);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow);
  padding: 18px;
}

.card-title{
  font-weight: 800;
  color: rgba(46,60,41,0.95);
  margin-bottom: 10px;
  letter-spacing: -0.01em;
}

.row{
  display:grid;
  grid-template-columns: 1fr;
  gap: 14px;
}
@media (min-width: 820px){
  .row{ grid-template-columns: 1.25fr 0.75fr; }
}

.btn{
  appearance:none;
  border: 1px solid rgba(46, 60, 41, 0.35);
  background: linear-gradient(180deg, rgba(46,60,41,1), rgba(33,45,30,1));
  color: #fff;
  border-radius: 12px;
  padding: 12px 14px;
  font-weight: 800;
  cursor:pointer;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:10px;
  width:100%;
  box-shadow: var(--shadow2);
}
.btn:disabled{
  opacity: 0.6;
  cursor: not-allowed;
}
.btn:hover{
  filter: brightness(1.02);
}
.btn:active{
  transform: translateY(1px);
}

.btn.secondary{
  background: transparent;
  color: var(--brand);
}

.field{
  display:flex;
  flex-direction:column;
  gap:8px;
}
.field label{
  font-weight: 600;
  color: rgba(46,60,41,0.92);
}
.field input[type="text"],
.field input[type="password"]{
  width:100%;
  border:1px solid var(--border);
  border-radius: 12px;
  padding: 12px 12px;
  font-size: 14px;
  outline:none;
  background: rgba(255,255,255,0.9);
}
.field input[type="file"]{
  width:100%;
  border:1px dashed rgba(46, 60, 41, 0.35);
  border-radius: 12px;
  padding: 12px 12px;
  background: rgba(46, 60, 41, 0.04);
}
.field input:focus{
  border-color: rgba(46,60,41,0.45);
  box-shadow: 0 0 0 4px rgba(46,60,41,0.12);
}

.selected{
  margin-top: 14px;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px;
  background: rgba(255,255,255,0.78);
}
.selected-head{
  display:flex;
  align-items:baseline;
  justify-content:space-between;
  gap:10px;
}
.selected-title{
  font-weight: 900;
  color: rgba(46,60,41,0.95);
  letter-spacing: -0.01em;
}
.selected-summary{
  font-size: 12.5px;
  color: rgba(46,60,41,0.72);
  font-weight: 800;
}

.file-list{
  display:flex;
  flex-direction:column;
  gap:10px;
  margin-top: 10px;
}
.file-item{
  display:grid;
  grid-template-columns: 56px 1fr 34px;
  gap: 10px;
  align-items:center;
  border: 1px solid rgba(46, 60, 41, 0.14);
  border-radius: 14px;
  background: rgba(255,255,255,0.86);
  padding: 8px;
}
.file-preview{
  width:56px;
  height:56px;
  border-radius: 12px;
  overflow:hidden;
  border: 1px solid rgba(46, 60, 41, 0.18);
  background: rgba(46, 60, 41, 0.06);
}
.file-preview img,
.file-preview video{
  width:100%;
  height:100%;
  object-fit: cover;
  display:block;
}
.file-fallback{
  width:100%;
  height:100%;
  display:flex;
  align-items:center;
  justify-content:center;
  font-weight: 900;
  font-size: 12px;
  color: rgba(46,60,41,0.75);
  letter-spacing: 0.08em;
}
.file-meta{ min-width:0; }
.file-name{
  font-weight: 900;
  color: rgba(46,60,41,0.95);
  font-size: 13.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.file-sub{
  margin-top: 2px;
  font-size: 12px;
  color: rgba(46,60,41,0.70);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.file-remove{
  appearance:none;
  border: 1px solid rgba(46, 60, 41, 0.18);
  background: rgba(255,255,255,0.85);
  color: rgba(46,60,41,0.95);
  width: 34px;
  height: 34px;
  border-radius: 12px;
  cursor:pointer;
  font-size: 20px;
  line-height: 1;
  font-weight: 900;
  display:flex;
  align-items:center;
  justify-content:center;
}
.file-remove:hover{
  background: rgba(46,60,41,0.08);
}

.hint{
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.status{
  border-radius: 12px;
  padding: 12px;
  border: 1px solid var(--border);
  background: rgba(46, 60, 41, 0.06);
  color: rgba(46,60,41,0.95);
  font-size: 14px;
  line-height: 1.45;
}
.status.error{
  background: rgba(220, 38, 38, 0.08);
  border-color: rgba(220, 38, 38, 0.25);
  color: rgba(153, 27, 27, 0.95);
}
.status.ok{
  background: rgba(34, 197, 94, 0.10);
  border-color: rgba(34, 197, 94, 0.22);
  color: rgba(20, 83, 45, 0.95);
}

.progress{
  height: 10px;
  background: rgba(46, 60, 41, 0.08);
  border-radius: 999px;
  overflow:hidden;
  border:1px solid var(--border);
}
.progress > div{
  height:100%;
  width:0%;
  background: linear-gradient(90deg, rgba(46,60,41,1), rgba(46,60,41,0.75));
}

.footer{
  margin-top: 18px;
  color: rgba(46, 60, 41, 0.7);
  font-size: 12.5px;
}

.grid{
  display:grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
@media (min-width: 820px){
  .grid{ grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

.thumb{
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow:hidden;
  background: rgba(255,255,255,0.82);
  box-shadow: var(--shadow2);
  transition: transform 160ms ease, box-shadow 160ms ease;
}
.thumb:hover{
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}
.thumb .meta{
  padding: 10px 10px 12px;
  font-size: 12.5px;
  color: rgba(46,60,41,0.88);
}
.thumb img, .thumb video{
  width:100%;
  display:block;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: rgba(46, 60, 41, 0.06);
}

.toplinks{
  display:flex;
  gap:10px;
  align-items:center;
  justify-content:flex-end;
  flex-wrap:wrap;
}

.lang{
  display:flex;
  align-items:center;
  gap:8px;
  padding: 6px 8px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255,255,255,0.7);
}
.lang-label{
  font-size: 12px;
  color: rgba(46,60,41,0.75);
  font-weight: 700;
}
.pill{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width: 34px;
  height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid rgba(46,60,41,0.25);
  color: rgba(46,60,41,0.92);
  text-decoration:none;
  font-weight: 900;
  font-size: 12px;
  letter-spacing: 0.02em;
  background: rgba(255,255,255,0.85);
}
.pill.active{
  background: rgba(46,60,41,0.12);
  border-color: rgba(46,60,41,0.40);
}
.pill-link{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid rgba(46,60,41,0.25);
  color: rgba(46,60,41,0.95);
  text-decoration:none;
  font-weight: 900;
  background: rgba(255,255,255,0.72);
}
.pill-link:hover, .pill:hover{
  filter: brightness(0.99);
}

.a-strong{
  color:#2E3C29;
  font-weight:900;
  text-decoration:none;
}
.a-strong:hover{
  text-decoration: underline;
}

