/* 设计系统变量 */
:root {
    --primary-purple: #793AFF;
    --primary-orange: #FF8154;
    --secondary-gray: #E1E3E4;
    --text-primary: #333333;
    --text-secondary: #666666;
    --background-white: #FFFFFF;
    --background-light: #F8F9FA;
    --border-color: #E1E3E4;
    --shadow-light: 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-medium: 0 4px 16px rgba(0, 0, 0, 0.15);
    --border-radius: 12px;
    --border-radius-small: 8px;
    --spacing-xs: 4px;
    --spacing-sm: 8px;
    --spacing-md: 16px;
    --spacing-lg: 24px;
    --spacing-xl: 32px;
}

/* 基础重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    background-color: var(--background-white);
    color: var(--text-primary);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
    outline: none;
    -webkit-tap-highlight-color: transparent; /* Remove tap highlight on mobile */
}

button:focus-visible {
    outline: 2px solid var(--primary-purple);
    outline-offset: 2px;
}

img {
    max-width: 100%;
    height: auto;
}

/* 主容器 */
#app-container {
    position: relative;
    width: 100%;
    height: 100vh;
    overflow: hidden;
}

/* 屏幕容器 */
.screen {
    display: none;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh; 
    overflow-y: auto;
    padding-bottom: 80px; /* Space for bottom navigation */
    background-color: var(--background-white); /* Ensure screen has background */
}

.screen.active {
    display: block;
}

/* iPhone状态栏 */
.status-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 16px 4px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    font-size: 14px;
    font-weight: 600;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.status-left .time {
    font-weight: 700;
}

.status-center .notch {
    width: 120px;
    height: 20px;
    background: black;
    border-radius: 0 0 16px 16px;
}

.status-right {
    display: flex;
    gap: 4px;
    font-size: 12px;
}

/* 顶部渐变区域 */
.top-gradient-area {
    background: linear-gradient(135deg, var(--primary-purple) 0%, var(--primary-orange) 100%);
    padding-bottom: var(--spacing-md);
    position: sticky; /* Make top gradient sticky for home screen */
    top: 28px; /* Assuming status bar is 28px, adjust if different */
    z-index: 999; /* Below status bar but above content */
}
/* Only apply sticky to top-gradient-area on home screen if status bar is also sticky */
#home-screen .top-gradient-area {
    top: calc(8px + 16px + 4px); /* Adjust based on status-bar padding-top + font-size + padding-bottom or fixed height */
    /* Or more simply if status bar has a fixed height, e.g., 28px: top: 28px; */
}


/* 主导航 */
.main-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--spacing-md);
    color: white;
}

.logo {
    font-size: 24px;
    font-weight: 700;
    color: white;
}

.search-input {
    flex: 1;
    max-width: 200px;
    padding: 8px 12px;
    border: none;
    border-radius: 20px;
    font-size: 14px;
    margin: 0 var(--spacing-md);
    background: rgba(255, 255, 255, 0.9);
}

.search-input:focus {
    outline: none;
    background: white;
}
.search-input::placeholder {
    color: #999;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.atp-balance {
    font-weight: 600;
    font-size: 12px;
    background: rgba(255, 255, 255, 0.2);
    padding: 4px 8px;
    border-radius: 12px;
    color: white;
}

.notification-btn {
    font-size: 18px;
    color: white;
    padding: 4px;
}

/* 分类导航 */
.category-nav {
    display: flex;
    align-items: center;
    padding: 0 var(--spacing-md) var(--spacing-sm);
    gap: var(--spacing-sm);
}

.category-scroll {
    display: flex;
    gap: var(--spacing-sm);
    overflow-x: auto;
    flex: 1;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.category-scroll::-webkit-scrollbar {
    display: none;
}

.category-btn {
    padding: 6px 12px;
    border-radius: 16px;
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
    transition: all 0.2s;
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

.category-btn.active {
    background: rgba(255, 255, 255, 0.9);
    color: var(--primary-purple);
}

.menu-btn {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    padding: 6px 8px;
    border-radius: 8px;
    font-size: 14px;
    flex-shrink: 0;
}

/* 视频Banner */
.video-banner {
    margin: 0 var(--spacing-md);
    border-radius: var(--border-radius);
    overflow: hidden;
    position: relative;
    height: 120px;
}

.banner-content {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    cursor: pointer;
}

.banner-bg {
    font-size: 48px;
    margin-right: var(--spacing-md);
}

.banner-info {
    text-align: left;
    color: white;
}

.banner-info h2 {
    font-size: 18px;
    margin-bottom: 4px;
}

.banner-info p {
    font-size: 12px;
    opacity: 0.9;
}

/* 专业版收益条 */
.pro-strip {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--spacing-sm) var(--spacing-md);
    background: linear-gradient(90deg, #FFE082, #FFB347);
    margin: var(--spacing-sm) var(--spacing-md) 0;
    border-radius: var(--spacing-sm);
}

.pro-icon {
    font-size: 20px;
}

.pro-text {
    flex: 1;
    margin-left: var(--spacing-sm);
    font-weight: 600;
    font-size: 14px;
    color: #333;
}

.pro-upgrade-btn {
    background: var(--primary-purple);
    color: white;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

/* 主要内容区域 */
.main-content {
    padding: var(--spacing-md);
    /* background: var(--background-white); /* Already on .screen */
}

/* 2列视频网格 */
.video-grid-2col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-lg);
}

.video-card-small {
    background: var(--background-white);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-light);
    cursor: pointer;
    transition: transform 0.2s;
}

.video-card-small:hover {
    transform: translateY(-2px);
}

.video-card-small .video-thumbnail {
    width: 100%;
    height: 80px;
    background: linear-gradient(135deg, var(--primary-purple), var(--primary-orange));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: white;
}

.video-card-small .video-info {
    padding: var(--spacing-sm);
}

.video-card-small .video-info h4 {
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 4px;
    line-height: 1.3;
    color: var(--text-primary);
}

.video-card-small .video-info p {
    font-size: 10px;
    color: var(--text-secondary);
    margin-bottom: var(--spacing-xs);
    line-height: 1.2;
    /* For ellipsis on two lines */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    min-height: calc(1.2em * 2); /* Approximate height for 2 lines */
}


.video-card-small .video-meta {
    display: flex;
    justify-content: space-between;
    font-size: 10px;
    color: var(--text-secondary);
}

.video-card-small .video-meta span:last-child {
    color: var(--primary-orange);
    font-weight: 600;
}

/* 1列视频网格 */
.video-grid-1col {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

.video-card-large {
    background: var(--background-white);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-light);
    cursor: pointer;
    transition: transform 0.2s;
    display: flex;
    gap: var(--spacing-md);
    padding: var(--spacing-md);
}

.video-card-large:hover {
    transform: translateY(-2px);
}

.video-thumbnail-large {
    width: 120px;
    height: 68px;
    background: linear-gradient(135deg, var(--primary-purple), var(--primary-orange));
    border-radius: var(--border-radius-small);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    flex-shrink: 0;
    color: white;
}

.video-info-large {
    flex: 1;
}

.video-info-large h3 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 4px;
    line-height: 1.3;
    color: var(--text-primary);
}

.video-info-large p {
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: var(--spacing-sm);
    line-height: 1.3;
    /* For ellipsis on two lines */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
     min-height: calc(1.3em * 2); /* Approximate height for 2 lines */
}

.creator-info {
    display: flex;
    gap: var(--spacing-md);
    font-size: 10px;
    color: var(--text-secondary);
    align-items: center; /* Align items if they have different heights */
}

.creator-info .reward {
    color: var(--primary-orange);
    font-weight: 600;
}

/* Shorts页面样式 */
.shorts-container {
    position: relative;
    width: 100%;
    height: calc(100vh - (8px + 16px + 4px) - 80px); /* Status bar and bottom nav, assuming status bar height of approx 28px */
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.shorts-video {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.shorts-placeholder {
    text-align: center;
    color: white;
    z-index: 1;
}

.video-icon { 
    font-size: 64px;
    margin-bottom: var(--spacing-md);
}

.shorts-placeholder h3 {
    font-size: 24px;
    margin-bottom: var(--spacing-sm);
}

.shorts-placeholder p {
    font-size: 16px;
    opacity: 0.8;
}

.shorts-overlay {
    position: absolute;
    bottom: 20px; 
    left: 0;
    right: 0;
    padding: var(--spacing-lg);
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}

.shorts-info {
    flex: 1;
    color: white;
    text-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

.shorts-info h3 {
    font-size: 16px;
    margin-bottom: var(--spacing-xs);
}

.shorts-actions {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

.action-btn { 
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-xs);
    color: white;
    padding: var(--spacing-sm);
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    transition: all 0.2s;
    min-width: 50px;
    min-height: 50px;
    justify-content: center;
}

.action-btn:hover {
    background-color: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.action-btn.liked {
    background-color: rgba(255, 107, 107, 0.2); /* Softer red */
}
.action-btn.liked .icon {
    color: #FF6B6B; 
}


.action-btn .icon {
    font-size: 24px;
}

.action-btn .count {
    font-size: 12px;
    font-weight: 500;
}

/* AI助手页面样式 */
.ai-main-container {
    height: calc(100vh - (8px + 16px + 4px) - 80px); 
    background: linear-gradient(135deg, #E8F4FD 0%, #B8E6B8 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-xl);
}

.ai-hero-section {
    text-align: center;
    margin-bottom: var(--spacing-xl);
}

.ai-character {
    font-size: 120px;
    margin-bottom: var(--spacing-md);
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

.ai-hero-section h2 {
    font-size: 28px;
    margin-bottom: var(--spacing-sm);
    color: var(--primary-purple);
}

.ai-hero-section p {
    font-size: 16px;
    color: var(--text-secondary);
    margin-bottom: var(--spacing-lg);
}

.ai-chat-btn {
    background: linear-gradient(135deg, var(--primary-purple), var(--primary-orange));
    color: white;
    padding: var(--spacing-md) var(--spacing-xl);
    border-radius: 30px;
    font-size: 16px;
    font-weight: 600;
    box-shadow: var(--shadow-medium);
    transition: transform 0.2s;
}

.ai-chat-btn:hover {
    transform: translateY(-2px);
}

.ai-features {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-md);
    width: 100%;
    max-width: 300px;
}

.feature-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: var(--spacing-md);
    background: rgba(255, 255, 255, 0.8);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-light);
}

.feature-icon {
    font-size: 32px;
    margin-bottom: var(--spacing-sm);
    color: var(--primary-purple);
}

.feature-item span {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-primary);
}

/* AI聊天气泡 */
.ai-chat-bubble {
    position: fixed;
    bottom: calc(80px + var(--spacing-md)); /* Above bottom nav */
    left: var(--spacing-md);
    right: var(--spacing-md);
    max-height: 60vh;
    background: var(--background-white);
    border-radius: 20px;
    box-shadow: var(--shadow-medium);
    display: none;
    flex-direction: column;
    z-index: 2000;
}

.ai-chat-bubble.active {
    display: flex;
}

.chat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-md);
    border-bottom: 1px solid var(--border-color);
    flex-shrink: 0;
}

.chat-header h3 {
    font-size: 16px;
    color: var(--primary-purple);
}

.close-chat-btn {
    font-size: 20px;
    color: var(--text-secondary);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chat-messages {
    flex: 1;
    padding: var(--spacing-md);
    overflow-y: auto;
    /* max-height: 300px;  Set by max-height on .ai-chat-bubble */
}

.message {
    margin-bottom: var(--spacing-md);
    display: flex;
}
.message.user-message {
    justify-content: flex-end;
}
.message.ai-message {
    justify-content: flex-start;
}

.message-content {
    background: var(--background-light);
    padding: var(--spacing-sm) var(--spacing-md); 
    border-radius: var(--border-radius);
    max-width: 80%;
    color: var(--text-primary);
    line-break: anywhere; /* Break long words */
}
.message.user-message .message-content {
    background: var(--primary-purple);
    color: white;
}
.message.ai-message .message-content {
    background: var(--background-light); 
    color: var(--text-primary);
}


.chat-input-area {
    padding: var(--spacing-md);
    border-top: 1px solid var(--border-color);
    display: flex;
    gap: var(--spacing-sm);
    flex-shrink: 0;
}

.chat-input {
    flex: 1;
    padding: var(--spacing-sm);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    font-size: 14px;
    background-color: var(--background-white);
    color: var(--text-primary);
}
.chat-input::placeholder {
    color: var(--text-secondary);
}

.send-btn {
    padding: var(--spacing-sm) var(--spacing-md);
    background-color: var(--primary-purple);
    color: white;
    border-radius: 20px;
    font-weight: 600;
    font-size: 14px;
}

/* 奖励中心页面样式 */
.rewards-container {
    padding: var(--spacing-md);
    /* background: var(--background-white);  On .screen */
    min-height: calc(100vh - (8px + 16px + 4px) - 80px); 
}

.rewards-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-lg);
}
.rewards-header h2 {
    color: var(--text-primary);
}

.help-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--background-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: var(--text-primary);
}

.balance-section {
    margin-bottom: var(--spacing-lg);
}

.balance-card {
    background: linear-gradient(135deg, var(--primary-purple), var(--primary-orange));
    color: white;
    padding: var(--spacing-lg);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-medium);
}

.balance-info h3 {
    font-size: 16px;
    margin-bottom: var(--spacing-sm);
}

.balance-amount {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: var(--spacing-md);
}

.energy-info h4 {
    font-size: 14px;
    margin-bottom: var(--spacing-sm);
}

.energy-bar {
    height: 8px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 4px;
    margin-bottom: var(--spacing-xs);
    overflow: hidden;
}

.energy-fill {
    height: 100%;
    background: #4CAF50;
    border-radius: 4px;
    transition: width 0.3s ease;
}

.energy-text {
    font-size: 12px;
    opacity: 0.9;
}

.action-buttons {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-lg);
}

.action-btn-large {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-md);
    background: var(--background-white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-light);
    transition: transform 0.2s;
}

.action-btn-large:hover {
    transform: translateY(-2px);
}

.action-btn-large .btn-icon {
    font-size: 24px;
    color: var(--primary-orange);
}

.action-btn-large .btn-text {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-primary);
}

.stats-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-lg);
}

.stat-card {
    background: var(--background-white);
    padding: var(--spacing-md);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-light);
    text-align: center;
}

.stat-label { 
    display: block;
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: var(--spacing-xs);
}

.stat-value {
    font-size: 18px;
    font-weight: 600;
    color: var(--primary-orange);
}

.task-section h3 {
    font-size: 18px;
    margin-bottom: var(--spacing-md);
    color: var(--text-primary);
}

.task-list {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

.task-item {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    padding: var(--spacing-md);
    background: var(--background-white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-light);
    cursor: pointer;
    transition: all 0.2s; /* Transition all for border and background */
}

.task-item:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-medium);
}

.task-item.completed {
    background: #e9f5e9; /* Lighter green */
    border-left: 4px solid #4CAF50;
}
.task-item.completed .task-icon {
    color: #4CAF50;
}
.task-item.completed h4,
.task-item.completed p,
.task-item.completed .task-reward {
    opacity: 0.7;
    text-decoration: line-through;
}


.task-item.active { 
    border-left: 4px solid var(--primary-orange);
}

.task-icon {
    font-size: 24px;
    flex-shrink: 0;
    color: var(--primary-purple);
}

.task-info {
    flex: 1;
}

.task-info h4 {
    font-size: 14px;
    margin-bottom: 4px;
    color: var(--text-primary);
}

.task-info p {
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: var(--spacing-sm);
}

.task-progress {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.progress-bar { 
    flex: 1;
    height: 4px;
    background: var(--border-color);
    border-radius: 2px;
    overflow: hidden;
}

.progress-fill { 
    height: 100%;
    background: var(--primary-orange);
    border-radius: 2px;
    transition: width 0.3s ease;
}

.task-progress span {
    font-size: 10px;
    color: var(--text-secondary);
    white-space: nowrap;
}

.task-reward {
    font-weight: 600;
    color: var(--primary-orange);
    font-size: 12px;
    flex-shrink: 0;
}

/* 个人中心页面样式 */
.profile-container {
    padding: var(--spacing-md);
    min-height: calc(100vh - (8px + 16px + 4px) - 80px);
}

.user-section {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    padding: var(--spacing-lg);
    background: linear-gradient(135deg, var(--primary-purple), var(--primary-orange));
    color: white;
    border-radius: var(--border-radius);
    margin-bottom: var(--spacing-lg);
}

.user-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    flex-shrink: 0;
}

.user-info {
    flex: 1;
}

.user-info h2 {
    font-size: 18px;
    margin-bottom: 4px;
}

.user-info p {
    font-size: 14px;
    opacity: 0.9;
}

.edit-btn {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    padding: var(--spacing-sm);
    border-radius: 50%;
    font-size: 16px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.user-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-lg);
}

.stat-item { 
    text-align: center;
    padding: var(--spacing-md);
    background: var(--background-white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-light);
}

.stat-number {
    display: block;
    font-size: 20px;
    font-weight: 700;
    color: var(--primary-orange);
    margin-bottom: 4px;
}
/* .stat-label is already defined */


.assets-section {
    margin-bottom: var(--spacing-lg);
}

.assets-section h3 {
    font-size: 18px;
    margin-bottom: var(--spacing-md);
    color: var(--text-primary);
}

.asset-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-md);
}

.asset-card {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    padding: var(--spacing-md);
    background: var(--background-white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-light);
}

.asset-icon {
    font-size: 24px;
    color: var(--primary-purple);
}

.asset-info {
    flex: 1;
}

.asset-name {
    display: block;
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.asset-amount {
    font-size: 18px;
    font-weight: 700;
    color: var(--primary-orange);
}

.menu-section {
    background: var(--background-white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-light);
    overflow: hidden;
}

.menu-list {
    display: flex;
    flex-direction: column;
}

.menu-item {
    display: flex;
    align-items: center;
    padding: var(--spacing-md);
    cursor: pointer;
    transition: background-color 0.2s;
    border-bottom: 1px solid var(--border-color);
}

.menu-item:last-child {
    border-bottom: none;
}

.menu-item:hover {
    background-color: var(--background-light);
}

.menu-icon { 
    width: 40px;
    font-size: 18px;
    text-align: center;
    color: var(--primary-purple);
}

.menu-text {
    flex: 1;
    font-size: 16px;
    color: var(--text-primary);
}

.menu-arrow {
    font-size: 16px;
    color: var(--text-secondary);
}

/* 视频详情页样式 */
.video-detail-container {
    /* background: var(--background-white); On .screen */
    min-height: calc(100vh - (8px + 16px + 4px) - 80px); 
}

.video-player-section {
    position: relative;
    width: 100%;
    aspect-ratio: 16/9;
    background: linear-gradient(135deg, #444 0%, #222 100%); /* Darker placeholder */
    display: flex;
    align-items: center;
    justify-content: center;
}

.video-header-controls {
    position: absolute;
    top: var(--spacing-md);
    left: var(--spacing-md);
    right: var(--spacing-md);
    display: flex;
    justify-content: space-between;
    z-index: 10;
}

.back-btn, .more-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.5);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    backdrop-filter: blur(10px);
}

.video-placeholder {
    text-align: center;
    color: white;
}
.video-placeholder .play-btn { /* Style for the big play button in placeholder */
    display: flex; /* Or inline-flex */
    align-items: center;
    justify-content: center;
    width: 80px; /* Example size */
    height: 80px;
    border-radius: 50%;
    background-color: rgba(0,0,0,0.4);
    font-size: 48px; /* Icon size */
    margin: 0 auto var(--spacing-md); /* Center horizontally */
}


.play-btn { 
    font-size: 64px;
    margin-bottom: var(--spacing-md);
    cursor: pointer;
    transition: transform 0.2s, background-color 0.2s;
}

.play-btn:hover {
    transform: scale(1.1);
    background-color: rgba(0,0,0,0.6);
}


.video-placeholder h3 {
    font-size: 18px;
    padding: 0 var(--spacing-md); /* Prevent text overflow on small screens */
}

.video-controls {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: var(--spacing-sm) var(--spacing-md); /* Adjusted padding */
    display: none; 
}

.video-controls.active {
    display: block;
}

.progress-container {
    margin-bottom: var(--spacing-xs);
}

.progress-bar.video-player-progress { /* Specific class for video player progress */
    height: 4px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
    margin-bottom: var(--spacing-xs);
    cursor: pointer;
}

.progress-fill.video-player-progress-fill { /* Specific class */
    height: 100%;
    background: var(--primary-orange);
    border-radius: 2px;
    transition: width 0.1s linear; /* Linear for smooth scrubbing */
}

.time-display {
    font-size: 12px;
    color: white;
    margin-top: var(--spacing-xs);
}

.control-buttons {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.control-btn {
    background: none;
    color: white;
    font-size: 18px; /* Slightly larger for easier tapping */
    padding: var(--spacing-sm); /* More padding */
    border-radius: 4px;
    transition: background-color 0.2s;
}

.control-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.atp-progress-container {
    position: absolute;
    bottom: calc(var(--spacing-md) + 60px); /* Adjust if controls height changes */
    left: var(--spacing-md);
    right: var(--spacing-md);
    z-index: 5;
    opacity: 0.8; /* Make it slightly transparent */
    transition: opacity 0.3s;
}
.video-controls.active ~ .atp-progress-container { /* Hide ATP bar when main controls are up */
    opacity: 0;
    pointer-events: none;
}


.atp-progress-bar {
    height: 8px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 4px;
    margin-bottom: var(--spacing-sm);
    overflow: hidden;
}

.atp-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-orange), #FFB347);
    border-radius: 4px;
    transition: width 0.3s ease;
}

.atp-progress-text {
    font-size: 12px;
    color: white;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.video-info-section {
    padding: var(--spacing-md);
    border-bottom: 1px solid var(--border-color);
}

.video-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: var(--spacing-sm);
    line-height: 1.4;
    color: var(--text-primary);
}

.video-meta-info {
    display: flex;
    flex-wrap: wrap; /* Allow wrapping on small screens */
    gap: var(--spacing-sm) var(--spacing-md); /* Row and column gap */
    font-size: 12px;
    color: var(--text-secondary);
}

.creator-info-section {
    padding: var(--spacing-md);
    border-bottom: 1px solid var(--border-color);
}

.creator-profile {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
}

.creator-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-purple), var(--primary-orange));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
    color: white;
}

.creator-details {
    flex: 1;
    min-width: 0; /* Prevents overflow with long names */
}

.creator-name {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 4px;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.creator-stats {
    font-size: 12px;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.follow-btn {
    padding: var(--spacing-sm) var(--spacing-md);
    background: var(--primary-orange);
    color: white;
    border-radius: 20px;
    font-weight: 600;
    font-size: 14px;
    transition: background-color 0.2s, color 0.2s;
    flex-shrink: 0;
}
.follow-btn.following {
    background: var(--secondary-gray);
    color: var(--text-secondary);
}

.follow-btn:hover:not(.following) {
    background: #E6734D; /* Darker orange */
}
.follow-btn.following:hover {
    background: #d1d3d4; /* Darker gray */
}


.interaction-section {
    padding: var(--spacing-md);
    border-bottom: 1px solid var(--border-color);
}

.interaction-buttons-single {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--spacing-sm);
}

.interaction-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-xs);
    padding: var(--spacing-sm) var(--spacing-xs); /* Adjusted padding */
    border-radius: var(--border-radius-small);
    transition: background-color 0.2s;
    background: none; /* Explicitly none */
    border: none; /* Explicitly none */
}

.interaction-btn:hover {
    background-color: var(--background-light);
}

.interaction-btn .btn-icon { 
    font-size: 20px;
    color: var(--text-secondary);
}
.interaction-btn.liked .btn-icon { 
    color: var(--primary-orange);
}


.interaction-btn .btn-text { 
    font-size: 12px;
    font-weight: 500; /* Normal weight */
    color: var(--text-secondary);
}

.video-tabs {
    display: flex;
    background: var(--background-white);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: calc(8px + 16px + 4px); /* Match status bar height */
    z-index: 998; /* Below top-gradient on home, above content */
}

.video-tab {
    flex: 1;
    padding: var(--spacing-md);
    text-align: center;
    font-weight: 500;
    color: var(--text-secondary);
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
    background: none;
    border-top: none;
    border-left: none;
    border-right: none;
    cursor: pointer;
}

.video-tab.active {
    color: var(--primary-purple);
    border-bottom-color: var(--primary-purple);
}

.tab-contents { 
    background: var(--background-white);
}

.tab-content {
    display: none;
    padding: var(--spacing-md);
}

.tab-content.active {
    display: block;
}

.video-description {
    line-height: 1.6;
    color: var(--text-primary);
}

.video-description ul {
    margin: var(--spacing-md) 0;
    padding-left: var(--spacing-lg);
}

.video-description li {
    margin-bottom: var(--spacing-xs);
}

.comments-section {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

.comment-item {
    display: flex;
    gap: var(--spacing-sm);
}

.comment-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-purple), var(--primary-orange));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    flex-shrink: 0;
    color: white;
}

.comment-content {
    flex: 1;
}

.comment-header {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-xs);
}

.comment-author {
    font-weight: 600;
    font-size: 14px;
    color: var(--text-primary);
}

.comment-time {
    font-size: 12px;
    color: var(--text-secondary);
}

.comment-text {
    font-size: 14px;
    line-height: 1.4;
    margin-bottom: var(--spacing-sm);
    color: var(--text-primary);
    word-break: break-word;
}

.comment-actions {
    display: flex;
    gap: var(--spacing-md);
}

.comment-like, .comment-reply {
    font-size: 12px;
    color: var(--text-secondary);
    background: none;
    border: none;
    cursor: pointer;
    transition: color 0.2s;
    padding: var(--spacing-xs) 0;
}

.comment-like:hover, .comment-reply:hover {
    color: var(--primary-purple);
}

.related-videos-horizontal {
    display: flex;
    gap: var(--spacing-md);
    overflow-x: auto;
    padding-bottom: var(--spacing-sm); 
    scrollbar-width: thin; /* For Firefox */
}
.related-videos-horizontal::-webkit-scrollbar {
    height: 6px;
}
.related-videos-horizontal::-webkit-scrollbar-thumb {
    background-color: var(--secondary-gray);
    border-radius: 3px;
}


.related-column {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
    min-width: 280px; 
}

.related-video-item {
    display: flex;
    gap: var(--spacing-md);
    cursor: pointer;
    transition: background-color 0.2s;
    border-radius: var(--border-radius-small);
    padding: var(--spacing-sm);
}

.related-video-item:hover {
    background-color: var(--background-light);
}

.related-thumbnail {
    width: 120px;
    height: 68px;
    border-radius: var(--border-radius-small);
    background: linear-gradient(135deg, var(--primary-purple), var(--primary-orange));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    flex-shrink: 0;
    color: white;
}

.related-info {
    flex: 1;
    min-width: 0; /* Prevent overflow */
}

.related-title {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: var(--spacing-xs);
    line-height: 1.3;
    color: var(--text-primary);
    /* Ellipsis for title */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.related-meta {
    font-size: 12px;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 底部导航栏 */
.bottom-navigation {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 80px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px); /* Safari */
    border-top: 1px solid rgba(225, 225, 225, 0.2); 
    display: flex;
    justify-content: space-around;
    align-items: flex-start; 
    padding-top: var(--spacing-sm); 
    z-index: 1000;
    padding-bottom: env(safe-area-inset-bottom);
}

.nav-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-xs);
    color: var(--text-secondary);
    transition: all 0.2s;
    min-width: 60px;
    background: none;
    border: none;
    cursor: pointer;
    padding: var(--spacing-xs); /* Added padding for better tap area */
}

.nav-btn.active {
    color: var(--primary-purple);
    transform: scale(1.05);
}

.nav-icon {
    font-size: 24px;
}

.nav-label {
    font-size: 10px;
    font-weight: 500;
}

/* 弹窗样式 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(5px); 
    -webkit-backdrop-filter: blur(5px);
    padding: var(--spacing-md); /* Add padding for smaller screens */
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--background-white);
    border-radius: var(--border-radius);
    width: 100%; /* Full width on small screens, constrained by modal padding */
    max-width: 400px;
    max-height: 90vh; /* Max height relative to viewport */
    overflow: hidden; /* Prevent content from breaking out, body handles scroll */
    box-shadow: var(--shadow-medium);
    display: flex;
    flex-direction: column;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-md);
    border-bottom: 1px solid var(--border-color);
    flex-shrink: 0;
}

.modal-header h3 {
    font-size: 18px;
    color: var(--text-primary);
}

.close-btn { 
    font-size: 24px;
    color: var(--text-secondary);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s;
}

.close-btn:hover {
    background: var(--background-light);
}

.modal-body {
    padding: var(--spacing-md);
    flex-grow: 1; 
    overflow-y: auto; 
}

.modal-body textarea {
    width: 100%;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-small);
    padding: var(--spacing-sm); /* Adjusted padding */
    font-size: 16px;
    resize: vertical;
    min-height: 100px;
    color: var(--text-primary);
    background-color: var(--background-white);
}
.modal-body textarea::placeholder {
    color: var(--text-secondary);
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: var(--spacing-sm);
    padding: var(--spacing-md);
    border-top: 1px solid var(--border-color);
    flex-shrink: 0;
}

.cancel-btn {
    padding: var(--spacing-sm) var(--spacing-md);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-small);
    color: var(--text-secondary);
    transition: background-color 0.2s;
}

.cancel-btn:hover {
    background: var(--background-light);
}

.submit-btn {
    padding: var(--spacing-sm) var(--spacing-md);
    background: var(--primary-purple);
    color: white;
    border-radius: var(--border-radius-small);
    font-weight: 600;
    transition: background-color 0.2s;
}

.submit-btn:hover {
    background: #6a31e6;
}

/* 打赏弹窗特定样式 */
.reward-options {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-md);
}

.reward-option {
    padding: var(--spacing-md);
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius-small);
    background: var(--background-white);
    font-weight: 600;
    transition: all 0.2s;
    color: var(--text-primary);
    text-align: center;
}

.reward-option:hover, .reward-option.selected {
    border-color: var(--primary-orange);
    background: rgba(255, 129, 84, 0.1);
    color: var(--primary-orange);
}

.custom-reward {
    border-top: 1px solid var(--border-color);
    padding-top: var(--spacing-md);
    margin-top: var(--spacing-md);
}

.custom-reward label {
    display: block;
    margin-bottom: var(--spacing-sm);
    font-weight: 600;
    color: var(--text-primary);
}

.custom-reward input {
    width: 100%;
    padding: var(--spacing-sm);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-small);
    color: var(--text-primary);
    background-color: var(--background-white);
}
.custom-reward input::placeholder {
    color: var(--text-secondary);
}


/* 视频菜单选项 */
.menu-options {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xs); /* Tighter spacing */
}

.menu-option {
    padding: var(--spacing-md);
    text-align: left;
    border-radius: var(--border-radius-small);
    transition: background-color 0.2s;
    color: var(--text-primary);
    display: flex; /* For icon alignment */
    align-items: center;
    gap: var(--spacing-sm);
}
.menu-option span[aria-hidden="true"] { /* Icon styling */
    font-size: 1.2em;
    width: 1.5em; /* Ensure space for icon */
    text-align: center;
}

.menu-option:hover {
    background: var(--background-light);
}

/* 分类网格 */
.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); /* Responsive columns */
    gap: var(--spacing-md);
}

.category-item {
    padding: var(--spacing-md);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-small);
    background: var(--background-white);
    text-align: center;
    transition: all 0.2s;
    color: var(--text-primary);
}

.category-item:hover {
    border-color: var(--primary-purple);
    background: rgba(121, 58, 255, 0.1);
    color: var(--primary-purple);
}

/* 规则内容 */
.rules-content h4 {
    font-size: 16px;
    margin: var(--spacing-md) 0 var(--spacing-sm);
    color: var(--primary-purple);
}

.rules-content p,
.rules-content ul {
    margin-bottom: var(--spacing-md);
    color: var(--text-secondary);
}
.rules-content ul {
    padding-left: var(--spacing-lg);
}

.rules-content li {
    margin-bottom: var(--spacing-xs);
    line-height: 1.4;
}

/* 充值选项 */
.recharge-options {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

.recharge-option {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-md);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-small);
}

.recharge-option .amount {
    font-weight: 600;
    font-size: 16px;
    color: var(--text-primary);
}

.recharge-option .price {
    color: var(--primary-orange);
    font-weight: 600;
}

.buy-btn {
    background: var(--primary-purple);
    color: white;
    padding: var(--spacing-sm) var(--spacing-md);
    border-radius: var(--border-radius-small);
    font-size: 14px;
}

/* 兑换表单 */
.exchange-form, .withdraw-form {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

.exchange-rate {
    text-align: center;
    padding: var(--spacing-md);
    background: var(--background-light);
    border-radius: var(--border-radius-small);
    font-weight: 600;
    color: var(--text-primary);
}

.input-group, .output-group {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xs);
}

.input-group label, .output-group label {
    font-weight: 600;
    color: var(--text-primary);
}

.input-group input {
    padding: var(--spacing-sm);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-small);
    color: var(--text-primary);
    background-color: var(--background-white);
}
.input-group input::placeholder {
    color: var(--text-secondary);
}

.output-group span {
    padding: var(--spacing-sm);
    background: var(--background-light);
    border-radius: var(--border-radius-small);
    font-weight: 600;
    color: var(--primary-orange);
    min-height: calc(var(--spacing-sm) * 2 + 1em + 2px); /* Match input height */
    display: flex; /* For vertical alignment if needed */
    align-items: center;
}

.fee-info {
    text-align: center;
    font-size: 12px;
    color: var(--text-secondary);
}

/* ATP奖励动画 */
.atp-bubble-animation {
    position: fixed;
    background: linear-gradient(135deg, var(--primary-orange), #FFB347);
    color: white;
    padding: var(--spacing-sm) var(--spacing-md);
    border-radius: 20px;
    font-weight: 600;
    font-size: 14px;
    z-index: 3000;
    pointer-events: none;
    opacity: 0;
    transform: translate(-50%, -50%) scale(0); 
    transition: opacity 0.3s ease, transform 0.3s ease;
    box-shadow: var(--shadow-medium);
}

.atp-bubble-animation.show {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

@keyframes atpFlyAnimation {
    0% {
        /* Start from current 'show' state if dynamically positioned by JS before adding 'fly' */
        opacity: 1;
    }
    30% { /* Slight upward bounce */
        transform: translate(var(--atp-fly-tx, -50%), calc(var(--atp-fly-ty, -50%) - 20px)) scale(1.1);
        opacity: 1;
    }
    100% {
        /* Target near top-right ATP balance, exact values depend on layout */
        /* Use CSS variables set by JS if needed for dynamic target */
        transform: translate(calc(var(--atp-target-x, 100vw - 100px) - 50vw), calc(var(--atp-target-y, 50px) - 50vh)) scale(0.5);
        opacity: 0;
    }
}


.atp-bubble-animation.fly {
    /* JS will set --atp-fly-tx, --atp-fly-ty (initial position relative to center) */
    /* and --atp-target-x, --atp-target-y (target position in viewport coordinates) */
    animation: atpFlyAnimation 1.5s cubic-bezier(0.25, 0.1, 0.25, 1) forwards;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .video-card-large {
        flex-direction: column;
        gap: var(--spacing-sm);
    }
    
    .video-thumbnail-large {
        width: 100%;
        height: 120px; /* Or aspect-ratio */
    }
    
    .related-videos-horizontal {
        flex-direction: column; /* Stack columns */
    }
    .related-column {
        min-width: auto; /* Allow columns to shrink */
    }
    
    .stats-section,
    .asset-cards {
        grid-template-columns: 1fr; 
    }

    .action-buttons { 
        grid-template-columns: repeat(auto-fit, minmax(90px, 1fr)); 
    }
}

@media (max-width: 480px) {
    .main-nav {
        padding: var(--spacing-sm);
        flex-wrap: wrap; /* Allow wrapping if too narrow */
    }
    .main-nav .nav-center {
        order: 1; /* Move search below logo/notification on wrap */
        width: 100%;
        margin-top: var(--spacing-sm);
    }
    .search-input {
        margin: 0;
        max-width: none; /* Full width in its container */
    }
    
    .video-grid-2col {
        grid-template-columns: 1fr; 
    }
    
    .modal-content {
        max-height: 95vh; /* Allow more height on small screens */
    }
    
    .interaction-buttons-single { 
        grid-template-columns: repeat(2, 1fr);
        gap: var(--spacing-md);
    }
    
    .reward-options { 
        grid-template-columns: 1fr;
    }
    
    .category-grid { 
        grid-template-columns: 1fr;
    }
    .top-gradient-area {
        /* Ensure top doesn't become too large if status bar isn't present or changes */
         top: 0; /* Default if status bar not handled by JS */
    }
     #home-screen .top-gradient-area { /* If status bar is fixed height */
        top: 28px; /* Example fixed status bar height */
    }


}

/* 深色模式支持 */
@media (prefers-color-scheme: dark) {
    :root {
        --background-white: #121212; 
        --background-light: #1e1e1e;  
        --text-primary: #e0e0e0;     
        --text-secondary: #a0a0a0;   
        --border-color: #383838; /* Slightly lighter border for dark mode */
        --primary-purple: #9B59B6; 
        --primary-orange: #F39C12; 
        --shadow-light: 0 2px 8px rgba(255, 255, 255, 0.05); /* Lighter shadow */
        --shadow-medium: 0 4px 16px rgba(255, 255, 255, 0.08);
    }

    .status-bar {
        background: rgba(10, 10, 10, 0.85); /* Darker status bar */
    }
    .status-center .notch {
        background: #000;
    }

    .search-input {
        background: rgba(50, 50, 50, 0.9);
        color: var(--text-primary);
        border: 1px solid var(--border-color); /* Add border for inputs in dark mode */
    }
    .search-input:focus {
        background: #333;
    }
    .search-input::placeholder {
        color: var(--text-secondary);
    }

    .category-btn {
        background: rgba(70, 70, 70, 0.5); /* Darker category buttons */
        color: var(--text-primary);
    }
    .category-btn.active {
        background: rgba(180, 180, 180, 0.9); /* Lighter active for contrast */
        color: var(--primary-purple);
    }
    .menu-btn {
        background: rgba(70, 70, 70, 0.5);
        color: var(--text-primary);
    }
    .pro-strip {
        background: linear-gradient(90deg, #b38a3c, #cc7a2f); 
    }
    .pro-text {
        color: #e0e0e0;
    }

    .video-card-small, .video-card-large, .stat-card, .asset-card, 
    .menu-section, .related-video-item, .recharge-option, 
    .category-item, .task-item {
        background-color: var(--background-light);
    }
    .action-btn-large { 
         background-color: var(--background-light);
    }

    .bottom-navigation {
        background: rgba(30, 30, 30, 0.95);
        border-top: 1px solid rgba(80, 80, 80, 0.3);
    }

    .modal-content {
        background: var(--background-light);
    }

    .reward-option {
         background: var(--background-light);
         border-color: var(--border-color);
    }
    .reward-option:hover, .reward-option.selected {
        background: rgba(243, 156, 18, 0.15); 
        border-color: var(--primary-orange);
    }

    .custom-reward input, .input-group input, .modal-body textarea, .chat-input {
        background-color: var(--background-white); 
        color: var(--text-primary);
        border: 1px solid var(--border-color); 
    }
    .custom-reward input::placeholder, .input-group input::placeholder, 
    .modal-body textarea::placeholder, .chat-input::placeholder {
        color: var(--text-secondary);
    }

    .exchange-rate, .output-group span {
        background: var(--background-white);
    }

    .message.ai-message .message-content {
        background: #2c2c2c; /* Slightly different AI bubble */
    }
    .task-item.completed {
        background: #2a3b2a; /* Dark green */
        border-left-color: #38761D; /* Darker green for border */
    }
    .task-item.completed h4,
    .task-item.completed p,
    .task-item.completed .task-reward {
        opacity: 0.6;
    }
    .follow-btn.following {
        background: #444; /* Darker grey for following */
        color: var(--text-secondary);
    }
    .follow-btn.following:hover {
        background: #555;
    }
    .video-tabs {
         background: var(--background-light);
    }


}

/* 打印样式 */
@media print {
    body {
        background-color: #FFFFFF !important;
        color: #000000 !important;
        font-size: 10pt; /* Adjust base font size for print */
    }
    :root { /* Override CSS vars for print */
        --text-primary: #000000;
        --text-secondary: #333333;
        --background-white: #FFFFFF;
        --background-light: #F0F0F0;
        --border-color: #CCCCCC;
        --primary-purple: #540057;
        --primary-orange: #CC5400;
    }

    .bottom-navigation,
    .modal,
    .status-bar,
    .top-gradient-area,
    .pro-strip,
    .ai-main-container, 
    .shorts-container,
    .video-player-section .video-header-controls,
    .video-player-section .video-controls,
    .video-player-section .atp-progress-container,
    .video-player-section .play-btn,
    .action-buttons /* Rewards page action buttons */
     {
        display: none !important;
    }
    
    .screen {
        position: static !important;
        display: block !important;
        height: auto !important;
        overflow: visible !important;
        padding-bottom: 0 !important;
        border: none !important;
        box-shadow: none !important;
    }
    #app-container {
        height: auto !important;
        overflow: visible !important;
    }
    .video-player-section {
        background: var(--background-light) !important;
        border: 1px solid var(--border-color);
        padding: var(--spacing-md);
    }
    .video-placeholder h3 {
        color: var(--text-primary) !important;
    }


    .video-card-small, .video-card-large, .stat-card, .asset-card, 
    .menu-item, .task-item, .creator-info-section, .interaction-section,
    .video-tabs, .tab-content, .comment-item, .related-video-item {
        box-shadow: none !important;
        border: 1px solid var(--border-color) !important;
        page-break-inside: avoid;
    }
    .video-thumbnail, .video-thumbnail-large, .creator-avatar, 
    .comment-avatar, .related-thumbnail, .banner-bg {
        background: var(--background-light) !important; 
        color: var(--text-primary) !important;
        border: 1px dashed var(--border-color); /* Indicate media area */
    }
    h1,h2,h3,h4,h5,h6 {
        color: var(--text-primary) !important;
    }
    a { text-decoration: none; color: var(--primary-purple); }
    button { display: none !important; } /* Hide most buttons for print */
    input, textarea { border: 1px solid var(--border-color) !important; }

}