/**
 * DHv3 公共组件样式
 * 包含: 跑马灯、会员入口、版权信息等通用样式
 *
 * 作者: VT SEO团队
 * 日期: 2026-01-04
 */

/* ==================== 会员入口按钮 ==================== */
.member-entry {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    border-radius: 50%;
    color: #fff;
    text-decoration: none;
    flex-shrink: 0;
    transition: all 0.3s ease;
    overflow: hidden;
    animation: memberShake 2s ease-in-out infinite;
}

.member-entry:hover {
    transform: scale(1.1);
    box-shadow: 0 0 12px rgba(var(--primary-rgb), 0.5);
    animation: none;
}

.member-entry img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.member-entry.logged-in {
    background: linear-gradient(135deg, #ffd700 0%, #ffb347 100%);
    animation: none;
}

.member-entry.logged-in i {
    color: #333;
}

/* 会员入口抖动动画 */
@keyframes memberShake {
    0%, 100% { transform: rotate(0deg); }
    10% { transform: rotate(-8deg); }
    20% { transform: rotate(8deg); }
    30% { transform: rotate(-8deg); }
    40% { transform: rotate(8deg); }
    50%, 100% { transform: rotate(0deg); }
}

/* ==================== 版权信息 ==================== */
.site-footer {
    background: rgba(0,0,0,0.2);
    border-top: 1px solid rgba(255,255,255,0.1);
    padding: var(--spacing-lg) var(--spacing-md);
    margin-top: var(--spacing-lg);
    text-align: center;
}

.footer-content {
    max-width: 600px;
    margin: 0 auto;
}

.footer-copyright {
    color: var(--text-muted);
    font-size: 12px;
    margin: 0 0 var(--spacing-xs) 0;
    line-height: 1.6;
}

.footer-icp {
    color: var(--text-muted);
    font-size: 11px;
    margin: 0;
    opacity: 0.7;
}

.footer-icp a {
    color: var(--primary);
    text-decoration: none;
}

.footer-icp a:hover {
    text-decoration: underline;
}

/* ==================== 导航标签 ==================== */
.nav-tabs {
    display: flex;
    gap: var(--spacing-xs, 4px);
    padding: var(--spacing-sm, 8px) 0;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

/* 空导航隐藏 */
.nav-tabs:empty {
    display: none;
    padding: 0;
}

.nav-tabs::-webkit-scrollbar {
    display: none;
}

.nav-tab {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    padding: var(--spacing-sm, 8px) var(--spacing-xs, 4px);
    background: var(--bg-card, rgba(255,255,255,0.05));
    border-radius: var(--border-radius-sm, 8px);
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid transparent;
    text-decoration: none;
}

.nav-tab:hover {
    background: rgba(255, 107, 157, 0.1);
}

.nav-tab.active {
    background: var(--primary-gradient, linear-gradient(135deg, #ff6b9d 0%, #c44569 100%));
    box-shadow: var(--shadow-glow, 0 4px 15px rgba(255, 107, 157, 0.4));
    border-color: var(--primary, #ff6b9d);
}

.nav-icon {
    font-size: 16px;
    color: var(--text-secondary, #999);
    transition: all 0.2s ease;
}

.nav-tab.active .nav-icon {
    color: #fff;
}

.nav-text {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary, #999);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.nav-tab.active .nav-text {
    color: #fff;
    font-weight: 700;
}

/* ==================== 页面标题栏 ==================== */
.page-title-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: var(--spacing-sm, 8px) var(--spacing-md, 16px);
    background: transparent;
}

.page-title-bar .back-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    color: var(--text-primary, #fff);
    text-decoration: none;
    border-radius: 50%;
    transition: background 0.2s ease;
}

.page-title-bar .back-btn:hover {
    background: rgba(255,255,255,0.1);
}

.page-title-bar .page-title-text {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary, #fff);
    margin: 0;
}

/* ==================== Toast 提示 ==================== */
.toast-container {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 99999;
    pointer-events: none;
}

.toast {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 24px;
    background: rgba(0, 0, 0, 0.85);
    border-radius: 12px;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    animation: toastIn 0.3s ease forwards;
    max-width: 80vw;
}

.toast.hiding {
    animation: toastOut 0.3s ease forwards;
}

.toast-icon {
    font-size: 20px;
    flex-shrink: 0;
}

.toast-icon.success { color: #28a745; }
.toast-icon.error { color: #dc3545; }
.toast-icon.warning { color: #ffc107; }
.toast-icon.info { color: #17a2b8; }

.toast-message {
    font-size: 14px;
    color: #fff;
    line-height: 1.4;
}

@keyframes toastIn {
    0% {
        opacity: 0;
        transform: scale(0.8);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes toastOut {
    0% {
        opacity: 1;
        transform: scale(1);
    }
    100% {
        opacity: 0;
        transform: scale(0.8);
    }
}
