/* =================== 全局样式 =================== */
body {
    margin: 0;
    font-family: "Microsoft YaHei", sans-serif;
    background: #081018;
    color: white;
    overflow-x: hidden;
}

.bg-animation {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    background: url('assets/bg.png') no-repeat center center/cover;
    z-index: -1;
    animation: none; /* 如果不想要原来的动态效果 */
    opacity: 0.8;
}

@keyframes moveBg {
    0% { transform: translate(0, 0); }
    50% { transform: translate(-20%, -15%); }
    100% { transform: translate(0, 0); }
}

.fade-in { animation: fadeIn 0.8s ease; }
.fade-out { animation: fadeOut 0.35s forwards; }

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

@keyframes fadeOut {
    to { opacity: 0; transform: translateY(-20px); }
}

.container {
    text-align: center;
    padding: 56px 20px 80px;
}

.title {
    font-size: 42px;
    margin-bottom: 10px;
    text-shadow: 0 0 18px rgba(0,247,255,0.55);
}

.subtitle {
    max-width: 760px;
    margin: 0 auto 32px;
    color: rgba(255,255,255,0.8);
    line-height: 1.8;
}

/* =================== 首页卡片按钮 =================== */
.card {
    width: 65%;
    max-width: 560px;
    margin: 18px auto;
    padding: 25px;
    font-size: 22px;
    border-radius: 18px;
    cursor: pointer;
    backdrop-filter: blur(8px);
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.18);
    transition: all 0.25s ease;
}

.card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 0 22px rgba(0,247,255,0.38);
}

.card.big {
    width: 86%;
    height: 170px;
    margin: 22px auto;
    background-size: cover;
    background-position: center;
    position: relative;
    overflow: hidden;
}

/* 按钮透明化，去掉毛玻璃和黑色遮罩 */
.hero-wall,
.hero-repair,
.hero-guide,
.hero-generate {
    background: transparent;
    border: 1px solid rgba(255,255,255,0.15);
    backdrop-filter: none;
    box-shadow: none;
    border-radius: 20px;
}

/* 文字上下左右居中，完全透明背景 */
.overlay {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-size: 36px;
    color: #fff;
    background: transparent;
    text-shadow: none;
    padding: 0 12px;
}

/* =================== 通用页面样式 =================== */
.page {
    text-align: center;
    padding: 28px 20px 60px;
    animation: fadeIn 0.8s ease;
}

button {
    padding: 10px 20px;
    margin: 8px;
    border: none;
    background: linear-gradient(135deg, #00ccff, #0077ff);
    color: white;
    cursor: pointer;
    border-radius: 10px;
    font-size: 15px;
}

button:hover { opacity: 0.92; }

.tool-page {
    max-width: 1120px;
    margin: 0 auto;
    padding: 12px 10px;
}

.page-desc {
    color: rgba(255,255,255,0.85);
    margin-bottom: 18px;
    font-size: 16px;
    line-height: 1.8;
}

.panel { 
    margin: 18px 0; 
}
.panel input[type="file"] { 
    margin: 10px; 
    color: white; 
}

.status-text {
    min-height: 24px;
    color: #8fe9ff;
    font-size: 16px;
    margin-top: 10px;
}

/* =================== AI 文物识别页面 =================== */
.recognition-container {
    display: flex;
    gap: 20px;
    align-items: flex-start;
    margin-top: 20px;
    flex-wrap: wrap;
}

.img-card {
    max-width: 400px;
}

#artifactPreview {
    width: 100%;
    max-height: 400px;
    object-fit: contain;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.08);
}

.result-box {
    flex: 1;
    padding: 12px;
    background: rgba(255,255,255,0.08);
    border-radius: 12px;
    color: #fff;
    font-size: 16px;
    line-height: 1.6;
}

/* 智能讲解输出区域 */
#explain-output {
    margin-top: 20px;
    padding: 12px;
    background: rgba(0,0,0,0.1);
    border-radius: 12px;
    color: #fff;
    font-size: 18px;
}

/* =================== 比较和图片展示 =================== */
.compare-wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    justify-content: center;
    margin-top: 24px;
}

.single-center .img-card { max-width: 520px; }

.img-card {
    width: 460px;
    max-width: 92%;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 18px;
    padding: 18px;
    backdrop-filter: blur(8px);
    box-shadow: 0 0 18px rgba(0, 247, 255, 0.12);
}

.img-card h3 {
    margin: 0 0 14px;
    color: #d8fbff;
}

.img-card img,
#img {
    width: 100%;
    min-height: 280px;
    max-height: 520px;
    object-fit: contain;
    background: rgba(0,0,0,0.25);
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.08);
}

textarea,
input[type="text"] {
    width: 90%;
    max-width: 720px;
    border-radius: 12px;
    padding: 12px;
    font-size: 16px;
    margin-bottom: 16px;
    border: 1px solid rgba(255,255,255,0.16);
    background: rgba(255,255,255,0.08);
    color: white;
    box-sizing: border-box;
}

textarea { min-height: 140px; }
input::placeholder, textarea::placeholder { color: rgba(255,255,255,0.55); }
.error-text { color: #ff9b9b; }
