/* 测试介绍页面 */


.test-intro {
    text-align: center;
    position: relative;
    overflow: visible;
    min-height: calc(100vh - 120px);
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    padding: 20px 20px;
    width: 100%;
    margin: 0;
    background: transparent;
}



.intro-icon {
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, var(--primary-color) 0%, #A876E8 100%);
    border-radius: 30px; /* 圆角方形更现代 */
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow:
        0 15px 35px rgba(187, 134, 252, 0.4),
        0 0 0 1px rgba(255, 255, 255, 0.1) inset;
    flex-shrink: 0;
    transform: rotate(-5deg); /* 稍微倾斜一点，更有活力 */
    position: relative;
    overflow: hidden;
}

/* 添加图标内部装饰 */
.intro-icon::before {
    content: '';
    position: absolute;
    top: -10px;
    left: -10px;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    filter: blur(5px);
}

.intro-icon::after {
    content: '';
    position: absolute;
    bottom: -5px;
    right: -5px;
    width: 30px;
    height: 30px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    filter: blur(3px);
}

.intro-icon i {
    font-size: 48px;
    color: white;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    animation: float 3s infinite ease-in-out;
}

@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-5px); }
    100% { transform: translateY(0px); }
}

.intro-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
    margin-bottom: 20px;
    position: relative;
    z-index: 1;
}

.intro-title h2 {
    font-size: 42px;
    font-weight: 800;
    color: var(--text-color);
    margin: 0 0 15px 0;
    background: linear-gradient(135deg, #ffffff 0%, #BB86FC 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 5px 15px rgba(187, 134, 252, 0.5);
    letter-spacing: -0.5px;
}

.intro-subtitle {
    font-size: 18px;
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.6;
    position: relative;
    padding-left: 15px;
    border-left: 3px solid var(--primary-color);
}

/* ===== 测试信息 - 响应式设计 ===== */
.test-info-compact {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.info-pill {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(187, 134, 252, 0.1);
    border: 1px solid rgba(187, 134, 252, 0.2);
    border-radius: 24px;
    padding: 12px 24px;
    font-size: 16px;
    color: var(--text-secondary);
    transition: all 0.3s ease;
}

.info-pill:hover {
    background: rgba(187, 134, 252, 0.2);
    transform: translateY(-2px);
}

.info-pill i {
    color: var(--primary-color);
    font-size: 20px;
}

/* ===== 维度简介 - 响应式设计 ===== */
.dimensions-compact {
    margin: 20px 0;
}

.dimension-row {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 20px;
}

.dimension-pill {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 16px 24px;
    min-width: 200px;
    transition: all 0.3s ease;
}

.dimension-pill:hover {
    background: rgba(187, 134, 252, 0.08);
    border-color: rgba(187, 134, 252, 0.2);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
}

.dimension-letter {
    font-weight: 700;
    color: var(--primary-color);
    font-size: 20px;
}

.dimension-name {
    font-size: 16px;
    color: var(--text-secondary);
}

/* ===== 测试建议 - 响应式设计 ===== */
.tips-compact {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.tip-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 16px;
    color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 12px 20px;
    transition: all 0.3s ease;
}

.tip-item:hover {
    background: rgba(255, 255, 255, 0.05);
    transform: translateY(-2px);
}

.tip-item i {
    color: var(--success-color);
    font-size: 20px;
    flex-shrink: 0;
}

/* ===== 上次测试结果样式 ===== */
/* 动态创建的上次测试结果提示区域 */
.lastResultHint {
    background: linear-gradient(135deg, rgba(30, 30, 40, 0.9) 0%, rgba(40, 40, 50, 0.9) 100%);
    border: 1px solid rgba(187, 134, 252, 0.3);
    border-radius: 16px;
    padding: 16px 20px;
    margin: 16px 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-shadow:
        0 8px 25px rgba(0, 0, 0, 0.2),
        0 0 0 1px rgba(255, 255, 255, 0.05) inset;
    backdrop-filter: blur(15px);
    position: relative;
    overflow: hidden;
    width: 100%;
    max-width: 600px;
    transition: all 0.3s ease;
}

.lastResultHint::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(
        circle at center,
        rgba(187, 134, 252, 0.1) 0%,
        rgba(187, 134, 252, 0) 60%
    );
    opacity: 0.6;
    z-index: -1;
    animation: pulse-glow 4s infinite ease-in-out;
}

.lastResultHint .result-info {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 12px;
    text-align: center;
    line-height: 1.5;
    width: 100%;
}

.result-info span {
    color: var(--primary-color);
    font-weight: 600;
    text-shadow: 0 0 10px rgba(187, 134, 252, 0.5);
}

.view-result-btn {
    background: linear-gradient(135deg, rgba(187, 134, 252, 0.8) 0%, rgba(168, 118, 232, 0.7) 100%);
    color: white;
    border: none;
    border-radius: 20px;
    padding: 8px 20px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    box-shadow:
        0 5px 15px rgba(187, 134, 252, 0.2),
        0 0 0 1px rgba(255, 255, 255, 0.1) inset;
    position: relative;
    width: 100%;
    max-width: 200px;
}

.view-result-btn:hover {
    box-shadow:
        0 8px 20px rgba(187, 134, 252, 0.3),
        0 0 0 1px rgba(255, 255, 255, 0.1) inset;
}

.view-result-btn:active {
    box-shadow:
        0 3px 10px rgba(187, 134, 252, 0.2),
        0 0 0 1px rgba(255, 255, 255, 0.1) inset;
}

.previous-result {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    margin-bottom: 30px;
    width: 100%;
}

.result-info {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 18px;
    color: var(--text-secondary);
    background: linear-gradient(135deg, rgba(187, 134, 252, 0.1) 0%, rgba(168, 118, 232, 0.05) 100%);
    border: 1px solid rgba(187, 134, 252, 0.2);
    border-radius: 20px;
    padding: 12px 24px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.result-label {
    font-weight: 500;
}

.result-type-highlight {
    font-weight: 700;
    color: var(--primary-color);
    text-shadow: 0 0 10px rgba(187, 134, 252, 0.5);
}

.result-date {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.7);
}

.btn-view-result {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    background: linear-gradient(135deg, var(--primary-color) 0%, #A876E8 100%);
    color: white;
    border: none;
    border-radius: 30px;
    padding: 15px 40px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow:
        0 15px 30px rgba(187, 134, 252, 0.4),
        0 0 0 1px rgba(255, 255, 255, 0.1) inset;
    position: relative;
    overflow: hidden;
}

.btn-view-result:hover {
    transform: translateY(-3px);
    box-shadow:
        0 20px 35px rgba(187, 134, 252, 0.5),
        0 0 0 1px rgba(255, 255, 255, 0.15) inset;
}

.btn-view-result:active {
    transform: translateY(-1px);
    box-shadow:
        0 10px 25px rgba(187, 134, 252, 0.4),
        0 0 0 1px rgba(255, 255, 255, 0.1) inset;
}

/* 添加按钮发光效果 */
.btn-view-result::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(
        circle at center,
        rgba(255, 255, 255, 0.3) 0%,
        rgba(255, 255, 255, 0) 60%
    );
    opacity: 0.6;
    z-index: 0;
    animation: shine 3s infinite linear;
}

@keyframes shine {
    0% { transform: translateX(-50%) translateY(-50%) rotate(0deg); }
    100% { transform: translateX(-50%) translateY(-50%) rotate(360deg); }
}

.btn-view-result i,
.btn-view-result span {
    position: relative;
    z-index: 1;
}

/* 脉冲动画 */
.pulse-animation {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { box-shadow:
        0 0 0 0 rgba(187, 134, 252, 0.7),
        0 15px 30px rgba(187, 134, 252, 0.4),
        0 0 0 1px rgba(255, 255, 255, 0.1) inset;
    }
    70% { box-shadow:
        0 0 0 10px rgba(187, 134, 252, 0),
        0 15px 30px rgba(187, 134, 252, 0.4),
        0 0 0 1px rgba(255, 255, 255, 0.1) inset;
    }
    100% { box-shadow:
        0 0 0 0 rgba(187, 134, 252, 0),
        0 15px 30px rgba(187, 134, 252, 0.4),
        0 0 0 1px rgba(255, 255, 255, 0.1) inset;
    }
}



/* 历史记录框样式 */
.history-container {
    width: 100%;
    max-width: 600px;
    margin: 20px auto 0;
    padding: 20px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(187, 134, 252, 0.2);
    border-radius: 16px;
    backdrop-filter: blur(10px);
}

/* 历史记录项样式 */
.history-item {
    position: relative; /* 添加相对定位，为删除遮罩提供定位基准 */
    padding: 15px;
    margin-bottom: 10px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(187, 134, 252, 0.1);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.history-item:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(187, 134, 252, 0.2);
}

.history-item.latest {
    border-color: rgba(187, 134, 252, 0.3);
    background: rgba(187, 134, 252, 0.05);
}

/* 历史记录行样式 */
.history-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
}

/* 历史记录类型样式 */
.history-type {
    font-size: 16px;
    font-weight: 600;
    color: var(--primary-color);
    flex: 1;
}

/* 历史记录日期时间容器 */
.history-date-time-container {
    flex: 1;
    text-align: center;
}

/* 历史记录日期时间样式 */
.history-date-time {
    font-size: 12px;
    color: #888;
}

/* 历史记录操作按钮容器 */
.history-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex: 1;
}

/* 历史记录删除按钮样式 */
.history-delete-btn {
    background: transparent;
    border: none;
    color: #888;
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.history-delete-btn:hover {
    background: rgba(255, 59, 48, 0.1);
    color: #ff3b30;
}

.history-delete-btn i {
    font-size: 18px;
}

/* 历史记录最新标记样式 */
.history-latest-badge {
    background: linear-gradient(135deg, var(--primary-color) 0%, #A876E8 100%);
    color: white;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 10px;
    margin-right: 8px;
    font-weight: 500;
}

.history-latest-badge.hidden {
    display: none;
}

.history-latest-badge.visible {
    display: inline-block;
}

.history-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--primary-color);
    margin: 0 0 15px 0;
    text-align: center;
}

.history-list {
    /* 移除高度限制和滑动条，让内容自然展开 */
    overflow-y: visible;
}

/* 历史记录登录提示样式 */
.history-login-prompt {
    text-align: center;
    padding: 20px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    border: 1px solid rgba(187, 134, 252, 0.1);
}

.history-login-text {
    color: #bbb;
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 15px;
}

.history-login-btn {
    background: linear-gradient(135deg, var(--primary-color) 0%, #A876E8 100%);
    color: white;
    border: none;
    padding: 10px 24px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(187, 134, 252, 0.3);
}

.history-login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(187, 134, 252, 0.5);
}

.history-login-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(187, 134, 252, 0.3);
}

/* 历史记录加载动画样式 */
.history-loading {
    display: flex !important;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 30px 20px;
    text-align: center;
    visibility: visible !important;
    opacity: 1 !important;
}

/* 确保加载动画spinner正确显示 */
.history-loading-spinner {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.history-loading-text {
    font-size: 14px;
    color: var(--text-secondary);
    text-align: center;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* @keyframes spin 已移至 loader.css，避免重复定义 */

/* 移动端历史记录样式适配 */
@media (max-width: 600px) {
    .history-container {
        margin: 15px auto 0;
        padding: 15px;
        border-radius: 12px;
    }
    
    .history-title {
        font-size: 16px;
        margin-bottom: 12px;
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
    
    .history-list {
        /* 移动端也移除高度限制 */
        overflow-y: visible;
    }
    
    /* 确保移动端加载动画正确显示 */
    .history-loading {
        display: flex !important;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        padding: 30px 20px;
        min-height: 120px;
        visibility: visible !important;
        opacity: 1 !important;
    }
    
    .history-loading-spinner {
        width: 32px !important;
        height: 32px !important;
        border: 3px solid rgba(187, 134, 252, 0.2) !important;
        border-top-color: var(--primary-color) !important;
        animation: spin 1s ease-in-out infinite !important;
        margin-bottom: 12px !important;
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
    
    .history-loading-text {
        font-size: 14px !important;
        color: var(--text-secondary) !important;
        text-align: center !important;
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
}

/* 添加装饰元素 - 全局背景效果 */
/* 修复说明：解决PC端装饰元素不显示问题，添加全局背景渐变效果 */
.test-intro::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    background:
        radial-gradient(circle at 20% 30%, rgba(187, 134, 252, 0.15) 0%, rgba(187, 134, 252, 0) 20%),
        radial-gradient(circle at 80% 70%, rgba(187, 134, 252, 0.1) 0%, rgba(187, 134, 252, 0) 20%);
    z-index: -1;
    pointer-events: none;
}

/* ===== intro-card 样式 ===== */
.intro-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(187, 134, 252, 0.2);
    border-radius: 24px;
    padding: 20px;
    margin-bottom: 20px;
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.intro-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
    border-color: rgba(187, 134, 252, 0.3);
}

/* ===== intro-button-container 样式 ===== */
.intro-button-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 20px 0;
    padding: 15px 0;
    position: relative;
}

/* ===== 分割线样式 ===== */
.intro-divider-top,
.intro-divider-bottom {
    height: 1px;
    background: linear-gradient(90deg, 
        rgba(187, 134, 252, 0) 0%, 
        rgba(187, 134, 252, 0.3) 50%, 
        rgba(187, 134, 252, 0) 100%);
    margin: 10px 0;
    position: relative;
}

.intro-divider-top {
    margin-top: 20px;
}

.intro-divider-bottom {
    margin-bottom: 20px;
}

/* ===== start-btn 样式 ===== */
.start-btn {
    padding: 16px 48px;
    font-size: 18px;
    font-weight: 600;
    border-radius: 30px;
    background: linear-gradient(135deg, var(--primary-color) 0%, #A876E8 100%);
    color: white;
    border: none;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(187, 134, 252, 0.4);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.start-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.2) 50%, rgba(255, 255, 255, 0) 100%);
    transition: all 0.6s ease;
}

.start-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(187, 134, 252, 0.6);
    letter-spacing: 1px;
}

.start-btn:hover::before {
    left: 100%;
}

.start-btn:active {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(187, 134, 252, 0.4);
}

/* PC端布局优化 */
/* 修复说明：解决PC端视觉效果不明显问题，添加装饰元素、网格背景和增强动画效果 */
@media (min-width: 769px) {
    /* 为整个页面添加紫色网格背景 */
    body {
        background-image: 
            linear-gradient(rgba(187, 134, 252, 0.15) 1px, transparent 1px),
            linear-gradient(90deg, rgba(187, 134, 252, 0.15) 1px, transparent 1px);
        background-size: 60px 60px;
        background-position: 0 0, 30px 30px;
        background-color: rgba(187, 134, 252, 0.02);
        background-attachment: fixed;
    }
    
    .test-intro {
        position: relative;
        overflow: visible;
        min-height: calc(100vh - 120px);
        display: flex;
        align-items: flex-start;
        justify-content: center;
        padding-top: 40px;
        background: transparent; /* 移除test-intro的背景，避免重复 */
    }
    
    /* 移除侧边装饰发光球 */
    
    /* 扩大intro-card尺寸并添加阴影效果 */
    .intro-card {
        max-width: 900px;
        width: 90%;
        padding: 30px;
        margin: 20px auto;
        background: rgba(255, 255, 255, 0.08);
        border: 1px solid rgba(187, 134, 252, 0.3);
        box-shadow: 
            0 25px 80px rgba(0, 0, 0, 0.3),
            0 0 150px rgba(187, 134, 252, 0.15);
        backdrop-filter: blur(10px);
        z-index: 10;
        position: relative;
    }
    
    /* 优化标题区域 */
    .intro-header {
        margin-bottom: 30px;
    }
    
    .intro-title {
        font-size: 42px;
        margin-bottom: 30px;
        text-align: center;
    }
    
    .intro-description {
        font-size: 18px;
        line-height: 1.6;
        text-align: center;
        max-width: 700px;
        margin: 0 auto 40px;
    }
    
    /* 移除浮动装饰发光球 */
    
    /* 移除浮动动画关键帧 */
    
    /* 优化统计数据布局 */
    .intro-stats {
        justify-content: center;
        gap: 60px;
        margin: 40px 0;
    }
    
    /* 优化按钮容器 */
    .intro-button-container {
        margin: 30px 0;
    }
    
    /* 优化历史记录容器 */
    .history-container {
        max-width: 600px;
        margin: 0 auto;
    }
}

/* 移动端适配 */
@media (max-width: 768px) {
    /* 为整个页面添加紫色网格背景 */
    body {
        background-image: 
            linear-gradient(rgba(187, 134, 252, 0.15) 1px, transparent 1px),
            linear-gradient(90deg, rgba(187, 134, 252, 0.15) 1px, transparent 1px);
        background-size: 40px 40px;
        background-position: 0 0, 20px 20px;
        background-color: rgba(187, 134, 252, 0.02);
        background-attachment: fixed;
    }
    
    .test-intro {
        background: transparent; /* 移除test-intro的背景，避免重复 */
        padding: 60px 15px 10px 15px; /* 增加顶部内边距避免覆盖顶部栏 */
        min-height: 100vh;
        display: flex;
        flex-direction: column;
        justify-content: flex-start; /* 改为flex-start让内容从顶部开始 */
    }
    
    .intro-card {
        padding: 12px; /* 进一步缩减内边距 */
        margin-bottom: 10px; /* 缩减底部外边距 */
        flex: 1; /* 让卡片填充可用空间 */
        display: flex;
        flex-direction: column;
        justify-content: center; /* 内容居中分布，在大屏幕上有更多上下空间 */
    }
    
    /* 隐藏装饰圆圈，移除移动端的白色发光点 */
    .decoration-circle {
        display: none;
    }
    
    .intro-button-container {
        margin: 5px 0 2px 0; /* 缩减上下边距 */
        padding-top: 4px; /* 缩减顶部内边距 */
        padding-bottom: 2px; /* 缩减底部内边距 */
    }
    
    /* 调整移动端分割线间距 */
    .intro-divider-top,
    .intro-divider-bottom {
        margin: 1px 0; /* 缩减分割线间距 */
    }
    
    .intro-divider-top {
        margin-top: 4px; /* 缩减顶部间距 */
    }
    
    .intro-divider-bottom {
        margin-bottom: 4px; /* 缩减底部间距 */
    }
    
    /* 在移动端确保历史记录标题显示 */
    .history-title {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
    
    /* 在移动端隐藏开始按钮上方的分割线 */
    .intro-divider-top {
        display: none;
    }
}

disclaimer {
    font-size: 14px;
    color: var(--text-secondary);
    margin: 15px 0 0 0;
    font-style: italic;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}