/* ============================================================
   Flava Download — 样式表
   · 背景画布（fixed 全屏）
   · 顶部导航栏
   · 半透明白色圆角矩形背景（20% 透明度）
   · 下载卡片白色系 + 标题 rgb(190,200,255)
   · 下载弹窗样式
   ============================================================ */

/* ---------- Reset ---------- */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html, body {
    margin: 0 !important;
    padding: 0 !important;
    width: 100%;
    height: 100%;
}

body {
    font-family: 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
    background: #000;
    color: #ffffff;
    overflow: hidden;
    line-height: 1.6;
}

a { color: rgb(190, 200, 255); text-decoration: none; }
a:hover { color: #ffffff; }

/* ---------- 顶部导航栏 ---------- */
.top-navbar {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 42px;
    background: rgba(20, 20, 28, 0.82);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 9999;
    display: flex;
    align-items: center;
    padding-left: 20px;
    gap: 12px;
    border-bottom: 1px solid rgba(190, 200, 255, 0.2);
    margin: 0 !important;
}

.nav-text {
    color: #fff;
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: 1.5px;
    text-shadow: 0 0 10px rgba(190, 200, 255, 0.4);
}

/* ---------- 背景画布 ---------- */
.grid-canvas {
    position: fixed;
    top: 0; left: 0;
    width: 100vw; height: 100vh;
    z-index: 0;
    pointer-events: none;
}
.fire-canvas {
    position: fixed;
    top: 0; left: 0;
    width: 100vw; height: 100vh;
    z-index: 1;
    pointer-events: none;
}

/* ---------- 半透明白色圆角矩形背景 ---------- */
.content-bg {
    position: fixed;
    z-index: 5;
    top: 62px;
    left: 20px;
    right: 20px;
    bottom: 20px;
    background: rgba(255, 255, 255, 0.20);
    border-radius: 20px;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    border: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    pointer-events: none;
}

/* ---------- 内容滚动容器 ---------- */
.content-wrapper {
    position: fixed;
    z-index: 10;
    top: 67px;
    left: 25px;
    right: 25px;
    bottom: 25px;
    overflow-y: auto;
    overflow-x: hidden;
}

/* ---------- 主内容区 ---------- */
body .content-wrapper #app {
    position: relative;
    z-index: 1;
    padding: 40px 30px 30px 30px;
    max-width: 900px;
    margin: 0 auto;
}

/* ---------- 页面标题 ---------- */
.page-title {
    color: rgb(190, 200, 255);
    font-size: 2.2rem;
    font-weight: 700;
    text-shadow: 0 0 14px rgba(190, 200, 255, 0.35);
    margin-bottom: 8px;
    text-align: center;
}

.page-subtitle {
    color: rgba(255, 255, 255, 0.65);
    font-size: 1rem;
    text-align: center;
    margin-bottom: 36px;
}

/* ---------- 下载卡片 ---------- */
.download-section { margin-bottom: 32px; }

.download-section-title {
    color: rgb(190, 200, 255);
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 14px;
    padding-bottom: 6px;
    border-bottom: 1px solid rgba(190, 200, 255, 0.25);
}

.download-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(20, 20, 28, 0.55);
    border: 1px solid rgba(190, 200, 255, 0.18);
    border-radius: 12px;
    padding: 18px 22px;
    margin-bottom: 12px;
    transition: all 0.25s;
}
.download-card:hover {
    background: rgba(190, 200, 255, 0.08);
    border-color: rgba(190, 200, 255, 0.35);
    box-shadow: 0 4px 20px rgba(190, 200, 255, 0.1);
}

.download-info { display: flex; align-items: center; gap: 16px; }

.download-icon {
    width: 44px; height: 44px;
    border-radius: 10px;
    background: rgba(190, 200, 255, 0.12);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.4rem; flex-shrink: 0;
}

.download-text { display: flex; flex-direction: column; gap: 2px; }
.download-name { color: #ffffff; font-size: 1rem; font-weight: 600; }
.download-meta { color: rgba(255, 255, 255, 0.5); font-size: 0.82rem; }

/* ---------- 下载按钮（版本徽标） ---------- */
.download-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 22px;
    background: rgba(190, 200, 255, 0.15);
    border: 1px solid rgba(190, 200, 255, 0.35);
    border-radius: 8px;
    color: #ffffff;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s;
    white-space: nowrap;
    letter-spacing: 0.5px;
}
.download-btn:hover {
    background: rgba(190, 200, 255, 0.28);
    border-color: rgb(190, 200, 255);
    color: #ffffff;
    box-shadow: 0 0 16px rgba(190, 200, 255, 0.25);
    transform: translateY(-1px);
}

.download-btn[data-version] { position: relative; }
.download-btn[data-version]::after {
    content: 'v' attr(data-version);
    display: inline-block;
    margin-left: 6px;
    padding: 1px 6px;
    background: rgba(190, 200, 255, 0.2);
    border-radius: 4px;
    font-size: 0.72rem;
    font-weight: 500;
    color: rgb(190, 200, 255);
    letter-spacing: 0.3px;
}
.download-btn[data-version]:hover::after { background: rgba(190, 200, 255, 0.35); }

/* ---------- 提示信息 ---------- */
.notice-box {
    background: rgba(190, 200, 255, 0.06);
    border: 1px solid rgba(190, 200, 255, 0.2);
    border-radius: 10px;
    padding: 14px 20px;
    margin-top: 24px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.88rem;
    line-height: 1.8;
}
.notice-box strong { color: rgb(190, 200, 255); }

/* ---------- 返回主页按钮 ---------- */
.back-home {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 28px;
    color: rgb(190, 200, 255);
    font-size: 0.9rem;
    transition: color 0.2s;
}
.back-home:hover { color: #ffffff; }

/* ============================================================
   弹窗样式
   ============================================================ */
.dialog-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100vw; height: 100vh;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}
.dialog-overlay.active { opacity: 1; pointer-events: auto; }

.dialog-box {
    position: relative;
    width: 90%;
    max-width: 680px;
    max-height: 85vh;
    overflow-y: auto;
    background: rgba(28, 28, 40, 0.95);
    border: 1px solid rgba(190, 200, 255, 0.25);
    border-radius: 16px;
    padding: 32px 28px 28px 28px;
    box-shadow: 0 16px 64px rgba(0, 0, 0, 0.5), 0 0 32px rgba(190, 200, 255, 0.08);
    transform: translateY(20px) scale(0.97);
    transition: transform 0.3s ease;
}
.dialog-overlay.active .dialog-box { transform: translateY(0) scale(1); }

.dialog-close {
    position: absolute;
    top: 14px; right: 14px;
    width: 32px; height: 32px;
    border: none;
    background: rgba(190, 200, 255, 0.1);
    color: rgb(190, 200, 255);
    font-size: 1.1rem;
    border-radius: 8px;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: all 0.2s;
}
.dialog-close:hover { background: rgba(190, 200, 255, 0.25); color: #fff; }

.dialog-title {
    color: rgb(190, 200, 255);
    font-size: 1.5rem;
    font-weight: 700;
    text-shadow: 0 0 12px rgba(190, 200, 255, 0.3);
    margin-bottom: 6px;
}
.dialog-desc {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.88rem;
    margin-bottom: 22px;
    line-height: 1.7;
}

.dlg-section {
    margin-bottom: 22px;
    padding-bottom: 18px;
    border-bottom: 1px solid rgba(190, 200, 255, 0.12);
}
.dlg-section:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }

.dlg-section-title {
    color: rgb(190, 200, 255);
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 10px;
}

.dlg-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 9px 20px;
    background: rgba(190, 200, 255, 0.12);
    border: 1px solid rgba(190, 200, 255, 0.3);
    border-radius: 8px;
    color: #ffffff;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    letter-spacing: 0.3px;
    margin-right: 8px;
    margin-bottom: 6px;
}
.dlg-btn:hover:not(:disabled) {
    background: rgba(190, 200, 255, 0.22);
    border-color: rgb(190, 200, 255);
    box-shadow: 0 0 12px rgba(190, 200, 255, 0.2);
}
.dlg-btn:disabled { opacity: 0.4; cursor: not-allowed; }

.dlg-btn-row { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 10px; }

.dlg-progress-wrap {
    width: 100%;
    height: 10px;
    background: rgba(190, 200, 255, 0.08);
    border-radius: 5px;
    overflow: hidden;
    margin-top: 8px;
    border: 1px solid rgba(190, 200, 255, 0.15);
}
.dlg-progress-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, rgba(190,200,255,0.6), rgba(190,200,255,0.9));
    border-radius: 5px;
    transition: width 0.2s ease;
}
.dlg-progress-text { font-size: 0.78rem; color: rgba(255,255,255,0.5); margin-top: 6px; }

.dlg-textarea-wrap { position: relative; margin-top: 10px; }
.dlg-textarea {
    width: 100%;
    min-height: 90px;
    max-height: 160px;
    padding: 12px 14px;
    padding-right: 60px;
    background: rgba(20, 20, 28, 0.7);
    border: 1px solid rgba(190, 200, 255, 0.18);
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.78rem;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    line-height: 1.5;
    resize: vertical;
    word-break: break-all;
}
.dlg-textarea:focus { outline: none; border-color: rgba(190,200,255,0.45); box-shadow: 0 0 8px rgba(190,200,255,0.12); }
.dlg-textarea-readonly { user-select: none; -webkit-user-select: none; }
.dlg-textarea-readonly:focus { border-color: rgba(190,200,255,0.18); box-shadow: none; }

.dlg-copy-btn {
    position: absolute;
    top: 8px; right: 8px;
    padding: 5px 12px;
    background: rgba(190, 200, 255, 0.15);
    border: 1px solid rgba(190, 200, 255, 0.3);
    border-radius: 6px;
    color: #fff;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    z-index: 2;
}
.dlg-copy-btn:hover { background: rgba(190, 200, 255, 0.28); border-color: rgb(190, 200, 255); }
.dlg-copy-btn.copied { background: rgba(80,200,120,0.25); border-color: rgba(80,200,120,0.5); color: #a0f0c0; }

.dlg-tutorial-link {
    display: inline-block;
    margin-top: 8px;
    font-size: 0.8rem;
    color: rgba(190, 200, 255, 0.7);
    transition: color 0.2s;
}
.dlg-tutorial-link:hover { color: #ffffff; text-decoration: underline; }

/* ---------- 响应式 ---------- */
@media (max-width: 768px) {
    .content-bg { top: 56px; left: 12px; right: 12px; bottom: 12px; border-radius: 14px; }
    .content-wrapper { top: 61px; left: 17px; right: 17px; bottom: 17px; border-radius: 14px; }
    body .content-wrapper #app { padding: 24px 16px; }
    .page-title { font-size: 1.6rem; }
    .download-card { flex-direction: column; align-items: flex-start; gap: 14px; padding: 16px; }
    .download-btn { width: 100%; justify-content: center; }
    .dialog-box { padding: 28px 18px 20px 18px; }
    .dlg-btn { width: 100%; margin-right: 0; }
}

/* ---------- 滚动条美化 ---------- */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: rgba(0,0,0,0.3); }
::-webkit-scrollbar-thumb { background: rgba(190,200,255,0.25); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: rgba(190,200,255,0.45); }

/* ---------- 隐藏 docsify 残留 ---------- */
.sidebar-toggle { display: none !important; }
body { padding-top: 0 !important; }
