
/* Global Reset */
body, html {
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Helvetica, Segoe UI, Arial, Roboto, 'PingFang SC', 'miui', 'Hiragino Sans GB', 'Microsoft Yahei', sans-serif;
    background-color: #f7f8fa;
    height: 100%;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

body.no-scroll {
    overflow: hidden;
}

#app {
    height: 100%;
    width: 100%;
}

/* Splash Screen */
.splash-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #fff;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.splash-img {
    width: 80%;
    max-width: 300px;
    margin-bottom: 20px;
}

.splash-slogan {
    font-size: 1.2rem;
    color: #333;
    margin-bottom: 40px;
    font-weight: bold;
    letter-spacing: 2px;
}

.skip-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    padding: 5px 12px;
    background: rgba(0,0,0,0.1);
    border-radius: 15px;
    font-size: 0.8rem;
    color: #666;
}

/* Login Page */
.login-page {
    padding-top: 50px;
    height: 100%;
    background: #fff;
}

.logo-area {
    text-align: center;
    margin-bottom: 40px;
}

.logo-area h1 {
    font-size: 2rem;
    color: #31E687;
    margin: 0;
}

.form-actions {
    margin-top: 30px;
    padding: 0 16px;
}

/* Home Page Header */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 10px;
    box-sizing: border-box;
    z-index: 100;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(5px);
}

.header-left, .header-right {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.header .van-tabs {
    flex: 1;
    width: 0;
    margin: 0 5px;
}

/* Drawer */
.drawer-content {
    height: 100%;
    background: #fff;
    display: flex;
    flex-direction: column;
}

.egg-overview {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    padding: 16px 16px 8px 16px;
}

.egg-overview-item {
    background: #f7f8fa;
    border-radius: 12px;
    padding: 12px;
    text-align: center;
}

.egg-overview-value {
    font-size: 1.2rem;
    font-weight: 700;
    color: #333;
}

.egg-overview-label {
    font-size: 0.8rem;
    color: #777;
}

.drawer-actions {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    padding: 8px 16px 16px 16px;
}

.drawer-action {
    background: #f7f8fa;
    border-radius: 12px;
    padding: 10px 12px;
    text-align: center;
    font-weight: 600;
    color: #333;
}

.drawer-action.primary {
    background: #31E687;
    color: #fff;
    box-shadow: 0 4px 10px rgba(49, 230, 135, 0.35);
}

.drawer-profile-actions {
    padding: 10px 16px 0 16px;
}

.van-popup--left {
    will-change: transform;
    backface-visibility: hidden;
}

.user-info-card {
    padding: 16px 14px;
    background: #ffffff;
    color: #333;
    display: flex;
    align-items: center;
    border-radius: 14px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.04);
}

.user-avatar-wrap {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 0 2px #ffffff;
}

.user-info-card .info-text {
    margin-left: 14px;
}

.user-info-card h3 {
    margin: 0 0 4px 0;
    font-size: 1.05rem;
}

.user-info-card p {
    margin: 0;
    font-size: 0.78rem;
    opacity: 0.7;
}

/* Content Area */
.content-area {
    height: 100%;
    padding-top: 0px; /* Header height */
    padding-bottom: 0px; /* Footer height */
    box-sizing: border-box;
    position: relative;
}

/* Scroll Container & Topic Swipe */
.scroll-container {
    height: 100%;
    position: relative;
    overflow: hidden;
    background: #ffffff;
}

.topic-swipe {
    height: 100%;
    position: relative;
    z-index: 70;
}

.topic-item {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
}

.topic-content {
    background: rgba(255, 255, 255, 0.95);
    padding: 30px;
    border-radius: 20px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.2);
    width: 100%;
    max-width: 340px;
    text-align: center;
    position: relative;
    margin-top: -50px;
}

.topic-content h3 {
    font-size: 1.5rem;
    color: #333;
    margin: 0 0 20px 0;
    line-height: 1.4;
}

.topic-content .meta {
    color: #999;
    font-size: 0.9rem;
    margin-bottom: 15px;
}

.topic-egg-stats {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

.egg-stat-group {
    display: flex;
    gap: 20px;
}

.egg-stat {
    font-size: 0.9rem;
    color: #666;
    display: flex;
    align-items: center;
    gap: 5px;
}

.topic-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.topic-fav-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 14px;
    background-color: rgba(245, 166, 35, 0.08);
    cursor: pointer;
}

.topic-copy-btn {
    font-size: 0.8rem;
    color: #31E687;
    cursor: pointer;
}

/* Danmaku Layer */
.danmaku-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%; /* Full height */
    pointer-events: none;
    z-index: 80;
    overflow: hidden;
}

.danmaku-item {
    position: absolute;
    display: flex;
    align-items: flex-start;
    background: rgba(0, 0, 0, 0.6);
    padding: 4px 12px 4px 4px;
    border-radius: 20px;
    color: #fff;
    max-width: 50vw;
    white-space: normal;
    word-break: break-word;
    will-change: transform, opacity;
    opacity: 0; /* Hidden by default */
}

.danmaku-item.is-running {
    animation-name: danmaku;
    animation-timing-function: cubic-bezier(0.25, 0.46, 0.45, 0.94);
    animation-fill-mode: forwards;
}

.danmaku-layer.paused .danmaku-item.is-running {
    animation-play-state: paused;
}

@keyframes danmaku {
    0% {
        opacity: 0;
        transform: translate3d(var(--start-x), var(--start-y), 0) scale(0.5);
    }
    10% {
        opacity: 1;
        transform: translate3d(var(--start-x), var(--start-y), 0) scale(1);
    }
    100% {
        opacity: 1;
        transform: translate3d(var(--end-x), var(--end-y), 0) scale(0.8);
    }
}

.danmaku-item .egg-shell {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    overflow: hidden;
    margin-right: 8px;
    border: 2px solid #fff;
    background: #fff;
    flex-shrink: 0;
}

.danmaku-item .avatar {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.danmaku-item .dm-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.danmaku-item .dm-text {
    font-size: 0.9rem;
    line-height: 1.2;
    white-space: pre-line;
}

.danmaku-item .dm-location {
    font-size: 0.7rem;
    color: rgba(255,255,255,0.7);
}

/* Bad Egg Style */
.danmaku-item.bad-egg {
    background: rgba(50, 50, 50, 0.8); /* Darker background */
    filter: grayscale(100%) brightness(0.6); /* Black egg effect */
}

.icon-egg-bad {
    filter: grayscale(100%) brightness(0.2);
}
.icon-egg-bad-small {
     filter: grayscale(100%) brightness(0.2);
}
.icon-egg-good-small {
     filter: brightness(1.2);
}

/* Infinite Container */
.infinite-container-danmaku {
    height: 100%;
    position: relative;
    background: #ffffff;
}

.empty-tip {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: rgba(255,255,255,0.5);
    font-size: 1rem;
}

/* Egg Floater */
.egg-floater {
    position: fixed;
    right: 10px;
    bottom: 110px;
    z-index: 200;
}

.egg-main-btn {
    width: 50px;
    height: 50px;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    cursor: pointer;
    position: relative;
    transition: transform 0.2s;
}

.egg-main-btn:active {
    transform: scale(0.95);
}

.egg-count-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #ff4d4f;
    color: #fff;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 10px;
    border: 1px solid #fff;
}

.egg-options {
    position: absolute;
    right: 100%;
    bottom: 0;
    margin-right: 10px;
    display: flex;
    gap: 10px;
    opacity: 0;
    transform: translateX(10px);
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.18, 0.89, 0.32, 1.28);
}

.egg-floater.active .egg-options {
    opacity: 1;
    transform: translateX(0);
    pointer-events: auto;
}

.egg-option-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: rgba(255,255,255,0.9);
    padding: 8px 12px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    cursor: pointer;
}

.egg-option-btn span {
    font-size: 20px;
    margin-bottom: 2px;
}

.egg-option-btn div {
    font-size: 10px;
    color: #666;
    white-space: nowrap;
}

/* Footer New */
.footer-new {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 60px;
    pointer-events: none;
    z-index: 50;
    display: flex;
    justify-content: center;
    background: rgba(255, 255, 255, 0);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.ip-character {
    position: fixed;
    left: 10px;
    bottom: 0;
    width: 100px;
    z-index: 60;
    pointer-events: auto;
}

.ip-img {
    width: 100%;
    display: block;
    mix-blend-mode: darken;
    filter: brightness(1.05);
}

.footer-buttons {
    position: fixed;
    bottom: 10px;
    left: 10px;
    right: 10px;
    display: flex;
    gap: 10px;
    pointer-events: auto;
    z-index: 120;
}

.btn-topic, .btn-danmaku {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    padding: 10px 20px;
    border-radius: 25px;
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.1s;
    flex-shrink: 0;
}

.btn-topic {
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(6px);
    flex: 1;
}

.btn-danmaku {
    background: #31E687;
    box-shadow: 0 4px 12px rgba(49, 230, 135, 0.4);
    flex: 2;
}

.btn-topic:active, .btn-danmaku:active {
    transform: scale(0.95);
}

/* Publish Box */
.publish-box {
    padding: 20px;
    background: #fff;
}

.publish-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.publish-header h3 {
    margin: 0;
    font-size: 1.1rem;
}

.publish-tools {
    margin-top: 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
}

.publish-actions {
    margin-left: auto;
}

.publish-action-btn {
    padding: 10px 18px;
    border-radius: 9999px;
    font-weight: 600;
    min-height: 40px;
}

.tool-btn {
    font-size: 24px;
    color: #666;
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 20px;
}

.emoji-panel {
    margin-top: 15px;
    height: 150px;
    overflow-y: auto;
    overflow-x: hidden;
    overscroll-behavior: contain;
    border-top: 1px solid #eee;
    padding-top: 10px;
}

.emoji-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 6px;
    width: 100%;
}

.emoji-item {
    font-size: 24px;
    text-align: center;
    cursor: pointer;
    padding: 6px 4px;
}

/* Profile Page */
.profile-page {
    background: #f7f8fa;
    height: 100%;
    overflow-y: auto; /* 强制在这个容器内滚动 */
    padding-bottom: 20px;
    box-sizing: border-box;
    -webkit-overflow-scrolling: touch; /* 顺滑滚动 */
}

.profile-page .van-tabs {
    background: transparent;
}

.profile-page .van-tabs__wrap {
    margin: 0 12px;
}

.profile-page .van-tabs__content {
    padding: 12px;
}

.profile-page .topic-card {
	background: #ffffff;
	border-radius: 14px;
	padding: 14px 16px;
	box-shadow: 0 6px 16px rgba(0,0,0,0.06);
	margin-bottom: 14px;
	border: 1px solid rgba(0, 0, 0, 0.02);
}

.profile-page .topic-card:last-child {
    margin-bottom: 0;
}

.profile-page .card-content {
    font-size: 0.95rem;
    color: #333;
    line-height: 1.5;
    margin-bottom: 8px;
}

.profile-page .card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    color: #999;
}

.profile-page .card-stats {
    display: flex;
    gap: 10px;
}

.user-info {
    background: #fff;
    padding: 30px 20px;
    text-align: center;
    margin-bottom: 10px;
}

.avatar-large {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    margin-bottom: 10px;
    border: 3px solid #ffffff;
}

.user-info h2 {
    margin: 5px 0;
    font-size: 1.2rem;
}

.user-info p {
    color: #999;
    font-size: 0.9rem;
    margin: 0 0 20px 0;
}

.egg-dashboard {
    display: flex;
    justify-content: space-around;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.egg-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.egg-icon {
    font-size: 24px;
    margin-bottom: 5px;
}

.egg-label {
    font-size: 0.8rem;
    color: #666;
}

.egg-value {
    font-size: 1.1rem;
    font-weight: bold;
    color: #333;
}

.logout-actions {
    margin: 30px 20px;
}

.profile-edit-card {
    margin: 10px 12px 20px 12px;
}

.profile-actions {
    padding: 12px 16px 0 16px;
}

/* Card Actions Bar */
.card-actions-bar {
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px dashed #eee;
    text-align: right;
}

/* Particles */
.particle-item {
    position: absolute;
    background: rgba(255,255,255,0.8);
    border-radius: 50%;
    pointer-events: none;
    opacity: 0;
}
.particle-item.is-running {
    animation-name: particle;
    animation-timing-function: linear;
    animation-fill-mode: forwards;
}

@keyframes particle {
    0% {
        opacity: 1;
        transform: translate3d(var(--start-x), var(--start-y), 0) rotate(0deg);
    }
    100% {
        opacity: 1;
        transform: translate3d(var(--end-x), var(--end-y), 0) rotate(var(--end-rotate));
    }
}

.particle-ribbon {
    width: 10px;
    height: 20px;
    border-radius: 0;
    background: #ff4d4f;
}
.particle-hongbao {
    width: 20px;
    height: 25px;
    background: red;
    border-radius: 2px;
}
.particle-hongbao::after {
    content: "福";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #ffd700;
    font-weight: 700;
    font-size: 12px;
}

/* Avatar Edit */
.avatar-edit-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px 0;
    background-color: #fff;
    margin-bottom: 10px;
    cursor: pointer;
}

.avatar-edit-section .avatar-large {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 8px;
    border: 2px solid #f0f0f0;
}

.avatar-edit-section .avatar-tip {
    font-size: 12px;
    color: #999;
}

.search-page {
    height: 100%;
    display: flex;
    flex-direction: column;
    background-color: #f7f8fa;
}

.search-results {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.search-card-grid {
    display: flex;
    flex-wrap: wrap;
    padding: 12px;
    gap: 10px;
    box-sizing: border-box;
}

.search-card {
    flex: 0 0 calc(50% - 5px);
    background-color: #ffffff;
    border-radius: 14px;
    padding: 10px 12px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.04);
    box-sizing: border-box;
}

.search-card-header {
    display: flex;
    align-items: center;
    margin-bottom: 6px;
}

.search-card-avatar-wrap {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    overflow: hidden;
    margin-right: 8px;
    flex-shrink: 0;
}

.search-card-avatar {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.search-card-header-text {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
}

.search-card-content {
    font-size: 0.9rem;
    color: #333;
    line-height: 1.4;
    margin-bottom: 6px;
}

.search-card-meta {
    display: flex;
    flex-direction: column;
    font-size: 0.75rem;
    color: #999;
}

.search-card-author {
    font-size: 0.8rem;
    color: #333;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.search-card-time {
    font-size: 0.7rem;
    color: #999;
}

