/**
 * 首页样式
 * 爽文短剧平台首页
 */

/* ============================
   基础样式
   ============================ */
html, body {
    overflow-x: hidden;
    width: 100%;
    min-height: 100%;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.page {
    position: relative;
    width: 100%;
    min-height: 100vh;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    overflow-x: hidden;
}

/* ============================
   背景视频
   ============================ */
.background-video {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
}

.background-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        180deg,
        rgba(26, 26, 46, 0.85) 0%,
        rgba(22, 33, 62, 0.9) 50%,
        rgba(15, 52, 96, 0.95) 100%
    );
    z-index: 2;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

/* ============================
   内容包装器
   ============================ */
.content-wrapper {
    position: relative;
    z-index: 10;
    max-width: 750px;
    margin: 0 auto;
    padding: 40px 20px 180px;
    display: flex;
    flex-direction: column;
    gap: 40px;
}

/* ============================
   Logo 区域
   ============================ */
.logo-section {
    text-align: center;
    animation: fadeInDown 0.8s ease-out;
}

.app-logo {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 12px 24px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 50px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.logo-icon {
    font-size: 28px;
    line-height: 1;
}

.logo-text {
    font-size: 20px;
    font-weight: 700;
    color: #fff;
    letter-spacing: 1px;
}

/* ============================
   Hero 区域
   ============================ */
.hero-section {
    text-align: center;
    animation: fadeInUp 0.8s ease-out 0.2s both;
}

.hero-title {
    font-size: 48px;
    font-weight: 900;
    color: #fff;
    margin: 0 0 16px 0;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 20px;
    color: rgba(255, 255, 255, 0.9);
    margin: 0;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    letter-spacing: 2px;
}

/* ============================
   特性列表
   ============================ */
.features-section {
    display: flex;
    flex-direction: column;
    gap: 24px;
    animation: fadeInUp 0.8s ease-out 0.4s both;
}

.feature-item {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.feature-item:hover {
    background: rgba(255, 255, 255, 0.12);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.feature-icon {
    font-size: 32px;
    line-height: 1;
    flex-shrink: 0;
}

.feature-content {
    flex: 1;
}

.feature-title {
    font-size: 18px;
    font-weight: 700;
    color: #fff;
    margin: 0 0 8px 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.feature-description {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.8);
    margin: 0;
    line-height: 1.6;
}

/* ============================
   CTA 区域
   ============================ */
.cta-section {
    text-align: center;
    padding: 32px 20px;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    animation: fadeInUp 0.8s ease-out 0.6s both;
}

.cta-title {
    font-size: 28px;
    font-weight: 800;
    color: #fff;
    margin: 0 0 12px 0;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.cta-description {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.9);
    margin: 0;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}

/* ============================
   底部下载区域
   ============================ */
.download-section {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 100;
    padding: 20px;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    animation: slideUp 0.6s ease-out 0.8s both;
}

.download-button {
    width: 100%;
    max-width: 400px;
    padding: 18px 32px;
    background: linear-gradient(90deg, #FA9550 0%, #FD365B 100%);
    border-radius: 16px;
    cursor: pointer;
    box-shadow: 0 8px 24px rgba(253, 54, 91, 0.5);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.download-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(253, 54, 91, 0.6);
}

.download-button:active {
    transform: scale(0.98);
    box-shadow: 0 4px 16px rgba(253, 54, 91, 0.4);
}

.button-text {
    font-size: 18px;
    font-weight: 700;
    color: #fff;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.download-subtext {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.6);
    margin: 0;
    text-align: center;
}

/* ============================
   语言切换
   ============================ */
.language-switch {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    opacity: 0;
    transition: opacity 0.5s ease;
}

.lang-btn {
    background: none;
    border: none;
    padding: 4px 8px;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.lang-btn:hover {
    color: rgba(255, 255, 255, 0.9);
}

.lang-btn.active {
    color: #fff;
    font-weight: 700;
}

.lang-divider {
    color: rgba(255, 255, 255, 0.3);
    font-size: 12px;
}

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

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================
   响应式适配
   ============================ */

/* 小屏设备 (< 375px) */
@media (max-width: 374px) {
    .content-wrapper {
        padding: 30px 16px 160px;
        gap: 30px;
    }

    .hero-title {
        font-size: 36px;
    }

    .hero-subtitle {
        font-size: 16px;
    }

    .feature-item {
        padding: 16px;
    }

    .feature-icon {
        font-size: 28px;
    }

    .feature-title {
        font-size: 16px;
    }

    .feature-description {
        font-size: 13px;
    }

    .cta-title {
        font-size: 24px;
    }

    .cta-description {
        font-size: 14px;
    }

    .button-text {
        font-size: 16px;
    }

    .download-button {
        padding: 16px 24px;
    }
}

/* 中屏设备 (375px - 414px) */
@media (min-width: 375px) and (max-width: 414px) {
    .content-wrapper {
        padding: 40px 20px 180px;
    }

    .hero-title {
        font-size: 42px;
    }

    .hero-subtitle {
        font-size: 18px;
    }
}

/* 大屏设备 (> 414px) */
@media (min-width: 415px) {
    .content-wrapper {
        padding: 60px 32px 200px;
        gap: 50px;
    }

    .hero-title {
        font-size: 56px;
    }

    .hero-subtitle {
        font-size: 22px;
    }

    .feature-item {
        padding: 24px;
    }

    .feature-icon {
        font-size: 36px;
    }

    .feature-title {
        font-size: 20px;
    }

    .feature-description {
        font-size: 15px;
    }

    .cta-title {
        font-size: 32px;
    }

    .cta-description {
        font-size: 18px;
    }

    .button-text {
        font-size: 20px;
    }

    .download-button {
        padding: 20px 40px;
        height: 72px;
    }
}

/* ============================
   用户偏好 - 减少动画
   ============================ */
@media (prefers-reduced-motion: reduce) {
    .logo-section,
    .hero-section,
    .features-section,
    .cta-section,
    .download-section,
    .language-switch,
    .feature-item,
    .download-button {
        animation: none !important;
        transition: none !important;
    }
}

/* ============================
   安全区域适配 (iPhone X+)
   ============================ */
@supports (padding: max(0px)) {
    .content-wrapper {
        padding-bottom: max(180px, env(safe-area-inset-bottom) + 160px);
    }

    .download-section {
        padding-bottom: max(20px, env(safe-area-inset-bottom));
    }

    .language-switch {
        top: max(20px, env(safe-area-inset-top));
        right: max(20px, env(safe-area-inset-right));
    }
}

/* ============================
   深色模式适配
   ============================ */
@media (prefers-color-scheme: dark) {
    .page {
        background: linear-gradient(135deg, #0f0f1a 0%, #0d1526 50%, #0a1f3d 100%);
    }
}
