:root {
    /* 主色系统 */
    --color-primary: #F4F5F7;    /* 素白 */
    --color-secondary: #2B2D42;   /* 墨染 */
    --color-accent: #C44536;      /* 赤陶 */
    --color-bg-header: #FFFFFF;   /* 纯白背景 */
    --color-bg-content: #F4F5F7;  /* 素白内容区 */
    
    /* 文字颜色 */
    --color-text: #2B2D42;
    --color-text-light: rgba(43, 45, 66, 0.7);
    
    /* 渐变和背景 */
    --gradient-bg: linear-gradient(180deg, rgba(244,245,247,0.9) 0%, rgba(244,245,247,0.4) 100%);
    --gradient-card: linear-gradient(to bottom, rgba(43,45,66,0) 0%, rgba(43,45,66,0.9) 100%);
    
    /* 字体系统 */
    --font-title: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-body: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-data: system-ui, -apple-system, sans-serif;
    
    /* 布局尺寸 */
    --header-height: 120px;
    --content-max-width: 100%;
    --card-width: 100%;
    --card-height: auto;
    --border-radius: 12px;
    --spacing-base: 16px;
    --spacing-small: 12px;
    --spacing-large: 24px;
}

/* 使用系统默认中文字体 */
@font-face {
    font-family: 'System Chinese';
    src: local('PingFang SC'),
         local('Microsoft YaHei'),
         local('Source Han Sans CN'),
         local('Noto Sans SC'),
         local('WenQuanYi Micro Hei');
    font-display: swap;
}

/* 基础样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: 'System Chinese', var(--font-body);
    background: var(--color-primary);
    color: var(--color-text);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
    width: 100%;
    position: relative;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-y;
}

/* 更新噪点背景样式 */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;  /* 使用视口宽度 */
    height: 100vh;  /* 使用视口高度 */
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 400 400' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
    opacity: 0.012;  /* 略微增加不透明度 */
    pointer-events: none;
    z-index: 0;
}

/* 个人信息头部 - 使用暖白色背景 */
.profile-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    background: var(--color-bg-header);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 1px 8px rgba(43, 45, 66, 0.06);
    z-index: 100;
    transform: translateZ(0);
    width: 100%;
}

.profile-content {
    position: relative;
    width: 100%;
    max-width: var(--content-max-width);
    margin: 0 auto;
    padding: var(--spacing-base);
    text-align: center;
    animation: fadeIn 0.8s ease-out;
    background: linear-gradient(180deg, rgba(255,248,243,0.98) 0%, rgba(255,248,243,0.95) 100%);
    height: 100%;
    display: flex;
    align-items: center;
    gap: var(--spacing-base);
}

.profile-image {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(43, 45, 66, 0.06);
    flex-shrink: 0;
}

.profile-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.profile-info {
    flex: 1;
    text-align: left;
    min-width: 0;  /* 确保flex子项目正确计算宽度 */
    margin-right: var(--spacing-base);  /* 添加右侧边距 */
}

.name {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: visible;  /* 修改为可见 */
    width: auto;  /* 自动宽度 */
    min-width: max-content;  /* 确保内容不会被截断 */
}

.bio {
    font-size: 13px;
    line-height: 1.4;
    color: var(--color-text-light);
}

/* 主内容区域 */
.main-content {
    position: relative;
    padding-top: calc(var(--header-height) + var(--spacing-base));
    padding-bottom: var(--spacing-large);
    background: var(--color-primary);
    width: 100%;
    max-width: var(--content-max-width);
    margin: 0 auto;
    min-height: 100vh;
}

/* 视频分区样式 */
.video-section {
    position: relative;
    width: 100%;
    margin-bottom: var(--spacing-large);
    padding: 0 var(--spacing-base);
}

/* 视频容器 - 添加精准滚动和边距 */
.video-container {
    position: relative;
    display: flex;
    flex-direction: row;
    gap: var(--spacing-base);
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    padding: var(--spacing-small) var(--spacing-large);
    scroll-snap-type: x mandatory;
    cursor: grab;
    margin: 0 calc(var(--spacing-base) * -1);
    scroll-padding: 0 var(--spacing-large);
}

.video-container::-webkit-scrollbar {
    display: none;
}

/* 视频卡片 - 添加右侧阴影 */
.video-card {
    width: 300px;
    height: 534px;
    border-radius: var(--border-radius);
    overflow: hidden;
    position: relative;
    background: var(--color-secondary);
    box-shadow: 8px 0 24px -12px rgba(0, 0, 0, 0.45);
    scroll-snap-align: center;
    flex-shrink: 0;
    transform: scale(0.95);
    transition: transform 0.3s ease;
    cursor: pointer;
    z-index: 2;  /* 确保在装饰条上面 */
}

.video-card:first-child {
    transform: scale(1);  /* 第一个卡片保持原始大小 */
}

.video-card.in-view {
    transform: scale(1);  /* 进入视野后变大 */
}

.video-card video,
.video-card .video-thumbnail {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
    display: block;
    border-radius: var(--border-radius);
}

.video-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: var(--spacing-base);
    background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0.4) 50%, rgba(0,0,0,0) 100%);
    pointer-events: none;
    z-index: 3;
    border-radius: 0 0 var(--border-radius) var(--border-radius);
}

/* 视频标题容器 - 与平台标识居中对齐 */
.video-title-container {
    position: relative;
    margin-bottom: var(--spacing-small);
    z-index: 3;
    display: flex;
    align-items: center;  /* 居中对齐 */
    gap: var(--spacing-small);
    min-height: 44px;  /* 确保高度足够 */
}

.platform-badge {
    background: rgba(255, 255, 255, 0.9);
    padding: 1px 4px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    gap: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    z-index: 4;
    flex-shrink: 0;
}

.platform-badge img {
    width: 16px;
    height: 16px;
    object-fit: contain;
}

.platform-badge span {
    font-size: 12px;
    color: var(--color-secondary);
    font-weight: 500;
}

/* 视频标题 - 单行显示 */
.video-title {
    color: #FFFFFF;  /* 白色文字 */
    font-size: 18px;  /* 增大基础字号 */
    font-weight: 600;
    line-height: 1.4;
    margin: 0;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;  /* 单行显示 */
    flex: 1;
}

/* 数据统计样式 - 单行显示，拉伸至边缘 */
.video-stats-mini {
    display: flex;
    flex-wrap: nowrap;  /* 强制单行 */
    gap: 8px;  /* 减小间距 */
    font-size: 15px;  /* 增大字号 */
    opacity: 0.9;
    justify-content: space-between;  /* 均匀分布 */
    align-items: center;
    padding: 10px 16px;
    background: rgba(0, 0, 0, 0.6);
    border-radius: 8px;
    margin: 0 -16px;
    width: calc(100% + 32px);
    min-width: 0;  /* 确保flex布局正确计算宽度 */
}

.video-stats-mini span {
    color: #FFFFFF;
    flex-shrink: 1;  /* 允许压缩 */
    white-space: nowrap;
    font-size: 14px;
    min-width: 0;  /* 确保flex布局正确计算宽度 */
    text-align: center;  /* 居中对齐 */
}

/* 分区标题装饰线 */
.section-title {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: var(--spacing-base);
    font-size: 18px;
    font-weight: 600;
    color: var(--color-text);
    white-space: nowrap;
}

.section-title::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--color-accent);  /* 使用赤陶色 */
    opacity: 1;  /* 不使用渐变 */
}

/* 响应式调整 */
@media screen and (min-width: 428px) {
    :root {
        --header-height: 140px;
        --spacing-base: 20px;
        --spacing-small: 16px;
        --spacing-large: 32px;
    }

    .profile-image {
        width: 64px;
        height: 64px;
    }

    .name {
        font-size: 20px;
    }

    .bio {
        font-size: 14px;
    }

    .video-title {
        font-size: 19px;  /* 大屏幕更大字号 */
    }
    
    .video-stats-mini {
        padding: 12px 20px;
        gap: 10px;
        font-size: 16px;
    }
    
    .video-stats-mini span {
        font-size: 15px;
    }

    .video-card {
        width: 320px;
        height: 568px;
    }
}

@media screen and (max-width: 428px) {
    .video-title {
        font-size: 17px;
    }
    
    .video-stats-mini {
        padding: 8px 16px;
        gap: 6px;
    }
    
    .video-stats-mini span {
        font-size: 13px;
    }
    
    .video-card {
        width: 280px;
        height: 498px;
    }
}

@media screen and (max-width: 393px) {
    .video-title {
        font-size: 16px;
    }

    .video-stats-mini {
        padding: 6px 14px;
        gap: 4px;
    }
    
    .video-stats-mini span {
        font-size: 12px;
    }
    
    .video-card {
        width: 260px;
        height: 460px;
    }
}

/* 添加滑动提示动画 */
@keyframes slideHint {
    0% {
        transform: translateX(0);
    }
    20% {
        transform: translateX(-10px);
    }
    40% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(0);
    }
}

.video-container:not(:hover) .video-card:first-child {
    animation: slideHint 2s ease-in-out infinite;
}

/* 底部说明文字样式 */
.footer-note {
    text-align: center;
    padding: var(--spacing-base);
    color: var(--color-text-light);
    font-size: 13px;
    line-height: 1.4;
    background: rgba(244, 245, 247, 0.8);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    margin-top: var(--spacing-large);
    position: relative;
}

.footer-note::before {
    content: '';
    display: block;
    width: 60px;
    height: 1px;
    background: var(--color-accent);
    margin: 0 auto 12px;
    opacity: 0.8;
}

.footer-note p {
    margin: 4px 0;
    opacity: 0.8;
}

/* 删除不需要的样式 */
.video-stats,
.stat,
.modal-stats,
.modal-stat,
.modal-stat-icon,
.modal-stat-value {
    display: none;
}

/* 视频播放器模态框 */
.video-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 59, 92, 0.95);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.video-modal.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    width: 100%;
    max-width: var(--content-max-width);
    background: var(--color-primary);
    border: 2px solid var(--color-secondary);
    border-radius: 0;
    overflow: hidden;
    transform: scale(0.9);
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
}

.video-modal.active .modal-content {
    transform: scale(1);
}

.video-player-container {
    width: 100%;
    aspect-ratio: 16/9;
    background: black;
    position: relative;
    z-index: 1;
}

#main-player {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.video-info {
    padding: 20px;
    background: var(--color-primary);
    position: relative;
    z-index: 2;
}

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

.video-header .video-title {
    flex: 1;
    margin-right: 16px;
    color: var(--color-text);
    font-size: 16px;
    line-height: 1.4;
}

.platform-info {
    display: flex;
    align-items: center;
    gap: 8px;
}

.platform-icon {
    width: 24px;
    height: 24px;
}

.platform-name {
    font-family: var(--font-data);
    font-size: 14px;
    font-weight: 700;
    color: var(--color-text-light);
}

.close-modal {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 40px;
    height: 40px;
    border: 2px solid var(--color-secondary);
    border-radius: 0;
    background: transparent;
    color: var(--color-secondary);
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.close-modal:hover {
    background: var(--color-secondary);
    color: var(--color-primary);
}

/* 响应式调整 */
@media screen and (max-width: 375px) {
    body {
        background: var(--color-primary);
    }
    
    .main-content {
        background: var(--color-primary);
        box-shadow: none;
    }

    .video-section {
        background: rgba(255, 255, 255, 0.5);
        box-shadow: none;
    }

    .video-card {
        width: 260px;
        height: 460px;
    }
}

@media screen and (min-width: 376px) {
    body {
        background: #F0F0F0;
        min-width: 393px;  /* 确保最小宽度 */
    }
    
    .profile-header {
        max-width: var(--content-max-width);
        margin-left: auto;
        margin-right: auto;
        border-radius: 0;
    }
    
    .main-content {
        max-width: var(--content-max-width);
        margin-left: auto;
        margin-right: auto;
    }
}

/* 移动端适配 */
@media screen and (max-width: 428px) {
    :root {
        --card-width: 280px; /* 增加卡片宽度 */
        --card-height: 498px; /* 增加卡片高度 */
    }

    body {
        min-width: 393px;  /* 确保最小宽度 */
    }

    .video-container {
        gap: 12px; /* 减小间距 */
    }

    .video-title {
        font-size: 13px;
        line-height: 1.3;
    }

    .video-stats-mini {
        gap: 8px;
        padding: 6px 10px;
    }
}

/* 针对 iPhone 14 Pro 的优化 */
@media screen and (max-width: 393px) {
    :root {
        --card-width: 260px; /* 增加卡片宽度 */
        --card-height: 460px; /* 增加卡片高度 */
    }

    .video-container {
        gap: 10px; /* 进一步减小间距 */
    }

    .video-stats-mini {
        gap: 6px;
        padding: 5px 8px;
    }
}

.video-card:active {
    cursor: grabbing;  /* 抓取时的光标 */
}

/* 禁用电话号码自动链接 */
a[href^="tel:"] {
    color: inherit;
    text-decoration: none;
    pointer-events: none;
}