/* 全局字体抗锯齿设置 - 解决Chrome锯齿问题 */
* {
    -webkit-font-smoothing: antialiased;
    /* 针对WebKit浏览器，使字体平滑 */
    -moz-osx-font-smoothing: grayscale;
    /* 针对Firefox on macOS，模拟苹果的渲染风格 */
}

/* 全局字体设置 - 使用tailwind.js中定义的字体 */
body,
html {
    font-family: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;
}

/* 增强hero区域过渡效果 */
.animated-bg-1 {
    background: linear-gradient(135deg,
            oklch(54.6% 0.245 262.881 / 0.2),
            oklch(58.8% 0.158 241.966 / 0.2),
            oklch(71.5% 0.143 215.221 / 0.2));
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}


/* 现代化导航栏样式 */
.nav-menu-item {
    color: #4b5563;
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

.nav-menu-item.active {
    background: linear-gradient(135deg, rgb(59 130 246), rgb(37 99 235));
    color: white;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.25);
}

.mobile-nav-menu-item {
    color: #4b5563;
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

.mobile-nav-menu-item.active {
    background: linear-gradient(135deg, rgb(59 130 246), rgb(37 99 235));
    color: white;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.25);
}

/* 导航栏Logo样式 */
.navbar-brand {
    display: flex;
    align-items: center;
    gap: 1rem;
    text-decoration: none;
    transition: all 0.3s ease;
}

.navbar-brand:hover {
    transform: translateY(-1px);
}

/* 添加导航栏激活状态指示器 */
.nav-menu-item.active::before {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 3px;
    background: linear-gradient(90deg, rgb(59, 130, 246), rgb(99, 102, 241));
    border-radius: 2px;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        width: 0;
        opacity: 0;
    }

    to {
        width: 20px;
        opacity: 1;
    }
}

/* 移动端菜单动画 */
#mobile-menu {
    animation: slideDown 0.3s ease when not hidden;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}


/* Footer 响应式优化 */
@media (max-width: 768px) {
    footer .py-12 {
        padding-top: 2rem;
        padding-bottom: 2rem;
    }

    footer h3 {
        font-size: 1.125rem;
    }

    footer p {
        font-size: 0.875rem;
        padding: 0 1rem;
    }

    footer .w-12.h-12 {
        width: 2.5rem;
        height: 2.5rem;
    }

    footer .text-xl {
        font-size: 1rem;
    }
}

@media (max-width: 640px) {
    footer .mb-8 {
        margin-bottom: 1.5rem;
    }

    footer .mb-6 {
        margin-bottom: 1rem;
    }

    footer .px-6 {
        padding-left: 1rem;
        padding-right: 1rem;
    }
}

@keyframes floatingBlue {

    0%,
    100% {
        background-position: 0% 50%;
    }

    25% {
        background-position: 25% 75%;
    }

    50% {
        background-position: 100% 50%;
    }

    75% {
        background-position: 75% 25%;
    }
}


/* 参考用户提供的标题动画样式 */
@keyframes fadeIn {
    0% {
        opacity: 0;
        filter: blur(10px);
    }

    50%,
    100% {
        opacity: 1;
        filter: blur(0px);
    }
}

@-webkit-keyframes fadeIn {
    0% {
        opacity: 0;
        filter: blur(10px);
    }

    50%,
    100% {
        opacity: 1;
        filter: blur(0px);
    }
}

.animated-bg {
    background: linear-gradient(135deg,
            rgba(168, 222, 252, 0.9) 0%,
            rgba(125, 211, 252, 0.5) 25%,
            rgba(186, 230, 253, 0.7) 50%,
            rgba(125, 211, 252, 0.5) 75%,
            rgba(143, 215, 254, 0.9) 100%);
    background-size: 400% 400%;
    animation: floatingBlue 12s ease-in-out infinite;
    position: relative;
    min-height: 100vh;
}



/* 为不支持background-clip的浏览器提供备用样式 */
@supports not (-webkit-background-clip: text) {
    .gradient-text {
        color: #1e40af !important;
        background: none !important;
        animation: none !important;
        text-shadow: none !important;
    }

    .gradient-text span {
        opacity: 1 !important;
        animation: none !important;
        transform: none !important;
        filter: none !important;
    }
}

/* Footer 响应式优化 */
@media (max-width: 768px) {
    footer .py-12 {
        padding-top: 2rem;
        padding-bottom: 2rem;
    }

    footer h3 {
        font-size: 1.125rem;
    }

    footer p {
        font-size: 0.875rem;
        padding: 0 1rem;
    }

    footer .w-12.h-12 {
        width: 2.5rem;
        height: 2.5rem;
    }

    footer .text-xl {
        font-size: 1rem;
    }
}

@media (max-width: 640px) {
    footer .mb-8 {
        margin-bottom: 1.5rem;
    }

    footer .mb-6 {
        margin-bottom: 1rem;
    }

    footer .px-6 {
        padding-left: 1rem;
        padding-right: 1rem;
    }
}

/* 漂浮元素样式 */
.floating-square,
.floating-circle {
    position: absolute;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.2), rgba(147, 197, 253, 0.2));
    backdrop-filter: blur(8px);
    border: 1px solid rgba(59, 130, 246, 0.3);
    box-shadow: 0 8px 32px rgba(59, 130, 246, 0.4);
    transition: all 0.1s ease-out;
}

.floating-square {
    border-radius: 8px;
}

.floating-circle {
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.2), rgba(110, 231, 183, 0.2));
    border: 1px solid rgba(16, 185, 129, 0.3);
    box-shadow: 0 8px 32px rgba(16, 185, 129, 0.4);
}

/* 各个元素的位置和大小 - 减少到10个元素 */
.floating-square:nth-child(1) {
    width: 80px;
    height: 80px;
    top: 10%;
    left: -40px;
    z-index: 15;
}

.floating-square:nth-child(2) {
    width: 60px;
    height: 60px;
    top: 60%;
    left: -30px;
    z-index: 20;
}

.floating-circle:nth-child(3) {
    width: 50px;
    height: 50px;
    top: 30%;
    right: -25px;
    z-index: 15;
}

.floating-square:nth-child(4) {
    width: 70px;
    height: 70px;
    bottom: 20%;
    right: -35px;
    z-index: 20;
}

.floating-circle:nth-child(5) {
    width: 40px;
    height: 40px;
    top: 80%;
    left: -20px;
    z-index: 15;
}

.floating-square:nth-child(6) {
    width: 55px;
    height: 55px;
    top: 5%;
    right: -27px;
    z-index: 20;
}

.floating-circle:nth-child(7) {
    width: 65px;
    height: 65px;
    bottom: 10%;
    left: -32px;
    z-index: 15;
}

.floating-circle:nth-child(8) {
    width: 45px;
    height: 45px;
    top: 45%;
    left: -22px;
    z-index: 20;
}

.floating-square:nth-child(9) {
    width: 75px;
    height: 75px;
    top: 25%;
    right: -37px;
    z-index: 15;
}

.floating-circle:nth-child(10) {
    width: 55px;
    height: 55px;
    bottom: 35%;
    right: -27px;
    z-index: 1;
}

/* 响应式设计 - 漂浮元素 */
@media (max-width: 768px) {

    .floating-square,
    .floating-circle {
        display: none;
    }
}

@media (max-width: 1024px) {
    .floating-square:nth-child(1) {
        width: 60px;
        height: 60px;
        left: -30px;
    }

    .floating-square:nth-child(2) {
        width: 45px;
        height: 45px;
        left: -22px;
    }

    .floating-circle:nth-child(3) {
        width: 40px;
        height: 40px;
        right: -20px;
    }

    .floating-square:nth-child(4) {
        width: 55px;
        height: 55px;
        right: -27px;
    }

    .floating-circle:nth-child(5) {
        width: 35px;
        height: 35px;
        left: -17px;
    }

    .floating-square:nth-child(6) {
        width: 45px;
        height: 45px;
        right: -22px;
    }

    .floating-circle:nth-child(7) {
        width: 50px;
        height: 50px;
        left: -25px;
    }

    .floating-circle:nth-child(8) {
        width: 40px;
        height: 40px;
        left: -20px;
    }

    .floating-square:nth-child(9) {
        width: 60px;
        height: 60px;
        right: -30px;
    }

    .floating-circle:nth-child(10) {
        width: 45px;
        height: 45px;
        right: -22px;
    }
}


/* 模态框响应式设计 */
@media (max-width: 768px) {
    .modal-content {
        width: 95%;
        max-width: none;
        max-height: 90vh;
        margin: 20px;
    }

    .modal-header {
        padding: 16px 20px;
    }

    .modal-title {
        font-size: 18px;
    }

    .close-btn {
        width: 32px;
        height: 32px;
        font-size: 20px;
    }

    .highlight-content {
        padding: 20px;
        font-size: 14px;
        max-height: 70vh;
    }
}

@media (max-width: 480px) {
    .modal-content {
        width: 98%;
        margin: 10px;
        border-radius: 12px;
    }

    .modal-header {
        padding: 12px 16px;
    }

    .modal-title {
        font-size: 16px;
    }

    .close-btn {
        width: 28px;
        height: 28px;
        font-size: 18px;
    }

    .highlight-content {
        padding: 16px;
        font-size: 13px;
        line-height: 1.6;
    }
}