/*
Theme Name: Fetchine
Theme URI: https://fetchine.com/
Author: Fetchine
Description: Smartphone-first dark video discovery theme for Fetchine Video Core.
Version: 1.8.2
Requires at least: 6.2
Requires PHP: 7.4
Text Domain: fetchine
*/

:root {
    --ftc-bg: #0b0a0e;
    --ftc-surface: #151219;
    --ftc-surface-raised: #1c1821;
    --ftc-border: #302738;
    --ftc-text: #f5f2f7;
    --ftc-muted: #aaa2af;
    --ftc-brand: #a76bf3;
    --ftc-brand-strong: #8b45e5;
    --ftc-brand-soft: #261a34;
    --ftc-focus: #c99cff;
    --ftc-max-width: 1160px;
    --ftc-radius: 10px;
    --ftc-header-height: 56px;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    overflow-x: hidden;
    background: var(--ftc-bg);
    color-scheme: dark;
    scroll-behavior: smooth;
}

body {
    min-width: 320px;
    margin: 0;
    overflow-x: hidden;
    background: var(--ftc-bg);
    color: var(--ftc-text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Hiragino Kaku Gothic ProN", "Yu Gothic", Meiryo, sans-serif;
    font-size: 16px;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}

body.ftc-panel-open {
    overflow: hidden;
}

a {
    color: var(--ftc-brand);
    text-underline-offset: 0.18em;
}

a:hover {
    color: #c493ff;
}

button,
input,
textarea,
select {
    font: inherit;
}

button,
a {
    -webkit-tap-highlight-color: transparent;
}

img,
iframe {
    max-width: 100%;
}

:focus-visible {
    outline: 3px solid var(--ftc-focus);
    outline-offset: 3px;
}

.screen-reader-text {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.screen-reader-text:focus {
    position: fixed;
    z-index: 100000;
    top: 8px;
    left: 8px;
    width: auto;
    height: auto;
    padding: 10px 14px;
    clip: auto;
    background: var(--ftc-text);
    color: var(--ftc-bg);
}

.ftc-shell {
    width: min(100% - 28px, var(--ftc-max-width));
    margin-inline: auto;
}

.ftc-main {
    min-height: 65vh;
    padding-block: 22px 52px;
}

/* Compact site header */
.ftc-site-header {
    position: sticky;
    z-index: 100;
    top: 0;
    height: var(--ftc-header-height);
    border-bottom: 1px solid rgba(167, 107, 243, 0.18);
    background: rgba(11, 10, 14, 0.94);
    backdrop-filter: blur(12px);
}

.admin-bar .ftc-site-header {
    top: 32px;
}

.ftc-site-header__inner {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr) 44px;
    align-items: center;
    width: min(100%, var(--ftc-max-width));
    height: 100%;
    margin-inline: auto;
    padding-inline: 6px;
}

.ftc-site-title {
    position: relative;
    z-index: 0;
    isolation: isolate;
    min-width: 0;
    justify-self: center;
    overflow: visible;
    color: var(--ftc-text);
    font-size: 17px;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-decoration: none;
    text-shadow: 0 1px 4px rgba(11, 10, 14, 0.95);
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ftc-site-title::before {
    position: absolute;
    z-index: -2;
    top: 50%;
    left: 50%;
    width: clamp(220px, 54vw, 360px);
    height: 54px;
    background:
        repeating-conic-gradient(
            from -4deg at 50% 50%,
            rgba(201, 150, 255, 0.34) 0deg,
            rgba(201, 150, 255, 0.34) 0.7deg,
            transparent 1.45deg,
            transparent 7.5deg
        ),
        radial-gradient(
            ellipse at center,
            rgba(172, 96, 235, 0.62) 0%,
            rgba(118, 56, 176, 0.46) 29%,
            rgba(61, 32, 83, 0.3) 52%,
            rgba(11, 10, 14, 0) 78%
        );
    content: "";
    opacity: 0.9;
    pointer-events: none;
    transform: translate(-50%, -50%);
    -webkit-mask-image: radial-gradient(ellipse at center, #000 9%, rgba(0, 0, 0, 0.9) 45%, transparent 80%);
    mask-image: radial-gradient(ellipse at center, #000 9%, rgba(0, 0, 0, 0.9) 45%, transparent 80%);
}

.ftc-site-title::after {
    position: absolute;
    z-index: -1;
    top: 50%;
    left: 50%;
    width: 120%;
    height: 125%;
    background: radial-gradient(ellipse at center, rgba(24, 13, 31, 0.58) 8%, rgba(15, 11, 19, 0.34) 54%, transparent 78%);
    content: "";
    pointer-events: none;
    transform: translate(-50%, -50%);
}

/* First-visit age confirmation */
html.ftc-age-gate-active,
html.ftc-age-gate-active body {
    overflow: hidden;
}

.ftc-age-gate {
    position: fixed;
    z-index: 1000;
    inset: 0;
    display: grid;
    place-items: center;
    min-height: 100dvh;
    padding: 20px;
    overflow-y: auto;
    background:
        radial-gradient(circle at 50% 34%, rgba(125, 60, 184, 0.25), transparent 42%),
        #0b0a0e;
    color: var(--ftc-text);
}

.ftc-age-gate[hidden],
html.ftc-age-confirmed .ftc-age-gate {
    display: none;
}

.ftc-age-gate__panel {
    width: min(100%, 430px);
    padding: clamp(24px, 7vw, 38px);
    border: 1px solid #4d3761;
    border-radius: 14px;
    background:
        radial-gradient(ellipse at 50% 0%, rgba(137, 69, 197, 0.2), transparent 48%),
        #151219;
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.58);
    text-align: center;
}

.ftc-age-gate__brand {
    margin: 0 0 20px;
    color: #d9b7ff;
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 0.1em;
}

.ftc-age-gate__title {
    margin: 0;
    color: #fff;
    font-size: clamp(22px, 6vw, 27px);
    line-height: 1.4;
    text-wrap: balance;
}

.ftc-age-gate__title:focus {
    outline: 0;
}

.ftc-age-gate__description {
    margin: 12px 0 0;
    color: #cec7d2;
    font-size: 14px;
    line-height: 1.7;
}

.ftc-age-gate__actions {
    display: grid;
    gap: 10px;
    margin-top: 26px;
}

.ftc-age-gate__button {
    width: 100%;
    min-height: 48px;
    padding: 10px 16px;
    border-radius: 8px;
    font-weight: 800;
    cursor: pointer;
}

.ftc-age-gate__button--primary {
    border: 1px solid #bd83fa;
    background: #8b45e5;
    color: #fff;
}

.ftc-age-gate__button--primary:hover {
    background: #a15aec;
}

.ftc-age-gate__button--secondary {
    border: 1px solid #504757;
    background: #211d25;
    color: #d0c9d4;
}

.ftc-age-gate__button--secondary:hover {
    border-color: #75677e;
    background: #2b2630;
    color: #fff;
}

.ftc-age-gate__legal {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 4px 13px;
    margin-top: 24px;
    padding-top: 18px;
    border-top: 1px solid #332b39;
}

.ftc-age-gate__legal a {
    color: #aaa2af;
    font-size: 11px;
    text-decoration: none;
}

.ftc-age-gate__legal a:hover {
    color: #d9b7ff;
}

.ftc-age-gate__denied {
    padding-block: 18px 8px;
}

@media (max-width: 420px) {
    .ftc-age-gate {
        padding: 14px;
    }

    .ftc-age-gate__panel {
        border-radius: 11px;
    }
}

.ftc-header-button {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--ftc-text);
    cursor: pointer;
}

.ftc-header-button:hover {
    background: var(--ftc-brand-soft);
}

.ftc-header-button svg {
    width: 22px;
    height: 22px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 2;
}

.ftc-header-button--menu {
    justify-self: end;
}

.ftc-header-button--search {
    justify-self: start;
}

.ftc-header-panel {
    position: fixed;
    z-index: 110;
    top: var(--ftc-header-height);
    right: 0;
    left: 0;
    display: none;
    max-height: calc(100dvh - var(--ftc-header-height));
    overflow-y: auto;
    border-bottom: 1px solid var(--ftc-border);
    background: #111014;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
}

.admin-bar .ftc-header-panel {
    top: calc(var(--ftc-header-height) + 32px);
}

.ftc-header-panel.is-open {
    display: block;
}

.ftc-header-panel__inner {
    width: min(100% - 28px, 720px);
    margin-inline: auto;
    padding-block: 18px 22px;
}

.ftc-search-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
}

.ftc-search-form input[type="search"] {
    width: 100%;
    min-height: 46px;
    padding: 10px 13px;
    border: 1px solid var(--ftc-border);
    border-radius: 8px;
    background: var(--ftc-surface);
    color: var(--ftc-text);
}

.ftc-button,
.ftc-search-form button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 9px 16px;
    border: 1px solid var(--ftc-brand);
    border-radius: 8px;
    background: var(--ftc-brand-strong);
    color: #fff;
    font-weight: 700;
    line-height: 1.35;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
}

.ftc-button:hover,
.ftc-search-form button:hover {
    background: var(--ftc-brand);
    color: #fff;
}

.ftc-header-menu,
.ftc-header-menu ul {
    padding: 0;
    margin: 0;
    list-style: none;
}

.ftc-header-menu a {
    display: block;
    min-height: 44px;
    padding: 10px 2px;
    border-bottom: 1px solid var(--ftc-border);
    color: var(--ftc-text);
    text-decoration: none;
}

/* Page headings and featured discovery */
.ftc-page-header {
    margin-bottom: 20px;
}

.ftc-page-title {
    margin: 0;
    font-size: clamp(22px, 6vw, 34px);
    line-height: 1.35;
}

.ftc-page-description {
    max-width: 720px;
    margin: 8px 0 0;
    color: var(--ftc-muted);
    font-size: 14px;
}

.ftc-discovery {
    display: grid;
    gap: 18px;
    margin-bottom: 32px;
}

.ftc-feature-section {
    min-width: 0;
    padding: 16px;
    border: 1px solid var(--ftc-border);
    border-radius: var(--ftc-radius);
    background: var(--ftc-surface);
}

.ftc-section-heading {
    display: flex;
    align-items: center;
    gap: 9px;
    margin: 0 0 14px;
    font-size: 19px;
    line-height: 1.3;
}

.ftc-section-heading::before {
    width: 4px;
    height: 1.15em;
    border-radius: 2px;
    background: var(--ftc-brand);
    content: "";
}

.ftc-feature-list {
    display: grid;
    gap: 12px;
}

.ftc-feature-card {
    display: grid;
    grid-template-columns: minmax(112px, 42%) minmax(0, 1fr);
    gap: 11px;
    align-items: start;
    color: var(--ftc-text);
    text-decoration: none;
}

.ftc-feature-card__thumb,
.ftc-video-card__thumb,
.ftc-related-card__thumb {
    position: relative;
    display: block;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: 7px;
    background: #050506;
}

.ftc-feature-card__thumb img,
.ftc-video-card__thumb img,
.ftc-related-card__thumb img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 180ms ease;
}

.ftc-feature-card:hover img,
.ftc-video-card:hover .ftc-video-card__thumb img,
.ftc-related-card:hover img {
    transform: scale(1.025);
}

.ftc-feature-card__title {
    display: -webkit-box;
    margin: 1px 0 6px;
    overflow: hidden;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.5;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.ftc-feature-card__date,
.ftc-video-card__date {
    color: var(--ftc-muted);
    font-size: 12px;
}

.ftc-content-section {
    margin-top: 30px;
}

/* Standard video list */
.ftc-video-list {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
}

.ftc-video-card {
    position: relative;
    display: grid;
    grid-template-columns: minmax(132px, 42%) minmax(0, 1fr);
    gap: 12px;
    min-height: 100px;
    padding: 10px;
    border: 1px solid var(--ftc-border);
    border-radius: var(--ftc-radius);
    background: var(--ftc-surface);
}

.ftc-video-card:hover {
    border-color: #59416c;
    background: var(--ftc-surface-raised);
}

.ftc-video-card__link {
    position: absolute;
    z-index: 1;
    inset: 0;
    border-radius: inherit;
}

.ftc-video-card__body {
    display: flex;
    min-width: 0;
    flex-direction: column;
}

.ftc-video-card__title {
    display: -webkit-box;
    margin: 0 0 7px;
    overflow: hidden;
    color: var(--ftc-text);
    font-size: clamp(14px, 4vw, 17px);
    font-weight: 700;
    line-height: 1.5;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.ftc-video-card__meta {
    margin-top: auto;
}

.ftc-tags {
    position: relative;
    z-index: 2;
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin: 0 0 7px;
}

.ftc-tag {
    display: inline-flex;
    align-items: center;
    max-width: 100%;
    min-height: 26px;
    padding: 3px 8px;
    overflow: hidden;
    border: 1px solid #6d4593;
    border-radius: 5px;
    background: var(--ftc-brand-soft);
    color: #d8b9ff;
    font-size: 11px;
    line-height: 1.2;
    text-decoration: none;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ftc-tag:hover,
.ftc-tag:focus-visible {
    border-color: var(--ftc-brand);
    background: var(--ftc-brand-strong);
    color: #fff;
}

.ftc-empty {
    padding: 28px 18px;
    border: 1px solid var(--ftc-border);
    border-radius: var(--ftc-radius);
    background: var(--ftc-surface);
    color: var(--ftc-muted);
    text-align: center;
}

/* Single video */
.ftc-single-layout {
    display: grid;
    width: min(100% - 28px, var(--ftc-max-width));
    margin-inline: auto;
}

.ftc-single {
    width: 100%;
    min-width: 0;
    background: transparent;
    color: var(--ftc-text);
}

.ftc-single-sidebar {
    display: none;
    min-width: 0;
}

.ftc-single-mobile-rankings {
    margin-top: 28px;
    padding-top: 24px;
    border-top: 1px solid var(--ftc-border);
}

.ftc-single-mobile-rankings .ftc-rankings {
    grid-template-columns: minmax(0, 1fr);
}

.ftc-single__title {
    margin: 0 0 17px;
    font-size: clamp(21px, 5.8vw, 34px);
    line-height: 1.4;
}

.ftc-video-player {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border: 1px solid var(--ftc-border);
    border-radius: var(--ftc-radius);
    background: #000;
}

.ftc-video-player iframe,
.ftc-video-player video,
.ftc-video-player img {
    display: block;
    width: 100%;
    height: 100%;
    border: 0;
    object-fit: cover;
}

.ftc-video-player .fluid_video_wrapper {
    width: 100% !important;
    height: 100% !important;
    container-type: size;
}

.ftc-video-player .fluid_nonLinear_ad,
.ftc-video-player .fluid_vpaidNonLinear_ad {
    max-width: calc(100% - 40px);
    max-height: calc(100% - 72px);
}

.ftc-video-player .fluid_nonLinear_ad img,
.ftc-video-player .fluid_vpaidNonLinear_ad img {
    width: auto !important;
    height: auto !important;
    max-width: min(300px, calc(100cqw - 40px));
    max-height: min(250px, calc(100cqh - 72px));
    object-fit: contain;
}

.ftc-video-player .fluid_nonLinear_ad .close_button,
.ftc-video-player .fluid_vpaidNonLinear_ad .close_button {
    top: -14px;
    right: -14px;
    width: 44px;
    min-width: 44px;
    height: 44px;
    min-height: 44px;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.72);
    border-radius: 50%;
    background-color: #17131c;
    background-size: 18px 18px;
    box-shadow: 0 5px 18px rgba(0, 0, 0, 0.5);
    touch-action: manipulation;
}

.ftc-video-player__link {
    display: block;
    width: 100%;
    height: 100%;
}

.ftc-video-player__embed {
    display: block;
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    border: 0;
    background: #000;
    color: inherit;
    cursor: pointer;
}

.ftc-video-player__embed:focus-visible {
    outline: 3px solid var(--ftc-brand);
    outline-offset: -3px;
}

.ftc-play-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    display: grid;
    place-items: center;
    width: 62px;
    height: 62px;
    border: 1px solid rgba(255, 255, 255, 0.45);
    border-radius: 50%;
    background: rgba(12, 9, 15, 0.78);
    color: #fff;
    font-size: 25px;
    transform: translate(-50%, -50%);
}

.ftc-single__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 14px;
}

.ftc-single__note {
    margin-top: 20px;
    padding: 13px 15px;
    border-left: 3px solid var(--ftc-brand);
    background: var(--ftc-surface);
    color: #d9d3dd;
}

.ftc-single__note > :first-child {
    margin-top: 0;
}

.ftc-single__note > :last-child {
    margin-bottom: 0;
}

.ftc-single__details {
    display: flex;
    flex-wrap: wrap;
    gap: 7px 18px;
    margin: 18px 0 0;
    color: var(--ftc-muted);
    font-size: 13px;
}

.ftc-single__tags {
    margin-top: 18px;
}

.ftc-single__tags .ftc-tag {
    min-height: 32px;
    padding-inline: 10px;
    font-size: 13px;
}

.ftc-related {
    margin-top: 36px;
    padding-top: 24px;
    border-top: 1px solid var(--ftc-border);
}

.ftc-related__grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px 10px;
}

.ftc-related-card {
    min-width: 0;
    color: var(--ftc-text);
    text-decoration: none;
}

.ftc-related-card__title {
    display: -webkit-box;
    margin-top: 7px;
    overflow: hidden;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.5;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

/* Optional ad hook: absent content creates no space. */
.ftc-ad-slot {
    min-width: 0;
    margin-block: 24px;
    padding: 12px;
    border: 1px solid var(--ftc-border);
    border-radius: var(--ftc-radius);
    background: #111014;
    overflow: hidden;
    contain: layout paint;
}

.ftc-ad-slot img,
.ftc-ad-slot iframe,
.ftc-ad-slot video {
    max-width: 100%;
}

.ftc-ad-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 22px;
}

.ftc-ad-grid .ftc-ad-slot {
    margin: 0;
}

.ftc-single__after-video-ads .ftc-ad-grid {
    grid-template-columns: minmax(0, 1fr);
    margin: 24px 0;
}

.ftc-home-latest > .ftc-ad-slot,
.ftc-single > .ftc-ad-slot {
    width: 100%;
}

.ftc-ad-slot::before {
    display: block;
    margin-bottom: 7px;
    color: var(--ftc-muted);
    content: "広告";
    font-size: 10px;
    letter-spacing: 0.08em;
}

/* Pagination */
.ftc-pagination {
    margin-top: 28px;
}

.ftc-pagination .page-numbers {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    padding: 0;
    margin: 0;
    list-style: none;
}

.ftc-pagination a,
.ftc-pagination span {
    display: grid;
    place-items: center;
    min-width: 42px;
    min-height: 42px;
    padding: 6px 10px;
    border: 1px solid var(--ftc-border);
    border-radius: 7px;
    background: var(--ftc-surface);
    color: var(--ftc-text);
    text-decoration: none;
}

.ftc-pagination .current {
    border-color: var(--ftc-brand);
    background: var(--ftc-brand-strong);
}

/* Generic pages */
.ftc-entry {
    width: min(100%, 760px);
}

.ftc-static-page {
    margin-inline: auto;
}

.ftc-static-page .ftc-page-title {
    margin-bottom: 24px;
}

.ftc-entry__content {
    color: #d9d4dc;
    font-size: 15px;
    line-height: 1.9;
}

.ftc-entry__content > * {
    max-width: 100%;
}

.ftc-entry__content p {
    margin: 0 0 1.15em;
}

.ftc-entry__content h2,
.ftc-contact h2 {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 34px 0 14px;
    color: var(--ftc-text);
    font-size: clamp(18px, 5vw, 22px);
    line-height: 1.45;
}

.ftc-entry__content h2::before,
.ftc-contact h2::before {
    width: 4px;
    height: 1.2em;
    flex: 0 0 auto;
    border-radius: 999px;
    background: var(--ftc-brand);
    box-shadow: 0 0 14px rgb(167 107 243 / 28%);
    content: "";
}

.ftc-entry__content a {
    color: #d9b7ff;
    text-underline-offset: 3px;
}

.ftc-link-directory {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 10px;
    padding: 0;
    margin: 0;
    list-style: none;
}

.ftc-link-directory a {
    display: flex;
    align-items: center;
    min-height: 44px;
    padding: 9px 12px;
    border: 1px solid var(--ftc-border);
    border-radius: 7px;
    background: var(--ftc-surface);
    color: #d9b7ff;
    overflow-wrap: anywhere;
    text-decoration: none;
}

.ftc-link-directory a:hover,
.ftc-link-directory a:focus-visible {
    border-color: #5c3e78;
    background: var(--ftc-brand-soft);
    color: var(--ftc-focus);
    text-decoration: underline;
}

.ftc-contact {
    margin-top: 34px;
    padding-top: 2px;
}

.ftc-contact__notice {
    margin: 0 0 18px;
    padding: 12px 14px;
    border: 1px solid var(--ftc-border);
    border-radius: 8px;
    background: var(--ftc-surface);
    color: var(--ftc-text);
    line-height: 1.6;
}

.ftc-contact__notice--success {
    border-color: #5c3e78;
    background: #21172c;
}

.ftc-contact__notice--error {
    border-color: #70404d;
    background: #25171b;
}

.ftc-contact-form {
    position: relative;
    display: grid;
    gap: 18px;
    padding: 18px;
    border: 1px solid var(--ftc-border);
    border-radius: var(--ftc-radius);
    background: var(--ftc-surface);
}

.ftc-contact-form__field {
    display: grid;
    gap: 7px;
}

.ftc-contact-form__field label {
    color: var(--ftc-text);
    font-size: 14px;
    font-weight: 700;
}

.ftc-contact-form__field label span {
    color: var(--ftc-muted);
    font-size: 12px;
    font-weight: 500;
}

.ftc-contact-form__field label strong {
    color: #d9b7ff;
    font-size: 12px;
}

.ftc-contact-form input,
.ftc-contact-form select,
.ftc-contact-form textarea {
    width: 100%;
    min-height: 46px;
    border: 1px solid #493c52;
    border-radius: 7px;
    outline: none;
    background: #0d0b10;
    color: var(--ftc-text);
    font: inherit;
}

.ftc-contact-form input,
.ftc-contact-form select {
    padding: 10px 12px;
}

.ftc-contact-form textarea {
    min-height: 180px;
    padding: 12px;
    resize: vertical;
    line-height: 1.65;
}

.ftc-contact-form input:focus,
.ftc-contact-form select:focus,
.ftc-contact-form textarea:focus {
    border-color: var(--ftc-focus);
    box-shadow: 0 0 0 3px rgb(167 107 243 / 18%);
}

.ftc-contact-form__submit {
    min-height: 48px;
    padding: 11px 22px;
    border: 1px solid #b786f3;
    border-radius: 8px;
    background: var(--ftc-brand-strong);
    color: #fff;
    font-weight: 800;
    cursor: pointer;
}

.ftc-contact-form__submit:hover {
    background: #9a59eb;
}

.ftc-contact-form__honeypot {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
    clip: rect(0 0 0 0) !important;
    clip-path: inset(50%) !important;
    white-space: nowrap !important;
}

/* Footer */
.ftc-site-footer {
    border-top: 1px solid var(--ftc-border);
    background: #09080b;
    color: var(--ftc-muted);
    font-size: 12px;
}

.ftc-site-footer__inner {
    width: min(100% - 28px, var(--ftc-max-width));
    margin-inline: auto;
    padding-block: 25px 30px;
}

.ftc-footer-menu,
.ftc-footer-menu ul {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 16px;
    padding: 0;
    margin: 0 0 18px;
    list-style: none;
}

.ftc-footer-menu a {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    color: #c9c2ce;
    text-decoration: none;
}

.ftc-site-footer__notice,
.ftc-site-footer__copyright {
    margin: 4px 0;
}

@media (min-width: 720px) {
    .ftc-shell {
        width: min(100% - 48px, var(--ftc-max-width));
    }

    .ftc-main {
        padding-block: 30px 68px;
    }

    .ftc-entry__content {
        font-size: 16px;
    }

    .ftc-contact-form {
        padding: 24px;
    }

    .ftc-discovery {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 20px;
    }

    .ftc-video-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 18px;
    }

    .ftc-video-card {
        grid-template-columns: minmax(150px, 42%) minmax(0, 1fr);
    }

    .ftc-video-card__title {
        font-size: 16px;
    }

    .ftc-related__grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 20px 14px;
    }

    .ftc-play-icon {
        width: 74px;
        height: 74px;
        font-size: 30px;
    }
}

@media (min-width: 480px) and (max-width: 899px) {
    .ftc-single-mobile-rankings .ftc-rankings {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 900px) {
    html,
    body {
        overflow-x: clip;
    }

    .ftc-single-layout {
        grid-template-columns: minmax(0, 3fr) minmax(220px, 1fr);
        gap: clamp(20px, 3vw, 34px);
        align-items: start;
    }

    .ftc-single-mobile-rankings {
        display: none;
    }

    .ftc-single-sidebar {
        display: block;
        align-self: stretch;
    }

    .ftc-single-sidebar__sticky {
        position: sticky;
        top: calc(var(--ftc-header-height) + 18px);
        max-height: calc(100vh - var(--ftc-header-height) - 36px);
        overflow-y: auto;
        overscroll-behavior: contain;
        scrollbar-width: thin;
    }

    .ftc-single__after-video-ads .ftc-ad-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .ftc-single__after-video-ads .ftc-ad-slot--single_after_video_right {
        grid-column: 2;
    }

    .admin-bar .ftc-single-sidebar__sticky {
        top: calc(var(--ftc-header-height) + 50px);
        max-height: calc(100vh - var(--ftc-header-height) - 68px);
    }
}

@media (max-width: 782px) {
    .admin-bar .ftc-site-header {
        top: 46px;
    }

    .admin-bar .ftc-header-panel {
        top: calc(var(--ftc-header-height) + 46px);
    }
}

@media (max-width: 380px) {
    .ftc-video-card {
        grid-template-columns: 42% minmax(0, 1fr);
        gap: 9px;
        padding: 8px;
    }

    .ftc-tag {
        min-height: 24px;
        padding-inline: 6px;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
    }
}

/* v1.2: newest-list front page and completed-period rankings */
.ftc-list-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
}

.ftc-list-header__count {
    flex: 0 0 auto;
    margin: 0;
    color: var(--ftc-muted);
    font-size: 13px;
}

.ftc-home-layout {
    display: grid;
    grid-template-columns: minmax(0, 3fr) minmax(72px, 1fr);
    gap: clamp(8px, 2.5vw, 22px);
    align-items: start;
}

.ftc-home-latest,
.ftc-rankings,
.ftc-ranking {
    min-width: 0;
}

.ftc-rankings {
    display: grid;
    gap: 22px;
}

.ftc-ranking {
    scroll-margin-top: calc(var(--ftc-header-height) + 10px);
}

.ftc-ranking__heading {
    margin: 0;
    color: var(--ftc-text);
    font-size: clamp(11px, 3vw, 16px);
    line-height: 1.35;
}

.ftc-ranking__period {
    margin: 3px 0 8px;
    overflow: hidden;
    color: var(--ftc-muted);
    font-size: 9px;
    line-height: 1.35;
    text-overflow: ellipsis;
}

.ftc-ranking__list {
    display: grid;
    gap: 7px;
    padding: 0;
    margin: 9px 0 0;
    list-style: none;
}

.ftc-ranking__item {
    min-width: 0;
}

.ftc-ranking-card {
    position: relative;
    display: block;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border: 1px solid var(--ftc-border);
    border-radius: 7px;
    background: #050506;
}

.ftc-ranking-card__image {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 180ms ease;
}

.ftc-ranking-card:hover .ftc-ranking-card__image {
    transform: scale(1.035);
}

.ftc-ranking-card__rank {
    position: absolute;
    top: 4px;
    left: 4px;
    display: grid;
    place-items: center;
    width: clamp(20px, 5vw, 28px);
    height: clamp(20px, 5vw, 28px);
    border: 1px solid rgba(255, 255, 255, 0.45);
    border-radius: 50%;
    background: rgba(66, 25, 105, 0.9);
    color: #fff;
    font-size: clamp(10px, 2.6vw, 13px);
    font-weight: 800;
    line-height: 1;
}

.ftc-ranking__empty {
    margin: 8px 0 0;
    color: var(--ftc-muted);
    font-size: 10px;
    line-height: 1.5;
}

.ftc-home-layout .ftc-video-list,
.ftc-related__list,
.ftc-video-list {
    grid-template-columns: minmax(0, 1fr);
}

.ftc-home-layout .ftc-video-card {
    grid-template-columns: minmax(90px, 40%) minmax(0, 1fr);
    gap: 8px;
    min-height: 0;
    padding: 8px;
}

.ftc-home-layout .ftc-video-card__title {
    margin-bottom: 5px;
    font-size: clamp(12px, 3.3vw, 16px);
}

.ftc-home-layout .ftc-tag {
    min-height: 22px;
    padding: 2px 5px;
    font-size: 9px;
}

.ftc-home-layout .ftc-video-card__date {
    font-size: 10px;
}

.ftc-related__list {
    gap: 12px;
}

.ftc-pagination {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    gap: 8px;
    align-items: center;
}

.ftc-pagination__link,
.ftc-pagination__position {
    display: grid;
    place-items: center;
    min-height: 42px;
    padding: 7px 10px;
    border: 1px solid var(--ftc-border);
    border-radius: 7px;
    background: var(--ftc-surface);
    color: var(--ftc-text);
    font-size: 13px;
    text-align: center;
    text-decoration: none;
}

.ftc-pagination__link:last-child {
    justify-self: stretch;
}

.ftc-pagination__position {
    min-width: 62px;
    color: var(--ftc-muted);
}

.ftc-pagination .ftc-pagination__spacer {
    min-width: 0;
    min-height: 0;
    padding: 0;
    border: 0;
    background: transparent;
}

.ftc-tag-index {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.ftc-tag-index__item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 7px;
    min-height: 44px;
    padding: 8px 10px;
    overflow: hidden;
    border: 1px solid #5a3b78;
    border-radius: 7px;
    background: var(--ftc-surface);
    color: #dec5ff;
    font-size: 13px;
    text-decoration: none;
}

.ftc-tag-index__item span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ftc-tag-index__item small {
    flex: 0 0 auto;
    color: var(--ftc-muted);
}

@media (min-width: 720px) {
    .ftc-home-layout {
        grid-template-columns: minmax(0, 3fr) minmax(160px, 1fr);
    }

    .ftc-home-layout .ftc-video-card {
        grid-template-columns: minmax(145px, 36%) minmax(0, 1fr);
        gap: 13px;
        padding: 10px;
    }

    .ftc-home-layout .ftc-tag {
        min-height: 25px;
        padding: 3px 7px;
        font-size: 10px;
    }

    .ftc-ranking__period,
    .ftc-ranking__empty {
        font-size: 11px;
    }

    .ftc-tag-index {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@media (max-width: 359px) {
    .ftc-home-layout {
        grid-template-columns: minmax(0, 1fr);
    }

    .ftc-rankings {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        padding-top: 22px;
        border-top: 1px solid var(--ftc-border);
    }

    .ftc-ranking__heading {
        font-size: 14px;
    }

    .ftc-ranking__period,
    .ftc-ranking__empty {
        font-size: 10px;
    }
}
