/* front.css */

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background-color: #f0f2f5;
    color: #333;
    margin: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    position: relative;
    /* 为伪元素提供定位上下文 */
    /* overflow: hidden; */
    /* 防止伪元素溢出 */
}

body::after {
    content: '';
    position: absolute;
    top: -20px;
    /* 稍微放大，避免模糊边缘 */
    left: -20px;
    right: -20px;
    bottom: -20px;
    background-image: url('./src/images/xhs.jpg');
    /* 替换为你的图片路径 */
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    /* 核心：应用模糊效果 */
    filter: blur(10px);
    /* 将模糊背景层置于最底层 */
    z-index: -1;
    /* 可选：添加一层半透明的黑色遮罩，让前景内容更突出 */
    background-color: rgba(0, 0, 0, 0.2);
    background-blend-mode: overlay;
}

.app-container {
    display: flex;
    width: 90%;
    /* 移除固定的 height: 90%; 让高度由内容撑开 */
    max-width: 1000px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
    /* overflow: hidden; */
    position: relative;
    z-index: 1;
    animation: slideInUp 0.8s ease-out forwards;
    /* 0.8秒动画，结束后保持状态 */
}

.panel {
    flex: 1;
    padding: 40px;
    box-sizing: border-box;
    /* 重点：为左右面板添加Flexbox布局，让内容可以居中 */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.left-panel {
    border-right: 1px solid rgba(224, 224, 224, 0.5);
    background: linear-gradient(135deg, #e6f3ff, #e9f5ff);
    /* 移除固定的 height: 90%; */
    border-radius: 12px 0 0 12px;
}

.intro-content {
    /* 移除此处的 display:flex，它会与 .panel 的样式冲突 */
    /* display: flex; */
    /* 确保内容依然是flex布局 */
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
    /* 针对 intro-content 的所有直接子元素 */
    opacity: 0;
    /* 初始隐藏 */
    animation: fadeIn 0.6s ease-out forwards;
}

/* 为左侧面板的子元素设置延迟，实现依次渐显 */
.intro-content h1 {
    animation-delay: 0.3s;
}

.intro-content .subtitle {
    animation-delay: 0.4s;
}

.intro-content .intro-image-placeholder {
    animation-delay: 0.5s;
}

.intro-content .intro-text p:nth-of-type(1) {
    animation-delay: 0.6s;
}

.intro-content .intro-text p:nth-of-type(2) {
    animation-delay: 0.7s;
}

.intro-content .intro-stats {
    animation-delay: 0.8s;
}


h1 {
    font-size: 2em;
    margin: 0 0 5px 0;
    /* 渐变文字效果 */
    background: linear-gradient(45deg, #44e47e, #4ecdc4, #45b7d1, #f9ca24, #f0932b, #eb7126, #6c5ce7);
    background-size: 400% 400%;
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
    animation: gradientShift 3s ease infinite;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    display: inline-block;
    /* 添加文字阴影增强视觉效果 */
    filter: drop-shadow(2px 2px 4px rgba(0, 0, 0, 0.1));
}

/* 动态渐变动画 */
@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }

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

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

/* 鼠标悬停效果 */
h1:hover {
    transform: scale(1.05) translateY(-2px);
    filter: drop-shadow(4px 4px 8px rgba(0, 0, 0, 0.2));
    animation-duration: 1.5s;
    /* 悬停时加快动画速度 */
}

/* 鼠标点击效果 */
h1:active {
    transform: scale(0.98);
    transition-duration: 0.1s;
}

/* 为了更好的兼容性，添加webkit前缀 */
@supports (-webkit-background-clip: text) {
    h1 {
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
    }

    h2 {
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
    }
}

.subtitle {
    font-size: 1.1em;
    color: #666;
    margin-bottom: 25px;
    line-height: 1.5;
}

.intro-image-placeholder {
    width: 100%;
    height: 180px;
    background-color: #e6f7ff;
    border-radius: 8px;
    margin-bottom: 25px;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #007bff;
    font-weight: bold;
    font-size: 1.2em;
}

.intro-text p {
    font-size: 0.95em;
    color: #555;
    line-height: 1.6;
    margin-bottom: 15px;
}

.intro-stats {
    margin-top: 20px;
    font-size: 0.9em;
    color: #777;
    background-color: #f0f0f0;
    padding: 10px 15px;
    border-radius: 6px;
}

.right-panel {
    /* 移除 display、flex-direction、justify-content、align-items，因为它们已合并到 .panel 中 */
    background-color: rgba(255, 255, 255, 0.85);
    border-radius: 0 12px 12px 0;
}

/* 应用到右侧面板的主要内容 */
.right-panel>* {
    /* 针对 right-panel 的所有直接子元素 */
    opacity: 0;
    /* 初始隐藏 */
    animation: fadeIn 0.6s ease-out forwards;
}

/* 为右侧面板的子元素设置延迟，实现依次渐显 */
.right-panel h2 {
    animation-delay: 0.9s;
}

.right-panel .description {
    animation-delay: 1.0s;
}

.right-panel .upload-area {
    animation-delay: 1.1s;
}

.right-panel .status-area {
    animation-delay: 1.2s;
}

.right-panel #message-container {
    animation-delay: 1.3s;
}

.right-panel #deadline-display {
    animation-delay: 1.4s;
}

h2 {
    font-size: 2em;
    margin: 0 0 5px 0;
    /* 渐变文字效果 */
    background: linear-gradient(45deg, #44e47e, #4ecdc4, #45b7d1, #f9ca24, #f0932b, #eb7126, #6c5ce7);
    background-size: 400% 400%;
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
    animation: gradientShift 3s ease infinite, fadeIn 0.6s ease-out forwards;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    display: inline-block;
    /* 添加文字阴影增强视觉效果 */
    filter: drop-shadow(2px 2px 4px rgba(0, 0, 0, 0.1));
    /* 初始隐藏状态 */
    opacity: 0;
    animation-delay: 0.9s;
}

h2:hover {
    transform: scale(1.05) translateY(-2px);
    filter: drop-shadow(4px 4px 8px rgba(0, 0, 0, 0.2));
    animation-duration: 1.5s;
    /* 悬停时加快动画速度 */
}

h2:active {
    transform: scale(0.98);
    transition-duration: 0.1s;
}

.description {
    font-size: 0.95em;
    color: #888;
    margin-bottom: 25px;
}

.upload-area {
    position: relative;
    width: 100%;
    max-width: 400px;
    padding: 30px 20px;
    border: 2px dashed #ccc;
    border-radius: 10px;
    background-color: #f9f9f9;
    transition: all 0.3s ease;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.upload-area:hover {
    border-color: #007bff;
    background-color: #eaf5ff;
}

.upload-icon {
    font-size: 3rem;
    color: #007bff;
}

.upload-text {
    font-size: 1.1rem;
    color: #555;
    font-weight: bold;
}

.file-input {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    opacity: 0;
    cursor: pointer;
}

.status-area {
    width: 100%;
    min-height: 260px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    margin-top: 20px;
}

.qr-placeholder {
    width: 260px;
    height: 260px;
    background-color: #f5f5f5;
    border-radius: 8px;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #aaa;
    font-size: 0.9em;
    border: 1px solid #e0e0e0;
}

.qr-image {
    width: 260px;
    height: 260px;
    object-fit: contain;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
}

.deadline {
    margin-top: 25px;
    font-size: 1em;
    font-weight: bold;
    color: #444;
}

.message-box {
    margin-top: 20px;
    padding: 12px 20px;
    border-radius: 6px;
    text-align: center;
    font-weight: bold;
    font-size: 0.9em;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.message-box.show {
    opacity: 1;
    transform: translateY(0);
}

.error-message {
    color: #fff;
    background-color: #e74c3c;
}

.success-message {
    color: #fff;
    background-color: #2ecc71;
}

.loader {
    border: 5px solid #f3f3f3;
    border-top: 5px solid #3498db;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

@media (max-width: 768px) {
    .app-container {
        flex-direction: column;
        width: 100%;
        /* 移除固定的 height: 90%; */
        max-width: none;
        border-radius: 0;
        box-shadow: none;
    }

    .left-panel {
        border-right: none;
        border-bottom: 1px solid #e0e0e0;
        padding-bottom: 20px;
    }
}



.main-idea {
    margin-top: 20px;
    padding: 15px 0;
    border-top: 2px solid rgba(70, 130, 180, 0.2);
}

.main-idea p {
    font-weight: bold;
    font-size: 1.1em;
    color: #4682B4;
    /* 天蓝色 */
    margin: 0;
    text-align: left;
    letter-spacing: 0.5px;
    line-height: 1.4;
    /* 添加轻微的文字阴影增强可读性 */
    text-shadow: 1px 1px 2px rgba(70, 130, 180, 0.1);
}

/* 鼠标悬停时的效果 */
.main-idea p:hover {
    color: #5A9FD4;
    /* 稍微亮一点的天蓝色 */
    transform: translateY(-1px);
    transition: all 0.3s ease;
}

.mail-btn {
    display: inline-flex;
    align-items: center;
    padding: 4px 14px 4px 10px;
    margin: 0 4px;
    font-weight: bold;
    font-size: 1em;
    color: #fff;
    background: linear-gradient(90deg,
            #33befa 100%,
            #105cff 0%);
    border: none;
    border-radius: 20px;
    text-decoration: none;
    box-shadow: 0 2px 8px rgba(70, 130, 180, 0.08);
    transition: background 0.3s, transform 0.2s, box-shadow 0.2s;
    cursor: pointer;
    outline: none;
}

.mail-btn:hover,
.mail-btn:focus {
    background: linear-gradient(90deg, #105cff 0%, #33befa 100%);
    transform: translateY(-2px) scale(1.04);
    box-shadow: 0 4px 16px rgba(70, 130, 180, 0.15);
    color: #fff;
    text-decoration: none;
}

.mail-icon {
    margin-right: 4px;
    vertical-align: middle;
    width: 18px;
    height: 18px;
}

.github-btn {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px 3px 10px;
    margin: 0 4px;
    font-weight: bold;
    font-size: 1em;
    color: #fff;
    background: linear-gradient(90deg, #4ecdc4 0%, #45b7d1 100%);
    border: none;
    border-radius: 20px;
    text-decoration: none;
    box-shadow: 0 2px 8px rgba(70, 130, 180, 0.08);
    transition: background 0.3s, transform 0.2s, box-shadow 0.2s;
    cursor: pointer;
    outline: none;
}

.github-btn:hover,
.github-btn:focus {
    background: linear-gradient(90deg, #45b7d1 0%, #4ecdc4 100%);
    transform: translateY(-2px) scale(1.04);
    box-shadow: 0 4px 16px rgba(70, 130, 180, 0.15);
    color: #fff;
    text-decoration: none;
}

.github-icon {
    margin-right: 4px;
    vertical-align: middle;
}

/* ------------------- 页面载入动画 ------------------- */

/* 定义整个卡片入场动画 */
@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }

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

/* 定义内容渐显动画 */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* 分析按钮区域样式 */
.analysis-section {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
    text-align: center;
}

.analysis-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.analysis-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
    background: linear-gradient(135deg, #5a6fd8 0%, #6a4190 100%);
}

.analysis-btn:active {
    transform: translateY(0);
}

.analysis-desc {
    font-size: 12px;
    color: #666;
    margin-top: 8px;
    margin-bottom: 0;
}