/*
 * GoodShort Style CSS - 完全重新设计
 * 基于真实GoodShort网站的视觉设计
 * Version: 5.1.0
 */

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.4;
    color: #333;
    background: #fff;
    overflow-x: hidden;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    text-decoration: none;
    color: inherit;
}

button {
    border: none;
    background: none;
    cursor: pointer;
    font-family: inherit;
}

/* ========== 容器 ========== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px;
}

/* ========== 头部导航 ========== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: #fff;
    border-bottom: 1px solid #e5e5e5;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    z-index: 1000;
    height: 64px;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
    gap: 24px;
}

/* Logo区域 */
.header-logo .logo-link {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 24px;
    font-weight: 700;
    color: #ff4757;
}

.logo-text {
    background: linear-gradient(135deg, #ff4757, #ff6b7a);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* 导航菜单 */
.header-nav {
    display: flex;
    flex: 1;
    max-width: 400px;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 32px;
    list-style: none;
    width: 100%;
}

.nav-link {
    font-size: 15px;
    font-weight: 500;
    color: #333;
    padding: 8px 0;
    position: relative;
    transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
    color: #ff4757;
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: #ff4757;
    border-radius: 1px;
}

/* 下拉菜单 */
.has-dropdown {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    min-width: 180px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: all 0.2s ease;
    z-index: 100;
}

.has-dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-item {
    display: block;
    padding: 12px 16px;
    font-size: 14px;
    color: #333;
    transition: background-color 0.2s ease;
}

.dropdown-item:hover {
    background-color: #f8f9fa;
}

.dropdown-item.view-all {
    border-top: 1px solid #e5e5e5;
    color: #ff4757;
    font-weight: 500;
}

/* 搜索框 */
.header-search {
    flex: 1;
    max-width: 320px;
}

.search-input-group {
    position: relative;
    background: #f5f5f5;
    border-radius: 22px;
    display: flex;
    align-items: center;
    padding: 0 16px;
    height: 44px;
}

.search-input {
    flex: 1;
    border: none;
    background: transparent;
    font-size: 14px;
    outline: none;
    padding: 0;
}

.search-input::placeholder {
    color: #999;
}

.search-btn {
    color: #999;
    font-size: 16px;
    padding: 8px;
}

/* 用户操作区域 */
.header-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.action-link {
    font-size: 14px;
    color: #666;
    font-weight: 500;
}

.language-switcher {
    position: relative;
}

.language-btn {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 14px;
    color: #666;
    padding: 8px 12px;
}

.btn-login {
    background: #ff4757;
    color: #fff;
    padding: 10px 20px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    transition: background-color 0.2s ease;
}

.btn-login:hover {
    background: #ff3838;
}

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 3px;
    padding: 8px;
}

.hamburger-line {
    width: 18px;
    height: 2px;
    background: #333;
    border-radius: 1px;
}

/* v2版本汉堡菜单样式 */
.mobile-menu-toggle-v2 {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
}

.hamburger-v2 {
    width: 24px;
    height: 18px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.hamburger-line-v2 {
    width: 100%;
    height: 2px;
    background: #333;
    border-radius: 1px;
}

/* ========== 主内容区域 ========== */
.main-content {
    margin-top: 64px;
}

/* ========== 英雄轮播区域 ========== */
.hero-section {
    position: relative;
    height: 480px;
    background: #000;
    overflow: hidden;
}

.hero-slider {
    position: relative;
    width: 100%;
    height: 100%;
}

.hero-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0;
    transition: opacity 0.8s ease;
}

.hero-slide.active {
    opacity: 1;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        135deg,
        rgba(0,0,0,0.8) 0%,
        rgba(0,0,0,0.6) 40%,
        rgba(0,0,0,0.3) 70%,
        transparent 100%
    );
}

.hero-content {
    position: relative;
    z-index: 2;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 0 80px 0 60px;
    max-width: 600px;
    color: #fff;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #ff4757;
    color: #fff;
    padding: 6px 12px;
    border-radius: 16px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 16px;
    width: fit-content;
}

.hero-title {
    font-size: 48px;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 12px;
    text-shadow: 0 2px 12px rgba(0,0,0,0.5);
}

.hero-subtitle {
    font-size: 18px;
    font-weight: 600;
    color: #ff4757;
    margin-bottom: 16px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.hero-description {
    font-size: 16px;
    line-height: 1.5;
    margin-bottom: 32px;
    opacity: 0.9;
    max-width: 480px;
}

.hero-actions {
    display: flex;
    gap: 16px;
    align-items: center;
}

.btn-play {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #ff4757;
    color: #fff;
    padding: 16px 32px;
    border-radius: 28px;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 16px rgba(255, 71, 87, 0.4);
}

.btn-play:hover {
    background: #ff3838;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(255, 71, 87, 0.5);
}

.btn-secondary {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(255,255,255,0.15);
    color: #fff;
    padding: 16px 32px;
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: 28px;
    font-size: 16px;
    font-weight: 500;
    backdrop-filter: blur(12px);
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background: rgba(255,255,255,0.25);
    border-color: rgba(255,255,255,0.5);
}

/* ========== 积分横幅 ========== */
.score-banner {
    background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
    padding: 20px 0;
    border-bottom: 1px solid #f0d000;
}

.score-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    text-align: center;
}

.score-icon img {
    width: 32px;
    height: 32px;
}

.score-text {
    display: flex;
    align-items: center;
    gap: 8px;
}

.score-label {
    font-size: 18px;
    font-weight: 700;
    color: #333;
}

.score-value {
    font-size: 18px;
    font-weight: 600;
    color: #d63031;
}

.btn-topup {
    background: #ff4757;
    color: #fff;
    padding: 12px 24px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 14px;
    transition: background-color 0.2s ease;
    margin-left: 16px;
}

.btn-topup:hover {
    background: #ff3838;
}

/* ========== 热门趋势区域 ========== */
.trending-section {
    padding: 60px 0;
    background: #fff;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 40px;
}

.section-title {
    font-size: 32px;
    font-weight: 700;
    color: #333;
}

.section-link {
    font-size: 16px;
    font-weight: 500;
    color: #666;
    transition: color 0.2s ease;
}

.section-link:hover {
    color: #ff4757;
}

.trending-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
    gap: 32px;
}

.trending-card {
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    cursor: pointer;
}

.trending-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 40px rgba(0,0,0,0.15);
}

.trending-poster {
    position: relative;
    aspect-ratio: 16/9;
    overflow: hidden;
}

.trending-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.trending-card:hover .trending-poster img {
    transform: scale(1.1);
}

.trending-badge {
    position: absolute;
    top: 16px;
    left: 16px;
    padding: 6px 12px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.trending-badge-hot {
    background: #ff4757;
    color: #fff;
}

.trending-badge-new {
    background: #00b894;
    color: #fff;
}

.trending-badge-trending {
    background: #fdcb6e;
    color: #333;
}

.trending-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.trending-card:hover .trending-overlay {
    opacity: 1;
}

.trending-play {
    width: 64px;
    height: 64px;
    background: rgba(255,255,255,0.95);
    color: #ff4757;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    backdrop-filter: blur(8px);
    transition: all 0.2s ease;
}

.trending-play:hover {
    background: #fff;
    transform: scale(1.1);
}

.trending-content {
    padding: 24px;
}

.trending-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 8px;
    line-height: 1.3;
    color: #333;
}

.trending-category {
    font-size: 14px;
    color: #ff4757;
    font-weight: 600;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.trending-description {
    font-size: 14px;
    color: #666;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ========== 内容网格区域 ========== */
.content-section {
    padding: 60px 0;
    background: #f8f9fa;
}

.content-block {
    margin-bottom: 60px;
}

.content-block:last-child {
    margin-bottom: 0;
}

.content-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 24px;
}

.content-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    transition: all 0.3s ease;
    cursor: pointer;
}

.content-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}

.content-poster {
    position: relative;
    aspect-ratio: 3/4;
    overflow: hidden;
}

.content-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.content-card:hover .content-poster img {
    transform: scale(1.05);
}

.content-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.content-badge-new {
    background: #00b894;
    color: #fff;
}

.content-badge-premium {
    background: #fdcb6e;
    color: #333;
}

.content-badge-trending {
    background: #ff4757;
    color: #fff;
}

.content-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.content-card:hover .content-overlay {
    opacity: 1;
}

.content-play {
    width: 48px;
    height: 48px;
    background: rgba(255,255,255,0.95);
    color: #ff4757;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    backdrop-filter: blur(8px);
    transition: all 0.2s ease;
}

.content-play:hover {
    background: #fff;
    transform: scale(1.1);
}

.content-info {
    padding: 16px;
}

.content-title {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 8px;
    line-height: 1.3;
    color: #333;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.content-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: #666;
    flex-wrap: wrap;
}

.content-category {
    color: #ff4757;
    font-weight: 600;
}

.content-episodes,
.content-rating {
    display: flex;
    align-items: center;
    gap: 2px;
}

.content-rating i {
    color: #fdd835;
}

/* ========== 页脚 ========== */
.footer {
    background: #1a1a1a;
    color: #fff;
    padding: 60px 0 30px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 20px;
    color: #fff;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 8px;
}

.footer-links a {
    color: #ccc;
    font-size: 14px;
    transition: color 0.2s ease;
}

.footer-links a:hover {
    color: #ff4757;
}

.app-downloads {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
}

.app-download-btn img {
    height: 36px;
    width: auto;
    border-radius: 6px;
}

.qr-code {
    text-align: center;
}

.qr-code img {
    width: 64px;
    height: 64px;
    margin: 0 auto 8px;
    border-radius: 8px;
}

.qr-text {
    font-size: 12px;
    color: #999;
}

.footer-bottom {
    border-top: 1px solid #333;
    padding-top: 30px;
}

.footer-description h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 16px;
    color: #fff;
}

.footer-description p {
    font-size: 14px;
    color: #ccc;
    line-height: 1.6;
    margin-bottom: 12px;
}

/* ========== 响应式设计 ========== */
@media (max-width: 768px) {
    .container {
        padding: 0 16px;
    }
    
    .header-nav {
        display: none;
    }
    
    .mobile-menu-toggle {
        display: flex;
    }
    
    /* v2版本支持 */
    .header-nav-v2 {
        display: none !important;
    }
    
    .mobile-menu-toggle-v2 {
        display: block !important;
    }
    
    .header-search {
        max-width: 200px;
    }
    
    .hero-content {
        padding: 0 20px;
    }
    
    .hero-title {
        font-size: 32px;
    }
    
    .hero-actions {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }
    
    .btn-play,
    .btn-secondary {
        justify-content: center;
        padding: 14px 24px;
    }
    
    .score-content {
        flex-direction: column;
        gap: 12px;
    }
    
    .section-title {
        font-size: 24px;
    }
    
    .trending-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    
    .content-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }
    
    .footer-content {
        grid-template-columns: repeat(2, 1fr);
        gap: 24px;
    }
}

@media (max-width: 480px) {
    .hero-section {
        height: 320px;
    }
    
    .hero-title {
        font-size: 24px;
    }
    
    .content-grid {
        gap: 12px;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
    }
}

/* ========== 动画效果 ========== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.trending-card,
.content-card {
    animation: fadeInUp 0.6s ease forwards;
}

.trending-card:nth-child(2) {
    animation-delay: 0.1s;
}

.trending-card:nth-child(3) {
    animation-delay: 0.2s;
}

/* ========== 加载状态 ========== */
.loading {
    opacity: 0.7;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #ff4757;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s linear infinite;
}

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