/* ========================================
   德易通下载页 - 样式表
   ======================================== */

/* CSS 变量定义 */
:root {
    /* 主色调 - 渐变蓝紫色系 */
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --primary-color: #667eea;
    --primary-dark: #5a67d8;
    --secondary-color: #764ba2;
    
    /* 功能色 */
    --android-color: #3ddc84;
    --android-dark: #2fa866;
    --ios-color: #007aff;
    --ios-dark: #0056b3;
    
    /* 背景色 */
    --bg-primary: #0f0f23;
    --bg-secondary: #1a1a2e;
    --bg-card: rgba(255, 255, 255, 0.05);
    
    /* 文字色 */
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.7);
    --text-muted: rgba(255, 255, 255, 0.5);
    
    /* 边框和阴影 */
    --border-color: rgba(255, 255, 255, 0.1);
    --shadow-glow: 0 0 40px rgba(102, 126, 234, 0.3);
    
    /* 间距 */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;
    
    /* 圆角 */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-full: 50%;
    
    /* 过渡 */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
}

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

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

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

/* ========================================
   背景装饰
   ======================================== */
.bg-decoration {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
    overflow: hidden;
}

.bg-circle {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.4;
    animation: float 20s ease-in-out infinite;
}

.bg-circle-1 {
    width: 300px;
    height: 300px;
    background: var(--primary-color);
    top: -100px;
    right: -100px;
    animation-delay: 0s;
}

.bg-circle-2 {
    width: 250px;
    height: 250px;
    background: var(--secondary-color);
    bottom: 20%;
    left: -80px;
    animation-delay: -5s;
}

.bg-circle-3 {
    width: 200px;
    height: 200px;
    background: var(--android-color);
    bottom: -50px;
    right: 20%;
    opacity: 0.2;
    animation-delay: -10s;
}

@keyframes float {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }
    25% {
        transform: translate(20px, -20px) scale(1.05);
    }
    50% {
        transform: translate(-10px, 20px) scale(0.95);
    }
    75% {
        transform: translate(-20px, -10px) scale(1.02);
    }
}

/* ========================================
   主容器
   ======================================== */
.container {
    max-width: 480px;
    margin: 0 auto;
    padding: var(--spacing-lg) var(--spacing-md);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: var(--spacing-xl);
}

/* ========================================
   头部区域 - Logo 和标题
   ======================================== */
.header {
    text-align: center;
    animation: fadeInDown 0.8s ease-out;
}

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

.logo-wrapper {
    position: relative;
    display: inline-block;
    margin-bottom: var(--spacing-md);
}

.logo {
    width: 100px;
    height: 100px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-glow);
    position: relative;
    z-index: 1;
    animation: pulse 3s ease-in-out infinite;
}

.logo-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 120px;
    height: 120px;
    background: var(--primary-gradient);
    border-radius: var(--radius-lg);
    filter: blur(25px);
    opacity: 0.5;
    z-index: 0;
    animation: glowPulse 3s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.02);
    }
}

@keyframes glowPulse {
    0%, 100% {
        opacity: 0.5;
        transform: translate(-50%, -50%) scale(1);
    }
    50% {
        opacity: 0.7;
        transform: translate(-50%, -50%) scale(1.1);
    }
}

.app-name {
    font-size: 2.5rem;
    font-weight: 700;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: var(--spacing-xs);
    letter-spacing: 2px;
}

.app-slogan {
    font-size: 1rem;
    color: var(--text-secondary);
    font-weight: 300;
    letter-spacing: 4px;
}

/* ========================================
   功能特性区域
   ======================================== */
.features {
    display: flex;
    justify-content: center;
    gap: var(--spacing-lg);
    flex-wrap: wrap;
    animation: fadeIn 0.8s ease-out 0.2s backwards;
}

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

.feature-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-xs);
    transition: var(--transition-normal);
}

.feature-item:hover {
    transform: translateY(-5px);
}

.feature-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    backdrop-filter: blur(10px);
    transition: var(--transition-normal);
}

.feature-icon svg {
    width: 24px;
    height: 24px;
    color: var(--primary-color);
}

.feature-item:hover .feature-icon {
    background: var(--primary-gradient);
    border-color: transparent;
}

.feature-item:hover .feature-icon svg {
    color: white;
}

.feature-text {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 400;
}

/* ========================================
   下载区域
   ======================================== */
.download-section {
    text-align: center;
    animation: fadeInUp 0.8s ease-out 0.4s backwards;
}

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

.download-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: var(--spacing-xs);
    color: var(--text-primary);
}

.download-subtitle {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: var(--spacing-lg);
}

.download-buttons {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

/* 下载按钮通用样式 */
.download-btn {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    padding: var(--spacing-md) var(--spacing-lg);
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    backdrop-filter: blur(10px);
    transition: var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.download-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: var(--transition-normal);
}

.download-btn:hover {
    transform: translateY(-3px);
    border-color: transparent;
}

.download-btn:active {
    transform: translateY(0) scale(0.98);
}

/* 安卓按钮 */
.android-btn::before {
    background: linear-gradient(135deg, var(--android-color), var(--android-dark));
}

.android-btn:hover::before {
    opacity: 1;
}

.android-btn .btn-icon svg {
    color: var(--android-color);
}

.android-btn:hover .btn-icon svg {
    color: white;
}

/* iOS按钮 */
.ios-btn::before {
    background: linear-gradient(135deg, var(--ios-color), var(--ios-dark));
}

.ios-btn:hover::before {
    opacity: 1;
}

.ios-btn .btn-icon svg {
    color: var(--ios-color);
}

.ios-btn:hover .btn-icon svg {
    color: white;
}

/* 按钮内部元素 */
.btn-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 1;
}

.btn-icon svg {
    width: 32px;
    height: 32px;
    transition: var(--transition-normal);
}

.btn-content {
    flex: 1;
    text-align: left;
    position: relative;
    z-index: 1;
}

.btn-label {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 2px;
    transition: var(--transition-normal);
}

.btn-text {
    display: block;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    transition: var(--transition-normal);
}

.download-btn:hover .btn-label,
.download-btn:hover .btn-text {
    color: white;
}

.btn-arrow {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 1;
    transition: var(--transition-normal);
}

.btn-arrow svg {
    width: 20px;
    height: 20px;
    color: var(--text-muted);
    transition: var(--transition-normal);
}

.download-btn:hover .btn-arrow {
    transform: translateX(5px);
}

.download-btn:hover .btn-arrow svg {
    color: white;
}

/* ========================================
   版本信息
   ======================================== */
.version-info {
    text-align: center;
    animation: fadeIn 0.8s ease-out 0.6s backwards;
}

.version-info p {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: var(--spacing-xs);
}

.version-info span {
    color: var(--text-secondary);
}

/* ========================================
   页脚
   ======================================== */
.footer {
    text-align: center;
    padding-top: var(--spacing-md);
    border-top: 1px solid var(--border-color);
    animation: fadeIn 0.8s ease-out 0.8s backwards;
}

.footer p {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* ========================================
   响应式设计 - 优先移动端
   ======================================== */

/* 小屏手机 */
@media (max-width: 360px) {
    html {
        font-size: 14px;
    }
    
    .container {
        padding: var(--spacing-md) var(--spacing-sm);
    }
    
    .logo {
        width: 80px;
        height: 80px;
    }
    
    .logo-glow {
        width: 100px;
        height: 100px;
    }
    
    .app-name {
        font-size: 2rem;
    }
    
    .features {
        gap: var(--spacing-md);
    }
}

/* 平板及以上 */
@media (min-width: 768px) {
    .container {
        max-width: 600px;
        padding: var(--spacing-xl);
    }
    
    .logo {
        width: 120px;
        height: 120px;
    }
    
    .logo-glow {
        width: 150px;
        height: 150px;
    }
    
    .app-name {
        font-size: 3rem;
    }
    
    .app-slogan {
        font-size: 1.1rem;
    }
    
    .features {
        gap: var(--spacing-xl);
    }
    
    .feature-icon {
        width: 56px;
        height: 56px;
    }
    
    .feature-icon svg {
        width: 28px;
        height: 28px;
    }
    
    .download-buttons {
        flex-direction: row;
    }
    
    .download-btn {
        flex: 1;
    }
}

/* 桌面端 */
@media (min-width: 1024px) {
    .bg-circle-1 {
        width: 400px;
        height: 400px;
    }
    
    .bg-circle-2 {
        width: 350px;
        height: 350px;
    }
    
    .bg-circle-3 {
        width: 300px;
        height: 300px;
    }
    
    .download-btn:hover {
        transform: translateY(-5px);
        box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    }
}

/* ========================================
   深色模式适配（默认就是深色）
   ======================================== */
@media (prefers-color-scheme: light) {
    /* 保持深色主题，不做改变 */
    /* 如果需要浅色版本可以在这里添加 */
}

/* ========================================
   无障碍辅助
   ======================================== */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* 焦点状态 */
.download-btn:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 4px;
}
