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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8fafc;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 按钮样式 */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    gap: 8px;
}

.btn-primary {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    color: white;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #2563eb, #1e40af);
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(59, 130, 246, 0.3);
}

.btn-secondary {
    background: white;
    color: #3b82f6;
    border: 2px solid #3b82f6;
}

.btn-secondary:hover {
    background: #f1f5f9;
    transform: translateY(-2px);
}

.btn-large {
    padding: 16px 32px;
    font-size: 1.1rem;
}

/* 导航栏 */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    padding: 16px 0;
}

.navbar .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    font-size: 1.5rem;
    font-weight: 700;
    color: #1e293b;
    gap: 8px;
}

.logo-icon {
    font-size: 1.8rem;
}

.nav-menu {
    display: flex;
    gap: 32px;
}

.nav-link {
    text-decoration: none;
    color: #475569;
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-link:hover {
    color: #3b82f6;
}

.nav-actions {
    display: flex;
    gap: 16px;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #475569;
    cursor: pointer;
}

/* 英雄区域 */
.hero {
    padding: 160px 0 80px;
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    position: relative;
    overflow: hidden;
}

.hero .container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
    background: white;
    padding: 8px 16px;
    border-radius: 50px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.badge {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
}

.badge-text {
    font-size: 0.875rem;
    color: #64748b;
    font-weight: 500;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.2;
    color: #0f172a;
    margin-bottom: 20px;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: #475569;
    margin-bottom: 32px;
    max-width: 500px;
}

.hero-actions {
    display: flex;
    gap: 16px;
    margin-bottom: 40px;
}

.hero-stats {
    display: flex;
    gap: 40px;
}

.stat-item {
    display: flex;
    flex-direction: column;
}

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: #3b82f6;
}

.stat-label {
    font-size: 0.875rem;
    color: #64748b;
    margin-top: 4px;
}

.hero-image {
    position: relative;
}

.phone-mockup {
    position: relative;
    width: 300px;
    height: 600px;
    margin: 0 auto;
    background: #1e293b;
    border-radius: 40px;
    padding: 12px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25);
}

.phone-screen {
    width: 100%;
    height: 100%;
    border-radius: 28px;
    overflow: hidden;
    background: white;
}

.phone-screen img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* 图片加载失败时的备用样式 */
.phone-screen img:not([src]),
.phone-screen img[src=""],
.phone-screen img[src*="undefined"],
.phone-screen img[src*="null"] {
    display: none;
}

.phone-screen:has(img:not([src]))::after,
.phone-screen:has(img[src=""])::after,
.phone-screen:has(img[src*="undefined"])::after,
.phone-screen:has(img[src*="null"])::after {
    content: "随抓APP界面";
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    color: white;
    font-weight: 600;
    font-size: 1.2rem;
    text-align: center;
    padding: 20px;
}

/* 功能特色 */
.features {
    padding: 100px 0;
    background: white;
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 16px;
}

.section-subtitle {
    font-size: 1.125rem;
    color: #64748b;
    max-width: 600px;
    margin: 0 auto;
}

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

.feature-card {
    background: #f8fafc;
    padding: 32px;
    border-radius: 16px;
    transition: all 0.3s ease;
    border: 1px solid #e2e8f0;
}

.feature-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    border-color: #3b82f6;
}

.feature-icon {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
    color: white;
    font-size: 1.5rem;
}

.feature-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #0f172a;
    margin-bottom: 12px;
}

.feature-description {
    color: #64748b;
    line-height: 1.6;
}

/* 使用教程 */
.how-it-works {
    padding: 100px 0;
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
}

.steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto;
}

.step {
    display: flex;
    gap: 24px;
    align-items: flex-start;
}

.step-number {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    font-weight: 700;
    flex-shrink: 0;
}

.step-content {
    flex: 1;
}

.step-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #0f172a;
    margin-bottom: 8px;
}

.step-description {
    color: #64748b;
    line-height: 1.6;
}

/* 下载区域 */
.download {
    padding: 100px 0;
    background: white;
    text-align: center;
}

.download-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 16px;
}

.download-subtitle {
    font-size: 1.125rem;
    color: #64748b;
    margin-bottom: 40px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.download-buttons {
    display: flex;
    justify-content: center;
    gap: 24px;
    flex-wrap: wrap;
    margin-bottom: 40px;
}

.download-btn {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px 32px;
    border-radius: 12px;
    text-decoration: none;
    transition: all 0.3s ease;
    min-width: 220px;
}

.download-btn.apple {
    background: #000;
    color: white;
}

.download-btn.google {
    background: #4285f4;
    color: white;
}

.download-btn.qrcode {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
}

.download-btn:hover {
    transform: translateY(-4px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
}

.download-btn i {
    font-size: 2rem;
}

.download-btn-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.download-btn-label {
    font-weight: 600;
    font-size: 1.125rem;
}

.download-btn-sub {
    font-size: 0.875rem;
    opacity: 0.9;
}

.download-info {
    display: flex;
    justify-content: center;
    gap: 32px;
    flex-wrap: wrap;
}

.download-info p {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #64748b;
}

.download-info i {
    color: #10b981;
}

/* 常见问题 */
.faq {
    padding: 100px 0;
    background: #f8fafc;
}

.faq-list {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    background: white;
    border-radius: 12px;
    margin-bottom: 16px;
    overflow: hidden;
    border: 1px solid #e2e8f0;
}

.faq-question {
    padding: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
}

.faq-question h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: #0f172a;
}

.faq-question i {
    transition: transform 0.3s ease;
    color: #64748b;
}

.faq-answer {
    padding: 0 24px;
    max-height: 0;
    overflow: hidden;
    transition: all 0.3s ease;
}

.faq-answer p {
    padding-bottom: 24px;
    color: #64748b;
    line-height: 1.6;
}

.faq-item.active .faq-answer {
    max-height: 200px;
}

.faq-item.active .faq-question i {
    transform: rotate(180deg);
}

/* 页脚 */
.footer {
    background: #0f172a;
    color: white;
    padding: 80px 0 40px;
}

.footer-content {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 60px;
    margin-bottom: 60px;
}

.footer-brand .logo {
    color: white;
    margin-bottom: 16px;
}

.footer-tagline {
    color: #94a3b8;
    margin-bottom: 24px;
    max-width: 300px;
}

.social-links {
    display: flex;
    gap: 16px;
}

.social-link {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
}

.social-link:hover {
    background: #3b82f6;
    transform: translateY(-2px);
}

.footer-links {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
}

.footer-column {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-title {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: white;
}

.footer-link {
    color: #94a3b8;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-link:hover {
    color: #3b82f6;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 40px;
    text-align: center;
}

.copyright {
    color: #94a3b8;
    margin-bottom: 8px;
}

.footer-address {
    color: #64748b;
    font-size: 0.875rem;
}

/* 响应式设计 */

/* 平板设备 (769px - 1024px) */
@media (min-width: 769px) and (max-width: 1024px) {
    .container {
        max-width: 90%;
    }

    .hero .container {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 40px;
    }

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

    .hero-image {
        display: none; /* 在平板设备也隐藏图片 */
    }

    .hero .container {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-actions {
        justify-content: center;
    }

    .hero-stats {
        justify-content: center;
    }

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

    .steps {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* 小屏幕平板 (601px - 768px) */
@media (min-width: 601px) and (max-width: 768px) {
    .container {
        max-width: 95%;
    }

    .hero .container {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .hero-title {
        font-size: 2.2rem;
    }

    .hero-image {
        display: none; /* 在小屏幕平板也隐藏图片 */
    }

    .hero .container {
        grid-template-columns: 1fr;
        text-align: center;
    }

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

    .steps {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    .footer-content {
        grid-template-columns: repeat(2, 1fr);
        gap: 30px;
    }
}

/* 移动设备 (0px - 768px) */
@media (max-width: 768px) {
    .navbar {
        padding: 12px 0;
    }

    .nav-menu {
        display: none;
        position: fixed;
        top: 70px;
        left: 0;
        right: 0;
        background: white;
        padding: 20px;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
        flex-direction: column;
        gap: 16px;
        z-index: 999;
        max-height: calc(100vh - 70px);
        overflow-y: auto;
        transform: translateY(-20px);
        opacity: 0;
        transition: transform 0.3s ease, opacity 0.3s ease;
        border-top: 1px solid #e2e8f0;
    }

    .nav-menu.mobile-menu-active {
        display: flex;
        transform: translateY(0);
        opacity: 1;
    }

    .nav-link {
        padding: 12px 16px;
        border-radius: 8px;
        transition: background-color 0.2s ease;
    }

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

    .mobile-menu-btn {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 44px;
        height: 44px;
        border-radius: 8px;
        transition: background-color 0.2s ease;
    }

    .mobile-menu-btn:active {
        background-color: #f1f5f9;
    }

    .hero {
        padding: 100px 0 40px;
    }

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

    .hero-subtitle {
        font-size: 1.125rem;
        line-height: 1.5;
    }

    .hero-actions {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .hero-actions .btn {
        width: 100%;
        justify-content: center;
    }

    .hero-image {
        display: none; /* 在移动端隐藏图片 */
    }

    .hero .container {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-stats {
        flex-direction: column;
        gap: 20px;
        padding: 20px;
        border-radius: 16px;
        background: rgba(255, 255, 255, 0.8);
        backdrop-filter: blur(10px);
    }

    .features-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .feature-card {
        padding: 20px;
    }

    .steps {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .step {
        padding: 20px;
    }

    .download-buttons {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .download-btn {
        width: 100%;
        justify-content: center;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 40px;
        text-align: center;
    }

    .footer-links {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .footer-section h3 {
        margin-bottom: 16px;
    }

    /* 改善表单输入 */
    input, textarea, select {
        font-size: 16px; /* 防止iOS缩放 */
    }

    /* 改善滚动条 */
    ::-webkit-scrollbar {
        width: 6px;
    }

    ::-webkit-scrollbar-thumb {
        background: #cbd5e1;
        border-radius: 3px;
    }
}

/* 小屏幕手机 (0px - 480px) */
@media (max-width: 480px) {
    .container {
        padding: 0 12px;
    }

    .hero {
        padding: 90px 0 40px;
    }

    .hero-title {
        font-size: 1.75rem;
        margin-bottom: 12px;
    }

    .hero-subtitle {
        font-size: 1rem;
        margin-bottom: 24px;
    }

    .section-title {
        font-size: 1.75rem;
        margin-bottom: 24px;
    }

    .section-subtitle {
        font-size: 1rem;
    }

    .download-title {
        font-size: 1.75rem;
    }

    .download-btn {
        min-width: 100%;
        font-size: 1rem;
    }

    /* 移动端触摸优化 */
    .btn,
    .nav-link,
    .mobile-menu-btn {
        min-height: 44px; /* 最小触摸目标大小 */
        min-width: 44px;
    }

    .btn {
        padding: 14px 24px;
        font-size: 1rem;
    }

    .btn-large {
        padding: 16px 24px;
        font-size: 1.1rem;
    }

    .feature-card,
    .faq-item,
    .violation-type {
        cursor: pointer;
        -webkit-tap-highlight-color: transparent; /* 移除默认点击高亮 */
    }

    /* 触摸反馈 */
    .btn:active,
    .nav-link:active,
    .feature-card:active {
        transform: scale(0.98);
        transition: transform 0.1s ease;
    }

    /* 改善滚动体验 */
    html {
        -webkit-overflow-scrolling: touch;
    }

    /* 防止双击缩放 */
    * {
        touch-action: manipulation;
    }

    /* 在480px以下完全隐藏图片 */
    .hero-image {
        display: none;
    }

    /* 优化图标大小 */
    .feature-icon,
    .step-icon {
        font-size: 2rem;
        width: 60px;
        height: 60px;
    }

    /* 优化间距 */
    .section {
        padding: 40px 0;
    }

    /* 优化统计数字 */
    .stat-number {
        font-size: 2rem;
    }

    .stat-label {
        font-size: 0.875rem;
    }
}

/* 超小屏幕手机 (0px - 375px) */
@media (max-width: 375px) {
    .hero-title {
        font-size: 1.5rem;
    }

    .hero-subtitle {
        font-size: 0.9375rem;
    }

    .section-title {
        font-size: 1.5rem;
    }

    .logo-text {
        font-size: 1.25rem;
    }

    .btn {
        padding: 12px 20px;
        font-size: 0.9375rem;
    }

    /* 在375px以下完全隐藏图片 */
    .hero-image {
        display: none;
    }

    .feature-icon,
    .step-icon {
        font-size: 1.75rem;
        width: 50px;
        height: 50px;
    }

    .stat-number {
        font-size: 1.75rem;
    }
}

/* 移动端特定优化 */
@media (hover: none) and (pointer: coarse) {
    /* 触摸设备优化 */
    .btn:hover,
    .nav-link:hover,
    .feature-card:hover {
        transform: none;
    }

    .btn:active,
    .nav-link:active,
    .feature-card:active {
        transform: scale(0.98);
    }

    /* 改善长按行为 */
    .btn,
    .nav-link {
        -webkit-user-select: none;
        user-select: none;
    }
}

/* iOS Safari 特定优化 */
@supports (-webkit-touch-callout: none) {
    .hero,
    .section {
        -webkit-backdrop-filter: blur(10px);
        backdrop-filter: blur(10px);
    }

    input,
    textarea,
    select {
        font-size: 16px; /* 防止iOS自动缩放 */
    }
}

/* 改善移动端性能 */
@media (prefers-reduced-motion: no-preference) {
    .hero-content,
    .hero-image,
    .feature-card,
    .step {
        will-change: transform, opacity;
    }
}

/* 暗色模式支持 */
@media (prefers-color-scheme: dark) {
    body {
        background-color: #0f172a;
        color: #e2e8f0;
    }

    .navbar {
        background: rgba(15, 23, 42, 0.95);
    }

    .hero {
        background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    }

    .feature-card,
    .step {
        background: #1e293b;
        border-color: #334155;
    }

    .custom-modal-content {
        background: #1e293b;
        color: #e2e8f0;
    }
}

/* 自定义弹窗样式 */
.custom-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    animation: fadeIn 0.3s ease forwards;
}

.custom-modal-content {
    background: white;
    border-radius: 16px;
    width: 90%;
    max-width: 500px;
    max-height: 80vh;
    overflow-y: auto;
    animation: slideUp 0.3s ease;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.custom-modal-header {
    padding: 24px;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, #f0f9ff, #e0f2fe);
    border-radius: 16px 16px 0 0;
}

.custom-modal-header h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #0f172a;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.custom-modal-header h3 i {
    color: #3b82f6;
}

.custom-modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #64748b;
    cursor: pointer;
    padding: 4px;
    line-height: 1;
    transition: color 0.3s ease;
}

.custom-modal-close:hover {
    color: #3b82f6;
}

.custom-modal-body {
    padding: 24px;
    color: #475569;
    line-height: 1.6;
}

.custom-modal-body p {
    margin-bottom: 16px;
}

.custom-modal-body p:last-child {
    margin-bottom: 0;
}

.custom-modal-footer {
    padding: 24px;
    border-top: 1px solid #e2e8f0;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

.custom-modal-footer .btn {
    min-width: 100px;
}

.custom-modal-info {
    background: #f0f9ff;
    padding: 16px;
    border-radius: 8px;
    margin-top: 16px;
    border-left: 4px solid #3b82f6;
}

.custom-modal-info i {
    color: #3b82f6;
    margin-right: 8px;
}

.custom-modal-warning {
    background: #fef3c7;
    padding: 16px;
    border-radius: 8px;
    margin-top: 16px;
    border-left: 4px solid #f59e0b;
}

.custom-modal-warning i {
    color: #f59e0b;
    margin-right: 8px;
}

.custom-modal-success {
    background: #d1fae5;
    padding: 16px;
    border-radius: 8px;
    margin-top: 16px;
    border-left: 4px solid #10b981;
}

.custom-modal-success i {
    color: #10b981;
    margin-right: 8px;
}

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

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

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

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

.custom-modal.closing {
    animation: fadeOut 0.3s ease forwards;
}

.custom-modal.closing .custom-modal-content {
    animation: slideDown 0.3s ease;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .custom-modal-content {
        width: 95%;
        max-height: 70vh;
    }

    .custom-modal-header,
    .custom-modal-body,
    .custom-modal-footer {
        padding: 20px;
    }

    .custom-modal-footer {
        flex-direction: column;
    }

    .custom-modal-footer .btn {
        width: 100%;
    }
}