/* Theme Name: StudioPro X - Final Scroll
   Version: 7.1
   Description: 修复布局冲突、导航透明、Canvas特效、页脚评论滚动
*/

:root {
    --bg-deep: #050507;
    --bg-card: #121215;
    --accent: #6366f1;
    --text-main: #ffffff;
    --text-muted: #94a3b8;
    --border: rgba(255, 255, 255, 0.1);
}

/* --- 全局重置 --- */
* { margin: 0; padding: 0; box-sizing: border-box; outline: none; }

body {
    background-color: var(--bg-deep);
    background-image: radial-gradient(circle at 50% 0%, #151628 0%, #050507 60%);
    background-attachment: fixed;
    color: var(--text-main);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
}

a { text-decoration: none; color: inherit; transition: 0.3s; }
img { max-width: 100%; display: block; }

/* --- 导航栏 --- */
.glass-nav {
    position: absolute; /* 绝对定位，悬浮在Hero之上 */
    top: 0; left: 0; width: 100%; height: 80px; z-index: 1000;
    background: transparent;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    display: flex; align-items: center;
    transition: all 0.4s ease;
}
.glass-nav:hover {
    background: rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(15px);
}
.nav-inner {
    width: 100%; max-width: 1400px; margin: 0 auto; padding: 0 30px;
    display: flex; justify-content: space-between; align-items: center;
}

.logo { font-size: 22px; font-weight: 800; letter-spacing: -1px; display: flex; align-items: center; }
.logo-text {
    background: linear-gradient(to right, #fff, #94a3b8);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.logo-img { height: 32px; width: auto; }

.nav-menu { display: flex; gap: 25px; }
.nav-menu a {
    font-size: 14px; font-weight: 500; color: rgba(255, 255, 255, 0.7);
    letter-spacing: 0.5px; position: relative;
}
.nav-menu a:hover, .nav-menu a.active {
    color: #fff; text-shadow: 0 0 10px rgba(255,255,255,0.3);
}

.nav-menu a[href*="admin"],
.nav-menu a[href*="login"],
.nav-menu a[href*="register"] {
    display: none !important;
}

/* --- Hero Banner --- */
.hero-section {
    position: relative;
    height: 85vh; min-height: 600px;
    display: flex; flex-direction: column; justify-content: center; align-items: center;
    text-align: center; 
    margin-top: 0;
    background-size: cover; background-position: center center; background-repeat: no-repeat;
    overflow: hidden;
    z-index: 1;
}

.hero-overlay {
    position: absolute; inset: 0;
    background: linear-gradient(to bottom, 
        rgba(0,0,0,0.4) 0%, 
        rgba(0,0,0,0) 30%, 
        rgba(0,0,0,0) 70%, 
        var(--bg-deep) 100%
    );
    z-index: 1;
}

.hero-section::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; width: 100%;
    height: 300px; 
    background: linear-gradient(to bottom, transparent, var(--bg-deep));
    z-index: 2;
    pointer-events: none;
}

.hero-content {
    position: relative; z-index: 10; padding: 0 20px;
    animation: fadeInUp 1s ease-out;
}

.hero-title {
    font-size: clamp(40px, 8vw, 80px);
    font-weight: 900; line-height: 1.1; margin-bottom: 20px;
    background: linear-gradient(180deg, #ffffff 0%, #cbd5e1 50%, #94a3b8 100%);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 10px 20px rgba(0,0,0,0.5));
}

.hero-subtitle {
    font-size: 20px; color: rgba(255,255,255,0.8);
    max-width: 700px; margin: 0 auto; font-weight: 300;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

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

/* --- Bento Grid --- */
.main-container { max-width: 1400px; margin: 0 auto; padding: 60px 30px; position: relative; z-index: 10; }
.section-label { font-size: 12px; color: var(--accent); letter-spacing: 2px; text-transform: uppercase; margin-bottom: 30px; font-weight: 700; display: block; }
.bento-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 24px; margin-bottom: 80px; }
.bento-grid .work-card { grid-column: span 4; aspect-ratio: 4/3; }
.mixed-grid .work-card:nth-child(-n+6) { grid-column: span 4; aspect-ratio: 4/3; }
.mixed-grid .work-card:nth-child(n+7) { grid-column: span 3; aspect-ratio: 1/1; }
.mixed-grid .work-card:nth-child(n+7) .card-title { font-size: 18px; }
.mixed-grid .work-card:nth-child(n+7) .card-overlay { padding: 20px; }

.work-card { position: relative; border-radius: 24px; overflow: hidden; background: rgba(18, 18, 21, 0.8); border: 1px solid var(--border); backdrop-filter: blur(10px); transition: all 0.4s ease; }
.work-card:hover { border-color: rgba(255,255,255,0.4); transform: translateY(-7px); box-shadow: 0 25px 50px -12px rgba(0,0,0,0.6); z-index: 2; }
.card-img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.7s cubic-bezier(0.25, 0.8, 0.25, 1); }
.work-card:hover .card-img { transform: scale(1.1); }
.card-overlay { position: absolute; bottom: 0; left: 0; width: 100%; padding: 30px 25px; background: linear-gradient(to top, rgba(0,0,0,0.95), transparent); pointer-events: none; }
.card-title { font-size: 22px; font-weight: 700; color: #fff; margin-bottom: 8px; line-height: 1.2; text-shadow: 0 2px 5px rgba(0,0,0,0.5); }
.card-meta { font-size: 12px; color: rgba(255,255,255,0.7); text-transform: uppercase; letter-spacing: 1px; }

.pagination { text-align: center; margin-bottom: 80px; opacity: 0.6; }
.pagination a, .pagination span { padding: 0 10px; }

/* --- [修正] 联系模块 (Canvas版) --- */
/* 删除了原来冲突的 display: grid 代码 */
.contact-section {
    position: relative;
    width: 100%;
    background: radial-gradient(circle at center, #1a1b2e 0%, #050507 100%);
    border: 1px solid var(--border);
    border-radius: 30px;
    padding: 0;
    margin-top: 40px;
    overflow: hidden; /* 必须：防止内容溢出 */
    box-shadow: 0 20px 50px -10px rgba(0,0,0,0.5);
    display: block; /* 强制设为block，覆盖可能的grid干扰 */
}

/* 画布层 */
#canvas-network {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: 0;
    pointer-events: none;
}

/* 内容层 */
.contact-content-layer {
    position: relative;
    z-index: 2;
    display: grid; 
    grid-template-columns: 1fr 1fr; 
    gap: 60px;
    padding: 60px; 
}

/* 按钮与弹窗 */
.btn-social { 
    position: relative;
    display: inline-flex; align-items: center; gap: 10px; 
    background: rgba(255,255,255,0.05); 
    border: 1px solid var(--border); 
    padding: 12px 25px; border-radius: 50px; 
    color: #fff; font-weight: 600; cursor: pointer; transition:0.3s; 
    backdrop-filter: blur(5px);
}
.btn-social:hover { background: #fff; color: #000; box-shadow: 0 0 15px rgba(255,255,255,0.4); }

.qr-popup {
    position: absolute; 
    bottom: 130%; left: 50%; transform: translateX(-50%) translateY(10px); 
    width: 160px !important; /* 强制限制宽度 */
    padding: 12px; background: #fff; border-radius: 16px; 
    opacity: 0; visibility: hidden; 
    transition: 0.3s; 
    box-shadow: 0 20px 40px rgba(0,0,0,0.4); 
    pointer-events: none; z-index: 100; 
}
.qr-popup img { 
    width: 100% !important; height: auto !important; 
    display: block; border-radius: 8px; 
}
.btn-social:hover .qr-popup { 
    opacity: 1; visibility: visible; 
    transform: translateX(-50%) translateY(0); 
}

/* 联系表单输入框修正 */
.contact-right input,
.contact-right textarea {
    width: 100%;
    background: rgba(0,0,0,0.5) !important;
    border: 1px solid var(--border) !important;
    color: #fff !important;
    padding: 15px; border-radius: 12px; margin-bottom: 15px;
    backdrop-filter: blur(5px);
    outline: none; transition: 0.3s;
    font-family: inherit;
}
.contact-right textarea { margin-bottom: 20px; }
.contact-right input:focus,
.contact-right textarea:focus { 
    background: rgba(0,0,0,0.8) !important; 
    border-color: var(--accent) !important; 
}
.contact-right input::placeholder,
.contact-right textarea::placeholder { color: #888; }

/* --- 页脚区域 --- */
.site-footer { border-top: 1px solid var(--border); background: #0a0a0c; box-shadow: inset 0 30px 60px -30px rgba(0,0,0,0.8); padding: 80px 0 40px; margin-top: 100px; font-size: 14px; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1.2fr; gap: 50px; max-width: 1400px; margin: 0 auto; padding: 0 30px; }
.footer-brand h3 { font-size: 20px; font-weight: 800; margin-bottom: 20px; color: #fff; }
.footer-desc { color: var(--text-muted); max-width: 320px; line-height: 1.7; }
.footer-col h4 { color: #fff; font-size: 16px; margin-bottom: 25px; font-weight: 600; letter-spacing: 1px; }
.footer-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.f-tag { display: inline-block; padding: 5px 12px; background: rgba(255,255,255,0.05); border-radius: 50px; border: 1px solid rgba(255,255,255,0.05); color: #94a3b8; font-size: 12px; transition: 0.3s; }
.f-tag:hover { background: var(--accent); color: #fff; }

/* [新增] 页脚评论滚动特效 */
.footer-comments-window {
    height: 240px; /* 固定高度，约显示3条 */
    overflow: hidden;
    position: relative;
    /* 底部遮罩，让滚动更自然 */
    mask-image: linear-gradient(to bottom, black 80%, transparent 100%);
    -webkit-mask-image: linear-gradient(to bottom, black 80%, transparent 100%);
}

.footer-comments-track {
    display: flex;
    flex-direction: column;
    gap: 15px;
    /* 20秒循环一次，匀速滚动 */
    animation: vertical-scroll 20s linear infinite;
}

/* 鼠标放上去暂停滚动，方便查看 */
.footer-comments-track:hover {
    animation-play-state: paused;
}

@keyframes vertical-scroll {
    0% { transform: translateY(0); }
    /* 这里的 -50% 是关键，因为我们在HTML里把评论列表复制了一份，所以滚动一半正好无缝衔接 */
    100% { transform: translateY(-50%); }
}

.f-comment-card { display: flex; align-items: center; gap: 15px; padding: 12px; background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.05); border-radius: 12px; transition: all 0.3s ease; text-decoration: none; flex-shrink: 0; }
.f-comment-card:hover { background: rgba(255,255,255,0.08); border-color: rgba(255,255,255,0.1); transform: translateX(5px); }
.f-avatar { width: 36px; height: 36px; background: linear-gradient(135deg, #6366f1, #a855f7); border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #fff; font-weight: 700; font-size: 14px; flex-shrink: 0; }
.f-info { flex: 1; overflow: hidden; display: flex; flex-direction: column; justify-content: center; }
.f-user { color: #fff; font-size: 13px; font-weight: 600; margin-bottom: 2px; }
.f-text { color: #888; font-size: 12px; opacity: 0.8; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.footer-bottom { max-width: 1400px; margin: 70px auto 0; padding: 30px 30px 0; border-top: 1px solid rgba(255,255,255,0.05); display: flex; justify-content: space-between; color: #555; }

/* 文章详情页专用样式 */
.article-container { max-width: 900px !important; margin: 0 auto; padding-top: 120px; }
.article-header { text-align: center; margin-bottom: 60px; border-bottom: 1px solid rgba(255,255,255,0.05); padding-bottom: 40px; }
.article-title { font-size: 36px; font-weight: 900; color: #fff; margin-bottom: 20px; line-height: 1.3; }
.article-meta { display: flex; justify-content: center; gap: 20px; color: var(--text-muted); font-size: 13px; }
.article-meta span { display: flex; align-items: center; gap: 5px; }
.article-content { font-size: 16px; color: #ccc; line-height: 1.8; margin-bottom: 60px; }
.article-content p { margin-bottom: 20px; }
.article-content img { max-width: 100%; border-radius: 12px; margin: 20px 0; border: 1px solid rgba(255,255,255,0.05); }
.article-content h2, .article-content h3 { color: #fff; margin: 40px 0 20px; font-weight: 700; }
.article-content a { color: var(--accent); border-bottom: 1px solid rgba(99, 102, 241, 0.3); }
.article-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 60px; padding-top: 40px; border-top: 1px solid rgba(255,255,255,0.05); }
.nav-item { display: block; background: rgba(255,255,255,0.02); padding: 20px; border-radius: 12px; border: 1px solid var(--border); transition: 0.3s; }
.nav-item:hover { background: rgba(255,255,255,0.05); border-color: var(--accent); }
.nav-item small { display: block; color: var(--text-muted); font-size: 12px; margin-bottom: 5px; }
.nav-item span { display: block; color: #fff; font-weight: 600; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav-item.next { text-align: right; }
.nav-item.empty { opacity: 0.3; pointer-events: none; }
.comment-section { margin-top: 80px; }
#comment-place textarea { background: rgba(0,0,0,0.3) !important; border: 1px solid rgba(255,255,255,0.1) !important; color: #fff !important; }

/* 响应式适配 */
@media (max-width: 900px) {
    .bento-grid { grid-template-columns: repeat(2, 1fr); }
    .contact-content-layer, .footer-grid { grid-template-columns: 1fr; gap: 40px; }
    .hero-title { font-size: 48px; }
    .hero-section { height: 60vh; }
}
@media (max-width: 600px) {
    .bento-grid { grid-template-columns: 1fr; }
    .footer-bottom { flex-direction: column; gap: 15px; text-align: center; }
}