/* 全局样式 */
body, html {
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: #f5f5f5;
}

body::-webkit-scrollbar {
    display: none;
}

#app {
    min-height: 100vh;
    padding-bottom: 60px;
    background: linear-gradient(180deg, #ff6a6a 0%, #ffb3b3 100%);
}

/* 顶部提示 */
.domain-url {
    padding: 8px 4px;
    color: #fff;
    margin: 0;
    font-weight: 700;
    font-size: 16px;
    white-space: nowrap;
    background: rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.domain-url .flex1 {
    display: flex;
    align-items: center;
}

.domain-url p {
    margin: 0;
}

.domain-url img {
    display: block;
    margin-right: 6px;
    width: 20px;
    animation: moveLeftRight 1s linear infinite;
}

.domain-url .flex {
    display: flex;
    align-items: center;
}

.domain-url span {
    border: 1px solid #fff;
    padding: 6px 10px;
    display: inline-block;
    border-radius: 8px;
    animation: colorPulse 1.4s linear infinite;
    cursor: pointer;
}

@keyframes moveLeftRight {
    0%, 100% { transform: translateX(-4px); }
    50% { transform: translateX(4px); }
}

@keyframes colorPulse {
    0%, 100% { border-color: #fff; }
    50% { border-color: #ef4444; }
}

/* 分类区域 */
.category-box {
    background: rgba(255, 255, 255, 0.9);
    border-radius: 12px;
    padding: 8px;
    margin: 8px;
}

.category-box .category {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    align-items: center;
}

.category-box .category .category-item {
    flex: 0 0 14.28%;
    height: 32px;
    text-align: center;
    font-size: 14px;
    font-weight: 900;
    line-height: 32px;
    border-radius: 4px;
    color: #333;
    cursor: pointer;
    transition: all 0.3s;
}

.category-box .category .category-item.click {
    background: linear-gradient(180deg, #ff2, #fb0);
    color: red;
}

.category-box .search {
    height: 40px;
    display: flex;
    justify-content: space-around;
    align-items: center;
    margin-top: 8px;
}

.category-box .search input {
    flex: 1;
    height: 36px;
    padding: 0 12px;
    border: 1px solid #ddd;
    border-radius: 18px;
    font-size: 14px;
    margin-right: 8px;
}

.category-box .search button {
    flex: 0 0 80px;
    height: 36px;
    border: 0;
    border-radius: 18px;
    font-size: 14px;
    font-weight: 700;
    background: linear-gradient(180deg, #ff2, #fb0);
    color: red;
    cursor: pointer;
    box-shadow: 1px 0 #000, 0 1px #2a1400, 1px 2px #000, 2px 1px #2a1400;
}

/* 视频列表 */
.movie-list {
    display: flex;
    flex-wrap: wrap;
    padding: 4px;
}

.movie-list .movie {
    flex: 1;
    min-width: 48.5%;
    max-width: 48.5%;
    margin-left: 1%;
    margin-top: 8px;
    cursor: pointer;
    transition: transform 0.2s;
}

.movie-list .movie:hover {
    transform: scale(1.02);
}

.movie-list .movie .movie-cover {
    position: relative;
    border-radius: 12px 12px 0 0;
    padding-top: 56.25%; /* 9:16 横屏比例 (高9宽16) */
    overflow: hidden;
}

.movie-list .movie .movie-cover .bg-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 24px;
}

.movie-list .movie .movie-cover .movie-duration {
    position: absolute;
    top: 8px;
    left: 8px;
    background: rgba(24, 24, 24, 0.7);
    color: #fff;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 12px;
}

.movie-list .movie .movie-cover .movie-order-count {
    position: absolute;
    bottom: 8px;
    left: 8px;
    background: rgba(24, 24, 24, 0.7);
    color: #fff;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 12px;
}

.movie-list .movie .movie-name {
    height: 40px !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    padding: 4px 8px !important;
    background: rgba(255, 255, 255, 0.9) !important;
    border-radius: 0 0 12px 12px !important;
    color: #333 !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    line-height: 20px !important;
    word-break: break-all !important;
}

/* 底部导航栏 */
.tab-bar {
    width: 100%;
    height: 50px;
    position: fixed;
    left: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.95);
    display: flex;
    justify-content: space-around;
    align-items: center;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
}

.tab-bar .tab-bar-item {
    flex: 0 0 33%;
    text-align: center;
    color: #666;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: color 0.3s;
}

.tab-bar .tab-bar-item:hover {
    color: #ff6a6a;
}

.tab-bar .tab-bar-item.buy {
    flex: 0 0 24%;
    height: 40px;
    background: linear-gradient(180deg, #ff2, #fb0);
    border-radius: 20px;
    color: red;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 1px 0 #000, 0 1px #2a1400, 1px 2px #000, 2px 1px #2a1400;
}

/* 返回顶部按钮 */
.top-btn {
    position: fixed;
    right: 16px;
    bottom: 70px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 0;
    color: red;
    background: linear-gradient(180deg, #ff2, #fb0);
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

/* 弹窗样式 */
.wrapper {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.free-movie-detail-box {
    width: 90%;
    max-width: 400px;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
}

.free-movie-detail-box .bg-img {
    width: 100%;
    height: 200px;
}

.free-movie-detail-box .movie-detail-content {
    padding: 16px;
    text-align: center;
}

.free-movie-detail-box .movie-name {
    font-size: 18px;
    font-weight: 700;
    color: #333;
    margin-bottom: 12px;
}

.free-movie-detail-box .movie-info {
    color: #666;
    font-size: 14px;
    margin-bottom: 16px;
}

.free-movie-detail-box .movie-info p {
    margin: 4px 0;
}

.buy-btn-box {
    width: 100%;
}

.buy-btn {
    width: 100%;
    height: 50px;
    background: linear-gradient(180deg, #ff2, #fb0);
    border: 0;
    border-radius: 12px;
    font-size: 16px;
    color: #333;
    font-weight: 700;
    cursor: pointer;
    margin-bottom: 8px;
}

.buy-btn span {
    color: red;
    font-size: 14px;
}

.buy-btn.cancel {
    background: transparent;
    color: #666;
    font-size: 14px;
    height: 40px;
}

.tip {
    background: linear-gradient(180deg, #ff2, #fb0);
    padding: 8px;
    font-size: 12px;
    text-align: center;
}

.tip span {
    color: red;
}

/* 支付弹窗 */
.pay-action-sheet {
    width: 90%;
    max-width: 400px;
    background: #fff;
    border-radius: 12px;
}

.pay-header {
    background: linear-gradient(180deg, #ff2, #fb0);
    padding: 16px;
    text-align: center;
    font-size: 18px;
    font-weight: 700;
    border-radius: 12px 12px 0 0;
}

.pay-content {
    padding: 16px;
}

.pay-type-box {
    display: flex;
    justify-content: space-around;
    margin-bottom: 16px;
}

.pay-type {
    display: flex;
    align-items: center;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 8px;
    cursor: pointer;
    transition: border-color 0.3s;
}

.pay-type:hover {
    border-color: #ff6a6a;
}

.pay-type.check {
    border-color: #58d0ff;
    background: rgba(88, 208, 255, 0.1);
}

.pay-type img {
    width: 40px;
    height: 40px;
    margin-right: 8px;
}

.pay-type span {
    font-size: 14px;
    color: #333;
}

/* Toast提示 */
.toast {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.8);
    color: #fff;
    padding: 16px 32px;
    border-radius: 8px;
    z-index: 2000;
    display: none;
}

.toast.show {
    display: block;
    animation: fadeIn 0.3s;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* 响应式 */
@media screen and (min-width: 600px) {
    .movie-list .movie .movie-cover {
        height: 180px;
    }
    
    .category-box .category .category-item {
        font-size: 16px;
    }
}

@media screen and (max-width: 390px) {
    .category-box .category .category-item {
        font-size: 12px;
    }
}

/* 响应式 */
@media screen and (min-width: 600px) {
    .movie-list .movie .movie-cover {
        height: 180px;
    }
    
    .category-box .category .category-item {
        font-size: 16px;
    }
}

@media screen and (max-width: 390px) {
    .category-box .category .category-item {
        font-size: 12px;
    }
}