/**
 * 页眉静态样式
 * 不包含任何PHP动态变量
 */

html, body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* 页眉吸顶效果 */
header {
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    padding: 0 40px;
    gap: 30px;
    transition: all 0.3s ease;
    border-bottom: 1px solid #e2e8f0;
}

/* 首页透明页眉 */
header.transparent-header {
    background: transparent !important;
    border-bottom: none !important;
    box-shadow: none !important;
    position: absolute;
    width: 100%;
    color: #fff;
}

.main-container {
    margin: 0 auto;
    padding: 0 20px;
}

.logo img {
    max-height: 40px;
    transition: transform 0.2s ease;
}
.logo img:hover {
    transform: scale(1.05);
}
.text-logo {
    font-weight: 600;
    text-decoration: none;
    line-height: 1;
}

.site-nav .nav-menu {
    list-style: none;
    display: flex;
    margin: 0;
    padding: 0;
    gap: 8px;
}
.site-nav .nav-menu li {
    position: relative;
}
.site-nav .nav-menu li a {
    text-decoration: none;
    padding: 12px 20px;
    border-radius: 8px;
    color: inherit;
    font-weight: 500;
    transition: all 0.2s ease;
    display: block;
}
.site-nav .nav-menu li a:hover {
    background: rgba(78, 205, 196, 0.1);
    transform: translateY(-1px);
}
.site-nav .nav-menu li ul {
    padding: 8px 0;
    border-radius: 12px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    list-style: none;
    min-width: 200px;
    z-index: 1000;
    border: 1px solid #e2e8f0;
}
.site-nav .nav-menu li:hover > ul {
    display: block;
    animation: fadeInUp 0.2s ease;
}
.site-nav .nav-menu li ul li ul {
    top: -8px;
    left: 100%;
}
.site-nav .nav-menu li ul li:hover > ul {
    display: block;
}
.site-nav .nav-menu li.menu-item-has-children > a::after {
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    margin-left: 8px;
    font-size: 12px;
    content: "\f107";
    transition: transform 0.2s ease;
}
.site-nav .nav-menu li:hover.menu-item-has-children > a::after {
    transform: rotate(180deg);
}

.header-buttons {
    margin-left: auto;
    display: flex;
    gap: 12px;
    align-items: center;
}
.header-buttons button {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 20px;
    transition: all 0.2s ease;
    padding: 10px;
    border-radius: 8px;
    position: relative;
}
.header-buttons button i {
    font-size: 20px;
    transition: color 0.2s ease;
}
.header-buttons button:hover,
.mobile-menu-toggle:hover,
.mobile-menu-close:hover {
    transform: translateY(-1px);
}

.mobile-menu-toggle:hover i,
.mobile-menu-close:hover i {
    transform: translateY(-1px);
}

.login-popup-actions button:hover {
    transform: translateY(-1px);
}
.search-popup-content .search-submit:hover {
    transform: translateY(-2px);
}
.search-popup-content button.search-close:hover {
    transform: rotate(90deg);
}
.search-tag:hover {
    transform: translateY(-1px);
}
.notice-popup-content button.notice-close:hover {
    transform: translateY(-1px);
}
.recharge-button:hover {
    background: rgba(255, 255, 255, 0.3) !important;
}
.member-info-value:hover {
    cursor: pointer;
}

.search-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.8);
    display: none;
    justify-content: center;
    align-items: flex-start;
    z-index: 10000;
    backdrop-filter: blur(12px);
    opacity: 0;
    transition: opacity 0.3s ease;
}
.search-popup.active {
    display: flex;
    opacity: 1;
}
.search-popup-content {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    padding: 40px;
    max-width: 680px;
    width: 90%;
    border-radius: 24px;
    position: relative;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25), 0 0 0 1px rgba(255, 255, 255, 0.1);
    margin-top: 120px;
    transform: translateY(-20px) scale(0.95);
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}
.search-popup.active .search-popup-content {
    transform: translateY(0) scale(1);
}
html.dark-mode .search-popup-content {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.05);
}
.search-popup-header {
    text-align: center;
    margin-bottom: 32px;
}
.search-popup-title {
    font-size: 28px;
    font-weight: 700;
    background: linear-gradient(135deg, #4ecdc4 0%, #42b4ad 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 8px;
    letter-spacing: -0.5px;
}
.search-popup-subtitle {
    color: #64748b;
    font-size: 16px;
    font-weight: 500;
}
html.dark-mode .search-popup-subtitle {
    color: #94a3b8;
}
.search-popup-content .search-form {
    display: flex;
    gap: 12px;
    position: relative;
}
.search-input-wrapper {
    position: relative;
    flex: 1;
}
.search-popup-content .search-input {
    flex: 1;
    padding: 20px 60px 20px 24px;
    border: 2px solid #e2e8f0;
    border-radius: 16px;
    font-size: 18px;
    transition: all 0.3s ease;
    background: #ffffff;
    color: #1e293b;
    font-weight: 500;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}
.search-popup-content .search-input:focus {
    outline: none;
    border-color: #4ecdc4;
    box-shadow: 0 0 0 4px rgba(78, 205, 196, 0.1), 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}
.search-popup-content .search-input::placeholder {
    color: #94a3b8;
    font-weight: 400;
}
html.dark-mode .search-popup-content .search-input {
    background: #334155;
    border-color: #475569;
    color: #f1f5f9;
}
html.dark-mode .search-popup-content .search-input:focus {
    border-color: #4ecdc4;
    box-shadow: 0 0 0 4px rgba(78, 205, 196, 0.15), 0 10px 15px -3px rgba(0, 0, 0, 0.3);
}
.search-icon {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    font-size: 20px;
    pointer-events: none;
    transition: color 0.3s ease;
}
.search-popup-content .search-input:focus + .search-icon {
    color: #4ecdc4;
}
.search-popup-content .search-submit {
    background: linear-gradient(135deg, #4ecdc4 0%, #42b4ad 100%);
    border: none;
    color: white;
    padding: 20px 32px;
    border-radius: 16px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px -1px rgba(78, 205, 196, 0.3);
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 120px;
    justify-content: center;
}
.search-popup-content .search-submit:active {
    transform: translateY(0);
}
.search-popup-content button.search-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(248, 250, 252, 0.8);
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #64748b;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    backdrop-filter: blur(8px);
    border: 1px solid rgba(226, 232, 240, 0.6);
}
html.dark-mode .search-popup-content button.search-close {
    background: rgba(30, 41, 59, 0.8);
    border-color: rgba(71, 85, 105, 0.6);
    color: #94a3b8;
}
.search-suggestions {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid #e2e8f0;
}
.search-suggestions-title {
    font-size: 14px;
    font-weight: 600;
    color: #64748b;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
html.dark-mode .search-suggestions-title {
    color: #94a3b8;
}
.search-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.search-tag {
    background: rgba(78, 205, 196, 0.1);
    color: #42b4ad;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid rgba(78, 205, 196, 0.2);
}
@media (max-width: 768px) {
    .search-popup-content {
        margin-top: 80px;
        padding: 24px;
        max-width: 90%;
    }
    .search-popup-title {
        font-size: 24px;
    }
    .search-popup-content .search-form {
        flex-direction: column;
    }
    .search-popup-content .search-submit {
        min-width: auto;
        padding: 16px 24px;
    }
    .search-popup-content .search-input {
        padding: 16px 50px 16px 20px;
        font-size: 16px;
    }
    .search-icon {
        right: 16px;
        font-size: 18px;
    }
}
@media (max-width: 480px) {
    .search-popup-content {
        margin-top: 60px;
        padding: 20px;
    }
    .search-popup-title {
        font-size: 20px;
    }
    .search-popup-subtitle {
        font-size: 14px;
    }
    .search-tags {
        justify-content: center;
    }
}

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 24px;
    color: inherit;
    padding: 8px;
    border-radius: 8px;
    transition: all 0.2s ease;
}
.mobile-menu-toggle:hover {
    background: rgba(78, 205, 196, 0.1);
}
.mobile-menu-container {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9998;
    opacity: 0;
    transition: opacity 0.3s ease;
    backdrop-filter: blur(5px);
}
.mobile-menu-container.active {
    display: block;
    opacity: 1;
}
.mobile-menu {
    position: fixed;
    top: 0;
    right: -320px;
    width: 300px;
    height: 100%;
    z-index: 9999;
    padding: 80px 24px 24px;
    overflow-y: auto;
    transition: right 0.3s ease;
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.1);
}
.mobile-menu-container.active .mobile-menu {
    right: 0;
}
.mobile-menu-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    font-size: 24px;
    color: inherit;
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: all 0.2s ease;
}
.mobile-menu-close:hover {
    background: rgba(78, 205, 196, 0.1);
}
.mobile-nav-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}
.mobile-nav-menu li {
    border-bottom: 1px solid #e2e8f0;
}
.mobile-nav-menu li:last-child {
    border-bottom: none;
}
.mobile-nav-menu li a {
    display: block;
    padding: 16px 12px;
    text-decoration: none;
    color: inherit;
    font-weight: 500;
    transition: all 0.2s ease;
    border-radius: 8px;
}
.mobile-nav-menu li a:hover {
    background: rgba(78, 205, 196, 0.1);
    padding-left: 20px;
}
.mobile-nav-menu .menu-item-has-children > a {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.mobile-nav-menu .sub-menu {
    display: none;
    list-style: none;
    padding-left: 20px;
    margin: 8px 0;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}
.mobile-nav-menu .sub-menu.active {
    display: block;
    animation: fadeIn 0.2s ease;
}
.mobile-nav-menu .sub-menu li {
    border-bottom: 1px solid #f7fafc;
}
.mobile-nav-menu .sub-menu li:last-child {
    border-bottom: none;
}

.notice-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    backdrop-filter: blur(5px);
}
.notice-popup-content {
    background: #fff;
    padding: 24px;
    max-width: 500px;
    width: 90%;
    border-radius: 16px;
    position: relative;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    animation: scaleIn 0.2s ease;
}
html.dark-mode .notice-popup-content {
    background: #2d3748;
    color: #e2e8f0;
}
.notice-popup-content .notice-title {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 16px;
    color: #2d3748;
    border-bottom: 2px solid #4ecdc4;
    padding-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
}
html.dark-mode .notice-popup-content .notice-title {
    color: #e2e8f0;
    border-bottom-color: #4ecdc4;
}
.notice-popup-content button.notice-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: #f7fafc;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: #718096;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}
.notice-popup-content button.notice-close:hover {
    background: #4ecdc4;
    color: white;
}

.login-popup {
    position: fixed;
    top: calc(100% + 10px);
    right: 0;
    background: #fff;
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    gap: 16px;
    z-index: 10000;
    min-width: 320px;
    transition: all 0.3s ease;
    opacity: 0;
    transform: translateY(-10px) scale(0.95);
    pointer-events: none;
    border: 1px solid #e2e8f0;
    animation: none;
}
.login-popup.active {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
    animation: scaleIn 0.2s ease;
}
html.dark-mode .login-popup {
    background: #2d3748;
    color: #e2e8f0;
    border-color: #4a5568;
}
.login-popup-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 8px;
}
.login-popup-header img {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    border: 2px solid #4ecdc4;
}
.login-popup-header .user-info {
    display: flex;
    flex-direction: column;
    flex: 1;
}
.login-popup-header .user-name {
    font-weight: 600;
    font-size: 18px;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.login-popup-header .user-email {
    font-size: 13px;
    color: #718096;
    margin-top: 2px;
}
html.dark-mode .login-popup-header .user-email {
    color: #a0aec0;
}

.balance-display {
    background: linear-gradient(135deg, #4ecdc4 0%, #42b4ad 100%);
    color: white;
    border-radius: 12px;
    padding: 16px;
    margin: 8px 0;
    position: relative;
    overflow: hidden;
}
.balance-display::before {
    content: '';
    position: absolute;
    top: -50px;
    right: -50px;
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
}
.balance-label {
    font-size: 14px;
    opacity: 0.9;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.balance-label i {
    font-size: 14px;
}
.balance-amount {
    font-size: 24px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.balance-value {
    letter-spacing: 0.5px;
    font-size: 28px;
}
.recharge-button {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    cursor: pointer;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    gap: 4px;
}
#points-progress-area {
    margin: 12px 0;
    padding: 8px 0;
    border-top: 1px solid #e2e8f0;
}
html.dark-mode #points-progress-area {
    border-top-color: #4a5568;
}
.points-progress-label {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    margin-bottom: 6px;
}
.points-progress-bar {
    background: #e2e8f0;
    border-radius: 8px;
    height: 8px;
    overflow: hidden;
}
.points-progress-fill {
    background: linear-gradient(90deg, #4ecdc4, #38b2ac);
    width: 0%;
    height: 100%;
    border-radius: 8px;
    transition: width 0.3s ease;
}
.member-privileges-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    margin-top: 8px;
    font-size: 12px;
    color: #4a5568;
}
html.dark-mode .member-privileges-grid {
    color: #cbd5e0;
}
.member-privileges-grid span {
    display: flex;
    align-items: center;
    gap: 4px;
}
.member-privileges-grid i {
    font-size: 10px;
    color: #4ecdc4;
}
.member-info {
    padding: 12px 0;
    border-top: 1px solid #e2e8f0;
    border-bottom: 1px solid #e2e8f0;
    margin: 12px 0;
}
.member-info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    font-size: 14px;
}
.member-info-label {
    color: #718096;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
}
.member-info-label i {
    font-size: 13px;
}
.member-info-value {
    color: #2d3748;
    font-weight: 600;
    transition: color 0.3s;
}
html.dark-mode .member-info {
    border-color: #4a5568;
}
html.dark-mode .member-info-label {
    color: #a0aec0;
}
html.dark-mode .member-info-value {
    color: #e2e8f0;
}
.level-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    margin-left: 8px;
    color: white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}
.login-popup-actions {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    margin-top: 8px;
}
.login-popup-actions button {
    background: #f7fafc;
    border: none;
    padding: 10px 12px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 500;
}
html.dark-mode .login-popup-actions button {
    background: #4a5568;
    color: #e2e8f0;
}
html.dark-mode .login-popup-actions button:hover {
    background: #4ecdc4;
    color: white;
}
.admin-button {
    background: #f59e0b !important;
    color: white !important;
}
.admin-button:hover {
    background: #d97706 !important;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}
@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 768px) {
    header {
        padding: 0 20px;
        position: relative;
        z-index: 1000;
    }
    .site-nav {
        display: none;
    }
    .mobile-menu-toggle {
        display: block;
    }
    .header-buttons {
        margin-left: auto;
        gap: 8px;
    }
    .header-buttons button {
        padding: 8px;
        font-size: 18px;
    }
    .login-popup {
        position: fixed !important;
        top: 50% !important;
        left: 50% !important;
        right: auto !important;
        transform: translate(-50%, -50%) scale(0.95) !important;
        width: 90% !important;
        max-width: 300px !important;
        margin-top: 0 !important;
    }
    .login-popup.active {
        transform: translate(-50%, -50%) scale(1) !important;
    }
}
@media (max-width: 480px) {
    .header-buttons {
        gap: 4px;
    }
    .header-buttons button {
        font-size: 16px;
        padding: 6px;
    }
    .header-buttons button i {
        font-size: 18px;
    }
    .mobile-menu {
        width: 280px;
        padding: 60px 20px 20px;
    }
    .login-popup-actions {
        grid-template-columns: 1fr;
    }
}

html.dark-mode header {
    border-bottom-color: #4a5568;
}
html.dark-mode .site-nav .nav-menu li ul {
    border-color: #4a5568;
}
html.dark-mode .site-nav .nav-menu li a:hover {
    background: rgba(78, 205, 196, 0.2);
}
html.dark-mode .mobile-nav-menu li a:hover {
    background: rgba(78, 205, 196, 0.2);
}

.user-icon-circle {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: rgba(78, 205, 196, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: #4ecdc4;
}