

/* =====================
   英雄区域 - 科幻风格
===================== */
.hero-section {
    background: linear-gradient(135deg, 
        var(--bg) 0%, 
        var(--panel) 25%, 
        var(--line-soft) 50%, 
        var(--line-main) 75%, 
        var(--accent) 100%);
    color: var(--text);
    padding: 140px 20px;
    text-align: center;
    min-height: 70vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    margin-top: 70px;
    position: relative;
    
    /* 科幻风格投影 */
    filter: 
        drop-shadow(0 0 3px var(--line-main)) 
        drop-shadow(0 0 1px var(--line-main));
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 20% 80%, var(--line-soft) 0%, transparent 50%);
    pointer-events: none;
}

.hero-title {
    font-size: 4rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    text-shadow: 
        0 0 20px var(--line-main),
        2px 2px 4px rgba(0,0,0,0.3);
    letter-spacing: 2px;
    position: relative;
}

.hero-subtitle {
    font-size: 1.6rem;
    margin-bottom: 2.5rem;
    opacity: 0.95;
    text-shadow: 0 0 10px var(--line-soft);
    font-weight: 300;
}

/* =====================
   科幻按钮系统
===================== */
.cta-button {
    position: relative;
    padding: 18px 35px;
    background: 
        linear-gradient(45deg, 
            transparent 25%, 
            rgba(255, 255, 255, 0.05) 25%, 
            rgba(255, 255, 255, 0.05) 50%, 
            transparent 50%, 
            transparent 75%, 
            rgba(255, 255, 255, 0.05) 75%
        ),
        var(--panel);
    background-size: 8px 8px;
    border: none;
    color: var(--text);
    font-size: 1.2rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    
    /* 立体效果 - 不对称高光 */
    box-shadow: 
        inset 1px 1px 0 rgba(255, 255, 255, 0.15),
        inset -3px -2px 4px rgba(255, 255, 255, 0.3),
        inset 2px 3px 4px rgba(0, 0, 0, 0.1);
    
    /* 不对称机械切角 */
    clip-path: polygon(
        12px 0,
        calc(100% - 8px) 0,
        100% 12px,
        100% calc(100% - 8px),
        calc(100% - 12px) 100%,
        8px 100%,
        0 calc(100% - 12px),
        0 8px
    );
}

/* 外描边 - 不对称全息边框 */
.cta-button::before {
    content: "";
    position: absolute;
    inset: -2px;
    border: 2px solid var(--line-main);
    clip-path: inherit;
    box-shadow: 
        0 0 6px var(--line-main),
        0 0 12px var(--line-main),
        0 0 20px var(--line-main),
        inset 0 0 4px var(--line-main);
    animation: hologram-pulse 3s ease-in-out infinite;
}

/* 内描边 - 不对称能量脉冲 */
.cta-button::after {
    content: "";
    position: absolute;
    inset: 3px;
    border: 1px solid var(--line-soft);
    clip-path: inherit;
    box-shadow: 
        0 0 3px var(--line-soft),
        0 0 8px var(--line-soft),
        inset 0 0 2px var(--line-soft);
    animation: energy-pulse 2s ease-in-out infinite;
}

.cta-button:hover {
    transform: translateY(-3px);
    
    /* 悬浮增强立体效果 */
    box-shadow: 
        inset 1px 1px 0 rgba(255, 255, 255, 0.2),
        inset -4px -3px 6px rgba(255, 255, 255, 0.4),
        inset 3px 4px 6px rgba(0, 0, 0, 0.15);
}

.cta-button:hover::before {
    box-shadow: 
        0 0 8px var(--line-main),
        0 0 15px var(--line-main),
        0 0 25px var(--line-main),
        inset 0 0 6px var(--line-main);
    animation-duration: 1.5s;
}

.cta-button:hover::after {
    box-shadow: 
        0 0 5px var(--line-soft),
        0 0 12px var(--line-soft),
        0 0 20px var(--line-soft),
        inset 0 0 3px var(--line-soft);
    animation-duration: 1s;
}

/* 科幻动画效果 */
@keyframes hologram-pulse {
    0%, 100% {
        opacity: 0.8;
        box-shadow: 
            0 0 8px var(--line-main),
            0 0 15px var(--line-main),
            0 0 25px var(--line-main),
            inset 0 0 5px var(--line-main);
    }
    50% {
        opacity: 1;
        box-shadow: 
            0 0 12px var(--line-main),
            0 0 20px var(--line-main),
            0 0 35px var(--line-main),
            inset 0 0 8px var(--line-main);
    }
}

@keyframes energy-pulse {
    0%, 100% {
        opacity: 0.8;
        box-shadow: 
            0 0 8px var(--line-soft),
            0 0 15px var(--line-soft),
            0 0 25px var(--line-soft),
            inset 0 0 4px var(--line-soft);
    }
    50% {
        opacity: 1;
        box-shadow: 
            0 0 12px var(--line-soft),
            0 0 22px var(--line-soft),
            0 0 35px var(--line-soft),
            inset 0 0 6px var(--line-soft);
    }
}

/* =====================
   科幻卡片系统 - 功能特色区域
===================== */
.features-section {
    padding: 80px 20px;
    background: transparent;
    border: none;
    box-shadow: none;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 32px;
    max-width: 1200px;
    margin: 0 auto;
}

.feature-card {
    position: relative;
    height: 280px;
    /* 科幻风格投影 */
    filter: 
        drop-shadow(0 0 1px var(--line-main)) 
        drop-shadow(0 0 3px var(--line-main));
    cursor: pointer;
    transition: all 0.3s ease;
}

.feature-card .card-frame {
    position: relative;
    width: 100%;
    height: 100%;
    background: var(--bg-panel);
    
    /* 立体效果 - 右下方向白色高光 */
    box-shadow: 
        inset 0 1px 0 rgba(255, 255, 255, 0.1),
        inset -2px -2px 4px rgba(255, 255, 255, 0.3),
        inset 2px 2px 4px rgba(0, 0, 0, 0.1);

    /* 主形状 - 机械切角 */
    clip-path: polygon(
        12px 0,
        calc(100% - 20px) 0,
        100% 16px,
        100% calc(100% - 12px),
        calc(100% - 12px) 100%,
        16px 100%,
        0 calc(100% - 16px),
        0 12px
    );
}



/* 卡片内描边 */
.feature-card .card-frame::after {
    content: "";
    position: absolute;
    inset: 4px;
    border: 1px solid var(--line-soft);
    clip-path: inherit;
    box-shadow: 
        0 0 6px var(--line-soft),
        0 0 12px var(--line-soft),
        0 0 20px var(--line-soft),
        inset 0 0 3px var(--line-soft);
    animation: energy-pulse 2s ease-in-out infinite;
}

/* 卡片悬浮效果 */
.feature-card:hover {
    filter: 
        drop-shadow(0 0 5px var(--line-main)) 
        drop-shadow(0 0 12px var(--line-main));
}

.feature-card:hover .card-frame {
    transform: translateY(-5px);
    box-shadow: 
        inset 0 1px 0 rgba(255, 255, 255, 0.15),
        inset -3px -3px 6px rgba(255, 255, 255, 0.4),
        inset 3px 3px 6px rgba(0, 0, 0, 0.15);
}

/* 卡片切角装饰 */
.feature-card .card-cut {
    position: absolute;
    width: 10px;
    height: 10px;
    background: var(--line-main);
    box-shadow: 
        0 0 10px var(--line-main),
        0 0 20px var(--line-main),
        inset 0 0 3px rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
    z-index: 3;
}

.feature-card .card-cut-tl {
    top: -1px;
    left: 12px;
}

.feature-card .card-cut-br {
    bottom: -1px;
    right: 16px;
}

.feature-card:hover .card-cut {
    transform: scale(1.1);
    box-shadow: 
        0 0 15px var(--line-main),
        0 0 30px var(--line-main),
        inset 0 0 5px rgba(255, 255, 255, 0.4);
}

/* 卡片栅格装饰 */
.feature-card .card-vent {
    position: absolute;
    width: 4px;
    height: 20px;
    background: repeating-linear-gradient(
        135deg,
        var(--line-main) 0 1px,
        transparent 1px 3px
    );
    box-shadow: 
        0 0 8px var(--line-main),
        0 0 16px var(--line-main),
        inset 0 0 3px rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
    z-index: 3;
}

.feature-card .card-vent-left {
    left: -2px;
    top: 20px;
}

.feature-card .card-vent-right {
    right: -2px;
    top: 15px;
}

.feature-card:hover .card-vent {
    transform: scale(1.05);
    box-shadow: 
        0 0 12px var(--line-main),
        0 0 25px var(--line-main),
        inset 0 0 5px rgba(255, 255, 255, 0.3);
}

/* 卡片内容 */
.feature-card .card-content {
    position: relative;
    z-index: 2;
    padding: 40px 30px;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    filter: drop-shadow(0 0 8px var(--line-soft));
}

.feature-title {
    font-size: 1.5rem;
    font-weight: bold;
    margin-bottom: 1rem;
    color: var(--text);
    text-shadow: 0 0 5px var(--line-soft);
}

.feature-description {
    color: var(--text);
    opacity: 0.8;
    line-height: 1.6;
    font-size: 0.95rem;
}

/* 轮播图样式 - 科幻风格 */
.slideshow-section {
    padding: 2rem 0;
    position: relative;
    overflow: hidden;
    margin-top: 1rem;
    min-height: 540px; /* slideshow-container的500px + 上下padding各20px */
}

.slideshow-container {
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    border-radius: 0;
    background: var(--bg-panel);
    border: 1px solid var(--line-main);
    box-shadow: 
        0 0 0 1px var(--line-main),
        0 0 20px rgba(0, 255, 255, 0.1),
        inset 0 0 20px rgba(0, 0, 0, 0.3);
    animation: hologram-pulse 4s ease-in-out infinite;
    height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.slideshow-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        linear-gradient(90deg, transparent 50%, rgba(0, 255, 255, 0.05) 50%) 0 0 / 20px 20px,
        linear-gradient(0deg, transparent 50%, rgba(0, 255, 255, 0.05) 50%) 0 0 / 20px 20px;
    pointer-events: none;
    z-index: 1;
}

.slide {
    display: none;
    position: relative;
    width: 100%;
    height: 100%;
}

.slide.active {
    display: block;
}

.slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    filter: brightness(0.9) contrast(1.1);
}

.slide-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: var(--panel);
    border: 1px solid var(--line-main);
    width: 60px;
    height: 60px;
    border-radius: 0;
    font-size: 28px;
    color: var(--text);
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    box-shadow: 
        0 0 0 1px var(--line-main),
        0 0 15px rgba(0, 255, 255, 0.3);
    z-index: 10;
}

.slide-nav:hover {
    background: var(--panel);
    transform: translateY(-50%) scale(1.1);
    box-shadow: 
        0 0 0 1px var(--line-main),
        0 0 25px rgba(0, 255, 255, 0.5);
    animation: energy-pulse 1.5s ease-in-out infinite;
}

.slide-prev {
    left: 25px;
}

.slide-next {
    right: 25px;
}

.slide-controls {
    position: absolute;
    bottom: 25px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 15px;
    z-index: 10;
    background: rgba(0, 0, 0, 0.5);
    padding: 10px 20px;
    border-radius: 0;
    border: 1px solid var(--line-main);
    backdrop-filter: blur(10px);
}

.slide-indicator {
    width: 15px;
    height: 15px;
    border-radius: 0;
    background: rgba(255, 255, 255, 0.3);
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid var(--line-main);
}

.slide-indicator.active {
    background: var(--line-main);
    transform: scale(1.2);
    box-shadow: 0 0 10px rgba(0, 255, 255, 0.5);
}

.slideshow-container .scroll-arrow {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    z-index: 10;
    margin: 0;
}

.arrow-down {
    display: inline-block;
    width: 0;
    height: 0;
    border-left: 15px solid transparent;
    border-right: 15px solid transparent;
    border-top: 15px solid rgba(255, 255, 255, 0.8);
    cursor: pointer;
    animation: bounce 2s infinite;
    filter: drop-shadow(0 0 5px rgba(0, 255, 255, 0.5));
}

.arrow-down:hover {
    border-top-color: rgba(255, 255, 255, 1);
    filter: drop-shadow(0 0 10px rgba(0, 255, 255, 0.8));
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

.features-section {
    padding: 30px 20px;
    max-width: 1200px;
    margin: 0 auto;
    background: transparent;
    backdrop-filter: none;
    border-radius: 0;
    margin-top: 20px;
    margin-bottom: 20px;
    border: none;
}

.text-center {
    text-align: center;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 40px;
    margin-top: 30px;
}

/* =====================
   科幻介绍区域
===================== */
.introduction-section {
    padding: 80px 20px;
    max-width: 1200px;
    margin: 0 auto;
    margin-top: 40px;
    margin-bottom: 40px;
    display: flex;
    flex-direction: column;
    gap: 60px;
}

.introduction-item {
    position: relative;
    height: 400px;
    width: 100%;
    background: var(--bg-panel);
    margin-bottom: 0;
    border-radius: 0;
    padding: 0;
    transition: all 0.3s ease;
    
    /* 科幻风格投影 */
    filter: 
        drop-shadow(0 0 1px var(--line-main)) 
        drop-shadow(0 0 3px var(--line-main));
    
    /* 立体效果 - 右下方向白色高光 */
    box-shadow: 
        inset 0 1px 0 rgba(255, 255, 255, 0.1),
        inset -2px -2px 4px rgba(255, 255, 255, 0.3),
        inset 2px 2px 4px rgba(0, 0, 0, 0.1);

    /* 主形状 - 机械切角 */
    clip-path: polygon(
        20px 0,
        calc(100% - 30px) 0,
        100% 25px,
        100% calc(100% - 20px),
        calc(100% - 20px) 100%,
        25px 100%,
        0 calc(100% - 25px),
        0 20px
    );
}


/* 卡片外描边 */
.introduction-item::before {
    content: "";
    position: absolute;
    inset: -2px;
    border: 2px solid var(--line-main);
    clip-path: inherit;
    box-shadow: 
        0 0 6px var(--line-main),
        0 0 12px var(--line-main),
        0 0 20px var(--line-main),
        inset 0 0 4px var(--line-main);
    animation: hologram-pulse 3s ease-in-out infinite;
}

/* 卡片内描边 */
.introduction-item::after {
    content: "";
    position: absolute;
    inset: 4px;
    border: 1px solid var(--line-soft);
    clip-path: inherit;
    box-shadow: 
        0 0 6px var(--line-soft),
        0 0 12px var(--line-soft),
        0 0 20px var(--line-soft),
        inset 0 0 3px var(--line-soft);
    animation: energy-pulse 2s ease-in-out infinite;
}

/* 卡片悬浮效果 */
.introduction-item:hover {
    filter: 
        drop-shadow(0 0 5px var(--line-main)) 
        drop-shadow(0 0 12px var(--line-main));
    transform: translateY(-5px);
    box-shadow: 
        inset 0 1px 0 rgba(255, 255, 255, 0.15),
        inset -3px -3px 6px rgba(255, 255, 255, 0.4),
        inset 3px 3px 6px rgba(0, 0, 0, 0.15);
}

/* 卡片切角装饰 */
.introduction-item .card-cut {
    position: absolute;
    width: 14px;
    height: 14px;
    background: var(--line-main);
    box-shadow: 
        0 0 10px var(--line-main),
        0 0 20px var(--line-main),
        inset 0 0 3px rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
    z-index: 3;
}

.introduction-item .card-cut-tl {
    top: -1px;
    left: 20px;
}

.introduction-item .card-cut-br {
    bottom: -1px;
    right: 25px;
}

.introduction-item:hover .card-cut {
    transform: scale(1.1);
    box-shadow: 
        0 0 15px var(--line-main),
        0 0 30px var(--line-main),
        inset 0 0 5px rgba(255, 255, 255, 0.4);
}

/* 卡片栅格装饰 */
.introduction-item .card-vent {
    position: absolute;
    width: 6px;
    height: 28px;
    background: repeating-linear-gradient(
        135deg,
        var(--line-main) 0 2px,
        transparent 2px 4px
    );
    box-shadow: 
        0 0 8px var(--line-main),
        0 0 16px var(--line-main),
        inset 0 0 3px rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
    z-index: 3;
}

.introduction-item .card-vent-left {
    left: -3px;
    top: 50px;
}

.introduction-item .card-vent-right {
    right: -3px;
    top: 40px;
}

.introduction-item:hover .card-vent {
    transform: scale(1.05);
    box-shadow: 
        0 0 12px var(--line-main),
        0 0 25px var(--line-main),
        inset 0 0 5px rgba(255, 255, 255, 0.3);
}

/* 卡片内容 */
.introduction-item .card-content {
    position: relative;
    z-index: 2;
    padding: 0;
    height: 100%;
    width: 100%;
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 0;
    align-items: stretch;
    overflow: hidden;
    border-radius: 0;
}

.introduction-image {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    overflow: hidden;
    position: relative;
}

.introduction-image img {
    width: calc(100% - 40px);
    height: calc(100% - 40px);
    object-fit: cover;
    object-position: center 40%;
    border-radius: 0;
    filter: brightness(0.95) contrast(1.05);
    box-shadow: none;
}

.introduction-content {
    padding: 60px 50px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    height: 100%;
}

.introduction-title {
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 25px;
    color: var(--text);
    text-shadow: 0 0 10px var(--line-soft);
}

.introduction-text {
    font-size: 1.15rem;
    line-height: 1.7;
    color: var(--text);
    opacity: 0.8;
    font-weight: 300;
}

/* 适配第二个介绍项（图片在右侧） */
.introduction-item:nth-child(2) .card-content {
    grid-template-columns: 0.8fr 1.2fr;
}

.introduction-item:nth-child(2) .introduction-image {
    order: 2;
}

.introduction-item:nth-child(2) .introduction-content {
    order: 1;
}

.footer-section {
    padding: 3rem 2rem;
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.1) 0%, rgba(0, 123, 255, 0.1) 100%);
    border-top: 1px solid rgba(0, 212, 255, 0.1);
}

.footer-grid {
    display: flex;
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto;
    gap: 3rem;
}

.footer-column {
    flex: 1;
    min-width: 200px;
    padding: 0;
}

.footer-column h3 {
    color: var(--line-main);
    font-size: 1.1rem;
    margin-bottom: 1rem;
    font-weight: 600;
    border-bottom: 1px solid rgba(0, 212, 255, 0.2);
    padding-bottom: 0.5rem;
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.2s ease;
    padding: 0.2rem 0;
    font-size: 0.9rem;
    position: relative;
}

.footer-links a:hover {
    color: var(--line-main);
    transform: translateX(3px);
}

.footer-links a {
    position: relative;
    display: inline-block;
}

.footer-links a::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -2px;
    width: 0;
    height: 1px;
    background: var(--line-main);
    box-shadow: 0 0 4px var(--line-main);
    transition: width 0.3s ease;
}

.footer-links a:hover::after {
    width: 100%;
}

.footer-column:hover {
    transform: none;
    box-shadow: none;
    animation: none;
}

/* =====================
   Spark AI助手容器样式
===================== */
.spark-container {
    position: fixed;
    top: 70px;
    right: -500px;
    width: 400px;
    height: calc(100vh - 140px);
    background: var(--panel);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    
    /* 科幻风格投影 - 立体凸出效果 */
    filter: 
        drop-shadow(0 0 3px var(--line-main)) 
        drop-shadow(0 0 1px var(--line-main));
    
    /* 立体效果 */
    box-shadow: 
        inset 0 1px 0 rgba(255, 255, 255, 0.1),
        inset -2px -2px 4px rgba(255, 255, 255, 0.3),
        inset 2px 2px 4px rgba(0, 0, 0, 0.1);

    /* 机械切角 */
    clip-path: polygon(
        12px 0,
        calc(100% - 8px) 0,
        100% 12px,
        100% calc(100% - 8px),
        calc(100% - 12px) 100%,
        8px 100%,
        0 calc(100% - 12px),
        0 8px
    );
}

.spark-container.open {
    opacity: 1;
    visibility: visible;
    right: 0;
}

/* 移动端适配 */
@media (max-width: 768px) {
    .spark-container {
        width: 95vw;
        height: calc(100vh - 80px);
        max-width: none;
        max-height: none;
        min-width: 300px;
        min-height: 400px;
        top: 40px;
        right: -100vw;
    }
    
    .spark-container.open {
        right: 0;
    }
}

.spark-chat-bubble {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background: var(--accent);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 999;
    box-shadow: 
        0 0 15px var(--accent),
        0 0 30px var(--accent),
        inset 0 0 5px rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
    animation: bubble-pulse 2s ease-in-out infinite;
}

.spark-chat-bubble:hover {
    transform: scale(1.1);
    box-shadow: 
        0 0 20px var(--accent),
        0 0 40px var(--accent),
        inset 0 0 8px rgba(255, 255, 255, 0.4);
    animation-duration: 1s;
}

.spark-chat-bubble ion-icon {
    font-size: 28px;
    color: white;
}

.spark-chat-bubble.hidden {
    opacity: 0;
    visibility: hidden;
    transform: scale(0.5);
}

@keyframes bubble-pulse {
    0%, 100% {
        box-shadow: 
            0 0 10px var(--accent),
            0 0 20px var(--accent),
            inset 0 0 3px rgba(255, 255, 255, 0.2);
    }
    50% {
        box-shadow: 
            0 0 15px var(--accent),
            0 0 30px var(--accent),
            inset 0 0 5px rgba(255, 255, 255, 0.3);
    }
}

/* =====================
   Spark聊天框内部样式
===================== */
.spark-frame {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: var(--panel);
}

.spark-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem;
    background: linear-gradient(135deg, var(--accent) 0%, var(--line-main) 100%);
    color: white;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.spark-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.2rem;
    font-weight: 600;
}

.spark-title ion-icon {
    font-size: 1.4rem;
    animation: sparkle 2s ease-in-out infinite;
}

@keyframes sparkle {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.8; transform: scale(1.1); }
}

.close-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: white;
    transition: all 0.3s ease;
}

.close-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

.chat-container {
    display: flex;
    flex-direction: column;
    flex: 1;
    overflow: hidden;
}

.messages-container {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* 消息样式 */
.system-message,
.user-message,
.ai-message {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1rem;
    animation: message-slide-in 0.3s ease-out;
}

.system-message {
    align-items: flex-start;
}

.user-message {
    align-items: flex-end;
    flex-direction: row-reverse;
}

.ai-message {
    align-items: flex-start;
}

@keyframes message-slide-in {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 头像样式 */
.message-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 1.2rem;
}

.system-message .message-avatar {
    background: linear-gradient(135deg, var(--accent) 0%, var(--line-main) 100%);
    color: white;
}

.user-message .message-avatar {
    background: var(--accent);
    color: white;
}

.ai-message .message-avatar {
    background: linear-gradient(135deg, #666 0%, #888 100%);
    color: white;
}

/* 消息内容样式 */
.message-text {
    flex: 0 1 auto;
    max-width: 80%;
    background: var(--background);
    padding: 0.5rem 0.75rem;
    border-radius: 1rem;
    line-height: 1.4;
    word-wrap: break-word;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.system-message .message-text {
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.1) 0%, rgba(0, 123, 255, 0.1) 100%);
    border-left: 3px solid var(--line-main);
}

.user-message .message-text {
    background: var(--accent);
    color: white;
    border-radius: 1rem 1rem 0.25rem 1rem;
    border: none;
    max-width: 60%;
    padding: 0.4rem 0.6rem;
    flex: 0 0 auto;
}

.ai-message .message-text {
    background: var(--background);
    border-radius: 1rem 1rem 1rem 0.25rem;
    border-left: 2px solid var(--line-main);
    border: none;
}

.message-time {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: 0.25rem;
    text-align: right;
}

.user-message .message-time {
    text-align: left;
}

/* 输入区域样式 */
.input-area {
    padding: 1rem 1.5rem;
    background: var(--panel);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.input-frame {
    background: var(--background);
    border-radius: 1rem;
    padding: 0.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.input-container {
    display: flex;
    align-items: flex-end;
    gap: 0.5rem;
}

#spark-message-input {
    flex: 1;
    border: none;
    background: transparent;
    color: var(--text-primary);
    font-size: 0.9rem;
    line-height: 1.4;
    resize: none;
    outline: none;
    min-height: 20px;
    max-height: 120px;
    padding: 0.5rem;
}

#spark-message-input::placeholder {
    color: var(--text-secondary);
}

#spark-send-btn {
    background: var(--accent);
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: white;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

#spark-send-btn:hover {
    background: var(--line-main);
    transform: scale(1.1);
}

#spark-send-btn:disabled {
    background: var(--text-secondary);
    cursor: not-allowed;
    transform: none;
}

/* 思考状态指示器 */
.thinking-indicator {
    opacity: 0.8;
}

.thinking-indicator .message-text {
    background: transparent;
    color: var(--text-secondary);
    border: none;
    box-shadow: none;
}

.thinking-dots {
    display: flex;
    gap: 0.25rem;
    margin-top: 0.5rem;
}

.thinking-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent);
    animation: thinking-pulse 1.5s ease-in-out infinite;
}

.thinking-dot:nth-child(2) {
    animation-delay: 0.2s;
}

.thinking-dot:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes thinking-pulse {
    0%, 100% {
        opacity: 0.3;
        transform: scale(0.8);
    }
    50% {
        opacity: 1;
        transform: scale(1);
    }
}

/* 移动端适配 */
@media (max-width: 768px) {
    .spark-header {
        padding: 1rem;
    }
    
    .messages-container {
        padding: 1rem;
    }
    
    .input-area {
        padding: 0.75rem 1rem;
    }
    
    .message-avatar {
        width: 32px;
        height: 32px;
        font-size: 1rem;
    }
    
    .message-text {
        padding: 0.6rem 0.8rem;
        font-size: 0.9rem;
    }
}