* { margin:0; padding:0; box-sizing:border-box; -webkit-tap-highlight-color:transparent; }
html,body { width:100%; height:100%; overflow:hidden; background:#000; font-family:system-ui, -apple-system, sans-serif; }
.page { display:none; width:100%; height:100%; }
.page.active { display:block; }

/* ========== 视频播放页 ========== */
#videoPage { position:relative; width:100%; height:100%; overflow:hidden; }
.video-list { height:100%; transition:transform .3s cubic-bezier(0.2,0,0,1); will-change:transform; }
.video-item { width:100%; height:100vh; position:absolute; left:0; background:#000; }
.video-player { width:100%; height:100%; object-fit:cover; background:#000; }
.video-player.embedded-player { position:absolute; inset:0; width:100%; height:100%; border:0; object-fit:contain; background:#000; }
.video-overlay { position:absolute; top:0; left:0; right:0; bottom:0; background:transparent; z-index:5; }
.loading { position:absolute; top:50%; left:50%; width:40px; height:40px; border-radius:50%; border:3px solid rgba(255,255,255,.3); border-top-color:#fff; animation:spin .8s infinite; transform:translate(-50%,-50%); display:none; z-index:9; }
.loading.show { display:block; }
@keyframes spin { to { transform:translate(-50%,-50%) rotate(360deg); } }
.heart { position:absolute; top:50%; left:50%; font-size:80px; color:#ff3355; opacity:0; transform:translate(-50%,-50%) scale(0.5); pointer-events:none; transition:all .25s; z-index:20; }
.heart.show { opacity:1; transform:translate(-50%,-50%) scale(1.2); }
.progress-wrap { position:absolute; left:0; right:0; bottom:100px; height:3px; background:rgba(255,255,255,.15); margin:0 20px; z-index:10; border-radius:10px; overflow:hidden; }
.buffer-bar { position:absolute; left:0; top:0; height:100%; background:rgba(255,255,255,.4); width:0; border-radius:10px; }
.play-bar { position:absolute; left:0; top:0; height:100%; background:#ff3355; width:0; border-radius:10px; z-index:2; }
.info-box { position:absolute; left:16px; bottom:150px; color:#fff; z-index:10; width:70%; text-shadow:0 2px 6px rgba(0,0,0,.4); }
.at-text { font-size:16px; margin-bottom:6px; }
.at-text a { color:#fff; text-decoration:none; font-weight:bold; }
.tags { display:flex; flex-wrap:wrap; gap:6px; margin-top:6px; }
.tags span { background:rgba(20,20,20,.3); backdrop-filter:blur(4px); padding:4px 10px; border-radius:99px; font-size:12px; color:#fff; border:1px solid rgba(255,255,255,0.2); }
.toolbar { position:absolute; right:16px; bottom:130px; z-index:10; display:flex; flex-direction:column; gap:12px; }
.tool { width:52px; min-height:52px; border-radius:30px; background:rgba(20,20,20,.45); backdrop-filter:blur(4px); display:flex; flex-direction:column; align-items:center; justify-content:center; color:#fff; border:none; box-shadow:0 4px 8px rgba(0,0,0,.2); transition:transform .1s, background .2s; cursor:pointer; padding:6px 0; }
.tool:active { transform:scale(0.92); }
.like-tool .tool-icon, .collect-tool .tool-icon { font-size:22px; line-height:1; }
.tool-count { font-size:11px; font-weight:600; margin-top:2px; color:#ddd; }
#likeBtn.active .tool-icon { color:#ff3355; }
#collectBtn.active .tool-icon { color:#ffcc00; }
#commentBtn, #shareBtn { font-size:22px; }
#soundBtn, #playSettingsBtn { font-size:20px; }
.nav { position:fixed; bottom:0; left:0; right:0; height:56px; background:#0f0f0f; display:flex; align-items:center; justify-content:space-around; color:#aaa; z-index:30; border-top:1px solid #222; }
.nav .item { flex:1; text-align:center; font-size:15px; padding:10px; cursor:pointer; transition:color .2s; }
.nav .item.active { color:#fff; font-weight:500; }

/* ========== 评论面板 ========== */
.comment-panel {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(20, 20, 30, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 24px 24px 0 0;
    z-index: 150;
    display: none;
    flex-direction: column;
    max-height: 60vh;
    border-top: 1px solid rgba(255,255,255,0.1);
}
.comment-panel.show { display: flex; }
.comment-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}
.comment-title { font-size: 16px; font-weight: 700; color: #fff; }
.comment-close {
    background: none;
    border: none;
    color: #aaa;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}
.comment-list { flex: 1; overflow-y: auto; padding: 12px 0; max-height: 40vh; }
.comment-item { display: flex; padding: 12px 20px; gap: 12px; }
.comment-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}
.comment-content { flex: 1; }
.comment-name {
    font-size: 13px;
    font-weight: 600;
    color: #ccc;
    margin-bottom: 4px;
    display: block;
}
.comment-text {
    font-size: 14px;
    color: #fff;
    margin: 0 0 4px;
    line-height: 1.4;
}
.comment-time { font-size: 11px; color: #777; }
.comment-input-area {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    gap: 10px;
    border-top: 1px solid rgba(255,255,255,0.1);
}
.comment-input {
    flex: 1;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 24px;
    padding: 10px 16px;
    color: #fff;
    font-size: 14px;
    outline: none;
}
.comment-input::placeholder { color: #888; }
.comment-send-btn {
    background: #ff3355;
    border: none;
    border-radius: 24px;
    padding: 10px 18px;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}
.comment-send-btn:hover { background: #e02244; }

/* ========== 播放设置面板 ========== */
.play-settings-panel {
    position: absolute;
    right: 80px;
    bottom: 140px;
    background: rgba(20, 20, 30, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 24px;
    padding: 20px;
    width: 200px;
    color: #fff;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    border: 1px solid rgba(255,255,255,0.1);
    z-index: 200;
    display: none;
    transition: opacity 0.2s;
}
.play-settings-panel.show { display: block; }
.panel-section { margin-bottom: 20px; }
.panel-section:last-child { margin-bottom: 0; }
.panel-label {
    font-size: 14px;
    font-weight: 600;
    color: #aaa;
    margin-bottom: 12px;
}
.speed-options {
    display: flex;
    gap: 8px;
    justify-content: space-between;
}
.speed-option {
    flex: 1;
    text-align: center;
    padding: 8px 0;
    background: rgba(255,255,255,0.1);
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    color: #ddd;
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid transparent;
}
.speed-option.active {
    background: #ff3355;
    color: white;
    box-shadow: 0 4px 10px rgba(255,51,85,0.4);
}
.auto-next-section {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.switch {
    position: relative;
    display: inline-block;
    width: 46px;
    height: 24px;
}
.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}
.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #444;
    transition: .3s;
    border-radius: 24px;
}
.slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .3s;
    border-radius: 50%;
}
input:checked + .slider { background-color: #ff3355; }
input:checked + .slider:before { transform: translateX(22px); }
.next-video-btn {
    width: 100%;
    padding: 12px;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 20px;
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s;
}
.next-video-btn:hover { background: rgba(255,255,255,0.15); }
.next-video-btn:active { transform: scale(0.97); }
.next-video-btn span { font-size: 18px; }

/* ========== 通用组件 ========== */
.context-menu {
    position: fixed;
    background: #1e1e1e;
    border-radius: 12px;
    padding: 4px 0;
    z-index: 100;
    min-width: 150px;
    box-shadow: 0 8px 20px rgba(0,0,0,.6);
    display: none;
    border: 1px solid #333;
}
.context-menu.show { display: block; }
.context-item {
    padding: 12px 20px;
    color: #fff;
    font-size: 15px;
    cursor: pointer;
}
.context-item:active { background: #2a2a2a; }
.list-page {
    padding: 20px;
    padding-bottom: 70px;
    overflow-y: auto;
    height: 100%;
    color: #fff;
    background: #0a0a0a;
}
.title {
    font-size: 20px;
    margin-bottom: 18px;
    font-weight: 600;
}
.video-card {
    display: flex;
    align-items: center;
    background: #1a1a1a;
    border-radius: 14px;
    padding: 10px;
    margin-bottom: 12px;
    border: 1px solid #2a2a2a;
    cursor: pointer;
    transition: background .2s;
    user-select: none;
    position: relative;
}
.video-card:active { background: #2a2a2a; }
.card-thumb {
    width: 80px;
    height: 110px;
    background: #2e2e2e;
    border-radius: 10px;
    margin-right: 14px;
    object-fit: cover;
    flex-shrink: 0;
    border: 1px solid #3a3a3a;
}
.card-info { flex: 1; overflow: hidden; }
.card-title {
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: #fff;
}
.card-tag {
    display: inline-block;
    background: #2a2a2a;
    padding: 4px 10px;
    border-radius: 30px;
    font-size: 12px;
    color: #ccc;
}
.card-status {
    position: absolute;
    top: 8px;
    right: 8px;
    display: flex;
    gap: 4px;
    z-index: 5;
}
.card-status .status-icon {
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(4px);
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}
.card-status .status-icon.liked { color: #ff3355; }
.card-status .status-icon.collected { color: #ffcc00; }
.empty, .empty-state {
    text-align: center;
    color: #777;
    margin-top: 60px;
    font-size: 14px;
}
.auto-play-tip {
    position: absolute;
    bottom: 220px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0,0,0,0.7);
    backdrop-filter: blur(8px);
    color: #fff;
    padding: 8px 20px;
    border-radius: 40px;
    font-size: 14px;
    z-index: 25;
    white-space: nowrap;
    border: 1px solid rgba(255,255,255,0.2);
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
}
.auto-play-tip.show { opacity: 1; }
.error-toast {
    position: fixed;
    bottom: 80px;
    left: 20px;
    right: 20px;
    background: rgba(0,0,0,0.8);
    color: #fff;
    padding: 12px;
    border-radius: 30px;
    text-align: center;
    z-index: 100;
    font-size: 14px;
    backdrop-filter: blur(8px);
    display: none;
}
.thumb-placeholder {
    background: #2a2a2a;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    font-size: 28px;
}
.announcement-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.7);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
}
.announcement-content {
    background: #1e1e1e;
    border-radius: 20px;
    max-width: 320px;
    width: 90%;
    padding: 20px;
    border: 1px solid #333;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    color: #fff;
}
.announcement-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}
.announcement-header h3 {
    margin: 0;
    font-size: 18px;
    color: #ff3355;
}
.announcement-close {
    background: none;
    border: none;
    color: #aaa;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}
.announcement-body {
    margin-bottom: 20px;
    font-size: 15px;
    line-height: 1.5;
    color: #ddd;
    max-height: 200px;
    overflow-y: auto;
}
.announcement-footer {
    display: flex;
    gap: 10px;
}
.announcement-footer .btn {
    flex: 1;
    padding: 10px;
    border: none;
    border-radius: 30px;
    font-size: 14px;
    cursor: pointer;
    font-weight: 500;
}
.announcement-footer .btn-primary {
    background: #ff3355 !important;
    border-color: #ff3355 !important;
    color: #fff !important;
    box-shadow: 0 6px 14px rgba(255, 51, 85, 0.3) !important;
}
.announcement-footer .btn-primary:hover,
.announcement-footer .btn-primary:focus {
    background: #e02244 !important;
    border-color: #e02244 !important;
}
.announcement-footer .btn-secondary {
    background: #333;
    color: #ccc;
}

/* ========== 个人主页样式 ========== */
.profile-page {
    height: 100%;
    overflow-y: auto;
    background: #0a0a0a;
    color: #fff;
    padding-bottom: 70px;
    -webkit-overflow-scrolling: touch;
}
.profile-cover {
    position: relative;
    width: 100%;
    height: 160px;
    background: linear-gradient(135deg, #2a2a2a, #1a1a1a);
    overflow: hidden;
    cursor: pointer;
}
.profile-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.cover-change-hint {
    position: absolute;
    bottom: 10px;
    right: 16px;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(4px);
    color: #fff;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    opacity: 0.8;
    pointer-events: none;
}
.profile-header {
    padding: 0 16px 16px;
    position: relative;
}
.profile-avatar {
    width: 86px;
    height: 86px;
    border-radius: 50%;
    overflow: hidden;
    margin-top: -43px;
    margin-bottom: 12px;
    border: 3px solid #0a0a0a;
    box-shadow: 0 2px 8px rgba(0,0,0,0.5);
    cursor: pointer;
    position: relative;
    z-index: 2;
}
.profile-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.profile-avatar::after {
    content: "📷";
    position: absolute;
    bottom: 2px;
    right: 2px;
    background: rgba(0,0,0,0.6);
    color: #fff;
    font-size: 14px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s;
}
.profile-avatar:hover::after { opacity: 1; }
.profile-nickname {
    font-size: 22px;
    font-weight: 700;
    margin: 0 0 4px;
    color: #fff;
}
.profile-id {
    font-size: 14px;
    color: #aaa;
    margin: 0 0 6px;
}
.profile-bio {
    font-size: 14px;
    color: #ccc;
    margin: 0 0 16px;
}
.edit-profile-btn {
    position: absolute;
    top: 20px;
    right: 16px;
    background: #2a2a2a;
    border: none;
    border-radius: 20px;
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 500;
    color: #fff;
    cursor: pointer;
    border: 1px solid #444;
}
.profile-stats {
    display: flex;
    justify-content: space-around;
    padding: 12px 0;
    border-top: 1px solid #222;
    border-bottom: 1px solid #222;
    margin: 0 16px;
}
.stat-item {
    text-align: center;
    flex: 1;
}
.stat-value {
    display: block;
    font-size: 20px;
    font-weight: 700;
    color: #fff;
}
.stat-label {
    font-size: 13px;
    color: #888;
    margin-top: 4px;
}
.profile-tabs {
    display: flex;
    justify-content: space-around;
    padding: 8px 16px;
    border-bottom: 1px solid #222;
    background: #0a0a0a;
    position: sticky;
    top: 0;
    z-index: 5;
}
.profile-tabs .tab-item {
    flex: 1;
    text-align: center;
    padding: 12px 0;
    font-size: 16px;
    font-weight: 500;
    color: #888;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
    background: transparent;
    border-radius: 0;
}
.profile-tabs .tab-item.active {
    color: #ff3355;
    border-bottom-color: #ff3355;
}
.profile-content {
    padding: 12px 8px;
}
.profile-content .tab-pane { display: none; }
.profile-content .tab-pane.active { display: block; }
.history-sub-tabs {
    display: flex;
    margin-bottom: 16px;
    gap: 8px;
    padding: 0 8px;
}
.sub-tab {
    flex: 1;
    text-align: center;
    padding: 10px;
    background: #1a1a1a;
    color: #aaa;
    border-radius: 30px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
}
.sub-tab.active {
    background: #ff3355;
    color: #fff;
}
.sub-tab-content { display: none; }
.sub-tab-content.active { display: block; }
.list-container { padding: 0 4px; }
.list-container .video-card {
    background: #1a1a1a;
    border-color: #2a2a2a;
}
.waterfall-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
}
.waterfall-grid .empty-state {
    grid-column: span 3;
    text-align: center;
    color: #777;
    padding: 40px 0;
    font-size: 15px;
}
.waterfall-grid .video-card {
    display: block;
    background: transparent;
    padding: 0;
    border: none;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 0;
    position: relative;
}
.waterfall-grid .video-card:active {
    background: transparent;
    opacity: 0.8;
}
.waterfall-grid .card-thumb {
    width: 100%;
    height: auto;
    aspect-ratio: 9 / 16;
    border-radius: 8px;
    margin-right: 0;
    border: 1px solid #333;
}
.waterfall-grid .card-info { padding: 6px 2px; }
.waterfall-grid .card-title {
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: #eee;
}
.waterfall-grid .card-status {
    top: 4px;
    right: 4px;
}
.waterfall-grid .card-status .status-icon {
    width: 20px;
    height: 20px;
    font-size: 12px;
    background: rgba(0,0,0,0.7);
}

/* ========== 分享弹窗样式 ========== */
.share-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.2s ease;
}

.share-modal-content {
    background: #1e1e2e;
    border-radius: 24px;
    width: 90%;
    max-width: 400px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    overflow: hidden;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.share-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    font-size: 18px;
    font-weight: 600;
}

.share-modal-close {
    background: none;
    border: none;
    color: #aaa;
    font-size: 28px;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    transition: color 0.2s;
}

.share-modal-close:hover {
    color: #fff;
}

.share-modal-body {
    padding: 24px 20px;
}

.share-url-label {
    color: #ccc;
    font-size: 14px;
    margin-bottom: 8px;
}

.share-url-box {
    display: flex;
    gap: 10px;
    margin-bottom: 24px;
}

.share-url-input {
    flex: 1;
    background: #2a2a4a;
    border: 1px solid #444;
    border-radius: 12px;
    padding: 12px 16px;
    color: #fff;
    font-size: 14px;
    outline: none;
}

.share-copy-btn {
    background: #ff3355;
    border: none;
    border-radius: 12px;
    padding: 12px 20px;
    color: #fff;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.2s;
}

.share-copy-btn:hover {
    background: #e02244;
}

.share-tips {
    color: #ccc;
    font-size: 14px;
}

.share-platforms {
    display: flex;
    gap: 16px;
    margin-top: 16px;
}

.share-platform {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 16px 8px;
    background: #2a2a4a;
    border: 1px solid #444;
    border-radius: 16px;
    color: #fff;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
}

.share-platform:hover {
    background: #3a3a5a;
    transform: translateY(-2px);
}

.platform-icon {
    font-size: 28px;
}

/* 微信分享特殊样式 */
.wechat-modal .share-modal-content {
    max-width: 320px;
}

.wechat-share-body {
    padding: 24px 20px;
    text-align: center;
}

.wechat-tip {
    color: #fff;
    font-size: 16px;
    margin-bottom: 20px;
}

.qrcode-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 220px;
    background: #fff;
    border-radius: 16px;
    padding: 10px;
    margin-bottom: 20px;
}

.qrcode-placeholder img {
    display: block;
    margin: 0 auto;
}

.qrcode-loading {
    color: #666;
    font-size: 14px;
}

.qrcode-fallback {
    text-align: center;
    padding: 20px;
}

.qrcode-fallback p {
    color: #666;
    margin-bottom: 12px;
}

.btn-retry-qrcode {
    background: #ff3355;
    border: none;
    border-radius: 20px;
    padding: 8px 20px;
    color: #fff;
    font-size: 14px;
    cursor: pointer;
}

.wechat-copy-tip {
    color: #aaa;
    font-size: 14px;
}

.wechat-copy-tip a {
    color: #ff9eb5;
    text-decoration: none;
    font-weight: 500;
}

.wechat-copy-tip a:hover {
    text-decoration: underline;
}

/* 适配深色模式 */
@media (prefers-color-scheme: dark) {
    .share-modal-content {
        background: #1a1a2e;
    }
    
    .share-url-input {
        background: #12122a;
    }
    
    .share-platform {
        background: #12122a;
    }
}

/* ========== 响应式调整 ========== */
@media (max-width: 480px) {
    .tool { width: 48px; min-height: 48px; }
    .tool-count { font-size: 10px; }
    .toolbar { right: 12px; bottom: 120px; }
    
    .share-modal-content {
        width: 95%;
        border-radius: 20px;
    }
    
    .share-url-box {
        flex-direction: column;
    }
    
    .share-copy-btn {
        padding: 14px;
        text-align: center;
    }
    
    .share-platforms {
        flex-wrap: wrap;
    }
    
    .share-platform {
        min-width: calc(50% - 8px);
    }
}

/* ========== Recompensas y páginas nuevas ========== */
.feature-page {
  height: 100%;
  overflow-y: auto;
  padding: 24px 18px 82px;
  color: #fff;
  background: radial-gradient(ellipse at top, #252040 0%, #101018 52%, #08080c 100%);
}
.feature-header { max-width: 760px; margin: 10px auto 22px; }
.feature-header h1 { margin: 4px 0 10px; color: #fff; font-size: 27px; font-weight: 800; }
.feature-header p { color: #c4c2d1; line-height: 1.5; }
.eyebrow { color: #ff8ca5 !important; font-size: 11px; letter-spacing: 2px; font-weight: 800; margin: 0; }
.plex-frame-wrap { max-width: 1000px; margin: 0 auto; }
.plex-frame-wrap iframe { display: block; width: 100%; height: min(68vh, 760px); min-height: 360px; border: 1px solid rgba(255,255,255,.13); border-radius: 16px; background: #fff; }
.drama-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; max-width: 1100px; margin: 0 auto; }
.drama-card { display: flex; min-width: 0; flex-direction: column; overflow: hidden; border: 1px solid rgba(255,255,255,.12); border-radius: 17px; background: rgba(255,255,255,.055); color: #fff !important; text-decoration: none !important; transition: transform .18s ease, border-color .18s ease; }
.drama-card:hover, .drama-card:focus { transform: translateY(-2px); border-color: rgba(229,160,13,.7); color: #fff !important; text-decoration: none !important; }
.drama-poster { position: relative; overflow: hidden; aspect-ratio: 1 / 1; background: linear-gradient(135deg, #28233c, #111018); }
.drama-poster img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .25s ease; }
.drama-card:hover .drama-poster img { transform: scale(1.035); }
.drama-episodes { position: absolute; top: 9px; left: 9px; padding: 5px 8px; border-radius: 999px; background: rgba(8,8,14,.82); color: #fff; font-size: 10px; font-weight: 800; }
.drama-info { padding: 12px; }
.drama-tag { color: #ff9aaf; font-size: 9px; letter-spacing: .8px; font-weight: 800; }
.drama-info h2 { margin: 5px 0 7px; color: #fff; font-size: 17px; line-height: 1.2; }
.drama-info p { display: -webkit-box; min-height: 52px; margin: 0; overflow: hidden; color: #c8c6d3; font-size: 12px; line-height: 1.45; -webkit-box-orient: vertical; -webkit-line-clamp: 3; }
.drama-cta { display: flex; justify-content: space-between; align-items: center; gap: 6px; margin-top: 11px; padding-top: 10px; border-top: 1px solid rgba(255,255,255,.1); color: #ffc646; font-size: 11px; font-weight: 800; }
.drama-source-note { max-width: 1100px; margin: 14px auto 0; color: #a9a5b5; font-size: 11px; line-height: 1.5; }
.plex-fallback { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 12px; padding: 13px 16px; border-radius: 14px; background: rgba(255,255,255,.08); color: #eee; }
.plex-fallback a, .wallet-login { color: #ffd4de; font-weight: 700; }
.checkin-card, .wallet-card { max-width: 760px; margin: 0 auto 20px; padding: 22px; color: #fff; background: rgba(22,22,36,.94); border: 1px solid rgba(255,255,255,.1); border-radius: 22px; box-shadow: 0 18px 55px rgba(0,0,0,.28); }
.checkin-reward { display: flex; flex-direction: column; gap: 7px; padding: 16px; border-radius: 16px; background: linear-gradient(135deg, rgba(255,51,85,.22), rgba(104,68,207,.18)); }
.checkin-reward span, .wallet-balances span { color: #bbb8ca; font-size: 13px; }
.checkin-reward strong { font-size: 30px; color: #fff; }
.streak-display { display: flex; align-items: baseline; gap: 10px; margin: 18px 0 6px; }
.streak-display strong { font-size: 42px; color: #ff8ca5; }
.streak-display span { color: #d2d0dc; }
#checkinStatus { min-height: 22px; color: #ddd; }
#checkinButton, #withdrawSubmit { border: 0; border-radius: 14px; padding: 13px 20px; background: linear-gradient(135deg,#ff3355,#a832bd); color: #fff; font-weight: 800; cursor: pointer; }
#checkinButton:disabled, #withdrawSubmit:disabled { opacity: .55; cursor: not-allowed; }
.checkin-card small, .withdraw-form small { display: block; margin-top: 14px; color: #aaa7b8; line-height: 1.5; }
.wallet-card { color: #fff; background: linear-gradient(135deg, #15152a, #251933); margin: 18px 0 22px; }
.wallet-heading { display: flex; justify-content: space-between; align-items: center; }
.wallet-heading h3 { margin: 4px 0 0; font-size: 20px; }
.wallet-currency { padding: 6px 10px; border: 1px solid rgba(255,255,255,.18); border-radius: 99px; color: #ffd4de; font-size: 12px; }
.wallet-balances { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 16px 0 8px; }
.wallet-balances > div { display: flex; flex-direction: column; gap: 7px; padding: 14px; border-radius: 14px; background: rgba(255,255,255,.07); }
.wallet-balances strong { font-size: 20px; }
.wallet-hint { color: #bcb8c8; font-size: 13px; }
.withdraw-form { display: grid; gap: 9px; margin-top: 16px; }
.withdraw-form h4, .withdraw-history h4 { margin: 14px 0 4px; font-weight: 800; }
.withdraw-form label { margin: 2px 0 0; color: #d1cede; font-size: 13px; }
.withdraw-form input, .withdraw-form select, .withdraw-form textarea { width: 100%; padding: 11px 12px; border: 1px solid rgba(255,255,255,.17); border-radius: 11px; background: #191927; color: #fff; }
.withdraw-form textarea { resize: vertical; }
.withdraw-history { margin-top: 18px; border-top: 1px solid rgba(255,255,255,.1); }
.withdraw-row { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; padding: 12px 0; border-bottom: 1px solid rgba(255,255,255,.08); font-size: 13px; }
.withdraw-row .muted { color: #aaa7b8; font-size: 11px; grid-column: 1 / -1; }

@media (max-width: 520px) {
  .nav { height: 62px; }
  .nav .item { padding: 10px 2px; font-size: 12px; white-space: nowrap; }
  .feature-page { padding: 18px 12px 78px; }
  .feature-header h1 { font-size: 23px; }
  .plex-frame-wrap iframe { height: 62vh; min-height: 300px; }
  .plex-fallback { align-items: flex-start; flex-direction: column; }
  .drama-grid { gap: 10px; }
  .drama-info { padding: 10px; }
  .drama-info h2 { font-size: 15px; }
  .drama-info p { min-height: 64px; font-size: 11px; }
  .drama-episodes { top: 7px; left: 7px; }
  .wallet-card, .checkin-card { padding: 17px; }
  .wallet-balances strong { font-size: 17px; }
}

@media (min-width: 760px) {
  .drama-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

.plex-link-card { min-height: 320px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 28px; border: 1px solid rgba(255,255,255,.12); border-radius: 22px; background: linear-gradient(145deg, rgba(255,255,255,.09), rgba(255,255,255,.025)); text-align: center; }
.plex-link-card h2 { margin: 0; font-size: 24px; }
.plex-link-card p { max-width: 540px; color: #c4c2d1; line-height: 1.6; }
.plex-link-icon { width: 64px; height: 64px; display: grid; place-items: center; padding-left: 4px; border-radius: 50%; background: #e5a00d; color: #101018; font-size: 25px; }
.plex-link-card a { display: inline-block; margin-top: 6px; padding: 13px 22px; border-radius: 14px; background: #e5a00d; color: #101018; text-decoration: none; font-weight: 800; }
.plex-link-card a:hover, .plex-link-card a:focus { background: #f5b52b; color: #101018; text-decoration: none; }

.telegram-support-float {
  position: fixed;
  z-index: 29;
  right: 14px;
  bottom: calc(72px + env(safe-area-inset-bottom, 0px));
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 9px 15px 9px 12px;
  border: 1px solid rgba(255,255,255,.24);
  border-radius: 999px;
  background: #229ED9;
  color: #fff !important;
  box-shadow: 0 6px 20px rgba(0,0,0,.35);
  font-size: 13px;
  font-weight: 800;
  line-height: 1;
  text-decoration: none !important;
  -webkit-tap-highlight-color: transparent;
}
.telegram-support-float svg { display: block; width: 22px; height: 22px; fill: currentColor; flex: 0 0 auto; }
.telegram-support-float:hover, .telegram-support-float:focus { background: #168AC2; color: #fff !important; text-decoration: none !important; box-shadow: 0 8px 24px rgba(0,0,0,.42); }
.telegram-support-float:active { transform: scale(.96); }

@media (max-width: 520px) {
  .telegram-support-float { right: 12px; bottom: calc(70px + env(safe-area-inset-bottom, 0px)); min-height: 42px; padding: 8px 13px 8px 10px; font-size: 12px; }
  .telegram-support-float svg { width: 21px; height: 21px; }
}
