:root {
    --bg-color: #080808;
    --text-color: #e0e0e0;
    --accent-color: #ffffff;
    --cursor-size: 30px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    cursor: none; /* 隐藏系统鼠标 */
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: 'Inter', sans-serif;
    /* overflow: hidden; Removed to allow scrolling */
    min-height: 100vh;
}

section {
    min-height: 100vh;
    padding: 8rem 4rem;
    position: relative;
    z-index: 10;
}

/* Section Specifics */
.about {
    display: flex;
    align-items: center;
    justify-content: flex-start; /* 左对齐 */
}

.about-content {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    max-width: 80%;
}

.about-label {
    font-family: 'Syncopate', sans-serif;
    font-size: 0.8rem;
    letter-spacing: 0.1em;
    color: var(--accent-color);
    opacity: 0.6;
    margin-bottom: 1rem;
    text-transform: uppercase;
}

.about-statement {
    font-family: 'Inter', sans-serif;
    font-size: clamp(2rem, 5vw, 4rem);
    line-height: 1.2;
    font-weight: 300;
    color: var(--text-color);
}

.about-desc {
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    line-height: 1.6;
    color: #888;
    max-width: 600px;
    border-left: 1px solid rgba(255,255,255,0.2);
    padding-left: 2rem;
}

.highlight {
    color: var(--accent-color);
    font-weight: 600;
}

.works-header {
    margin-bottom: 4rem;
    display: flex;
    align-items: center;
    gap: 2rem;
    opacity: 0.5;
}

.header-label {
    font-family: 'Syncopate', sans-serif;
    font-size: 1rem;
    white-space: nowrap;
}

.header-line {
    width: 100%;
    height: 1px;
    background: var(--text-color);
    opacity: 0.3;
}

.work-list {
    display: flex;
    flex-direction: column;
}

.work-item {
    display: grid;
    grid-template-columns: 0.5fr 3fr 0.5fr; /* 栅格布局 */
    align-items: baseline;
    padding: 2.5rem 0;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    text-decoration: none;
    color: var(--text-color);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.work-item:first-child {
    border-top: 1px solid rgba(255,255,255,0.1);
}

.work-item:hover {
    background: rgba(255,255,255,0.03);
    padding-left: 1rem;
}

.work-index {
    font-family: 'Syncopate', sans-serif;
    font-size: 0.9rem;
    color: #666;
}

.work-title {
    font-family: 'Syncopate', sans-serif;
    font-size: clamp(2rem, 4vw, 3.5rem);
    font-weight: 700;
    transition: color 0.3s;
    line-height: 1;
    margin-bottom: 0.5rem;
}

.work-tags {
    font-family: 'Syncopate', sans-serif;
    font-size: 0.7rem;
    color: #666;
    letter-spacing: 0.1em;
}

.work-item:hover .work-title {
    color: transparent;
    -webkit-text-stroke: 1px var(--text-color);
}

.work-year {
    font-family: 'Syncopate', sans-serif;
    font-size: 0.9rem;
    color: #666;
    text-align: right;
}

/* Auth & Profile Styles */
.auth-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.auth-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

.auth-container {
    width: 100%;
    max-width: 400px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    padding: 2rem;
    position: relative;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
}

.auth-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 1rem;
}

.auth-header span {
    font-size: 1.2rem;
    letter-spacing: 2px;
    color: var(--accent-color);
    text-shadow: 0 0 5px var(--accent-color);
}

/* New Close Button Style */
.close-btn {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.2rem 0.6rem;
    cursor: pointer;
    font-family: 'Space Mono', monospace;
    transition: all 0.3s ease;
}

.close-btn:hover {
    background: var(--accent-color);
    color: #000;
    border-color: var(--accent-color);
}

.close-btn .btn-text {
    font-size: 0.8rem;
    letter-spacing: 1px;
}

.close-btn .btn-icon {
    font-size: 1.2rem;
    line-height: 1;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.auth-form.hidden {
    display: none;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.input-group label {
    font-family: 'Syncopate', sans-serif;
    font-size: 0.7rem;
    color: #666;
    letter-spacing: 0.1em;
}

.input-group input {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    padding: 0.8rem;
    color: var(--text-color);
    font-family: 'Inter', sans-serif;
    outline: none;
    transition: border-color 0.3s;
}

.input-group input:focus {
    border-color: var(--accent-color);
}

.auth-submit {
    background: var(--text-color);
    color: var(--bg-color);
    border: none;
    padding: 1rem;
    font-family: 'Syncopate', sans-serif;
    font-weight: 700;
    cursor: pointer;
    margin-top: 1rem;
    transition: background 0.3s;
}

.auth-submit:hover {
    background: #fff;
    box-shadow: 0 0 20px rgba(255,255,255,0.3);
}

.auth-switch {
    font-size: 0.8rem;
    color: #666;
    text-align: center;
    margin-top: 1rem;
}

.auth-switch span {
    color: var(--text-color);
    text-decoration: underline;
    cursor: pointer;
}

.auth-message {
    margin-top: 1rem;
    text-align: center;
    font-size: 0.8rem;
    font-family: 'Syncopate', sans-serif;
    height: 1.2em;
    color: #00ff41;
}

.error-msg { color: #ff0041; }
.success-msg { color: #00ff41; }

@media (max-width: 768px) {
    /* ... existing media queries ... */
    
    .work-item {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .work-index, .work-year {
        font-size: 0.8rem;
    }
}

footer {
    padding: 4rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    border-top: 1px solid rgba(255,255,255,0.1);
    z-index: 10;
    position: relative;
}

.social-links {
    display: flex;
    gap: 2rem;
}

.social-link {
    color: var(--text-color);
    text-decoration: none;
    font-family: 'Syncopate', sans-serif;
    font-size: 0.9rem;
    position: relative;
}

.social-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--text-color);
    transition: width 0.3s;
}

.social-link:hover::after {
    width: 100%;
}

.copyright {
    color: #444;
    font-size: 0.8rem;
}

/* Scroll Animation Classes */
.fade-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.fade-up.visible {
    opacity: 1;
    transform: translateY(0);
}

/* 1. 噪点纹理 - 提升质感的关键 */
.noise-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    pointer-events: none;
    z-index: 999;
    opacity: 0.05;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}

/* 2. 动态光标 - 反差色模式 */
.cursor {
    position: fixed;
    width: var(--cursor-size);
    height: var(--cursor-size);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    pointer-events: none;
    z-index: 10000;
    transform: translate(-50%, -50%);
    transition: width 0.3s, height 0.3s, background-color 0.3s;
    mix-blend-mode: difference; /* 关键：遇到白色字变黑，遇到黑色背景变白 */
}

.cursor-dot {
    position: fixed;
    width: 4px;
    height: 4px;
    background: white;
    border-radius: 50%;
    pointer-events: none;
    z-index: 10001;
    transform: translate(-50%, -50%);
}

/* 悬停态 */
.cursor.active {
    background-color: white;
    width: 80px;
    height: 80px;
    border-color: transparent;
    mix-blend-mode: difference;
}

/* 3. 布局与排版 */
nav {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 2.5rem 4rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 100;
    font-family: 'Syncopate', sans-serif; /* 未来感字体 */
    letter-spacing: 0.1em;
}

.logo {
    font-weight: 700;
    font-size: 1.2rem;
}

.menu a {
    text-decoration: none;
    color: var(--text-color);
    margin-left: 3rem;
    font-size: 0.8rem;
    position: relative;
}

.hero {
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 0 4rem;
    position: relative;
    z-index: 10;
}

.hero-title {
    font-family: 'Syncopate', sans-serif;
    font-size: clamp(3rem, 10vw, 8rem);
    line-height: 0.9;
    text-transform: uppercase;
    font-weight: 700;
}

.line {
    overflow: hidden; /* 文字遮罩效果 */
}

.word {
    display: block;
    transform: translateY(120%); /* 初始位置在下方 */
    animation: slideUp 1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.line:nth-child(1) .word { animation-delay: 0.1s; }
.line:nth-child(2) .word { animation-delay: 0.2s; }
.line:nth-child(3) .word { animation-delay: 0.3s; }

/* 描边字效果 */
.outline {
    color: transparent;
    -webkit-text-stroke: 1px var(--text-color);
    opacity: 0.5;
}

.hero-footer {
    position: absolute;
    bottom: 3rem;
    width: calc(100% - 8rem);
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    letter-spacing: 0.05em;
    color: #666;
}

/* 状态指示灯 */
.status-indicator {
    display: flex;
    align-items: center;
    gap: 10px;
}

.dot {
    width: 6px;
    height: 6px;
    background-color: #00ff41;
    border-radius: 50%;
    box-shadow: 0 0 10px #00ff41;
}

/* 4. 氛围背景 */
#webgl-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
}

/* 移除旧的 blob 背景 */
/* .gradient-blob { ... } Removed */

@keyframes slideUp {
    to { transform: translateY(0); }
}

@media (max-width: 768px) {
    nav { padding: 1.5rem; }
    .hero { padding: 0 1.5rem; }
    /* .menu { display: none; }  Removed to maybe allow menu or need different solution */
    .menu {
        display: none; /* Keep hidden for now or implement hamburger? Let's keep hidden to avoid broken UI, but maybe show a simple 'Menu' text? */
        /* Actually, let's just adjust padding for sections first */
    }
    
    section {
        padding: 6rem 1.5rem;
    }
    
    .about-text {
        max-width: 100%;
    }
    
    .work-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .work-info {
        text-align: left;
    }
    
    footer {
        padding: 3rem 1.5rem;
    }
    
    .social-links {
        flex-wrap: wrap;
        justify-content: center;
    }
}

/* Profile Overlay Specifics */
.profile-container {
    max-width: 800px;
    padding: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.profile-container .auth-header {
    margin: 0;
    padding: 1.5rem 2rem;
    background: rgba(255,255,255,0.02);
}

.profile-layout {
    display: flex;
    flex-direction: row;
    min-height: 400px;
}

/* Sidebar */
.profile-sidebar {
    width: 250px;
    background: rgba(0,0,0,0.3);
    border-right: 1px solid rgba(255,255,255,0.1);
    padding: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
}

/* Avatar Controls */
.profile-avatar-wrapper {
    width: 120px;
    height: 120px;
    position: relative;
    cursor: default;
}

.avatar-placeholder {
    width: 100%;
    height: 100%;
    background: var(--accent-color);
    clip-path: var(--avatar-clip, polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%));
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 0 20px var(--accent-color);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.avatar-controls {
    position: absolute;
    bottom: -40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    opacity: 0;
    transition: all 0.3s ease;
    pointer-events: none;
    z-index: 10;
}

/* Invisible bridge to prevent hover loss */
.avatar-controls::before {
    content: '';
    position: absolute;
    bottom: 100%;
    left: -50%;
    width: 200%;
    height: 30px;
    background: transparent;
}

.profile-avatar-wrapper:hover .avatar-controls {
    opacity: 1;
    bottom: -35px;
    pointer-events: auto;
}

.avatar-ctrl-btn {
    width: 30px;
    height: 30px;
    border: 1px solid var(--accent-color);
    background: rgba(0,0,0,0.8);
    color: var(--accent-color);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.2s;
    font-size: 1rem;
}

.avatar-ctrl-btn:hover {
    background: var(--accent-color);
    color: #000;
    transform: scale(1.1);
}

.sidebar-info {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.info-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.info-group label {
    font-size: 0.6rem;
    color: #666;
    font-family: 'Syncopate', sans-serif;
}

.mono-text {
    font-family: monospace;
    color: var(--text-color);
    font-size: 0.9rem;
    letter-spacing: 0.05em;
}

.level-badge {
    background: rgba(255,255,255,0.1);
    padding: 4px 8px;
    font-size: 0.7rem;
    display: inline-block;
    color: var(--accent-color);
    border: 1px solid rgba(255,255,255,0.1);
}

/* Main Content */
.profile-main {
    flex: 1;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-size: 0.7rem;
    color: #888;
    font-family: 'Syncopate', sans-serif;
}

.editable-field {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.1);
    padding: 0.5rem 1rem;
    transition: border-color 0.3s;
}

.editable-field:focus-within {
    border-color: var(--accent-color);
}

.editable-field input,
.editable-field textarea {
    background: none;
    border: none;
    color: var(--text-color);
    width: 100%;
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    outline: none;
    resize: none;
}

.edit-btn {
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    font-size: 1rem;
    transition: color 0.3s;
}

.edit-btn:hover {
    color: var(--accent-color);
}

/* Theme Switcher */
.theme-switcher {
    display: flex;
    gap: 1rem;
}

.theme-btn {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--btn-color);
    border: 2px solid transparent;
    cursor: pointer;
    transition: transform 0.2s, border-color 0.2s;
}

.theme-btn:hover {
    transform: scale(1.1);
}

.theme-btn.active {
    border-color: #fff;
    box-shadow: 0 0 10px var(--btn-color);
}

/* Status Logs */
.status-logs {
    font-family: monospace;
    font-size: 0.7rem;
    color: #555;
    height: 60px;
    overflow-y: auto;
    border-left: 2px solid rgba(255,255,255,0.1);
    padding-left: 1rem;
}

.log-entry {
    margin-bottom: 2px;
}
.log-time { color: #444; margin-right: 5px; }

/* Footer */
.profile-footer {
    padding: 1rem 2rem;
    border-top: 1px solid rgba(255,255,255,0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(0,0,0,0.2);
}

.join-date {
    font-size: 0.7rem;
    color: #666;
}

.logout-btn {
    background: rgba(255, 0, 65, 0.1);
    color: #ff0041;
    border: 1px solid rgba(255, 0, 65, 0.3);
    margin-top: 0;
    padding: 0.5rem 1.5rem;
    font-size: 0.8rem;
}

.logout-btn:hover {
    background: rgba(255, 0, 65, 0.2);
    box-shadow: 0 0 20px rgba(255, 0, 65, 0.2);
}

/* Confirm Modal */
.confirm-modal {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.85);
    backdrop-filter: blur(5px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 20;
    opacity: 1;
    transition: opacity 0.3s;
}

.confirm-modal.hidden {
    opacity: 0;
    pointer-events: none;
}

.confirm-content {
    background: #111;
    border: 1px solid #ff0041;
    padding: 2rem;
    text-align: center;
    box-shadow: 0 0 30px rgba(255,0,65,0.2);
    max-width: 300px;
}

.confirm-text {
    font-family: 'Syncopate', sans-serif;
    color: #fff;
    margin-bottom: 2rem;
    font-size: 0.9rem;
}

.sub-text {
    font-family: 'Inter', sans-serif;
    font-size: 0.7rem;
    color: #666;
    display: block;
    margin-top: 0.5rem;
}

.confirm-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.confirm-btn {
    background: #ff0041;
    color: #fff;
    border: none;
    padding: 0.5rem 1rem;
    cursor: pointer;
    font-family: 'Syncopate', sans-serif;
    font-size: 0.8rem;
}

.cancel-btn {
    background: transparent;
    color: #aaa;
    border: 1px solid #444;
    padding: 0.5rem 1rem;
    cursor: pointer;
    font-family: 'Syncopate', sans-serif;
    font-size: 0.8rem;
}

.cancel-btn:hover { border-color: #fff; color: #fff; }

@media (max-width: 768px) {
    .profile-layout {
        flex-direction: column;
        min-height: auto;
    }
    
    .profile-sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid rgba(255,255,255,0.1);
        padding: 1.5rem;
    }
    
    .profile-main {
        padding: 1.5rem;
    }
}

