body {
    background: linear-gradient(135deg, #0f0c29, #302b63, #24243e);
    color: #ffffff;
    font-family: 'Roboto', sans-serif;
    height: 100vh;
    margin: 0;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
}

.background-shapes {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: -1;
}

.background-shapes div {
    position: absolute;
    background: rgba(0, 255, 255, 0.2);
    clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);
    animation: float 10s infinite ease-in-out;
}

.background-shapes div:nth-child(1) {
    width: 120px;
    height: 120px;
    top: 10%;
    left: 15%;
    background: rgba(0, 255, 255, 0.3);
    animation-duration: 8s;
}

.background-shapes div:nth-child(2) {
    width: 200px;
    height: 200px;
    top: 40%;
    left: 70%;
    background: rgba(0, 128, 255, 0.3);
    animation-duration: 12s;
}

.background-shapes div:nth-child(3) {
    width: 150px;
    height: 150px;
    top: 75%;
    left: 30%;
    background: rgba(128, 0, 255, 0.3);
    animation-duration: 10s;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    50% {
        transform: translateY(-20px) rotate(15deg);
    }
}

.container {
    max-width: 2000px;
    width: 80%;
    background: transparent;
    border: none;
    box-shadow: none;
}

.container::-webkit-scrollbar-track {
    background: transparent; /* 滚动条轨道背景设置为透明 */
}

.chat-box {
    max-height: 400px;
    overflow-y: auto;
    margin-bottom: 20px;
    border: none; /* 移除边框 */
    background: transparent; /* 设置背景为透明 */
    box-shadow: none; /* 移除阴影 */
}

/* 针对滚动条的样式 */
.chat-box::-webkit-scrollbar {
    width: 8px; /* 滚动条宽度 */
}

.chat-box::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3); /* 滚动条的颜色 */
    border-radius: 4px; /* 滚动条圆角 */
}

.chat-box::-webkit-scrollbar-track {
    background: transparent; /* 滚动条轨道背景设置为透明 */
}

.chat-input {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: #ffffff;
    resize: none;
    min-height: 50px;
    max-height: 150px;
    overflow-y: auto;
}

.chat-input:focus {
    outline: none;
    box-shadow: 0 0 10px rgba(0, 255, 255, 0.8);
}

.btn-send {
    background: #4b0082;
    border: none;
    color: #ffffff;
    transition: background 0.3s ease;
}

.btn-send:hover {
    background: #2e0057;
}

.message {
    margin-bottom: 15px;
}

.message.user {
    text-align: right;
}

.message.ai {
    text-align: left;
}

/* 缩小加载动画尺寸 */
.spinner-small {
    width: 1em;
    height: 1em;
    border-width: 0.15em;
    display: inline-block;
    vertical-align: middle;
}

/* 透明按钮样式 */
.transparent-button {
    position: fixed;
    top: 10px;
    right: 10px;
    background-color: rgba(255, 255, 255, 0.5);
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    z-index: 1000;
}

/* 子界面样式 */
.overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0); 
    z-index: 1000;
}

.overlay.show {
    display: block;
}

/* 子界面内容样式 */
.overlay-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: rgba(0, 0, 0, 0.6); /* 半透明黑色背景 */
    backdrop-filter: blur(10px) saturate(180%); /* 亚克力材质效果 */
    -webkit-backdrop-filter: blur(10px) saturate(180%); /* 兼容 Safari */
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    position: relative;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); /* 添加轻微阴影 */
    width: 45%; /* 设置宽度为 45% */
    min-width: 320px; /* 确保宽度不小于 320px，容纳两张图片 */
    max-width: 600px; /* 限制最大宽度 */
    animation: slideIn 0.5s ease forwards;
}

@keyframes slideIn {
    0% {
        transform: translate(-50%, 100%); /* 从屏幕底部外开始 */
        opacity: 0;
    }
    100% {
        transform: translate(-50%, -50%); /* 到达屏幕中央 */
        opacity: 1;
    }
}

@keyframes slideOut {
    0% {
        transform: translate(-50%, -50%); /* 从屏幕中央开始 */
        opacity: 1;
    }
    100% {
        transform: translate(-50%, 100%); /* 移动到屏幕底部外 */
        opacity: 0;
    }
}

.overlay-content.hide {
    animation: slideOut 0.5s ease forwards; /* 添加消失动画 */
}

.pdf-preview {
    margin: 40px;
    display: inline-block;
}

.pdf-preview img {
    width: 150px;
    height: auto;
    cursor: pointer;
}

.close-button {
    position: absolute;
    top: 10px;
    right: 10px;
    background: none;
    border: none;
    font-size: 20px;
    font-weight: bold;
    color: #333;
    cursor: pointer;
}