* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
}

body {
    background: #e8e9ed;
    color: #18191c;
    min-height: 100vh;
    font-size: 11px;
    line-height: 1.3;
    padding-bottom: 0;
    overflow-x: hidden;
}

#colorful-bubbles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    pointer-events: none;
    opacity: 0.2;
    background: transparent;
}

.app-container {
    max-width: 600px;
    margin: 0 auto;
    background: transparent;
    position: relative;
    z-index: 1;
    padding-bottom: 90px;
}

.bili-header {
    background: white;
    padding: 6px 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    position: sticky;
    top: 0;
    z-index: 120;
    border-bottom: 0.5px solid #eef0f2;
}

.header-avatar {
    flex-shrink: 0;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    overflow: hidden;
    background: #eef0f2;
}
.header-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.header-search {
    flex: 1;
    background: #f5f6f7;
    border-radius: 18px;
    border: 1px solid #e3e5e8;
    display: flex;
    align-items: center;
    padding: 4px 10px;
    gap: 6px;
    position: relative;
}
.header-search i {
    color: #9199a1;
    font-size: 13px;
}
.header-search input {
    background: transparent;
    border: none;
    flex: 1;
    font-size: 12px;
    outline: none;
    padding: 2px 0;
}
.header-search input::placeholder {
    font-size: 11px;
    color: #b5b9c0;
}

.search-loading {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: 14px;
    height: 14px;
    border: 2px solid #e3e5e8;
    border-top-color: #fb7299;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
    display: none;
}

.mail-icon {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}
.mail-icon i {
    font-size: 18px;
    color: #6d757e;
}

.category-tabs {
    background: white;
    padding: 4px 12px 0 12px;
    display: flex;
    gap: 24px;
    border-bottom: 0.5px solid #eef0f2;
    margin-bottom: 6px;
    overflow-x: auto;
    scrollbar-width: none;
}
.category-tabs::-webkit-scrollbar {
    display: none;
}
.tab-item {
    font-size: 13px;
    font-weight: 500;
    padding: 6px 0;
    color: #6d757e;
    position: relative;
    cursor: pointer;
    transition: color 0.1s;
    white-space: nowrap;
}
.tab-item.active {
    color: #fb7299;
    font-weight: 600;
}
.tab-item.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: #fb7299;
    border-radius: 2px;
}

.scroll-container {
    position: relative;
    overflow-y: auto;
    overflow-x: hidden;
    max-height: calc(100vh - 105px);
    min-height: 200px;
}

.pull-to-refresh {
    position: relative;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 0;
    pointer-events: none;
    z-index: 10;
}
.refresh-indicator {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.95);
    padding: 6px 14px;
    border-radius: 30px;
    font-size: 12px;
    transform: translateY(-100%);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    z-index: 11;
    position: relative;
}
.refresh-spinner {
    width: 20px;
    height: 20px;
    border: 2.5px solid #d4d8dd;
    border-top-color: #fb7299;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
    display: none;
}
.refresh-spinner.active {
    display: inline-block;
}
@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.feed-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    padding: 0 10px 12px 10px;
    position: relative;
    z-index: 1;
}
.video-card {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    cursor: pointer;
    transition: transform 0.08s;
    animation: fadeInUp 0.25s ease-out;
    border: 1px solid #d4d6db;
}
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
.video-card:active {
    transform: scale(0.97);
}
.card-cover {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #1a1a1a;
    overflow: hidden;
    position: relative;
}
.card-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.card-info {
    padding: 6px 8px 8px;
}
.card-title {
    font-size: 12px;
    font-weight: 590;
    line-height: 1.3;
    margin-bottom: 4px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.card-meta {
    display: flex;
    justify-content: space-between;
    margin-top: 3px;
    font-size: 9.5px;
    color: #9499a0;
}
.author {
    display: flex;
    align-items: center;
    gap: 3px;
}
.card-footer-stats {
    display: flex;
    justify-content: space-between;
    margin-top: 5px;
    padding-top: 4px;
    border-top: 0.5px solid #f0f1f3;
    font-size: 9.5px;
    color: #6d757e;
}
.footer-actions {
    display: flex;
    gap: 8px;
}
.action-item {
    display: flex;
    align-items: center;
    gap: 3px;
    cursor: pointer;
}
.action-item.liked {
    color: #fb7299;
}
.action-item.saved {
    color: #ffb347;
}

.bottom-nav {
    position: fixed;
    bottom: 20px;
    left: 0;
    right: 0;
    max-width: 600px;
    margin: 0 auto;
    z-index: 200;
    pointer-events: none;
}
.nav-cylinder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(20px);
    border-radius: 50px;
    margin: 0 20px;
    padding: 6px 20px;
    border: 1px solid rgba(255, 255, 255, 0.7);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.05);
    pointer-events: auto;
}
.nav-left-spacer,
.nav-right-spacer {
    flex: 1;
}
.publish-btn {
    width: 56px;
    height: 56px;
    background: #fb7299;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(251, 114, 153, 0.5);
    transition: transform 0.1s, box-shadow 0.2s;
    border: 2px solid white;
    margin: -18px 0;
}
.publish-btn:active {
    transform: scale(0.94);
}
.publish-btn i {
    font-size: 28px;
    color: white;
}

.fullscreen-detail {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #ffffff;
    z-index: 2000;
    display: none;
    flex-direction: column;
    overflow-y: auto;
    overflow-x: hidden;
}
.detail-header {
    position: sticky;
    top: 0;
    width: 100%;
    background: white;
    padding: 6px 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 0.5px solid #eef0f2;
    z-index: 30;
}
.detail-back-btn-header {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 18px;
}
.detail-header-title {
    font-size: 14px;
    font-weight: 600;
}
.detail-menu-btn {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 18px;
    color: #5e6670;
    border-radius: 50%;
    transition: background 0.2s;
}
.detail-menu-btn:active {
    background: #f0f0f0;
}

.side-nav {
    position: fixed;
    top: 0;
    right: -280px;
    width: 260px;
    height: 100%;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    z-index: 2100;
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.15);
    transition: right 0.3s cubic-bezier(0.2, 0.9, 0.4, 1.1);
    display: flex;
    flex-direction: column;
    padding: 60px 20px 20px;
    gap: 20px;
}
.side-nav.open {
    right: 0;
}
.side-nav-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    z-index: 2050;
    display: none;
}
.side-nav-overlay.show {
    display: block;
}
.side-nav-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 16px;
    background: #f5f6f7;
    border-radius: 14px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 14px;
    font-weight: 500;
    color: #333;
}
.side-nav-item:active {
    background: #e8e9ed;
    transform: scale(0.97);
}
.side-nav-item i {
    font-size: 20px;
    width: 28px;
    color: #fb7299;
}
.side-nav-close {
    position: absolute;
    top: 16px;
    left: 16px;
    font-size: 22px;
    cursor: pointer;
    color: #666;
    padding: 8px;
}

.media-wrapper {
    position: relative;
    background: #f0f1f3;
    border-top: 3px solid #d0d3d8;
    border-bottom: 3px solid #d0d3d8;
}
.video-player-container {
    position: relative;
    width: 100%;
    background: #000;
    flex-shrink: 0;
}
.watermark-group {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 25;
    display: flex;
    flex-direction: column;
    gap: 6px;
    pointer-events: none;
}
.watermark-author {
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(4px);
    padding: 3px 8px;
    border-radius: 16px;
    font-size: 9px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    display: inline-block;
    width: fit-content;
}
.watermark-title {
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(3px);
    padding: 2px 8px;
    border-radius: 14px;
    font-size: 8px;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.85);
    max-width: 220px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
}
.detail-video {
    width: 100%;
    height: auto;
    max-height: 55vh;
    background: #000;
    outline: none;
    display: block;
}
.video-controls {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
    padding: 8px 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    opacity: 0;
    transition: opacity 0.2s;
}
.video-player-container:hover .video-controls,
.video-player-container.touching .video-controls {
    opacity: 1;
}
.play-pause-btn {
    background: none;
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.progress-bar {
    flex: 1;
    height: 4px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
    cursor: pointer;
    position: relative;
}
.progress-filled {
    width: 0%;
    height: 100%;
    background: #fb7299;
    border-radius: 2px;
}
.time-display {
    color: white;
    font-size: 11px;
    min-width: 90px;
}

.slider-container {
    position: relative;
    background: #f0f1f3;
    border-top: 3px solid #d0d3d8;
    border-bottom: 3px solid #d0d3d8;
}
.slider-wrapper {
    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    display: flex;
}
.slider-wrapper::-webkit-scrollbar {
    display: none;
}
.slider-image {
    flex-shrink: 0;
    width: 100%;
    scroll-snap-align: start;
    display: flex;
    justify-content: center;
    align-items: center;
    background: #ffffff;
}
.slider-image img {
    width: 100%;
    max-height: 55vh;
    object-fit: contain;
}
.image-dots {
    position: absolute;
    bottom: 12px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    gap: 8px;
    z-index: 20;
}
.dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(100, 100, 120, 0.5);
    transition: all 0.2s;
}
.dot.active {
    background: #fb7299;
    width: 16px;
    border-radius: 4px;
}

.detail-info {
    background: white;
    padding: 12px 14px 12px;
}
.detail-author-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}
.detail-author-left {
    display: flex;
    align-items: center;
    gap: 8px;
}
.detail-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    overflow: hidden;
    background: #eef0f2;
}
.detail-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.detail-author-name {
    font-size: 12px;
    font-weight: 600;
}
.detail-fans {
    font-size: 9px;
    color: #9499a0;
    margin-top: 1px;
}
.follow-btn {
    border: none;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 10px;
    font-weight: 500;
    cursor: pointer;
    background: #fb7299;
    color: white;
}
.follow-btn.followed {
    background: #f0f2f5;
    color: #5e6670;
}
.detail-title {
    font-size: 14px;
    font-weight: 650;
    margin: 6px 0 4px;
}
.detail-body {
    font-size: 11px;
    color: #5e6670;
    line-height: 1.4;
    margin-bottom: 10px;
}
.detail-stats {
    display: flex;
    gap: 12px;
    font-size: 10px;
    color: #9499a0;
    padding-bottom: 10px;
    border-bottom: 0.5px solid #eef0f2;
    margin-bottom: 12px;
}
.action-bar {
    display: flex;
    justify-content: space-around;
    gap: 6px;
    margin-top: 8px;
}
.detail-action-btn {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    background: transparent;
    border: none;
    padding: 5px 0;
    cursor: pointer;
    color: #5e6670;
    font-size: 9px;
}
.detail-action-btn i {
    font-size: 16px;
}
.detail-action-btn.active-like {
    color: #fb7299;
}
.detail-action-btn.active-dislike {
    color: #5e7c9c;
}
.detail-action-btn.active-coin {
    color: #ffb347;
}
.detail-action-btn.active-collect {
    color: #ffb347;
}

.recommend-section {
    background: white;
    padding: 12px 0 20px 0;
    border-top: 6px solid #f5f6f7;
}
.recommend-title {
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 12px;
    padding: 0 14px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.recommend-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    padding: 0 10px;
}
.rec-card {
    display: flex;
    gap: 10px;
    background: #fafbfc;
    border-radius: 10px;
    padding: 8px;
    cursor: pointer;
    border: 1px solid #d4d6db;
    transition: all 0.1s;
}
.rec-card:active {
    transform: scale(0.98);
    background: #f0f2f5;
}
.rec-cover {
    width: 70px;
    height: 52px;
    border-radius: 8px;
    overflow: hidden;
    background: #eef0f2;
    flex-shrink: 0;
}
.rec-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.rec-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
}
.rec-title {
    font-size: 11px;
    font-weight: 500;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.3;
}
.rec-meta {
    display: flex;
    gap: 8px;
    font-size: 9px;
    color: #9499a0;
}
.share-animation {
    position: fixed;
    bottom: 30%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.75);
    color: white;
    padding: 8px 16px;
    border-radius: 30px;
    font-size: 12px;
    z-index: 2100;
    animation: fadeOutUp 0.8s ease forwards;
}
.report-animation {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: linear-gradient(135deg, #ff6b6b, #ee5a24);
    color: white;
    padding: 14px 28px;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 600;
    z-index: 2200;
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.25);
    display: flex;
    align-items: center;
    gap: 10px;
    animation: reportPop 0.5s cubic-bezier(0.34, 1.2, 0.64, 1) forwards;
    white-space: nowrap;
}
@keyframes reportPop {
    0% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.8);
    }
    30% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1.08);
    }
    70% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
    100% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.9);
        visibility: hidden;
    }
}
@keyframes fadeOutUp {
    0% {
        opacity: 0;
        transform: translateX(-50%) translateY(20px);
    }
    20% {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
    80% {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
    100% {
        opacity: 0;
        transform: translateX(-50%) translateY(-30px);
    }
}
.no-scroll {
    overflow: hidden;
}
.content-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 40px;
}
.loading-spinner {
    width: 32px;
    height: 32px;
    border: 3px solid #eef0f2;
    border-top-color: #fb7299;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}
.empty-follow,
.empty-collect {
    grid-column: 1/-1;
    text-align: center;
    padding: 60px 20px;
    background: white;
    border-radius: 12px;
    margin: 20px 10px;
    color: #9499a0;
    font-size: 13px;
    border: 1px solid #d0d3d8;
}
.empty-follow i,
.empty-collect i {
    font-size: 48px;
    margin-bottom: 12px;
    color: #d4d8dd;
}

.notice-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    z-index: 3000;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(3px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s;
}
.notice-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}
.notice-modal {
    width: 280px;
    max-width: 82%;
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.2);
    transform: scale(0.92) translateY(10px);
    opacity: 0;
    transition: transform 0.28s cubic-bezier(0.2, 0.9, 0.4, 1.1), opacity 0.25s ease;
}
.notice-modal-overlay.active .notice-modal {
    transform: scale(1) translateY(0);
    opacity: 1;
}
.notice-header {
    background: #fb7299;
    padding: 12px 16px;
    text-align: center;
    font-size: 14px;
    font-weight: 600;
    color: white;
    letter-spacing: 0.5px;
}
.notice-header i {
    margin-right: 6px;
    font-size: 14px;
}
.notice-content {
    background: white;
    padding: 16px 18px 20px 18px;
}
.notice-text {
    font-size: 11px;
    line-height: 1.55;
    color: #2c3e50;
    margin-bottom: 14px;
}
.notice-text p {
    margin-bottom: 8px;
}
.notice-rules {
    background: #f8f9fc;
    border-radius: 14px;
    padding: 10px 12px;
    margin: 8px 0 4px;
    font-size: 10px;
    color: #4a627a;
    border: 0.5px solid #eef0f2;
}
.notice-rules li {
    margin-left: 18px;
    margin-bottom: 5px;
    list-style-type: disc;
}
.notice-btn {
    background: #fb7299;
    border: none;
    width: 100%;
    padding: 9px 0;
    border-radius: 40px;
    color: white;
    font-size: 12px;
    font-weight: 600;
    margin-top: 12px;
    cursor: pointer;
    transition: background 0.2s, transform 0.05s;
}
.notice-btn:active {
    transform: scale(0.97);
    background: #e85d86;
}
@media (max-width: 500px) {
    .rec-cover {
        width: 65px;
        height: 48px;
    }
    .publish-btn {
        width: 50px;
        height: 50px;
        margin: -16px 0;
    }
    .publish-btn i {
        font-size: 24px;
    }
    .nav-cylinder {
        margin: 0 16px;
        padding: 4px 16px;
    }
    .recommend-grid {
        gap: 8px;
        padding: 0 8px;
    }
    .rec-card {
        padding: 6px;
    }
    .watermark-title {
        max-width: 160px;
        font-size: 7px;
    }
    .watermark-author {
        font-size: 8px;
    }
    .notice-modal {
        width: 260px;
    }
    .notice-header {
        padding: 10px 14px;
        font-size: 13px;
    }
    .notice-content {
        padding: 14px 16px;
    }
    .notice-text {
        font-size: 10px;
    }
}