/*
Theme Name: S8 Blue UI
Theme URI: https://example.com/s8-blue-ui
Author: Custom Theme
Author URI: https://example.com
Description: Blue casino/news portal style WordPress theme with fixed side wallpaper, hero banner, post sidebar, app download block and rich footer.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.6
Requires PHP: 7.4
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: s8-blue-ui
Tags: blog, custom-logo, custom-background, custom-menu, featured-images, two-columns
*/

:root {
  --s8-primary: #079ef2;
  --s8-primary-dark: #0076c9;
  --s8-primary-light: #bff2ff;
  --s8-accent: #ffcc2f;
  --s8-text: #103044;
  --s8-muted: #587a8c;
  --s8-border: rgba(0, 146, 225, 0.35);
  --s8-card: rgba(238, 253, 255, 0.88);
  --s8-white: #fff;
  --s8-radius: 8px;
  --s8-shadow: 0 5px 18px rgba(0, 116, 190, 0.25);
  --s8-wrap: 960px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-width: 320px;
  color: var(--s8-text);
  font-family: Arial, Helvetica, "Microsoft YaHei", sans-serif;
  font-size: 14px;
  line-height: 1.68;
  background:
    radial-gradient(circle at 50% 10%, rgba(255,255,255,.9) 0, rgba(179,237,252,.65) 34%, rgba(91,207,243,.35) 55%, rgba(145,232,255,.9) 100%),
    linear-gradient(180deg, #e9fbff 0%, #91e8ff 45%, #5cc8f0 100%);
  overflow-x: hidden;
}

body::before,
body::after {
  display: none !important;
}

.s8-bg-glow {
  position: fixed;
  inset: 0;
  z-index: -3;
  pointer-events: none;
  background:
    linear-gradient(116deg, transparent 0 12%, rgba(255,255,255,.45) 12.5%, transparent 16%),
    linear-gradient(64deg, transparent 0 76%, rgba(255,255,255,.35) 76.5%, transparent 80%);
}

a { color: var(--s8-primary-dark); text-decoration: none; transition: color .2s ease, opacity .2s ease, transform .2s ease; }
a:hover { color: #005ea9; }
img { max-width: 100%; height: auto; vertical-align: middle; }

.screen-reader-text {
  border: 0;
  clip: rect(1px, 1px, 1px, 1px);
  clip-path: inset(50%);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute !important;
  width: 1px;
  word-wrap: normal !important;
}

.s8-site {
  max-width: var(--s8-wrap);
  margin: 0 auto;
  background: rgba(184, 242, 255, 0.72);
  box-shadow: 0 0 32px rgba(0, 90, 170, .25);
  min-height: 100vh;
}

.s8-topbar {
  background: linear-gradient(180deg, #c8efff, #94dafb);
  padding: 10px 18px 8px;
}

.s8-topbar-inner {
  display: grid;
  grid-template-columns: 205px 1fr auto;
  align-items: center;
  gap: 14px;
}

.s8-logo {
  display: inline-flex;
  align-items: center;
  min-width: 0;
}

.s8-logo img { max-height: 56px; width: auto; }
.s8-logo-text { font-size: 34px; font-weight: 900; letter-spacing: -2px; color: var(--s8-primary-dark); line-height: 1; }
.s8-logo-text small { display: block; font-size: 12px; letter-spacing: 0; color: #136795; text-align: right; }

.s8-search { position: relative; max-width: 340px; justify-self: center; width: 100%; }
.s8-search input[type="search"] {
  width: 100%;
  height: 32px;
  border-radius: 18px;
  border: 1px solid rgba(0, 103, 169, .28);
  background: rgba(255, 255, 255, .52);
  padding: 0 38px 0 15px;
  outline: none;
  box-shadow: inset 0 1px 3px rgba(0,0,0,.08);
}
.s8-search button {
  position: absolute;
  top: 0;
  right: 0;
  height: 32px;
  width: 38px;
  border: 0;
  background: transparent;
  cursor: pointer;
  color: #08374f;
  font-size: 15px;
}

.s8-actions { display: flex; gap: 8px; align-items: center; justify-content: flex-end; }
.s8-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 5px 13px;
  border-radius: 18px;
  border: 2px solid #043d53;
  background: #15e6ff;
  color: #001b29;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  white-space: nowrap;
  box-shadow: 0 2px 0 rgba(0,0,0,.18);
}
.s8-pill:hover { transform: translateY(-1px); color: #001b29; opacity: .92; }

.s8-nav-wrap {
  background: linear-gradient(180deg, #11a9f8, #0090e4);
  border-top: 1px solid rgba(255,255,255,.45);
  border-bottom: 1px solid rgba(0,87,151,.32);
  position: sticky;
  top: 0;
  z-index: 20;
}

.admin-bar .s8-nav-wrap { top: 32px; }

.s8-nav-inner { display: flex; align-items: center; justify-content: center; padding: 0 12px; min-height: 39px; }
.s8-menu-toggle { display: none; border: 0; background: rgba(255,255,255,.18); color: #002e43; font-weight: 900; padding: 8px 14px; border-radius: 8px; }
.s8-menu { list-style: none; display: flex; flex-wrap: wrap; justify-content: center; gap: 0; margin: 0; padding: 0; }
.s8-menu li { position: relative; }
.s8-menu a {
  display: block;
  padding: 11px 13px 10px;
  color: #061f2d;
  font-weight: 800;
  font-size: 12px;
  text-transform: uppercase;
}
.s8-menu a:hover,
.s8-menu .current-menu-item > a { color: #fff; background: rgba(0, 51, 91, .18); }
.s8-menu .sub-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 25;
  list-style: none;
  margin: 0;
  padding: 6px;
  min-width: 190px;
  background: rgba(230, 251, 255, .98);
  border: 1px solid var(--s8-border);
  border-radius: 0 0 var(--s8-radius) var(--s8-radius);
  box-shadow: var(--s8-shadow);
}
.s8-menu li:hover > .sub-menu { display: block; }
.s8-menu .sub-menu a { color: var(--s8-text); border-radius: 6px; }

.s8-main {
  padding: 22px 18px 0;
  background:
    radial-gradient(circle at 50% 18%, rgba(255,255,255,.8), transparent 34%),
    linear-gradient(180deg, rgba(202,249,255,.88), rgba(101,215,245,.6) 55%, rgba(119,220,246,.82));
  position: relative;
  overflow: hidden;
}
.s8-main::before {
  content: "";
  position: absolute;
  left: -40px;
  bottom: 200px;
  width: 640px;
  height: 420px;
  background:
    linear-gradient(125deg, transparent 0 35%, rgba(255,255,255,.55) 36%, transparent 42%),
    linear-gradient(55deg, transparent 0 45%, rgba(255,255,255,.38) 46%, transparent 52%);
  pointer-events: none;
}
.s8-layout { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) 245px; gap: 18px; align-items: start; }
.s8-content { min-width: 0; }

.s8-hero { margin-bottom: 16px; }
.s8-hero img { width: 100%; display: block; border-radius: 3px; box-shadow: 0 2px 8px rgba(0,104,170,.18); }

.s8-icon-row {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
  margin: 14px 0 16px;
}
.s8-icon-card {
  min-height: 70px;
  border-radius: 6px;
  background: linear-gradient(180deg, #fff, #cef4ff);
  border: 1px solid rgba(0, 161, 235, .36);
  box-shadow: 0 2px 7px rgba(0,105,165,.18);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 8px;
  color: #065b9a;
  font-weight: 900;
  font-size: 12px;
}
.s8-icon-card:hover { transform: translateY(-2px); }

.s8-headline-box {
  margin: 16px auto 22px;
  padding: 13px 12px;
  border: 1px solid var(--s8-border);
  background: rgba(216, 250, 255, .66);
  color: #0485df;
  text-align: center;
  text-transform: uppercase;
  font-size: 23px;
  line-height: 1.35;
  font-weight: 900;
}

.s8-intro {
  margin: 18px 0 24px;
  padding-left: 26px;
  border-left: 3px solid #0a75c3;
  color: #16435c;
  font-style: italic;
}


.s8-home-article-panel {
  margin: 0 0 26px;
  border: 2px solid rgba(0, 153, 224, .55);
  border-radius: 10px;
  background: rgba(226, 250, 255, .82);
  box-shadow: 0 0 14px rgba(0, 143, 216, .55), inset 0 0 0 1px rgba(255,255,255,.7);
  overflow: hidden;
}
.s8-home-article-title {
  margin: 0;
  padding: 11px 15px 12px;
  color: #0788df;
  font-size: 23px;
  line-height: 1.25;
  font-weight: 900;
  background: rgba(235, 254, 255, .82);
  border-bottom: 1px solid rgba(0, 153, 224, .32);
}
.s8-home-article-scrollbox {
  max-height: 690px;
  overflow-y: auto;
  padding: 13px 14px 18px;
  background:
    linear-gradient(180deg, rgba(89, 205, 245, .58), rgba(223, 252, 255, .82)),
    radial-gradient(circle at 78% 4%, rgba(255,255,255,.56), transparent 28%);
  scrollbar-width: thin;
  scrollbar-color: #088edf rgba(213, 247, 255, .65);
}
.s8-home-article-scrollbox::-webkit-scrollbar { width: 10px; }
.s8-home-article-scrollbox::-webkit-scrollbar-track {
  background: rgba(213, 247, 255, .65);
  border-radius: 10px;
}
.s8-home-article-scrollbox::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #29bfff, #0378cf);
  border-radius: 10px;
  border: 2px solid rgba(213, 247, 255, .8);
}
.s8-home-article-media {
  margin: 0 0 18px;
  border: 1px solid rgba(0, 156, 224, .55);
  border-radius: 8px;
  overflow: hidden;
  background: rgba(141, 219, 242, .76);
  box-shadow: 0 4px 12px rgba(0, 100, 170, .18);
}
.s8-home-article-media img {
  display: block;
  width: 100%;
  height: auto;
}
.s8-home-article-media figcaption {
  margin: 0;
  padding: 11px 18px 13px;
  text-align: center;
  font-style: italic;
  font-size: 18px;
  color: #0d2737;
  background:
    linear-gradient(135deg, rgba(33, 176, 233, .35) 0 10%, rgba(205, 248, 255, .86) 10% 90%, rgba(33, 176, 233, .35) 90% 100%);
  border-top: 1px solid rgba(0, 153, 224, .44);
}
.s8-home-article-body {
  color: #0d2737;
  font-size: 17px;
  line-height: 1.75;
}
.s8-home-article-body p { margin: 0 0 16px; }
.s8-home-article-body h2,
.s8-home-article-body h3,
.s8-home-article-body h4 {
  color: #0788df;
  margin: 20px 0 10px;
  line-height: 1.35;
}
.s8-home-article-body a { color: #0485df; font-weight: 800; }
.s8-home-article-body img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 3px 11px rgba(0, 109, 179, .18);
}

.s8-card {
  background: var(--s8-card);
  border: 1px solid var(--s8-border);
  border-radius: var(--s8-radius);
  box-shadow: var(--s8-shadow);
  overflow: hidden;
  margin-bottom: 22px;
}
.s8-card-title {
  margin: 0;
  padding: 9px 12px;
  color: #0788df;
  font-size: 20px;
  line-height: 1.25;
  font-weight: 900;
}
.s8-card-media img { display: block; width: 100%; }
.s8-card-body { padding: 14px 13px 18px; }
.s8-card-body p { margin-top: 0; }

.s8-post-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-bottom: 24px; }
.s8-post-card {
  background: rgba(255,255,255,.72);
  border: 1px solid var(--s8-border);
  border-radius: var(--s8-radius);
  overflow: hidden;
  box-shadow: 0 3px 11px rgba(0,108,179,.15);
}
.s8-post-card img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; display: block; }
.s8-post-card h2, .s8-post-card h3 { margin: 0; padding: 10px 11px 4px; font-size: 16px; line-height: 1.35; }
.s8-post-card p { margin: 0; padding: 0 11px 12px; color: #33576b; font-size: 13px; }
.s8-post-meta { padding: 0 11px 8px; color: var(--s8-muted); font-size: 12px; }

.s8-download {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 235px;
  gap: 16px;
  align-items: center;
  padding: 20px 0 36px;
}
.s8-download h2 {
  margin: 0 0 14px;
  border-top: 1px solid rgba(0, 159, 229, .36);
  border-bottom: 1px solid rgba(0, 159, 229, .36);
  display: inline-block;
  padding: 8px 20px;
  color: #198fe2;
  font-size: 22px;
  text-transform: uppercase;
}
.s8-download p { max-width: 430px; }
.s8-download-buttons { display: flex; flex-wrap: wrap; gap: 10px; }
.s8-store-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 132px;
  min-height: 42px;
  padding: 7px 13px;
  border-radius: 8px;
  background: linear-gradient(180deg, #ff77fa, #8454ff);
  color: #fff;
  font-weight: 900;
  text-transform: uppercase;
  box-shadow: 0 4px 0 rgba(63, 37, 143, .36);
}
.s8-store-btn:hover { color: #fff; transform: translateY(-1px); }
.s8-app img { filter: drop-shadow(0 12px 18px rgba(0, 105, 170, .26)); }

.s8-sidebar { min-width: 0; }
.s8-widget { margin-bottom: 18px; }
.s8-widget-title {
  margin: 0 0 10px;
  color: #0b2c3d;
  font-size: 16px;
  text-transform: uppercase;
  border-bottom: 2px solid #0fa5f1;
  padding-bottom: 7px;
}
.s8-recent-item {
  display: block;
  padding: 7px;
  border: 1px solid var(--s8-border);
  border-radius: var(--s8-radius);
  background: rgba(232,252,255,.8);
  box-shadow: 0 3px 9px rgba(0,92,168,.16);
  margin-bottom: 14px;
  text-align: center;
}
.s8-recent-item img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 4px; display: block; }
.s8-recent-item strong { display: block; margin-top: 7px; color: #006fbd; font-size: 13px; line-height: 1.35; }
.s8-recent-item span { display: block; margin-top: 4px; color: #62899b; font-size: 11px; }

.s8-pagination { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; margin: 20px 0 30px; }
.s8-pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 33px;
  height: 33px;
  padding: 0 10px;
  border: 1px solid var(--s8-border);
  background: rgba(255,255,255,.72);
  border-radius: 6px;
  font-weight: 800;
}
.s8-pagination .current { background: var(--s8-primary); color: #fff; }

.s8-article {
  background: rgba(239,253,255,.86);
  border: 1px solid var(--s8-border);
  border-radius: var(--s8-radius);
  box-shadow: var(--s8-shadow);
  padding: 18px;
  margin-bottom: 28px;
}
.s8-article h1 { margin: 0 0 10px; color: #067ed1; font-size: 28px; line-height: 1.25; }
.s8-article .entry-content h2, .s8-article .entry-content h3 { color: #0788df; }
.s8-article .entry-content img { border-radius: 7px; box-shadow: 0 3px 11px rgba(0, 109, 179, .15); }
.s8-article-meta { color: var(--s8-muted); font-size: 13px; margin-bottom: 16px; }
.s8-article-footer { border-top: 1px solid var(--s8-border); padding-top: 12px; margin-top: 18px; color: var(--s8-muted); }

.s8-footer {
  position: relative;
  padding: 38px 18px 0;
  background:
    linear-gradient(180deg, rgba(212,249,255,.94), rgba(117,212,242,.92)),
    radial-gradient(circle at 25% 10%, rgba(255,255,255,.9), transparent 42%);
  border-top: 1px solid rgba(255,255,255,.75);
}
.s8-footer-columns {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr 1.25fr;
  gap: 25px;
  align-items: start;
}
.s8-footer-logo img { max-height: 58px; }
.s8-footer h3 { margin: 0 0 12px; color: #0881d5; font-size: 16px; text-transform: uppercase; }
.s8-footer p, .s8-footer li { color: #244f63; font-size: 13px; }
.s8-footer ul { list-style: none; padding: 0; margin: 0; }
.s8-footer li { margin: 6px 0; }
.s8-social { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.s8-social a {
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #177bc0;
  color: #fff;
  font-weight: 900;
  font-size: 12px;
}
.s8-badges { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 12px; }
.s8-badges span { border: 2px solid #0f8ad8; border-radius: 8px; background: rgba(255,255,255,.7); padding: 8px 10px; color: #0573be; font-weight: 900; font-size: 12px; }
.s8-brand-strip { margin: 26px 0 14px; padding: 14px 10px; text-align: center; color: #4a7184; border-top: 1px solid rgba(0,139,207,.25); border-bottom: 1px solid rgba(0,139,207,.25); font-size: 13px; }
.s8-brand-strip-image { display: block; max-width: 100%; height: auto; max-height: 76px; object-fit: contain; margin: 0 auto; }
.s8-keywords { text-align: center; color: #244f63; font-size: 12px; margin-bottom: 20px; }
.s8-copyright { margin: 0 -18px; padding: 13px 18px; background: #3f3f3f; color: #e3e3e3; text-align: center; font-size: 12px; }

.wp-caption { max-width: 100%; }
.wp-caption-text { color: var(--s8-muted); font-size: 12px; text-align: center; }
.aligncenter { display: block; margin-left: auto; margin-right: auto; }
.alignleft { float: left; margin: 0 16px 12px 0; }
.alignright { float: right; margin: 0 0 12px 16px; }
.gallery { display: grid; gap: 10px; }
.bypostauthor { outline: 1px solid rgba(0, 145, 225, .25); }

@media (max-width: 1180px) {
  body::before, body::after { display: none; }
  .s8-site { max-width: 100%; }
}

@media (max-width: 820px) {
  .admin-bar .s8-nav-wrap { top: 46px; }
  .s8-topbar-inner { grid-template-columns: 1fr; justify-items: center; text-align: center; }
  .s8-actions { justify-content: center; }
  .s8-layout { grid-template-columns: 1fr; }
  .s8-sidebar { order: 2; }
  .s8-icon-row { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .s8-download { grid-template-columns: 1fr; text-align: center; }
  .s8-download p { max-width: none; }
  .s8-download-buttons { justify-content: center; }
  .s8-footer-columns { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  .s8-home-article-title { font-size: 20px; }
  .s8-home-article-scrollbox { max-height: 560px; padding: 10px; }
  .s8-home-article-body { font-size: 15px; }
  .s8-home-article-media figcaption { font-size: 15px; }
  .s8-menu-toggle { display: inline-flex; }
  .s8-nav-inner { justify-content: space-between; padding: 7px 12px; }
  .s8-menu { display: none; width: 100%; flex-direction: column; margin-top: 8px; }
  .s8-menu.is-open { display: flex; }
  .s8-nav-inner { flex-wrap: wrap; }
  .s8-menu li { width: 100%; }
  .s8-menu a { padding: 9px 11px; border-top: 1px solid rgba(255,255,255,.25); }
  .s8-menu .sub-menu { position: static; display: block; box-shadow: none; background: rgba(255,255,255,.25); border: 0; padding-left: 16px; }
}

@media (max-width: 560px) {
  .s8-main { padding: 14px 10px 0; }
  .s8-topbar { padding-left: 10px; padding-right: 10px; }
  .s8-headline-box { font-size: 18px; }
  .s8-icon-row { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .s8-post-grid { grid-template-columns: 1fr; }
  .s8-footer-columns { grid-template-columns: 1fr; }
  .s8-article h1 { font-size: 23px; }
}


.article-toc {
  background: #fff;
  border: 1px solid #9fa8af;
  border-radius: 6px;
  padding: 14px 18px;
  margin: 18px 0;
  color: #444;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .08);
  max-width: 620px;
}

.article-toc-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.article-toc-title {
  color: #111;
  font-size: 24px;
  line-height: 1.25;
  font-weight: 500;
}

.article-toc-toggle {
  width: 42px;
  height: 34px;
  border: 1px solid #999;
  border-radius: 6px;
  background: #fff;
  color: #111;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  flex: 0 0 auto;
}

.article-toc-list,
.article-toc-sublist {
  list-style: none;
  padding: 0;
  margin: 0;
}

.article-toc-list > .article-toc-item {
  margin: 6px 0;
}

.article-toc-sublist {
  margin: 5px 0 5px 28px;
}

.article-toc-sublist .article-toc-item {
  margin: 4px 0;
}

.article-toc-link {
  color: #4b4b4b;
  text-decoration: none;
  font-size: 18px;
  line-height: 1.45;
  font-weight: 400;
}

.article-toc-sublist .article-toc-link {
  font-size: 16px;
}

.article-toc-link:hover {
  color: #0788df;
  text-decoration: underline;
}

.article-toc.is-collapsed .article-toc-list {
  display: none;
}

.article-toc-arrow {
  display: inline-block;
}

@media (max-width: 768px) {
  .article-toc {
    max-width: 100%;
    padding: 12px 14px;
    margin: 16px 0;
  }

  .article-toc-title {
    font-size: 21px;
  }

  .article-toc-toggle {
    width: 38px;
    height: 32px;
    font-size: 16px;
  }

  .article-toc-link {
    font-size: 16px;
  }

  .article-toc-sublist {
    margin-left: 20px;
  }

  .article-toc-sublist .article-toc-link {
    font-size: 15px;
  }
}

body:not(.home) .s8-sidebar {
  display: none !important;
}

body:not(.home) .s8-layout {
  grid-template-columns: minmax(0, 1fr) !important;
}

body:not(.home) .s8-content {
  width: 100% !important;
  max-width: 100% !important;
}

body:not(.home) .s8-article {
  width: 100% !important;
  max-width: 100% !important;
}
