
:root{
  --containerW: 1100px;
  --modalW: min(1000px, 95vw);
  --modalH: min(80vh, 820px);
  --bgA: #0b1220;
  --bgB: #111827;
  --bg: linear-gradient(135deg,var(--bgA),var(--bgB));
  --bgImg: none;
}

*{ box-sizing:border-box; }
body{
  margin:0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial;
  color:#e5e7eb;
  min-height:100vh;
  background-image: var(--bgImg), var(--bg);
  background-size: cover, cover;
  background-position: center, center;
  background-attachment: fixed, fixed;
}

a{ color:inherit; text-decoration:none; }
label{ display:block; margin-top:10px; margin-bottom:6px; font-size:12px; color:#cbd5e1; }
input, textarea{
  width:100%;
  padding:10px 12px;
  border-radius:10px;
  border:1px solid rgba(255,255,255,.12);
  background: rgba(15,23,42,.65);
  color:#e5e7eb;
  outline:none;
}
select{
  width:100%;
  padding:10px 12px;
  border-radius:10px;
  border:1px solid rgba(255,255,255,.12);
  background: rgba(15,23,42,.65);
  color:#e5e7eb;
  outline:none;
}
textarea{ resize: vertical; }

.topbar{
  height:56px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:0 16px;
  border-bottom:1px solid rgba(255,255,255,.08);
  background: rgba(0,0,0,.20);
  backdrop-filter: blur(8px);
  position: sticky;
  top:0;
  z-index:10;
}
.left, .right{ display:flex; align-items:center; gap:10px; }
.brand{ font-weight:900; letter-spacing:.3px; opacity:.95; }
.brand{ transition: opacity 160ms ease; }
.brand:hover{ opacity:1; text-decoration:underline; }

/* Floating About button (main menu) */
.hasAboutFab .container{ margin:18px auto 110px; }
.aboutFab{
  position:fixed;
  left:50%;
  bottom:18px;
  transform: translateX(-50%);
  z-index: 60;
  padding:12px 18px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.12);
  background: rgba(0,0,0,.35);
  backdrop-filter: blur(8px);
  font-weight:900;
  letter-spacing:.3px;
  opacity:.95;
  user-select:none;
  cursor:pointer;
  transition: background 160ms ease, border-color 160ms ease, opacity 160ms ease, transform 120ms ease;
}
.aboutFab:hover{ opacity:1; background: rgba(0,0,0,.45); border-color: rgba(255,255,255,.20); }
.aboutFab:active{ transform: translateX(-50%) scale(.98); }

.centerText{ text-align:center; }

.mainMenuHero{
  min-height: 180px;
  display:flex;
  align-items:center;
  justify-content:center;
  text-align:center;
  padding: 16px 8px 8px;
}
.mainMenuHeroInner{
  width:min(100%, 760px);
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:10px;
}
.mainMenuTitle{
  margin:0;
  line-height:1.08;
}
.mainMenuSubtitle{
  margin:0;
  color:#cbd5e1;
  line-height:1.35;
}
.pageHero{
  text-align:center;
  margin-bottom:14px;
}
.pageHero h1{ margin:0 0 8px; }

.tabsBar{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  justify-content:center;
  align-items:center;
  margin: 0 0 16px;
}
.tabLink{
  padding:10px 14px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.12);
  background: rgba(0,0,0,.22);
  font-size:13px;
  transition: background 160ms ease, border-color 160ms ease, transform 120ms ease;
}
.tabLink:hover{ background: rgba(0,0,0,.32); border-color: rgba(255,255,255,.22); }
.tabLink.active{ background: rgba(59,130,246,.35); border-color: rgba(147,197,253,.35); }

.awardsDocShell, .awardsEditorShell{
  border:1px solid rgba(255,255,255,.10);
  border-radius:16px;
  background: rgba(0,0,0,.18);
  padding:16px;
}
.awardsDoc{
  min-height:220px;
  line-height:1.7;
  word-break: break-word;
}
.awardsDoc:empty::before{
  content: "No author content yet.";
  color:#94a3b8;
}
.awardsDoc p, .awardsDoc h1, .awardsDoc h2, .awardsDoc h3, .awardsDoc ul, .awardsDoc ol, .awardsDoc blockquote{
  margin-top:0;
}
.awardsDoc img, .awardsEditor img{
  max-width:100%;
  height:auto;
  border-radius:14px;
  display:block;
  margin:12px auto;
  border:1px solid rgba(255,255,255,.12);
}
.awardsDoc blockquote, .awardsEditor blockquote{
  margin:12px 0;
  padding:12px 14px;
  border-left:4px solid rgba(96,165,250,.75);
  background: rgba(255,255,255,.05);
  border-radius:12px;
}
.wordToolbar{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin-bottom:12px;
  align-items:flex-end;
}
.wordBtn{
  margin-top:0;
}
.wordToolGroup{
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding:6px 10px;
  border:1px solid rgba(255,255,255,.10);
  border-radius:12px;
  background:rgba(255,255,255,.04);
  flex-wrap:wrap;
}
.wordToolGroup label{
  margin:0;
  color:#cbd5e1;
}
.wordSizeInput, .wordSelect, .wordLinkInput, .wordColorInput{
  height:36px;
  border-radius:10px;
  border:1px solid rgba(255,255,255,.10);
  background:rgba(255,255,255,.08);
  color:#e5e7eb;
  padding:0 10px;
  outline:none;
}
.wordSizeInput{
  width:84px;
}
.wordSelect{
  min-width:64px;
}
.wordLinkInput{
  width:min(280px, 45vw);
}
.wordColorInput{
  width:56px;
  padding:4px;
}
.awardsDoc a, .awardsEditor a{
  color:#93c5fd;
  text-decoration:underline;
  text-underline-offset:2px;
}
.awardsEditor{
  min-height:360px;
  outline:none;
  line-height:1.7;
}
.awardsEditor:empty:before{
  content: "Write author text here and insert pictures where you want them.";
  color:#94a3b8;
}
.awardsEditor [data-selected-image="1"]{
  outline:2px solid rgba(96,165,250,.95);
  outline-offset:4px;
}

.container{
  width:min(var(--containerW), 96vw);
  margin:18px auto 60px;
  display:flex;
  flex-direction:column;
  gap:16px;
}

.favPreviewWrap{
  width: 64px;
  height: 64px;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(0,0,0,.25);
  display:flex;
  align-items:center;
  justify-content:center;
}
.favPreviewWrap img{
  width: 64px;
  height: 64px;
  object-fit: cover;
  user-select:none;
}

.card{
  background: rgba(0,0,0,.25);
  border:1px solid rgba(255,255,255,.10);
  border-radius:16px;
  padding:16px;
}

.row{ display:flex; gap:12px; flex-wrap:wrap; }
.col{ flex:1 1 280px; }

.btn{
  margin-top:12px;
  padding:10px 12px;
  border-radius:12px;
  border:1px solid rgba(255,255,255,.12);
  background: rgba(59,130,246,.35);
  color:#e5e7eb;
  cursor:pointer;
  transition: background 160ms ease, border-color 160ms ease, opacity 160ms ease, transform 120ms ease;
}
.btn:hover{ background: rgba(59,130,246,.45); }
.btn:active{ transform: scale(.98); }
.btn:disabled{ opacity:.55; cursor:not-allowed; }
.smallbtn{ margin-top:0; padding:8px 10px; border-radius:10px; font-size:12px; }
.navbtn{ margin-top:0; }
.danger{ background: rgba(239,68,68,.35); }
.danger:hover{ background: rgba(239,68,68,.45); }

.link{ opacity:.9; }
.link{ transition: opacity 160ms ease; }
.link:hover{ opacity:1; text-decoration:underline; }

.badge{
  padding:6px 10px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.12);
  background: rgba(0,0,0,.25);
  font-size:12px;
}

.small{ color:#cbd5e1; font-size:12px; }
.ok{ color:#34d399; font-size:12px; }
.err{ color:#fb7185; font-size:12px; }

.hr{ border:0; border-top:1px solid rgba(255,255,255,.08); margin:16px 0; }

.grid{
  display:grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap:12px;
  margin-top:12px;
}
@media (max-width: 1000px){
  .grid{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.tile{
  position:relative;
  overflow:hidden;
  border-radius:16px;
  border:1px solid rgba(255,255,255,.12);
  background: rgba(0,0,0,.18);
  cursor:pointer;
  min-height: 220px;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}
.tile:hover{ border-color: rgba(255,255,255,.22); transform: translateY(-2px); box-shadow: 0 10px 28px rgba(0,0,0,.25); }

.thumb{
  height:160px;
  width:100%;
  background: var(--c, linear-gradient(135deg,#444,#111));
}
.meta{ padding:12px; }
.title{ margin:0; font-weight:700; }
.subtitle{ margin:6px 0 0; font-size:12px; color:#cbd5e1; }

.editBtn, .delBtn{
  position:absolute;
  top:10px;
  padding:6px 10px;
  border-radius:10px;
  border:1px solid rgba(255,255,255,.12);
  background: rgba(0,0,0,.45);
  color:#e5e7eb;
  cursor:pointer;
  font-size:12px;
  display:block;
  opacity:0;
  pointer-events:none;
  transform: translateY(-6px);
  transition: opacity 160ms ease, transform 160ms ease, background 160ms ease, border-color 160ms ease;
}
.editBtn{ right:10px; }
.delBtn{ right:64px; }
.tile:hover .editBtn,
.tile:hover .delBtn{ opacity:1; pointer-events:auto; transform: translateY(0); }

.modal{
  position:fixed;
  inset:0;
  background: rgba(0,0,0,.65);
  display:flex;
  align-items:center;
  justify-content:center;
  padding:14px;
  z-index:100;
  opacity:0;
  pointer-events:none;
  transition: opacity 220ms ease;
}
.modal.open{ opacity:1; pointer-events:auto; }
.modalBox{
  width: min(900px, 96vw);
  max-height: 90vh;
  overflow:auto;
  background: rgba(17,24,39,.95);
  border:1px solid rgba(255,255,255,.14);
  border-radius:16px;
  padding:14px;
  transform: translateY(10px) scale(.985);
  transition: transform 220ms ease;
}
.modal.open .modalBox{ transform: translateY(0) scale(1); }
.previewBox{
  width: var(--modalW);
  max-height: var(--modalH);
}
.modalHeader{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:10px;
}
.previewTools{
  margin-top:10px;
  display:flex;
  align-items:center;
  gap:8px;
}
.previewWrap{
  margin-top:12px;
  border-radius:14px;
  overflow:auto;
  border:1px solid rgba(255,255,255,.12);
  background: rgba(0,0,0,.25);
  height: calc(var(--modalH) - 220px);
  display:flex;
  align-items:center;
  justify-content:center;
}
.previewWrap img{
  max-width: 100%;
  max-height: 100%;
  transform-origin: center center;
  user-select:none;
}
.descBox{
  margin-top:12px;
  padding:10px;
  border-radius:14px;
  border:1px solid rgba(255,255,255,.10);
  background: rgba(0,0,0,.20);
}

.chk{
  display:flex;
  align-items:center;
  gap:8px;
  margin-top:26px;
}

/* Pagination */
.pager{
  display:flex;
  align-items:center;
  gap:10px;
  margin-top:12px;
  flex-wrap:wrap;
}
.pageNums{
  display:flex;
  gap:6px;
  flex-wrap:wrap;
}
.pageNumBtn{
  margin-top:0;
  padding:8px 10px;
  border-radius:10px;
  border:1px solid rgba(255,255,255,.12);
  background: rgba(0,0,0,.25);
  color:#e5e7eb;
  cursor:pointer;
  font-size:12px;
  transition: background 160ms ease, border-color 160ms ease, opacity 160ms ease, transform 120ms ease;
}
.pageNumBtn:hover{ background: rgba(0,0,0,.35); }
.pageNumBtn:active{ transform: scale(.98); }
.pageNumBtn.active{ background: rgba(59,130,246,.45); }

/* Sliding About Panel */
.slideOverlay{
  position:fixed;
  inset:0;
  z-index:200;
  background: rgba(0,0,0,.35);
  display:flex;
  justify-content:flex-end;
  opacity:0;
  pointer-events:none;
  transition: opacity 220ms ease;
  backdrop-filter: blur(2px);
}
.slideOverlay.open{ opacity:1; pointer-events:auto; }
.slidePanel{
  width: min(520px, 92vw);
  height: 100%;
  background: rgba(17,24,39,.97);
  border-left: 1px solid rgba(255,255,255,.12);
  box-shadow: -10px 0 30px rgba(0,0,0,.35);
  transform: translateX(110%);
  transition: transform 220ms ease;
  display:flex;
  flex-direction:column;
}
.slidePanel.open{ transform: translateX(0%); }

.slideHeader{
  padding:14px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  border-bottom: 1px solid rgba(255,255,255,.10);
}

.aboutBody{
  padding:14px;
  display:flex;
  gap:12px;
  overflow:auto;
}
.aboutLeft{ flex:0 0 150px; }
.aboutRight{ flex:1 1 auto; }

.aboutPicWrap{
  width:150px;
  height:150px;
  border-radius:16px;
  overflow:hidden;
  border:1px solid rgba(255,255,255,.12);
  background: rgba(0,0,0,.25);
}
.aboutPicWrap img{
  width:100%;
  height:100%;
  object-fit:cover;
  user-select:none;
}

.aboutCard{
  margin-top:12px;
  padding:10px;
  border-radius:14px;
  border:1px solid rgba(255,255,255,.10);
  background: rgba(0,0,0,.20);
}

.aboutPre{ white-space: pre-line; }

.favPreviewWrap{
  width:64px;
  height:64px;
  border-radius:14px;
  overflow:hidden;
  border:1px solid rgba(255,255,255,.12);
  background: rgba(0,0,0,.25);
  display:flex;
  align-items:center;
  justify-content:center;
}
.favPreviewWrap img{
  width:64px;
  height:64px;
  object-fit:cover;
  user-select:none;
}

@media (prefers-reduced-motion: reduce){
  .btn, .pageNumBtn, .tile, .editBtn, .delBtn, .modal, .modalBox, .slideOverlay, .slidePanel, .brand, .link{
    transition: none !important;
  }
}
