/* style.css */


* {
    box-sizing: border-box;
}


html {
    margin: 0;
    padding: 0;
}


body {
    margin: 0;
    padding: 0;

    background: #0b1120;

    color: #e5e7eb;

    font-family:
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        "PingFang SC",
        "Microsoft YaHei",
        Arial,
        sans-serif;

    min-height: 100vh;
}


/* ============================================================
   整体布局
   ============================================================ */

.layout {
    display: flex;

    min-height: 100vh;
}


/* ============================================================
   左侧
   ============================================================ */

.sidebar {
    width: 230px;

    min-width: 230px;

    background: #0f172a;

    border-right: 1px solid #1e293b;

    display: flex;

    flex-direction: column;

    position: fixed;

    left: 0;
    top: 0;
    bottom: 0;

    z-index: 100;
}


.logo {
    height: 86px;

    padding: 20px;

    display: flex;

    align-items: center;

    gap: 12px;

    border-bottom: 1px solid #1e293b;
}


.logo-icon {
    width: 42px;
    height: 42px;

    min-width: 42px;

    border-radius: 11px;

    background: linear-gradient(135deg,
            #2563eb,
            #7c3aed);

    display: flex;

    align-items: center;

    justify-content: center;

    font-size: 21px;

    font-weight: 700;

    color: white;

    box-shadow:
        0 8px 24px rgba(37, 99, 235, 0.28);
}


.logo-text {
    min-width: 0;
}


.logo-title {
    font-size: 15px;

    font-weight: 700;

    color: #f8fafc;

    white-space: nowrap;

    overflow: hidden;

    text-overflow: ellipsis;
}


.logo-subtitle {
    font-size: 11px;

    margin-top: 3px;

    color: #64748b;

    white-space: nowrap;

    overflow: hidden;

    text-overflow: ellipsis;
}


/* ============================================================
   左侧菜单
   ============================================================ */

.sidebar-menu {
    padding: 16px 12px;

    flex: 1;

    overflow-y: auto;
}


.menu-item {
    width: 100%;

    height: 44px;

    border: 0;

    outline: none;

    border-radius: 8px;

    background: transparent;

    color: #94a3b8;

    display: flex;

    align-items: center;

    gap: 12px;

    padding: 0 13px;

    margin-bottom: 4px;

    font-size: 14px;

    cursor: pointer;

    text-align: left;

    transition:
        background 0.15s ease,
        color 0.15s ease;
}


.menu-item:hover {
    background: #162033;

    color: #e2e8f0;
}


.menu-item.active {
    background: #1d4ed8;

    color: white;

    box-shadow:
        0 4px 14px rgba(29, 78, 216, 0.23);
}


.menu-icon {
    width: 22px;

    display: inline-flex;

    justify-content: center;

    font-size: 17px;
}


.sidebar-footer {
    height: 55px;

    border-top: 1px solid #1e293b;

    display: flex;

    align-items: center;

    padding: 0 20px;

    font-size: 11px;

    color: #475569;
}


/* ============================================================
   主区域
   ============================================================ */

.main {
    margin-left: 230px;

    width: calc(100% - 230px);

    min-height: 100vh;
}


/* ============================================================
   顶部
   ============================================================ */

.header {
    min-height: 86px;

    padding: 20px 34px;

    border-bottom: 1px solid #1e293b;

    display: flex;

    align-items: center;

    justify-content: space-between;

    background: rgba(11, 17, 32, 0.92);

    position: sticky;

    top: 0;

    z-index: 50;

    backdrop-filter: blur(14px);
}


.header h1 {
    margin: 0;

    padding: 0;

    font-size: 22px;

    font-weight: 700;

    color: #f8fafc;
}


.page-desc {
    margin-top: 5px;

    font-size: 12px;

    color: #64748b;
}


.header-right {
    display: flex;

    align-items: center;
}


.clock {
    display: flex;

    align-items: center;

    gap: 9px;

    font-size: 15px;

    color: #cbd5e1;

    font-variant-numeric: tabular-nums;
}


.clock-date {
    color: #64748b;

    font-size: 12px;
}


/* ============================================================
   搜索
   ============================================================ */

.search-area {
    padding: 28px 34px 8px 34px;
}


.search-box {
    max-width: 650px;

    height: 48px;

    position: relative;

    display: flex;

    align-items: center;
}


.search-icon {
    position: absolute;

    left: 16px;

    color: #64748b;

    font-size: 23px;

    pointer-events: none;
}


.search-box input {
    width: 100%;

    height: 48px;

    padding: 0 48px 0 46px;

    border-radius: 10px;

    border: 1px solid #1e293b;

    outline: none;

    background: #111827;

    color: #e2e8f0;

    font-size: 14px;

    transition:
        border-color 0.15s ease,
        box-shadow 0.15s ease,
        background 0.15s ease;
}


.search-box input::placeholder {
    color: #475569;
}


.search-box input:focus {
    border-color: #3b82f6;

    background: #111c2e;

    box-shadow:
        0 0 0 3px rgba(59, 130, 246, 0.1);
}


.search-clear {
    width: 30px;
    height: 30px;

    position: absolute;

    right: 9px;

    border: 0;

    border-radius: 6px;

    background: transparent;

    color: #64748b;

    font-size: 22px;

    cursor: pointer;

    display: none;
}


.search-clear.show {
    display: block;
}


.search-clear:hover {
    background: #1e293b;

    color: white;
}


/* ============================================================
   内容
   ============================================================ */

.content {
    padding:
        16px 34px 70px 34px;
}


.nav-section {
    margin-top: 27px;
}


.section-header {
    display: flex;

    align-items: center;

    justify-content: space-between;

    margin-bottom: 14px;
}


.section-title {
    font-size: 17px;

    font-weight: 650;

    color: #e2e8f0;
}


.section-desc {
    color: #64748b;

    font-size: 11px;

    margin-top: 4px;
}


.section-count {
    min-width: 28px;

    height: 24px;

    padding: 0 8px;

    display: flex;

    align-items: center;

    justify-content: center;

    border-radius: 20px;

    background: #172033;

    color: #64748b;

    font-size: 11px;
}


/* ============================================================
   卡片
   ============================================================ */

.card-grid {
    display: grid;

    grid-template-columns:
        repeat(auto-fill,
            minmax(230px, 1fr));

    gap: 13px;
}


.nav-card {
    position: relative;

    min-height: 165px;

    padding: 18px;

    border-radius: 12px;

    border: 1px solid #1e293b;

    background:
        linear-gradient(145deg,
            #111827,
            #0f172a);

    text-decoration: none;

    color: inherit;

    overflow: hidden;

    transition:
        transform 0.15s ease,
        border-color 0.15s ease,
        background 0.15s ease,
        box-shadow 0.15s ease;
}


.nav-card::before {
    content: "";

    position: absolute;

    left: 0;
    top: 0;

    width: 100%;

    height: 2px;

    background:
        linear-gradient(90deg,
            transparent,
            rgba(59, 130, 246, 0.6),
            transparent);

    opacity: 0;

    transition: opacity 0.15s ease;
}


.nav-card:hover {
    transform: translateY(-2px);

    border-color: #334155;

    background: #131e30;

    box-shadow:
        0 14px 35px rgba(0, 0, 0, 0.22);
}


.nav-card:hover::before {
    opacity: 1;
}


.card-top {
    display: flex;

    align-items: center;

    justify-content: space-between;

    margin-bottom: 17px;
}


.card-icon {
    width: 42px;
    height: 42px;

    border-radius: 10px;

    background: #172033;

    border: 1px solid #243047;

    display: flex;

    align-items: center;

    justify-content: center;

    font-size: 22px;
}


.card-arrow {
    font-size: 17px;

    color: #475569;

    transition:
        color 0.15s ease,
        transform 0.15s ease;
}


.nav-card:hover .card-arrow {
    color: #60a5fa;

    transform:
        translateX(2px) translateY(-2px);
}


.card-name-row {
    display: flex;

    align-items: center;

    gap: 8px;

    min-width: 0;
}


.card-name {
    color: #f1f5f9;

    font-size: 15px;

    font-weight: 650;

    overflow: hidden;

    text-overflow: ellipsis;

    white-space: nowrap;
}


.env {
    display: inline-flex;

    align-items: center;

    justify-content: center;

    height: 18px;

    padding: 0 6px;

    border-radius: 4px;

    color: white;

    font-size: 9px;

    line-height: 18px;

    font-weight: 700;

    flex-shrink: 0;
}


.card-desc {
    margin-top: 8px;

    color: #94a3b8;

    font-size: 12px;

    line-height: 1.5;

    overflow: hidden;

    display: -webkit-box;

    -webkit-line-clamp: 2;

    -webkit-box-orient: vertical;
}


.card-url {
    margin-top: 10px;

    font-family:
        SFMono-Regular,
        Consolas,
        "Liberation Mono",
        monospace;

    color: #475569;

    font-size: 10px;

    overflow: hidden;

    white-space: nowrap;

    text-overflow: ellipsis;
}


/* ============================================================
   空结果
   ============================================================ */

.empty {
    min-height: 280px;

    border: 1px dashed #263349;

    border-radius: 12px;

    display: flex;

    align-items: center;

    justify-content: center;

    flex-direction: column;

    background: rgba(15, 23, 42, 0.25);
}


.empty-icon {
    font-size: 40px;

    color: #334155;
}


.empty-title {
    margin-top: 13px;

    font-size: 15px;

    color: #94a3b8;
}


.empty-desc {
    margin-top: 6px;

    font-size: 12px;

    color: #475569;
}


/* ============================================================
   响应式
   ============================================================ */

@media (max-width: 900px) {

    .sidebar {
        width: 72px;

        min-width: 72px;
    }


    .logo {
        padding: 15px;

        justify-content: center;
    }


    .logo-text {
        display: none;
    }


    .menu-item {
        justify-content: center;

        padding: 0;
    }


    .menu-item span:last-child {
        display: none;
    }


    .menu-icon {
        width: auto;
    }


    .sidebar-footer {
        display: none;
    }


    .main {
        margin-left: 72px;

        width: calc(100% - 72px);
    }

}


@media (max-width: 650px) {

    .header {
        padding:
            17px 18px;
    }


    .header h1 {
        font-size: 18px;
    }


    .page-desc {
        display: none;
    }


    .clock-date {
        display: none;
    }


    .search-area {
        padding:
            20px 18px 4px 18px;
    }


    .content {
        padding:
            10px 18px 45px 18px;
    }


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

}