/* ==========================================================================
   MiniClip Classic - main stylesheet
   Fixed 970px layout reconstructed from 2008-2009 screenshots.
   Measurements (px) are noted next to the rules they come from.
   ========================================================================== */

/* Tahoma is used by the original design. Windows and macOS ship it, so it is
   listed first. Other systems use the bundled DejaVu Sans Condensed, whose
   letter widths are within a few % of Tahoma (assets/fonts/DejaVu-LICENSE.txt). */
@font-face {
  font-family: "TahomaFallback";
  src: url("../fonts/dejavu-sans-condensed.woff2") format("woff2");
  font-weight: normal;
}
@font-face {
  font-family: "TahomaFallback";
  src: url("../fonts/dejavu-sans-condensed-bold.woff2") format("woff2");
  font-weight: bold;
  size-adjust: 96%;
}

html { background: #333; }
body {
  margin: 0;
  background: #333;
  color: #000;
  font: 11px/1.2 Tahoma, TahomaFallback, Verdana, "DejaVu Sans", sans-serif;
  -webkit-text-size-adjust: 100%;
}
a { color: #003366; }
a:hover { color: #0066cc; }
img { border: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
p { margin: 0; }
h1, h2, h3 { margin: 0; font-size: inherit; }
button, input, select { font-family: inherit; }

/* ---------- page shell ---------- */
#page {
  width: 970px;
  margin: 0 auto;
  background: #fff;
  border-radius: 0 0 6px 6px;
  padding-bottom: 5px;
  position: relative;
}

/* ---------- header: logo + tabs (63px tall) ---------- */
#hdr { position: relative; height: 114px; }
#hdr .top { position: relative; height: 63px; }
#logo { position: absolute; left: 12px; top: 1px; width: 240px; height: 52px; display: block; }
#logo img { display: block; }

#tabs { position: absolute; left: 250px; top: 26px; height: 42px; z-index: 2; }
#tabs li { float: left; margin-right: 2px; height: 37px; border-radius: 8px 8px 0 0; padding: 5px 5px 0; box-sizing: border-box; }
#tabs li a {
  display: block; height: 32px; box-sizing: border-box;
  border-radius: 5px 5px 0 0;
  color: #fff; font-size: 13px; line-height: 34px;
  position: relative; white-space: nowrap;
}
#tabs li a .ti { position: absolute; }
#tabs .t-games   { width: 107px; background: #cfe7f9; }
#tabs .t-games a { background: #0099ff; padding-left: 43px; }
#tabs .t-games .ti { left: 5px; top: 11px; }
#tabs .t-players   { width: 104px; background: #fdd8c0; }
#tabs .t-players a { background: #ff6600; padding-left: 41px; }
#tabs .t-players .ti { left: 5px; top: 4px; }
#tabs .t-sketch   { width: 124px; background: #cfd9ee; }
#tabs .t-sketch a { background: #7d9fd4; padding-left: 40px; }
#tabs .t-sketch .ti { left: -2px; top: -10px; }
#tabs li.on { height: 42px; }
#tabs li.on a { height: 37px; line-height: 38px; font-weight: bold; text-decoration: none; }
#tabs li.on a::after {
  content: ""; position: absolute; left: 2px; right: 2px; bottom: 0; height: 1px;
  background: repeating-linear-gradient(90deg, #fff 0 1px, transparent 1px 3px);
}
#tabs li a:hover { color: #ffffcc; }

/* ---------- nav bar (51px: 5 ring + 3 blue + 35 inner + 3 blue + 5 ring) ---------- */
#nav {
  margin: 0 5px; height: 51px; box-sizing: border-box;
  padding: 5px 4px 5px 4px;
  background: #d0ebfb;
  border-radius: 8px;
  position: relative; z-index: 1;
}
#navin {
  height: 41px; box-sizing: border-box;
  border: 3px solid #0099ff; border-radius: 6px;
  background: #0099ff;
  display: flex;
}
#navlinks {
  flex: 0 0 509px; height: 31px; margin: 2px 0 0 2px;
  border-radius: 4px 0 0 4px;
  background: linear-gradient(#f3fbff 0, #e9f7ff 45%, #c8eafe 55%, #bfe6fd 100%);
  display: flex; align-items: center;
  padding-left: 6px; box-sizing: border-box;
}
#navlinks li { display: flex; align-items: center; height: 31px; }
#navlinks li + li::before {
  content: ""; display: block; width: 1px; height: 22px; margin: 0 6px 0 7px;
  background: repeating-linear-gradient(#3aa6e6 0 1px, transparent 1px 3px);
}
#navlinks a { font-weight: bold; font-size: 11px; }
#navlinks a.on { color: #1a8fe0; text-decoration: none; }

#more { position: relative; flex: 0 0 100px; margin: 2px 0 0 3px; height: 31px; }
#more > a {
  display: block; height: 31px; line-height: 30px; box-sizing: border-box;
  padding-right: 22px; text-align: right;
  color: #fff; font-weight: bold;
  background: linear-gradient(#90d9ff 0, #72c5fa 45%, #22a4fc 55%, #0f9dff 100%);
}
#more > a::after {
  content: ""; position: absolute; right: 9px; top: 14px;
  border: 4px solid transparent; border-top: 4px solid #fff; border-bottom: 0;
}
#moremenu {
  display: none; position: absolute; right: -2px; top: 33px; width: 260px; z-index: 50; columns: 2; column-gap: 0;
  background: #fff; border: 2px solid #0099ff; border-radius: 0 0 5px 5px;
  padding: 3px 0; box-shadow: 2px 2px 3px rgba(0,0,0,.35);
}
#more.open #moremenu { display: block; }
#moremenu a { display: block; padding: 2px 6px 2px 20px; font-weight: bold; position: relative; break-inside: avoid; white-space: nowrap; }
#moremenu a::before { content: ""; position: absolute; left: 7px; top: 5px; width: 7px; height: 7px; border-radius: 50%; background: #0099ff; }
#moremenu a:hover { background: #ccebff; }

#finder {
  flex: 0 0 323px; margin-left: 7px; height: 35px;
  background: #e5f5ff; border-radius: 3px;
  display: flex; box-sizing: border-box; padding: 1px 0 0 8px;
}
#finder label { display: block; font-weight: bold; font-size: 11px; line-height: 12px; height: 13px; white-space: nowrap; }
#finder .ff1 { width: 150px; }
#finder .ff1 select { width: 140px; height: 17px; font-size: 11px; padding: 0 0 0 2px; border: 1px solid #7a7a7a; background: #fff; border-radius: 0; margin-top: 1px; }
#finder .ff2 { border-left: 1px dotted #3aa6e6; padding-left: 8px; margin: 3px 0 3px; height: 29px; }
#finder .ff2 label { margin-top: -3px; }
#finder .ff2 form { display: flex; margin-top: 1px; }
#finder .ff2 input { width: 103px; height: 19px; box-sizing: border-box; border: 1px solid #7a7a7a; font-size: 11px; padding: 1px 3px; }
#finder .ff2 button {
  margin-left: 4px; width: 27px; height: 20px; padding: 0; font-size: 11px; margin-top: -1px;
  border: 1px solid #707070; border-radius: 2px; background: linear-gradient(#f6f6f6, #dcdcdc); cursor: pointer;
}
#finder .ff2 button:active { background: linear-gradient(#dcdcdc, #f6f6f6); }

/* ---------- content columns ---------- */
.cols { display: flex; padding: 10px 5px 0; align-items: flex-start; }
#lcol { width: 630px; flex: 0 0 630px; background: #cceeff; border-radius: 6px; padding-bottom: 0; }
#rcol { width: 324px; flex: 0 0 324px; margin-left: 6px; }

.lwrap { padding: 5px 5px 0; }
.lwrap.top2 { display: flex; padding-right: 8px; }

/* blue panels (Latest Games / Hot Games): 335px tall */
.bpanel { background: #0099ff; border-radius: 6px; height: 335px; box-sizing: border-box; position: relative; }
.bpanel.latest { width: 411px; }
.bpanel.hot { width: 203px; margin-left: 3px; }
.bhead { height: 30px; position: relative; }
.bhead a { color: #fff; }
.bhead > a:first-of-type { position: absolute; top: 6px; font: bold 16px/19px Tahoma, TahomaFallback, Verdana, sans-serif; }
.latest .bhead > a:first-of-type { left: 46px; }
.hot .bhead > a:first-of-type { left: 36px; }
.bhead .bico { position: absolute; }
.latest .bico { left: 12px; top: 8px; }
.hot .bico { left: 10px; top: 4px; }
.bhead .viewall { position: absolute; right: 7px; top: 11px; font-weight: bold; font-size: 10px; }

.feature { display: flex; padding: 0 0 0 10px; }
.fbox { width: 296px; height: 295px; background: #fff; border-radius: 4px; position: relative; box-sizing: border-box; padding: 4px 4px 0; }
.fimg { display: block; width: 274px; height: 199px; background: #eee; overflow: hidden; }
.fimg img { display: block; width: 274px; height: 199px; }
.finfo { position: relative; height: 57px; padding: 5px 0 0 4px; box-sizing: border-box; }
.ftitle { font-weight: bold; font-size: 11px; display: inline-block; margin-top: 1px; }
.fdesc { width: 170px; line-height: 13px; margin-top: 0; }
.playnow { position: absolute; right: 6px; top: 26px; font-weight: bold; font-size: 11px; padding-left: 31px; line-height: 24px; }
.playnow .pn-ico { position: absolute; left: 0; top: 0; width: 24px; height: 24px; background: url(../icons/playnow.png) no-repeat 0 0 / 24px 24px; }
.pager {
  position: absolute; left: 4px; right: 4px; bottom: 5px; height: 21px;
  background: #e5f5ff; border: 1px solid #99d6ff; border-radius: 4px; box-sizing: border-box;
}
.pager a { position: absolute; top: 3px; }
.pager .prev { left: 5px; padding-left: 15px; }
.pager .next { right: 5px; padding-right: 15px; }
.pager .arr { position: absolute; top: 0; width: 12px; height: 12px; background: url(../icons/circle-arrows.png) no-repeat 0 0 / 24px 12px; }
.pager .arr.l { left: 0; background-position: -12px 0; }
.pager .arr.r { right: 0; background-position: 0 0; }
.pager .nums { position: absolute; left: 118px; top: 2px; }
.pager .nums a, .pager .nums b { position: static; display: inline-block; min-width: 14px; height: 14px; line-height: 14px; text-align: center; margin: 0 3px; font-weight: bold; }
.pager .nums b { background: #3d95f0; color: #fff; border-radius: 2px; }

.fthumbs { width: 91px; margin-left: 5px; }
.fthumbs .tb { width: 91px; height: 95px; margin-bottom: 5px; padding-left: 12px; }

/* white thumb boxes inside blue panels */
.tb { background: #fff; border-radius: 4px; box-sizing: border-box; padding: 4px 0 0 11px; overflow: hidden; }
.tb a { display: block; width: 72px; line-height: 13px; }
.tb img, .thumb {
  display: block; width: 68px; height: 57px; border: 1px solid #000; background: #cde;
  object-fit: cover; margin-bottom: 3px;
}
.hotgrid { display: flex; flex-wrap: wrap; padding: 0 0 0 10px; }
.hotgrid .tb { width: 88px; height: 95px; margin: 0 8px 5px 0; }
.hotgrid .tb:nth-child(2n) { margin-right: 0; }

/* badges (NEW / HOT) */
.tbw { position: relative; display: block; }
.badge {
  position: absolute; top: -3px; right: -4px; z-index: 1;
  font: bold 9px/11px Verdana, TahomaFallback, sans-serif; color: #fff; padding: 0 3px;
  border-radius: 2px; border: 1px solid #fff; box-shadow: 0 1px 1px rgba(0,0,0,.4);
  text-decoration: none; letter-spacing: 0;
}
.badge.new { background: linear-gradient(#ff8a3d, #ff5500); }
.badge.hot { background: linear-gradient(#ff5a5a, #d10000); }
.badge.top { background: linear-gradient(#6fc6ff, #0077dd); }

/* wide promo */
.lwrap.promo { padding-top: 5px; }
.widebanner { display: block; background: #fff; border-radius: 5px; padding: 4px 4px 4px 4px; width: 612px; height: 77px; }
.widebanner img { display: block; }

/* category boxes: 3 x 203px white boxes */
.catboxes { display: flex; flex-wrap: wrap; padding: 6px 0 0 5px; }
.catbox { width: 203px; height: 221px; background: #fff; border-radius: 5px; margin: 0 5px 5px 0; box-sizing: border-box; padding: 9px 10px 0; position: relative; }
.catbox:nth-child(3n) { margin-right: 0; }
.chead { height: 16px; background: #cdeaff; border: 1px solid #99d6ff; border-radius: 4px; line-height: 16px; padding-left: 6px; margin: 0 -2px 0 0; }
.chead a { color: #000; font-weight: bold; font-size: 11px; }
.cthumbs { display: flex; margin-top: 4px; }
.cthumbs .ct { width: 89px; height: 96px; box-sizing: border-box; background: #e7f6ff; border: 1px solid #99d6ff; border-radius: 5px; padding: 5px 0 0 9px; margin-right: 5px; }
.cthumbs .ct:last-child { margin-right: 0; }
.ct a { display: block; width: 76px; line-height: 13px; }
.clinks { margin-top: 5px; padding-left: 2px; }
.clinks li { height: 15px; line-height: 15px; padding-left: 16px; position: relative; }
.clinks li::before { content: ""; position: absolute; left: 0; top: 2px; width: 11px; height: 11px; background: url(../icons/bullet-orange.png) no-repeat 0 0 / 11px 11px; }
.cmore { position: absolute; left: 12px; bottom: 10px; padding-left: 16px; font-weight: bold; }
.cmore::before { content: ""; position: absolute; left: 0; top: 1px; width: 11px; height: 11px; background: url(../icons/bullet-blue.png) no-repeat 0 0 / 11px 11px; }

/* ---------- right column ---------- */
.adbox { height: 260px; background: #cceeff; border-radius: 5px; position: relative; padding: 3px; box-sizing: border-box; }
.adslot { width: 300px; height: 250px; border: 2px solid #e8e8e8; background: #efefef; }
.adslot img { display: block; }
.adlabel { position: absolute; right: 3px; top: 3px; width: 14px; height: 80px; background: #fff; border-radius: 0 0 4px 4px; }
.adlabel span {
  position: absolute; left: 13px; top: 4px; transform-origin: 0 0; transform: rotate(90deg);
  font: 10px/12px Verdana, TahomaFallback, sans-serif; color: #000; white-space: nowrap;
}
.adlabel span::after { content: ""; display: inline-block; margin-left: 3px; border: 3px solid transparent; border-top-color: #000; border-bottom: 0; vertical-align: 2px; }

.smallbanner { display: block; margin-top: 4px; height: 76px; box-sizing: border-box; background: #0099ff; border-radius: 6px; padding: 5px; }
.smallbanner img { display: block; border-radius: 2px; }

.opanel { margin-top: 5px; background: #ffcc77; border-radius: 6px; padding: 5px; }
.ohead { height: 20px; line-height: 20px; background: #ff9900; border-radius: 5px; color: #fff; font-weight: bold; padding-left: 7px; font-size: 11px; }
.obody { background: #fff; border-radius: 5px; margin-top: 4px; }
.opanel.topten { margin-top: 6px; }
.topten .obody { height: 188px; padding: 5px 4px 0 8px; box-sizing: border-box; display: flex; }
.tlist { width: 141px; flex: 0 0 141px; counter-reset: tt; }
.tlist li { height: 16px; line-height: 16px; position: relative; padding-left: 28px; border: 1px solid transparent; margin-right: 1px; white-space: nowrap; overflow: hidden; }
.tlist li::before { counter-increment: tt; content: counter(tt) "."; position: absolute; left: 0; width: 23px; text-align: right; font-weight: bold; }
.tlist li.sel { background: #e5f5ff; border-color: #99d6ff; border-radius: 3px; }
.tprev { width: 158px; flex: 0 0 158px; height: 174px; background: #e5f5ff; border: 1px solid #99d6ff; border-radius: 3px; box-sizing: border-box; padding: 3px; margin-left: 3px; }
.tprev img { display: block; width: 148px; height: 107px; border: 1px solid #000; object-fit: cover; }
.tprev a.tt { display: block; font-weight: bold; font-size: 13px; margin-top: 1px; }
.tprev p { line-height: 13px; }

.twin { display: flex; }
.ohalf.played { width: 145px; }
.ohalf.mine { width: 162px; margin-left: 7px; }
.twin .obody { height: 97px; box-sizing: border-box; padding: 3px 6px; overflow: hidden; line-height: 13px; }
.twin .obody ul li { height: 17px; line-height: 17px; padding-left: 16px; position: relative; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.twin .obody ul li::before { content: ""; position: absolute; left: 0; top: 3px; width: 11px; height: 11px; background: url(../icons/bullet-orange.png) no-repeat 0 0 / 11px 11px; }

/* Sudoku / Mahjong daily promo */
.dailybox { margin-top: 5px; height: 100px; background: #0099ff; border-radius: 6px; padding: 5px; box-sizing: border-box; position: relative; overflow: hidden; }
.dailybox > a { position: absolute; top: 5px; width: 155px; height: 68px; text-decoration: none; }
.daily-l { left: 5px; background: #19b0ff url(../banners/daily-sudoku.png) no-repeat; }
.daily-r { right: 5px; width: 158px !important; background: #6b0f0f url(../banners/daily-mahjong.png) no-repeat; }
.dname { position: absolute; top: 0; height: 26px; line-height: 24px; background: #fff; border: 1px solid #b9d9ee; border-top: 0; border-radius: 0 0 4px 4px; font: bold 19px/24px Tahoma, TahomaFallback, Verdana, sans-serif; text-decoration: underline; padding: 0 8px; }
.daily-l .dname { left: 52px; color: #1d3f6e; }
.daily-r .dname { left: 18px; color: #ff9900; }
.dplay {
  position: absolute; top: 37px; height: 20px; line-height: 20px; padding: 0 17px 0 7px;
  color: #fff; font: bold 13px/20px Tahoma, TahomaFallback, Verdana, sans-serif; letter-spacing: .3px;
  background: linear-gradient(#ff7a57 0, #f0422a 50%, #d9280f 51%, #e2381c 100%);
  border: 1px solid #b31a05; border-radius: 3px;
}
.dplay::after { content: ""; position: absolute; right: 5px; top: 5px; border: 5px solid transparent; border-left: 7px solid #fff; border-right: 0; }
.daily-l .dplay { left: 34px; }
.daily-r .dplay { left: 18px; }
.dfoot {
  position: absolute; left: 5px; right: 5px; bottom: 5px; height: 22px;
  background: linear-gradient(#233f7c, #122a5c); color: #fff; font: bold 13px/22px Tahoma, TahomaFallback, Verdana, sans-serif; text-align: center;
}

/* ---------- All Categories + Full Games List ---------- */
#allgames { margin: 5px 5px 0; background: #e5f5ff; border-radius: 6px; padding: 0 6px 5px 5px; }
.hidebar { height: 23px; line-height: 27px; text-align: center; }
.hidebar a { position: relative; }
.hidebar .dn { display: inline-block; width: 0; height: 0; border: 3px solid transparent; border-top: 4px solid #000; margin: 0 97px; vertical-align: 1px; }
.hidebar .dn:first-child { margin-left: 0; margin-right: 85px; }
.hidebar .dn:last-child { margin-right: 0; margin-left: 85px; }
.agcols { display: flex; align-items: stretch; }
.agcols.hidden { display: none; }
.side { width: 168px; flex: 0 0 168px; }
.full { flex: 1; min-width: 0; margin-left: 5px; display: flex; flex-direction: column; }
.full .fullbox { flex: 1; margin-bottom: 5px; display: flex; flex-direction: column; }
.full .fullbox .legend { margin-top: auto; padding-top: 10px; }
.shead { height: 19px; line-height: 19px; background: #0099ff; color: #fff; font-weight: bold; font-size: 11px; padding-left: 7px; border-radius: 5px; }
.catlist { background: #fff; border-radius: 5px; margin: 5px 0; padding: 5px 5px 3px; }
.catlist li { height: 20px; margin-bottom: 2px; border-radius: 3px; background: #ccebff; line-height: 20px; }
.catlist li:nth-child(2n) { background: #e5f5ff; }
.catlist li a { display: block; padding-left: 20px; font-weight: bold; font-size: 12px; position: relative; }
.catlist li a::before { content: ""; position: absolute; left: 5px; top: 4px; width: 12px; height: 12px; background: url(../icons/circle-arrows.png) no-repeat 0 0 / 24px 12px; }
.catlist li a .n { font-weight: normal; font-size: 10px; color: #555; }
.fullbox { background: #fff; border-radius: 5px; margin-top: 5px; padding: 7px 5px 8px 7px; }
.fullcols { display: flex; }
.fullcols ul { width: 110px; flex: 0 0 110px; }
.fullcols ul:last-child { flex: 1 1 auto; width: auto; min-width: 0; }
.fullcols li { height: 12px; line-height: 12px; font-size: 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding-right: 3px; }
.fullcols li.l { font-weight: bold; }
.fullcols a.c { color: #ff3300; }
.legend { margin-top: 10px; padding-left: 0; color: #333; }
.legend .o { color: #ff6600; font-weight: bold; }
.legend .b { color: #003366; font-weight: bold; }

/* ---------- footer ---------- */
#ftr { width: 970px; margin: 5px auto 20px; }
.footbox { background: #424241; border: 1px solid #999; border-radius: 6px; color: #fff; padding: 0 8px; }
.footbox a { color: #fff; }
.langs { height: 29px; line-height: 29px; border-bottom: 1px dotted #888; white-space: nowrap; overflow: hidden; }
.langs b { margin-right: 9px; }
.langs a, .langs span.cur { margin-right: 4px; }
.langs .flag { display: inline-block; width: 16px; height: 11px; vertical-align: -1px; margin-right: 3px; background: url(../flags/flags.png) no-repeat 0 0 / 16px 143px; }
.fwelcome { text-align: center; padding: 8px 20px 8px; line-height: 13px; border-bottom: 1px dotted #888; }
.flinks { text-align: center; padding: 11px 0 8px; }
.flinks .sep { color: #aaa; margin: 0 7px; }
.flinks .rss { display: inline-block; width: 12px; height: 12px; background: url(../icons/rss.png) no-repeat 0 0 / 12px 12px; vertical-align: -2px; margin-right: 4px; }
.fcopy { text-align: center; color: #aaa; padding: 3px 0 10px; }
.fcopy a { color: #aaa; }

/* ---------- misc ---------- */
.hide { display: none !important; }
.stars { display: inline-block; width: 55px; height: 11px; background: url(../icons/stars.png) repeat-x 0 0 / 11px 22px; vertical-align: -1px; position: relative; }
.stars i { display: block; height: 11px; background: url(../icons/stars.png) repeat-x 0 -11px / 11px 22px; }
.stars.rate { cursor: pointer; }
.stars.rate b { position: absolute; top: 0; width: 11px; height: 11px; }
.empty { color: #666; }

/* ==========================================================================
   Inner pages - built from the same panels as the homepage
   ========================================================================== */
#lcol.inner { padding-bottom: 5px; }
.ipanel { background: #0099ff; border-radius: 6px; margin: 5px 5px 0; padding: 0 10px 10px; }
.ipanel .bhead { height: 30px; }
.ipanel .bhead h1 { position: absolute; left: 0; top: 6px; margin: 0; font: bold 16px/19px Tahoma, TahomaFallback, Verdana, sans-serif; color: #fff; }
.ipanel .bhead h1 .cnt { font-size: 11px; font-weight: normal; margin-left: 6px; }
.ipanel .bhead .bico + h1 { left: 36px; }
.ipanel .bhead .bico { left: 0; top: 7px; }
.ipanel .bhead .right { position: absolute; right: 0; top: 10px; color: #fff; font-size: 11px; font-weight: bold; }
.ipanel .bhead .right a { color: #fff; }
.ibody { background: #fff; border-radius: 4px; padding: 8px; min-height: 60px; }
.ibody + .ibody { margin-top: 6px; }
.ibody h2 { font-size: 12px; color: #003366; margin: 0 0 5px; }
.ibody p { line-height: 14px; margin: 0 0 6px; }
.catdesc { color: #333; margin: 0 0 8px; line-height: 14px; }

.sortbar { height: 21px; background: #e5f5ff; border: 1px solid #99d6ff; border-radius: 4px; box-sizing: border-box; line-height: 19px; padding: 0 6px; margin-bottom: 8px; white-space: nowrap; }
.sortbar b { margin-right: 4px; }
.sortbar a { margin: 0 3px; font-weight: bold; }
.sortbar a.on { color: #1a8fe0; text-decoration: none; }
.sortbar .view { float: right; }

.gcards { display: flex; flex-wrap: wrap; justify-content: space-between; }
.gcard {
  width: 289px; height: 71px; box-sizing: border-box; margin-bottom: 6px; position: relative;
  background: #e7f6ff; border: 1px solid #99d6ff; border-radius: 5px; padding: 5px 5px 0 6px; display: flex;
}
.gcard:hover { background: #d6efff; }
.gcard .tbw { flex: 0 0 70px; height: 59px; }
.gcard .gi { margin-left: 8px; min-width: 0; flex: 1; }
.gcard .gt { font-weight: bold; font-size: 12px; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gcard p { line-height: 12px; height: 24px; overflow: hidden; margin: 1px 0 3px; color: #222; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.gcard .meta { font-size: 10px; color: #555; white-space: nowrap; }
.gcard .meta a { color: #555; }
.gcard .fav { position: absolute; right: 5px; bottom: 4px; font-size: 10px; font-weight: bold; }
.gcard .fav.on { color: #d0306a; }
.gcards.compact .gcard { width: 184px; }
.nores { padding: 10px 4px; line-height: 16px; }
.nores ul { margin: 6px 0 0 16px; list-style: disc; }

.ipager { position: relative; height: 21px; background: #e5f5ff; border: 1px solid #99d6ff; border-radius: 4px; box-sizing: border-box; text-align: center; line-height: 19px; margin-top: 2px; }
.ipager .prev, .ipager .next { position: absolute; top: 0; }
.ipager .prev { left: 6px; padding-left: 15px; }
.ipager .next { right: 6px; padding-right: 15px; }
.ipager .arr { position: absolute; top: 3px; width: 12px; height: 12px; background: url(../icons/circle-arrows.png) no-repeat 0 0 / 24px 12px; }
.ipager .prev .arr { left: 0; background-position: -12px 0; }
.ipager .next .arr { right: 0; }
.ipager .dis { color: #999; text-decoration: none; cursor: default; }
.ipager .nums a, .ipager .nums b { display: inline-block; min-width: 14px; height: 14px; line-height: 14px; margin: 0 3px; font-weight: bold; }
.ipager .nums b { background: #3d95f0; color: #fff; border-radius: 2px; }

/* category overview page: reuse the homepage category boxes */
.catboxes.all { padding: 5px 0 0 5px; }

/* side list panel (All Categories) inside the right column */
.opanel.cats .obody { padding: 5px; }
.opanel.cats .catlist { margin: 0; padding: 0; }

/* ---------- game page ---------- */
.gamewrap { margin: 10px 5px 0; background: #0099ff; border-radius: 6px; padding: 0 10px 10px; }
.gamewrap .bhead { height: 32px; }
.gamewrap .bhead h1 { position: absolute; left: 36px; top: 6px; margin: 0; font: bold 18px/20px Tahoma, TahomaFallback, Verdana, sans-serif; color: #fff; white-space: nowrap; }
.gamewrap .bhead .bico { left: 0; top: 9px; }
.gamewrap .bhead .crumbs { position: absolute; right: 0; top: 11px; color: #fff; font-size: 11px; }
.gamewrap .bhead .crumbs a { color: #fff; font-weight: bold; }
.stagebox { background: #fff; border-radius: 4px; padding: 10px; text-align: center; }
.player {
  position: relative; margin: 0 auto; background: #000; border: 1px solid #000;
  box-shadow: 0 0 0 4px #e5f5ff, 0 0 0 5px #99d6ff; max-width: 100%;
}
.player iframe, .player ruffle-player, .player ruffle-object, .player .ruffle-host { display: block; width: 100%; height: 100%; border: 0; }
.player .ruffle-host > * { width: 100% !important; height: 100% !important; }
.player:fullscreen { width: 100vw !important; height: 100vh !important; border: 0; box-shadow: none; background: #000; }
.player:-webkit-full-screen { width: 100vw !important; height: 100vh !important; }
.player.fs-fallback { position: fixed !important; inset: 0; width: 100vw !important; height: 100vh !important; z-index: 1000; border: 0; box-shadow: none; }
.loader {
  position: absolute; inset: 0; z-index: 3; display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: radial-gradient(circle at 50% 40%, #1f6fd0, #06285a); color: #fff; font: bold 13px Tahoma, TahomaFallback, Verdana, sans-serif;
}
.loader .lt { font-size: 22px; margin-bottom: 4px; text-shadow: 0 2px 0 rgba(0,0,0,.4); }
.loader .ls { font-weight: normal; margin-bottom: 14px; color: #bfe6ff; }
.loader .bar { width: 260px; height: 16px; border: 2px solid #fff; border-radius: 9px; overflow: hidden; background: rgba(0,0,0,.35); }
.loader .bar i { display: block; height: 100%; width: 0; background: linear-gradient(#ffd24a, #ff8a00); transition: width .25s; }
.loader .pc { margin-top: 6px; font-size: 11px; }
.loader .gobtn { margin-top: 14px; }
.loader.err { background: radial-gradient(circle at 50% 40%, #8a2a2a, #3a0a0a); }
.loader.err .ls { color: #ffd0d0; max-width: 420px; line-height: 16px; }
.gtools { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 6px 10px; margin-top: 12px; }
.btn {
  display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 10px; box-sizing: border-box;
  border: 1px solid #1f6fc0; border-radius: 12px; color: #fff; font: bold 11px Tahoma, TahomaFallback, Verdana, sans-serif; text-decoration: none; cursor: pointer;
  background: linear-gradient(#8fd9ff 0, #4ab2fb 48%, #1a95f0 52%, #0f84e0 100%); text-shadow: 0 1px 0 rgba(0,0,0,.25);
}
.btn:hover { color: #fff; background: linear-gradient(#a8e3ff 0, #62befd 48%, #2aa0f5 52%, #1a90ea 100%); }
.btn.orange { border-color: #c86400; background: linear-gradient(#ffd07a 0, #ffa32a 48%, #ff8a00 52%, #f27a00 100%); }
.btn.orange:hover { background: linear-gradient(#ffdc96 0, #ffb04a 48%, #ff9a1a 52%, #ff8a0a 100%); }
.btn.on { border-color: #b01a4a; background: linear-gradient(#ff9ac0 0, #ff5a8a 48%, #e8306a 52%, #d02058 100%); }
.btn img { display: block; }
.rateme { display: inline-flex; align-items: center; gap: 4px; color: #333; font-weight: bold; }
.rstars { display: inline-flex; }
.rstars button { width: 17px; height: 16px; padding: 0; border: 0; background: url(../icons/stars-big.png) no-repeat 1px 0 / 15px 30px; cursor: pointer; }
.rstars button.on { background-position: 1px -15px; }
.gstats { color: #555; }
.gcols { display: flex; align-items: flex-start; padding: 10px 5px 0; }
.gcols .gl { width: 630px; flex: 0 0 630px; }
.gcols .gr { width: 324px; flex: 0 0 324px; margin-left: 6px; }
.infobox { background: #cceeff; border-radius: 6px; padding: 5px; margin-bottom: 6px; }
.infobox .chead { margin: 0 0 5px; }
.infobox .chead b { font-size: 11px; }
.infobox .ib { background: #fff; border-radius: 5px; padding: 8px; line-height: 15px; }
.infobox table { border-collapse: collapse; width: 100%; }
.infobox td { padding: 2px 4px; vertical-align: top; border-bottom: 1px dotted #cde; }
.infobox td:first-child { width: 110px; font-weight: bold; color: #003366; }
.relgrid { display: flex; flex-wrap: wrap; gap: 6px; }
.relgrid .ct { margin: 0; }
.keycap { display: inline-block; min-width: 14px; padding: 0 4px; border: 1px solid #999; border-bottom-width: 2px; border-radius: 3px; background: #f4f4f4; font-size: 10px; line-height: 14px; text-align: center; }

/* ---------- players / my games ---------- */
.stats { display: flex; gap: 6px; margin-bottom: 8px; }
.stats div { flex: 1; background: #e5f5ff; border: 1px solid #99d6ff; border-radius: 5px; text-align: center; padding: 6px 0; }
.stats b { display: block; font-size: 20px; color: #003366; line-height: 24px; }
.hstable { width: 100%; border-collapse: collapse; }
.hstable th { background: #cdeaff; border: 1px solid #99d6ff; padding: 3px 6px; text-align: left; font-size: 11px; }
.hstable td { border-bottom: 1px dotted #bcd; padding: 3px 6px; }
.hstable tr:nth-child(2n) td { background: #f3faff; }
.nick { display: flex; gap: 6px; align-items: center; margin-bottom: 8px; }
.nick input { height: 20px; border: 1px solid #7a7a7a; padding: 0 4px; font-size: 12px; width: 180px; }
.avatars { display: flex; gap: 6px; margin: 4px 0 8px; }
.avatars button { width: 44px; height: 44px; border: 2px solid #99d6ff; border-radius: 6px; background: #e5f5ff; font-size: 26px; line-height: 38px; padding: 0; cursor: pointer; }
.avatars button.on { border-color: #ff8a00; background: #fff3d6; }
.linkbtn { background: none; border: 0; padding: 0; color: #003366; text-decoration: underline; cursor: pointer; font: inherit; }

/* ---------- info pages ---------- */
.info h2 { font-size: 13px; color: #fff; background: #0099ff; border-radius: 4px; padding: 3px 8px; margin: 14px 0 6px; }
.info h2:first-child { margin-top: 0; }
.info p, .info li { line-height: 15px; }
.info ul, .info ol { margin: 4px 0 8px 20px; }
.info ul { list-style: disc; }
.info ol { list-style: decimal; }
.info code, .info pre { font: 11px/14px Consolas, "DejaVu Sans Mono", monospace; background: #f3f8fc; border: 1px solid #cde; border-radius: 3px; }
.info code { padding: 0 3px; }
.info pre { padding: 6px 8px; overflow-x: auto; white-space: pre; }
.loaderror { margin: 10px; padding: 10px 14px; background: #fff3d6; border: 1px solid #ffb13a; border-radius: 6px; line-height: 16px; }
.notfound { text-align: center; padding: 30px 10px; }
.notfound .big { font: bold 60px/64px Tahoma, TahomaFallback, sans-serif; color: #0099ff; text-shadow: 3px 3px 0 #cceeff; }

/* ==========================================================================
   Catalogue additions: status tags, "game currently unavailable" notice,
   the A-Z directory and the Full Games List link.
   ========================================================================== */
.shead .shlink { float: right; margin-right: 7px; color: #fff; font-size: 10px; }
.st { font-size: 9px; font-weight: bold; text-transform: uppercase; white-space: nowrap; }
.st.on { color: #fff; background: #3cb31a; border-radius: 2px; padding: 0 3px; }
.st.off { color: #888; }
b.st { font-size: 10px; }

/* the notice shown in place of the player */
.stagebox.na { text-align: left; }
.unavail { display: flex; align-items: flex-start; gap: 14px; background: linear-gradient(#f2faff, #d9f0ff); border: 1px solid #99d6ff; border-radius: 6px; padding: 10px; }
.unavail .upic { display: block; flex: 0 0 274px; width: 274px; height: 199px; border: 1px solid #000; background: #cde; }
.unavail .utext { flex: 1; min-width: 0; line-height: 15px; }
.unavail .uhead { font: bold 17px/20px Tahoma, TahomaFallback, Verdana, sans-serif; color: #ff6600; text-transform: uppercase; text-shadow: 1px 1px 0 #fff; margin: 2px 0 2px; }
.unavail .usub { font-weight: bold; color: #003366; font-size: 12px; margin-bottom: 8px; }
.unavail p { margin: 0 0 8px; }
.ufacts { border-collapse: collapse; margin-bottom: 10px; }
.ufacts td { padding: 1px 8px 1px 0; }
.owncopy { margin-top: 10px; padding: 6px 8px; background: #fff7e0; border: 1px solid #ffcc66; border-radius: 4px; font-size: 11px; line-height: 14px; }
.owncopy b { color: #cc5200; }
.owncopy .ownrow { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin-top: 5px; }
.owncopy input[type=file] { position: absolute; width: 1px; height: 1px; opacity: 0; }
.owncopy .ownkeep { font-size: 11px; cursor: pointer; }
.owncopy .ownkeep input { vertical-align: -2px; margin: 0 3px 0 0; }
.owncopy .ownmsg:not(:empty) { margin-top: 4px; color: #cc0000; }
.ownnote { margin-top: 6px; font-size: 11px; color: #555; }
.ufacts td:first-child { font-weight: bold; color: #003366; }
.ubtns { display: flex; gap: 8px; flex-wrap: wrap; }

/* A-Z directory */
.azbar { background: #e5f5ff; border: 1px solid #99d6ff; border-radius: 4px; padding: 4px 4px 2px; margin-bottom: 6px; line-height: 0; }
.azbar a, .azbar span { display: inline-block; min-width: 15px; height: 18px; line-height: 18px; margin: 0 1px 2px 0; padding: 0 1px; text-align: center; font-weight: bold; font-size: 11px; border-radius: 3px; vertical-align: top; }
.azbar a { background: linear-gradient(#fff, #d6eeff); border: 1px solid #7cc4f5; text-decoration: none; }
.azbar a:hover { background: linear-gradient(#fff, #bfe4ff); }
.azbar a.on { background: linear-gradient(#5ab8ff, #1a8fe0); border-color: #1a70c0; color: #fff; }
.azbar a:first-child { padding: 0 5px; margin-right: 4px; }
.azbar span.dis { color: #aac; border: 1px solid #d4e6f2; }
.azfilter { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; margin-bottom: 4px; font-size: 11px; }
.azfilter label { font-weight: bold; }
.azfilter select { font-size: 11px; max-width: 190px; }
.azfilter .azcount { margin-left: auto; color: #333; }
.azstats { display: flex; flex-wrap: wrap; gap: 2px 14px; margin: -2px 0 4px; padding: 3px 6px; background: #fff7e0; border: 1px solid #ffcc66; border-radius: 3px; font-size: 11px; color: #333; }
.azstats b { color: #ff6600; }
.azquick { margin-bottom: 4px; font-size: 11px; line-height: 16px; color: #99b; }
.azquick b, .azera b { color: #333; }
.azquick a, .azera a { white-space: nowrap; }
.azquick a.on, .azera a.on { color: #fff; background: #1a8fe0; border-radius: 2px; padding: 0 3px; text-decoration: none; font-weight: bold; }
.azera { color: #99b; }
.azsec { margin-top: 6px; }
.azh { height: 19px; line-height: 19px; margin: 0 0 4px !important; padding: 0 6px; background: #0099ff; color: #fff !important; border-radius: 4px; font-size: 12px !important; }
.azh span { font-weight: normal; font-size: 10px; margin-left: 6px; }
.azh .up { float: right; color: #fff; font-size: 10px; font-weight: normal; }
.azcols { columns: 3; column-gap: 10px; padding: 0 2px; }
.azcols li { break-inside: avoid; font-size: 11px; line-height: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.azrows { display: flex; flex-wrap: wrap; justify-content: space-between; }
.azrows li { width: calc(50% - 5px); box-sizing: border-box; display: flex; align-items: baseline; gap: 6px; padding: 1px 4px; border-bottom: 1px dotted #cde; line-height: 15px; }
.azrows li > a { font-weight: bold; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.azrows .azi { margin-left: auto; font-size: 10px; color: #666; white-space: nowrap; }
.azcols a.c, .azrows a.c { color: #ff3300; }
.azpanel .legend { margin-top: 10px; font-size: 11px; }

/* ==========================================================================
   Tablets and phones. The desktop layout above 980px is untouched - below
   that the fixed 970px page reflows into a single column.
   ========================================================================== */
@media (max-width: 979px) {
  #page, #ftr { width: auto; margin: 0; border-radius: 0; }
  #ftr { margin: 5px 0 0; padding: 0 6px 12px; }
  #hdr { height: auto; }
  #hdr .top { height: 60px; }
  #logo { left: 8px; top: 2px; width: 200px; }
  #logo img { width: 200px; height: auto; }
  #tabs { left: auto; right: 6px; top: 23px; }
  #tabs li { width: auto !important; }
  #tabs li a { padding-right: 8px; }
  #nav { height: auto; margin: 0 4px; }
  #navin { height: auto; flex-wrap: wrap; }
  #navlinks { flex: 1 1 100%; height: auto; min-height: 31px; flex-wrap: wrap; margin: 2px 2px 0; border-radius: 4px 4px 0 0; padding: 3px 6px; }
  #navlinks li { height: 22px; }
  #more { flex: 1 1 100px; margin: 2px 0 0 2px; }
  #finder { flex: 1 1 300px; margin: 2px 0 0 2px; height: auto; padding: 3px 8px; flex-wrap: wrap; gap: 4px 0; }
  #finder .ff1 { width: auto; margin-right: 10px; }
  #finder .ff2 { margin: 0; }
  #moremenu { right: auto; left: 0; }
  .cols { flex-direction: column; padding: 8px 4px 0; }
  #lcol, #rcol { width: auto; flex: 1 1 auto; margin: 0; }
  #lcol { align-self: stretch; }
  #rcol { margin-top: 8px; align-self: stretch; }
  .lwrap.top2 { flex-direction: column; padding-right: 5px; }
  .bpanel { height: auto; padding-bottom: 8px; }
  .bpanel.latest, .bpanel.hot { width: auto; }
  .bpanel.hot { margin: 5px 0 0; }
  .feature { flex-wrap: wrap; padding-right: 10px; }
  .fbox { flex: 1 1 296px; max-width: 100%; height: auto; padding-bottom: 32px; }
  .finfo { height: auto; min-height: 57px; }
  .fimg, .fimg img { width: 100%; height: auto; aspect-ratio: 274 / 199; }
  .fthumbs { width: auto; flex: 1 1 100%; display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 0; }
  .fthumbs .tb { margin: 0; }
  .hotgrid { padding-right: 10px; gap: 6px; }
  .hotgrid .tb, .hotgrid .tb:nth-child(2n) { margin: 0; }
  .widebanner { width: auto; height: auto; }
  .widebanner img { width: 100%; height: auto; }
  .catboxes { padding: 6px 5px 0; gap: 5px; }
  .catbox { flex: 1 1 203px; margin: 0; height: auto; min-height: 221px; padding-bottom: 32px; }
  .catbox:nth-child(3n) { margin: 0; }
  .adbox { width: 324px; max-width: 100%; margin: 0 auto; }
  .smallbanner { max-width: 324px; margin: 4px auto 0; }
  .opanel, .dailybox { max-width: none; }
  .topten .obody { height: auto; padding-bottom: 5px; }
  .tlist { flex: 1; }
  .dailybox { max-width: 324px; margin-left: auto; margin-right: auto; }
  .agcols { flex-direction: column; }
  .side { width: auto; flex: none; }
  .full { margin: 5px 0 0; }
  .fullcols { display: block; columns: 150px; column-gap: 8px; }
  .fullcols ul { width: auto; }
  .fullcols li { break-inside: avoid; }
  .hidebar .dn { margin: 0 8px !important; }
  .langs { height: auto; white-space: normal; line-height: 20px; padding: 4px 0; }
  .flinks { line-height: 20px; }
  .gcard { width: 100%; }
  .gamewrap { margin: 8px 4px 0; padding: 0 6px 8px; }
  .gamewrap .bhead .crumbs { display: none; }
  .stagebox { padding: 6px; }
  .player { width: 100% !important; height: auto !important; }
  .player iframe, .player .ruffle-host { position: absolute; inset: 0; }
  .gcols { flex-direction: column; padding: 8px 4px 0; }
  .gcols .gl, .gcols .gr { width: auto; flex: none; margin: 0; }
  .gcols .gr { margin-top: 8px; }
  .ipanel { margin: 5px 5px 0; }
  .stats { flex-wrap: wrap; }
  .stats div { flex: 1 1 40%; }
  .unavail { flex-direction: column; }
  .unavail .upic { width: 100%; max-width: 274px; height: auto; aspect-ratio: 274 / 199; flex: none; }
  .azcols { columns: 150px; }
  .azrows li { width: 100%; }
  .azfilter .azcount { margin-left: 0; }
}
@media (max-width: 480px) {
  #tabs { position: static; display: flex; padding: 0 4px; height: auto; }
  #tabs li, #tabs li.on { flex: 1; height: 34px; padding: 4px 3px 0; margin-right: 2px; }
  #tabs li a, #tabs li.on a { height: 30px; font-size: 11px; line-height: 34px; padding-left: 32px !important; }
  #tabs .t-sketch .ti { top: -6px; }
  #hdr .top { height: auto; padding-top: 54px; }
  .adbox { transform-origin: 0 0; }
  .catbox { flex-basis: 100%; }
  .gtools { gap: 6px; }
  .rateme { flex-basis: 100%; justify-content: center; }
}
