#prismalunar {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: flex-start;
    margin: 0 auto;
    padding: 0 30px;
}

.contentor_episodio {
    margin: 30px;
    background-color: var(--base-3);
    border: 2px solid var(--base);
    border-radius: 8px;
    box-shadow: 0 0 10px var(--base);
    overflow: visible;
    width: 400px;
    position: relative;
    transition: width 0.5s, max-width 0.5s;
    display: flex;
    flex-direction: column;
    align-self: flex-start;
}



.cabecalho_video {
    font-weight: 600;
    background: var(--contrast);
}

.contentor_episodio.smpt-card-player-open {
    border: none;
    box-shadow: none;
}

.contentor_episodio.smpt-card-player-open .cabecalho_video {
    border: 2px solid var(--base);
    border-bottom: 0;
    box-shadow: 0 0 10px var(--base);
    border-radius: 8px 8px 0 0;
    position: relative;
    z-index: 1;
}

.contentor_episodio.smpt-card-player-open .smpt-ep-interactions {
    border: 2px solid var(--base);
    border-top: 0;
    box-shadow: 0 0 10px var(--base);
    border-radius: 0 0 8px 8px;
    position: relative;
    z-index: 1;
}

.cabecalho_video h2 {
    font-family: "Yanone Kaffeesatz", sans-serif;
    font-weight: 700;
    font-size: 2em;
    text-transform: uppercase;
    text-align: center;
    margin: 0;
    padding: 6px 16px;
    color: var(--base-3);
    letter-spacing: 4px;
    line-height: 1;
}

.nome_pt {
    font-family: "Yanone Kaffeesatz", sans-serif;
    font-weight: 700;
    text-align: center;
    padding: 16px 16px 12px;
    font-size: 1.75em;
    line-height: 1.2;
    letter-spacing: 0.3px;
}

.contentor_episodio--series .detalhes-episodio {
    height: auto;
    min-height: 0;
    grid-template-rows: auto auto;
    align-items: start;
    row-gap: 6px;
    padding: 8px 10px;
}

.contentor_episodio--series .detalhes-episodio .rotulo,
.contentor_episodio--series .detalhes-episodio .valor {
    line-height: 1.25;
}

video {
    width: 100%;
    height: auto;
}

/* Episode Details */
.detalhes-episodio {
    display: grid;
    grid-template-columns: 120px 1fr;
    grid-template-rows: auto auto;
    column-gap: 10px;
    padding: 10px;
    border-bottom: 1px solid var(--base);
    align-items: center;
    height: 160px;
}

.rotulo {
    font-weight: bold;
    color: var(--contrast-2);
    grid-column: 1;
    display: inherit;
    white-space: nowrap;
    font-size: 0.82em;
}

.valor {
    color: var(--contrast);
    grid-column: 2;
    display: inherit;
}

.contentor_episodio--series .smpt-series-original-title {
    font-weight: 700;
    font-size: 1.06em;
    line-height: 1.35;
}

.smpt-series-episode-list {
    display: grid;
    gap: 1.5rem;
    align-items: start;
}

.smpt-series-episode-directory {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.smpt-series-episode-list--pgsm {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
}

.smpt-series-episode-list--crystal {
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
}

.smpt-series-episode-list--pgsm .contentor_episodio,
.smpt-series-episode-list--crystal .contentor_episodio {
    width: 100%;
    margin: 0;
}

.smpt-series-episode-list--pgsm .contentor_episodio {
    min-width: 0;
}


/* Code for buttons and image */
.episodio-opcoes {
    display: flex;
    height: 104px;
    width: 100%;
}

.episodio-coluna1 {
    width: 138px;
    height: 104px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.episodio-coluna1 img {
    max-width: 100%;
    max-height: 100%;
}

.episodio-coluna2 {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 6px;
}

.episodio-coluna2 > .smpt-toggle {
    flex: 0 0 130px;
    width: 130px;
    box-sizing: border-box;
}

.episodio-opcoes--locked {
    height: auto;
    min-height: 104px;
}

.episodio-coluna2--locked {
    align-items: stretch;
    justify-content: center;
    padding: 12px 14px;
}

.smpt-episode-limit-message {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    width: 100%;
    color: var(--contrast);
    font-size: 0.92rem;
    line-height: 1.45;
}

.smpt-episode-limit-message__copy {
    margin: 0;
}

.smpt-episode-limit-message__links {
    margin: 0;
}

/* Buttons inside the episode options block */
.episodio-opcoes .button,
.episodio-opcoes button {
  border-radius: 5px;
  cursor: pointer;
  display: inline-block;
  font-weight: 700;
  line-height: 1;
  max-height: 40px;
  margin: auto;
  text-decoration: none !important;
}

.episodio-opcoes .button:active,
.episodio-opcoes button:active {
  transform: translateY(1px);
}

/* Episode Summary */
.resumo-episodio {
    padding: 10px;
    text-align: justify;
    border-top: 1px solid var(--base);
}

.resumo-episodio p {
    margin: 0;
}

.resumo-episodio p + p {
    margin-top: 0.75rem;
}

.contentor_episodio--series-crystal .resumo-episodio img {
    display: block;
    width: 100%;
    max-width: none;
    height: auto;
    float: none;
    margin: 0 0 12px;
}

.contentor_episodio--series-crystal .resumo-episodio .smpt-episode-card__image-link {
    display: block;
    width: 100%;
    cursor: zoom-in;
    text-decoration: none !important;
    border-bottom: 0 !important;
    box-shadow: none !important;
}

.contentor_episodio--series-crystal .resumo-episodio .smpt-episode-card__image-link:hover,
.contentor_episodio--series-crystal .resumo-episodio .smpt-episode-card__image-link:focus,
.contentor_episodio--series-crystal .resumo-episodio .smpt-episode-card__image-link:active {
    text-decoration: none !important;
    border-bottom: 0 !important;
    box-shadow: none !important;
}

.contentor_episodio--series .detalhes-episodio--dates {
    height: auto;
    margin-top: 14px;
    padding: 14px 10px 16px;
    border-top: 1px solid var(--base);
    border-bottom: 0;
    grid-template-columns: minmax(132px, max-content) minmax(0, 1fr);
    row-gap: 8px;
    align-items: start;
}

.contentor_episodio--series .detalhes-episodio--dates .rotulo {
    white-space: nowrap;
}

.contentor_episodio--series .detalhes-episodio--dates .valor {
    min-width: 0;
    overflow-wrap: anywhere;
}

.contentor_episodio--series-pgsm .detalhes-episodio--dates {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    align-items: center;
    gap: 0 10px;
    row-gap: 0;
    text-align: left;
}

.contentor_episodio--series-pgsm .detalhes-episodio--dates .rotulo,
.contentor_episodio--series-pgsm .detalhes-episodio--dates .valor {
    width: auto;
    flex: 0 0 auto;
    white-space: nowrap;
}

.detalhes-episodio,
.episodio-coluna1,
.resumo-episodio {
    transition: opacity 0.5s, visibility 0.5s, height 0.5s;
}

.topo {
    position: absolute;
    bottom: 0;
    right: 0;
}

#escolher-episodio {
    width: 250px;
    margin: auto;
}

.smpt-episode-toolbar {
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 0 0 100%;
    width: min(100%, 1040px);
    max-width: 100%;
    margin: 0 auto 24px;
    padding: 8px 0 18px;
    border: 0;
    background: transparent;
    align-items: center;
}

.smpt-episode-toolbar__row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
    width: 100%;
}

.smpt-episode-toolbar__sort-group {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.smpt-episode-toolbar__label {
    font-weight: 700;
}

.smpt-episode-toolbar__row--jump {
    gap: 8px;
}

.smpt-episode-toolbar__row--sort {
    gap: 10px;
}

.smpt-episode-toolbar__row--filters {
    gap: 0;
}

.smpt-episode-toolbar__select {
    min-width: 0;
}

.smpt-episode-toolbar__filters {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin: 0;
    padding: 0;
    border: 0;
}

.smpt-episode-toolbar__checkbox {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-weight: 600;
}

.smpt-episode-toolbar__checkbox input[type="checkbox"] {
    margin: 0;
}

.smpt-episode-toolbar__filters[hidden] {
    display: none !important;
}

.smpt-episode-toolbar__row--filters[hidden] {
    display: none !important;
}

.smpt-legacy-jump-hidden {
    display: none !important;
}

@media (max-width: 1300px) {
    .contentor_episodio {
        margin: 30px 15px;
    }
}

@media (max-width: 640px) {
	body.smpt-has-episode-cards .inside-article {
		padding-right: 10px;
		padding-left: 10px;
	}

	#prismalunar {
		box-sizing: border-box;
		width: 100%;
		max-width: 100%;
		min-width: 0;
		padding-right: 0;
		padding-left: 0;
	}

    .contentor_episodio {
		box-sizing: border-box;
        width: 100%;
		max-width: 400px;
		min-width: 0;
		margin: 20px auto;
    }

	.smpt-series-episode-list--crystal {
		grid-template-columns: minmax(0, 1fr);
	}

	#prismalunar > .contentor_episodio[data-series="anime"] .episodio-card-body {
		display: flex;
		flex-direction: column;
	}

	#prismalunar > .contentor_episodio[data-series="anime"] .episodio-media {
		order: 2;
	}

	#prismalunar > .contentor_episodio[data-series="anime"] .resumo-episodio {
		order: 3;
	}

	#prismalunar > .contentor_episodio[data-series="anime"] .detalhes-episodio {
		order: 1;
		height: auto;
		grid-template-columns: 110px minmax(0, 1fr);
		border-top: 0;
		border-bottom: 1px solid var(--base);
	}

	#prismalunar > .contentor_episodio[data-series="anime"] .episodio-opcoes {
		box-sizing: border-box;
		flex-direction: column;
		height: auto;
		padding: 12px 10px;
	}

	#prismalunar > .contentor_episodio[data-series="anime"] .episodio-coluna1 {
		width: 100%;
		height: 104px;
	}

	#prismalunar > .contentor_episodio[data-series="anime"] .episodio-coluna2 {
		box-sizing: border-box;
		flex: 0 0 auto;
		flex-direction: row;
		width: 100%;
		gap: 8px;
		padding: 10px 0 0;
	}

	#prismalunar > .contentor_episodio[data-series="anime"] .episodio-coluna2 > .smpt-toggle {
		flex: 1 1 0;
		width: auto;
		min-width: 0;
		margin: 0;
		white-space: normal;
	}

    .smpt-episode-toolbar {
        padding: 6px 0 16px;
    }

    .smpt-episode-toolbar__row,
    .smpt-episode-toolbar__sort-group {
        align-items: stretch;
    }

    .smpt-episode-toolbar__select {
        width: 100%;
        min-width: 0;
    }

    .smpt-episode-toolbar__row--sort {
        justify-content: center;
    }
	 #problema img {
        display: none;
    }
}

@media (max-width: 400px) {
    .contentor_episodio {
		margin: 20px 0;
    }
}


/* Accordion toggle buttons — inherit GP button colors */
.smpt-toggle {
  flex: 1;
  cursor: pointer;
  font-weight: 700;
  font-size: 0.95em;
  border-radius: 5px;
  line-height: 1.2;
  margin: 3px;
  padding: 6px 12px;
  white-space: nowrap;
  text-decoration: none;
  border: none;
  transition: opacity 0.2s;
}

.smpt-toggle:hover {
  opacity: 0.8;
}

.smpt-toggle--active {
  opacity: 0.7;
}

/* Accordion subsections */
.smpt-subsection {
  padding: 10px;
  border-top: 1px solid var(--base);
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
  align-items: center;
  padding: 10px;
}

.smpt-subsection[hidden] {
  display: none;
}

.smpt-subsection--ver-online {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  align-items: stretch;
}

/* Play buttons */
.smpt-play {
  cursor: pointer;
  font-weight: 700;
  border-radius: 5px;
  padding: 8px 14px;
  text-align: center;
  border: none;
}

.smpt-subsection--ver-online .smpt-play {
  font-size: 13px;
}

.smpt-play--stream {
  background: var(--accent);
  color: var(--base-3);
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  box-sizing: border-box;
  white-space: normal;
  overflow-wrap: anywhere;
}

.smpt-play--stream--compact {
  gap: 0;
  padding-inline: 10px;
}

.smpt-play--stream--compact .dashicons {
  display: none;
}

.smpt-play--stream:hover {
  opacity: 0.85;
}

.smpt-play--stream .dashicons {
  font-size: 18px;
  width: 18px;
  height: 18px;
  line-height: 1;
  margin-top: -1px;
}

.smpt-play--stream span {
  min-width: 0;
}

/* Download links */
.smpt-dl {
  display: block;
  cursor: pointer;
  font-weight: 700;
  border-radius: 5px;
  padding: 8px 14px;
  text-align: center;
  text-decoration: none !important;
  background: var(--accent);
  color: var(--base-3) !important;
}

.smpt-dl:hover {
  opacity: 0.85;
}

.smpt-dl-help {
  font-size: 0.8em;
  color: var(--contrast-2);
  text-align: center;
  display: block;
  margin-bottom: 4px;
}

/* Channel logo in nostalgia buttons */
.smpt-channel-logo {
  height: 24px;
  vertical-align: middle;
  margin-right: 4px;
}

.smpt-play--nostalgia {
  background: var(--contrast-2);
  color: var(--base-3);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  font-size: 13px;
  padding: 5px 8px;
  justify-content: center;
}

.smpt-play--nostalgia:hover {
  opacity: 0.85;
}

/* Shared player */
.smpt-shared-player {
  position: relative;
  width: 100%;
}

.smpt-shared-player video {
  width: 100%;
  height: auto;
  display: block;
  aspect-ratio: auto;
  object-fit: contain;
  object-position: center top;
  background: #000;
}

/* Especiais (movies & specials): the video card scales to 80% of the page
   width, but never past the video's native width (--smpt-especial-max-width,
   set inline per card), and keeps the same min-width behaviour as episodes. */
.contentor_episodio--especial {
  width: 80%;
  max-width: var(--smpt-especial-max-width, 640px);
  min-width: 400px;
  margin-left: auto;
  margin-right: auto;
}

@media (max-width: 640px) {
  .contentor_episodio--especial {
    width: 100%;
	min-width: 0;
  }
}

/* The title rows reuse the anime .detalhes-episodio block, which has a fixed
   height and inherits the page's (large) body font. Make them compact here. */
.contentor_episodio--especial .detalhes-episodio {
  height: auto;
  row-gap: 4px;
}

.contentor_episodio--especial .detalhes-episodio .rotulo,
.contentor_episodio--especial .detalhes-episodio .valor {
  font-size: 0.85em;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.smpt-shared-tv {
  position: relative;
  width: 100%;
}

/* Shared close button */
.smpt-player-close {
  position: absolute;
  top: -50px;
  right: 8px;
  z-index: 10;
  width: 32px;
  height: 32px;
  padding: 5px;
  border-radius: 5px;
  border: none;
  background: var(--contrast-2);
  color: var(--base-3);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.smpt-player-close:hover {
  background: var(--base);
}

/* CRT TV frame */
.smpt-tv-frame {
  width: 100%;
  display: flex;
  justify-content: center;
  padding: 10px 0;
}

.smpt-tv-frame .tv {
  position: relative;
  width: 100%;
  max-width: 771px;
  aspect-ratio: 771 / 751;
  margin: 0 auto 50px;
  overflow: hidden;
}

/* TV frame overlay image */
.smpt-tv-frame .tv::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url('https://sm-portugal.com/wp-content/uploads/2025/01/tv.webp') no-repeat center center / cover;
  pointer-events: none;
  z-index: 2;
}

/* iframe sits behind the TV frame, inset to the screen area */
.smpt-tv-frame .tv iframe {
  position: absolute;
  top: 9.454%;
  left: 8.431%;
  width: 83.01%;
  height: 69.907%;
  border: none;
  z-index: 1;
  background: #000;
}

/* Card body wrapper */
.episodio-card-body {
  flex: 1;
  transition: opacity 0.3s;
}


/* Episode interactions */
/* ==========================================================================
   Episode Interactions — Ratings, Likes, Comments, Watched, Quero Ver, Favorito
   ========================================================================== */

/* --- Container --- */

.smpt-ep-interactions {
  border-top: 1px solid var(--base);
  padding: 8px 16px;
}

.smpt-ep-actions-bar {
  padding: 6px 10px;
  border-bottom: 1px solid var(--base);
}


/* --- Action Bar --- */

.smpt-ep-bar {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.smpt-ep-bar-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  justify-content: center;
}

.smpt-ep-bar-row--stats {
  gap: 0;
  display: grid;
  grid-template-columns: repeat(4, max-content);
  grid-auto-flow: column;
  align-items: center;
  justify-content: space-between;
  white-space: nowrap;
}

.smpt-ep-bar-row--stats.smpt-ep-bar-row--no-views {
  grid-template-columns: repeat(3, max-content);
}

.smpt-ep-bar-row--stats.smpt-ep-bar-row--compat-visible {
  grid-template-columns: repeat(5, max-content);
}

.smpt-ep-bar-row--stats.smpt-ep-bar-row--no-views.smpt-ep-bar-row--compat-visible {
  grid-template-columns: repeat(4, max-content);
}

.smpt-ep-compat-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: inherit;
  font: inherit;
  font-weight: 700;
  font-size: 0.76rem;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
}

.smpt-ep-compat-toggle--hidden {
  display: none;
}

.smpt-ep-compat-toggle__switch {
  position: relative;
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
}

.smpt-ep-compat-toggle__input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.smpt-ep-compat-toggle__track {
  position: relative;
  flex: 0 0 auto;
  width: 60px;
  height: 1.35rem;
  border-radius: 999px;
  border: 1px solid var(--base);
  background: rgba(15, 31, 79, 0.08);
  transition: background-color 0.2s, border-color 0.2s;
}

.smpt-ep-compat-toggle__state {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: var(--contrast);
  transition: opacity 0.2s, color 0.2s;
  pointer-events: none;
}

.smpt-ep-compat-toggle__state--on {
  left: 8px;
  opacity: 0;
}

.smpt-ep-compat-toggle__state--off {
  right: 6px;
  opacity: 1;
}

.smpt-ep-compat-toggle__thumb {
  position: absolute;
  top: 50%;
  left: 2px;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: var(--base-3);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
  transform: translate3d(0, -50%, 0);
  transition: transform 0.2s, background-color 0.2s;
}

.smpt-ep-compat-toggle:hover .smpt-ep-compat-toggle__track,
.smpt-ep-compat-toggle:focus-within .smpt-ep-compat-toggle__track {
  border-color: var(--accent);
}

.smpt-ep-compat-toggle:hover .smpt-ep-compat-toggle__thumb,
.smpt-ep-compat-toggle:focus-within .smpt-ep-compat-toggle__thumb {
  background: var(--base-3);
}

.smpt-ep-compat-toggle__input:checked + .smpt-ep-compat-toggle__track {
  background: var(--accent);
  border-color: var(--accent);
}

.smpt-ep-compat-toggle__input:checked + .smpt-ep-compat-toggle__track .smpt-ep-compat-toggle__thumb {
  transform: translate3d(36px, -50%, 0);
}

.smpt-ep-compat-toggle__input:checked + .smpt-ep-compat-toggle__track .smpt-ep-compat-toggle__state--on {
  opacity: 1;
  color: var(--base-3);
}

.smpt-ep-compat-toggle__input:checked + .smpt-ep-compat-toggle__track .smpt-ep-compat-toggle__state--off {
  opacity: 0;
}

.smpt-ep-compat-toggle__label {
  color: inherit;
}

.smpt-ep-rating-group {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}

.smpt-ep-bar-row--stats > .smpt-ep-views,
.smpt-ep-bar-row--stats > .smpt-ep-rating-group,
.smpt-ep-bar-row--stats > .smpt-ep-likedislike,
.smpt-ep-bar-row--stats > .smpt-ep-comment-toggle {
  min-width: 0;
}

/* --- Star Rating --- */

.smpt-ep-stars {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  cursor: pointer;
  position: relative;
  overflow: visible;
}

.smpt-ep-stars--readonly {
  cursor: not-allowed;
  opacity: 0.45;
  pointer-events: none;
}

.smpt-ep-star {
  position: relative;
  display: inline-block;
  width: 16px;
  height: 16px;
  cursor: pointer;
}

.smpt-ep-star svg {
  fill: var(--contrast-3);
  display: block;
  position: absolute;
  top: 0;
  left: 0;
}

.smpt-ep-star svg.smpt-ep-star-fill {
  fill: #f5c518;
  -webkit-clip-path: inset(0 100% 0 0);
  clip-path: inset(0 100% 0 0);
}

.smpt-ep-star.is-full svg.smpt-ep-star-fill {
  -webkit-clip-path: inset(0 0 0 0);
  clip-path: inset(0 0 0 0);
}

.smpt-ep-star.is-half svg.smpt-ep-star-fill {
  -webkit-clip-path: inset(0 50% 0 0);
  clip-path: inset(0 50% 0 0);
}

/* --- Star Hit Zones --- */

.smpt-ep-star-half {
  position: absolute;
  top: 0;
  width: 50%;
  height: 100%;
  z-index: 1;
  cursor: pointer;
}

.smpt-ep-star-left  { left: 0; }
.smpt-ep-star-right { right: 0; }

/* --- Star Glow Animation (adapted from fanfiction plugin) --- */

.smpt-ep-rating-glow-active .smpt-ep-star.is-full svg.smpt-ep-star-fill,
.smpt-ep-rating-glow-active .smpt-ep-star.is-half svg.smpt-ep-star-fill {
  animation: smpt-rating-glow 620ms ease-out both;
  transform-origin: center;
}

@keyframes smpt-rating-glow {
  0% {
    filter: drop-shadow(0 0 0 rgb(255 236 164 / 0));
    opacity: 0.95;
  }
  45% {
    filter: drop-shadow(0 0 4.5px rgb(255 241 176 / 0.9)) drop-shadow(0 0 10px rgb(255 231 150 / 0.65));
    opacity: 1;
  }
  100% {
    filter: drop-shadow(0 0 0 rgb(255 236 164 / 0));
    opacity: 1;
  }
}

/* --- Rating Info --- */

.smpt-ep-rating-info {
  font-size: 0.8em;
  color: inherit;
  white-space: nowrap;
}

.smpt-ep-avg {
  font-weight: 700;
}

.smpt-ep-rating-count {
  font-weight: 400;
}

/* --- Like / Dislike unified pill --- */

.smpt-ep-likedislike {
  display: inline-flex;
  align-items: stretch;
  border: 0;
  border-radius: 0;
  gap: 3px;
  overflow: visible;
  transition: none;
}

.smpt-ep-likedislike-sep {
  width: auto;
  background: none;
  flex-shrink: 0;
  align-self: center;
  color: var(--contrast-3, #b2b2be);
  font-size: 0.9em;
  line-height: 1;
  padding: 0 1px;
}

.smpt-ep-like-btn,
.smpt-ep-dislike-btn {
  background: none;
  border: none;
  padding: 4px 10px;
  cursor: pointer;
  font-size: 0.85em;
  display: inline-flex;
  align-items: center;
  gap: 2px;
  color: inherit;
  position: relative;
  overflow: visible;
  padding: 0;
  outline: none;
  box-shadow: none;
  -webkit-tap-highlight-color: transparent;
  transition: none;
  isolation: isolate;
}

button.smpt-ep-like-btn:hover,
button.smpt-ep-like-btn:focus,
button.smpt-ep-like-btn:focus-visible {
  color: var(--accent, #2678dc);
  background: transparent;
}

button.smpt-ep-dislike-btn:hover,
button.smpt-ep-dislike-btn:focus,
button.smpt-ep-dislike-btn:focus-visible {
  color: var(--accent, #2678dc);
  background: transparent;
}

button.smpt-ep-like-btn:active,
button.smpt-ep-dislike-btn:active,
button.smpt-ep-comment-toggle:active,
button.smpt-ep-like-btn:focus,
button.smpt-ep-dislike-btn:focus,
button.smpt-ep-comment-toggle:focus,
button.smpt-ep-like-btn:focus-visible,
button.smpt-ep-dislike-btn:focus-visible,
button.smpt-ep-comment-toggle:focus-visible {
  background: transparent;
  box-shadow: none;
  outline: none;
}

.smpt-ep-like-btn.is-active,
.smpt-ep-dislike-btn.is-active {
  background: transparent;
  color: var(--accent, #2678dc);
}

/* --- SVG thumb icons --- */

.smpt-ep-btn-icon {
  display: inline-flex;
  align-items: center;
  line-height: 1;
  margin-right: 4px;
  position: relative;
  z-index: 1;
}

.smpt-ep-btn-icon .smpt-ep-bookmark-svg {
  width: 1em;
  height: 1em;
}

.smpt-ep-thumb-svg {
  width: 1em;
  height: 1em;
  display: block;
  position: relative;
  z-index: 1;
}

.smpt-ep-thumb-bg { fill: currentcolor; }
.smpt-ep-thumb-fg {
  fill: #a36b00;
  display: none;
}

.smpt-ep-like-btn.is-active    .smpt-ep-thumb-fg,
.smpt-ep-dislike-btn.is-active .smpt-ep-thumb-fg { display: block; }
.smpt-ep-like-btn.is-active    .smpt-ep-thumb-bg,
.smpt-ep-dislike-btn.is-active .smpt-ep-thumb-bg { display: none; }

/* --- View count --- */

.smpt-ep-views {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.8em;
  color: inherit;
  padding: 0;
  border: 0;
  border-radius: 0;
  cursor: default;
  user-select: none;
  flex: 0 0 auto;
  position: relative;
  z-index: 1;
}

.smpt-ep-views--hidden {
  visibility: hidden;
  pointer-events: none;
}

/* --- Disabled state (fallback for non-button elements, e.g. .smpt-dl) --- */

.smpt-ep-btn--disabled {
  opacity: 0.45 !important;
  cursor: not-allowed !important;
  pointer-events: auto !important;
  filter: grayscale(80%) !important;
}

/* --- Like confetti burst (adapted from fanfiction plugin) --- */

.smpt-ep-effect-host {
  position: relative;
  overflow: visible;
}

.smpt-ep-like-confetti-burst {
  position: absolute;
  left: var(--smpt-origin-x, 50%);
  top:  var(--smpt-origin-y, 50%);
  width: 0;
  height: 0;
  pointer-events: none;
  z-index: 0;
}

.smpt-ep-like-confetti-piece {
  position: absolute;
  left: 0; top: 0;
  width:  var(--smpt-confetti-size, 6px);
  height: calc(var(--smpt-confetti-size, 6px) * 0.62);
  background: var(--smpt-confetti-color, #ff4d6d);
  border-radius: var(--smpt-confetti-radius, 2px);
  opacity: 0;
  transform: translate(-50%, -50%) rotate(0deg) scale(0.7);
  animation: smpt-confetti-pop 980ms cubic-bezier(0.18, 0.84, 0.31, 1) forwards;
  animation-delay: var(--smpt-confetti-delay, 0ms);
  will-change: transform, opacity;
}

@keyframes smpt-confetti-pop {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) rotate(0deg) scale(0.65);
  }
  12%  { opacity: 1; }
  100% {
    opacity: 0;
    transform: translate(
      calc(-50% + var(--smpt-confetti-x, 0px)),
      calc(-50% + var(--smpt-confetti-y, -32px))
    ) rotate(var(--smpt-confetti-rot, 220deg)) scale(1);
  }
}

/* --- Dislike gloom drip (adapted from fanfiction plugin) --- */

.smpt-ep-dislike-gloom-burst {
  position: absolute;
  left: var(--smpt-origin-x, 50%);
  top:  var(--smpt-origin-y, 50%);
  width: 0;
  height: 0;
  pointer-events: none;
  z-index: 0;
}

.smpt-ep-dislike-gloom-drop {
  position: absolute;
  left: 0; top: 0;
  width:  var(--smpt-drop-width, 5px);
  height: var(--smpt-drop-height, 15px);
  opacity: 0;
  border-radius: var(--smpt-drop-radius, 999px 999px 66% 66%);
  background: linear-gradient(180deg, rgb(17 21 30 / 0.94) 0%, var(--smpt-gloom-color, #2f3645) 56%, rgb(13 16 24 / 0.96) 100%);
  transform: translate(-50%, -50%) scaleX(0.84) scaleY(0.34);
  animation: smpt-gloom-drip var(--smpt-drop-duration, 900ms) cubic-bezier(0.34, 0.08, 0.72, 1) forwards;
  animation-delay: var(--smpt-gloom-delay, 0ms);
  will-change: transform, opacity;
}

@keyframes smpt-gloom-drip {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scaleX(0.72) scaleY(0.32);
  }
  16%  { opacity: 0.86; }
  100% {
    opacity: 0;
    transform: translate(
      calc(-50% + var(--smpt-gloom-x, 0px)),
      calc(-50% + var(--smpt-gloom-fall, 50px))
    ) rotate(var(--smpt-gloom-tilt, 0deg)) scaleX(0.44) scaleY(1.24);
    filter: blur(1.5px);
  }
}

.smpt-ep-dislike-sigh-wisp {
  position: absolute;
  left: 0; top: 0;
  width: 11px; height: 5px;
  border-top: 1px solid rgb(167 178 199 / 0.42);
  border-radius: 999px;
  opacity: 0;
  transform: translate(-50%, -50%);
  animation: smpt-dislike-sigh var(--smpt-sigh-duration, 360ms) ease-out forwards;
  will-change: transform, opacity;
}

@keyframes smpt-dislike-sigh {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%);
  }
  26%  { opacity: 0.5; }
  100% {
    opacity: 0;
    transform: translate(
      calc(-50% + var(--smpt-sigh-drift, 0px)),
      calc(-50% - var(--smpt-sigh-rise, 8px))
    ) scaleX(1.08);
  }
}

.smpt-ep-dislike-deflate {
  animation: smpt-dislike-deflate 640ms cubic-bezier(0.22, 0.72, 0.3, 1) both;
  transform-origin: center;
}

@keyframes smpt-dislike-deflate {
  0%   { transform: scale(1) translateY(0); }
  22%  { transform: scale(0.92) translateY(1.5px); }
  40%  { transform: scale(1) translateY(0); }
  60%  { transform: scale(0.96) translateY(0.5px); }
  100% { transform: scale(1) translateY(0); }
}

/* --- Comment Toggle --- */

.smpt-ep-comment-toggle {
  background: none;
  border: 0;
  border-radius: 0;
  padding: 0;
  cursor: pointer;
  font-size: 0.8em;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--contrast, #000411);
  flex: 0 0 auto;
  text-decoration: none;
  outline: none;
  box-shadow: none;
  -webkit-tap-highlight-color: transparent;
  transition: none;
  position: relative;
  z-index: 1;
}

button.smpt-ep-comment-toggle:hover,
button.smpt-ep-comment-toggle:focus,
button.smpt-ep-comment-toggle:focus-visible,
button.smpt-ep-comment-toggle:active {
  color: var(--contrast, #000411);
  background: transparent;
}

/* --- Action buttons (Favorito, Visto, Quero ver) --- */

.smpt-ep-actions-bar .smpt-ep-watched-btn,
.smpt-ep-actions-bar .smpt-ep-want-btn,
.smpt-ep-actions-bar .smpt-ep-favorite-btn {
  background: transparent;
  color: var(--contrast, inherit);
  border: 1px solid var(--base);
  border-radius: 16px;
  padding: 4px 10px;
  cursor: pointer;
  font-size: 0.85em;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: background-color 0.2s, border-color 0.2s, color 0.2s;
}

.smpt-ep-actions-bar .smpt-ep-watched-btn:not([disabled]):hover {
  border-color: #f5c518;
}

.smpt-ep-actions-bar .smpt-ep-watched-btn.is-watched {
  background: rgb(245 197 24 / 0.12);
  border-color: #f5c518;
  color: #a36b00;
}

/* --- Header state markers --- */

.smpt-ep-header-statuses {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-right: 8px;
  vertical-align: middle;
}

.smpt-ep-header-star {
  display: none;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  vertical-align: middle;
  transition: color 0.2s, filter 0.2s;
}

.smpt-ep-header-star.is-favorite {
  display: inline-flex;
  color: #f5c518;
  filter: drop-shadow(0 0 4px rgb(245 197 24 / 0.3));
}

.smpt-ep-favorite-star-svg,
.smpt-ep-header-star-icon {
  width: 18px;
  height: 18px;
  display: block;
  fill: currentcolor;
}

/* --- Seen checkmark / want check in episode header --- */

.smpt-ep-seen-check,
.smpt-ep-want-check {
  display: none;
  text-align: center;
  border-radius: 50%;
  font-weight: 700;
  vertical-align: middle;
  transition: background-color 0.2s, color 0.2s;
}

.smpt-ep-seen-check {
  width: 18px;
  height: 18px;
  line-height: 18px;
  font-size: 0.85em;
}

.smpt-ep-seen-check.is-watched {
  display: inline-block;
  background: #f5c518;
  color: #a36b00;
}

.smpt-ep-want-check {
  width: 17px;
  height: 17px;
  line-height: 17px;
  font-size: 0.75em;
  margin-right: 6px;
  display: none;
  align-items: center;
  justify-content: center;
}

.smpt-ep-want-check.is-active {
  display: inline-flex;
  color: #e8d5b7;
}

.smpt-ep-bookmark-svg {
  display: block;
}

.smpt-ep-header-bookmark-icon {
  width: 17px;
  height: 17px;
}

/* --- Quero ver / Favorito buttons --- */

.smpt-ep-actions-bar .smpt-ep-want-btn:not([disabled]):hover {
  border-color: #f5c518;
}

.smpt-ep-actions-bar .smpt-ep-want-btn.is-active {
  background: rgb(245 197 24 / 0.12);
  border-color: #f5c518;
  color: #a36b00;
}

.smpt-ep-actions-bar .smpt-ep-favorite-btn:not([disabled]):hover {
  border-color: #f5c518;
}

.smpt-ep-actions-bar .smpt-ep-favorite-btn.is-active {
  background: rgb(245 197 24 / 0.12);
  border-color: #f5c518;
  color: #a36b00;
}

/* ==========================================================================
   Comments Section
   ========================================================================== */

.smpt-ep-comments {
  padding: 10px;
}

.smpt-ep-comment {
  padding: 8px 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.smpt-ep-comment:last-of-type {
  border-bottom: 0;
}

.smpt-ep-comment-replies {
  margin-top: 10px;
  margin-left: 14px;
  padding-left: 12px;
  border-left: 2px solid rgba(186, 193, 205, 0.45);
}

.smpt-ep-comment-header {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
  min-width: 0;
}

.smpt-ep-comment-author-line {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: 0 1 auto;
  min-width: 0;
  white-space: nowrap;
}

.smpt-ep-comment-author-badge {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  object-fit: contain;
}

.smpt-ep-comment-author {
  font-size: 0.9em;
  white-space: nowrap;
}

.smpt-ep-comment-author-link {
  color: inherit;
  text-decoration: none;
}

.smpt-ep-comment-author-link:hover,
.smpt-ep-comment-author-link:focus {
  text-decoration: underline;
}

.smpt-ep-comment-time {
  flex: 0 0 auto;
  font-size: 0.78em;
  color: var(--contrast-2, #999);
  margin-right: auto;
  white-space: nowrap;
}

.smpt-ep-comment-text {
  margin: 0;
  font-size: 0.9em;
  line-height: 1.4;
}

/* --- Comment action buttons (edit/delete) --- */

.smpt-ep-comment-action {
  flex: 0 0 auto;
  background: none;
  border: none;
  padding: 0 4px;
  cursor: pointer;
  font-size: 0.78em;
  color: var(--contrast-2, #999);
  text-decoration: underline;
  line-height: 1;
  white-space: nowrap;
}

.smpt-ep-comment-action:hover {
  color: var(--accent, #2678dc);
}

.smpt-ep-comment-delete:hover {
  color: #f44336;
}

.smpt-ep-comment-reply-toggle.is-active {
  color: var(--accent, #2678dc);
}

@media (max-width: 767px) {
  .smpt-ep-comment-header {
    flex-wrap: wrap;
  }
}

/* --- Inline edit --- */

.smpt-ep-comment-edit-input {
  width: 100%;
  padding: 6px 8px;
  border: 1px solid var(--base);
  border-radius: 6px;
  font-family: inherit;
  font-size: 0.9em;
  box-sizing: border-box;
  resize: vertical;
}

.smpt-ep-comment-edit-actions {
  display: flex;
  gap: 6px;
  margin-top: 4px;
}

.smpt-ep-comment-save,
.smpt-ep-comment-cancel {
  background: none;
  border: 1px solid var(--base);
  border-radius: 6px;
  padding: 3px 10px;
  cursor: pointer;
  font-size: 0.82em;
}

.smpt-ep-comment-save {
  background: var(--accent, #2678dc);
  color: var(--base-3);
  border-color: var(--accent, #2678dc);
}

/* --- Comment Form --- */

.smpt-ep-comment-form {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.smpt-ep-comment-form--reply {
  margin-top: 8px;
  padding: 10px;
  border: 1px solid rgba(186, 193, 205, 0.45);
  border-radius: 10px;
  background: rgba(247, 248, 249, 0.72);
}

.smpt-ep-comment-reply-context {
  font-size: 0.8em;
  font-weight: 600;
  color: var(--contrast-2, #555);
}

.smpt-ep-comment-name-display {
  font-size: 0.88em;
  font-weight: 600;
  color: var(--contrast-2, #555);
}

.smpt-ep-comment-reply-email-notifications {
  width: 100%;
  margin: 0;
  font-size: 0.88em;
  color: var(--contrast-2, #555);
}

.smpt-ep-comment-reply-email-notifications label {
  display: inline-flex;
  align-items: flex-start;
  gap: 0.45rem;
  cursor: pointer;
  line-height: 1.4;
}

.smpt-ep-comment-reply-email-notifications input[type="checkbox"] {
  margin-top: 0.15em;
}

.smpt-ep-comment-name,
.smpt-ep-comment-email,
.smpt-ep-comment-input {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--base);
  border-radius: 8px;
  font-family: inherit;
  font-size: 0.9em;
  box-sizing: border-box;
}

.smpt-ep-comment-input {
  resize: vertical;
  min-height: 60px;
}

.smpt-ep-comment-submit {
  align-self: flex-end;
  background: var(--accent, #2678dc);
  color: var(--base-3);
  border: none;
  border-radius: 8px;
  padding: 8px 20px;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.9em;
  transition: opacity 0.2s;
}

.smpt-ep-comment-submit:hover {
  opacity: 0.85;
}

.smpt-ep-comment-reply-cancel {
  align-self: flex-end;
  background: none;
  border: 1px solid var(--base);
  border-radius: 8px;
  padding: 7px 16px;
  cursor: pointer;
  font-size: 0.9em;
  color: var(--contrast-2, #555);
}

/* --- Load More Button --- */

.smpt-ep-load-more {
  display: block;
  width: 100%;
  padding: 8px;
  margin: 8px 0;
  background: none;
  border: 1px solid var(--base);
  border-radius: 8px;
  cursor: pointer;
  color: var(--accent, #2678dc);
  font-size: 0.85em;
  text-align: center;
}

.smpt-ep-load-more:hover {
  background: rgba(38, 120, 220, 0.05);
}

/* ==========================================================================
   Member Dashboard — Watched & Quero Ver Panels
   ========================================================================== */

.smpt-ep-watched-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.smpt-ep-watched-list li {
  padding: 0.6rem 0;
  border-bottom: 1px solid rgba(224, 230, 238, 0.95);
}

.smpt-ep-watched-list li:last-child {
  border-bottom: 0;
}

.smpt-ep-watched-list a {
  text-decoration: none;
  font-weight: 600;
}

.smpt-ep-watched-list a:hover {
  text-decoration: underline;
}

.smpt-ep-empty {
  color: var(--contrast-2, #888);
  font-style: italic;
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 640px) {
  .smpt-ep-bar {
    gap: 6px;
  }

  .smpt-ep-bar-row--stats.smpt-ep-bar-row--compat-visible {
    grid-template-columns: repeat(4, max-content);
    grid-template-rows: auto auto;
    grid-auto-flow: row;
    row-gap: 8px;
  }

  .smpt-ep-bar-row--stats.smpt-ep-bar-row--compat-visible > .smpt-ep-compat-toggle {
    grid-column: 1 / -1;
    grid-row: 1;
    justify-self: center;
  }

  .smpt-ep-stars svg {
    width: 18px;
    height: 18px;
  }
}
