@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap');
body {
    font-family: 'Inter', sans-serif;
    background-color: #fff9bd;
    color: #1a1a1a;
    overflow-x: hidden;
}

.gradient-text {
    background-image: linear-gradient(135deg, #000000 0%, #333333 25%, #666666 50%, #999999 75%, #CCCCCC 100%);
    -webkit-background-clip: text;
    background-clip: text;
    text-shadow: 0 0 30px rgba(0, 0, 0, 0.3);
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
    position: relative;
    z-index: 2;
}

.glowing-card {
    position: relative;
    background-color: #ffffff;
    border: 1px solid #F5EC0F;
    border-radius: 0.75rem;
    padding: 1px;
    transition: all 0.3s ease-in-out;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.glowing-card::before {
    content: '';
    position: absolute;
    inset: -1px;
    z-index: -1;
    border-radius: inherit;
    background: conic-gradient(from 180deg at 50% 50%, #F5EC0F 0deg, #1a1a1a 50%, #F5EC0F 360deg);
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

.glowing-card:hover {
    border-color: transparent;
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.glowing-card:hover::before {
    opacity: 1;
    animation: rotate 4s linear infinite;
}

.card-content {
    background-color: #ffffff;
    padding: 1.5rem;
    border-radius: inherit;
    height: 100%;
    color: #1a1a1a;
}

@keyframes rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.scroll-reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s cubic-bezier(0.645, 0.045, 0.355, 1), transform 0.6s cubic-bezier(0.645, 0.045, 0.355, 1);
    transition-delay: var(--animation-delay, 0s);
}

.scroll-reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}


/* 主标题区域增强对比度 */

.hero-text-container {
    position: relative;
    z-index: 10;
}

.hero-text-container::before {
    content: '';
    position: absolute;
    top: -20px;
    left: -20px;
    right: -20px;
    bottom: -20px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.9) 0%, rgba(255, 246, 16, 0.6) 100%);
    border-radius: 20px;
    backdrop-filter: blur(15px);
    z-index: -1;
    border: 1px solid rgba(245, 236, 15, 0.3);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}


/* 增强文字可读性 */

.hero-text-container p {
    color: #333333;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    padding: 8px 16px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(2px);
    position: relative;
    z-index: 2;
    font-weight: 500;
}

.hero-text-container p::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    z-index: -1;
}


/* 粘性导航栏样式 */

.nav-link {
    position: relative;
    display: inline-block;
    padding: 0.75rem 1.5rem;
    text-decoration: none;
    color: #1a1a1a;
    font-weight: 500;
    font-size: 0.875rem;
    border-radius: 0.5rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid #E5E7EB;
    /* 默认可见边框 */
}

.nav-link:hover {
    color: #1a1a1a;
    background-color: rgba(245, 236, 15, 0.2);
    border-color: #F5EC0F;
    transform: translateY(-1px);
}

.nav-link.active {
    color: #1a1a1a;
    background-color: #F5EC0F;
    border-color: #F5EC0F;
    font-weight: 600;
}


/* Logo 样式 */

.nav-link-logo {
    position: relative;
    display: inline-block;
    text-decoration: none;
    color: #1a1a1a;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-link-logo:hover {
    color: #1a1a1a;
    background-color: rgba(245, 236, 15, 0.2);
    border-color: #F5EC0F;
    transform: translateY(-1px);
}


/* Sign In 按钮样式 */

.nav-link-signin {
    position: relative;
    display: inline-block;
    padding: 0.75rem 1.5rem;
    text-decoration: none;
    color: #1a1a1a;
    font-weight: 600;
    font-size: 1rem;
    /* 比其他链接大一号 */
    border-radius: 0.5rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid #F5EC0F;
    background-color: #F5EC0F;
}

.nav-link-signin:hover {
    color: #1a1a1a;
    background-color: #FFD700;
    border-color: #FFD700;
    transform: translateY(-1px);
}

.nav-text {
    position: relative;
    z-index: 1;
}


/* 响应式设计 */

@media (max-width: 768px) {
    .nav-link,
    .nav-link-logo,
    .nav-link-signin {
        padding: 0.5rem 1rem;
        font-size: 0.8rem;
    }
    .nav-link span,
    .nav-link-logo span,
    .nav-link-signin span {
        display: none;
    }
    .nav-link::before {
        content: attr(data-short);
        display: block;
    }
    .nav-link[data-target="get-started"]::before {
        content: "开始";
    }
    .nav-link[data-target="how-it-works"]::before {
        content: "功能";
    }
    .nav-link[data-target="connect"]::before {
        content: "联系";
    }
    .nav-link-logo::before {
        content: "M";
        display: block;
    }
    .nav-link-signin::before {
        content: "登录";
        display: block;
    }
}

@media (max-width: 480px) {
    .nav-link,
    .nav-link-logo,
    .nav-link-signin {
        padding: 0.4rem 0.8rem;
        font-size: 0.75rem;
    }
}


/* 响应式渐变优化 */

@media (max-width: 768px) {
    .gradient-text {
        background-image: linear-gradient(135deg, #000000 0%, #333333 50%, #666666 100%);
        text-shadow: 0 0 20px rgba(0, 0, 0, 0.4);
    }
    .hero-text-container::before {
        top: -15px;
        left: -15px;
        right: -15px;
        bottom: -15px;
        backdrop-filter: blur(10px);
    }
}

@media (max-width: 480px) {
    .gradient-text {
        background-image: linear-gradient(135deg, #000000 0%, #333333 100%);
        text-shadow: 0 0 15px rgba(0, 0, 0, 0.5);
    }
    .hero-text-container p {
        padding: 6px 12px;
        font-size: 0.9rem;
    }
}


/* 视频展示区域（16:9，带边框，协调风格） */

.video-wrapper {
    position: relative;
}

.video-shell {
    position: relative;
    width: 100%;
    /* 现代浏览器用aspect-ratio保持16:9 */
    aspect-ratio: 16 / 9;
    border-radius: 0.75rem;
    background: #000000;
    border: 1px solid #F5EC0F;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.06);
    overflow: hidden;
}

.video-media {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
}


/* 兼容老旧浏览器：无aspect-ratio时用padding-top技巧 */

@supports not (aspect-ratio: 16 / 9) {
    .video-shell {
        height: 0;
        padding-top: 56.25%;
    }
    .video-media {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        object-fit: contain;
    }
}

/* 视频和图片一行布局样式 */
.media-row-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    margin-bottom: 2rem;
}

/* 在中等屏幕及以上时使用三列布局 */
@media (min-width: 768px) {
    .media-row-container {
        grid-template-columns: repeat(3, 1fr);
        gap: 1.5rem;
    }
}

/* 视频容器样式 */
.media-row-container .video-wrapper {
    height: 100%;
}

/* 视频样式 */
.media-row-container video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 0.75rem;
    border: 1px solid #F5EC0F;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.06);
}

/* 图片容器样式 */
.media-row-container .image-wrapper {
    height: 100%;
    overflow: hidden;
    border-radius: 0.75rem;
    border: 1px solid #F5EC0F;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.06);
}

/* 图片样式 */
.media-row-container .image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.media-row-container .image-wrapper:hover img {
    transform: scale(1.05);
}

/* 确保所有媒体项目高度适中，更美观 */
.media-row-container > div {
    aspect-ratio: 4 / 3; /* 宽:高 = 4:3，更宽一些但仍保持适当高度 */
}

/* 兼容不支持aspect-ratio的浏览器 */
@supports not (aspect-ratio: 4 / 3) {
    .media-row-container > div {
        position: relative;
    }
    .media-row-container > div::before {
        content: '';
        display: block;
        padding-top: 75%; /* 高度是宽度的0.75倍 */
    }
    .media-row-container .video-wrapper video,
    .media-row-container .image-wrapper img {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
    }
}