/* TikTok风格CSS - 仿照TikTok的现代设计 */

:root {
    --tiktok-black: #000000;
    --tiktok-white: #ffffff;
    --tiktok-gray-50: #f8f8f8;
    --tiktok-gray-100: #f1f1f1;
    --tiktok-gray-200: #e4e4e4;
    --tiktok-gray-300: #d1d1d1;
    --tiktok-gray-400: #a8a8a8;
    --tiktok-gray-500: #8a8a8a;
    --tiktok-gray-600: #6d6d6d;
    --tiktok-gray-700: #525252;
    --tiktok-gray-800: #393939;
    --tiktok-gray-900: #262626;
    --tiktok-pink: #fe2c55;
    --tiktok-blue: #25f4ee;
    --tiktok-primary: #fe2c55;
    --tiktok-secondary: #25f4ee;
    --tiktok-gradient: linear-gradient(45deg, #fe2c55, #25f4ee);
    --tiktok-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    --tiktok-shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.15);
    --tiktok-radius: 8px;
    --tiktok-radius-lg: 16px;
    --tiktok-transition: all 0.2s ease;
}

/* 基础重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--tiktok-black);
    color: var(--tiktok-white);
    line-height: 1.5;
    overflow-x: hidden;
}

/* 容器布局 */
.tiktok-container {
    max-width: 100%;
    margin: 0 auto;
    padding: 0;
    position: relative;
}

/* 导航栏 */
.tiktok-navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    background-color: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 1000;
    display: flex;
    align-items: center;
    padding: 0 20px;
}

.tiktok-logo {
    font-size: 24px;
    font-weight: bold;
    background: var(--tiktok-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-decoration: none;
}

.tiktok-search {
    flex: 1;
    max-width: 400px;
    margin: 0 20px;
}

.tiktok-search input {
    width: 100%;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    color: var(--tiktok-white);
    font-size: 14px;
}

.tiktok-nav-icons {
    display: flex;
    gap: 20px;
    align-items: center;
}

.tiktok-nav-icon {
    color: var(--tiktok-white);
    font-size: 20px;
    text-decoration: none;
    transition: var(--tiktok-transition);
}

.tiktok-nav-icon:hover {
    color: var(--tiktok-pink);
}

.tiktok-user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--tiktok-pink);
}

/* 主内容区 */
.tiktok-main {
    display: flex;
    min-height: calc(100vh - 60px);
    margin-top: 60px;
}

/* 侧边栏 */
.tiktok-sidebar {
    width: 240px;
    background-color: var(--tiktok-black);
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    padding: 20px 0;
    position: fixed;
    top: 60px;
    bottom: 0;
    left: 0;
    overflow-y: auto;
}

.tiktok-sidebar-item {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    color: var(--tiktok-white);
    text-decoration: none;
    transition: var(--tiktok-transition);
}

.tiktok-sidebar-item:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

.tiktok-sidebar-item.active {
    color: var(--tiktok-pink);
    border-left: 3px solid var(--tiktok-pink);
}

.tiktok-sidebar-icon {
    margin-right: 12px;
    font-size: 20px;
}

/* 视频流区域 */
.tiktok-feed {
    flex: 1;
    margin-left: 240px;
    padding: 0;
    background-color: var(--tiktok-black);
}

.tiktok-video-container {
    max-width: 600px;
    margin: 0 auto;
    padding: 20px 0;
}

/* 视频卡片 */
.tiktok-video-card {
    position: relative;
    background-color: var(--tiktok-black);
    border-radius: var(--tiktok-radius-lg);
    overflow: hidden;
    margin-bottom: 20px;
    box-shadow: var(--tiktok-shadow-lg);
}

.tiktok-video-wrapper {
    position: relative;
    width: 100%;
    padding-top: 177.78%; /* 9:16 比例 */
    background-color: #000;
}

.tiktok-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.tiktok-video-controls {
    position: absolute;
    bottom: 20px;
    left: 20px;
    right: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.tiktok-play-btn {
    width: 50px;
    height: 50px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
    cursor: pointer;
    transition: var(--tiktok-transition);
}

.tiktok-play-btn:hover {
    background: rgba(0, 0, 0, 0.7);
}

.tiktok-video-info {
    position: absolute;
    bottom: 100px;
    left: 20px;
    color: white;
}

.tiktok-video-author {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.tiktok-author-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    margin-right: 10px;
    border: 2px solid var(--tiktok-pink);
}

.tiktok-author-name {
    font-weight: bold;
    font-size: 16px;
}

.tiktok-video-caption {
    font-size: 14px;
    margin-bottom: 10px;
    max-width: 300px;
}

.tiktok-video-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.tiktok-tag {
    background: rgba(255, 255, 255, 0.1);
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
}

/* 互动按钮区域 */
.tiktok-interaction-panel {
    position: absolute;
    right: 20px;
    bottom: 100px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    align-items: center;
}

.tiktok-interaction-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: white;
    background: none;
    border: none;
    cursor: pointer;
    transition: var(--tiktok-transition);
}

.tiktok-interaction-btn:hover {
    transform: scale(1.1);
}

.tiktok-interaction-icon {
    width: 48px;
    height: 48px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    margin-bottom: 5px;
}

.tiktok-interaction-count {
    font-size: 12px;
    font-weight: bold;
}

/* 底部导航（移动端） */
.tiktok-bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60px;
    background-color: var(--tiktok-black);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 1000;
}

.tiktok-bottom-nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--tiktok-white);
    text-decoration: none;
    font-size: 12px;
}

.tiktok-bottom-nav-item.active {
    color: var(--tiktok-pink);
}

/* 响应式设计 */
@media (max-width: 1024px) {
    .tiktok-sidebar {
        display: none;
    }
    
    .tiktok-feed {
        margin-left: 0;
    }
    
    .tiktok-bottom-nav {
        display: flex;
    }
}

@media (max-width: 768px) {
    .tiktok-navbar {
        padding: 0 10px;
    }
    
    .tiktok-search {
        display: none;
    }
    
    .tiktok-video-container {
        padding: 10px;
    }
    
    .tiktok-video-info {
        bottom: 80px;
        left: 10px;
    }
    
    .tiktok-interaction-panel {
        right: 10px;
        bottom: 80px;
    }
}

/* 动画效果 */
@keyframes tiktok-pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.tiktok-pulse {
    animation: tiktok-pulse 2s infinite;
}

/* 加载动画 */
.tiktok-loader {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100px;
}

.tiktok-loader::after {
    content: '';
    width: 40px;
    height: 40px;
    border: 3px solid rgba(254, 44, 85, 0.3);
    border-top-color: var(--tiktok-pink);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* 工具类 */
.tiktok-text-gradient {
    background: var(--tiktok-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.tiktok-btn-primary {
    background: var(--tiktok-gradient);
    color: white;
    border: none;
    padding: 10px 24px;
    border-radius: 24px;
    font-weight: bold;
    cursor: pointer;
    transition: var(--tiktok-transition);
}

.tiktok-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(254, 44, 85, 0.3);
}

.tiktok-btn-outline {
    background: transparent;
    color: var(--tiktok-white);
    border: 2px solid var(--tiktok-white);
    padding: 10px 24px;
    border-radius: 24px;
    font-weight: bold;
    cursor: pointer;
    transition: var(--tiktok-transition);
}

.tiktok-btn-outline:hover {
    background: var(--tiktok-white);
    color: var(--tiktok-black);
}