/*
Theme Name: FTTOK
Theme URI: https://example.com/tikdou
Author: Administrator
Author URI: https://example.com
Description: 仿抖音极速版主题，包含视频流、商城、任务和个人中心页面
Version: 1.0
Requires at least: 5.3
Tested up to: 6.2
Requires PHP: 7.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: tikdou
*/

/* 全局样式 */
body {
    margin: 0;
    padding: 0;
    font-family: 'PingFang SC', 'Microsoft YaHei', sans-serif;
    background-color: #000;
    color: #fff;
    padding-bottom: 60px;
}

/* 隐藏WordPress管理员栏 */
body.admin-bar {
    margin-top: -32px !important;
}

/* 底部导航栏样式 */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 60px;
    background-color: #000;
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 5px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 1000;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: #fff;
    text-decoration: none;
    font-size: 12px;
}

.nav-item i {
    font-size: 24px;
    margin-bottom: 2px;
}

.nav-item.active {
    color: #fe2c55;
}

/* 视频流页面样式 */
.video-container {
    position: relative;
    width: 100%;
    height: calc(100vh - 60px);
    overflow: hidden;
}

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

.video-info {
    position: absolute;
    bottom: 130px;
    left: 10px;
    z-index: 10;
}

.video-author {
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 5px;
}

.video-desc {
    font-size: 14px;
    max-width: 80%;
}

.video-actions {
    position: absolute;
    right: 10px;
    bottom: 150px;
    display: flex;
    flex-direction: column;
    z-index: 15;
}

.action-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 20px;
}

.action-icon {
    font-size: 28px;
    margin-bottom: 5px;
    position: relative;
}

.action-count {
    font-size: 12px;
}

.action-icon.liked i {
    color: #fe2c55;
}

/* 红包图标样式 */
.red-packet {
    position: absolute;
    left: 20px;
    top: 60%;
    width: 50px;
    height: 50px;
    z-index: 10;
}

.red-packet-container {
    position: relative;
    width: 100%;
    height: 100%;
}

.red-packet-bg {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.2);
    animation: rotate 5s linear infinite;
}

.red-packet-icon {
    position: absolute;
    width: 70%;
    height: 70%;
    top: 15%;
    left: 15%;
    background-color: #fe2c55;
    border-radius: 12px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.red-packet-icon i {
    color: #fff;
    font-size: 24px;
}

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

.point-animation {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #fe2c55;
    font-weight: bold;
    font-size: 16px;
    opacity: 0;
    animation: pointUp 1s ease-out;
    z-index: 100;
}

@keyframes pointUp {
    0% {
        opacity: 1;
        transform: translate(-50%, -50%);
    }
    100% {
        opacity: 0;
        transform: translate(-50%, -100%);
    }
}

/* 商城页面样式 */
.shop-container {
    padding: 10px;
    background-color: #f5f5f5;
    color: #333;
    min-height: calc(100vh - 60px);
}

.search-bar {
    display: flex;
    align-items: center;
    background-color: #fff;
    border-radius: 20px;
    padding: 5px 15px;
    margin-bottom: 15px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.search-bar input {
    flex: 1;
    border: none;
    padding: 8px 5px;
    outline: none;
    font-size: 14px;
}

.search-btn {
    background-color: #fe2c55;
    color: white;
    border: none;
    border-radius: 15px;
    padding: 5px 15px;
    font-size: 14px;
}

.category-tabs {
    display: flex;
    overflow-x: auto;
    margin-bottom: 15px;
    background-color: #fff;
    padding: 10px 0;
}

.cat-tab {
    padding: 5px 15px;
    margin-right: 10px;
    white-space: nowrap;
    font-size: 14px;
    color: #333;
}

.cat-tab.active {
    color: #fe2c55;
    border-bottom: 2px solid #fe2c55;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-bottom: 80px;
}

.product-item {
    background-color: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.product-image {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
}

.product-info {
    padding: 8px;
}

.product-title {
    font-size: 14px;
    margin-bottom: 5px;
    color: #333;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-price {
    font-size: 16px;
    color: #fe2c55;
    font-weight: bold;
}

.product-sales {
    font-size: 12px;
    color: #999;
}

/* 任务页面样式 */
.task-container {
    padding: 15px;
    background-color: #f5f5f5;
    min-height: calc(100vh - 60px);
}

.task-header {
    position: relative;
    background-color: #fe2c55;
    color: white;
    border-radius: 12px;
    padding: 20px 15px;
    margin-bottom: 20px;
}

.back-btn {
    position: absolute;
    top: 20px;
    left: 15px;
    font-size: 20px;
    color: white;
}

.task-title {
    text-align: center;
    font-size: 18px;
    margin-bottom: 0;
}

.balance-card {
    background-color: #fe2c55;
    color: white;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
}

.balance-label {
    font-size: 14px;
    margin-bottom: 10px;
}

.balance-amount {
    font-size: 36px;
    font-weight: bold;
    margin-bottom: 10px;
}

.balance-expires {
    font-size: 12px;
    opacity: 0.8;
}

.withdraw-btn {
    background-color: white;
    color: #fe2c55;
    border: none;
    border-radius: 20px;
    padding: 8px 20px;
    font-size: 14px;
    float: right;
    margin-top: -30px;
}

.task-section {
    background-color: white;
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 15px;
}

.section-title {
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 15px;
    color: #333;
}

.task-item {
    display: flex;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #f0f0f0;
}

.task-item:last-child {
    border-bottom: none;
}

.task-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-right: 15px;
    color: white;
}

.task-icon.red {
    background-color: #ffe8e8;
    color: #fe2c55;
}

.task-icon.orange {
    background-color: #fff2e8;
    color: #ff8c1a;
}

.task-icon.purple {
    background-color: #f0e6ff;
    color: #9966ff;
}

.task-info {
    flex: 1;
}

.task-name {
    font-size: 14px;
    margin-bottom: 5px;
    color: #333;
}

.task-desc {
    font-size: 12px;
    color: #999;
}

.task-reward {
    color: #ff8c1a;
    font-weight: bold;
    margin-right: 10px;
}

.task-btn {
    background-color: #fe2c55;
    color: white;
    border: none;
    border-radius: 20px;
    padding: 8px 15px;
    font-size: 12px;
}

/* 我的页面样式 */
.profile-container {
    padding: 15px;
    background-color: #f5f5f5;
    min-height: calc(100vh - 60px);
}

.profile-header {
    background-color: white;
    border-radius: 12px;
    padding: 20px 15px;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
}

.avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    margin-right: 15px;
    object-fit: cover;
}

.user-info {
    flex: 1;
}

.username {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 5px;
    color: #333;
}

.user-id {
    font-size: 12px;
    color: #999;
}

.edit-profile {
    border: 1px solid #ddd;
    background: none;
    border-radius: 15px;
    padding: 5px 12px;
    font-size: 12px;
    color: #666;
}

.stats-row {
    display: flex;
    background-color: white;
    border-radius: 12px;
    margin-bottom: 15px;
}

.stat-item {
    flex: 1;
    text-align: center;
    padding: 15px 0;
    border-right: 1px solid #f0f0f0;
}

.stat-item:last-child {
    border-right: none;
}

.stat-value {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 5px;
    color: #333;
}

.stat-label {
    font-size: 12px;
    color: #999;
}

.menu-list {
    background-color: white;
    border-radius: 12px;
    margin-bottom: 15px;
}

.menu-item {
    display: flex;
    align-items: center;
    padding: 15px;
    border-bottom: 1px solid #f0f0f0;
}

.menu-item:last-child {
    border-bottom: none;
}

.menu-icon {
    width: 24px;
    height: 24px;
    margin-right: 15px;
    color: #333;
}

.menu-label {
    flex: 1;
    font-size: 14px;
    color: #333;
}

.menu-arrow {
    color: #ccc;
}

/* 移除移动端点击时的选中框和高亮效果 */
a, button, input[type="button"], input[type="submit"],
.tikdou-nav-item, .task-btn, .withdraw-btn, .action-button {
    -webkit-tap-highlight-color: transparent !important;
    -webkit-touch-callout: none !important;
    -webkit-user-select: none !important;
    user-select: none !important;
    outline: none !important;
}

/* 针对iOS设备的按钮样式修复 */
input[type="button"], 
input[type="submit"], 
button {
    -webkit-appearance: none;
    border-radius: 0;
}

/* 移动端底部导航样式 */
.tikdou-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 60px;
    background-color: #fff;
    display: flex;
    justify-content: space-around;
    align-items: center;
    z-index: 999;
    box-shadow: 0 -1px 5px rgba(0,0,0,0.1);
}

.tikdou-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1;
    height: 100%;
    color: #666;
    text-decoration: none;
    -webkit-tap-highlight-color: transparent;
    outline: none;
}

.tikdou-nav-icon {
    font-size: 20px;
    margin-bottom: 4px;
}

.tikdou-nav-label {
    font-size: 12px;
}

.tikdou-nav-item:hover {
    color: #fe2c55;
}

.tikdou-nav-item.active {
    color: #fe2c55;
}

/* 视频流页面的导航样式 */
.fttok-video-feed + .tikdou-bottom-nav {
    background-color: rgba(0, 0, 0, 0.7);
}

.fttok-video-feed + .tikdou-bottom-nav .tikdou-nav-item {
    color: rgba(255, 255, 255, 0.6);
}

.fttok-video-feed + .tikdou-bottom-nav .tikdou-nav-item.active {
    color: #fff;
}

/* 响应式调整 */
@media (min-width: 769px) {
    .tikdou-bottom-nav {
        display: none;
    }
    
    body {
        padding-bottom: 0;
    }
} 

/* 添加DailyMotion视频样式 */
.dailymotion-container {
    position: relative;
    padding-bottom: 56.25%; /* 16:9比例 */
    height: 0;
    overflow: hidden;
    max-width: 100%;
    background-color: #000;
}

.dailymotion-container iframe.dailymotion-iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100% !important;
    height: 100% !important;
    border: 0;
    z-index: 1;
} 