/* ============================================
   导航下拉菜单样式 (v62 重构)
   ============================================ */
.nav-dropdown {
    position: relative;
    display: inline-block;
}
.nav-dropdown .dropdown-toggle {
    cursor: pointer;
}
.nav-dropdown .dropdown-toggle::after {
    content: '▾';
    font-size: 10px;
    margin-left: 4px;
    opacity: .7;
    transition: transform .3s;
}
.nav-dropdown.open .dropdown-toggle::after {
    transform: rotate(180deg);
}
.nav-dropdown .dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 160px;
    background: #fff;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 8px 24px rgba(0,0,0,.15);
    border-top: 3px solid #C8102E;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: opacity .3s ease, visibility .3s ease, transform .3s ease;
    z-index: 1000;
    padding: 8px 0;
    pointer-events: none;
}
/* 使用.open类控制显示，替代纯:hover */
.nav-dropdown.open .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}
/* 鼠标设备上保留hover体验 */
@media (hover: hover) and (pointer: fine) {
    .nav-dropdown:hover .dropdown-menu {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
        pointer-events: auto;
    }
    .nav-dropdown:hover .dropdown-toggle::after {
        transform: rotate(180deg);
    }
}
.nav-dropdown .dropdown-menu a {
    display: block;
    padding: 10px 20px;
    color: #333;
    font-size: 13px;
    border-left: 3px solid transparent;
    transition: all .2s;
    white-space: nowrap;
}
.nav-dropdown .dropdown-menu a:hover {
    background: rgba(200,16,46,.06);
    color: #C8102E;
    border-left-color: #C8102E;
    padding-left: 24px;
}

/* ========== 全部菜单按钮 ========== */
.all-menu-btn {
    background: rgba(212,175,55,.2);
    color: #D4AF37 !important;
    font-weight: 600;
    border: 1px solid rgba(212,175,55,.4);
}
.all-menu-btn:hover {
    background: rgba(212,175,55,.35) !important;
    color: #fff !important;
}

/* ========== 全部菜单面板 (PC端大面板) ========== */
.all-menu-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(26,10,10,.6);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: opacity .3s ease, visibility .3s ease;
}
.all-menu-overlay.open {
    opacity: 1;
    visibility: visible;
}
.all-menu-panel {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(.9);
    width: 90%;
    max-width: 960px;
    max-height: 85vh;
    background: linear-gradient(135deg, #FFFEF8 0%, #FAF5EC 100%);
    border-radius: 16px;
    box-shadow: 0 24px 64px rgba(0,0,0,.35);
    z-index: 10001;
    opacity: 0;
    visibility: hidden;
    transition: opacity .3s ease, visibility .3s ease, transform .3s cubic-bezier(.4,0,.2,1);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 2px solid #D4AF37;
}
.all-menu-panel.open {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%) scale(1);
}
.all-menu-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 28px;
    background: linear-gradient(135deg, #8B0000 0%, #C8102E 100%);
    color: #D4AF37;
    flex-shrink: 0;
}
.all-menu-title {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 20px;
    font-weight: bold;
    letter-spacing: 3px;
}
.all-menu-title-icon {
    width: 28px;
    height: 28px;
    border: 2px solid #D4AF37;
    border-radius: 6px;
    position: relative;
}
.all-menu-title-icon::before {
    content: '';
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 10px; height: 10px;
    background: #D4AF37;
    border-radius: 50%;
}
.all-menu-close {
    width: 36px;
    height: 36px;
    border: none;
    background: rgba(255,255,255,.15);
    color: #fff;
    font-size: 26px;
    line-height: 1;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .2s, transform .2s;
}
.all-menu-close:hover {
    background: rgba(255,255,255,.3);
    transform: rotate(90deg);
}
.all-menu-body {
    flex: 1;
    overflow-y: auto;
    padding: 24px 28px;
    -webkit-overflow-scrolling: touch;
}
.all-menu-category {
    margin-bottom: 24px;
}
.all-menu-category:last-child {
    margin-bottom: 0;
}
.all-menu-cat-title {
    font-size: 15px;
    font-weight: bold;
    color: #8B0000;
    margin-bottom: 12px;
    padding-left: 12px;
    border-left: 4px solid #D4AF37;
    letter-spacing: 2px;
}
.all-menu-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}
.all-menu-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 14px 10px;
    background: #fff;
    border: 1px solid #E8DCC8;
    border-radius: 10px;
    text-decoration: none;
    color: #444;
    font-size: 13px;
    transition: all .25s cubic-bezier(.4,0,.2,1);
    text-align: center;
    min-height: 48px;
}
.all-menu-link:hover {
    background: linear-gradient(135deg, #C8102E, #8B0000);
    color: #fff;
    border-color: #C8102E;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(200,16,46,.2);
}
.all-menu-link-label {
    line-height: 1.3;
    font-weight: 500;
}
.all-menu-footer {
    padding: 14px 28px;
    background: rgba(139,0,0,.05);
    border-top: 1px solid rgba(212,175,55,.3);
    text-align: center;
    flex-shrink: 0;
}
.all-menu-login-btn {
    display: inline-block;
    padding: 10px 36px;
    background: linear-gradient(135deg, #C8102E, #8B0000);
    color: #fff !important;
    border-radius: 24px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 2px;
    transition: all .3s;
    border: 1px solid #D4AF37;
}
.all-menu-login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(200,16,46,.3);
}

/* ========== 汉堡菜单按钮 ========== */
.mobile-menu-btn {
    display: none;
    width: 40px;
    height: 40px;
    background: none;
    border: none;
    cursor: pointer;
    position: relative;
    padding: 0;
    z-index: 1001;
}
.mobile-menu-btn span {
    display: block;
    position: absolute;
    left: 8px;
    width: 24px;
    height: 2px;
    background: #fff;
    border-radius: 2px;
    transition: all .3s ease;
}
.mobile-menu-btn span:nth-child(1) { top: 12px; }
.mobile-menu-btn span:nth-child(2) { top: 19px; }
.mobile-menu-btn span:nth-child(3) { top: 26px; }
/* 激活状态：三条线变X */
.mobile-menu-btn.active span:nth-child(1) {
    top: 19px;
    transform: rotate(45deg);
}
.mobile-menu-btn.active span:nth-child(2) {
    opacity: 0;
    transform: translateX(-10px);
}
.mobile-menu-btn.active span:nth-child(3) {
    top: 19px;
    transform: rotate(-45deg);
}
/* ========== 移动端用户区 ========== */
.nav-mobile-user {
    display: none;
}
/* ========== 平板端导航适配 (768px - 1024px) ========== */
@media (max-width: 1024px) {
    .mobile-menu-btn {
        display: block;
    }
    .nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: linear-gradient(135deg, #8B0000 0%, #C8102E 100%);
        flex-direction: column;
        padding: 12px 16px;
        gap: 2px;
        max-height: calc(100vh - 70px);
        overflow-y: auto;
        z-index: 999;
        box-shadow: 0 8px 24px rgba(0,0,0,.3);
        border-top: 2px solid rgba(212,175,55,.3);
    }
    .nav.open {
        display: flex;
    }
    .nav-item {
        width: 100%;
        padding: 12px 16px !important;
        font-size: 15px !important;
        border-radius: 8px !important;
        height: auto !important;
        line-height: 1.5 !important;
    }
    .nav-item.active {
        background: rgba(255,255,255,.2) !important;
    }
    .all-menu-btn {
        text-align: center;
        justify-content: center;
    }
    .nav-dropdown {
        display: block;
        width: 100%;
    }
    .nav-dropdown .dropdown-toggle {
        width: 100%;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }
    /* 移动端下拉菜单 */
    .nav-dropdown .dropdown-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        pointer-events: auto;
        box-shadow: none;
        border-top: none;
        display: none;
        padding: 8px 0 8px 16px;
        background: rgba(0,0,0,.15);
        border-radius: 8px;
        margin-top: 4px;
        min-width: auto;
    }
    .nav-dropdown.open .dropdown-menu {
        display: block;
    }
    .nav-dropdown .dropdown-menu a {
        color: rgba(255,255,255,.85);
        padding: 10px 14px;
        border-left: 2px solid rgba(212,175,55,.3);
        font-size: 14px;
    }
    .nav-dropdown .dropdown-menu a:hover {
        background: rgba(255,255,255,.1);
        color: #D4AF37;
        border-left-color: #D4AF37;
        padding-left: 18px;
    }
    /* 移动端用户区显示 */
    .nav-mobile-user {
        display: flex;
        flex-direction: column;
        gap: 4px;
        margin-top: 8px;
        padding-top: 12px;
        border-top: 1px solid rgba(212,175,55,.2);
    }
    .nav-mobile-user .nav-item {
        text-align: center;
    }
    .nav-mobile-login {
        background: rgba(212,175,55,.2) !important;
        color: #D4AF37 !important;
    }
    .nav-mobile-register {
        background: rgba(255,255,255,.1) !important;
    }
    /* 全部菜单面板：移动端全屏 */
    .all-menu-panel {
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        transform: translateY(100%);
        width: 100%;
        max-width: 100%;
        max-height: 100vh;
        border-radius: 0;
        border: none;
    }
    .all-menu-panel.open {
        transform: translateY(0);
    }
    .all-menu-overlay {
        display: none;
    }
    .all-menu-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
    }
    .all-menu-body {
        padding: 16px;
    }
    .all-menu-header {
        padding: 14px 18px;
    }
    .all-menu-title {
        font-size: 17px;
        letter-spacing: 2px;
    }
}
/* ========== 手机端精细适配 (<768px) ========== */
@media (max-width: 768px) {
    .nav {
        padding: 10px 12px;
    }
    .nav-item {
        padding: 11px 14px !important;
        font-size: 14px !important;
    }
    .nav-dropdown .dropdown-menu a {
        padding: 9px 12px;
        font-size: 13px;
    }
    .all-menu-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    .all-menu-link {
        padding: 12px 6px;
        font-size: 12px;
    }
    .all-menu-link-shape {
        width: 20px;
        height: 20px;
    }
}
@media (max-width: 480px) {
    .all-menu-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}
/* Logo图标美化 */
.logo-icon {
    width: 52px;
    height: 52px;
    border-radius: 12px;
    background: linear-gradient(135deg, #8B0000, #C8102E);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(139,0,0,.3);
    border: 2px solid #D4AF37;
    overflow: hidden;
}
.logo-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}
/* 顶部栏美化 */
.top-bar {
    background: linear-gradient(90deg, #1A0A0A, #2D1515, #1A0A0A);
    color: rgba(245,230,200,.8);
    font-size: 12px;
    padding: 8px 0;
    border-bottom: 1px solid rgba(212,175,55,.2);
}
.top-bar a {
    color: rgba(245,230,200,.8);
    margin-left: 16px;
    transition: color .2s;
}
.top-bar a:hover {
    color: #D4AF37;
}
.top-bar-divider {
    margin: 0 8px;
    opacity: .4;
}
.admin-link {
    color: #D4AF37 !important;
    font-weight: 600;
}
/* ========== 平板端顶部栏适配 ========== */
@media (max-width: 1024px) {
    .top-bar .container {
        flex-wrap: wrap;
        gap: 4px;
        justify-content: center;
        text-align: center;
    }
    .top-bar-slogan {
        width: 100%;
        font-size: 11px;
    }
    .top-bar-links {
        font-size: 12px;
    }
    .top-bar-links a {
        margin-left: 12px;
    }
}
@media (max-width: 480px) {
    .top-bar {
        padding: 6px 0;
    }
    .top-bar-slogan {
        font-size: 10px;
        letter-spacing: 0;
    }
}
