/* 🌍 字体引入 */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Outfit:wght@500;600;800&display=swap');

:root {
    --bg-primary: #0B0F19;
    --card-bg: rgba(17, 24, 39, 0.75);
    --border-color: rgba(255, 255, 255, 0.08);
    --accent-blue: #38BDF8;
    --accent-purple: #818CF8;
    --accent-emerald: #34D399;
    --text-main: #F1F5F9;
    --text-muted: #94A3B8;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-primary);
    background-image: 
        radial-gradient(at 0% 0%, rgba(56, 189, 248, 0.12) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(129, 140, 248, 0.12) 0px, transparent 50%);
    color: var(--text-main);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow-x: hidden;
    padding: 2.5rem 1rem;
}

/* 🪐 毛玻璃科技大卡片 */
.glass-container {
    width: 100%;
    max-width: 760px;
    background: var(--card-bg);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    padding: 3rem 2.5rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.6);
    position: relative;
    text-align: center;
    animation: fadeIn 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

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

/* ✨ 卡片上方渐变光晕饰条 */
.glow-bar {
    position: absolute;
    top: 0;
    left: 8%;
    right: 8%;
    height: 3px;
    border-radius: 3px;
    background: linear-gradient(90deg, transparent, var(--accent-blue), var(--accent-purple), transparent);
}

header {
    margin-bottom: 2rem;
}

.logo-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(56, 189, 248, 0.1);
    border: 1px solid rgba(56, 189, 248, 0.25);
    border-radius: 9999px;
    padding: 0.4rem 1.1rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--accent-blue);
    margin-bottom: 1rem;
}

.pulsing-dot {
    width: 7px;
    height: 7px;
    background-color: var(--accent-blue);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--accent-blue);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(56, 189, 248, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 8px rgba(56, 189, 248, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(56, 189, 248, 0); }
}

h1 {
    font-family: 'Outfit', sans-serif;
    font-size: 2.25rem;
    font-weight: 800;
    background: linear-gradient(135deg, #FFFFFF 30%, #A5B4FC 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.03em;
    margin-bottom: 0.6rem;
}

.subtitle {
    font-size: 0.98rem;
    color: var(--text-muted);
    line-height: 1.6;
    max-width: 600px;
    margin: 0 auto;
}

/* 📖 小白专属步骤说明区 */
.steps-section {
    margin-bottom: 2.5rem;
    text-align: left;
}

.section-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.2rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.section-title svg {
    color: var(--accent-blue);
}

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

.step-card {
    background: rgba(255, 255, 255, 0.025);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 16px;
    padding: 1.25rem;
    position: relative;
    transition: all 0.3s ease;
}

.step-card:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(56, 189, 248, 0.2);
    transform: translateY(-2px);
}

.step-card.highlight {
    background: rgba(129, 140, 248, 0.05);
    border-color: rgba(129, 140, 248, 0.25);
}

.step-number {
    position: absolute;
    top: 1rem;
    right: 1.1rem;
    font-family: 'Outfit', sans-serif;
    font-size: 1.3rem;
    font-weight: 800;
    color: rgba(255, 255, 255, 0.12);
}

.step-card.highlight .step-number {
    color: rgba(129, 140, 248, 0.3);
}

.step-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: rgba(56, 189, 248, 0.1);
    color: var(--accent-blue);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.8rem;
}

.step-card.highlight .step-icon {
    background: rgba(129, 140, 248, 0.15);
    color: var(--accent-purple);
}

.step-card h3 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 0.4rem;
}

.step-card p {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.5;
}

.step-card p b {
    color: #FFFFFF;
}

/* ⌨️ 仿真键盘按键 kbd */
kbd {
    display: inline-block;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-bottom-width: 2px;
    border-radius: 4px;
    padding: 1px 5px;
    font-family: inherit;
    font-size: 0.78rem;
    font-weight: 600;
    color: #FFFFFF;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* 🚀 霓虹拖拽书签按钮区 */
.bookmark-action-area {
    background: rgba(255, 255, 255, 0.02);
    border: 1px dashed rgba(56, 189, 248, 0.25);
    border-radius: 20px;
    padding: 2.2rem 1.5rem 1.8rem 1.5rem;
    margin-bottom: 2rem;
    position: relative;
}

.drag-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: #0B0F19;
    border: 1px solid rgba(56, 189, 248, 0.3);
    color: var(--accent-blue);
    padding: 2px 14px;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 600;
}

/* 巨型按钮本身 (拖动对象) */
.btn-drag-bookmarklet {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-purple));
    color: #FFFFFF !important;
    text-decoration: none !important;
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    font-size: 1.15rem;
    padding: 1.1rem 2.2rem;
    border-radius: 14px;
    cursor: grab;
    user-select: none;
    box-shadow: 0 10px 25px -5px rgba(56, 189, 248, 0.4);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    border: 1px solid rgba(255, 255, 255, 0.25);
}

.btn-drag-bookmarklet:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 20px 35px -5px rgba(129, 140, 248, 0.6);
}

.btn-drag-bookmarklet:active {
    cursor: grabbing;
    transform: translateY(-1px);
}

.btn-drag-bookmarklet svg {
    transition: transform 0.2s ease;
}

.btn-drag-bookmarklet:hover svg {
    transform: rotate(-10deg) translate(-2px, -2px);
}

.drag-instruction {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1.2rem;
    font-size: 0.9rem;
    color: var(--accent-blue);
    font-weight: 500;
    opacity: 0.9;
}

/* 📖 拖动轨迹手势线框动画演示 */
.drag-demo-track {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 1.2rem;
    opacity: 0.7;
}

.drag-hand {
    animation: hoverMove 2.5s infinite ease-in-out;
}

@keyframes hoverMove {
    0% { transform: translateY(0); }
    50% { transform: translateY(-15px) translateX(-5px); }
    100% { transform: translateY(0); }
}

/* ℹ️ 常用快捷键看板 */
.key-tips {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    width: 100%;
    margin-bottom: 2rem;
}

.k-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 0.85rem 1rem;
    font-size: 0.85rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.k-card b {
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.1);
    border-bottom: 2px solid rgba(255, 255, 255, 0.2);
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.82rem;
}

/* 🏷️ 第三选项页 (移动端/备用复制代码) */
.copy-container {
    border-top: 1px solid var(--border-color);
    padding-top: 2rem;
}

.or-divider {
    font-size: 0.82rem;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.or-divider::before, .or-divider::after {
    content: '';
    display: block;
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
    flex-grow: 1;
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: transparent;
    color: var(--text-main);
    border: 1px solid rgba(255, 255, 255, 0.18);
    padding: 0.8rem 1.8rem;
    border-radius: 12px;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 600;
    transition: all 0.2s ease;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.35);
}

/* 💡 备用手动指南卡片 */
.manual-guide {
    margin-top: 1.5rem;
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 14px;
    padding: 1.2rem;
    text-align: left;
}

.guide-title {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--accent-emerald);
    margin-bottom: 0.6rem;
}

.guide-list {
    margin-left: 1.2rem;
    font-size: 0.83rem;
    color: var(--text-muted);
    line-height: 1.7;
}

.guide-list li b {
    color: var(--text-main);
}

.guide-list mark {
    background: rgba(52, 211, 153, 0.15);
    color: var(--accent-emerald);
    padding: 1px 6px;
    border-radius: 4px;
    font-weight: 500;
}

/* 🔔 动态浮现式 Toast */
#toast-alert {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: rgba(16, 185, 129, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    color: #FFFFFF;
    padding: 0.8rem 1.6rem;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.9rem;
    z-index: 10000;
    pointer-events: none;
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

#toast-alert.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* 📱 移动端自适应适配 */
@media (max-width: 640px) {
    .glass-container {
        padding: 2rem 1.25rem;
    }

    h1 {
        font-size: 1.75rem;
    }

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

    .key-tips {
        grid-template-columns: 1fr;
    }

    .btn-drag-bookmarklet {
        font-size: 1rem;
        padding: 0.9rem 1.4rem;
        width: 100%;
        justify-content: center;
    }
}
