/* Demo IDC 分销平台 - 通用样式 */

/* CSS 变量定义 */
:root {
    /* 主色调 */
    --primary-color: #2563eb;
    --primary-dark: #1e40af;
    --primary-light: #3b82f6;

    /* 辅助色 */
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;

    /* 背景色 */
    --bg-dark: #0f172a;
    --bg-light: #f8fafc;
    --bg-card: #ffffff;
    --bg-hover: #f1f5f9;

    /* 文字颜色 */
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-light: #94a3b8;
    --text-white: #ffffff;

    /* 边框颜色 */
    --border-color: #e2e8f0;
    --border-focus: #2563eb;

    /* 阴影 */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);

    /* 渐变 */
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-blue: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);

    /* 圆角 */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;

    /* 过渡 */
    --transition-fast: 0.15s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
}

/* 重置样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-light);
    padding-top: 80px; /* 为固定定位的 navbar（64px + 边框/阴影）留出空间 */
}

/* 导航栏 */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 64px;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 40px;
    z-index: 1000;
    box-shadow: var(--shadow-sm);
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-icon {
    width: 32px;
    height: 32px;
    color: var(--primary-color);
}

.logo-text {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
}

.navbar-menu {
    display: flex;
    gap: 32px;
}

.nav-link {
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 15px;
    font-weight: 500;
    transition: color var(--transition-fast);
    position: relative;
}

.nav-link:hover {
    color: var(--primary-color);
}

.nav-link.active {
    color: var(--primary-color);
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -20px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--primary-color);
}

.nav-link-disabled {
    color: #94a3b8;
    cursor: not-allowed;
    pointer-events: none;
}

.nav-link-disabled:hover {
    color: #94a3b8;
}

.coming-soon {
    display: inline-block;
    padding: 2px 6px;
    background: #fef3c7;
    color: #92400e;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 500;
    margin-left: 4px;
    vertical-align: middle;
}

.navbar-user {
    display: flex;
    gap: 12px;
    align-items: center;
}

.btn-login,
.btn-register {
    padding: 8px 20px;
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: all var(--transition-fast);
}

.btn-login {
    color: var(--text-secondary);
    background: transparent;
    border: 1px solid var(--border-color);
}

.btn-login:hover {
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-register {
    color: var(--text-white);
    background: var(--primary-color);
    border: 1px solid var(--primary-color);
}

.btn-register:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.user-info {
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
}

.btn-logout {
    padding: 6px 16px;
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    color: var(--danger-color);
    background: transparent;
    border: 1px solid var(--danger-color);
    transition: all var(--transition-fast);
}

.btn-logout:hover {
    background: var(--danger-color);
    color: var(--text-white);
}

/* 图标样式 */
.icon {
    width: 20px;
    height: 20px;
    color: var(--primary-color);
    flex-shrink: 0;
}

/* 响应式设计 */
@media (max-width: 1024px) {
    .navbar {
        padding: 0 20px;
    }

    .navbar-menu {
        gap: 24px;
    }
}

@media (max-width: 768px) {
    .navbar {
        height: auto;
        padding: 16px;
        flex-direction: column;
        align-items: flex-start;
    }

    .navbar-menu {
        width: 100%;
        flex-direction: column;
        gap: 12px;
        margin-top: 16px;
    }

    .nav-link.active::after {
        bottom: -4px;
    }

    .navbar-user {
        width: 100%;
        justify-content: space-between;
        margin-top: 16px;
    }
}

/* 客服按钮 */
.customer-service-btn {
    position: fixed;
    right: 20px;
    bottom: 80px;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #12b7f5 0%, #0099ff 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(18, 183, 245, 0.4);
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 9999;
    text-decoration: none;
    border: none;
    outline: none;
}

.customer-service-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 30px rgba(18, 183, 245, 0.6);
}

.customer-service-btn svg {
    width: 32px;
    height: 32px;
    fill: white;
}

.customer-service-btn .btn-text {
    position: absolute;
    bottom: -28px;
    left: 50%;
    transform: translateX(-50%);
    white-space: nowrap;
    font-size: 12px;
    color: #12b7f5;
    font-weight: 500;
}

/* 客服弹窗 */
.customer-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

.customer-modal-content {
    background: white;
    padding: 32px;
    border-radius: 16px;
    text-align: center;
    max-width: 360px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.customer-modal-title {
    font-size: 20px;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 24px;
}

.customer-qq-number {
    font-size: 28px;
    font-weight: 700;
    color: #12b7f5;
    margin-bottom: 8px;
    letter-spacing: 2px;
}

.customer-modal-tip {
    font-size: 14px;
    color: #64748b;
    margin-bottom: 24px;
}

.customer-modal-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.customer-modal-btn {
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
}

.customer-modal-btn-primary {
    background: linear-gradient(135deg, #12b7f5 0%, #0099ff 100%);
    color: white;
}

.customer-modal-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(18, 183, 245, 0.4);
}

.customer-modal-btn-secondary {
    background: #f1f5f9;
    color: #64748b;
}

.customer-modal-btn-secondary:hover {
    background: #e2e8f0;
}

/* 客服按钮动画效果 */
@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(18, 183, 245, 0.7);
    }
    70% {
        box-shadow: 0 0 0 15px rgba(18, 183, 245, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(18, 183, 245, 0);
    }
}

.customer-service-btn {
    animation: pulse 2s infinite;
}

.customer-service-btn:hover {
    animation: none;
}