/* ========================================
   MettShort - Page Styles
   Detail, search, watch, auth, user, store/legal/profile
   ======================================== */

/* ========== Drama Detail ========== */
.drama-detail {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 20px 28px 48px;
}

.detail-breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 20px;
}
.detail-breadcrumb a {
    color: var(--text-secondary);
    transition: var(--transition);
}
.detail-breadcrumb a:hover { color: var(--accent); }

.detail-hero {
    display: flex;
    gap: 28px;
    margin-bottom: 36px;
}

.detail-cover {
    flex-shrink: 0;
    width: 200px;
    aspect-ratio: 2/3;
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: var(--bg-secondary);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}
.detail-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.3s ease, transform 0.3s ease;
}
.detail-cover:hover img {
    transform: scale(1.03);
}

.detail-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.detail-title {
    font-size: 26px;
    font-weight: 800;
    line-height: 1.25;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

.detail-stats-bar {
    display: flex;
    align-items: center;
    gap: 20px;
    font-size: 14px;
    color: var(--text-secondary);
}

.detail-stats-bar .stat-item {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.detail-stats-bar svg {
    opacity: 0.6;
}

.stat-share {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 14px;
    cursor: pointer;
    padding: 0;
    transition: var(--transition);
}
.stat-share:hover { color: var(--accent); }

.detail-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.detail-chip {
    display: inline-flex;
    align-items: center;
    padding: 5px 14px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    border-radius: 20px;
    font-size: 12px;
    color: var(--text-secondary);
    transition: var(--transition);
    white-space: nowrap;
}
.detail-chip:hover {
    border-color: var(--accent);
    color: var(--text-primary);
    background: rgba(232, 58, 87, 0.08);
}

.detail-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 4px;
}

.btn-watch {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 28px;
    background: linear-gradient(135deg, #ff4d6d, #e83a57);
    color: white;
    border-radius: 24px;
    font-size: 15px;
    font-weight: 600;
    transition: var(--transition);
    text-decoration: none;
    box-shadow: 0 4px 16px rgba(232, 58, 87, 0.3);
}
.btn-watch:hover {
    filter: brightness(1.1);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(232, 58, 87, 0.4);
}

.detail-actions .btn-action {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    background: var(--bg-card);
    color: var(--text-secondary);
    border: 1px solid var(--border);
    border-radius: 24px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}
@media (hover: hover) {
    .detail-actions .btn-action:hover {
        border-color: var(--accent);
        color: var(--text-primary);
    }
}
.detail-actions .btn-action#btnLike.active {
    color: #ff4d6d;
    border-color: var(--border);
    background: rgba(255,77,109,0.1);
}
.detail-actions .btn-action#btnFavorite.active {
    color: #fbbf24;
    border-color: var(--border);
    background: rgba(251,191,36,0.1);
}

.btn-download {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: var(--bg-card);
    color: var(--text-secondary);
    border: 1px solid var(--border);
    border-radius: 24px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}
.btn-download:hover {
    border-color: var(--accent);
    color: var(--text-primary);
}

.detail-section {
    margin-bottom: 32px;
}

.detail-section-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 12px;
    letter-spacing: -0.01em;
}

.detail-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}
.detail-section-count {
    font-size: 13px;
    color: var(--text-muted);
    cursor: pointer;
}
.detail-section-count:hover { color: var(--accent); }

.detail-plot {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.7;
}
.detail-plot-wrap {
    position: relative;
}
.detail-plot-wrap:not(.expanded) .detail-plot {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.detail-plot-wrap:not(.expanded) .plot-toggle {
    position: relative;
}
.plot-toggle {
    display: inline-block;
    background: none;
    border: none;
    color: var(--accent);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    padding: 4px 0;
    margin-top: 4px;
    transition: var(--transition);
}
.plot-toggle:hover {
    color: var(--accent-hover);
}

.episodes-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.ep-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 16px;
    min-width: 70px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 13px;
    color: var(--text-secondary);
    transition: var(--transition);
    text-decoration: none;
}
.ep-btn:hover {
    border-color: var(--accent);
    color: var(--text-primary);
}

.related-list {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 16px;
}

.related-card {
    cursor: pointer;
    transition: transform 0.2s ease;
}
@media (hover: hover) {
    .related-card:hover {
        transform: translateY(-4px);
    }
}

.related-thumb {
    width: 100%;
    aspect-ratio: 2/3;
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--bg-secondary);
    margin-bottom: 8px;
    position: relative;
}
.related-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.3s ease, transform 0.3s ease;
}
@media (hover: hover) {
    .related-card:hover .related-thumb img { transform: scale(1.05); }
}

.related-hover-overlay {
    position: absolute;
    inset: 0;
    background: rgba(30,30,35,0.88);
    opacity: 0;
    transition: opacity 0.25s ease;
    display: flex;
    align-items: flex-end;
    padding: 12px;
    pointer-events: none;
}
@media (hover: hover) {
    .related-card:hover .related-hover-overlay {
        opacity: 1;
        pointer-events: auto;
    }
}
.related-hover-inner {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.related-hover-title {
    font-size: 12px;
    color: rgba(255,255,255,0.7);
    font-weight: 500;
}
.related-hover-desc {
    font-size: 12px;
    color: rgba(255,255,255,0.55);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.related-hover-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 4px;
}
.related-hover-playbtn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 12px;
    border-radius: 20px;
    background: rgba(255,255,255,0.18);
    color: #fff;
    font-size: 12px;
    text-decoration: none;
    border: 1px solid rgba(255,255,255,0.25);
    transition: background 0.2s ease;
}
.related-hover-playbtn:hover { background: rgba(255,255,255,0.3); }
.related-hover-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(255,255,255,0.12);
    color: #fff;
    cursor: pointer;
    transition: background 0.2s ease;
}
.related-hover-icon:hover { background: rgba(255,255,255,0.25); }

.related-title {
    display: block;
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.2s ease;
}
@media (hover: hover) {
    .related-card:hover .related-title { color: var(--accent); }
}

.desktop-only { display: flex; }
.mobile-only { display: none; }

.detail-mobile-actions {
    display: none;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
}

.btn-watch-mobile {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 24px;
    background: linear-gradient(135deg, #ff4d6d, #e83a57);
    color: white;
    border-radius: 24px;
    font-size: 16px;
    font-weight: 600;
    transition: var(--transition);
    text-decoration: none;
    width: 100%;
    box-shadow: 0 4px 16px rgba(232, 58, 87, 0.3);
}
.btn-watch-mobile:hover {
    filter: brightness(1.1);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(232, 58, 87, 0.4);
}

.detail-mobile-subactions {
    display: flex;
    gap: 10px;
}

.btn-like,
.btn-addlist,
.btn-share {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 11px 16px;
    background: var(--bg-card);
    color: var(--text-secondary);
    border: 1px solid var(--border);
    border-radius: 24px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}
@media (hover: hover) {
    .btn-like:hover,
    .btn-addlist:hover,
    .btn-share:hover {
        border-color: var(--accent);
        color: var(--text-primary);
    }
}
.btn-like.active {
    border-color: var(--border);
    color: #ff4d6d;
    background: rgba(255,77,109,0.1);
}
.btn-addlist.active {
    border-color: var(--border);
    color: #fbbf24;
    background: rgba(251,191,36,0.1);
}

/* Copy Toast */
.copy-toast {
    position: fixed;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: rgba(0,0,0,0.8);
    color: #fff;
    padding: 10px 24px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.3s, transform 0.3s;
    pointer-events: none;
    min-width: 200px;
    max-width: 80vw;
    text-align: center;
    white-space: nowrap;
}
.copy-toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* Detail Responsive */
@media (max-width: 768px) {
    .drama-detail {
        padding: 12px 16px 36px;
    }
    .drama-detail .detail-breadcrumb {
        display: none;
    }
    .drama-detail .detail-hero {
        flex-direction: column;
        align-items: center;
        gap: 16px;
        margin-bottom: 24px;
    }
    .drama-detail .detail-cover {
        width: 220px;
        align-self: center;
    }
    .drama-detail .detail-info {
        width: 100%;
        align-items: center;
        text-align: center;
    }
    .drama-detail .detail-title {
        font-size: 22px;
    }
    .drama-detail .detail-stats-bar {
        font-size: 13px;
        gap: 20px;
        justify-content: center;
    }
    .drama-detail .detail-chips {
        justify-content: center;
    }
    .drama-detail .detail-chip {
        font-size: 11px;
        padding: 4px 10px;
    }

    .desktop-only { display: none !important; }
    .mobile-only { display: flex !important; }
    .detail-mobile-actions { display: flex; }

    .detail-chips.mobile-only {
        margin-bottom: 18px;
    }

    .related-list {
        grid-template-columns: repeat(3, 1fr);
        gap: 12px;
    }

    .btn-watch, .btn-download {
        font-size: 13px;
        padding: 8px 16px;
    }
    .ep-btn {
        font-size: 12px;
        padding: 6px 12px;
        min-width: 60px;
    }

    .detail-section-title {
        font-size: 16px;
    }
    .detail-plot {
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .drama-detail .detail-cover {
        width: 180px;
    }
    .drama-detail .detail-title {
        font-size: 19px;
    }
    .drama-detail .detail-actions {
        gap: 8px;
    }
    .btn-watch, .btn-download {
        font-size: 12px;
        padding: 7px 14px;
    }
    .btn-watch-mobile {
        font-size: 15px;
        padding: 12px 20px;
    }
    .btn-like,
    .btn-addlist,
    .btn-share {
        font-size: 13px;
        padding: 10px 12px;
    }
    .related-title {
        font-size: 12px;
    }
}

/* ========== Search Page ========== */
.search-page {
    max-width: var(--max-width);
    margin: 0 auto;
    min-height: calc(100vh - var(--header-height) - 200px);
    padding: 0 24px;
}

.search-breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 16px 0 8px;
    font-size: 14px;
    color: var(--text-muted);
}
.search-breadcrumb a {
    color: var(--text-secondary);
}
.search-breadcrumb a:hover {
    color: var(--accent);
}
.search-breadcrumb span {
    color: var(--text-muted);
}

.search-top {
    padding: 12px 0 16px;
}

.search-bar {
    display: flex;
    align-items: center;
    background: #000;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 4px 6px 4px 16px;
    max-width: 600px;
    transition: var(--transition);
}
.search-bar:focus-within {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(232, 58, 87, 0.12);
}
.search-bar-icon {
    color: var(--text-muted);
    flex-shrink: 0;
}
.search-bar input {
    flex: 1;
    background: #000;
    border: none;
    color: #fff;
    padding: 10px 12px;
    font-size: 16px;
    outline: none;
    min-width: 0;
    -webkit-appearance: none;
}
.search-bar input::placeholder { color: var(--text-muted); }
.search-bar input:-webkit-autofill,
.search-bar input:-webkit-autofill:hover,
.search-bar input:-webkit-autofill:focus {
    -webkit-text-fill-color: #fff !important;
    -webkit-box-shadow: 0 0 0px 1000px #000 inset !important;
    background-color: #000 !important;
    color: #fff !important;
    transition: background-color 5000s ease-in-out 0s;
}

.search-clear {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-hover);
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px;
    border-radius: 50%;
    flex-shrink: 0;
    width: 24px;
    height: 24px;
}
.search-clear:hover { color: var(--text-primary); background: var(--border); }

.search-tabs {
    display: flex;
    flex-direction: column;
    gap: 8px;
    border-bottom: 1px solid var(--border);
    padding-bottom: 12px;
    margin-bottom: 16px;
}

.search-tab-group {
    display: flex;
    align-items: flex-start;
    gap: 0;
}

.search-tab-label {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
    margin-right: 8px;
    flex-shrink: 0;
}

.search-tab-wrap {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    max-height: 68px;
    position: relative;
}

.search-tab-wrap.expanded {
    max-height: none;
    overflow: visible;
}

.search-tab-options {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.search-tab-opt {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    padding: 4px 12px;
    border-radius: 14px;
    border: 1px solid var(--border);
    background: transparent;
    transition: var(--transition);
    white-space: nowrap;
    flex-shrink: 0;
    height: 30px;
    line-height: 20px;
    box-sizing: border-box;
}

.search-tab-expand {
    display: none;
    align-items: center;
    justify-content: center;
    height: 30px;
    border-radius: 14px;
    border: 1px solid var(--border);
    background: var(--bg-secondary);
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
    padding: 4px 10px;
    box-sizing: border-box;
    flex-shrink: 0;
    font-size: 13px;
    font-weight: 500;
    line-height: 20px;
    white-space: nowrap;
}

.search-tab-expand.expanded {
    /* no special positioning needed, stays in flow */
}

.search-tab-expand:hover {
    border-color: var(--accent);
    color: var(--text-primary);
}

.search-tab-expand svg {
    transition: transform 0.3s ease;
    margin-left: 2px;
}

.search-tab-expand.expanded svg {
    transform: rotate(180deg);
}

.search-tab-opt:hover {
    color: var(--text-primary);
    border-color: var(--accent);
}

.search-tab-opt.active {
    color: white;
    background: var(--accent);
    border-color: var(--accent);
    font-weight: 600;
}

.search-section {
    padding: 0 0 24px;
}

.search-section-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--accent);
    margin-bottom: 16px;
}

/* Hot Movie */
.search-hot-movie {
    margin: 0 0 16px;
}

.search-hot-movie-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 10px;
}

.search-hot-movie-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.search-hot-movie-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 13px;
    color: var(--text-primary);
    text-decoration: none;
    transition: var(--transition);
    white-space: nowrap;
}
.search-hot-movie-item:hover {
    background: var(--bg-hover);
    border-color: var(--accent);
}

.search-hot-movie-fire {
    font-size: 13px;
    line-height: 1;
}

.search-hot-movie-name {
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 200px;
}

.search-empty {
    text-align: center;
    padding: 60px 16px;
}
.search-empty h3 {
    font-size: 18px;
    font-weight: 700;
    margin: 16px 0 8px;
}
.search-empty p {
    font-size: 14px;
    color: var(--text-muted);
}
.search-empty a {
    color: var(--accent);
    font-weight: 600;
}
.search-empty a:hover { text-decoration: underline; }

/* Search Responsive */
@media (max-width: 768px) {
    .search-page {
        padding: 0 16px;
    }
    .search-bar {
        background: #000;
    }
    .search-bar input {
        background: #000;
        color: #fff;
        -webkit-appearance: none;
    }
    .search-tab-label {
        font-size: 14px;
        margin-right: 6px;
    }
    /* Mobile: horizontal scroll, no wrap */
    .search-tab-wrap {
        max-height: none;
        overflow: visible;
    }
    .search-tab-options {
        flex-wrap: nowrap;
        overflow-x: auto;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }
    .search-tab-options::-webkit-scrollbar { display: none; }
    .search-tab-expand {
        display: none !important;
    }
    .search-tab-opt {
        font-size: 12px;
        padding: 3px 8px;
        height: 28px;
        line-height: 20px;
    }
}

@media (max-width: 480px) {
    .search-tab-label {
        font-size: 15px;
    }
    .search-tab-opt {
        font-size: 11px;
        padding: 2px 6px;
        height: 26px;
        line-height: 20px;
    }
}

/* ========== Watch Page ========== */
.watch-page {
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0;
    height: calc(100vh - var(--header-height));
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.watch-layout {
    display: flex;
    flex: 1;
    min-height: 0;
}

.watch-left {
    flex: 1;
    min-width: 0;
    background: var(--bg-primary);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* --- Player styles moved to play.css --- */

.watch-right {
    width: 480px;
    min-width: 320px;
    max-width: 768px;
    background: var(--bg-primary);
    border-left: 1px solid var(--border);
    overflow-y: auto;
}
.watch-right-inner {
    width: 100%;
    padding: 20px 18px 20px 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.watch-breadcrumb {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: rgba(255,255,255,0.5);
    flex-wrap: wrap;
    padding: 12px 16px;
    flex-shrink: 0;
}
.watch-breadcrumb a {
    color: rgba(255,255,255,0.5);
    transition: var(--transition);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 140px;
}
.watch-breadcrumb a:hover { color: var(--accent); }
.watch-breadcrumb .bc-sep { color: rgba(255,255,255,0.3); }
.watch-breadcrumb .bc-current { color: var(--text-primary); }

.watch-title {
    font-size: 18px;
    font-weight: 600;
    line-height: 1.35;
    color: var(--text-primary);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.watch-ep-section {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.watch-ep-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.watch-ep-tabs {
    display: flex;
    gap: 0;
}

.ep-tab {
    padding: 6px 0;
    font-size: 14px;
    font-weight: 500;
    color: rgba(255,255,255,0.5);
    cursor: pointer;
    min-width: 60px;
    transition: var(--transition);
}
.ep-tab.active {
    color: var(--text-primary);
}
.ep-tab:hover {
    color: var(--text-primary);
}

.watch-all-eps {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    font-size: 12px;
    color: rgba(255,255,255,0.5);
    transition: var(--transition);
}
.watch-all-eps:hover { color: var(--accent); }

.watch-ep-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 6px;
}

.ep-grid-cell {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 1.33;
    background: rgba(255,255,255,0.1);
    border: 1px solid transparent;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 600;
    color: rgba(255,255,255,0.9);
    text-decoration: none;
    transition: var(--transition);
}
.ep-grid-cell:hover {
    color: var(--text-primary);
    background: rgba(255,255,255,0.15);
}
.ep-grid-cell.active {
    background: radial-gradient(116.67% 135.17% at 95.16% 96%, rgba(255,61,93,0.32) 0%, rgba(45,45,45,0) 80%);
    color: var(--accent);
    border-color: rgba(255,61,93,0.4);
}
.ep-grid-cell .ep-cell-num {
    font-size: 14px;
}
.ep-grid-cell.ep-hidden {
    display: none !important;
}

.ep-lock-badge {
    position: absolute;
    bottom: 2px;
    right: 2px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 14px;
    height: 14px;
    background: #E52E2E;
    border-radius: 2px;
}

.ep-purchased-badge {
    position: absolute;
    bottom: 2px;
    right: 2px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 14px;
    height: 14px;
    background: rgba(76, 175, 80, 0.2);
    border-radius: 2px;
}

.ep-grid-cell.ep-purchased {
    border-color: rgba(76, 175, 80, 0.4);
    background: rgba(76, 175, 80, 0.08);
}

.watch-separator {
    height: 1px;
    background: rgba(255,255,255,0.2);
}

.watch-actions-row {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px 0;
    gap: 80px;
}
.watch-action-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    background: none;
    border: none;
    color: rgba(255,255,255,0.9);
    cursor: pointer;
    transition: var(--transition);
    padding: 0;
}
.watch-action-item:hover {
    color: var(--accent);
}
.watch-action-item svg {
    opacity: 0.5;
}
.watch-action-item#btnLike:hover {
    color: #ff6b8a;
}
.watch-action-item#btnLike:hover .action-count {
    color: #ff6b8a;
}
.action-count,
.action-label {
    font-size: 14px;
    color: rgba(255,255,255,0.9);
}
.watch-action-item:hover .action-count,
.watch-action-item:hover .action-label {
    color: var(--accent);
}
.watch-action-item.active svg {
    opacity: 1;
    filter: drop-shadow(0 0 6px currentColor);
}
.watch-action-item#btnLike.active {
    color: #ff4d6d;
}
.watch-action-item#btnLike.active .action-count {
    color: #ff4d6d;
}
.watch-action-item#btnFavorite.active {
    color: #fbbf24;
}
.watch-action-item#btnFavorite.active .action-count {
    color: #fbbf24;
}

.watch-plot-section {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.watch-plot-title {
    font-size: 14px;
    font-weight: 400;
    color: var(--text-primary);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.watch-plot {
    font-size: 12px;
    color: rgba(255,255,255,0.5);
    line-height: 1.6;
}
.watch-plot-wrap {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.watch-plot-wrap:not(.expanded) .watch-plot {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.watch-plot-toggle {
    display: inline-flex;
    align-self: flex-start;
    background: none;
    border: none;
    color: var(--accent);
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    padding: 0;
    transition: var(--transition);
}
.watch-plot-toggle:hover { color: var(--accent-hover); }

.watch-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.watch-tag {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    background: rgba(255,255,255,0.1);
    border-radius: 4px;
    font-size: 13px;
    color: rgba(255,255,255,0.8);
    transition: var(--transition);
    white-space: nowrap;
    max-width: 152px;
    overflow: hidden;
    text-overflow: ellipsis;
}
.watch-tag:hover {
    color: #E52E2E;
}

/* Watch Paywall */
.watch-paywall {
    position: fixed;
    inset: 0;
    z-index: 100;
}

.paywall-mask {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.45);
    z-index: 100;
    transition: opacity 0.25s;
}

.paywall-content {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 101;
    text-align: left;
    width: 100%;
    max-width: 640px;
    height: 80vh;
    margin: 0 auto;
    background: #1c1c1e;
    border-radius: 16px 16px 0 0;
    animation: slideUp 0.3s ease-out;
    color: #fff;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    padding-bottom: env(safe-area-inset-bottom);
}

@media (min-width: 769px) {
    .paywall-content {
        top: 50%;
        bottom: auto;
        left: 50%;
        right: auto;
        transform: translate(-50%, -50%);
        height: auto;
        max-height: 80vh;
        border-radius: 16px;
        animation: fadeInScale 0.3s ease-out;
    }
    @keyframes fadeInScale {
        from { opacity: 0; transform: translate(-50%, -50%) scale(0.95); }
        to { opacity: 1; transform: translate(-50%, -50%) scale(1); }
    }
    @keyframes fadeOutScale {
        from { opacity: 1; transform: translate(-50%, -50%) scale(1); }
        to { opacity: 0; transform: translate(-50%, -50%) scale(0.95); }
    }
}

.paywall-scroll {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    padding: 0 16px 12px;
}

@keyframes slideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

@keyframes slideDown {
    from { transform: translateY(0); }
    to { transform: translateY(100%); }
}

.paywall-header {
    position: sticky;
    top: 0;
    z-index: 99;
    background: #1c1c1e;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 0 12px;
}
.paywall-price-info {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    color: rgba(255,255,255,0.9);
    flex-wrap: nowrap;
    white-space: nowrap;
}
.paywall-price-info > span {
    display: flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
    flex-shrink: 0;
}
.paywall-price-info .paywall-coin { color: #ffc107; }
.paywall-divider {
    background: rgba(255,255,255,0);
    color: rgba(255,255,255,0.2);
    flex-shrink: 0;
    align-self: center;
    font-size: 12px;
    line-height: 1;
}
.paywall-close {
    width: 24px;
    height: 24px;
    background: none;
    border: none;
    color: rgba(255,255,255,0.9);
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}
.paywall-header-line {
    width: calc(100% + 32px);
    margin-left: -16px;
    height: 1px;
    background: rgba(255,255,255,0.1);
    margin-bottom: 12px;
}

.paywall-vip-title {
    font-size: 16px;
    font-weight: 700;
    color: rgba(255,255,255,0.9);
    margin-bottom: 2px;
}
.paywall-vip-sub {
    font-size: 12px;
    color: rgba(255,255,255,0.5);
    margin-bottom: 8px;
}
.paywall-vip-cards {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    margin-bottom: 16px;
}
@media (min-width: 480px) {
    .paywall-vip-cards { grid-template-columns: 1fr 1fr; }
}
.paywall-vip-card {
    background: linear-gradient(180deg, #FFEDD5 0%, #F3CB93 49.68%);
    border-radius: 4px;
    color: #401A06;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    padding: 16px 16px 40px 16px;
    border: 1px solid transparent;
    transition: border-color 0.2s;
}

.paywall-vip-card:hover { border-color: #fff; }

.paywall-vip-card-info {
    position: relative;
    z-index: 1;
}
.paywall-vip-plan { font-size: 14px; font-weight: 400; margin-bottom: 0; }
.paywall-vip-price { font-size: 20px; font-weight: 700; }
.paywall-vip-original { font-size: 12px; font-weight: 400; color: rgba(64,26,6,0.5); text-decoration: line-through; margin-left: 4px; }
.paywall-vip-first-badge { font-size: 10px; font-weight: 600; color: #fff; background: #e53e3e; border-radius: 3px; padding: 1px 5px; margin-left: 6px; vertical-align: middle; }
.paywall-vip-desc {
    font-size: 10px;
    font-weight: 400;
    color: rgba(64,26,6,0.7);
    line-height: 1.4;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}
.paywall-vip-tags {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    background: rgba(255,255,255,0.2);
    padding: 8px 16px;
    font-size: 10px;
    font-weight: 500;
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
    gap: 4px;
}
.paywall-vip-tags span { display: flex; align-items: center; gap: 2px; }

.paywall-coins-title {
    font-size: 16px;
    font-weight: 700;
    color: rgba(255,255,255,0.9);
    margin-bottom: 8px;
}
.paywall-coin-cards {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 4px;
}
.paywall-coin-cards::-webkit-scrollbar { display: none; }
.paywall-coin-card {
    background: #2c2c2e;
    border-radius: 4px;
    padding: 16px 16px 12px;
    position: relative;
    cursor: pointer;
    border: 1px solid transparent;
    transition: border-color 0.2s;
    flex-shrink: 0;
    width: 130px;
}

@media (min-width: 769px) {
    .paywall-coin-cards {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        overflow-x: visible;
    }
    .paywall-coin-card {
        width: auto;
        flex-shrink: 1;
    }
}
.paywall-coin-card:hover { border-color: #fff; }

/* Pay lock animation */
.pay-locking {
    position: relative;
    opacity: 1 !important;
    overflow: hidden;
}
.pay-locking::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.4);
    border-radius: inherit;
    z-index: 10;
    animation: payLockPulse 1.2s ease-in-out infinite;
}
.pay-locking::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 32px;
    height: 32px;
    margin: -16px 0 0 -16px;
    z-index: 11;
    background: url("data:image/svg+xml,%3Csvg width='32' height='32' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='5' y='11' width='14' height='10' rx='2'/%3E%3Cpath d='M7 11V7a5 5 0 0 1 10 0v4'/%3E%3C/svg%3E") no-repeat center;
    background-size: 28px 28px;
    animation: payLockIcon 1.2s ease-in-out infinite;
}
@keyframes payLockPulse {
    0%, 100% { background: rgba(0,0,0,0.35); }
    50% { background: rgba(0,0,0,0.55); }
}
@keyframes payLockIcon {
    0%, 100% { transform: scale(1); opacity: 0.9; }
    50% { transform: scale(1.1); opacity: 1; }
}
.pay-locked-dim {
    opacity: 0.35 !important;
    pointer-events: none;
}

.paywall-coin-badge {
    position: absolute;
    top: 0;
    right: 0;
    background: linear-gradient(90deg, #E52E2E 0%, #EB4C46 100%);
    color: #fff;
    font-size: 10px;
    font-weight: 500;
    padding: 0 8px;
    height: 16px;
    line-height: 16px;
    border-radius: 0 4px 0 4px;
}
.paywall-coin-amount {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 4px;
    color: #fff;
}
.paywall-coin-lg { font-size: 16px; }
.paywall-coin-details {
    font-size: 10px;
    color: rgba(255,255,255,0.5);
    line-height: 1.4;
    min-height: 34px;
}
.paywall-coin-price {
    font-size: 16px;
    font-weight: 500;
    margin-top: 8px;
    color: rgba(255,255,255,0.9);
    text-align: right;
}

.paywall-more-plan {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 16px 0;
    color: rgba(255,255,255,0.5);
    font-size: 14px;
    cursor: pointer;
}
.paywall-more-plan svg { opacity: 0.6; }

.paywall-payment {
    margin-top: 8px;
}
.paywall-payment-title {
    font-size: 16px;
    font-weight: 700;
    color: rgba(255,255,255,0.9);
    margin-bottom: 8px;
}
.paywall-payment-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}
.paywall-payment-item {
    background: #9e9e9e;
    border-radius: 4px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    cursor: pointer;
    border: 1px solid transparent;
    transition: border-color 0.2s;
    font-size: 12px;
    font-weight: 700;
    color: rgba(255,255,255,0.9);
}
.paywall-payment-item:hover { border-color: #fff; }
.paywall-payment-item.active { border-color: rgba(255,255,255,0.9); background: #ffc107; }
.paywall-payment-icon {
    width: 20px;
    height: 16px;
}
.paywall-payment-icon-wide {
    width: 56px;
    height: 22px;
}

/* --- Player lock styles moved to play.css --- */

.watch-cost-notice,
.watch-vip-notice {
    text-align: center;
    padding: 10px 16px;
    font-size: 13px;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border);
}
.watch-cost-notice { color: var(--text-secondary); }
.watch-vip-notice { color: #ffc107; font-weight: 600; }
.link-vip { color: var(--accent); margin-left: 8px; font-weight: 600; }

/* Watch Responsive */
@media (max-width: 768px) {
    .watch-page {
        height: auto;
        overflow: visible;
    }
    .watch-layout {
        flex-direction: column;
        height: auto;
    }
    .watch-right {
        width: 100%;
        min-width: auto;
        border-left: none;
        border-top: none;
    }
    .watch-right-inner {
        padding: 16px;
        gap: 12px;
    }
    .watch-title { order: 0; }
    .watch-ep-section { order: 1; }
    .watch-plot-section { order: 2; }
    .watch-tags { order: 3; }
    .watch-actions-row { order: 4; }
    /* Player responsive styles moved to play.css */
    .watch-actions-row {
        gap: 60px;
        padding: 12px 0;
    }
}

@media (max-width: 768px) {
    .watch-title {
        font-size: 18px;
    }
    .watch-ep-grid {
        display: flex;
        gap: 6px;
        overflow-x: auto;
        padding-bottom: 6px;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
    }
    .watch-ep-grid::-webkit-scrollbar { display: none; }
    .ep-grid-cell {
        flex-shrink: 0;
        width: 60px;
        height: 46px;
        aspect-ratio: unset;
        font-size: 14px;
    }
    .watch-actions-row {
        gap: 50px;
    }
}

@media (max-width: 480px) {
    .watch-right-inner {
        padding: 12px;
    }
    .watch-title {
        font-size: 16px;
    }
    .ep-grid-cell {
        width: 56px;
        height: 42px;
        font-size: 14px;
    }
    .watch-actions-row {
        gap: 40px;
        padding: 10px 0;
    }
    .watch-action-item svg {
        width: 24px;
        height: 24px;
    }
}

/* ========== Auth Page ========== */
.auth-page {
    min-height: calc(100vh - var(--header-height) - 200px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 16px;
}

.auth-container {
    width: 100%;
    max-width: 420px;
}

.auth-brand {
    text-align: center;
    margin-bottom: 32px;
}

.auth-logo {
    font-size: 32px;
    font-weight: 900;
    letter-spacing: -1px;
    background: linear-gradient(135deg, #a855f7, #6366f1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.auth-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 36px 32px;
    box-shadow: var(--shadow);
}

.auth-title {
    font-size: 24px;
    font-weight: 800;
    text-align: center;
    margin-bottom: 4px;
}

.auth-subtitle {
    text-align: center;
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 28px;
}

.auth-form .form-group {
    margin-bottom: 18px;
}

.auth-form label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.auth-form label .optional {
    font-weight: 400;
    color: var(--text-muted);
}

.auth-form input[type="text"],
.auth-form input[type="email"],
.auth-form input[type="password"] {
    width: 100%;
    padding: 12px 16px;
    background: #000;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: #fff;
    font-size: 14px;
    outline: none;
    transition: var(--transition);
    -webkit-appearance: none;
}

.auth-form input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(232, 58, 87, 0.15);
}

.auth-form input::placeholder {
    color: var(--text-muted);
}

.auth-form input:-webkit-autofill,
.auth-form input:-webkit-autofill:hover,
.auth-form input:-webkit-autofill:focus,
.auth-form input:-webkit-autofill:active {
    -webkit-text-fill-color: #fff !important;
    -webkit-box-shadow: 0 0 0px 1000px #000 inset !important;
    background-color: #000 !important;
    color: #fff !important;
    caret-color: #fff;
    transition: background-color 5000s ease-in-out 0s;
}

.input-password {
    position: relative;
}

.input-password input {
    padding-right: 44px;
}

.toggle-pwd {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
}

.toggle-pwd:hover {
    color: var(--text-primary);
}

.form-error {
    color: var(--accent);
    font-size: 13px;
    min-height: 18px;
    margin-bottom: 8px;
}

.btn-auth {
    width: 100%;
    padding: 14px;
    background: var(--accent);
    color: white;
    border: none;
    border-radius: var(--radius);
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
}

.btn-auth:hover {
    background: var(--accent-hover);
    transform: translateY(-1px);
}

.btn-auth:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.auth-divider {
    display: flex;
    align-items: center;
    margin: 24px 0;
    gap: 12px;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}

.auth-divider span {
    font-size: 12px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.auth-switch {
    text-align: center;
    font-size: 14px;
    color: var(--text-secondary);
}

.auth-switch a {
    color: var(--accent);
    font-weight: 600;
}

.auth-switch a:hover {
    text-decoration: underline;
}

/* ========== User Center ========== */
.user-page {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 24px 16px 48px;
}

.auto-account-notice {
    max-width: 720px;
    margin: 0 auto 16px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 14px 16px;
    background: rgba(255, 193, 7, 0.15);
    border: 1px solid rgba(255, 193, 7, 0.4);
    border-radius: 10px;
    color: #ffc107;
    font-size: 13px;
    line-height: 1.5;
}
.auto-account-notice .notice-icon {
    flex-shrink: 0;
    margin-top: 1px;
}
.auto-account-notice .notice-content p {
    margin: 0;
}
.auto-account-notice .notice-content strong {
    color: #fff;
}
.auto-account-notice .notice-close {
    flex-shrink: 0;
    background: none;
    border: none;
    color: #ffc107;
    font-size: 20px;
    cursor: pointer;
    padding: 0 2px;
    line-height: 1;
    opacity: 0.7;
}
.auto-account-notice .notice-close:hover {
    opacity: 1;
}

.user-container {
    max-width: 720px;
    margin: 0 auto;
}

.user-profile-card {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    margin-bottom: 16px;
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

.user-profile-card:hover {
    border-color: var(--accent);
}

.profile-left {
    display: flex;
    align-items: center;
    gap: 16px;
    min-width: 0;
    overflow: hidden;
}

.profile-avatar img {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border);
    flex-shrink: 0;
}

.profile-meta {
    min-width: 0;
    overflow: hidden;
}

.profile-name {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.profile-id {
    font-size: 13px;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.profile-arrow {
    color: var(--text-muted);
    display: flex;
    align-items: center;
}

.wallet-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 20px 24px;
    margin-bottom: 24px;
}

.wallet-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.wallet-title {
    font-size: 16px;
    font-weight: 600;
}

.wallet-details {
    font-size: 13px;
    color: var(--text-muted);
    text-decoration: none;
    transition: var(--transition);
}

.wallet-details:hover { color: var(--accent); }

.wallet-body {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.wallet-info {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.wallet-coins {
    display: flex;
    align-items: center;
    gap: 6px;
}

.coin-icon { font-size: 20px; }

.coin-value {
    font-size: 22px;
    font-weight: 800;
    color: var(--text-primary);
}

.coin-label {
    font-size: 14px;
    color: var(--text-muted);
}

.btn-store {
    display: inline-block;
    padding: 8px 28px;
    background: linear-gradient(135deg, #ff4757, #ff2e63);
    color: #fff;
    border: none;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: var(--transition);
}

.btn-store:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.wallet-vip {
    display: flex;
    align-items: center;
    gap: 8px;
}

.vip-badge {
    display: inline-block;
    padding: 2px 10px;
    background: linear-gradient(135deg, #ffc107, #ff9800);
    color: #1a1a1a;
    font-size: 12px;
    font-weight: 800;
    border-radius: 3px;
    letter-spacing: 1px;
}

.vip-expire {
    font-size: 13px;
    color: var(--text-muted);
}

.history-section { margin-bottom: 24px; }

.history-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.history-title {
    font-size: 18px;
    font-weight: 700;
    margin: 0;
}

.view-all {
    font-size: 13px;
    color: var(--text-muted);
    text-decoration: none;
    transition: var(--transition);
}

.view-all:hover { color: var(--accent); }

.history-scroll {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding-bottom: 8px;
    scrollbar-width: none;
}

.history-scroll::-webkit-scrollbar { display: none; }

.history-card {
    flex: 0 0 auto;
    width: 110px;
    text-decoration: none;
    color: inherit;
}

.history-cover {
    position: relative;
    width: 110px;
    height: 150px;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 8px;
}

.history-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.history-ep {
    position: absolute;
    bottom: 4px;
    right: 4px;
    background: rgba(0,0,0,0.75);
    color: #fff;
    font-size: 10px;
    font-weight: 600;
    padding: 1px 6px;
    border-radius: 3px;
}

.history-name {
    font-size: 12px;
    font-weight: 500;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    word-break: break-word;
}

.user-menu-list {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.user-menu-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
    border-bottom: 1px solid var(--border);
}

.user-menu-item:last-child { border-bottom: none; }

.user-menu-item:hover { background: var(--bg-hover); }

.menu-item-left {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 15px;
    font-weight: 500;
}

.menu-item-left svg { color: var(--text-muted); flex-shrink: 0; }

.user-menu-item > svg { color: var(--text-muted); flex-shrink: 0; }

.menu-item-danger { color: #ff4757; }

.menu-item-danger .menu-item-left svg { color: #ff4757; }

/* ========== Store Page ========== */
.store-page {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 24px 16px 48px;
}

.store-container {
    max-width: 640px;
    margin: 0 auto;
    background: #1c1c1e;
    border-radius: 16px;
    padding: 20px 16px 24px;
    color: #fff;
}

.store-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 4px 0 16px;
}

.store-price-info {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 15px;
    color: rgba(255,255,255,0.9);
    flex-wrap: nowrap;
    white-space: nowrap;
}
.store-price-info > span {
    display: flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
    flex-shrink: 0;
}

.store-coin { color: #ffc107; }

.store-vip-title {
    font-size: 16px;
    font-weight: 700;
    color: rgba(255,255,255,0.9);
    margin-bottom: 2px;
}

.store-vip-sub {
    font-size: 12px;
    color: rgba(255,255,255,0.5);
    margin-bottom: 8px;
}

.store-vip-cards {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    margin-bottom: 20px;
}

@media (min-width: 480px) {
    .store-vip-cards { grid-template-columns: 1fr 1fr; }
}

.store-vip-card {
    background: linear-gradient(180deg, #FFEDD5 0%, #F3CB93 49.68%);
    border-radius: 4px;
    color: #401A06;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    padding: 16px 16px 48px;
    border: 1px solid transparent;
    transition: border-color 0.2s;
}

.store-vip-card:hover { border-color: #fff; }

.store-vip-card-info { position: relative; z-index: 1; }

.store-vip-plan { font-size: 14px; font-weight: 400; margin-bottom: 0; }

.store-vip-price { font-size: 20px; font-weight: 700; }
.store-vip-original { font-size: 12px; font-weight: 400; color: rgba(64,26,6,0.5); text-decoration: line-through; margin-left: 4px; }
.store-vip-first-badge { font-size: 10px; font-weight: 600; color: #fff; background: #e53e3e; border-radius: 3px; padding: 1px 5px; margin-left: 6px; vertical-align: middle; }

.store-vip-desc {
    font-size: 10px;
    color: rgba(64,26,6,0.7);
    line-height: 1.4;
}

.store-vip-tags {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    background: rgba(255,255,255,0.2);
    padding: 8px 16px;
    font-size: 10px;
    font-weight: 500;
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1;
    gap: 4px;
}

.store-vip-tags span { display: flex; align-items: center; gap: 2px; }

.store-coins-title {
    font-size: 16px;
    font-weight: 700;
    color: rgba(255,255,255,0.9);
    margin-bottom: 8px;
}

.store-coin-cards {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 4px;
}
.store-coin-cards::-webkit-scrollbar { display: none; }

.store-coin-card {
    background: #2c2c2e;
    border-radius: 4px;
    padding: 16px 16px 12px;
    position: relative;
    cursor: pointer;
    border: 1px solid transparent;
    transition: border-color 0.2s;
    flex-shrink: 0;
    width: 130px;
}

@media (min-width: 769px) {
    .store-coin-cards {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        overflow-x: visible;
    }
    .store-coin-card {
        width: auto;
        flex-shrink: 1;
    }
}

.store-coin-card:hover { border-color: #fff; }


.store-coin-badge {
    position: absolute;
    top: 0;
    right: 0;
    background: linear-gradient(90deg, #E52E2E 0%, #EB4C46 100%);
    color: #fff;
    font-size: 10px;
    font-weight: 500;
    padding: 0 8px;
    height: 16px;
    line-height: 16px;
    border-radius: 0 4px 0 4px;
}

.store-coin-amount {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 4px;
    color: #fff;
}

.store-coin-lg { font-size: 16px; }

.store-coin-details {
    font-size: 10px;
    color: rgba(255,255,255,0.5);
    line-height: 1.4;
    min-height: 34px;
}

.store-coin-price {
    font-size: 16px;
    font-weight: 500;
    margin-top: 8px;
    color: rgba(255,255,255,0.9);
    text-align: right;
}

.store-payment { margin-top: 16px; }

.store-payment-title {
    font-size: 16px;
    font-weight: 700;
    color: rgba(255,255,255,0.9);
    margin-bottom: 8px;
}

.store-payment-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.store-payment-item {
    background: #2c2c2e;
    border-radius: 4px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    cursor: pointer;
    border: 1px solid transparent;
    transition: border-color 0.2s;
}

.store-payment-item.active {
    border-color: rgba(255,255,255,0.9);
    background: #ffc107;
}

.store-payment-icon-wide { width: 56px; height: 22px; }

/* ========== Legal Page ========== */
.legal-page {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 24px 16px 48px;
}

.legal-container { max-width: 600px; margin: 0 auto; }

.legal-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.legal-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 20px;
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
    border-bottom: 1px solid var(--border);
}

.legal-item:last-child { border-bottom: none; }

.legal-item:hover { background: var(--bg-hover); }

.legal-item-left {
    display: flex;
    align-items: center;
    gap: 14px;
    color: var(--text-primary);
}

.legal-item svg { color: var(--text-muted); flex-shrink: 0; }

.legal-item-title {
    font-size: 15px;
    font-weight: 500;
}

.legal-item > svg { color: var(--text-muted); flex-shrink: 0; }

.legal-doc {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 28px 24px;
}

.legal-doc-title {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 4px;
}

.legal-updated {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 24px;
}

.legal-section {
    margin-bottom: 20px;
}

.legal-section h2 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
}

.legal-section p {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.7;
}

.legal-content h2 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
    margin-top: 20px;
}

.legal-content h2:first-child {
    margin-top: 0;
}

.legal-content p {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 12px;
}

.legal-content ul {
    padding-left: 20px;
    margin-bottom: 12px;
}

.legal-content li {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 4px;
}

.legal-content a {
    color: #4a90d9;
    text-decoration: underline;
}

/* ========== Profile Edit Page ========== */
.profile-page {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 24px 16px 48px;
}

.profile-container { max-width: 480px; margin: 0 auto; }

.profile-avatar-section {
    display: flex;
    justify-content: center;
    margin-bottom: 28px;
}

.profile-avatar-edit {
    position: relative;
    width: 96px;
    height: 96px;
    border-radius: 50%;
    overflow: hidden;
    cursor: pointer;
}

.profile-avatar-edit img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.avatar-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s;
}

.profile-avatar-edit:hover .avatar-overlay { opacity: 1; }

.profile-form { display: flex; flex-direction: column; gap: 18px; }

.form-group { display: flex; flex-direction: column; gap: 6px; }

.form-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
}

.form-input {
    height: 44px;
    padding: 0 14px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-primary);
    font-size: 15px;
    outline: none;
    transition: var(--transition);
}

.form-input:focus { border-color: var(--accent); }

.profile-form .form-input {
    background: #000 !important;
    color: #fff !important;
}
.profile-form .form-input:-webkit-autofill,
.profile-form .form-input:-webkit-autofill:hover,
.profile-form .form-input:-webkit-autofill:focus {
    -webkit-box-shadow: 0 0 0 1000px #000 inset !important;
    -webkit-text-fill-color: #fff !important;
}

.form-input-readonly {
    opacity: 0.5;
    cursor: default;
}

.btn-save {
    height: 48px;
    background: linear-gradient(135deg, #ff4757, #ff2e63);
    color: #fff;
    border: none;
    border-radius: var(--radius);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    margin-top: 8px;
}

.btn-save:hover { opacity: 0.9; }
.btn-save:active { transform: scale(0.98); }

.email-verify-section { margin-top: -8px; }
.email-code-row { display: flex; gap: 10px; }
.email-code-input { flex: 1; min-width: 0; }
.btn-send-code {
    flex-shrink: 0;
    height: 48px;
    padding: 0 16px;
    background: rgba(255,255,255,0.1);
    color: #fff;
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: var(--radius);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
}
.btn-send-code:hover:not(:disabled) { background: rgba(255,255,255,0.2); }
.btn-send-code:disabled { opacity: 0.5; cursor: not-allowed; }

.vip-manage {
    margin-left: 12px;
    font-size: 12px;
    color: #666;
    text-decoration: underline;
}
.vip-manage:hover {
    color: #333;
}

/* ========== Wallet Detail Page ========== */
.wallet-page {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 24px 16px 48px;
}

.wallet-container {
    max-width: 640px;
    margin: 0 auto;
}

.wallet-balance-card {
    background: linear-gradient(135deg, #ff4757, #ff2e63);
    border-radius: 12px;
    padding: 20px 24px;
    margin-bottom: 24px;
    color: #fff;
    position: relative;
    overflow: hidden;
}

.wallet-balance-card::after {
    content: '';
    position: absolute;
    right: -20px;
    bottom: -20px;
    width: 100px;
    height: 100px;
    background: rgba(255,255,255,0.08);
    border-radius: 50%;
}

.wallet-balance-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
    position: relative;
    z-index: 1;
}

.wallet-balance-label {
    font-size: 14px;
    font-weight: 500;
    color: rgba(255,255,255,0.9);
    display: flex;
    align-items: center;
    gap: 6px;
}

.coin-sm { font-size: 16px; }

.icon-coin-img {
    width: 1em;
    height: 1em;
    vertical-align: middle;
    object-fit: contain;
}

.wallet-recharge-btn {
    display: inline-block;
    padding: 6px 16px;
    background: #fff;
    color: #ff4757;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
    position: relative;
    z-index: 1;
}

.wallet-recharge-btn:hover { opacity: 0.9; }

.wallet-balance-value {
    font-size: 36px;
    font-weight: 800;
    position: relative;
    z-index: 1;
}

.wallet-record-section {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 20px 24px;
}

.wallet-record-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--text-primary);
}

.wallet-record-list {
    display: flex;
    flex-direction: column;
}

.wallet-record-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 0;
    border-bottom: 1px solid var(--border);
}

.wallet-record-item:last-child { border-bottom: none; }

.wallet-record-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.wallet-record-name {
    font-size: 15px;
    font-weight: 500;
    color: var(--text-primary);
}

.wallet-record-time {
    font-size: 12px;
    color: var(--text-muted);
}

.wallet-record-amount {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
    flex-shrink: 0;
}

.wallet-record-amount.positive { color: #ff4757; }

.wallet-empty {
    text-align: center;
    padding: 40px 0;
    color: var(--text-muted);
    font-size: 14px;
}

/* ========== Login Prompt Modal ========== */
.login-prompt-modal {
    display: flex;
    position: fixed;
    inset: 0;
    z-index: 10000;
    align-items: center;
    justify-content: center;
}

.login-prompt-mask {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
}

.login-prompt-card {
    position: relative;
    background: var(--bg-secondary, #1a1a2e);
    border-radius: 16px;
    padding: 40px 32px 32px;
    max-width: 360px;
    width: 90%;
    text-align: center;
    animation: loginPromptIn 0.3s ease-out;
    z-index: 1;
}

@keyframes loginPromptIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

.login-prompt-close {
    position: absolute;
    top: 12px;
    right: 16px;
    background: none;
    border: none;
    color: var(--text-muted, #888);
    font-size: 24px;
    cursor: pointer;
    line-height: 1;
    padding: 4px;
}

.login-prompt-close:hover { color: var(--text-primary, #fff); }

.login-prompt-icon {
    margin-bottom: 16px;
    color: var(--accent, #ff4757);
}

.login-prompt-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary, #fff);
    margin: 0 0 8px;
}

.login-prompt-desc {
    font-size: 14px;
    color: var(--text-secondary, #aaa);
    margin: 0 0 24px;
    line-height: 1.5;
}

.login-prompt-btn {
    display: block;
    width: 100%;
    padding: 12px;
    border-radius: 10px;
    background: var(--accent, #ff4757);
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    transition: opacity 0.2s;
}

.login-prompt-btn:hover { opacity: 0.9; }

.login-prompt-link {
    display: inline-block;
    margin-top: 16px;
    font-size: 14px;
    color: var(--text-secondary, #aaa);
    text-decoration: none;
}

.login-prompt-link:hover { color: var(--accent, #ff4757); }
