@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@700&display=swap');

body {
    font-family: Arial, sans-serif;
    background-image: url('imgs/image.png');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    color: #fff;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* 添加一个半透明的遮罩层，以确保文字可读性 */
body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5); /* 调整最后一个值来改变遮罩的透明度 */
    z-index: -1;
}

header {
    text-align: center; /* 改为居中对齐 */
    padding: 20px;
    background: rgba(0, 0, 0, 0.5);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
}

h1 {
    margin: 0;
    font-size: 2.5rem; /* 稍微增大字体 */
    font-family: 'Playfair Display', serif;
    letter-spacing: 2px; /* 增加字母间距 */
    text-transform: uppercase;
    color: #fff;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
    animation: fadeIn 1.5s ease-out;
    display: inline-block; /* 使标题更好居中 */
}

/* 添加淡入动画关键帧 */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

main {
    flex-grow: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    padding-top: 100px; /* 增加顶部间距 */
    padding-bottom: 100px; /* 增加底部间距 */
}

.content-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 60px; /* 增加间距 */
    max-width: 1600px; /* 增加最大宽度 */
    margin: 0 auto;
    padding: 0 30px;
}

/* 更新照片轮播样式 */
.carousel {
    width: 35%; /* 增加宽度 */
    min-width: 400px; /* 增加最小宽度 */
    margin: 0;
}

/* 更新视频组样式 */
.videos-group {
    width: 40%; /* 增加宽度 */
    display: flex;
    flex-direction: column;
    gap: 30px; /* 增加视频之间的间距 */
    min-width: 450px; /* 增加最小宽度 */
}

.video-container {
    position: relative; /* 添加相对定位 */
    width: 100%;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.3);
    aspect-ratio: 1 / 1;
}

.price-tag {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.8);
    color: #fff;
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 1.1rem;
    font-weight: bold;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(5px);
    transition: transform 0.3s ease;
}

.video-container:hover .price-tag {
    transform: scale(1.1);
}

.video-image {
    width: 100%;
    height: 100%;
    object-fit: cover; /* 确保图片填满容器 */
    transition: transform 0.3s ease;
}

.video-image:hover {
    transform: scale(1.05); /* 保持悬停效果 */
}

/* 适配移动设备 */
@media (max-width: 1200px) {
    .content-container {
        flex-direction: column;
        align-items: center;
        gap: 40px;
    }

    .carousel {
        width: 70%; /* 在平板上的宽度 */
        min-width: auto;
    }

    .videos-group {
        width: 70%; /* 在平板上的宽度 */
        min-width: auto;
    }
}

.carousel-container {
    aspect-ratio: 1 / 1; /* 保持正方形 */
    overflow: hidden;
    position: relative; /* 确保定位正确 */
}

.carousel-container img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* 保持这个属性，以确保图片填满容器 */
    position: absolute;
    opacity: 0; /* 非活动图片保持完全明 */
    transition: opacity 0.5s ease-in-out;
}

.carousel-container img.active {
    opacity: 1; /* 活动（当前显示）的图片设置为完全不透明 */
}

.carousel-button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    color: #fff;
    border: none;
    font-size: 1.5rem;
    padding: 10px 15px;
    cursor: pointer;
    transition: background 0.3s;
}

.carousel-button:hover {
    background: rgba(0, 0, 0, 0.8);
}

.carousel-button.prev {
    left: 10px;
}

.carousel-button.next {
    right: 10px;
}

footer {
    text-align: center;
    padding: 30px 0;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.5);
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 40px; /* 增加图标之间的间距 */
}

.social-icon {
    color: #fff;
    font-size: 2.5rem; /* 增大图标大小 */
    transition: transform 0.3s, color 0.3s;
    text-decoration: none;
}

.social-icon:hover {
    transform: scale(1.2);
}

/* 为每个社交媒体图标添加特定的悬停颜色 */
.social-icon .fa-weixin:hover {
    color: #7BB32E; /* 微信绿色 */
}

.social-icon .fa-tiktok:hover {
    color: #EE1D52; /* 抖音红色 */
}

.social-icon .fa-qq:hover {
    color: #12B7F5; /* QQ蓝色 */
}

.social-accounts {
    font-size: 1rem;
    color: #ccc;
}

.social-accounts p {
    margin: 8px 0;
}

@media (max-width: 768px) {
    h1 {
        font-size: 2.5rem; /* 在小屏幕上稍微减小字体大小 */
    }

    .carousel {
        width: 95%;
    }

    .carousel-button {
        font-size: 1rem;
        padding: 5px 10px;
    }

    .social-icon {
        font-size: 2rem;
    }

    .social-accounts {
        font-size: 0.9rem;
    }
}

.robot {
    position: fixed;
    top: 0;
    left: 0;
    /* Other robot styles */
}

/* 更新AI机器人样式 */
.ai-bot {
    position: fixed;
    top: 20px;
    right: 20px;
    background: rgba(0, 0, 0, 0.9);
    padding: 18px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 1001;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid #00ffff;
    box-shadow: 
        0 0 15px #00ffff,
        inset 0 0 10px rgba(0, 255, 255, 0.5);
}

.ai-bot i {
    font-size: 26px;
    color: #00ffff;
    text-shadow: 0 0 8px #00ffff;
    animation: aiGlow 2s infinite alternate;
}

@keyframes aiGlow {
    from {
        filter: brightness(1);
        text-shadow: 0 0 8px #00ffff;
    }
    to {
        filter: brightness(1.5);
        text-shadow: 0 0 15px #00ffff, 0 0 25px #00ffff;
    }
}

.ai-bot:hover {
    transform: scale(1.1) rotate(360deg);
    background: rgba(0, 0, 0, 0.95);
    border-color: #00ffff;
    box-shadow: 
        0 0 25px #00ffff,
        0 0 50px rgba(0, 255, 255, 0.3),
        inset 0 0 15px rgba(0, 255, 255, 0.5);
}

/* 添加电路板效果 */
.ai-bot::before {
    content: '';
    position: absolute;
    top: -8px;
    left: -8px;
    right: -8px;
    bottom: -8px;
    border: 2px solid transparent;
    border-radius: 50%;
    border-top-color: #00ffff;
    border-bottom-color: #00ffff;
    animation: rotate 3s linear infinite;
}

.ai-bot::after {
    content: '';
    position: absolute;
    top: -4px;
    left: -4px;
    right: -4px;
    bottom: -4px;
    border: 1px solid transparent;
    border-radius: 50%;
    border-left-color: #00ffff;
    border-right-color: #00ffff;
    animation: rotate 2s linear infinite reverse;
}

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

.ai-tooltip {
    position: absolute;
    background: rgba(0, 0, 0, 0.95);
    color: #00ffff;
    padding: 10px 20px;
    border-radius: 20px;
    font-size: 13px;
    white-space: nowrap;
    visibility: hidden;
    opacity: 0;
    transition: all 0.3s ease;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-top: 15px;
    border: 1px solid #00ffff;
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.3);
    backdrop-filter: blur(5px);
}

.ai-bot:hover .ai-tooltip {
    visibility: visible;
    opacity: 1;
    transform: translateX(-50%) translateY(5px);
}

/* 更新呼吸灯效果 */
@keyframes pulse {
    0% {
        box-shadow: 
            0 0 0 0 rgba(0, 123, 255, 0.6),
            0 0 0 0 rgba(0, 123, 255, 0.4);
    }
    50% {
        box-shadow: 
            0 0 20px 0 rgba(0, 123, 255, 0.6),
            0 0 40px 0 rgba(0, 123, 255, 0.4);
    }
    100% {
        box-shadow: 
            0 0 0 0 rgba(0, 123, 255, 0.6),
            0 0 0 0 rgba(0, 123, 255, 0.4);
    }
}

.ai-bot::before {
    content: '';
    position: absolute;
    top: -5px;
    left: -5px;
    right: -5px;
    bottom: -5px;
    border: 2px solid transparent;
    border-radius: 50%;
    border-top-color: #007bff; /* 改为蓝色 */
    border-bottom-color: #007bff; /* 改为蓝色 */
    animation: rotate 3s linear infinite;
}

.ai-tooltip {
    background: rgba(0, 0, 0, 0.9);
    color: #007bff; /* 改为蓝色文字 */
    padding: 8px 15px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    visibility: hidden;
    opacity: 0;
    transition: all 0.3s ease;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-top: 10px;
    border: 1px solid #007bff; /* 改为蓝色边框 */
    box-shadow: 0 0 10px rgba(0, 123, 255, 0.3);
}

/* 更新社交图标容器样式 */
.social-icons {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 40px;
    background: rgba(0, 0, 0, 0.6);
    padding: 15px 30px;
    border-radius: 50px;
    z-index: 1000;
}

.social-icon {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: white;
    text-decoration: none;
    transition: transform 0.3s ease;
}

.social-icon i {
    font-size: 2rem;
    margin-bottom: 5px;
}

.social-icon:hover {
    transform: scale(1.2);
}

/* 保持特定图标的悬停颜色 */
.social-icon .fa-weixin:hover {
    color: #7BB32E;
}

.social-icon .fa-qq:hover {
    color: #12B7F5;
}

.social-icon .fa-tiktok:hover {
    color: #EE1D52;
}

.icon-text {
    font-size: 0.8rem;
    margin-top: 5px;
}

@media (max-width: 768px) {
    .social-icons {
        padding: 10px 20px;
    }

    .social-icon i {
        font-size: 1.5rem;
    }

    .icon-text {
        font-size: 0.7rem;
    }
}

/* 聊天窗口样式 */
.chat-window {
    position: fixed;
    top: 80px;
    right: 20px;
    width: 350px;
    height: 500px;
    background: rgba(0, 0, 0, 0.85);
    border: 1px solid #00ffff;
    border-radius: 15px;
    display: flex;
    flex-direction: column;
    z-index: 1000;
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.3);
    backdrop-filter: blur(10px);
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.chat-header {
    padding: 15px;
    background: linear-gradient(45deg, #000, #004d4d);
    border-radius: 15px 15px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #00ffff;
    border-bottom: 1px solid #00ffff;
}

.chat-header span {
    font-size: 1.1rem;
    text-shadow: 0 0 5px #00ffff;
}

.close-chat {
    background: none;
    border: none;
    color: #00ffff;
    cursor: pointer;
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

.close-chat:hover {
    transform: rotate(90deg);
    color: #ff3366;
}

.chat-messages {
    flex-grow: 1;
    padding: 15px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
    scrollbar-width: thin;
    scrollbar-color: #00ffff #001a1a;
}

.chat-messages::-webkit-scrollbar {
    width: 5px;
}

.chat-messages::-webkit-scrollbar-track {
    background: #001a1a;
}

.chat-messages::-webkit-scrollbar-thumb {
    background: #00ffff;
    border-radius: 10px;
}

.message {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    max-width: 85%;
    animation: messageIn 0.3s ease-out;
}

@keyframes messageIn {
    from {
        transform: translateY(20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.message.user {
    margin-left: auto;
    flex-direction: row-reverse;
}

.message-content {
    background: rgba(0, 255, 255, 0.1);
    padding: 10px 15px;
    border-radius: 15px;
    color: #fff;
    border: 1px solid rgba(0, 255, 255, 0.2);
    box-shadow: 0 0 10px rgba(0, 255, 255, 0.1);
}

.message.user .message-content {
    background: rgba(0, 255, 255, 0.2);
    border-color: rgba(0, 255, 255, 0.3);
}

.message i {
    color: #00ffff;
    font-size: 1.2rem;
    text-shadow: 0 0 5px #00ffff;
}

.chat-input {
    padding: 15px;
    display: flex;
    gap: 10px;
    border-top: 1px solid rgba(0, 255, 255, 0.2);
}

.chat-input input {
    flex-grow: 1;
    padding: 10px 15px;
    border: none;
    border-radius: 20px;
    background: rgba(0, 255, 255, 0.1);
    color: #fff;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 255, 255, 0.2);
}

.chat-input input:focus {
    outline: none;
    background: rgba(0, 255, 255, 0.15);
    border-color: #00ffff;
    box-shadow: 0 0 10px rgba(0, 255, 255, 0.2);
}

.chat-input button {
    background: linear-gradient(45deg, #006666, #00cccc);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    color: #fff;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 0 10px rgba(0, 255, 255, 0.2);
}

.chat-input button:hover {
    transform: scale(1.1);
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.4);
}

.chat-input button i {
    font-size: 1rem;
    text-shadow: 0 0 5px rgba(255, 255, 255, 0.5);
}

.video-container iframe {
    width: 100%;
    height: 100%;
    aspect-ratio: 16 / 9;
    border: none;
}

/* 更新轮播图片的动画效果 */
.carousel-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    opacity: 0;
    transition: opacity 1s ease-in-out; /* 增加过渡时间 */
}

.carousel-container img.active {
    opacity: 1;
}

/* 更新右侧图片的动画效果 */
.video-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0; /* 初始透明 */
    animation: fadeIn 1.5s ease-in-out forwards; /* 添加渐显动画 */
    transition: transform 0.3s ease;
}

/* 添加渐显动画 */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* 为不同图片设置不同的动画延迟，创造错落感 */
.video-container:nth-child(1) .video-image {
    animation-delay: 0.3s;
}

.video-container:nth-child(2) .video-image {
    animation-delay: 0.6s;
}
