/*
Theme Name: Anime4i
Theme URI: http://anime4i.com
Template: anime4i
Author: Child Theme Configurator
Author URI: https://anime4i.com
Description: child theme for animestream.
Version: 1.5.2
*/

/* =========================================================
   TOKENS (Light / Dark)
   - All global CSS variables in one place
   ========================================================= */
:root {
  --text: #000;
  --text-red: #ff0000;
  --accent: #0c70de;
  --brand: #0ea5e9;

  /* Panel / surface */
  --ps-bg: #f9fafb;
  --ps-fg: #111827;
  --ps-border: rgba(0, 0, 0, .08);

  /* Status chip */
  --ps-status-bg: #eaf3ff;
  --ps-status-fg: #0b3b78;
  --ps-status-border: color-mix(in srgb, var(--accent) 25%, transparent);

  /* Links / buttons */
  --ps-link: color-mix(in srgb, var(--accent) 70%, #0b3b78);
  --ps-btn-bg: #343434;
  --ps-btn-fg: #fff;
  --ps-btn-bg-hover: #111827;
  --ps-btn-bg-active: #2fb344;

  /* Notes */
  --ps-note: #d32f2f;

  /* User-system misc */
  --us-gap: .5rem;
  --us-r: .375rem;
  --us-r-lg: .5rem;
  --us-shadow: 0 2px 8px rgba(0, 0, 0, .08);
  --us-body-bg: var(--ps-bg);
  --us-body-fg: var(--ps-fg);
  --us-line: var(--ps-border);

  /* Generic gray background (used by some widgets) */
  --gg-bg: #fff;
}

body.darkmode {
  --text: #fff;
  --text-red: #ff0000;
  --brand: #38bdf8;

  --ps-bg: #1f2329;
  --ps-fg: #e5e7eb;
  --ps-border: rgba(255, 255, 255, .08);

  --ps-status-bg: #232a34;
  --ps-status-fg: #cfe1ff;
  --ps-status-border: rgba(255, 255, 255, .14);

  --ps-link: color-mix(in srgb, var(--accent) 80%, #cfe1ff);
  --ps-btn-bg: #2b313b;
  --ps-btn-fg: #e5e7eb;
  --ps-btn-bg-hover: #38404a;
  --ps-btn-bg-active: #2fb344;

  --ps-note: #f87171;

  --us-body-bg: var(--ps-bg);
  --us-body-fg: var(--ps-fg);
  --us-line: var(--ps-border);

  --gg-bg: #828282;
}

/* Honor OS dark scheme when site isn't forced to light mode */
@media (prefers-color-scheme: dark) {
  body:not(.lightmode) {
    --ps-bg: #1f2329;
    --ps-fg: #e5e7eb;
    --ps-border: rgba(255, 255, 255, .08);

    --ps-status-bg: #232a34;
    --ps-status-fg: #cfe1ff;
    --ps-status-border: rgba(255, 255, 255, .14);

    --ps-link: color-mix(in srgb, var(--accent) 80%, #cfe1ff);
    --ps-btn-bg: #2b313b;
    --ps-btn-fg: #e5e7eb;
    --ps-btn-bg-hover: #38404a;
    --ps-btn-bg-active: #2fb344;
  }
}

/* Basic anchor reset */
a {
  text-decoration: none !important;
}

/* Raise search overlay */
.searchx.minmbx {
  z-index: 1000000;
}

/* =========================================================
   PLAYER SERVERS (Theme-aware surfaces and buttons)
   ========================================================= */
.player-servers {
  background-color: var(--ps-bg);
  color: var(--ps-fg);
  border: 1px solid var(--ps-border);
  border-radius: 0 0 3px 3px;
  margin-bottom: 30px;
  position: relative;
  overflow: hidden;
  padding: 10px;
}

.player-servers #servers-content {
  display: flex;
  overflow: hidden;
  min-height: 80px;
  flex-wrap: wrap;
  gap: 20px;
}

.player-servers .ps_-status {
  width: 60%;
  background-color: var(--ps-status-bg);
  color: var(--ps-status-fg);
  border: 1px solid var(--ps-status-border);
  border-radius: 5px;
  flex-shrink: 0;
  padding: 10px;
}

.player-servers .ps_-status .server-notice {
  font-size: 16px;
  font-weight: 700;
}

.player-servers .ps_-status .server-notice strong {
  display: block;
  margin-bottom: 5px;
  font-weight: 500;
}

.player-servers .ps_-status .server-notice span {
  color: var(--ps-link);
  text-decoration: underline;
  font-weight: 600;
}

.player-servers .ps_-block {
  display: flex;
  width: 35%;
  flex-wrap: wrap;
  gap: 15px;
  flex-shrink: 0;
  padding: 10px 0;
}

.ps__-list {
  display: flex;
  width: 100%;
  justify-content: center;
  flex-wrap: wrap;
  gap: 15px;
}

.player-servers .ps__-list .itemm .btn,
.ps_-block .server-item .btn {
  display: inline-block;
  width: 100%;
  line-height: 30px;
  text-align: center;
  font-size: 13px;
  font-weight: 500;
  padding: 0 10px;
  border: none !important;
  border-radius: 3px;
  box-shadow: none !important;
  cursor: pointer;
  background-color: var(--ps-btn-bg);
  color: var(--ps-btn-fg);
  transition: background-color .18s ease, color .18s ease, transform .02s ease;
}

.ps_-block .server-item .btn:not(.active):hover {
  background-color: var(--ps-btn-bg-hover);
}

.ps_-block .server-item .btn.active,
.player-servers .ps__-list .itemm .btn.active {
  background-color: var(--ps-btn-bg-active);
  color: #fff;
}

.player-servers .ps__-list .itemm .btn:focus-visible,
.ps_-block .server-item .btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Bookmark (active state color) */
.bookmark.is-bookmarked {
  background: #d52727;
  font-weight: 600;
}

/* Small note highlight */
b.note-c {
  color: #e90000;
}

/* Player servers: responsive layout */
@media (max-width: 768px) {
  .player-servers .ps_-status {
    width: 100%;
  }
  .player-servers .ps_-block {
    width: 100%;
  }
  .ps_-status + .ps_-block {
    margin-top: 12px;
  }
  .player-servers {
    flex-direction: column;
  }
  .player-servers .ps_-status .server-notice {
    position: relative;
    top: auto;
    transform: none;
    padding: 5px;
  }
  .itemm.server-item {
    margin-top: -30px;
    margin-bottom: 10px;
  }
}

/* =========================================================
   UTILITIES & COMPONENTS
   ========================================================= */
.slidtop {
  display: none;
}

.bs .bsx .limit .bt span.epx {
  background-image: linear-gradient(to right, #c5b80d, #ff0b0b 56%, #d96666);
  background-size: 200% 100%;
  background-color: #4b8f11;
  border-radius: 2px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .12);
  text-transform: capitalize;
  transition: .7s;
  padding: 1px 5px;
}

.video-content {
  width: 100%;
  height: 100%;
}

.naveps .nvs {
  flex: 1;
  text-align: center;
}

.naveps.bignav {
  flex: 0 0 60%;
  display: flex;
  margin-bottom: 0;
  justify-content: space-between;
}

.naveps.bignav .nvs .nolink,
.naveps.bignav .nvs a {
  padding-top: 5px;
  padding-bottom: 5px;
}

.warning,
.announ {
  background-color: var(--ps-bg);
  color: #fff;
}

.content {
  color: var(--ps-link);
  font-family: Arial, sans-serif;
}

/* Ad containers */
.z-wrap{max-width:1140px;margin:18px auto}
.row-x{display:flex;flex-wrap:wrap;gap:18px;align-items:flex-start}
.col-x{flex:1 1 340px;}
.box-x{border-radius:14px;padding:12px;text-align:center;}
.slot-x{position:relative;margin:0 auto}
.slot-x.h90{min-height:90px}
.slot-x.h250{min-height:280px} 
.slot-x.h280{min-height:280px} 
@media (max-width:480px){.col-x{flex-basis:100%;min-width:0}}

/* CTA watch button */
.watch-box {
  display: inline-block;
  width: 100%;
  border-radius: 50px;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, .2);
  background-image: linear-gradient(45deg, #f60, #fc0);
  transition: transform .3s, box-shadow .3s, background-color .3s;
  padding: 8px 18px;
  margin-top: 15px;
}

.watch-box a {
  display: flex;
  color: #fff;
  font-size: 18px;
  text-decoration: none;
  font-weight: 700;
  justify-content: center;
  align-items: center;
  flex-wrap: nowrap;
  gap: 10px;
}

.watch-box:hover {
  box-shadow: 0 8px 20px rgba(0, 0, 0, .3);
  background-image: linear-gradient(45deg, #ff4500, #f90);
  transform: translateY(-6px);
}

.watch-box:hover .hl-play {
  color: #fc0;
  transform: scale(1.2);
}

.hl-play {
  color: #fff;
  font-size: 20px;
  transition: transform .3s, color .3s;
}

.item.video-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: nowrap;
  gap: 10px;
}

.mobius {
  flex: 0 0 40%;
  display: flex;
  justify-content: flex-end;
}

/* Generic fullscreen wrapper (used by embeds) */
.fullscreen-mode {
  display: flex;
  width: 100vw !important;
  background-color: #000;
  position: fixed !important;
  top: 0;
  left: 0;
  height: 100vh !important;
  z-index: 9999;
  justify-content: center;
  align-items: center;
}

.fullscreen-mode iframe {
  max-width: 100vw;
  width: 100% !important;
  max-height: 100vh;
  height: 100% !important;
  border: 0;
  object-fit: contain;
}

/* Remove default focus ring for inputs (we style focus elsewhere) */
input:focus {
  outline: 0;
}

/* Ensure these small UI bits are visible */
.icol.expand,
.iconx .icol span,
.naveps.bignav .nvs .tex {
  display: inline !important;
}

/* Force white text for key titles in dark mode */
.darkmode .meta h1,
.darkmode .single-info.bixbox .infox .infolimit h2,
.darkmode a {
  color: #fff;
}

/* =========================================================
   SHARETHIS / SOCIAL
   ========================================================= */
#st-1 {
  font-family: "Helvetica Neue", Verdana, Helvetica, Arial, sans-serif;
}

#st-1 .st-btn,
#st-1 .st-btn > img,
#st-1 .st-btn > span {
  display: inline-block;
  position: relative;
  vertical-align: top;
}

.sharethis-inline-share-buttons {
  z-index: 99 !important;
}

ul.freebify-free-share-links.social.social-bg {
  display: flex;
  float: left;
  width: 100%;
  position: relative;
  left: -15px;
  padding-top: 15px;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  flex-direction: row;
  margin: 0;
}

.social {
  float: right;
  margin-top: 13px;
}

ol,
ul {
  margin-top: 0;
  margin-bottom: 10px;
}

span.st-label {
  display: flex;
  justify-content: flex-start;
  flex-direction: column;
  align-content: stretch;
}

span.follow-social {
  display: inline-block;
  color: #fff;
  text-align: center;
  background-color: #232323;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, .3);
  transition: .3s;
  text-transform: uppercase;
  font-weight: 900;
  letter-spacing: 2px;
  animation: 2s infinite blinkEffect;
  padding: 2px;
}

#st-1 .st-btn[data-network="telegram"] {
  background-color: #08c;
}

#st-1 .st-btn[data-network="facebook"] {
  background-color: #4267b2;
}

#st-1 .st-btn[data-network="facebook"] > span,
#st-1 .st-btn[data-network="telegram"] > span,
.social a {
  color: #fff;
}

li.facebook-f.flex-1 {
  display: block;
  margin: 0 5px;
}

ul li {
  list-style: none;
}

#st-1.st-has-labels .st-btn {
  min-width: 120px;
}

#st-1 .st-btn:last-child {
  margin-right: 0;
}

#st-1 .st-btn {
  margin-right: 8px;
  line-height: 32px;
  text-align: center;
  border-radius: 20px;
  cursor: pointer;
  font-size: 12px;
  top: 0;
  white-space: nowrap;
  height: 32px;
  border: 0;
  transition: opacity .2s ease-in, top .2s ease-in;
  box-sizing: border-box;
  padding: 0 10px;
}

#st-1 .st-btn > img {
  width: 16px;
  top: 8px;
  height: 16px;
}

#st-1 .st-btn > span {
  color: #fff;
  min-width: 60px;
  transition: .2s ease-in;
  font-weight: 500;
  opacity: 1;
  letter-spacing: .5px;
  padding: 0 6px;
}

/* =========================================================
   EPISODE LIST (Unified, no floats, wraps correctly)
   - Fixes hidden "1 to 20" by removing fixed widths and floats
   - Works in both light/dark via tokens
   ========================================================= */

/* Chip tokens for this module */
.as-episode-module {
  --ep-bg: #f8fafc;
  --ep-text: #0f172a;
  --ep-line: #e5e7eb;
  --ep-brand: var(--accent, #0c70de);
  --ep-ok: #22c55e;
  --ep-watched: #4bb980;
}

body.darkmode .as-episode-module {
  --ep-bg: #0b1220;
  --ep-text: #e5e7eb;
  --ep-line: #1f2937;
  --ep-brand: var(--accent, #8b93ff);
  --ep-ok: #22c55e;
  --ep-watched: #51423b;
}

/* Filters (range dropdown + search) */
.as-episode-module .episode-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
  margin-bottom: 12px;
}

.as-episode-module .episode-filters select,
.as-episode-module .episode-filters .episode-search {
  background: var(--ps-bg);
  color: var(--ps-fg);
  border: 1px solid var(--ps-border);
  border-radius: 6px;
  font-size: 13px;
  padding: 6px 8px;
}

/* Chips container */
.as-episode-module .episode-numbers {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  max-height: 220px;
  overflow: auto;
  margin: 0;
  padding: 10px 6px 10px 0;
}

/* Each chip */
.as-episode-module .episode-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  float: none;
  width: auto;
  min-width: 42px;
  height: 32px;
  padding: 0 .6rem;
  border: 1px solid var(--ep-line);
  border-radius: 10px;
  box-sizing: border-box;
  background: var(--ep-bg);
  color: var(--ep-text);
  font-weight: 600;
  white-space: nowrap;
  text-decoration: none;
  transition:
    transform .12s ease,
    box-shadow .12s ease,
    background-color .12s ease,
    color .12s ease,
    border-color .12s ease;
}

.as-episode-module .episode-number:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, .08);
}

.as-episode-module .episode-number:focus-visible {
  outline: 0;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--ep-brand) 40%, transparent);
}

/* Active/current states */
.as-episode-module .episode-number.current-ep,
.as-episode-module .episode-number.active {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 35%, transparent);
}

/* Watched state */
.as-episode-module .episode-number.watched {
  border-color: color-mix(in srgb, var(--ep-ok) 45%, var(--ep-line));
  background: var(--ep-watched) !important;
  color: color-mix(in srgb, var(--ep-ok) 68%, var(--ep-text));
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--ep-ok) 12%, transparent);
}

.as-episode-module .episode-number.watched:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 14px rgba(0, 0, 0, .12);
}

.as-episode-module .episode-number.watched.current-ep {
  border-color: color-mix(in srgb, var(--ep-ok) 65%, var(--ep-line));
}

/* More space for chips on small screens */
@media (max-width: 600px) {
  .as-episode-module .episode-numbers {
    max-height: 260px;
  }
}

/* =========================================================
   SINGLE INFO BLOCK (image on left, details + button)
   - CSS Grid, no floats; bookmark spans full row
   ========================================================= */
.single-info.bixbox {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 15px;
  align-items: start;
}

.single-info.bixbox .thumb {
  float: none;
  width: 150px;
  margin: 0;
}

.single-info.bixbox .rt {
  grid-column: 1 / -1;
}

/* Make the big bookmark button full width */
.bookmark {
  width: 100%;
}

/* Stack on mobile */
@media (max-width: 600px) {
  .bookmark {
    width: 40%;
    margin: 0 auto;
  }
  .single-info.bixbox {
    grid-template-columns: 1fr;
  }
  .single-info.bixbox .rt {
    grid-column: auto;
  }
}
#singlepisode .headlist {
    background: var(--ps-status-bg);
}
#singlepisode .headlist .det h2 a, #singlepisode .headlist .det h3 a {
    color: var(--ps-link);
}

/* =========================================================
   RESPONSIVE TYPOGRAPHY FOR WATCH CTA
   ========================================================= */
@media (max-width: 600px) {
  .watch-box a {
    font-size: 13px;
  }
  .hl-play {
    font-size: 18px;
  }
}

@media (min-width: 601px) and (max-width: 1024px) {
  .watch-box a {
    font-size: 13px;
  }
  .hl-play {
    font-size: 19px;
  }
}

@media (min-width: 1025px) {
  .watch-box a {
    font-size: 15px;
  }
  .hl-play {
    font-size: 20px;
  }
}

/* =========================================================
   NAV AND LAYOUT SMALL TWEAKS
   ========================================================= */
@media screen and (max-width: 880px) {
  #main-menu,
  #sidebar #mainepisode {
    display: none;
  }
  #main-menu ul {
    float: left;
    display: grid;
  }
  #thememode {
    padding-top: 21px;
  }
  .srcmob {
    padding-top: 0;
  }
}

/* Smaller header pieces */
@media only screen and (max-width: 570px) {
  .nvs.nvsc {
    display: none;
  }
  .naveps.bignav {
    flex: 0 0 40%;
  }
  .mobius {
    flex: 0 0 60%;
  }
}

/* Image and meta stacking for very small screens */
@media only screen and (max-width: 695px) {
  .single-info.bixbox .thumb {
    float: none !important;
    display: block;
    margin: 0 auto 12px !important;
    width: auto;
  }
  .single-info.bixbox .thumbook {
    text-align: center;
  }
  .single-info.bixbox .infox {
    clear: both;
    width: 100%;
  }
  .bigcontent .rt {
    position: relative;
    top: auto;
    left: 0;
    bottom: 0;
    padding: 10px;
    width: 100%;
  }
  .bigcontent .bookmark {
    width: 100%;
    margin: 0 auto;
  }
  .bigcontent .thumbook {
    max-width: 223px;
    width: 100%;
    height: auto;
  }
  .single-info.bixbox .infox .rating {
    position: relative;
    margin-bottom: 15px;
    padding: 7px 15px;
}
.single-info.bixbox .infox .rating strong {
    display: block;
}
.darkmode .single-info.bixbox .infox .rating {
    background: #111!important;
}
}

