/* 狐蒂云主题 - 公共样式 */

/* 主色调 */
:root {
    --primary-color: #1e88e5;
    --primary-hover: #1565c0;
    --primary-light: #e3f2fd;
    --danger-color: #f44336;
    --success-color: #4caf50;
    --warning-color: #ff9800;
    --text-color: #333;
    --text-secondary: #666;
    --text-light: #999;
    --border-color: #e0e0e0;
    --bg-color: #f5f7fa;
    --white: #fff;
}

/* 容器 */
.hdy-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 头部导航 */
.hdy-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: var(--white);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.hdy-header-inner {
    max-width: 1400px;
    margin: 0 auto;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
}

.hdy-logo a {
    display: flex;
    align-items: center;
    gap: 8px;
}

.hdy-logo .logo-icon {
    width: 36px;
    height: 36px;
}

.hdy-logo .logo-text {
    font-size: 20px;
    font-weight: 800;
    color: #333;
    letter-spacing: 2px;
}

.hdy-nav {
    flex: 1;
    margin-left: 40px;
}

.hdy-nav-list {
    display: flex;
    align-items: center;
    gap: 8px;
}

.hdy-nav-item {
    position: relative;
    padding: 0 16px;
    height: 64px;
    display: flex;
    align-items: center;
    cursor: pointer;
    transition: color 0.3s;
}

.hdy-nav-item:hover {
    color: var(--primary-color);
}

.hdy-nav-item a, .hdy-nav-item span {
    font-size: 15px;
}

.nav-tag {
    font-size: 12px;
    padding: 1px 6px;
    border-radius: 3px;
    margin-left: 4px;
    font-style: normal;
}

.nav-tag.hot {
    background: #ff4d4f;
    color: var(--white);
}

.nav-tag.new {
    background: var(--primary-color);
    color: var(--white);
}

.arrow-down {
    display: inline-block;
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 5px solid currentColor;
    margin-left: 4px;
}

/* 下拉菜单 */
.hdy-submenu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 500px;
    background: var(--white);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    border-radius: 4px;
    padding: 20px;
    display: none;
}

.hdy-nav-item:hover .hdy-submenu {
    display: block;
}

.hdy-submenu-inner {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.hdy-submenu-item {
    display: flex;
    align-items: flex-start;
    padding: 12px;
    border-radius: 4px;
    transition: background 0.3s;
}

.hdy-submenu-item:hover {
    background: var(--primary-light);
}

.submenu-icon {
    width: 32px;
    height: 32px;
    margin-right: 12px;
}

.submenu-title {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-color);
    margin-bottom: 4px;
}

.submenu-desc {
    font-size: 12px;
    color: var(--text-light);
}

/* 头部右侧 */
.hdy-header-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.hdy-search {
    position: relative;
    width: 200px;
}

.hdy-search .search-input {
    width: 100%;
    height: 36px;
    padding: 0 36px 0 12px;
    border: 1px solid var(--border-color);
    border-radius: 18px;
    background: var(--bg-color);
    transition: all 0.3s;
}

.hdy-search .search-input:focus {
    border-color: var(--primary-color);
    background: var(--white);
}

.hdy-search .search-icon {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    background: url('/web/hudiyun/img/icon-search.png') center / contain no-repeat;
    cursor: pointer;
}

.hdy-link {
    font-size: 14px;
    color: var(--text-secondary);
    transition: color 0.3s;
}

.hdy-link:hover {
    color: var(--primary-color);
}

.hdy-btn-login {
    padding: 8px 20px;
    color: var(--text-color);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    transition: all 0.3s;
}

.hdy-btn-login:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.hdy-btn-register {
    padding: 8px 20px;
    background: var(--primary-color);
    color: var(--white);
    border-radius: 4px;
    transition: background 0.3s;
}

.hdy-btn-register:hover {
    background: var(--primary-hover);
}

/* 用户菜单 */
.hdy-user {
    position: relative;
    display: flex;
    align-items: center;
    cursor: pointer;
}

.user-link {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: inherit;
}

.user-link:hover {
    color: var(--primary-color);
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    margin-right: 8px;
}

.user-avatar-text {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    margin-right: 8px;
}

.user-name {
    font-size: 14px;
    color: var(--text-color);
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.hdy-user-menu {
    position: absolute;
    top: 100%;
    right: 0;
    min-width: 150px;
    background: var(--white);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    border-radius: 4px;
    padding: 8px 0;
    display: none;
}

.hdy-user:hover .hdy-user-menu {
    display: block;
}

.user-menu-item {
    display: block;
    padding: 10px 16px;
    transition: background 0.3s;
}

.user-menu-item:hover {
    background: var(--primary-light);
    color: var(--primary-color);
}

/* 侧边栏 */
.hdy-sidebar {
    position: fixed;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 999;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.sidebar-item {
    position: relative;
    width: 48px;
    height: 48px;
    background: var(--white);
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
}

.sidebar-item:hover {
    background: var(--primary-color);
}

.sidebar-item:hover img {
    filter: brightness(0) invert(1);
}

.sidebar-item img {
    width: 24px;
    height: 24px;
}

.sidebar-popup {
    position: absolute;
    right: 60px;
    top: 50%;
    transform: translateY(-50%);
    background: var(--white);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    border-radius: 8px;
    padding: 16px;
    display: none;
    white-space: nowrap;
}

.sidebar-item:hover .sidebar-popup {
    display: block;
}

.popup-content .qrcode {
    width: 120px;
    height: 120px;
}

/* 底部 */
.hdy-footer {
    background: #2a3f54;
    color: #b4bcc8;
    padding: 60px 0 30px;
    margin-top: 60px;
}

.footer-top {
    display: flex;
    justify-content: space-between;
    padding-bottom: 40px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-links {
    display: flex;
    gap: 80px;
}

.footer-col h4 {
    color: var(--white);
    font-size: 16px;
    margin-bottom: 20px;
}

.footer-col a {
    display: block;
    font-size: 14px;
    padding: 6px 0;
    transition: color 0.3s;
}

.footer-col a:hover {
    color: var(--white);
}

.footer-contact {
    display: flex;
    align-items: flex-start;
    gap: 30px;
}

.contact-qrcode {
    text-align: center;
}

.contact-qrcode img {
    width: 100px;
    height: 100px;
    margin-bottom: 8px;
}

.contact-info p {
    font-size: 14px;
    margin-bottom: 8px;
}

.contact-info strong {
    color: var(--white);
    font-size: 18px;
}

.footer-bottom {
    padding-top: 30px;
    text-align: center;
}

.footer-bottom p {
    font-size: 13px;
    margin-bottom: 8px;
}

/* 页面主体留出头部空间 */
.hdy-body {
    padding-top: 64px;
}
