:root {
    --primary-color: #ff6b81;
    --primary-strong: #ff4565;
    --secondary-color: #151728;
    --background-color: #080b14;
    --surface-color: rgba(13, 18, 34, 0.82);
    --surface-strong: #10172b;
    --surface-soft: rgba(255, 255, 255, 0.06);
    --button-hover-color: #ff87a0;
    --container-bg: rgba(10, 15, 28, 0.9);
    --text-color: #f8f8fb;
    --text-muted: rgba(248, 248, 251, 0.72);
    --border-color: rgba(255, 255, 255, 0.12);
    --shadow-color: rgba(0, 0, 0, 0.35);
    --accent-glow: rgba(255, 107, 129, 0.28);
}

:root[data-theme="light"] {
    --background-color: #f7f4ee;
    --surface-color: rgba(255, 255, 255, 0.82);
    --surface-strong: #ffffff;
    --surface-soft: rgba(255, 107, 129, 0.08);
    --container-bg: rgba(255, 255, 255, 0.92);
    --text-color: #1d2333;
    --text-muted: rgba(29, 35, 51, 0.68);
    --border-color: rgba(29, 35, 51, 0.1);
    --shadow-color: rgba(33, 40, 60, 0.12);
    --accent-glow: rgba(255, 107, 129, 0.18);
}

* {
    box-sizing: border-box;
}

html {
    background:
        radial-gradient(circle at top left, rgba(255, 107, 129, 0.18), transparent 30%),
        radial-gradient(circle at top right, rgba(102, 204, 255, 0.14), transparent 28%),
        linear-gradient(180deg, #0c1020 0%, var(--background-color) 35%, #05070d 100%);
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--text-color);
    background: transparent;
    font-family: "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    transition: background-color 0.3s ease, color 0.3s ease;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    background:
        linear-gradient(120deg, rgba(255, 107, 129, 0.08), transparent 42%),
        radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.06), transparent 18%);
    pointer-events: none;
    z-index: -1;
}

.page-shell {
    width: min(1240px, calc(100% - 32px));
    margin: 0 auto;
    padding: 96px 0 48px;
}

#themeToggle {
    position: fixed;
    top: 20px;
    right: 20px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 18px;
    border: 1px solid var(--border-color);
    border-radius: 999px;
    background: rgba(15, 21, 38, 0.72);
    color: var(--text-color);
    backdrop-filter: blur(16px);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.18);
    cursor: pointer;
    font-size: 14px;
    font-weight: 700;
    transition: transform 0.25s ease, background 0.25s ease, border-color 0.25s ease;
    z-index: 20;
}

#themeToggle:hover {
    transform: translateY(-2px);
    background: rgba(20, 27, 47, 0.9);
    border-color: rgba(255, 255, 255, 0.22);
}

.site-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 28px;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 18px;
}

.site-logo {
    width: 68px;
    height: 68px;
    flex-shrink: 0;
    filter: drop-shadow(0 12px 24px var(--accent-glow));
}

.site-heading {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.site-eyebrow {
    margin: 0;
    color: var(--button-hover-color);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.site-title {
    margin: 0;
    font-size: clamp(32px, 5vw, 56px);
    line-height: 1;
    letter-spacing: -0.04em;
    text-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
}

.hero-badges {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px;
}

.hero-badge,
.caption-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border: 1px solid var(--border-color);
    border-radius: 999px;
    background: var(--surface-soft);
    color: var(--text-color);
    font-size: 13px;
    font-weight: 700;
    backdrop-filter: blur(8px);
}

.hero-copy {
    margin-bottom: 28px;
}

.hero-description {
    max-width: 760px;
    margin: 0 0 18px;
    color: var(--text-muted);
    font-size: 17px;
    line-height: 1.8;
}

.hero-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.stat-card,
.info-card {
    padding: 18px 20px;
    border: 1px solid var(--border-color);
    border-radius: 22px;
    background: var(--surface-color);
    backdrop-filter: blur(16px);
    box-shadow: 0 18px 60px var(--shadow-color);
}

.stat-label,
.info-card-title {
    display: block;
    margin-bottom: 10px;
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.stat-value {
    font-size: 22px;
    font-weight: 800;
}

.content-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(280px, 0.72fr);
    gap: 24px;
    align-items: start;
}

.player-panel {
    min-width: 0;
}

.video-container {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--border-color);
    border-radius: 28px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.08), transparent),
        var(--container-bg);
    box-shadow:
        0 28px 80px var(--shadow-color),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.player-stage {
    position: relative;
    isolation: isolate;
}

.player-stage::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at center, rgba(255, 107, 129, 0.12), transparent 34%),
        linear-gradient(180deg, rgba(0, 0, 0, 0.18), transparent 24%, rgba(0, 0, 0, 0.26));
    opacity: 0.9;
    pointer-events: none;
    z-index: 0;
}

.player-topbar {
    position: absolute;
    top: 16px;
    left: 16px;
    right: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    z-index: 4;
    pointer-events: none;
}

.live-badge,
.player-status-badge {
    display: inline-flex;
    align-items: center;
    padding: 9px 12px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(8, 11, 20, 0.58);
    color: #fff;
    backdrop-filter: blur(14px);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.live-badge::before {
    content: "";
    width: 8px;
    height: 8px;
    margin-right: 8px;
    border-radius: 50%;
    background: #ff4d6d;
    box-shadow: 0 0 0 6px rgba(255, 77, 109, 0.16);
    animation: pulseDot 1.8s infinite;
}

#main {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: min(72vh, 760px);
    position: relative;
    z-index: 1;
}

#player {
    width: 100%;
    height: 100%;
    max-height: 85vh;
    object-fit: contain;
    display: block;
    background: #03050a;
}

.player-cover,
.player-loading,
.player-error {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3;
    transition: opacity 0.32s ease, visibility 0.32s ease, transform 0.32s ease;
}

.player-cover {
    padding: 28px;
    background:
        radial-gradient(circle at center, rgba(255, 107, 129, 0.16), transparent 30%),
        linear-gradient(180deg, rgba(5, 8, 14, 0.36), rgba(5, 8, 14, 0.8));
}

.cover-glow {
    position: absolute;
    width: 360px;
    height: 360px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 107, 129, 0.28), transparent 62%);
    filter: blur(8px);
    animation: driftGlow 5s ease-in-out infinite alternate;
}

.cover-content {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    max-width: 480px;
    text-align: center;
}

.cover-kicker {
    display: inline-flex;
    align-items: center;
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: var(--button-hover-color);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.cover-title {
    margin: 0;
    font-size: clamp(28px, 4vw, 46px);
    line-height: 1.02;
    letter-spacing: -0.04em;
}

.cover-subtitle {
    margin: 0;
    color: rgba(255, 255, 255, 0.8);
    font-size: 15px;
    line-height: 1.8;
}

.cover-play {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 4px;
    padding: 15px 24px;
    border: 0;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-strong));
    color: #fff;
    font-size: 15px;
    font-weight: 800;
    box-shadow: 0 16px 34px rgba(255, 69, 101, 0.3);
    cursor: pointer;
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.cover-play:hover {
    transform: translateY(-2px) scale(1.01);
    box-shadow: 0 20px 40px rgba(255, 69, 101, 0.35);
}

.player-loading,
.player-error {
    flex-direction: column;
    gap: 14px;
    padding: 24px;
    text-align: center;
    color: #fff;
    background: rgba(3, 5, 10, 0.56);
    backdrop-filter: blur(10px);
    opacity: 0;
    visibility: hidden;
    transform: scale(0.98);
}

.loading-spinner {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    border: 3px solid rgba(255, 255, 255, 0.16);
    border-top-color: var(--primary-color);
    animation: spin 0.9s linear infinite;
}

.loading-copy,
.player-error {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.loading-copy strong,
.player-error strong {
    font-size: 18px;
    font-weight: 800;
}

.loading-copy span,
.player-error span {
    color: rgba(255, 255, 255, 0.76);
    font-size: 14px;
    line-height: 1.7;
}

.player-stage[data-player-state="idle"] .player-cover {
    opacity: 1;
    visibility: visible;
}

.player-stage[data-player-state="loading"] .player-loading,
.player-stage[data-player-state="waiting"] .player-loading,
.player-stage[data-player-state="error"] .player-error {
    opacity: 1;
    visibility: visible;
    transform: scale(1);
}

.player-stage[data-player-state="loading"] #player,
.player-stage[data-player-state="waiting"] #player {
    filter: saturate(0.9) blur(1px);
}

.player-stage[data-player-state="ready"] .player-cover,
.player-stage[data-player-state="ready"] .player-loading,
.player-stage[data-player-state="ready"] .player-error,
.player-stage[data-player-state="playing"] .player-cover,
.player-stage[data-player-state="playing"] .player-loading,
.player-stage[data-player-state="playing"] .player-error,
.player-stage[data-player-state="waiting"] .player-cover,
.player-stage[data-player-state="error"] .player-cover,
.player-stage[data-player-state="loading"] .player-cover {
    opacity: 0;
    visibility: hidden;
    transform: scale(1.02);
}

.player-caption {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 22px 22px;
    border-top: 1px solid var(--border-color);
    background: rgba(255, 255, 255, 0.03);
}

.player-caption p {
    margin: 0;
    color: var(--text-muted);
    font-size: 14px;
    line-height: 1.7;
}

.button-container {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 18px;
    position: relative;
    padding-top: 18px;
}

.button-container button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-width: 132px;
    padding: 14px 20px;
    border: 1px solid transparent;
    border-radius: 16px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.06));
    color: var(--text-color);
    box-shadow: 0 14px 32px rgba(0, 0, 0, 0.18);
    cursor: pointer;
    font-size: 15px;
    font-weight: 800;
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease, background 0.22s ease;
}

.button-container button:hover {
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, 0.18);
    box-shadow: 0 18px 36px rgba(0, 0, 0, 0.24);
}

.button-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    font-size: 12px;
    line-height: 1;
    flex-shrink: 0;
}

.button-label {
    white-space: nowrap;
}

.primary-action {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-strong));
    color: #fff;
}

.primary-action .button-icon,
.gender-button .button-icon,
.cover-play .button-icon,
#applySource .button-icon {
    background: rgba(255, 255, 255, 0.2);
}

.gender-button {
    background: linear-gradient(135deg, #ff8c42, #ff5d55) !important;
    color: #fff;
}

#sourceSelectContainer {
    position: absolute;
    left: 0;
    top: calc(100% + 12px);
    width: min(320px, 100%);
    padding: 16px;
    border: 1px solid var(--border-color);
    border-radius: 18px;
    background: var(--surface-strong);
    box-shadow: 0 22px 56px rgba(0, 0, 0, 0.28);
    display: none;
    z-index: 5;
}

#sourceSelectContainer.is-open {
    display: block;
}

#sourceSelectContainer::before {
    content: "";
    position: absolute;
    top: -8px;
    left: 32px;
    width: 16px;
    height: 16px;
    background: var(--surface-strong);
    border-top: 1px solid var(--border-color);
    border-left: 1px solid var(--border-color);
    transform: rotate(45deg);
}

#sourceSelect {
    width: 100%;
    margin-bottom: 12px;
    padding: 14px 16px;
    border: 1px solid var(--border-color);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-color);
    font-size: 15px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

#sourceSelect:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(255, 107, 129, 0.14);
}

#applySource {
    width: 100%;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-strong));
    color: #fff;
}

.info-panel {
    display: grid;
    gap: 16px;
}

.info-card p {
    margin: 0;
    color: var(--text-muted);
    line-height: 1.8;
}

.info-card-highlight {
    background:
        linear-gradient(180deg, rgba(255, 107, 129, 0.16), rgba(255, 107, 129, 0.04)),
        var(--surface-color);
}

.shortcut-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 12px;
}

.shortcut-list li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    color: var(--text-color);
    font-size: 14px;
}

.shortcut-list span {
    display: inline-flex;
    min-width: 64px;
    justify-content: center;
    padding: 8px 10px;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--button-hover-color);
    font-weight: 800;
}

.swipe-overlay {
    position: absolute;
    inset: 0;
    display: none;
    justify-content: center;
    align-items: center;
    font-size: 42px;
    font-weight: 800;
    color: #fff;
    background: linear-gradient(180deg, rgba(255, 107, 129, 0.24), rgba(9, 11, 20, 0.32));
    backdrop-filter: blur(6px);
    z-index: 4;
    pointer-events: none;
}

.swipe-notification {
    position: fixed;
    left: 50%;
    bottom: 22px;
    transform: translateX(-50%);
    display: none;
    width: min(92vw, 720px);
    padding: 14px 18px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 16px;
    background: rgba(12, 16, 29, 0.88);
    color: #fff;
    box-shadow: 0 18px 60px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(14px);
    text-align: center;
    font-size: 14px;
    font-weight: 700;
    z-index: 30;
}

.adsbygoogle {
    display: block;
    width: min(1240px, calc(100% - 32px));
    margin: 20px auto 32px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes pulseDot {
    0%,
    100% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.15);
        opacity: 0.85;
    }
}

@keyframes driftGlow {
    from {
        transform: translate3d(-16px, -8px, 0) scale(0.96);
    }

    to {
        transform: translate3d(20px, 10px, 0) scale(1.04);
    }
}

@media (max-width: 1080px) {
    .content-grid {
        grid-template-columns: 1fr;
    }

    .hero-stats {
        grid-template-columns: 1fr;
    }

    .info-panel {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 768px) {
    .page-shell {
        width: min(100% - 20px, 1240px);
        padding-top: 84px;
    }

    #themeToggle {
        top: 12px;
        right: 12px;
        padding: 10px 14px;
        font-size: 13px;
    }

    .site-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .site-logo {
        width: 56px;
        height: 56px;
    }

    .hero-badges {
        justify-content: flex-start;
    }

    #main {
        min-height: 52vh;
    }

    .video-container {
        border-radius: 22px;
    }

    .player-topbar {
        top: 12px;
        left: 12px;
        right: 12px;
    }

    .cover-content {
        gap: 12px;
    }

    .cover-subtitle {
        font-size: 14px;
    }

    .player-caption {
        flex-direction: column;
        align-items: flex-start;
    }

    .button-container {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .button-container button {
        width: 100%;
        min-width: 0;
        padding: 13px 14px;
        font-size: 14px;
    }

    .button-icon {
        width: 22px;
        height: 22px;
    }

    #sourceSelectContainer {
        left: 0;
        right: 0;
        width: 100%;
    }

    .info-panel {
        grid-template-columns: 1fr;
    }

    .shortcut-list li {
        font-size: 13px;
    }

    .shortcut-list span {
        min-width: 56px;
    }
}
