/* ======================================================
   PHP 导航面板 —— 借鉴 sun-panel UI 设计
   核心风格：毛玻璃卡片 + 背景遮罩 + 响应式网格
   ====================================================== */

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

html, body {
    height: 100%;
    overflow: hidden;
    font-family: -apple-system, "PingFang SC", "Microsoft YaHei",
                 "Helvetica Neue", Arial, sans-serif;
    color: #fff;
    background: #222;
}

/* ---------- 背景层 ---------- */
.cover {
    position: fixed;
    inset: 0;
    z-index: 0;
    background:
        linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    background-size: cover;
    background-position: center;
    transform: scale(1.05);
}
.cover.has-image {
    background-repeat: no-repeat;
}

.mask {
    position: fixed;
    inset: 0;
    z-index: 1;
    background-color: rgba(0, 0, 0, 0.35);
    pointer-events: none;
}

/* ---------- 滚动容器 ---------- */
.scroll-container {
    position: absolute;
    inset: 0;
    z-index: 2;
    overflow-y: auto;
    scroll-behavior: smooth;
}
/* 自定义细滚动条 */
.scroll-container::-webkit-scrollbar { width: 6px; }
.scroll-container::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.2);
    border-radius: 3px;
}
.scroll-container::-webkit-scrollbar-track { background: transparent; }

/* ---------- 主内容 ---------- */
.main-wrap {
    max-width: 1200px;
    margin: 120px auto 80px;
    padding: 0 20px;
}

/* ---------- 文字阴影 ---------- */
.text-shadow {
    text-shadow: 2px 2px 30px rgba(0,0,0,0.9);
}

/* ---------- 顶部 LOGO + 时钟 ---------- */
.header {
    text-align: center;
    margin-bottom: 20px;
}
.header-top {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}
.logo-text {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 700;
    letter-spacing: 2px;
}
.clock-divider {
    font-size: clamp(1.2rem, 2.5vw, 2rem);
    opacity: 0.7;
}
.clock {
    text-align: center;
    font-weight: 600;
}
.clock-time {
    font-size: clamp(1.4rem, 2.5vw, 2rem);
    font-variant-numeric: tabular-nums;
    letter-spacing: 1px;
}
.clock-meta {
    font-size: 0.85rem;
    opacity: 0.75;
    margin-top: 2px;
}

/* ---------- 搜索框 ---------- */
.search-wrap {
    margin: 24px auto 0;
    max-width: 640px;
}
.search-box {
    width: 100%;
    padding: 14px 20px 14px 48px;
    border: 1px solid rgba(255,255,255,0.25);
    border-radius: 999px;
    background: rgba(255,255,255,0.12);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    color: #fff;
    font-size: 15px;
    outline: none;
    transition: border-color 0.25s, background 0.25s, box-shadow 0.25s;
}
.search-box::placeholder { color: rgba(255,255,255,0.6); }
.search-box:focus {
    border-color: rgba(255,255,255,0.55);
    background: rgba(255,255,255,0.18);
    box-shadow: 0 0 0 3px rgba(255,255,255,0.12);
}
.search-wrap { position: relative; }
.search-icon {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    opacity: 0.75;
    pointer-events: none;
}

/* ---------- 分组 ---------- */
.group { margin-top: 48px; }
.group-title {
    font-size: 1.25rem;
    font-weight: 800;
    margin-bottom: 20px;
    padding-left: 10px;
    position: relative;
}
.group-title::before {
    content: '';
    position: absolute;
    left: 0; top: 4px; bottom: 4px;
    width: 4px;
    border-radius: 2px;
    background: linear-gradient(180deg, #60a5fa, #a78bfa);
}

/* ---------- 卡片网格 ---------- */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 18px;
}

/* ---------- 卡片 ---------- */
.card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 18px;
    border-radius: 14px;
    background: rgba(255,255,255,0.08);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid rgba(255,255,255,0.12);
    text-decoration: none;
    color: #fff;
    cursor: pointer;
    transition: transform 0.22s ease, background 0.22s,
                border-color 0.22s, box-shadow 0.22s;
    position: relative;
    overflow: hidden;
}
.card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(120% 80% at 20% 0%,
                rgba(255,255,255,0.12), transparent 55%);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.25s;
}
.card:hover {
    transform: translateY(-4px);
    background: rgba(255,255,255,0.16);
    border-color: rgba(255,255,255,0.35);
    box-shadow: 0 12px 32px rgba(0,0,0,0.35);
}
.card:hover::after { opacity: 1; }

.card-icon {
    flex-shrink: 0;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(96,165,250,0.5), rgba(167,139,250,0.5));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.15);
}
.card-body { min-width: 0; flex: 1; }
.card-title {
    font-size: 15px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.card-desc {
    font-size: 12px;
    opacity: 0.72;
    margin-top: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ---------- 空提示 ---------- */
.empty-tip {
    text-align: center;
    padding: 48px 0;
    color: rgba(255,255,255,0.6);
    font-size: 14px;
}
.group.hidden { display: none; }

/* ---------- 悬浮按钮 ---------- */
.fixed-tools {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10;
    display: flex;
    gap: 4px;
    padding: 4px;
    border-radius: 10px;
    background: rgba(42,42,42,0.42);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 0 10px 2px rgba(0,0,0,0.2);
}
.fixed-tools button {
    width: 42px;
    height: 42px;
    border: none;
    border-radius: 6px;
    background: transparent;
    color: #fff;
    cursor: pointer;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.25s;
}
.fixed-tools button:hover { background-color: rgba(169,169,169,0.48); }

/* ---------- 回到顶部 ---------- */
.back-top {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 10;
    width: 42px;
    height: 42px;
    border: none;
    border-radius: 10px;
    background: rgba(42,42,42,0.55);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    box-shadow: 0 0 10px 2px rgba(0,0,0,0.2);
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.25s, transform 0.25s, background-color 0.25s;
    pointer-events: none;
}
.back-top.show {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}
.back-top:hover { background-color: rgba(169,169,169,0.55); }

/* ---------- 页脚 ---------- */
.footer {
    text-align: center;
    padding: 40px 0 10px;
    font-size: 12px;
    opacity: 0.5;
}

/* ---------- 响应式 ---------- */
@media (max-width: 600px) {
    .main-wrap { margin-top: 80px; padding: 0 14px; }
    .card-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 12px;
    }
    .card { padding: 12px; gap: 10px; }
    .card-icon { width: 36px; height: 36px; font-size: 18px; border-radius: 10px; }
    .card-title { font-size: 14px; }
    .card-desc { font-size: 11px; }
    .clock-divider { display: none; }
    .header-top { flex-direction: column; gap: 4px; }
}
