:root {
    --primary: #007AFF;
    --primary-hover: #0056cc;
    --bg: #f5f5f7;
    --card: #ffffff;
    --text: #1d1d1f;
    --text-secondary: #86868b;
    --border: #e5e5ea;
    --radius: 12px;
    --shadow: 0 2px 12px rgba(0,0,0,.06);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

.container {
    max-width: 720px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 导航栏 */
.navbar {
    background: rgba(255,255,255,.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
}
.navbar .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 56px;
}
.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    font-size: 18px;
    font-weight: 700;
    color: var(--text);
}
.lang-switch select {
    padding: 6px 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--card);
    font-size: 14px;
    outline: none;
    cursor: pointer;
}

/* Hero */
.hero {
    text-align: center;
    padding: 48px 0 32px;
}
.hero-icon { margin-bottom: 20px; }
.hero h1 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 8px;
    background: linear-gradient(135deg, #007AFF, #5856D6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.hero-subtitle {
    font-size: 18px;
    color: var(--text-secondary);
    margin-bottom: 16px;
}
.hero-tagline {
    font-size: 14px;
    color: var(--text-secondary);
}

/* 按钮 */
.actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 0 0 32px;
}
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: all .2s;
    text-decoration: none;
}
.btn-lg {
    padding: 16px 24px;
    font-size: 17px;
}
.btn-sm {
    padding: 8px 16px;
    font-size: 14px;
}
.btn-primary {
    background: var(--primary);
    color: #fff;
}
.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(0,122,255,.3);
}
.btn-outline {
    background: var(--card);
    color: var(--primary);
    border: 2px solid var(--primary);
}
.btn-outline:hover {
    background: #f0f7ff;
}

/* 结果区 */
.result-section {
    background: var(--card);
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow);
    margin-bottom: 24px;
}
.result-section h3 {
    font-size: 18px;
    margin-bottom: 16px;
    color: var(--text);
}
.result-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
}
.result-item:last-child { border-bottom: none; }
.result-label {
    font-size: 14px;
    color: var(--text-secondary);
}
.result-value {
    font-size: 14px;
    font-weight: 500;
    word-break: break-all;
    text-align: right;
    max-width: 60%;
}
.result-value code {
    background: #f0f0f5;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
}
.result-actions {
    margin-top: 16px;
    display: flex;
    gap: 8px;
}

/* 协助面板 */
.help-panel {
    background: var(--card);
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow);
    margin-bottom: 24px;
}
.help-panel h2 {
    font-size: 20px;
    margin-bottom: 8px;
}
.help-panel > p {
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 20px;
}
.share-url-container {
    display: flex;
    gap: 8px;
}
.share-url-container input {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 14px;
    background: #f8f8fa;
}
.qr-container {
    margin-top: 20px;
    display: flex;
    justify-content: center;
}
.qr-container canvas, .qr-container img {
    border-radius: 8px;
}
.devices-list {
    margin-top: 20px;
}
.device-item {
    background: #f8f8fa;
    border-radius: 8px;
    padding: 14px;
    margin-bottom: 8px;
}
.device-item code {
    display: block;
    font-size: 12px;
    color: var(--primary);
    margin-bottom: 4px;
    word-break: break-all;
}
.device-item .meta {
    font-size: 12px;
    color: var(--text-secondary);
}

/* 步骤 */
.steps {
    padding: 32px 0;
}
.steps h2 {
    text-align: center;
    font-size: 22px;
    margin-bottom: 24px;
}
.steps-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}
.step-card {
    background: var(--card);
    border-radius: var(--radius);
    padding: 24px 16px;
    text-align: center;
    box-shadow: var(--shadow);
    position: relative;
}
.step-number {
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 24px;
    height: 24px;
    background: var(--primary);
    color: #fff;
    border-radius: 50%;
    font-size: 12px;
    font-weight: 700;
    line-height: 24px;
}
.step-icon { font-size: 32px; margin-bottom: 10px; }
.step-card h3 { font-size: 15px; margin-bottom: 4px; }
.step-card p { font-size: 13px; color: var(--text-secondary); }

/* FAQ */
.faq {
    padding: 32px 0 48px;
}
.faq h2 {
    text-align: center;
    font-size: 22px;
    margin-bottom: 24px;
}
.faq-item {
    background: var(--card);
    border-radius: var(--radius);
    padding: 20px 24px;
    margin-bottom: 12px;
    box-shadow: var(--shadow);
}
.faq-item h3 {
    font-size: 16px;
    margin-bottom: 8px;
}
.faq-item p {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.7;
}

/* 页脚 */
.footer {
    text-align: center;
    padding: 32px 0;
    color: var(--text-secondary);
    font-size: 13px;
    border-top: 1px solid var(--border);
}
.copyright { margin-top: 8px; }

/* Loading */
.loading-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.4);
    backdrop-filter: blur(4px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 999;
}
.loading-overlay p {
    color: #fff;
    margin-top: 16px;
    font-size: 15px;
}
.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255,255,255,.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Toast */
.toast {
    position: fixed;
    top: 80px;
    left: 50%;
    transform: translateX(-50%);
    background: #333;
    color: #fff;
    padding: 12px 24px;
    border-radius: 20px;
    font-size: 14px;
    z-index: 1000;
    transition: opacity .3s;
}

/* 工具类 */
.hidden { display: none !important; }

/* 响应式 */
@media (max-width: 640px) {
    .steps-grid {
        grid-template-columns: 1fr;
    }
    .hero h1 { font-size: 24px; }
    .hero-subtitle { font-size: 16px; }
}
