/* 全局样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* APP风格顶部导航栏 */
.app-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 56px;
    background-color: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    z-index: 1000;
}

.header-title {
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

.header-btn {
    padding: 6px 12px;
    background-color: rgba(0, 122, 255, 0.1);
    color: #007AFF;
    border: 1px solid rgba(0, 122, 255, 0.3);
    border-radius: 16px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.header-btn:active {
    background-color: rgba(0, 122, 255, 0.2);
    transform: scale(0.96);
}

.header-icon {
    font-size: 20px;
}

/* 深色模式适配 */
@media (prefers-color-scheme: dark) {
    .header-btn {
        background-color: rgba(0, 122, 255, 0.2);
        color: #007AFF;
        border: 1px solid rgba(0, 122, 255, 0.4);
    }
    
    .header-btn:active {
        background-color: rgba(0, 122, 255, 0.3);
    }
}

/* 主内容区域 */
.app-content {
    margin-top: 56px;
    margin-bottom: 16px;
    padding: 16px;
}

/* 英雄区域 */
.hero-section {
    text-align: center;
    margin-bottom: 24px;
}

/* 英雄区域图片容器 */
.hero-image {
    display: flex;
    justify-content: center;
    align-items: center;
}

/* 兼容性说明部分 */
.compatibility-note {
    margin-top: 24px;
    padding: 16px;
    background-color: #f9f9f9;
    border-radius: 8px;
    text-align: left;
}

.compatibility-note h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 12px;
    color: #333;
}

.compatibility-note p {
    font-size: 14px;
    color: #666;
    margin-bottom: 8px;
    line-height: 1.5;
}

/* 高亮提示部分 */
.note-highlight {
    margin-top: 12px;
    padding: 12px;
    background-color: #E3F2FD;
    border-left: 4px solid #2196F3;
    border-radius: 4px;
}

/* 解决方案图片容器 */
.solution-image {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 16px;
}

/* 视频容器 */
.video-container {
    margin-top: 16px;
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 宽高比 */
    height: 0;
    overflow: hidden;
    border-radius: 8px;
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.note-highlight p {
    color: #1976D2;
    font-weight: 500;
}

/* MIUI步骤样式 */
.miui-steps {
    margin-top: 8px;
}

.step-item {
    margin-bottom: 12px;
    padding-left: 8px;
    border-left: 3px solid #E0E0E0;
    line-height: 1.5;
}

/* 重要提示样式 */
.important-note {
    margin-top: 16px;
    padding: 10px;
    background-color: #FFF3CD;
    border: 1px solid #FFEEBA;
    border-radius: 4px;
}

.important-note p {
    color: #856404;
    margin: 0;
    font-weight: 500;
}

/* ColorOS步骤样式 */
.coloros-steps {
    margin-top: 8px;
}

.coloros-steps h4 {
    margin-top: 16px;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 600;
    color: #333;
}

/* 深色模式适配 */
@media (prefers-color-scheme: dark) {
    .coloros-steps h4 {
        color: #e0e0e0;
    }
}

/* 深色模式适配 */
@media (prefers-color-scheme: dark) {
    .step-item {
        border-left-color: #444;
    }
    
    .important-note {
        background-color: #382B00;
        border-color: #5C4B00;
    }
    
    .important-note p {
        color: #FFD93D;
    }
}

/* 深色模式适配 */
@media (prefers-color-scheme: dark) {
    .compatibility-note {
        background-color: #2a2a2a;
    }
    
    .compatibility-note h3 {
        color: #e0e0e0;
    }
    
    .compatibility-note p {
        color: #b0b0b0;
    }
    
    .note-highlight {
        background-color: #1a237e;
        border-left-color: #90caf9;
    }
    
    .note-highlight p {
        color: #bbdefb;
    }
}

.hero-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 8px;
    color: #333;
}

.hero-subtitle {
    font-size: 16px;
    color: #666;
}

/* 卡片样式 */
.card {
    background-color: #fff;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.card-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 16px;
    color: #333;
}

/* 警告框 */
.warning-box {
    background-color: #FFF3CD;
    border: 1px solid #FFEEBA;
    border-radius: 8px;
    padding: 12px;
    margin: 12px 0;
}

.warning-box p {
    color: #856404;
    font-size: 14px;
}

/* 功能项 */
.feature-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 16px;
    padding: 12px;
    background-color: #f9f9f9;
    border-radius: 8px;
}

.feature-icon {
    font-size: 24px;
    margin-right: 12px;
    min-width: 32px;
}

.feature-text h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 4px;
    color: #333;
}

.feature-text p {
    font-size: 14px;
    color: #666;
}

/* 步骤项 */
.step-item {
    display: flex;
    margin-bottom: 24px;
}

.step-number {
    width: 32px;
    height: 32px;
    background-color: #007AFF;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    margin-right: 12px;
    flex-shrink: 0;
}

.step-content {
    flex: 1;
}

.step-content h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 12px;
    color: #333;
}

.step-content p {
    font-size: 14px;
    color: #666;
    margin-bottom: 16px;
}

/* 按钮样式 */
.app-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 16px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-right: 8px;
    margin-bottom: 8px;
    min-width: 120px;
}

.app-button:active {
    transform: scale(0.96);
    opacity: 0.8;
}

.app-button.primary {
    background-color: #007AFF;
    color: #fff;
}

.app-button.secondary {
    background-color: #f0f0f0;
    color: #333;
    border: 1px solid #e0e0e0;
}

.app-button.large {
    padding: 12px 24px;
    font-size: 16px;
    min-width: 200px;
}

/* 按钮组 */
.button-group {
    display: flex;
    flex-wrap: wrap;
    margin: 8px 0;
}

.button-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin: 12px 0;
}

/* 手风琴 */
.accordion {
    margin: 12px 0;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
}

.accordion-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    background-color: #f9f9f9;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.accordion-header:hover {
    background-color: #f0f0f0;
}

.accordion-header:active {
    background-color: #e0e0e0;
}

.accordion-icon {
    transition: transform 0.3s ease;
}

.accordion.active .accordion-icon {
    transform: rotate(180deg);
}

.accordion-content {
    padding: 0 16px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
}

.accordion.active .accordion-content {
    padding: 16px;
    max-height: 500px;
}

/* 图片占位符 */
.image-placeholder {
    background-color: #f0f0f0;
    border-radius: 8px;
    padding: 40px 20px;
    text-align: center;
    margin: 16px 0;
}

.placeholder-content span {
    font-size: 48px;
    display: block;
    margin-bottom: 12px;
}

.placeholder-content p {
    color: #666;
    font-size: 14px;
}

/* 常见问题 */
.faq-item {
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid #f0f0f0;
}

.faq-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.faq-item h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 4px;
    color: #333;
}

.faq-item p {
    font-size: 14px;
    color: #666;
}

/* 服务部分 */
.price-tag {
    background-color: #FF6B6B;
    color: #fff;
    border-radius: 20px;
    padding: 6px 16px;
    display: inline-block;
    margin: 12px 0;
}

.price {
    font-size: 18px;
    font-weight: 700;
}

.material-list {
    margin: 16px 0;
    padding-left: 20px;
}

.material-list li {
    margin-bottom: 8px;
    font-size: 14px;
    color: #666;
}

/* APP风格底部导航 */
.app-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60px;
    background-color: #fff;
    display: flex;
    justify-content: space-around;
    align-items: center;
    box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.08);
    z-index: 1000;
}

.footer-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1;
    height: 100%;
    cursor: pointer;
    transition: all 0.2s ease;
}

.footer-item:active {
    background-color: #f5f5f5;
}

.footer-item.active {
    color: #007AFF;
}

.footer-icon {
    font-size: 20px;
    margin-bottom: 4px;
}

.footer-text {
    font-size: 12px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .app-content {
        padding: 12px;
    }

    .card {
        padding: 16px;
    }

    .button-grid {
        grid-template-columns: 1fr;
    }

    .app-button {
        width: 100%;
        margin-right: 0;
    }

    .step-item {
        flex-direction: column;
    }

    .step-number {
        margin-bottom: 8px;
    }

    .feature-item {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .feature-icon {
        margin-right: 0;
        margin-bottom: 8px;
    }
}

/* 动画效果 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.card {
    animation: fadeIn 0.3s ease forwards;
}

.card:nth-child(1) {
    animation-delay: 0.1s;
}

.card:nth-child(2) {
    animation-delay: 0.2s;
}

.card:nth-child(3) {
    animation-delay: 0.3s;
}

.card:nth-child(4) {
    animation-delay: 0.4s;
}

.card:nth-child(5) {
    animation-delay: 0.5s;
}

.card:nth-child(6) {
    animation-delay: 0.6s;
}

/* 滚动条样式 */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a1a1a1;
}

/* 禁用文本选择 */
.app-button, .footer-item, .accordion-header {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

/* 深色模式支持 */
@media (prefers-color-scheme: dark) {
    body {
        background-color: #121212;
        color: #e0e0e0;
    }

    .app-header, .app-footer, .card {
        background-color: #1e1e1e;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    }

    .card-title, .feature-text h3, .step-content h3, .faq-item h3 {
        color: #e0e0e0;
    }

    .hero-subtitle, .feature-text p, .step-content p, .faq-item p, .material-list li {
        color: #b0b0b0;
    }

    .feature-item, .accordion-header {
        background-color: #2a2a2a;
    }

    .accordion-header:hover {
        background-color: #333;
    }

    .accordion-header:active {
        background-color: #3a3a3a;
    }

    .app-button.secondary {
        background-color: #333;
        color: #e0e0e0;
        border-color: #444;
    }

    .footer-item:active {
        background-color: #2a2a2a;
    }
}

/* 确保在手机浏览器上的最佳显示 */
@media (max-width: 480px) {
    .hero-title {
        font-size: 22px;
    }

    .card-title {
        font-size: 17px;
    }

    .app-button {
        padding: 12px 20px;
        font-size: 15px;
    }

    .step-content h3 {
        font-size: 15px;
    }
}

/* 防止页面内容被底部导航栏遮挡 */
.download-section {
    margin-bottom: 80px;
}

/* USB调试提醒部分 */
.usb-debug-section {
    margin: 16px;
}

.usb-debug-section .card {
    margin-bottom: 0;
}

/* USB调试图片容器 */
.usb-debug-image {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 12px;
}

/* USB调试解决办法 */
.usb-debug-solution {
    margin-top: 16px;
    padding: 16px;
    background-color: #f9f9f9;
    border-radius: 8px;
}

.usb-debug-solution h4 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 12px;
    color: #333;
}

/* 解决方案步骤 */
.solution-steps {
    margin-bottom: 16px;
}

.solution-steps .step-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 12px;
    padding-left: 32px;
    position: relative;
}

.solution-steps .step-item::before {
    content: attr(data-step);
    position: absolute;
    left: 0;
    top: 0;
    width: 20px;
    height: 20px;
    background-color: #007AFF;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
}

.solution-steps .step-item p {
    margin: 0;
    line-height: 1.5;
    color: #666;
}

/* 解决方案注意事项 */
.solution-note {
    margin-top: 16px;
    padding: 12px;
    background-color: #FFF3CD;
    border: 1px solid #FFEEBA;
    border-radius: 6px;
}

.solution-note p {
    margin: 0;
    color: #856404;
    font-size: 14px;
    line-height: 1.5;
}

/* 深色模式适配 */
@media (prefers-color-scheme: dark) {
    .usb-debug-solution {
        background-color: #2a2a2a;
    }
    
    .usb-debug-solution h4 {
        color: #e0e0e0;
    }
    
    .solution-steps .step-item p {
        color: #b0b0b0;
    }
    
    .solution-note {
        background-color: #382B00;
        border-color: #5C4B00;
    }
    
    .solution-note p {
        color: #FFD93D;
    }
}

/* 其他问题按钮区域 */
.other-questions-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
    background-color: #f5f5f5;
    margin-top: 20px;
    gap: 12px;
}

/* 大按钮样式 */
.app-button.large {
    width: 100%;
    max-width: 300px;
}

/* 弹出窗口样式 */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    animation: fadeIn 0.3s ease;
}

.modal-content {
    background-color: #fff;
    margin: 15% auto;
    padding: 20px;
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    max-height: 80vh;
    overflow-y: auto;
    animation: slideIn 0.3s ease;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid #e0e0e0;
}

.modal-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

.close-btn {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #666;
}

.close-btn:hover {
    color: #333;
}

.modal-body {
    line-height: 1.6;
}

.modal-body h4 {
    margin-top: 20px;
    margin-bottom: 8px;
    font-size: 16px;
    font-weight: 600;
}

.modal-body p {
    margin-bottom: 12px;
}

/* 常见问题列表样式 */
.faq-list {
    margin-top: 8px;
}

.faq-list-item {
    padding: 12px;
    margin-bottom: 8px;
    background-color: #f5f5f5;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.faq-list-item:hover {
    background-color: #e3f2fd;
    transform: translateY(-1px);
}

.faq-list-item:active {
    background-color: #bbdefb;
    transform: translateY(0);
}

.faq-list-item p {
    margin: 0;
    font-size: 14px;
    color: #333;
}

/* 深色模式适配 */
@media (prefers-color-scheme: dark) {
    .faq-list-item {
        background-color: #2a2a2a;
    }
    
    .faq-list-item:hover {
        background-color: #1a237e;
    }
    
    .faq-list-item:active {
        background-color: #283593;
    }
    
    .faq-list-item p {
        color: #e0e0e0;
    }
}

/* 动画效果 */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideIn {
    from { transform: translateY(-50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* 深色模式适配 */
@media (prefers-color-scheme: dark) {
    .other-questions-section {
        background-color: #1e1e1e;
    }
    
    .modal-content {
        background-color: #1e1e1e;
        border: 1px solid #333;
    }
    
    .modal-header {
        border-bottom-color: #333;
    }
    
    .modal-header h3 {
        color: #e0e0e0;
    }
    
    .close-btn {
        color: #999;
    }
    
    .close-btn:hover {
        color: #e0e0e0;
    }
    
    .modal-body h4 {
        color: #e0e0e0;
    }
    
    .modal-body p {
        color: #b0b0b0;
    }
}

/* ICP备案信息样式 */
.icp-footer {
    text-align: center;
    padding: 16px;
    font-size: 12px;
    color: #666;
    margin-top: 20px;
}

/* 深色模式适配 */
@media (prefers-color-scheme: dark) {
    .icp-footer {
        color: #999;
    }
}
