:root {
    --bg-color: #0f1215; 
    --text-main: #e2e8f0;
    --text-sub: #94a3b8;
    --accent: #4fd1c5;
    --header-height: 50px; 
    --top-panel-height: 65vh; 
    --img-height: 24vh; 
    --portrait-size: 80px;
    --name-size: 28px;
    --side-padding: 80px; 
    --item-gap: 20px;
}

body[data-lang="zh"] .lang-en { display: none !important; }
body[data-lang="en"] .lang-zh { display: none !important; }

/* 🟢 修改 1：将 768px 放宽到 1024px，把 iPad Pro 竖屏也强行拉入移动端布局，消除大片空白 */
@media (max-width: 1024px) and (orientation: portrait) {
    :root { --top-panel-height: 45vh; --img-height: 18vh; --portrait-size: 50px; --name-size: 16px; --side-padding: 10px; }
    header h1, #ranking-tabs-container, .toggle-wrapper { display: none !important; }
    header { padding: 0 5px; gap: 5px; justify-content: space-between; overflow: visible; }
    .search-group { flex: 1; margin: 0; gap: 5px; justify-content: flex-start; }
    .search-box { width: auto; flex: 1; min-width: 40px; max-width: 120px; } 
    .search-input { padding: 4px 6px; font-size: 11px; width: 100%; box-sizing: border-box; }
    .search-btn { padding: 0 8px; }
    .lang-btn, .user-menu-wrapper { flex-shrink: 0; } 
    #search-detail-title { font-size: 11px !important; margin-top: 2px; }
    #search-detail-year { font-size: 10px !important; margin-bottom: 2px; }
    .interact-panel { padding: 4px 6px; gap: 4px; }
    .star { font-size: 16px !important; }
    .author-section { margin-bottom: 5px !important; }
    #works-scroll-area { padding-top: 30px !important; margin: 0 !important; }
    .series-label { top: -20px; font-size: 10px; }
    .author-bio { display: none !important; } 
    .nav-btn { display: none !important; } 
    .icon-object { display: none !important; } 
    .timeline-dot { display: block !important; } 
    .person-label { font-size: 10px !important; } 
    .sort-controls { top: -5px !important; right: 5px !important; transform: scale(0.8); transform-origin: top right; } 
    #connector-layer, #drag-zone { display: none !important; }
    #bottom-filters { bottom: 5px !important; transform: translateX(-50%) scale(0.85); width: 110%; }
    #right-detail-area { width: 45%; padding: 5px; }
    
    .intro-text-container { padding: 0 10px !important; } 
    .intro-text-container p { font-size: 11px !important; line-height: 1.5 !important; letter-spacing: 0px !important; margin: 3px 0 !important; }
    .intro-text-container p.intro-highlight { font-size: 13px !important; margin-top: 10px !important; letter-spacing: 1px !important; }
    .enter-btn { padding: 6px 20px !important; font-size: 12px !important; margin-top: 15px !important; letter-spacing: 1px !important; }
}

@media (max-height: 450px) and (orientation: landscape) {
    :root { --top-panel-height: calc(100vh - var(--header-height)); --img-height: 30vh; --portrait-size: 40px; --name-size: 16px; --side-padding: 10px; }
    #bottom-panel { display: none !important; }
    header h1, #ranking-tabs-container, .toggle-wrapper { display: none !important; }
    header { padding: 0 10px; gap: 8px; overflow: visible; }
    .search-group { flex: 1; margin: 0; gap: 8px; }
    .search-box { width: auto; flex: 1; max-width: 160px; }
    #right-detail-area { width: 40%; padding: 5px; justify-content: center; }
    #detail-visual-wrapper { flex: 0 1 50vh !important; margin-bottom: 2px !important; }
    #search-detail-title { font-size: 11px !important; margin-top: 0 !important; margin-bottom: 0 !important; }
    #detail-bottom-info { min-height: 40px !important; margin-top: 0 !important; }
    .interact-panel { top: -15px !important; right: 0 !important; transform: scale(0.8) !important; transform-origin: top right !important; padding: 4px 8px !important; }
    .author-section { margin-bottom: 5px !important; }
    #works-scroll-area { padding-top: 25px !important; margin: 0 !important; }
    .series-label { top: -15px; font-size: 10px; }
    .author-bio { display: none !important; } 
    .nav-btn { display: none !important; } 
    .sort-controls { top: 5px !important; right: 5px !important; transform: scale(0.8); transform-origin: top right; } 
    #connector-layer, #drag-zone { display: none !important; }
    
    .intro-text-container p { font-size: 11px !important; line-height: 1.6 !important; margin: 2px 0 !important; }
    .intro-text-container p.intro-highlight { margin-top: 10px !important; }
    .enter-btn { margin-top: 10px !important; padding: 6px 20px !important; font-size: 12px !important; }
}

/* 🟢 修改 2：增加了 height: 100dvh; 专治 iOS Safari 底部高度溢出 */
body { font-family: 'Segoe UI', Roboto, sans-serif; background: radial-gradient(circle at 50% 30%, #1e293b 0%, #0f172a 40%, #020617 100%); color: var(--text-main); margin: 0; padding: 0; overflow: hidden; height: 100vh; height: 100dvh; width: 100vw; display: flex; flex-direction: column; user-select: auto; }
body.dragging { cursor: grabbing !important; user-select: none !important; }
::selection { background: var(--accent); color: #000; }

#universe-bg { position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; z-index: 0; pointer-events: none; opacity: 1; transition: opacity 1.5s ease-in-out; background: radial-gradient(circle at 50% 30%, #1e293b 0%, #0f172a 40%, #020617 100%); overflow: hidden; }
.star-layer { position: absolute; top: -50%; left: -50%; width: 200%; height: 200%; will-change: transform; }
.star-layer.one { background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cg fill='%23fff'%3E%3Ccircle cx='12' cy='45' r='1' opacity='0.8'/%3E%3Ccircle cx='110' cy='20' r='1.5' opacity='0.9'/%3E%3Ccircle cx='210' cy='150' r='1' opacity='0.5'/%3E%3Ccircle cx='60' cy='220' r='2' opacity='0.7'/%3E%3Ccircle cx='280' cy='80' r='1.5' opacity='0.6'/%3E%3Ccircle cx='180' cy='280' r='1' opacity='0.8'/%3E%3C/g%3E%3C/svg%3E") repeat; animation: starDrift1 60s linear infinite; }
.star-layer.two { background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='500' height='500'%3E%3Cg fill='%23fff'%3E%3Ccircle cx='50' cy='150' r='2' opacity='0.9'/%3E%3Ccircle cx='350' cy='80' r='1' opacity='0.5'/%3E%3Ccircle cx='180' cy='420' r='1.5' opacity='0.7'/%3E%3Ccircle cx='420' cy='310' r='2.5' fill='%234fd1c5' opacity='0.8'/%3E%3Ccircle cx='290' cy='250' r='1' opacity='0.6'/%3E%3C/g%3E%3C/svg%3E") repeat; animation: starDrift2 100s linear infinite; }
.star-layer.three { background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='700' height='700'%3E%3Cg fill='%23fff'%3E%3Ccircle cx='100' cy='600' r='1' opacity='0.4'/%3E%3Ccircle cx='600' cy='100' r='2' fill='%234fd1c5' opacity='0.6'/%3E%3Ccircle cx='350' cy='400' r='1.5' opacity='0.8'/%3E%3C/g%3E%3C/svg%3E") repeat; animation: starDrift3 180s linear infinite; }
@keyframes starDrift1 { from { transform: translate3d(0, 0, 0); } to { transform: translate3d(-300px, -300px, 0); } }
@keyframes starDrift2 { from { transform: translate3d(0, 0, 0); } to { transform: translate3d(-500px, 500px, 0); } }
@keyframes starDrift3 { from { transform: translate3d(0, 0, 0); } to { transform: translate3d(700px, -700px, 0); } }

#empty-state { position: absolute; top: 0; left: 0; width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; pointer-events: auto; z-index: 2000; transition: opacity 1s ease-in-out; }

.intro-text-container { text-align: center; max-width: 900px; padding: 0 40px; animation: textFadeIn 2.5s ease-out forwards; z-index: 10; position: relative; }
.intro-text-container p { color: #ffffff; font-size: 18px; line-height: 2.2; letter-spacing: 3px; margin: 12px 0; font-weight: 500; text-shadow: 0 0 10px rgba(255, 255, 255, 0.8), 0 0 20px rgba(79, 209, 197, 0.5); transition: color 0.5s, text-shadow 0.5s; }
.intro-text-container p:hover { text-shadow: 0 0 15px #fff, 0 0 30px var(--accent); }
.intro-text-container p.intro-highlight { color: #ffffff; font-weight: bold; font-size: 22px; margin-top: 35px; letter-spacing: 4px; text-shadow: 0 0 10px #ffffff, 0 0 20px var(--accent), 0 0 40px var(--accent); }
@keyframes textFadeIn { 0% { opacity: 0; transform: translateY(30px); filter: blur(8px); } 100% { opacity: 1; transform: translateY(0); filter: blur(0); } }

.enter-btn { margin-top: 45px; background: rgba(79, 209, 197, 0.1); color: var(--accent); border: 1px solid var(--accent); padding: 12px 45px; font-size: 16px; font-weight: bold; border-radius: 30px; cursor: pointer; letter-spacing: 4px; transition: all 0.3s; box-shadow: 0 0 15px rgba(79, 209, 197, 0.3); outline: none; backdrop-filter: blur(5px); }
.enter-btn:hover { background: var(--accent); color: #000; box-shadow: 0 0 30px rgba(79, 209, 197, 0.8); transform: scale(1.05); }

#connector-layer { position: fixed; top: 0; left: 0; width: 100%; height: 100%; pointer-events: none; z-index: 1500; overflow: visible; }
.connector-path { fill: none; stroke: var(--accent); stroke-width: 2px; filter: drop-shadow(0 0 8px var(--accent)); stroke-linejoin: round; stroke-linecap: round; stroke-dasharray: 3000; stroke-dashoffset: 3000; animation: dash 1s ease-out forwards; }
@keyframes dash { to { stroke-dashoffset: 0; } }

.work-img.glow-active, .grid-work-img.glow-active { animation: glowPulse 2s infinite; border: 2px solid var(--accent) !important; z-index: 10; }
@keyframes glowPulse { 0% { box-shadow: 0 0 0 0 rgba(79, 209, 197, 0.7); border-color: var(--accent); transform: scale(1.05); } 70% { box-shadow: 0 0 20px 10px rgba(79, 209, 197, 0); border-color: var(--accent); transform: scale(1.1); } 100% { box-shadow: 0 0 0 0 rgba(79, 209, 197, 0); border-color: rgba(255,255,255,0.8); transform: scale(1.05); } }

.sort-controls { position: absolute; top: 0; right: 40px; z-index: 50; display: flex; align-items: center; gap: 12px; background: rgba(0,0,0,0.3); padding: 4px 12px; border-bottom-left-radius: 10px; border-bottom-right-radius: 10px; backdrop-filter: blur(4px); border: 1px solid rgba(255,255,255,0.1); border-top: none; }
.sort-btn { width: 18px; height: 18px; fill: #94a3b8; cursor: pointer; transition: all 0.3s; opacity: 0.6; display: block; }
.sort-btn:hover { opacity: 1; fill: #fff; } .sort-btn.active { fill: var(--accent); opacity: 1; filter: drop-shadow(0 0 5px var(--accent)); }
.works-count { font-size: 14px; font-weight: bold; color: #fff; padding-left: 10px; border-left: 1px solid rgba(255,255,255,0.2); line-height: 1; }

#footer-info { position: fixed; bottom: 10px; left: 0; width: 100%; text-align: center; color: rgba(255, 255, 255, 0.3); font-size: 11px; pointer-events: none; z-index: 50; text-shadow: 0 1px 2px #000; }

header { height: var(--header-height); padding: 0 var(--side-padding); background: transparent; display: flex; align-items: center; justify-content: flex-start; flex-shrink: 0; z-index: 100; gap: 20px; position: relative; }
h1 { margin: 0; font-weight: 200; letter-spacing: 2px; color: rgba(255,255,255,0.4); font-size: 14px; white-space: nowrap; margin-right: 10px; }

.search-group { display: flex; gap: 10px; align-items: center; margin-right: auto; }
.search-box { position: relative; width: 180px; display: flex; }
input.search-input { flex: 1; background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.2); color: #fff; padding: 5px 10px; border-radius: 15px; font-size: 12px; outline: none; transition: 0.2s; }
input.search-input:focus { background: rgba(255,255,255,0.2); border-color: var(--accent); }
#search-work-input { border-top-right-radius: 0; border-bottom-right-radius: 0; }
.search-btn { background: var(--accent); color: #000; border: 1px solid var(--accent); border-top-right-radius: 15px; border-bottom-right-radius: 15px; padding: 0 12px; cursor: pointer; font-weight: bold; transition: 0.2s; outline: none; }
.search-btn:hover { background: #fff; border-color: #fff; }

.search-dropdown { position: absolute; top: 35px; left: 0; width: 240px; max-height: 300px; overflow-y: auto; background: #1e293b; border: 1px solid rgba(255,255,255,0.1); border-radius: 8px; box-shadow: 0 4px 15px rgba(0,0,0,0.5); display: none; z-index: 200; }
.search-item { padding: 8px 12px; font-size: 13px; color: #ccc; cursor: pointer; border-bottom: 1px solid rgba(255,255,255,0.05); display: flex; align-items: center; gap: 10px; transition: 0.1s; }
.search-item:hover, .search-item.selected { background: var(--accent); color: #000; }
.search-thumb { width: 24px; height: 24px; border-radius: 50%; object-fit: cover; background: #000; flex-shrink: 0; }

.toggle-wrapper { display: flex; align-items: center; margin-left: 15px; cursor: pointer; }
.toggle-wrapper input { display: none; }
.toggle-btn { width: 36px; height: 18px; background: rgba(255,255,255,0.1); border-radius: 10px; position: relative; transition: 0.3s; border: 1px solid rgba(255,255,255,0.2); }
.toggle-btn::after { content: ''; position: absolute; left: 2px; top: 2px; width: 12px; height: 12px; background: #94a3b8; border-radius: 50%; transition: 0.3s; }
.toggle-wrapper input:checked + .toggle-btn { background: rgba(79, 209, 197, 0.2); border-color: var(--accent); }
.toggle-wrapper input:checked + .toggle-btn::after { left: 20px; background: var(--accent); }
.toggle-label { font-size: 11px; color: var(--text-sub); margin-left: 6px; user-select: none; }

#ranking-tabs-container { display: flex; align-items: center; background: rgba(255,255,255,0.05); padding: 4px 15px; border-radius: 20px; border: 1px solid rgba(255,255,255,0.1); margin-right: 15px; }
.ranking-title { font-size: 12px; color: var(--accent); margin-right: 10px; font-weight: bold; white-space: nowrap; }
#ranking-tabs { display: flex; gap: 8px; }
.rank-tab { background: transparent; border: 1px solid transparent; color: var(--text-sub); padding: 3px 10px; border-radius: 12px; font-size: 11px; cursor: pointer; transition: all 0.3s; font-weight: bold; white-space: nowrap; outline: none; }
.rank-tab:hover { color: #fff; }
.rank-tab.active[data-type="works"] { background: var(--accent); color: #000; box-shadow: 0 0 10px rgba(79,209,197,0.3); }
.rank-tab.active[data-type="career"] { background: #9b59b6; color: #fff; box-shadow: 0 0 10px rgba(155,89,182,0.3); }
.rank-tab.active[data-type="density"] { background: #ff7675; color: #fff; box-shadow: 0 0 10px rgba(255,118,117,0.3); }

.lang-btn { background: transparent; color: #fff; border: 1px solid rgba(255,255,255,0.3); border-radius: 15px; padding: 4px 12px; font-size: 12px; cursor: pointer; transition: 0.2s; font-weight: bold; }
.lang-btn:hover { background: rgba(255,255,255,0.1); border-color: var(--accent); color: var(--accent); }

.user-menu-wrapper { position: relative; display: flex; align-items: center; }
.user-btn { background: rgba(255,255,255,0.05); color: var(--text-main); border: 1px solid rgba(255,255,255,0.2); border-radius: 15px; padding: 4px 12px; font-size: 12px; cursor: pointer; transition: 0.2s; font-weight: bold; display: flex; align-items: center; gap: 5px; }
.user-btn:hover { background: rgba(255,255,255,0.1); border-color: var(--accent); }
.user-avatar-circle { width: 18px; height: 18px; background: var(--accent); color: #000; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 10px; font-weight: 900; }

.user-dropdown { position: absolute; top: calc(100% + 10px); right: 0; background: rgba(15, 23, 42, 0.95); backdrop-filter: blur(10px); border: 1px solid rgba(255,255,255,0.1); border-radius: 8px; padding: 6px; box-shadow: 0 10px 30px rgba(0,0,0,0.8); display: none; z-index: 10001; min-width: 140px; transform-origin: top right; }
.user-dropdown.active { display: block; animation: dropDownFade 0.2s ease-out forwards; }
@keyframes dropDownFade { from { opacity: 0; transform: scale(0.9); } to { opacity: 1; transform: scale(1); } }
.dropdown-item { padding: 10px 15px; font-size: 13px; color: #e2e8f0; cursor: pointer; border-radius: 6px; transition: 0.2s; text-align: left; display: flex; align-items: center; gap: 8px; font-weight: bold; }
.dropdown-item:hover { background: rgba(255,255,255,0.1); color: var(--accent); }
.dropdown-item.danger:hover { background: rgba(255, 118, 117, 0.15); color: #ff7675; }

#top-panel { display: flex; flex-direction: row; height: var(--top-panel-height); padding: 10px var(--side-padding); box-sizing: border-box; position: relative; background: radial-gradient(ellipse at top, rgba(255,255,255,0.08) 0%, transparent 70%); mask-image: linear-gradient(to bottom, black 90%, transparent 100%); -webkit-mask-image: linear-gradient(to bottom, black 90%, transparent 100%); }
#left-content-area { flex: 1; min-width: 0; position: relative; display: flex; flex-direction: column; height: 100%; overflow: hidden; }

#right-detail-area { width: 32%; height: 100%; display: none; flex-direction: column; align-items: center; justify-content: flex-start; position: relative; border-left: 1px dashed rgba(255,255,255,0.1); padding: 5px 15px 30px 15px; box-sizing: border-box; animation: fadeInRight 0.3s ease; }
@keyframes fadeInRight { from { opacity: 0; transform: translateX(20px); } to { opacity: 1; transform: translateX(0); } }

#detail-visual-wrapper { flex: 1; width: 100%; display: flex; align-items: center; justify-content: center; position: relative; min-height: 0; margin-bottom: 12px; }
#search-detail-img { max-height: 100%; max-width: 100%; object-fit: contain; border-radius: 6px; box-shadow: 0 10px 30px rgba(0,0,0,0.8); border: 1px solid rgba(255,255,255,0.1); background: transparent; display: none; position: relative; z-index: 500; }
#search-detail-placeholder.cover-placeholder { width: 60%; height: auto; font-size: 18px; border: 1px solid rgba(255,255,255,0.1); box-shadow: 0 10px 30px rgba(0,0,0,0.8); display: none; position: relative; z-index: 500; }

#search-detail-title { font-weight: bold; text-align: center; color: #fff; font-size: 18px; line-height: 1.4; padding: 0 5px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-top: 5px; text-shadow: 0 2px 5px #000; }
#detail-bottom-info { position: relative; width: 100%; display: flex; justify-content: center; align-items: flex-start; margin-top: 4px; min-height: 60px; }
#search-detail-year { color: var(--accent); font-size: 14px; font-family: monospace; text-align: center; position: relative; z-index: 10; margin: 0; line-height: 1; padding-top: 8px; }

.interact-panel { position: absolute; right: 0; top: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; background: rgba(0,0,0,0.5); padding: 8px 12px; border-radius: 10px; border: 1px solid rgba(255,255,255,0.15); box-shadow: 0 10px 25px rgba(0,0,0,0.8); backdrop-filter: blur(10px); z-index: 1000; width: auto; }
.stars-container { display: flex; justify-content: center; gap: 2px; margin-bottom: 0; direction: rtl; } 
.star { font-size: 20px; color: rgba(255,255,255,0.15); cursor: pointer; transition: 0.2s; user-select: none; line-height: 1; }
.star:hover, .star:hover ~ .star, .star.active, .star.active ~ .star { color: #f1c40f; text-shadow: 0 0 10px rgba(241,196,15,0.5); }
.action-row { display: flex; gap: 8px; width: 100%; justify-content: space-between; }
.action-btn { flex: 1; display: flex; align-items: center; justify-content: center; gap: 6px; padding: 4px 8px; border-radius: 4px; border: 1px solid rgba(255,255,255,0.15); background: transparent; color: var(--text-sub); cursor: pointer; transition: 0.2s; font-size: 11px; font-weight: bold; white-space: nowrap; }
.action-btn:hover { background: rgba(255,255,255,0.1); color: #fff; }
.action-btn.active.btn-own { background: rgba(79, 209, 197, 0.2); border-color: var(--accent); color: var(--accent); }
.action-btn.active.btn-wish { background: rgba(255, 118, 117, 0.2); border-color: #ff7675; color: #ff7675; }

#artist-view-container { display: none; flex-direction: column; height: 100%; width: 100%; opacity: 0; transition: opacity 0.5s; }
.author-section { display: flex; gap: 20px; margin-bottom: 10px; align-items: center; flex-shrink: 0; text-shadow: 0 2px 10px rgba(0,0,0,0.8); }
.author-portrait { width: var(--portrait-size); height: var(--portrait-size); border-radius: 50%; border: 2px solid rgba(255,255,255,0.9); box-shadow: 0 0 30px rgba(0,0,0,0.6); object-fit: cover; background: #000; flex-shrink: 0; }
.author-text { flex: 1; overflow: hidden; display: flex; flex-direction: column; justify-content: center; }
.author-name { font-size: var(--name-size); font-weight: 700; margin: 0; color: #fff; letter-spacing: 1px; }
.author-meta { font-size: 12px; color: var(--accent); margin: 3px 0 5px; font-weight: 600; letter-spacing: 0.5px; display: flex; align-items: center; gap: 6px; }
.author-bio { font-size: 13px; color: #94a3b8; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: auto; max-height: 120px; max-width: 1200px; padding-right:10px; }
.author-bio::-webkit-scrollbar { width: 4px; } .author-bio::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.2); border-radius: 4px; }

.works-wrapper { flex: 1; position: relative; display: flex; align-items: stretch; overflow: hidden; min-height: 0; }
.cover-wrapper { position: relative; display: inline-flex; justify-content: center; line-height: 0; }
.work-img, .grid-work-img { height: var(--img-height); width: auto; max-width: 100%; object-fit: contain; object-position: center; border-radius: 4px; box-shadow: 0 10px 20px rgba(0,0,0,0.5); border: 1px solid rgba(255,255,255,0.15); transition: all 0.3s; -webkit-user-drag: none; background: transparent; }

.owned-badge { position: absolute; top: -6px; right: -6px; width: 22px; height: 22px; background: #ff4757; color: #fff; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: bold; box-shadow: 0 2px 8px rgba(0,0,0,0.8); border: 2px solid #1e293b; z-index: 20; pointer-events: none; transition: all 0.3s; }

#works-scroll-area { flex: 1; height: 100%; margin: 0 60px; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; display: flex; align-items: flex-start; padding-top: 80px; padding-bottom: 0; cursor: default; transition: opacity 0.3s ease; opacity: 0; }
#works-scroll-area::-webkit-scrollbar { display: none; }
.work-item { flex: 0 0 auto; display: flex; flex-direction: column; margin-right: 20px; width: max-content; max-width: 160px; position: relative; cursor: pointer; justify-content: flex-start; z-index: 10; pointer-events: auto; }

.work-item:hover .work-img, .grid-work-item:hover .grid-work-img, .work-item:hover .cover-placeholder, .grid-work-item:hover .cover-placeholder { transform: translateY(-5px); box-shadow: 0 15px 30px rgba(0,0,0,0.7); border-color: rgba(255,255,255,0.8); }
.work-item:hover .owned-badge, .grid-work-item:hover .owned-badge { transform: translateY(-5px); }

#search-grid-area { display: none; width: 100%; height: 100%; overflow-y: auto; padding-right: 15px; box-sizing: border-box; grid-template-columns: repeat(13, 1fr); gap: 15px; align-items: start; align-content: start; padding-top: 40px; padding-bottom: 40px; transition: grid-template-columns 0.3s ease; }
#search-grid-area.with-detail { grid-template-columns: repeat(9, 1fr) !important; }
#search-grid-area::-webkit-scrollbar { width: 6px; } #search-grid-area::-webkit-scrollbar-track { background: rgba(255,255,255,0.05); border-radius: 10px; } #search-grid-area::-webkit-scrollbar-thumb { background: rgba(79,209,197,0.3); border-radius: 10px; } #search-grid-area::-webkit-scrollbar-thumb:hover { background: rgba(79,209,197,0.8); }

.grid-work-item { cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: flex-start; transition: 0.2s; position: relative; z-index: 10; pointer-events: auto; }
.grid-work-title { display: none; } 

#ranking-view-container { display: none; width: 100%; height: 100%; flex-direction: row; padding: 10px 0 0 20px; box-sizing: border-box; position: relative; }
.y-axis-container { width: 30px; display: flex; flex-direction: column; justify-content: flex-start; align-items: center; border-right: 1px solid rgba(255,255,255,0.3); margin-bottom: 151px; padding-right: 10px; padding-top: 10px; z-index: 10; }
.y-axis-label { writing-mode: vertical-rl; font-size: 11px; color: rgba(255,255,255,0.6); letter-spacing: 2px; white-space: nowrap; }
.chart-scroll-area { flex: 1; overflow-x: auto; overflow-y: hidden; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,0.2) transparent; }
.chart-scroll-area::-webkit-scrollbar { height: 6px; } .chart-scroll-area::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.2); border-radius: 6px; }
#ranking-chart { display: flex; height: 100%; padding-bottom: 5px; }
.ranking-total-label { position: absolute; top: 10px; right: 40px; font-size: 12px; color: var(--accent); font-weight: bold; background: rgba(0,0,0,0.4); padding: 4px 12px; border-radius: 12px; border: 1px solid rgba(79,209,197,0.3); display: none; z-index: 100; }

.bar-item { display: flex; flex-direction: column; height: 100%; width: 40px; flex-shrink: 0; }
.bar-upper { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; width: 100%; border-bottom: 1px solid rgba(255,255,255,0.3); pointer-events: none; }
.bar-value { font-size: 11px; color: #fff; margin-bottom: 4px; text-align: center; font-weight: bold; pointer-events: none; }
.bar-meta { font-size: 9px; color: rgba(255,255,255,0.4); margin-bottom: 4px; text-align: center; white-space: nowrap; pointer-events: none; }
.bar-fill { width: 22px; border-radius: 4px 4px 0 0; transition: height 1s cubic-bezier(0.4, 0, 0.2, 1); min-height: 2px; pointer-events: none; }
.bar-fill.type-works { background: linear-gradient(to top, #4fd1c5, #81e6d9); box-shadow: 0 0 10px rgba(79, 209, 197, 0.3); }
.bar-fill.type-career { background: linear-gradient(to top, #9b59b6, #c39bd3); box-shadow: 0 0 10px rgba(155, 89, 182, 0.3); }
.bar-fill.type-density { background: linear-gradient(to top, #ff7675, #fab1a0); box-shadow: 0 0 10px rgba(255, 118, 117, 0.3); }
.bar-lower { height: 150px; width: 100%; display: flex; justify-content: center; overflow: hidden; padding-top: 15px; box-sizing: border-box; }

.bar-name { font-size: 11px; color: var(--text-sub); writing-mode: vertical-rl; white-space: nowrap; text-overflow: clip; text-align: left; transition: all 0.2s; cursor: pointer; pointer-events: auto; }
.bar-name:hover { color: #fff; font-weight: bold; transform: scale(1.05) translateY(-3px); }

.cover-placeholder { height: var(--img-height); aspect-ratio: 0.7; background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%); border: 1px solid rgba(255,255,255,0.15); border-radius: 4px; display: flex; align-items: center; justify-content: center; padding: 15px; box-sizing: border-box; color: var(--text-sub); font-size: 12px; font-weight: bold; text-align: center; line-height: 1.4; box-shadow: 0 5px 15px rgba(0,0,0,0.3); transition: all 0.3s; position: relative; z-index: 2; word-break: break-word; overflow: hidden; user-select: none; }
.cover-placeholder::before { content: ''; position: absolute; top: 0; left: 0; bottom: 0; width: 6px; background: rgba(255,255,255,0.05); border-right: 1px solid rgba(0,0,0,0.2); }
.cover-placeholder.glow-active { border-color: var(--accent); box-shadow: 0 0 20px var(--accent); }

.work-info { margin-top: 8px; width: 100%; text-align: center; opacity: 0.9; transition: opacity 0.2s; }
.work-item:hover .work-info { opacity: 1; }
.work-title { font-size: 13px; color: #cbd5e1; line-height: 1.3; white-space: normal; user-select: text; cursor: pointer; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; height: 2.6em; }
.work-year { font-size: 10px; color: var(--accent); margin-top: 2px; font-family: monospace; }

.work-stats-mini { display: flex; flex-direction: column; align-items: center; gap: 4px; margin-top: 6px; opacity: 0.85; transition: all 0.3s; width: 100%; }
.mini-stars-wrapper { position: relative; display: inline-block; font-size: 14px; color: rgba(255,255,255,0.2); letter-spacing: 2px; line-height: 1; text-shadow: 0 1px 2px #000; }
.mini-stars-bg { display: block; }
.mini-stars-fill { position: absolute; top: 0; left: 0; overflow: hidden; color: #f1c40f; white-space: nowrap; text-shadow: 0 0 5px rgba(241,196,15,0.5); transition: width 0.3s ease; }
.work-stats-counts { display: flex; gap: 12px; font-size: 12px; color: var(--text-sub); }
.work-stats-counts span { display: flex; align-items: center; gap: 3px; font-weight: bold; }

#drag-zone { position: absolute; top: calc(80px + var(--img-height) + 110px); left: 80px; right: 80px; height: 60px; z-index: 60; display: flex; align-items: center; justify-content: center; cursor: grab; transition: background 0.3s; border-radius: 10px; opacity: 1; background: transparent; }
#drag-zone:hover, #drag-zone.active { background: rgba(255,255,255,0.03); }
#drag-zone.active { cursor: grabbing; background: rgba(255,255,255,0.08); }
.drag-indicator { color: var(--accent); font-size: 24px; opacity: 0.3; user-select: none; font-family: monospace; font-weight: bold; animation: breathe 2s infinite ease-in-out; text-shadow: 0 0 10px var(--accent); }

.series-group { display: inline-flex; flex-direction: row; align-items: flex-start; position: relative; margin-right: 30px; height: 100%; }
.series-label { position: absolute; top: -35px; left: 0; width: 100%; text-align: center; font-size: 11px; color: var(--accent); font-weight: bold; letter-spacing: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; opacity: 0.9; z-index: 5; text-shadow: 0 2px 4px #000; line-height: 1.2; }
.series-group .work-item { margin-right: var(--item-gap); }
.series-group .work-item:last-child { margin-right: 0; }
.series-group .work-item::before { content: ''; position: absolute; left: 50%; top: -15px; width: 1px; height: 15px; background: var(--accent); z-index: 1; opacity: 0.6; }
.series-group .work-item::after { content: ''; position: absolute; top: -15px; height: 1px; background: var(--accent); z-index: 1; opacity: 0.6; left: 0; width: calc(100% + var(--item-gap)); }
.series-group .series-label + .work-item::after { left: 50%; width: calc(50% + var(--item-gap)); }
.series-group .work-item:last-child::after { left: 0; width: 50%; }
.series-group .series-label + .work-item:last-child::after { display: none; }

.nav-btn { position: absolute; top: calc(80px + (var(--img-height) / 2)); transform: translateY(-50%); width: 32px; height: 32px; border-radius: 50%; background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1); color: #fff; display: flex; align-items: center; justify-content: center; cursor: pointer; z-index: 10; transition: 0.2s; }
.nav-btn:hover { background: var(--accent); color: #000; box-shadow: 0 0 15px var(--accent); border-color: var(--accent); }
.nav-btn.prev { left: 14px; } .nav-btn.next { right: 14px; }

#bottom-panel { flex: 1; position: relative; overflow: hidden; }
#timeline-wrapper { width: 100%; height: 100%; cursor: grab; }

.timeline-axis { stroke: var(--accent); stroke-width: 1.5px; filter: drop-shadow(0 0 6px var(--accent)); }
.stem-line { stroke: rgba(255,255,255,0.25); stroke-width: 1px; pointer-events: none; }

.person-label { fill: var(--text-sub); pointer-events: auto; cursor: pointer; dominant-baseline: middle; text-shadow: 0 2px 4px #000; transition: 0.3s; }
.year-label { font-size: 10px; fill: rgba(255,255,255,0.3); text-anchor: middle; font-family: monospace; }
.person-group { transition: opacity 0.3s; cursor: pointer; }
.person-group.dimmed { opacity: 0.1; filter: grayscale(100%); }
.person-group.filtered-out { opacity: 0 !important; pointer-events: none !important; }

.person-group:not(.filtered-out):not(.dimmed):hover .stem-line, .person-group.active .stem-line { stroke: var(--accent); stroke-width: 1.5px; }
.person-group:not(.filtered-out):not(.dimmed):hover .person-label, .person-group.active .person-label { fill: #fff; font-weight: bold; font-size: 14px !important; text-shadow: 0 0 10px var(--accent); }
.person-group:not(.filtered-out):not(.dimmed):hover .portrait-div, .person-group.active .portrait-div { transform: scale(1.3); border-color: #fff; box-shadow: 0 0 15px var(--accent); }
.person-group:not(.filtered-out):not(.dimmed):hover .timeline-dot, .person-group.active .timeline-dot { fill: var(--accent); r: 6; }
.person-group.search-active .stem-line { stroke: rgba(255,255,255,0.15) !important; stroke-width: 1px !important; }
.person-group.active.hide-stem .stem-line { stroke: rgba(255,255,255,0.15) !important; stroke-width: 1px !important; }
.icon-object { overflow: visible; transition: opacity 0.3s; pointer-events: auto; cursor: pointer; }
.portrait-div { width: 100%; height: 100%; border-radius: 50%; border: 1px solid rgba(255,255,255,0.6); background-size: cover; background-position: center; background-color: #000; box-sizing: border-box; transition: transform 0.3s; }
.timeline-dot { display: none; fill: #fff; transition: r 0.2s; pointer-events: auto; cursor: pointer; }

#bottom-filters { position: absolute; bottom: 25px; left: 50%; transform: translateX(-50%); display: flex; justify-content: center; z-index: 100; width: 100%; pointer-events: none; }
.filter-row { display: flex; align-items: center; gap: 15px; overflow-x: auto; max-width: 95vw; padding-bottom: 24px; pointer-events: auto; scrollbar-width: none; }
.filter-row::-webkit-scrollbar { display: none; }
.filter-group { display: flex; gap: 8px; align-items: center; }
.filter-divider { width: 1px; height: 18px; background: rgba(255,255,255,0.3); flex-shrink: 0; }
.filter-btn { background: rgba(255,255,255,0.05); color: var(--text-sub); padding: 4px 12px; border-radius: 12px; font-size: 11px; cursor: pointer; border: 1px solid transparent; position: relative; transition: all 0.3s; white-space: nowrap; display: flex; align-items: center; gap: 6px; }
.filter-btn.active { background: var(--accent); color: #000; font-weight: bold; box-shadow: 0 0 10px var(--accent); }

.fab-btn { position: fixed; bottom: 20px; right: 20px; width: 44px; height: 44px; border-radius: 50%; background: var(--accent); color: #000; font-size: 24px; border: none; cursor: pointer; z-index: 200; display:flex; align-items:center; justify-content:center; box-shadow: 0 0 20px rgba(79, 209, 197, 0.4); font-family: monospace; }
.fab-btn:hover { transform: scale(1.1); background: #fff; }

.modal-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.8); backdrop-filter: blur(5px); display: none; justify-content: center; align-items: center; z-index: 10000; opacity: 0; transition: opacity 0.2s; }
.modal-overlay.active { display: flex; opacity: 1; }
.modal-content { background: #1e293b; width: 350px; padding: 25px; border-radius: 12px; border: 1px solid rgba(255,255,255,0.1); color: #fff; position: relative; box-shadow: 0 10px 40px rgba(0,0,0,0.8); z-index: 10001; }
.modal-close { position: absolute; top: 20px; right: 20px; cursor: pointer; font-size: 26px; line-height: 1; color: #94a3b8; transition: 0.2s; z-index: 10005; }
.modal-close:hover { color: #fff; }
input, select { width: 100%; background: rgba(0,0,0,0.3); border: 1px solid rgba(255,255,255,0.2); color: #fff; padding: 10px; border-radius: 6px; box-sizing: border-box; outline: none; }
input:focus, select:focus { border-color: var(--accent); }
.btn-primary { width: 100%; background: var(--accent); color: #000; border: none; padding: 10px; border-radius: 6px; font-weight: bold; cursor: pointer; transition: 0.2s; }
.btn-primary:hover { background: #fff; }

.auth-tabs { display: flex; border-bottom: 1px solid rgba(255,255,255,0.1); margin-bottom: 20px; }
.auth-tab { flex: 1; text-align: center; padding: 10px; cursor: pointer; color: var(--text-sub); font-weight: bold; }
.auth-tab.active { color: var(--accent); border-bottom: 2px solid var(--accent); }

.about-modal { width: 90vw !important; max-width: 600px !important; max-height: 85vh; display: flex; flex-direction: column; padding: 0 !important; overflow: hidden; }
.about-tabs { margin-bottom: 0; background: rgba(0,0,0,0.2); flex-shrink: 0; padding-top: 8px; }
.about-modal .modal-close { top: 12px; right: 15px; } 

.about-scroll-area { flex: 1; overflow-y: auto; padding: 25px 30px; line-height: 1.6; font-size: 14px; color: #cbd5e1; }
.about-scroll-area::-webkit-scrollbar { width: 6px; }
.about-scroll-area::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.2); border-radius: 6px; }
.about-content { display: none; animation: fadeIn 0.3s ease; }
.about-content.active { display: block; }
.about-content h4 { color: #fff; border-left: 3px solid var(--accent); padding-left: 10px; margin-top: 5px; margin-bottom: 10px; font-size: 16px; }
.about-content p { margin-bottom: 15px; }
.about-content ul { padding-left: 20px; margin-bottom: 20px; }
.about-content li { margin-bottom: 8px; }
.about-content a { color: var(--accent); text-decoration: none; }
.about-content a:hover { text-decoration: underline; }

.donate-box { background: rgba(255,255,255,0.03); border: 1px dashed rgba(255,255,255,0.15); border-radius: 8px; padding: 20px; text-align: center; margin: 20px 0; }
.donate-img { max-width: 200px; width: 100%; border-radius: 8px; margin-bottom: 10px; box-shadow: 0 5px 15px rgba(0,0,0,0.5); border: 2px solid #fff; }
.paypal-btn { display: inline-block; background: #0070ba; color: #fff !important; font-weight: bold; padding: 12px 30px; border-radius: 25px; text-decoration: none !important; font-size: 16px; margin: 10px 0 20px; box-shadow: 0 5px 15px rgba(0, 112, 186, 0.4); transition: 0.2s; }
.paypal-btn:hover { background: #005ea6; transform: translateY(-2px); }
.contact-box { background: rgba(79, 209, 197, 0.1); border-left: 4px solid var(--accent); padding: 15px; border-radius: 4px; margin-top: 20px; }

@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

.showcase-modal { width: 85vw !important; height: 85vh !important; max-width: 1400px !important; display: flex; flex-direction: column; padding: 0 !important; overflow: hidden; background: #140d0c !important; border: 15px solid #3d1111; border-radius: 8px; box-shadow: inset 0 0 30px #000, 0 20px 50px rgba(0,0,0,0.9); }
.showcase-header { position: relative; padding: 25px 25px 0; background: linear-gradient(to bottom, #4a1c1c, #2b0c0c); border-bottom: 4px solid #140606; flex-shrink: 0; z-index: 10; box-shadow: 0 10px 20px rgba(0,0,0,0.8); }
.showcase-header::after { content: ''; position: absolute; top: 100%; left: 0; right: 0; height: 250px; pointer-events: none; background: radial-gradient(15vw 250px at 15% 0%, rgba(255, 220, 150, 0.15) 0%, transparent 100%), radial-gradient(15vw 250px at 40% 0%, rgba(255, 220, 150, 0.15) 0%, transparent 100%), radial-gradient(15vw 250px at 60% 0%, rgba(255, 220, 150, 0.15) 0%, transparent 100%), radial-gradient(15vw 250px at 85% 0%, rgba(255, 220, 150, 0.15) 0%, transparent 100%); z-index: 5; }
.showcase-header .showcase-tabs { border: none; margin-bottom: 0; justify-content: center; gap: 30px; padding-bottom: 25px; }
.showcase-header .auth-tab { flex: 0 0 auto; width: auto; font-size: 15px; font-weight: bold; padding: 8px 30px; color: #a88a55; background: linear-gradient(to bottom, #2a1010, #140606); border: 2px solid #5c4220; border-radius: 6px; box-shadow: 0 5px 15px rgba(0,0,0,0.8), inset 0 0 10px rgba(140, 106, 54, 0.1); text-shadow: 0 2px 4px #000; position: relative; transition: all 0.3s; letter-spacing: 2px; }
.showcase-header .auth-tab::before, .showcase-header .auth-tab::after { content: '●'; position: absolute; top: 50%; transform: translateY(-50%); color: #4a3417; font-size: 10px; text-shadow: 0 1px 1px #8c6a36; }
.showcase-header .auth-tab::before { left: 12px; }
.showcase-header .auth-tab::after { right: 12px; }
.showcase-header .auth-tab:hover { color: #d4b575; border-color: #8c6a36; }
.showcase-header .auth-tab.active { color: #ffdc96; border-color: #c2994c; background: linear-gradient(to bottom, #4a1c1c, #2b0c0c); box-shadow: 0 8px 20px rgba(0,0,0,0.9), inset 0 0 15px rgba(255, 220, 150, 0.2); }
.showcase-header .auth-tab.active::before, .showcase-header .auth-tab.active::after { color: #c2994c; text-shadow: 0 1px 1px #ffdc96; }
.showcase-modal .modal-close { color: #ffdc96; text-shadow: 0 2px 5px #000; top: 28px; right: 25px; }
.showcase-modal .modal-close:hover { color: #fff; }
.bookshelf-container { flex: 1; overflow-y: auto; padding: 40px 40px; display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 60px 30px; align-content: start; border-left: 15px solid #2b0c0c; border-right: 15px solid #2b0c0c; box-shadow: inset 20px 0 30px rgba(0,0,0,0.8), inset -20px 0 30px rgba(0,0,0,0.8); background-image: repeating-linear-gradient(to bottom, transparent 0px, transparent 200px, #8c3b3b 200px, #5e2121 201px, #3d1111 208px, #1a0606 218px, rgba(0,0,0,0.7) 218px, transparent 230px, transparent 260px ); background-size: 100% 260px; background-attachment: local; background-position: 0 40px; }
.bookshelf-container::-webkit-scrollbar { width: 10px; }
.bookshelf-container::-webkit-scrollbar-thumb { background: #3d1111; border-radius: 5px; border: 1px solid #140606; }
.shelf-book-item { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; position: relative; transition: 0.3s; cursor: pointer; height: 200px; z-index: 10; }
.shelf-book-img { max-height: 180px; width: auto; max-width: 100%; object-fit: contain; object-position: bottom; z-index: 2; box-shadow: -5px 5px 15px rgba(0,0,0,0.8); transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275); transform-origin: bottom center; }
.shelf-book-item:hover .shelf-book-img { transform: translateY(-10px) translateX(-5px) rotate(-3deg) scale(1.08); z-index: 10; box-shadow: -15px 20px 30px rgba(0,0,0,0.9); }
.shelf-book-title { position: absolute; bottom: -45px; font-size: 11px; color: #ffdc96; width: 120%; text-align: center; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; background: rgba(0,0,0,0.6); border: 1px solid rgba(255,220,150,0.3); border-radius: 4px; padding: 2px 4px; box-shadow: 0 4px 6px rgba(0,0,0,0.8); transition: all 0.3s; pointer-events: none; line-height: 1.2; z-index: 15; }
.shelf-book-item:hover .shelf-book-title { background: #3d1111; color: #fff; border-color: #ffdc96; }
img { -webkit-user-drag: none; -khtml-user-drag: none; -moz-user-drag: none; -o-user-drag: none; user-select: none; -webkit-user-select: none; -ms-user-select: none; -webkit-touch-callout: none; }

body:not(.website-entered) header,
body:not(.website-entered) .filter-row,
body:not(.website-entered) #footer-info,
body:not(.website-entered) .fab-btn {
    opacity: 0;
    pointer-events: none;
}
body.website-entered header,
body.website-entered .filter-row,
body.website-entered #footer-info,
body.website-entered .fab-btn {
    opacity: 1;
    pointer-events: auto;
}
body.website-entered header,
body.website-entered .filter-row,
body.website-entered #footer-info {
    transition: opacity 1.5s ease-in-out;
}
body.website-entered .fab-btn {
    transition: opacity 1.5s ease-in-out, transform 0.2s, background 0.2s;
}