/* ============================================================
   爱坤下载站 - 公共基础样式（所有页面共用）
   包含：全局重置/背景/导航栏/布局/玻璃窗口/按钮/表单/Toast/响应式
   ============================================================ */

/* ============================================================
   爱坤下载站 - 公共样式表
   Aero 复古风格 · 模块化
   ============================================================ */

/* ===== 全局重置 ===== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html, body { height: 100%; }
body {
    font-family: "Segoe UI", "Microsoft YaHei", Tahoma, sans-serif;
    font-size: 13px;
    color: #fff;
    /* Vista 经典深蓝渐变背景 */
    background: linear-gradient(180deg,
        #0a1628 0%,
        #122848 25%,
        #1a3a63 50%,
        #1e4a7a 75%,
        #16305a 100%);
    background-attachment: fixed;
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}
/* 背景光束效果 */
body::before {
    content: '';
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background:
        radial-gradient(ellipse 600px 400px at 75% 15%, rgba(80,160,255,0.18) 0%, transparent 70%),
        radial-gradient(ellipse 500px 500px at 20% 80%, rgba(40,100,180,0.15) 0%, transparent 70%),
        radial-gradient(ellipse 300px 600px at 90% 60%, rgba(60,140,220,0.1) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}
/* 顶部微光条 */
body::after {
    content: '';
    position: fixed;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(150,200,255,0.5), transparent);
    pointer-events: none;
    z-index: 0;
}

/* ===== 左上角大头像（背景装饰） ===== */
.hero-avatar {
    position: fixed;
    top: 60px;
    left: -20px;
    width: 480px;
    height: 480px;
    opacity: 0.30;
    z-index: 0;
    pointer-events: none;
    -webkit-mask-image: radial-gradient(ellipse 60% 60% at 40% 40%, black 30%, transparent 75%);
    mask-image: radial-gradient(ellipse 60% 60% at 40% 40%, black 30%, transparent 75%);
    filter: drop-shadow(0 0 40px rgba(80,160,255,0.3));
}
.hero-avatar img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* ============================================================
   Aero 玻璃导航栏
   ============================================================ */
.nav-wrap { position: relative; z-index: 10; }
.aero-navbar {
    position: relative;
    display: flex;
    align-items: stretch;
    justify-content: center;
    padding: 0 8px;
    min-height: 44px;
    background: linear-gradient(180deg,
        rgba(100,150,210,0.55) 0%,
        rgba(60,110,180,0.45) 45%,
        rgba(40,80,150,0.5) 50%,
        rgba(50,95,165,0.5) 100%);
    backdrop-filter: blur(24px) saturate(160%);
    -webkit-backdrop-filter: blur(24px) saturate(160%);
    border-bottom: 1px solid rgba(150,200,255,0.35);
    box-shadow:
        0 1px 0 rgba(255,255,255,0.25) inset,
        0 -1px 0 rgba(0,0,0,0.3) inset,
        0 4px 20px rgba(0,0,0,0.4);
}
.aero-navbar::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 50%;
    background: linear-gradient(180deg, rgba(255,255,255,0.2) 0%, transparent 100%);
    pointer-events: none;
}
.nav-item {
    position: relative;
    display: flex;
    align-items: center;
    padding: 0 22px;
    font-size: 13px;
    font-weight: 500;
    color: #e8f2ff;
    text-decoration: none;
    cursor: pointer;
    text-shadow: 0 1px 2px rgba(0,0,0,0.6);
    transition: all 0.2s ease;
    z-index: 1;
    white-space: nowrap;
    border-left: 1px solid rgba(255,255,255,0.08);
    border-right: 1px solid rgba(0,0,0,0.1);
}
.nav-item:first-child { border-left: none; }
.nav-item:last-child { border-right: none; }
.nav-item:hover {
    background: linear-gradient(180deg,
        rgba(150,200,255,0.35) 0%,
        rgba(100,160,230,0.3) 50%,
        rgba(80,140,210,0.35) 100%);
    color: #fff;
    box-shadow: 0 0 12px rgba(100,170,255,0.3) inset;
}
.nav-item.active {
    background: linear-gradient(180deg,
        rgba(180,220,255,0.4) 0%,
        rgba(120,180,240,0.35) 50%,
        rgba(90,150,220,0.4) 100%);
    color: #fff;
    box-shadow:
        0 0 15px rgba(100,170,255,0.4) inset,
        0 2px 8px rgba(0,0,0,0.3);
}

/* ============================================================
   主体内容
   ============================================================ */
.main {
    position: relative;
    z-index: 5;
    max-width: 900px;
    margin: 0 auto;
    padding: 32px 20px 60px;
}
.main.detail { max-width: 860px; padding: 24px 20px 60px; }

/* ============================================================
   Aero 玻璃窗口
   ============================================================ */
.aero-window {
    position: relative;
    border-radius: 6px 6px 0 0;
    overflow: hidden;
    background: linear-gradient(180deg,
        rgba(30,60,110,0.75) 0%,
        rgba(20,45,85,0.8) 100%);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(120,170,230,0.4);
    box-shadow:
        0 0 0 1px rgba(0,0,0,0.4),
        0 10px 40px rgba(0,0,0,0.5),
        0 1px 0 rgba(255,255,255,0.15) inset;
}
/* 窗口标题栏 */
.aero-titlebar {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 14px;
    min-height: 32px;
    background: linear-gradient(180deg,
        rgba(100,155,215,0.6) 0%,
        rgba(60,110,180,0.55) 45%,
        rgba(45,85,155,0.6) 50%,
        rgba(55,100,170,0.6) 100%);
    border-bottom: 1px solid rgba(150,200,255,0.25);
    box-shadow: 0 1px 0 rgba(255,255,255,0.2) inset;
}
.aero-titlebar::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 16px;
    background: linear-gradient(180deg, rgba(255,255,255,0.15) 0%, transparent 100%);
    pointer-events: none;
}
.titlebar-icon {
    width: 18px; height: 18px;
    flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
}
.titlebar-icon svg { width: 16px; height: 16px; }
.titlebar-text {
    font-size: 12.5px;
    font-weight: 600;
    color: #fff;
    text-shadow: 0 1px 2px rgba(0,0,0,0.6);
    letter-spacing: 0.5px;
}
.titlebar-count {
    margin-left: auto;
    font-size: 11px;
    color: rgba(220,235,255,0.7);
    text-shadow: 0 1px 1px rgba(0,0,0,0.5);
}
/* 窗口控制按钮 */
.titlebar-controls {
    display: flex;
    gap: 4px;
    margin-left: 8px;
}
.ctrl-btn {
    width: 22px; height: 20px;
    border-radius: 3px;
    display: flex; align-items: center; justify-content: center;
    background: linear-gradient(180deg, rgba(180,210,245,0.4), rgba(120,160,210,0.35));
    border: 1px solid rgba(150,190,240,0.3);
    box-shadow: 0 1px 0 rgba(255,255,255,0.2) inset;
    cursor: default;
}
.ctrl-btn svg { width: 10px; height: 10px; }
.ctrl-btn.close {
    background: linear-gradient(180deg, rgba(230,100,100,0.6), rgba(180,50,50,0.55));
    border-color: rgba(255,120,120,0.4);
}
/* 窗口内容区 */
.aero-content { padding: 12px; }
.aero-content.detail { padding: 24px; }

/* 空状态 / 加载中 */
.empty-state, .loading {
    text-align: center;
    padding: 50px 20px;
    color: rgba(180,205,240,0.6);
}
.empty-state svg { width: 48px; height: 48px; margin-bottom: 14px; opacity: 0.5; }
.empty-state p { font-size: 13px; line-height: 1.8; }
.loading { font-size: 13px; }
.loading::after {
    content: '';
    display: inline-block;
    width: 16px; height: 16px;
    margin-left: 10px;
    border: 2px solid rgba(150,200,255,0.3);
    border-top-color: #7ab8f5;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    vertical-align: middle;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ============================================================
   详情页 - 面包屑
   ============================================================ */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: rgba(180,205,240,0.7);
    margin-bottom: 16px;
    text-shadow: 0 1px 1px rgba(0,0,0,0.5);
}
.breadcrumb a { color: #8ab8f0; text-decoration: none; }
.breadcrumb a:hover { color: #b0d4ff; text-decoration: underline; }
.breadcrumb .sep { color: rgba(140,170,210,0.4); }
.breadcrumb .current { color: #d0e4ff; font-weight: 500; }

/* ============================================================
   详情页 - 下载按钮
   ============================================================ */
.download-area {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}
.btn-download {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 32px;
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
    cursor: pointer;
    border: 1px solid #2a60a0;
    background: linear-gradient(180deg, #6ab0f0 0%, #4a90d8 45%, #3a7ac8 50%, #2a60b0 100%);
    box-shadow:
        0 1px 0 rgba(255,255,255,0.35) inset,
        0 2px 6px rgba(0,0,0,0.35);
    text-shadow: 0 1px 2px rgba(0,0,0,0.5);
    transition: all 0.15s ease;
}
.btn-download:hover {
    background: linear-gradient(180deg, #7ac0ff 0%, #5aa0e8 45%, #4a8ad8 50%, #3a70c0 100%);
    box-shadow:
        0 1px 0 rgba(255,255,255,0.4) inset,
        0 0 15px rgba(80,160,240,0.4),
        0 2px 8px rgba(0,0,0,0.4);
}
.btn-download:active {
    background: linear-gradient(180deg, #2a60b0 0%, #3a7ac8 50%, #4a90d8 100%);
    box-shadow: 0 1px 3px rgba(0,0,0,0.4) inset;
}
.btn-download svg { width: 18px; height: 18px; }
.btn-back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    font-size: 13px;
    font-weight: 500;
    color: #d0e4ff;
    text-decoration: none;
    border-radius: 4px;
    cursor: pointer;
    background: linear-gradient(180deg, rgba(100,150,210,0.35), rgba(60,100,170,0.3));
    border: 1px solid rgba(120,170,230,0.35);
    box-shadow: 0 1px 0 rgba(255,255,255,0.2) inset;
    text-shadow: 0 1px 1px rgba(0,0,0,0.5);
    transition: all 0.15s;
}
.btn-back:hover {
    background: linear-gradient(180deg, rgba(120,170,230,0.45), rgba(80,120,190,0.4));
    color: #fff;
}

/* ============================================================
   页脚
   ============================================================ */
.footer {
    position: relative;
    z-index: 5;
    text-align: center;
    padding: 20px;
    font-size: 11.5px;
    color: rgba(160,190,230,0.5);
    text-shadow: 0 1px 2px rgba(0,0,0,0.5);
}
.footer a { color: rgba(140,190,240,0.7); text-decoration: none; }
.footer a:hover { color: #9cc8ff; text-decoration: underline; }

/* ============================================================
   Toast 提示
   ============================================================ */
.toast {
    position: fixed;
    top: 60px;
    left: 50%;
    transform: translateX(-50%) translateY(-10px);
    background: linear-gradient(180deg, rgba(40,70,120,0.95), rgba(25,50,90,0.95));
    backdrop-filter: blur(10px);
    color: #e8f2ff;
    padding: 10px 24px;
    border-radius: 4px;
    font-size: 13px;
    border: 1px solid rgba(120,180,240,0.4);
    box-shadow:
        0 4px 20px rgba(0,0,0,0.5),
        0 1px 0 rgba(255,255,255,0.15) inset;
    opacity: 0;
    transition: all 0.25s ease;
    z-index: 9999;
    pointer-events: none;
    text-shadow: 0 1px 1px rgba(0,0,0,0.5);
}
.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* ============================================================
   表单通用样式
   ============================================================ */
.form-group { margin-bottom: 18px; }
.form-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #c8e0ff;
    margin-bottom: 8px;
    text-shadow: 0 1px 1px rgba(0,0,0,0.4);
}
.form-label .required { color: #f08080; margin-left: 2px; }
.form-input, .form-textarea, .form-select {
    width: 100%;
    padding: 11px 14px;
    font-size: 13.5px;
    color: #eaf4ff;
    background: linear-gradient(180deg, rgba(20,40,75,0.7) 0%, rgba(15,30,60,0.7) 100%);
    border: 1px solid rgba(120,170,230,0.3);
    border-radius: 6px;
    outline: none;
    transition: all 0.2s;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2) inset;
    font-family: inherit;
}
.form-input::placeholder, .form-textarea::placeholder { color: rgba(150,180,220,0.4); }
.form-input:focus, .form-textarea:focus, .form-select:focus {
    border-color: rgba(100,170,255,0.6);
    box-shadow: 0 0 0 3px rgba(80,150,230,0.15), 0 1px 3px rgba(0,0,0,0.2) inset;
    background: linear-gradient(180deg, rgba(25,50,90,0.8) 0%, rgba(20,40,75,0.8) 100%);
}
.form-textarea { resize: vertical; min-height: 120px; line-height: 1.7; }
.form-select { cursor: pointer; appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%239cc8ff' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 36px; }
.form-select option { background: #1a3a63; color: #eaf4ff; }
.form-hint { font-size: 11.5px; color: rgba(160,190,230,0.5); margin-top: 6px; }
.form-error { font-size: 12px; color: #f08080; margin-top: 6px; min-height: 16px; }
.form-success { font-size: 12px; color: #80e0a0; margin-top: 6px; }

/* ============================================================
   响应式
   ============================================================ */
@media (max-width: 700px) {
    .aero-navbar { flex-wrap: wrap; padding: 4px; }
    .nav-item { padding: 8px 14px; font-size: 12px; border: none; }
    .hero-avatar { width: 300px; height: 300px; top: 50px; left: -40px; opacity: 0.2; }
    .main { padding: 20px 12px 40px; }
    .main.detail { padding: 16px 12px 40px; }
    .aero-content.detail { padding: 16px; }
    .app-row { padding: 8px 10px; gap: 10px; }
    .app-row-meta { gap: 8px; }
    .detail-header { flex-direction: column; align-items: center; text-align: center; }
    .detail-tags { justify-content: center; }
    .detail-meta { justify-content: center; }
    .download-area { justify-content: center; }
    .detail-title { font-size: 17px; }
}

