﻿@charset "UTF-8";

@import url('https://cdn.jsdelivr.net/npm/lxgw-wenkai-webfont@1.1.0/style.css');
@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;700&display=swap');

body {
    font-family: "LXGW WenKai", sans-serif;
}

.font-geek {
    font-family: 'JetBrains Mono', monospace;
}

/* 桌面端下拉菜单 */
.dropdown {
    position: relative;
}

.dropdown:hover > a {
    color: #f43f5e;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-8px);
    margin-top: 0.75rem;
    padding: 0.375rem 0;
    background: white;
    border-radius: 0.75rem;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1), 0 1px 4px rgba(0, 0, 0, 0.04);
    min-width: 150px;
    opacity: 0;
    visibility: hidden;
    /* 🚀 核心修复：防止透明的菜单挡住下面的点击事件 */
    pointer-events: none;
    transition: opacity 0.2s ease, visibility 0.2s ease, transform 0.2s ease;
    z-index: 100;
    border: 1px solid rgba(0, 0, 0, 0.06);
}

.dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    /* 🚀 核心修复：鼠标悬停时恢复自身的点击事件 */
    pointer-events: auto;
    transform: translateX(-50%) translateY(0);
}

/* 桥接区域，防止鼠标移向菜单时意外关闭 */
.dropdown-menu::before {
    content: '';
    position: absolute;
    top: -1rem;
    left: 0;
    width: 100%;
    height: 1rem;
    background: transparent;
}

.dropdown-item {
    display: block;
    padding: 0.5rem 1rem;
    color: #6b7280;
    font-size: 0.875rem;
    text-decoration: none;
    transition: all 0.15s;
}

.dropdown-item:hover {
    background: #fff1f2;
    color: #f43f5e;
}

.dropdown-item.active {
    color: #f43f5e;
    background: #fff1f2;
}

.dropdown-divider {
    height: 1px;
    background: #f3f4f6;
    margin: 0.25rem 0.75rem;
}

/* 🚀 汉堡按钮的三条横线，改用继承色(樱花粉)让它更显眼 */
.hamburger-line {
    display: block;
    width: 20px;
    height: 2px;
    background-color: currentColor; /* 继承父级的 text-rose-500 */
    border-radius: 2px;
    margin: 2.5px 0;
    transition: all 0.25s ease;
    transform-origin: center;
}

/* 打开状态时变成 X */
#mobile-menu-btn.is-open .hamburger-line:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}
#mobile-menu-btn.is-open .hamburger-line:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}
#mobile-menu-btn.is-open .hamburger-line:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/*
 * 抽屉导航项
 * 用 display: flex + align-items: center 确保图标和文字在同一行
 * 之前图标和文字换行，就是因为 flex 没有正确继承到，这里单独定义避免冲突
 */
.drawer-nav-item {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 10px;
    font-size: 0.9rem;
    color: #4b5563;
    text-decoration: none;
    margin-bottom: 2px;
    transition: background 0.15s, color 0.15s;
    cursor: pointer;
}

.drawer-nav-item:hover {
    background: #fff1f2;
    color: #f43f5e;
}

.drawer-nav-active {
    background: #fff1f2;
    color: #f43f5e;
    font-weight: 600;
}

/* 抽屉里的分组标题 */
.drawer-section-label {
    font-size: 0.7rem;
    font-weight: 600;
    color: #9ca3af;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 12px 12px 4px;
}

/* 🚀 抽屉图标统一大小（加入 !important 强行镇压 SVG 爆炸问题） */
.drawer-icon {
    width: 1.25rem !important;  /* 20px */
    height: 1.25rem !important; /* 20px */
    flex-shrink: 0;
}