/* ============================================================
   Cookie 同意横幅样式（全站共用）
   ============================================================ */
.cookie-consent-banner {
    position: fixed;
    left: 0;
    right: 0;
    z-index: 9999;
    background: rgba(20, 20, 20, .96);
    color: #fff;
    /* 底部安全区：避免 iPhone 刘海屏 Home Indicator 遮挡 */
    padding: 16px 20px calc(16px + env(safe-area-inset-bottom, 0px));
    box-shadow: 0 -2px 10px rgba(0, 0, 0, .2);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    animation: cookie-slide-up .4s ease-out;
}
.cookie-consent-bottom { bottom: 0; }
.cookie-consent-top { top: 0; animation: cookie-slide-down .4s ease-out; }

@keyframes cookie-slide-up {
    from { transform: translateY(100%); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}
@keyframes cookie-slide-down {
    from { transform: translateY(-100%); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.cookie-consent-content {
    max-width: 1226px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
}
.cookie-consent-message {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    min-width: 280px;
    font-size: 14px;
    line-height: 1.5;
}
.cookie-consent-icon { flex-shrink: 0; color: #ff6700; }
.cookie-consent-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.cookie-consent-policy-link {
    color: #adb5bd;
    text-decoration: underline;
    font-size: 13px;
    margin-right: 4px;
}
.cookie-consent-policy-link:hover { color: #fff; }

.cookie-consent-btn {
    padding: 8px 18px;
    border: none;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all .2s;
    white-space: nowrap;
}
.cookie-consent-btn-primary { background: #ff6700; color: #fff; }
.cookie-consent-btn-primary:hover {
    background: #f25807;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(255, 103, 0, .3);
}
.cookie-consent-btn-secondary {
    background: transparent;
    color: #dee2e6;
    border: 1px solid #495057;
}
.cookie-consent-btn-secondary:hover { background: #343a40; border-color: #6c757d; }

/* ---------- PWA 安装按钮（由 js/pwa.js 注入） ---------- */
.mi-install-btn {
    position: fixed;
    right: 16px;
    bottom: 16px;
    z-index: 9999;
    padding: 10px 14px;
    border: 0;
    border-radius: 999px;
    background: #ff6700;
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    box-shadow: 0 6px 16px rgba(255, 103, 0, .35);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    line-height: 1;
}
.mi-install-btn:hover { background: #f25807; }
.mi-install-btn-close {
    margin-left: 4px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .25);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    cursor: pointer;
    user-select: none;
    line-height: 1;
}

@media (max-width: 768px) {
    /* 移动端：底部安全区 + 收紧内边距；消息不设最小宽度以免窄屏溢出 */
    .cookie-consent-banner { padding: 12px 14px calc(12px + env(safe-area-inset-bottom, 0px)); }
    .cookie-consent-content { flex-direction: column; align-items: stretch; gap: 12px; }
    .cookie-consent-message { min-width: 0; font-size: 13px; }
    .cookie-consent-actions { justify-content: stretch; }
    .cookie-consent-btn { flex: 1; padding: 11px 14px; }
    .cookie-consent-policy-link { flex-basis: 100%; margin-bottom: 2px; }
    /* 移动端吸底购买栏存在时，避免安装按钮被遮挡 */
    .mi-install-btn { bottom: calc(16px + env(safe-area-inset-bottom, 0px)); }
}
