/* ==================== ofoNET 首页专用样式 ==================== */

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

html {
    line-height: 1.5;
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

body {
    background-color: #f5f5f7;
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "PingFang SC", "Helvetica Neue", sans-serif;
    color: #1d1d1f;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    width: 100%;
    overflow-x: hidden;
    margin: 0;
    line-height: inherit;
}

a, button {
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
}

button {
    border: none;
    background: none;
    cursor: pointer;
    font: inherit;
}

a {
    color: inherit;
    text-decoration: none;
    display: inline-block;
}

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

svg {
    display: block;
}

/* ==================== 布局工具类 ==================== */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }

.min-h-screen { min-height: 100vh; }
.w-full { width: 100%; }
.w-4 { width: 1rem; }
.w-5 { width: 1.25rem; }
.w-8 { width: 2rem; }
.w-16 { width: 4rem; }
.h-4 { height: 1rem; }
.h-5 { height: 1.25rem; }
.h-8 { height: 2rem; }
.h-16 { height: 4rem; }

.max-w-\[360px\] { max-width: 360px; }
.max-w-\[400px\] { max-width: 400px; }

/* ==================== 间距 ==================== */
.p-4 { padding: 1rem; }
.p-5 { padding: 1.25rem; }
.p-6 { padding: 1.5rem; }
.px-1 { padding-left: 0.25rem; padding-right: 0.25rem; }
.px-2 { padding-left: 0.5rem; padding-right: 0.5rem; }
.px-4 { padding-left: 1rem; padding-right: 1rem; }
.py-0\.5 { padding-top: 0.125rem; padding-bottom: 0.125rem; }
.py-4 { padding-top: 1rem; padding-bottom: 1rem; }
.pt-12 { padding-top: 3rem; }

.m-0 { margin: 0; }
.mx-auto { margin-left: auto; margin-right: auto; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 0.75rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-5 { margin-bottom: 1.25rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-8 { margin-bottom: 2rem; }
.mb-10 { margin-bottom: 2.5rem; }
.mt-12 { margin-top: 3rem; }
.ml-1\.5 { margin-left: 0.375rem; }

.gap-1\.5 { gap: 0.375rem; }
.gap-2\.5 { gap: 0.625rem; }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }
.gap-x-3 { column-gap: 0.75rem; }

/* ==================== 文字 ==================== */
.text-center { text-align: center; }
.text-\[9px\] { font-size: 9px; }
.text-\[12px\] { font-size: 12px; }
.text-\[13px\] { font-size: 13px; }
.text-\[14px\] { font-size: 14px; }
.text-\[15px\] { font-size: 15px; }
.text-\[16px\] { font-size: 16px; }
.text-lg { font-size: 1.125rem; line-height: 1.75rem; }
.text-xl { font-size: 1.25rem; line-height: 1.75rem; }
.text-3xl { font-size: 1.875rem; line-height: 2.25rem; }
.text-4xl { font-size: 2.25rem; line-height: 2.5rem; }

.block { display: block; }

.font-light { font-weight: 300; }
.font-medium { font-weight: 500; }
.font-bold { font-weight: 700; }
.font-black { font-weight: 900; }

.italic { font-style: italic; }
.uppercase { text-transform: uppercase; }
.tracking-tight { letter-spacing: -0.025em; }
.tracking-tighter { letter-spacing: -0.05em; }
.tracking-wide { letter-spacing: 0.025em; }
.tracking-wider { letter-spacing: 0.05em; }
.tracking-\[0\.2em\] { letter-spacing: 0.2em; }

.leading-\[1\.6\] { line-height: 1.6; }
.leading-relaxed { line-height: 1.625; }

/* ==================== 颜色 ==================== */
.text-white { color: #ffffff; }
.text-gray-300 { color: #d1d5db; }
.text-gray-400 { color: #9ca3af; }
.text-gray-500 { color: #6b7280; }
.text-gray-800 { color: #1f2937; }
.text-\[\#1d1d1f\] { color: #1d1d1f; }
.text-\[\#86868b\] { color: #86868b; }
.text-\[\#007aff\] { color: #007aff; }
.text-green-600 { color: #16a34a; }
.text-transparent { color: transparent; }

.bg-white { background-color: #ffffff; }
.bg-gray-50 { background-color: #f9fafb; }
.bg-gray-100 { background-color: #f3f4f6; }
.bg-gray-200 { background-color: #e5e7eb; }
.bg-green-50 { background-color: #f0fdf4; }
.bg-green-500 { background-color: #22c55e; }
.bg-\[\#007aff\] { background-color: #007aff; }

/* 渐变 */
.bg-gradient-to-b { background-image: linear-gradient(to bottom, var(--tw-gradient-stops)); }
.from-gray-900 { --tw-gradient-from: #111827; --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to, rgba(17, 24, 39, 0)); }
.to-gray-600 { --tw-gradient-to: #4b5563; }
.bg-clip-text { -webkit-background-clip: text; background-clip: text; }

/* ==================== 边框 ==================== */
.border { border-width: 1px; }
.border-gray-50 { border-color: #f9fafb; }
.border-gray-100 { border-color: #f3f4f6; }

.rounded-sm { border-radius: 0.125rem; }
.rounded-xl { border-radius: 0.75rem; }
.rounded-2xl { border-radius: 1rem; }
.rounded-full { border-radius: 9999px; }
.rounded-\[20px\] { border-radius: 20px; }
.rounded-\[24px\] { border-radius: 24px; }
.rounded-\[32px\] { border-radius: 32px; }
.rounded-\[28px_28px_0_0\] { border-radius: 28px 28px 0 0; }

/* ==================== 阴影 ==================== */
.shadow-lg { box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05); }
.shadow-blue-500\/25 { --tw-shadow-color: rgba(59, 130, 246, 0.25); }

/* ==================== 动画 ==================== */
.animate-pulse { 
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: .5; }
}

/* ==================== 过渡 ==================== */
.transition-all { 
    transition-property: all;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 150ms;
}

.transition-colors {
    transition-property: color, background-color, border-color;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 150ms;
}

.transition-transform {
    transition-property: transform;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 150ms;
}

/* Transform */
.origin-top { transform-origin: top; }
.scale-\[0\.98\] { transform: scale(0.98); }

/* ==================== 其他工具类 ==================== */
.relative { position: relative; }
.absolute { position: absolute; }
.fixed { position: fixed; }
.inset-0 { top: 0; right: 0; bottom: 0; left: 0; }
.top-5 { top: 1.25rem; }
.right-5 { right: 1.25rem; }

.z-20 { z-index: 20; }

.object-contain { object-fit: contain; }
.outline-none { outline: 2px solid transparent; outline-offset: 2px; }

.pointer-events-none { pointer-events: none; }
.pointer-events-auto { pointer-events: auto; }

.opacity-0 { opacity: 0; }

.will-change-transform { will-change: transform; }

.space-y-4 > :not([hidden]) ~ :not([hidden]) { margin-top: 1rem; }

.group:hover .group-hover\:translate-x-1 {
    transform: translateX(0.25rem);
}

/* ==================== 响应式 ==================== */
@media (min-width: 640px) {
    .sm\:max-w-\[480px\] { max-width: 480px; }
    .sm\:scale-\[1\.05\] { transform: scale(1.05); }
    .sm\:pt-20 { padding-top: 5rem; }
    .sm\:p-6 { padding: 1.5rem; }
    .sm\:p-8 { padding: 2rem; }
    .sm\:gap-4 { gap: 1rem; }
    .sm\:text-\[13px\] { font-size: 13px; }
    .sm\:text-\[15px\] { font-size: 15px; }
    .sm\:text-lg { font-size: 1.125rem; line-height: 1.75rem; }
    .sm\:text-5xl { font-size: 3rem; line-height: 1; }
    .sm\:hidden { display: none; }
}

/* ==================== 首页专用卡片样式 ==================== */
.apple-card {
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 4px 24px rgba(0,0,0,0.04);
}

/* ==================== 系统图标卡片 ==================== */
.system-item {
    background: #ffffff;
    display: flex;
    flex-direction: column;
    align-items: center; 
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: center;
    color: #1d1d1f;
}

@media (hover: hover) {
    .system-item:hover {
        transform: translateY(-2px);
        box-shadow: 0 8px 16px rgba(0,0,0,0.06);
    }
}

.system-item:active { 
    transform: scale(0.96); 
}

.grad-icon {
    width: 44px; 
    height: 44px; 
    border-radius: 13px;
    margin-bottom: 12px; 
    display: flex; 
    align-items: center; 
    justify-content: center;
    color: white;
    flex-shrink: 0;
}

.grad-icon svg { 
    width: 22px; 
    height: 22px; 
    fill: currentColor; 
}

@media (min-width: 640px) {
    .grad-icon { width: 50px; height: 50px; }
    .grad-icon svg { width: 24px; height: 24px; }
}

.grad-android { background: linear-gradient(135deg, #32DE84, #1DB954); }
.grad-windows { background: linear-gradient(135deg, #00A4EF, #0078D4); }
.grad-macos   { background: linear-gradient(135deg, #5e5e5e, #1d1d1f); }
.grad-ios     { background: linear-gradient(135deg, #AF52DE, #5856D6); }

/* ==================== 网格布局 ==================== */
.grid { display: grid; }
.grid-cols-2 { 
    grid-template-columns: repeat(2, minmax(0, 1fr)); 
}

/* ==================== 模态框按钮 ==================== */
.modal-btn-primary {
    display: block;
    width: 100%;
    padding: 0.625rem 0;
    border-radius: 0.5rem;
    background-color: #007aff;
    color: white;
    font-weight: 700;
    font-size: 0.75rem;
    text-align: center;
    transition: background-color 0.15s ease;
    text-decoration: none;
    cursor: pointer;
}

.modal-btn-primary:hover {
    background-color: #2563eb;
}

.modal-btn-secondary {
    display: block;
    width: 100%;
    padding: 0.625rem 0;
    border-radius: 0.5rem;
    background-color: white;
    border: 1px solid #e5e7eb;
    color: #9ca3af;
    font-weight: 500;
    font-size: 0.75rem;
    text-align: center;
    transition: all 0.15s ease;
    text-decoration: none;
    cursor: pointer;
}

.modal-btn-secondary:hover {
    color: #4b5563;
    border-color: #d1d5db;
}

.modal-btn-repair {
    display: block;
    padding: 0.5rem 0;
    border-radius: 0.5rem;
    background-color: #e5e5e7;
    color: #555;
    font-weight: 700;
    font-size: 0.6875rem;
    text-align: center;
    transition: background-color 0.15s ease;
    text-decoration: none;
    cursor: pointer;
}

.modal-btn-repair:hover {
    background-color: #d1d5db;
}

.modal-btn-repair-alt {
    display: block;
    padding: 0.5rem 0;
    border-radius: 0.5rem;
    background-color: white;
    border: 1px solid #e5e7eb;
    color: #9ca3af;
    font-weight: 500;
    font-size: 0.6875rem;
    text-align: center;
    transition: all 0.15s ease;
    text-decoration: none;
    cursor: pointer;
}

.modal-btn-repair-alt:hover {
    color: #4b5563;
    border-color: #d1d5db;
}

.version-card {
    background: white;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    transition: all 0.2s ease;
}

.version-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transform: translateY(-1px);
}

/* ==================== 修复工具卡片 ==================== */
.repair-card {
    background-color: #fffaf0;
    background-image: linear-gradient(to bottom, rgba(255, 247, 237, 0.5), rgba(254, 243, 199, 0.3));
    border: 2px dashed #fed7aa !important;
    padding: 1.5rem !important;
    margin: 1.5rem 0 !important;
    border-radius: 20px;
    box-shadow: 0 1px 2px rgba(251, 146, 60, 0.1);
    color: #1d1d1f !important;
    position: relative;
    z-index: 1;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.repair-card h3,
.repair-card .repair-title {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    color: #1d1d1f !important;
    margin-bottom: 8px !important;
    line-height: 1.4 !important;
}

.repair-card p,
.repair-card .repair-desc {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    font-size: 12px !important;
    color: #86868b !important;
    margin-bottom: 12px !important;
    line-height: 1.5 !important;
}

/* ==================== 模态框 ==================== */
.modal-overlay {
    opacity: 0; 
    pointer-events: none;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    background: rgba(0, 0, 0, 0.4);
    z-index: 100;
    display: flex;
    justify-content: center;
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
}

.modal-overlay.show { 
    opacity: 1; 
    pointer-events: auto; 
    backdrop-filter: blur(15px); 
    -webkit-backdrop-filter: blur(15px); 
}

.modal-content {
    will-change: transform;
    background: white;
    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.1);
}

/* 手机端抽屉样式 */
@media (max-width: 639px) {
    .modal-overlay { 
        align-items: flex-end; 
        padding: 0; 
    } 
    .modal-content {
        width: calc(100% - 24px);
        border-radius: 28px 28px 0 0;
        transform: translateY(110%);
        transition: transform 0.4s cubic-bezier(0.2, 1, 0.2, 1);
        padding-bottom: calc(30px + env(safe-area-inset-bottom));
        margin-bottom: 0;
        margin-left: 12px;
        margin-right: 12px;
    }
    .modal-overlay.show .modal-content { 
        transform: translateY(0); 
    }
    .modal-content button.absolute { 
        top: 12px; 
        right: 16px; 
    }
}

/* 电脑端弹窗样式 */
@media (min-width: 640px) {
    .modal-overlay { 
        align-items: center; 
        padding: 24px; 
    }
    .modal-content {
        width: 100%;
        max-width: 400px;
        border-radius: 32px;
        transform: scale(0.9);
        transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
        opacity: 0;
    }
    .modal-overlay.show .modal-content { 
        transform: scale(1); 
        opacity: 1; 
    }
}

.drag-handle-area {
    width: 100%;
    height: 30px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: grab;
}

.drag-handle-bar {
    width: 36px;
    height: 5px;
    background: #e5e5e7;
    border-radius: 10px;
}

/* ==================== 页脚链接 ==================== */
.footer-link-group {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 16px;
    margin-bottom: 24px;
}

.footer-link-group a {
    color: #d2d2d7;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.2s;
}

.footer-link-group a:hover {
    color: #007aff;
}

/* ==================== Hover 效果 ==================== */
@media (hover: hover) {
    .hover\:text-\[\#007aff\]:hover {
        color: #007aff;
    }
    .hover\:bg-gray-200:hover {
        background-color: #e5e7eb;
    }
}

/* Active 效果 */
.active\:scale-\[0\.98\]:active {
    transform: scale(0.98);
}

/* ==================== 无障碍优化 ==================== */
button:focus-visible,
a:focus-visible {
    outline: 2px solid rgba(0, 122, 255, 0.6);
    outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}

/* ==================== 兼容性降级 ==================== */
@supports (not (backdrop-filter: blur(20px))) and (not (-webkit-backdrop-filter: blur(20px))) {
    .apple-card {
        background: rgba(255, 255, 255, 0.95);
        box-shadow: 0 2px 16px rgba(0,0,0,0.08);
    }
    
    .modal-overlay.show {
        background: rgba(0, 0, 0, 0.6);
    }
}

.flex-\[2\.5\] { flex: 2.5 1 0%; }