@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;700&family=Inter:wght@300;400;500;600;700&display=swap');
@import 'animate-fast.css';

:root {
    --neo-dark: #080a0f;
    --neo-green: #10b981;
    --neo-blue: #3b82f6;
}

html,
body {
    background-color: #080a0f;
    /* 统一背景：左下角绿色渐变 */
    background-image: linear-gradient(to top right, rgba(6, 78, 59, 0.4) 0%, transparent 40%);
    background-attachment: fixed;
    color: #e2e8f0;
    font-family: 'Inter', sans-serif;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    line-height: 1.5;
    /* 增加基础行高，防止文字裁剪 */

    /* 减少切换闪烁 */
    transition: background-color 0s;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;

    /* 隐藏非输入框的全局光标闪烁 */
    caret-color: transparent;
}

/* 恢复输入框的光标 */
input, textarea, [contenteditable="true"] {
    caret-color: auto;
}

/* 顶部导航栏稳定性优化，防止 JIT 扫描导致的闪烁 */
.neo-nav-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 50;
    background-color: rgba(8, 10, 15, 0.9) !important;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transform: translateZ(0);
    /* 强制 GPU 渲染 */
}

.nav-top-bar {
    height: 64px;
    display: flex;
    align-items: center;
    position: relative;
    z-index: 60;
}

@media (min-width: 640px) {
    .nav-top-bar {
        height: 80px;
    }
}

/* 页面容器稳定性优化，增加 padding 确保内容完全显示 */
.page-container {
    padding-top: 100px;
    /* 64px nav + 36px space */
    min-height: calc(100vh - 80px);
    /* 确保高度撑满，防止底部上跳 */
}

@media (min-width: 640px) {
    .page-container {
        padding-top: 140px;
        /* 80px nav + 60px space */
    }
}

/* 全局聚焦优化，彻底防止导航或点击时的边框闪烁 */
*:focus,
*:active,
*:focus-visible,
*:focus-within {
    outline: none !important;
    box-shadow: none !important;
}

/* 导航链接稳定性优化 */
.nav-link-custom {
    position: relative;
    transition: color 0.2s ease;
}

.nav-link-custom:hover {
    color: #ffffff !important;
}

/* 预定义激活状态，防止 JIT 延迟导致的闪烁 */
.nav-link-custom.active {
    color: #4ade80 !important;
}

/* 针对移动端菜单项的背景优化 */
.mobile-nav-item {
    transition: background-color 0.2s ease, color 0.2s ease;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
}

.mobile-nav-item.active {
    background-color: rgba(16, 185, 129, 0.1) !important;
    color: #4ade80 !important;
}

/* 移动端菜单按钮深度优化 */
.mobile-menu-trigger,
.mobile-menu-trigger:focus,
.mobile-menu-trigger:active,
.mobile-menu-trigger:hover {
    background-color: transparent !important;
    background-image: none !important;
    box-shadow: none !important;
    outline: none !important;
    border: none !important;
    -webkit-tap-highlight-color: transparent !important;
}

.mobile-menu-trigger i {
    transition: transform 0.3s ease;
}

/* 针对部分浏览器的点击高亮 - 全局应用 */
* {
    -webkit-tap-highlight-color: transparent !important;
    -webkit-focus-ring-color: transparent !important;
    outline: none !important;
}

/* 防止页面切换时链接产生的虚线或系统自带边框 */
a,
button,
div,
span {
    -webkit-tap-highlight-color: transparent;
    -webkit-user-drag: none;
    outline: none !important;
}

a:focus,
a:active,
button:focus,
button:active {
    outline: none !important;
}

/* 动态网格背景 */
.cyber-grid {
    position: fixed;
    inset: 0;
    background-image: linear-gradient(rgba(16, 185, 129, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(16, 185, 129, 0.03) 1px, transparent 1px);
    background-size: 60px 60px;
    mask-image: radial-gradient(circle at 50% 50%, black 0%, transparent 90%);
    z-index: -1;
    animation: moveGrid 30s linear infinite;
}

@keyframes moveGrid {
    0% {
        transform: translate(0, 0);
    }

    100% {
        transform: translate(60px, 60px);
    }
}

@keyframes blob-bounce {
    0% {
        transform: translate(0, 0) scale(1);
    }

    33% {
        transform: translate(40px, -60px) scale(1.1);
    }

    66% {
        transform: translate(-30px, 30px) scale(0.9);
    }

    100% {
        transform: translate(0, 0) scale(1);
    }
}

.animate-blob {
    animation: blob-bounce 15s infinite ease-in-out alternate;
}

.animation-delay-2000 {
    animation-delay: 2s;
}

.animation-delay-4000 {
    animation-delay: 4s;
}

/* 玻璃卡片 */
.glass-panel {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.3s ease;
    transform: translateZ(0);
    /* 稳定渲染，减少闪烁 */
}

.glass-panel:hover {
    border-color: rgba(16, 185, 129, 0.3);
    background: rgba(255, 255, 255, 0.05);
}

.glass-card {
    background: rgba(255, 255, 255, 0.02);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    transform: translateZ(0);
    /* 稳定渲染 */
    border-radius: 24px;
    /* 防止 JIT 加载延迟导致的直角闪烁 (对应 rounded-3xl) */
}

.glass-card:hover {
    border-color: rgba(16, 185, 129, 0.3);
    background: rgba(255, 255, 255, 0.05);
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4), 0 0 20px rgba(16, 185, 129, 0.1);
}

/* 辉光文字 */
.glow-text {
    text-shadow: 0 0 20px rgba(16, 185, 129, 0.3);
}

.feature-item {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 16px;
    transition: all 0.3s ease;
}

.feature-item:hover {
    background: rgba(16, 185, 129, 0.05);
    border-color: rgba(16, 185, 129, 0.2);
}

.animate-float {
    animation: float 6s ease-in-out infinite;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-20px);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in-up {
    animation: fadeInUp 0.8s ease-out forwards;
}

.animation-delay-500 {
    animation-delay: 0.5s;
}

.animation-delay-1000 {
    animation-delay: 1s;
}

/* 页面淡入动画 */
@keyframes pageFadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.page-fade-in {
    animation: pageFadeIn 0.5s ease-out forwards;
}

/* 自动应用到页面容器，配合 Blazor 增强导航 */
.page-container {
    animation: pageFadeIn 0.4s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

/* 全局下拉框暗色主题增强 */
select {
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
    padding-right: 24px !important;
}

select option {
    background: #1a1d24;
    color: #e5e7eb;
    padding: 6px 10px;
}

/* ============================
   EZLink 首页 Spotlight 区域
   ============================ */

.spotlight-section {
    position: relative;
    overflow: hidden;
    background: linear-gradient(180deg, rgba(8, 10, 15, 0) 0%, rgba(16, 185, 129, 0.03) 40%, rgba(16, 185, 129, 0.06) 60%, rgba(8, 10, 15, 0) 100%);
}

/* 背景辉光装饰 */
.spotlight-glow {
    position: absolute;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(16, 185, 129, 0.08) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}

.spotlight-glow-left {
    top: 20%;
    left: -10%;
}

.spotlight-glow-right {
    bottom: -20%;
    right: -10%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(16, 185, 129, 0.04) 0%, transparent 70%);
}

/* 产品截图容器 */
.spotlight-image-wrapper {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid rgba(16, 185, 129, 0.2);
    background: #0d1117;
    box-shadow:
        0 0 30px rgba(16, 185, 129, 0.06),
        0 20px 60px rgba(0, 0, 0, 0.5);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    transform: translateZ(0);
}

.spotlight-image-wrapper:hover {
    border-color: rgba(16, 185, 129, 0.4);
    box-shadow:
        0 0 40px rgba(16, 185, 129, 0.1),
        0 25px 70px rgba(0, 0, 0, 0.6);
    transform: translateY(-4px);
}

.spotlight-image-wrapper img {
    display: block;
    width: 100%;
    height: auto;
    transition: transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

.spotlight-image-wrapper:hover img {
    transform: scale(1.02);
}

/* 旗舰标签 */
.spotlight-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 16px;
    border-radius: 9999px;
    background: linear-gradient(90deg, rgba(16, 185, 129, 0.1), rgba(5, 150, 105, 0.2));
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: #34d399; /* 更明亮的绿色 */
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    box-shadow: 0 0 15px rgba(16, 185, 129, 0.15), inset 0 0 10px rgba(16, 185, 129, 0.1);
    position: relative;
    overflow: hidden;
    animation: spotlight-pulse 3s ease-in-out infinite;
}

.spotlight-badge::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transform: skewX(-20deg);
    animation: shine 4s infinite 1s; /* 延迟1秒执行光泽动画 */
}

@keyframes shine {
    0% { left: -100%; }
    20% { left: 200%; }
    100% { left: 200%; }
}

@keyframes spotlight-pulse {
    0%, 100% {
        box-shadow: 0 0 8px rgba(16, 185, 129, 0.1), inset 0 0 6px rgba(16, 185, 129, 0.05);
        border-color: rgba(16, 185, 129, 0.2);
    }
    50% {
        box-shadow: 0 0 15px rgba(16, 185, 129, 0.2), inset 0 0 10px rgba(16, 185, 129, 0.1);
        border-color: rgba(16, 185, 129, 0.35);
    }
}

/* 特性标签行 */
.spotlight-feature-tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    color: #d1d5db;
    font-size: 14px;
    transition: all 0.3s ease;
}

.spotlight-feature-tag:hover {
    background: rgba(16, 185, 129, 0.08);
    border-color: rgba(16, 185, 129, 0.2);
    color: #f3f4f6;
}

.spotlight-feature-tag i {
    color: #4ade80;
    font-size: 13px;
    width: 16px;
    text-align: center;
}

/* 分隔线 */
.spotlight-divider {
    width: 60px;
    height: 3px;
    border-radius: 2px;
    background: linear-gradient(90deg, #4ade80, transparent);
}