/* =========================================
   全局基础重置
   ========================================= */
body, html {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    background-color: #FAF7F0;
    font-family: "Microsoft YaHei", sans-serif;
    overflow: hidden; /* 注意：主页不能滚动，但文章页需要滚动，见下方说明 */
}

/* 画布容器 */
.niiya-canvas {
    position: relative;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
}

/* =========================================
   1. 线条基础设定 (边框装饰)
   ========================================= */
.line {
    position: absolute;
    background-color: #bf9abf;
    z-index: 1; 
}

.line-h {
    width: 200vw;       
    height: 10.5px;        
    left: -50vw;        
    transform: rotate(-3deg); 
}
.line-h1 { top: 20%; }
.line-h2 { top: calc(20% + 22px); }

.line-v {
    height: 200vh;      
    width: 10px;         
    top: -50vh;
    transform: rotate(-4.5deg); 
}
.line-v1 { left: 88%; }
.line-v2 { left: calc(88% + 22px); }

/* =========================================
   2. 左上角文字
   ========================================= */
.top-left {
    position: absolute;
    top: 11%;
    left: 7%;
    display: flex;
    align-items: baseline; 
    gap: 15px;
    z-index: 10; 
    transform: rotate(-3deg); 
}
.brand-name {
    font-size: clamp(30px, 5vw, 70px);
    font-weight: 900;
    color: #330033;
    letter-spacing: 2px;
    white-space: nowrap;
}
.main-title {
    font-size: clamp(12px, 1.8vw, 24px);
    font-weight: 800;
    color: #000;
    white-space: nowrap;
}

/* =========================================
   3. 右下角竖排超链接
   ========================================= */
.link-group {
    position: absolute;
    top: 40%;        
    left: 85%;       
    writing-mode: vertical-rl; 
    display: flex;
    gap: 25px; 
    z-index: 10;
    transform: rotate(-3.5deg); 
}
.link-group a {
    color: #000;
    font-size: clamp(18px, 2.5vw, 38px);
    text-decoration: none;
    letter-spacing: 3px;
    transition: color 0.3s;
    cursor: pointer; 
    white-space: nowrap;
}
.link-group a:hover {
    color: #888; 
}

/* =========================================
   4. 左下角纯净版图片
   ========================================= */
.floating-image {
    position: absolute;
    bottom: 5%;
    left: 5%;
    width: clamp(120px, 25vw, 300px); 
    z-index: 10;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); 
    cursor: pointer;
}
.floating-image img {
    width: 100%;
    height: auto;
    display: block;
}
.floating-image:hover {
    transform: scale(1.08); 
    z-index: 20;
}

/* =========================================
   5. 弹窗样式 (关于页面等)
   ========================================= */
.modal-overlay {
    display: none; 
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.4); 
    z-index: 100; 
    backdrop-filter: blur(3px); 
}
.modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%); 
    background-color: #fff;
    padding: 50px;             
    width: 90%;                
    max-width: 800px;          
    max-height: 85vh;          
    overflow-y: auto;          
    border: 2px solid #330033; 
    box-shadow: 8px 8px 0px #bf9abf; 
    color: #333;
    line-height: 1.8;
    z-index: 101;
}
.modal-content h2 {
    margin-top: 0;
    color: #330033;
    font-size: clamp(22px, 3vw, 32px);
    border-bottom: 2px solid #bf9abf;
    padding-bottom: 10px;
}
.modal-content p {
    font-size: clamp(14px, 1.5vw, 18px);
    margin-bottom: 15px;
}
.modal-content img {
    max-width: 100%;           
    height: auto;
    border: 2px solid #330033; 
    margin: 20px 0;            
    display: block;            
}
.close-btn {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: clamp(24px, 3vw, 36px);
    font-weight: bold;
    color: #330033;
    cursor: pointer;
    transition: color 0.3s;
}
.close-btn:hover {
    color: #bf9abf; 
}