/* ========================================= */
/* 🟢 终极专业版 style.css (大梁哥·精致滚动版) */
/* ========================================= */

/* --- 0. 基础设置 --- */
:root {
--bg-deep: #050505;
--bg-card: #121212;
--text-white: #e5e5e5;
--text-gray: #888888;
--accent: #B89648; /* ✨ 哑光古铜金 */
}

::selection { background: var(--accent); color: #000; }

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }

html, body {
background-color: var(--bg-deep);
color: var(--text-white);
font-family: 'Inter', "Noto Sans SC", sans-serif;
height: 100%; width: 100%;
overflow: hidden; 
position: fixed; 
}

/* 顶部氛围光 */
body::before {
content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 60vh;
background: radial-gradient(circle at 50% 0%, #1a1b2e 0%, transparent 70%);
pointer-events: none; z-index: -1;
}

/* --- 1. 导航栏 --- */
.navbar {
position: fixed; top: 0; left: 0; width: 100%; height: 60px; z-index: 1000;
background: rgba(5, 5, 5, 0); backdrop-filter: blur(0px);
transition: all 0.7s ease;
}

.navbar.scrolled {
background: rgba(5, 5, 5, 0.92) !important;
backdrop-filter: blur(5px) !important;
}

.nav-content {
max-width: 1400px; margin: 0 auto; height: 100%;
display: flex; align-items: center; justify-content: space-between;
padding: 0 24px;
}

.logo { display: flex; align-items: center; gap: 8px; }

.logo-text { 
color: #fff; font-family: 'Playfair Display', serif; font-weight: 700; letter-spacing: 1px;
font-size: 1.2rem;
}

.nav-links a { 
color: rgba(255,255,255,0.7); text-decoration: none; font-size: 0.85rem; 
margin-left: 16px; letter-spacing: 1px; font-weight: 550; transition: color 0.3s;
}

.nav-links a.active { color: var(--accent); }

/* --- 2. 滚动主容器 --- */
#gallery-wrapper {
position: absolute; 
top: 0; bottom: 0; left: 0; right: 0;
height: auto !important; width: 100%;
overflow-y: auto; -webkit-overflow-scrolling: touch;
padding: 0; z-index: 1; 
}

/* --- 3. 标题区 --- */
.hero { 
max-width: 1400px; margin: 0 auto; text-align: center; 
padding-top: 80px; padding-bottom: 20px;
}

.hero-subtitle { 
font-size: 0.7rem; letter-spacing: 4px; color: var(--accent); 
margin-bottom: 10px; font-weight: 600;
}

.hero h1 { 
font-family: "Noto Sans SC", sans-serif; font-size: 3.5rem; font-weight: 700; 
color: #ffffff; text-shadow: 0 10px 30px rgba(0,0,0,0.8);
}

/* --- 4. 吸顶分类条 --- */
.sticky-category-bar {
position: sticky; top: 60px; z-index: 900;
padding: 5px 0; background: rgba(5, 5, 5, 0.92); 
/* 🔥 核心增加：加上这一句，分类栏立刻变磨砂 */
/* backdrop-filter: blur(3px);    */
border-bottom: 1px solid rgba(255,255,255,0.05);
}

.bar-inner {
    max-width: 1400px; margin: 0 auto;
    display: flex; align-items: center; gap: 10px; padding: 0 15px;
}

/* 金色搜索圆钮 */
.search-circle-btn {
    flex-shrink: 0; 
    width: 34px; height: 34px;
    border-radius: 50%;
    background: #000;
    border: 1px solid var(--accent);
    color: var(--accent);
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    box-shadow: 0 0 10px rgba(184, 150, 72, 0.2);
    transition: all 0.3s;
}
.search-circle-btn svg { width: 14px; height: 14px; }
.search-circle-btn:active { transform: scale(0.9); background: var(--accent); color: #000; }

.category-scroll {
display: flex; overflow-x: auto; gap: 10px; padding: 0; flex-grow: 1;
scrollbar-width: none;
}

.cat-pill{
background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.05);
color: #888; padding: 6px 14px; border-radius: 50px;
font-size: 12px; white-space: nowrap; cursor: pointer; transition: all 0.3s;
}

.cat-pill.active { background: #fff; color: #000; font-weight: 600; }

/* --- 5. 瀑布流 & Loading --- */
#columns-container { 
max-width: 1400px; margin: 0 auto; display: flex; gap: 10px; padding: 0 10px; min-height: 200px;
}

.gallery-column { flex: 1; display: flex; flex-direction: column; gap: 10px; }

.loading-spinner {
width: 40px; height: 40px; margin: 60px auto;
border: 2px solid rgba(184, 150, 72, 0.1);
border-top-color: var(--accent);
border-radius: 50%;
animation: spin 0.8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* --- 6. 卡片样式 --- */
.card { position: relative; border-radius: 8px; background: var(--bg-card); cursor: pointer; overflow: hidden; }

.card img { width: 100%; display: block; opacity: 0.95; border-radius: 8px; }

@media (max-width: 768px) {
.hero h1 { font-size: 2.2rem; } 
.card-info {
position: absolute; bottom: 0; left: 0; width: 100%; padding: 40px 8px 10px;
background: linear-gradient(to top, rgba(0,0,0,0.9), transparent);
}
.card-title { color: #fff; font-size: 13px; font-family: 'Playfair Display', serif; font-weight: 700; text-shadow: 0 2px 4px rgba(0,0,0,0.8); }
}

/* --- 7. 弹窗最终版 --- */
.modal {
display: none; position: fixed; top: 0; left: 0; width: 100%; 
height: 100dvh; 
background: rgba(0,0,0,0.95); backdrop-filter: blur(10px);
z-index: 2000; align-items: center; justify-content: center; opacity: 0; transition: opacity 0.3s;
}

.modal.show { opacity: 1; }

.modal-content {
width: 90%; max-width: 1100px; height: 85dvh; 
background: #0f0f0f; border: 1px solid #222; display: flex; 
box-shadow: 0 0 80px rgba(0,0,0,0.9); border-radius: 12px; overflow: hidden;
}

.modal-img-box { 
flex: 1.3; background: radial-gradient(circle at center, #222 0%, #000 100%); 
display: flex; align-items: center; justify-content: center; 
padding: 0; position: relative; border-right: 1px solid #1a1a1a;
}

#modalImage { width: 100%; max-height: 100%; object-fit: contain; }

.modal-info-box { 
flex: 1; padding: 40px; display: flex; flex-direction: column; 
background: #0f0f0f; min-width: 350px; position: relative;
}

.close-btn-invisible {
position: absolute; top: 15px; right: 15px; z-index: 50;
background: transparent; border: none; 
color: rgba(255,255,255,0.6); font-size: 30px; cursor: pointer;
}

.modal-tag { color: var(--accent); font-size: 13px; letter-spacing: 2px; font-weight: 700; margin-bottom: 10px; display: block; text-transform: uppercase; }

#modalTitle { font-family: 'Playfair Display', 'Songti SC', serif; font-size: 2.4rem; line-height: 1.1; color: #fff; margin-bottom: 25px; font-weight: 700; }

.prompt-container { 
background: #0a0a0a; border: 1px solid #222; border-radius: 6px;
flex-grow: 1; display: flex; flex-direction: column; overflow: hidden; margin-bottom: 25px;
position: relative; 
padding-bottom: 30px !important; 
}

.prompt-tools { background: #111; padding: 10px 15px; border-bottom: 1px solid #222; display: flex; justify-content: space-between; align-items: center; }

.prompt-label { color: #666; font-size: 11px; font-weight: 700; }

.btn-copy { background: #222; border: 1px solid #444; color: #ccc; padding: 6px 16px; font-size: 12px; border-radius: 4px; cursor: pointer; transition: all 0.2s; }

.btn-copy.copied { background: transparent !important; border-color: var(--accent) !important; color: var(--accent) !important; }

.prompt-text { padding: 15px; padding-bottom: 10px; color: #bbb; font-family: 'Inter', monospace; font-size: 13px; line-height: 1.6; overflow-y: auto; }

.modal-id {
position: absolute; bottom: 8px; left: 12px;
color: #333; font-size: 10px; font-family: monospace;
pointer-events: none;
}

.modal-footer { 
margin-top: auto; 
display: flex; align-items: center; 
justify-content: flex-end; 
padding-top: 10px; 
}

.btn-pill-back { background: transparent; border: none; color: #888; font-size: 14px; cursor: pointer; display: flex; align-items: center; gap: 5px; }

.btn-pill-back:hover { color: #fff; }

@media (max-width: 768px) {
.modal { 
display: none; 
height: 100dvh; 
overflow-y: auto !important; 
align-items: flex-start !important; 
padding: 0 !important; 
background: #000; 
}
.modal-content { 
flex-direction: column; 
width: 100%; 
height: auto !important; 
min-height: 100dvh; 
border: none; border-radius: 0; 
}
.modal-img-box { flex: none; width: 100%; height: auto !important; border-right: none; background: radial-gradient(circle at center, #222 0%, #000 100%); }
#modalImage { width: 100%; height: auto !important; max-height: none !important; object-fit: contain; }
.modal-info-box { 
padding: 20px 20px 60px 20px !important; 
flex: 1; 
}
#modalTitle { font-size: 2rem; }
.prompt-container { flex-grow: 0; height: auto; overflow: visible; }
.prompt-text { overflow: visible; height: auto; }
}

/* --- 8. 音乐按钮 --- */
.music-btn { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; margin-left: 20px; background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(184, 150, 72, 0.4); color: var(--accent); border-radius: 50%; cursor: pointer; }

.music-btn.playing { background: transparent; border-color: #fff; animation: disk-spin 4s linear infinite; box-shadow: 0 0 8px var(--accent); }

@keyframes disk-spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }

/* ========================================= */
/* 🔍 搜索：白框 + 定制滚动条 + 智能排版 */
/* ========================================= */

.search-modal {
    display: none; opacity: 0;
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    z-index: 9999;
    align-items: center; justify-content: center; flex-direction: column;
    background: rgba(0, 0, 0, 0.6); 
    backdrop-filter: blur(15px);
    transition: all 0.4s ease; 
}
.search-modal.show { opacity: 1; }

.search-modal.smoke-exit {
    opacity: 0;
    backdrop-filter: blur(0px); 
    transform: scale(1.05);
    transition: all 0.5s ease-out;
}

.search-backdrop { position: absolute; top:0; left:0; width:100%; height:100%; }

.search-input-box { 
    position: relative; 
    width: 80%; /* 保持不变 */
    max-width: 600px; 
    z-index: 2; 
    text-align: center; 
}

/* 🔥 TextArea 输入框 */
#globalSearchInput {
    width: 100%;
    background: transparent !important;
    border: 1px solid rgba(255,255,255,0.8); 
    border-radius: 4px; 
    font-family: 'Playfair Display', 'Songti SC', serif;
    
    color: #fff; /* ✅ 修复：加上白字，防止变黑看不见 */
    font-size: 1.5rem; /* 大字模式：1.5rem */
    padding: 20px 45px 20px 15px; 
    
    text-align: center; 
    
    height: auto;
    min-height: 80px; 
    max-height: 40vh; /* 40% 屏幕高度天花板 */
    
    /* 🔥 核心修复：默认隐藏滚动条，只有 JS 判断到底了才让它出来 */
    overflow-y: hidden; 
    
    resize: none;
    transition: font-size 0.3s ease, text-align 0.3s ease; 
    
    touch-action: pan-y;
}

/* 🎨 定制滚动条 */
#globalSearchInput::-webkit-scrollbar {
    width: 3px; 
}
#globalSearchInput::-webkit-scrollbar-track {
    background: transparent; 
}
#globalSearchInput::-webkit-scrollbar-thumb {
    background: rgba(184, 150, 72, 0.4); 
    border-radius: 10px;
}

#globalSearchInput:focus { outline: none; border-color: #fff; }
#globalSearchInput::placeholder { color: rgba(255,255,255,0.3); font-style: italic; font-size: 1rem; }

/* 🔥 智能排版（小字模式） */
#globalSearchInput.long-text {
    /* ✨ 改动：字号改小到 0.9rem，能多塞两个字 */
    font-size: 0.9rem !important; 
    /* ✨ 改动：左右内边距收窄，给字腾地方 */
    padding: 20px 35px 20px 10px !important;
    text-align: left !important;   
    line-height: 1.6;
}

.search-tip { margin-top: 20px; color: #888; font-size: 12px; letter-spacing: 1px; position: relative; z-index: 2; }

.close-search-btn {
    position: absolute; top: 30px; right: 30px;
    background: transparent; border: none; color: #fff;
    font-size: 40px; cursor: pointer; z-index: 10;
}

/* 🏹 框内呼吸箭头 */
.search-arrow-submit {
    position: absolute;
    bottom: 15px; right: 15px;
    background: transparent; border: none;
    color: var(--accent); opacity: 0.3;
    cursor: pointer; 
    transition: all 0.3s ease;
}
.search-arrow-submit svg { width: 24px; height: 24px; }

.search-arrow-submit.active {
    opacity: 1;
    filter: drop-shadow(0 0 8px var(--accent));
    transform: scale(1.1);
}














