/* ========================================
   App下载页面样式表
   响应式设计 - 支持手机和电脑
   ======================================== */

/* CSS变量 */
:root {
    --primary-color: #007AFF;
    --secondary-color: #5856D6;
    --success-color: #34C759;
    --warning-color: #FF9500;
    --danger-color: #FF3B30;
    --dark-color: #1C1C1E;
    --light-color: #F2F2F7;
    --white: #FFFFFF;
    --gray: #8E8E93;
    --light-gray: #E5E5EA;
    
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-ios: linear-gradient(135deg, #007AFF 0%, #5856D6 100%);
    --gradient-android: linear-gradient(135deg, #3DDC84 0%, #2E8B57 100%);
    
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.15);
    --shadow-lg: 0 8px 24px rgba(0,0,0,0.2);
    
    --border-radius: 12px;
    --border-radius-lg: 20px;
    
    --transition: all 0.3s ease;
}

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

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: var(--dark-color);
    line-height: 1.6;
}

/* 容器 */
.container {
    max-width: 480px;
    margin: 0 auto;
    background: var(--white);
    min-height: 100vh;
    box-shadow: var(--shadow-lg);
}

@media (min-width: 768px) {
    .container {
        max-width: 600px;
        margin: 40px auto;
        min-height: auto;
        border-radius: var(--border-radius-lg);
        overflow: hidden;
    }
    
    body {
        padding: 20px;
    }
}

/* ========================================
   头部区域
   ======================================== */
.header {
    background: var(--gradient-primary);
    padding: 40px 24px;
    text-align: center;
    color: var(--white);
}

.logo-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.app-logo {
    width: 100px;
    height: 100px;
    border-radius: 22px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    background: var(--white);
}

.app-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.logo-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-primary);
    color: var(--white);
    font-size: 48px;
}

.app-info {
    text-align: center;
}

.app-name {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 8px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.app-version {
    font-size: 14px;
    opacity: 0.9;
    margin-bottom: 12px;
}

.app-rating {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    font-size: 16px;
}

.app-rating i {
    color: #FFD700;
}

.app-rating span {
    margin-left: 8px;
    font-weight: 600;
}

/* ========================================
   轮播图区域
   ======================================== */
.carousel-section {
    padding: 30px 20px;
    background: var(--light-color);
}

.carousel-container {
    position: relative;
    overflow: hidden;
    border-radius: var(--border-radius);
    background: var(--white);
    box-shadow: var(--shadow-sm);
}

.carousel-wrapper {
    display: flex;
    transition: transform 0.5s ease;
}

.carousel-slide {
    min-width: 100%;
    opacity: 0;
    transition: opacity 0.5s ease;
    display: none;
}

.carousel-slide.active {
    opacity: 1;
    display: block;
}

.slide-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
}

.slide-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.slide-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: var(--gradient-primary);
    color: var(--white);
    gap: 10px;
}

.slide-placeholder i {
    font-size: 48px;
    opacity: 0.8;
}

.slide-placeholder span {
    font-size: 18px;
    font-weight: 600;
}

.slide-content {
    padding: 20px;
    text-align: center;
}

.slide-content h3 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--dark-color);
}

.slide-content p {
    font-size: 14px;
    color: var(--gray);
}

.carousel-indicators {
    display: flex;
    justify-content: center;
    gap: 8px;
    padding: 15px;
    background: var(--white);
}

.indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--light-gray);
    cursor: pointer;
    transition: var(--transition);
}

.indicator.active {
    background: var(--primary-color);
    width: 24px;
    border-radius: 4px;
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 50%;
    background: rgba(255,255,255,0.9);
    color: var(--dark-color);
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    z-index: 10;
}

.carousel-btn:hover {
    background: var(--white);
    transform: translateY(-50%) scale(1.1);
}

.carousel-btn.prev {
    left: 10px;
}

.carousel-btn.next {
    right: 10px;
}

@media (min-width: 768px) {
    .slide-image {
        height: 250px;
    }
}

/* ========================================
   应用介绍
   ======================================== */
.description-section {
    padding: 30px 24px;
    background: var(--white);
}

.description-section h2 {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 16px;
    color: var(--dark-color);
    text-align: center;
}

.app-description {
    font-size: 15px;
    line-height: 1.8;
    color: var(--gray);
    text-align: center;
}

/* ========================================
   功能特点
   ======================================== */
.features-section {
    padding: 30px 24px;
    background: var(--light-color);
}

.features-section h2 {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 24px;
    color: var(--dark-color);
    text-align: center;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.feature-item {
    background: var(--white);
    padding: 24px 16px;
    border-radius: var(--border-radius);
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.feature-item:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.feature-icon {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    color: var(--white);
    font-size: 24px;
}

.feature-item h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--dark-color);
}

.feature-item p {
    font-size: 13px;
    color: var(--gray);
}

@media (min-width: 768px) {
    .features-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* ========================================
   下载区域
   ======================================== */
.download-section {
    padding: 40px 24px;
    background: var(--white);
    text-align: center;
}

.dual-download {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

@media (min-width: 768px) {
    .dual-download {
        flex-direction: row;
        justify-content: center;
    }
}

.download-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 16px 32px;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    border: none;
    cursor: pointer;
}

.primary-btn {
    background: var(--gradient-primary);
    color: var(--white);
    font-size: 18px;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.primary-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5);
}

.primary-btn i {
    font-size: 24px;
}

.ios-btn, .android-btn {
    background: var(--dark-color);
    color: var(--white);
    padding: 12px 24px;
}

.ios-btn:hover, .android-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.ios-btn i, .android-btn i {
    font-size: 28px;
}

.btn-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    line-height: 1.2;
}

.btn-text .small {
    font-size: 11px;
    opacity: 0.8;
    font-weight: 400;
}

.btn-text .big {
    font-size: 16px;
    font-weight: 600;
}

.device-detected {
    margin-top: 20px;
    font-size: 14px;
    color: var(--success-color);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.device-detected i {
    font-size: 16px;
}

/* ========================================
   页脚
   ======================================== */
.footer {
    padding: 24px;
    background: var(--dark-color);
    color: var(--white);
    text-align: center;
}

.footer p {
    font-size: 13px;
    opacity: 0.8;
    margin-bottom: 12px;
}

.admin-link {
    color: var(--white);
    text-decoration: none;
    font-size: 13px;
    opacity: 0.6;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.admin-link:hover {
    opacity: 1;
}

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

.container > * {
    animation: fadeIn 0.6s ease forwards;
}

.container > *:nth-child(1) { animation-delay: 0.1s; }
.container > *:nth-child(2) { animation-delay: 0.2s; }
.container > *:nth-child(3) { animation-delay: 0.3s; }
.container > *:nth-child(4) { animation-delay: 0.4s; }
.container > *:nth-child(5) { animation-delay: 0.5s; }
.container > *:nth-child(6) { animation-delay: 0.6s; }

/* ========================================
   加载动画
   ======================================== */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: var(--white);
    animation: spin 1s ease-in-out infinite;
}

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

/* ========================================
   提示信息
   ======================================== */
.toast {
    position: fixed;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--dark-color);
    color: var(--white);
    padding: 12px 24px;
    border-radius: 25px;
    font-size: 14px;
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 1000;
}

.toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}
