/* 全局样式重置和基础设置 */
* {
    box-sizing: border-box;
}

html, body {
    overflow-x: hidden;
    width: 100%;
    max-width: 100%;
}

body {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    color: #1f2937;
}

/* iOS页面特殊背景色 */
.ios-page {
    background-color: #f8fafc;
}

/* 发光效果背景 */
.glow {
    position: absolute;
    width: 300px;
    height: 300px;
    pointer-events: none;
    z-index: 0;
}

@media (min-width: 768px) {
    .glow {
        width: 500px;
        height: 500px;
    }
}

/* Android页面发光效果 */
.glow-android {
    background: radial-gradient(circle, rgba(34, 197, 94, 0.1) 0%, rgba(34, 197, 94, 0) 70%);
}

/* iOS页面发光效果 */
.glow-ios {
    background: radial-gradient(circle, rgba(59, 130, 246, 0.1) 0%, rgba(59, 130, 246, 0) 70%);
}

/* Windows页面发光效果 */
.glow-windows {
    background: radial-gradient(circle, rgba(59, 130, 246, 0.1) 0%, rgba(59, 130, 246, 0) 70%);
}

/* macOS页面发光效果 */
.glow-macos {
    background: radial-gradient(circle, rgba(147, 51, 234, 0.1) 0%, rgba(147, 51, 234, 0) 70%);
}

/* 下载卡片样式 */
.download-card {
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.download-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* 教程和说明卡片样式（基于iOS页面设计） */
.tutorial-card {
    background: white;
    border-radius: 0.75rem;
    padding: 2rem;
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    transition: all 0.3s ease;
    transform: translateY(0);
}

.tutorial-card:hover {
    transform: translateY(-0.25rem);
    box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -2px rgb(0 0 0 / 0.1);
}

/* 步骤时间线样式 */
.timeline {
    position: relative;
    border-left: 2px solid #e5e7eb;
}

.timeline-item {
    margin-left: 1.5rem;
    position: relative;
}

.timeline-marker {
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    background: #dbeafe;
    border-radius: 50%;
    left: -1rem;
    box-shadow: 0 0 0 8px white;
}

.timeline-marker-success {
    background: #dcfce7;
}

.timeline-marker span {
    font-weight: bold;
    color: #1d4ed8;
    font-size: 0.875rem;
}

.timeline-marker-success span {
    color: #16a34a;
}

/* 按钮样式统一 */
.btn {
    display: inline-block;
    text-align: center;
    padding: 0.75rem 1.5rem;
    border-radius: 0.75rem;
    font-weight: 500;
    transition: all 0.3s ease;
    text-decoration: none;
    border: none;
    cursor: pointer;
    font-size: 0.875rem;
}

.btn-primary {
    background: #2563eb;
    color: white;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.btn-primary:hover {
    background: #1d4ed8;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.btn-secondary {
    background: #f3f4f6;
    color: #374151;
}

.btn-secondary:hover {
    background: #e5e7eb;
}

.btn-large {
    padding: 0.875rem 1.5rem;
    font-size: 1rem;
}

/* 提示框样式 */
.alert {
    padding: 1rem;
    border-radius: 0.5rem;
    margin-bottom: 1.5rem;
    font-size: 0.875rem;
    border: 1px solid;
}

.alert-warning {
    background: #fef3cd;
    border-color: #fde68a;
    color: #92400e;
}

.alert-info {
    background: #dbeafe;
    border-color: #bfdbfe;
    color: #1e40af;
}

.alert-success {
    background: #dcfce7;
    border-color: #bbf7d0;
    color: #166534;
}

/* 移动端菜单样式 - 使用与index.html相同的显示/隐藏逻辑 */
.mobile-menu.open {
    display: block !important;
}

/* 汉堡菜单按钮样式 */
.hamburger {
    cursor: pointer;
    transition: transform 0.3s ease;
}

.hamburger.open {
    transform: rotate(90deg);
}

.hamburger span {
    display: block;
    width: 20px;
    height: 2px;
    background: currentColor;
    margin: 4px 0;
    transition: all 0.3s ease;
}

.hamburger.open span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.open span:nth-child(2) {
    opacity: 0;
}

.hamburger.open span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

/* iOS页面特殊样式 */
.card-shadow {
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
}

/* 地图动画效果 */
@keyframes ripple {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    100% {
        transform: scale(1.8);
        opacity: 0;
    }
}

/* 平滑滚动 */
html {
    scroll-behavior: smooth;
}

/* 响应式调整 */
@media (max-width: 640px) {
    .download-card, .tutorial-card {
        margin: 0 -1rem;
        border-radius: 0;
    }
    
    .main-container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    .btn {
        width: 100%;
    }
    
    .timeline-item {
        margin-left: 1rem;
    }
    
    .timeline-marker {
        left: -0.75rem;
    }
}

/* Index页面专用样式 */
.download-btn {
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.download-btn:hover {
    transform: translateY(-1px);
    background: rgba(255, 255, 255, 1);
    border-color: rgba(0, 0, 0, 0.12);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* 首页发光效果 */
.glow-index {
    background: radial-gradient(circle, rgba(251, 191, 36, 0.1) 0%, rgba(251, 191, 36, 0) 70%);
}

/* 移动端菜单动画 */
.mobile-menu {
    transform: translateX(100%);
    transition: transform 0.3s ease-in-out;
}

.mobile-menu.open {
    transform: translateX(0);
}

/* 文本阴影效果 */
.text-shadow {
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* 英雄区域渐变 */
.hero-gradient {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

/* 地图容器样式 */
.map-container {
    position: relative;
    width: 100%;
    height: 400px;
    overflow: hidden;
    border-radius: 0.5rem;
    background: #f8fafc;
}

/* 按钮悬停效果 */
.btn-hover-effect {
    position: relative;
    overflow: hidden;
}

.btn-hover-effect::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.btn-hover-effect:hover::before {
    left: 100%;
}

/* 登录注册按钮样式 */
.btn-outline {
    border: 2px solid #3b82f6;
    color: #3b82f6;
    background: transparent;
    transition: all 0.3s ease;
}

.btn-outline:hover {
    background: #3b82f6;
    color: white;
}

.btn-solid {
    background: #3b82f6;
    color: white;
    border: 2px solid #3b82f6;
    transition: all 0.3s ease;
}

.btn-solid:hover {
    background: #2563eb;
    border-color: #2563eb;
}

/* 地图相关样式 */
.has-node {
    transition: fill 0.2s ease;
}

.has-node:hover {
    fill: #fbbf24 !important;
}

#map {
    background: transparent;
}

/* 导航栏样式 */
.nav-gradient {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(248, 250, 252, 0.95) 100%);
}

/* 首页专用按钮样式 */
.btn-login, .btn-register {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 500;
    white-space: nowrap;
    transition: all 0.2s ease;
    min-width: 160px;
}

.btn-login:hover svg {
    transform: translateX(2px);
}

.btn-register:hover svg {
    transform: rotate(12deg);
}

/* 移动端响应式样式 */
@media (max-width: 768px) {
    .glow-index {
        width: 200px;
        height: 200px;
    }
    
    .container-wrapper {
        padding: 1rem;
        margin: 0 auto;
        max-width: 100%;
        padding-top: 4.5rem;
    }
    
    .download-btn {
        padding: 1.25rem 1rem;
        margin: 0 auto;
        width: 100%;
    }
    
    .download-btn svg {
        width: 2.75rem;
        height: 2.75rem;
    }
    
    .download-btn span {
        font-size: 1.1rem;
        font-weight: 500;
    }
    
    .download-grid {
        grid-template-columns: 1fr 1fr;
        gap: 1rem;
        max-width: 100%;
        padding: 0 1rem;
    }
    
    .map-container {
        height: 250px;
    }
    
    .hero-section {
        padding: 2rem 1rem;
    }

    .hero-title {
        font-size: 2.5rem;
        line-height: 1.2;
    }

    .hero-subtitle {
        font-size: 1.1rem;
        margin-bottom: 2rem;
    }

    .cta-button {
        padding: 0.875rem 2rem;
        font-size: 1rem;
    }
}

/* 小屏幕优化 */
@media (max-width: 640px) {
    .btn-mobile {
        width: 100%;
        max-width: 200px;
        padding: 0.75rem 1.5rem;
        margin: 0 auto;
    }
    
    .login-register-container {
        max-width: 280px;
        margin: 0 auto;
        padding: 0 1rem;
    }
}

@media (max-width: 375px) {
    .container-wrapper {
        padding: 0.75rem;
        padding-top: 4rem;
    }
    
    .download-btn {
        padding: 1rem 0.75rem;
    }
    
    .download-btn svg {
        width: 2.5rem;
        height: 2.5rem;
    }
    
    .download-btn span {
        font-size: 0.95rem;
    }
    
    .download-grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
}

/* 客户端页面统一样式 */
.client-page {
    font-family: system-ui, -apple-system, sans-serif;
    -webkit-font-smoothing: antialiased;
    position: relative;
    overflow-x: hidden;
    min-height: 100vh;
}

.client-header {
    text-align: center;
    margin-bottom: 3rem;
}

.client-icon {
    width: 5rem;
    height: 5rem;
    margin: 0 auto 1rem;
    color: #3b82f6;
}

.client-icon svg {
    width: 100%;
    height: 100%;
}

.client-title {
    font-size: 2.25rem;
    font-weight: bold;
    color: #1f2937;
    margin-bottom: 0.5rem;
}

.client-subtitle {
    font-size: 1.125rem;
    color: #6b7280;
}

/* 客户端下载卡片样式 */
.client-download-card {
    background: white;
    border-radius: 1rem;
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    border: 1px solid rgba(0, 0, 0, 0.05);
    overflow: hidden;
    margin-bottom: 2rem;
    transition: box-shadow 0.3s ease;
}

.client-download-card:hover {
    box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -2px rgb(0 0 0 / 0.1);
}

.client-download-card-content {
    padding: 2rem;
}

.client-download-card-footer {
    background: rgba(249, 250, 251, 0.7);
    padding: 1rem 2rem;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

/* 客户端app图标样式 */
.client-app-icon {
    width: 6rem;
    height: 6rem;
    border-radius: 1rem;
    background: #dbeafe;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.client-app-icon svg {
    width: 4rem;
    height: 4rem;
    color: #3b82f6;
}

/* 客户端信息区域 */
.client-info {
    flex-grow: 1;
}

.client-app-title {
    font-size: 1.5rem;
    font-weight: bold;
    color: #1f2937;
    margin-bottom: 0.5rem;
}

.client-app-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    font-size: 0.875rem;
    color: #6b7280;
    margin-bottom: 0.75rem;
}

.client-app-meta .separator {
    width: 0.25rem;
    height: 0.25rem;
    border-radius: 50%;
    background: #d1d5db;
}

.client-app-description {
    color: #4b5563;
    margin-bottom: 0.75rem;
}

.client-info-box {
    font-size: 0.875rem;
    color: #1e40af;
    background: #dbeafe;
    border: 1px solid #bfdbfe;
    border-radius: 0.5rem;
    padding: 0.75rem;
}

/* 二维码样式 */
.client-qr-code {
    flex-shrink: 0;
    margin-top: 1rem;
    align-self: center;
}

.client-qr-code img {
    border-radius: 0.5rem;
    box-shadow: 0 1px 3px rgb(0 0 0 / 0.1);
}

/* 下载按钮样式 */
.client-download-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    background: #3b82f6;
    color: white;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    transform: scale(1);
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1);
}

.client-download-btn:hover {
    background: #2563eb;
    transform: scale(1.05);
    box-shadow: 0 10px 15px -3px rgba(59, 130, 246, 0.4);
}

.client-download-btn svg {
    width: 1.25rem;
    height: 1.25rem;
}

/* 客户端步骤列表样式 */
.client-steps {
    list-style: none;
    padding: 0;
    margin: 0;
}

.client-step {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.client-step:last-child {
    margin-bottom: 0;
}

.client-step-number {
    flex-shrink: 0;
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #dbeafe;
    color: #2563eb;
    font-weight: bold;
    font-size: 0.875rem;
}

.client-step-content h4 {
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 0.25rem;
}

.client-step-content p {
    color: #4b5563;
    line-height: 1.5;
}

/* 响应式设计 */
@media (min-width: 640px) {
    .client-download-card-content {
        display: flex;
        align-items: flex-start;
        gap: 1.5rem;
    }
    
    .client-qr-code {
        margin-top: 0;
    }
    
    .client-download-btn {
        width: auto;
        justify-content: center;
    }
    
    .client-app-meta .separator {
        display: inline-block;
    }
}

@media (max-width: 639px) {
    .client-app-meta .separator {
        display: none;
    }
    
    .client-download-btn {
        width: 100%;
        justify-content: center;
    }
    
    .client-download-card-footer {
        display: flex;
        flex-direction: column;
        gap: 1rem;
    }
}
