/* ==========================================================================
   GHOST COMMUNE (幽灵社区) - DESIGN SYSTEM & VERTICAL SCROLL LAYOUT
   ========================================================================== */

/* Variables & Theme Setup */
:root {
    --bg-base: #05060b;
    --bg-panel: rgba(10, 12, 26, 0.7);
    --bg-panel-solid: #0d0f1e;
    --bg-card: rgba(18, 22, 47, 0.45);
    --bg-card-hover: rgba(26, 32, 69, 0.6);
    --bg-input: rgba(8, 10, 22, 0.85);
    
    --accent-cyan: #00ffd2;
    --accent-cyan-rgb: 0, 255, 210;
    --accent-purple: #8a2be2;
    --accent-purple-rgb: 138, 43, 226;
    --accent-pink: #f72585;
    
    --border-glow: rgba(0, 255, 210, 0.12);
    --border-glow-hover: rgba(0, 255, 210, 0.45);
    
    --text-primary: #f1f3f9;
    --text-secondary: #94a3b8;
    --text-dark: #5c6e85;
    
    --font-heading: 'Orbitron', -apple-system, sans-serif;
    --font-body: 'Outfit', -apple-system, sans-serif;
    
    --shadow-cyan: 0 0 15px rgba(0, 255, 210, 0.2);
    --shadow-purple: 0 0 15px rgba(138, 43, 226, 0.2);
    
    --transition-smooth: all 0.35s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* Global Reset */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-base);
    color: var(--text-primary);
    font-family: var(--font-body);
    overflow-x: hidden;
    min-height: 100vh;
    opacity: 0;
    animation: page-fade-in 0.8s forwards cubic-bezier(0.25, 0.8, 0.25, 1);
}

@keyframes page-fade-in {
    to { opacity: 1; }
}

/* Background Particle Canvas Layer */
#ghost-particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -2;
    pointer-events: none;
    background: radial-gradient(circle at 50% 50%, #0d0f22 0%, var(--bg-base) 100%);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: #05060b;
}
::-webkit-scrollbar-thumb {
    background: rgba(0, 255, 210, 0.15);
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 255, 210, 0.5);
    box-shadow: 0 0 10px var(--accent-cyan);
}

/* ==========================================================================
   HEADER / NAVBAR (Sticky)
   ========================================================================== */
.app-header {
    position: sticky;
    top: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 50px;
    background: rgba(5, 6, 11, 0.82);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(0, 255, 210, 0.15);
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.5);
    z-index: 999;
}

.header-logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-icon {
    width: 35px;
    height: 35px;
    color: var(--accent-cyan);
    filter: drop-shadow(0 0 6px rgba(0, 255, 210, 0.5));
    animation: float-logo 3s ease-in-out infinite;
}

.logo-text {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    font-weight: 900;
    letter-spacing: 2px;
}

.accent-text {
    color: var(--accent-cyan);
    text-shadow: 0 0 10px rgba(0, 255, 210, 0.5);
}

/* Sticky Navigation Links */
.header-nav {
    display: flex;
    gap: 30px;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-family: var(--font-heading);
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 1px;
    transition: var(--transition-smooth);
    padding: 8px 12px;
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--accent-cyan);
    box-shadow: 0 0 8px var(--accent-cyan);
    transition: var(--transition-smooth);
    transform: translateX(-50%);
}

.nav-link:hover {
    color: #fff;
    text-shadow: 0 0 8px rgba(0, 255, 210, 0.6);
}

.nav-link:hover::after {
    width: 80%;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

/* Admin badge info */
.admin-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(0, 255, 210, 0.08);
    border: 1px solid rgba(0, 255, 210, 0.25);
    padding: 6px 12px;
    border-radius: 20px;
    font-family: var(--font-heading);
    font-size: 0.75rem;
    color: var(--accent-cyan);
}

.badge-dot {
    width: 6px;
    height: 6px;
    background-color: var(--accent-cyan);
    border-radius: 50%;
    box-shadow: 0 0 8px var(--accent-cyan);
    animation: pulse-dot 1.5s infinite;
}

/* Button glow style */
.glow-btn {
    position: relative;
    padding: 9px 20px;
    background: transparent;
    border: 1px solid var(--accent-cyan);
    color: var(--accent-cyan);
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.8rem;
    border-radius: 4px;
    cursor: pointer;
    overflow: hidden;
    transition: var(--transition-smooth);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-shadow: 0 0 5px rgba(0, 255, 210, 0.3);
}

.glow-btn:hover {
    background: rgba(0, 255, 210, 0.1);
    box-shadow: 0 0 15px rgba(0, 255, 210, 0.4), inset 0 0 8px rgba(0, 255, 210, 0.2);
    text-shadow: 0 0 8px rgba(0, 255, 210, 0.7);
}

.glow-btn.danger {
    border-color: var(--accent-pink);
    color: var(--accent-pink);
}

.glow-btn.danger:hover {
    background: rgba(247, 37, 133, 0.15);
    box-shadow: 0 0 15px rgba(247, 37, 133, 0.4);
    text-shadow: 0 0 8px rgba(247, 37, 133, 0.7);
}

/* ==========================================================================
   VERTICAL SECTIONS FLOW
   ========================================================================== */
.page-container {
    display: flex;
    flex-direction: column;
    width: 100%;
}

.scroll-section {
    width: 100%;
    min-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

/* Section Header Separator */
.section-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.section-header-wrap {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 15px;
    position: relative;
}

.section-header-wrap::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100px;
    height: 2px;
    background: linear-gradient(90deg, var(--accent-cyan), var(--accent-purple));
    box-shadow: 0 0 8px var(--accent-cyan);
}

.section-title {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 900;
    letter-spacing: 2px;
    color: #fff;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.1);
}

.section-title .subtitle {
    font-family: var(--font-heading);
    font-size: 0.9rem;
    color: var(--text-dark);
    font-weight: 400;
    margin-left: 10px;
    letter-spacing: 1px;
}

.content-section {
    padding: 100px 0;
    align-items: flex-start;
}

/* Admin floating trigger */
.admin-action-btn {
    background: rgba(138, 43, 226, 0.1);
    border: 1px solid rgba(138, 43, 226, 0.4);
    color: var(--accent-cyan);
    width: 38px;
    height: 38px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.admin-action-btn:hover {
    background: var(--accent-purple);
    border-color: var(--accent-cyan);
    box-shadow: 0 0 12px var(--accent-purple);
    color: #fff;
}

.admin-action-btn .icon {
    width: 20px;
    height: 20px;
}

/* Glass Panels */
.glass-panel {
    background: var(--bg-panel);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-top: 2px solid rgba(0, 255, 210, 0.2);
    border-radius: 8px;
    padding: 30px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
    transition: var(--transition-smooth);
}

.glass-panel:hover {
    border-top-color: var(--accent-cyan);
    border-color: rgba(0, 255, 210, 0.1);
}

/* ==========================================================================
   SECTION 1: HERO VIEW
   ========================================================================== */
#section-hero {
    min-height: calc(100vh - 70px);
    background: radial-gradient(circle at center, rgba(13, 16, 37, 0.2) 0%, rgba(5, 6, 11, 0.6) 100%);
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.hero-content {
    max-width: 800px;
    padding: 0 20px;
    margin-top: -50px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.hero-title {
    font-family: var(--font-heading);
    font-size: 4rem;
    font-weight: 900;
    letter-spacing: 6px;
    color: rgba(255, 255, 255, 0.08);
    -webkit-text-stroke: 1px rgba(0, 255, 210, 0.4);
    margin-bottom: 10px;
}

.glitch-title {
    font-family: var(--font-heading);
    font-size: 3.2rem;
    font-weight: 900;
    letter-spacing: 4px;
    color: #fff;
    margin-bottom: 25px;
    text-shadow: 3px 0 0 var(--accent-pink), -3px -1px 0 var(--accent-cyan);
    animation: text-shadow-pulse 4s infinite alternate;
}

.hero-tagline {
    font-size: 1.15rem;
    color: var(--accent-cyan);
    letter-spacing: 1px;
    margin-bottom: 40px;
    text-shadow: 0 0 12px rgba(0, 255, 210, 0.3);
}

.hero-cta-buttons {
    display: flex;
    gap: 20px;
}

.hero-cta-buttons .glow-btn {
    padding: 14px 32px;
    font-size: 0.95rem;
}

/* Scroll indicator mouse at bottom */
.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    animation: float-slow 2s infinite ease-in-out;
}

.mouse-icon {
    width: 24px;
    height: 38px;
    border: 2px solid var(--text-dark);
    border-radius: 12px;
    position: relative;
}

.scroll-wheel {
    width: 4px;
    height: 8px;
    background-color: var(--accent-cyan);
    border-radius: 2px;
    position: absolute;
    top: 6px;
    left: 50%;
    transform: translateX(-50%);
    animation: scroll-wheel-anim 1.5s infinite;
}

.indicator-text {
    font-size: 0.7rem;
    color: var(--text-dark);
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

/* ==========================================================================
   SECTION 2: INTRO / ABOUT ME
   ========================================================================== */
.intro-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.intro-left {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.intro-left .stat-card-cert-row {
    align-self: flex-end;
    margin-top: 20px;
    border-top: none;
    padding-top: 0;
    justify-content: flex-end;
}

.bio-intro {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 25px;
}

.avatar-glow {
    width: 65px;
    height: 65px;
    border-radius: 50%;
    background: rgba(0, 255, 210, 0.05);
    border: 1px solid var(--accent-cyan);
    color: var(--accent-cyan);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-cyan);
}

.avatar-svg {
    width: 40px;
    height: 40px;
}

.bio-intro h3 {
    font-size: 1.4rem;
    font-weight: 800;
    color: #fff;
    margin-bottom: 4px;
}

.bio-tag {
    font-size: 0.8rem;
    color: var(--accent-cyan);
    font-family: var(--font-heading);
}

.intro-desc {
    font-size: 1rem;
    line-height: 1.7;
    color: var(--text-secondary);
}

.intro-stats-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    text-align: center;
}

#stat-pulse-card {
    transition: var(--transition-smooth);
}

#stat-pulse-card:hover {
    border-color: var(--accent-cyan);
    box-shadow: var(--shadow-cyan);
    transform: translateY(-2px);
}

.stat-num {
    display: block;
    font-family: var(--font-heading);
    font-size: 2.2rem;
    font-weight: 900;
    color: var(--accent-cyan);
    margin-bottom: 5px;
    text-shadow: 0 0 10px rgba(0, 255, 210, 0.3);
}

.stat-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.intro-manifesto h3 {
    font-family: var(--font-heading);
    font-size: 1rem;
    color: #fff;
    margin-bottom: 15px;
    border-left: 3px solid var(--accent-purple);
    padding-left: 10px;
}

.intro-manifesto ul {
    list-style: none;
}

.intro-manifesto li {
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 12px;
    color: var(--text-secondary);
    padding-left: 18px;
    position: relative;
}

.intro-manifesto li::before {
    content: "▲";
    position: absolute;
    left: 0;
    top: 2px;
    font-size: 0.6rem;
    color: var(--accent-cyan);
}

/* Certificates Section Styling (Micro Layout Inside Stats Card) */
.certificates-container {
    display: flex;
    flex-direction: row;
    gap: 8px;
    align-items: center;
    justify-content: flex-start;
    flex-wrap: nowrap;
}

.certificate-wrapper {
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px dashed rgba(0, 255, 210, 0.25);
    border-radius: 3px;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.3);
    cursor: pointer;
    transition: var(--transition-smooth);
    position: relative;
}

.certificate-wrapper:hover {
    border-color: var(--accent-cyan);
    box-shadow: 0 0 12px rgba(0, 255, 210, 0.25);
}

#cert-wrapper-1 {
    width: 64px;
    min-width: 64px;
}

#cert-wrapper-2 {
    width: 32px;
    min-width: 32px;
}

.clickable-cert {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.cert-placeholder {
    color: var(--text-dark);
    font-size: 0.58rem;
    line-height: 1;
    font-family: var(--font-heading);
    text-align: center;
    padding: 0 2px;
}

.stat-card-cert-row {
    margin-top: 15px;
    padding-top: 10px;
    border-top: 1px dashed rgba(0, 255, 210, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.cert-title-label {
    font-size: 0.72rem;
    color: var(--accent-cyan);
    font-family: var(--font-heading);
    letter-spacing: 0.5px;
    text-shadow: 0 0 5px rgba(0, 255, 210, 0.2);
}

.csdn-action-hint {
    font-size: 0.72rem;
    color: var(--accent-cyan);
    margin-top: 10px;
    font-family: var(--font-body);
    letter-spacing: 0.5px;
    opacity: 0.8;
    transition: var(--transition-smooth);
    text-shadow: 0 0 5px rgba(0, 255, 210, 0.2);
}

#stat-pulse-card:hover .csdn-action-hint {
    opacity: 1;
    text-shadow: 0 0 8px rgba(0, 255, 210, 0.6);
}

/* AI Toolbox Styling */
.ai-tool-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    margin-top: 10px;
}

.ai-tool-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 18px 10px;
    background: rgba(255, 255, 255, 0.015);
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: 6px;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.ai-tool-item:hover {
    background: rgba(0, 255, 210, 0.04);
    border-color: var(--accent-cyan);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 255, 210, 0.12);
}

.ai-tool-icon {
    font-size: 1.6rem;
    margin-bottom: 8px;
    transition: var(--transition-smooth);
    filter: drop-shadow(0 0 2px rgba(255,255,255,0.1));
}

.ai-tool-item:hover .ai-tool-icon {
    transform: scale(1.15);
    filter: drop-shadow(0 0 6px var(--accent-cyan));
}

.ai-tool-name {
    font-size: 0.75rem;
    color: var(--text-secondary);
    font-family: var(--font-body);
}

.ai-tool-item:hover .ai-tool-name {
    color: #fff;
}

@media (max-width: 768px) {
    .ai-tool-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Image Viewer Modal Specifics */
#image-viewer-modal {
    z-index: 2000;
}

@media (max-width: 600px) {
    .certificates-container {
        justify-content: center;
    }
}

/* ==========================================================================
   SECTION 3: PROJECTS
   ========================================================================== */
.project-tabs-wrap {
    display: flex;
    justify-content: center;
    margin-bottom: 40px;
}

.project-tabs {
    display: flex;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 30px;
    padding: 5px;
}

.tab-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-family: var(--font-heading);
    font-size: 0.85rem;
    font-weight: 600;
    padding: 10px 25px;
    cursor: pointer;
    border-radius: 25px;
    transition: var(--transition-smooth);
}

.tab-btn.active {
    background: linear-gradient(90deg, var(--accent-purple) 0%, rgba(0, 255, 210, 0.65) 100%);
    color: #fff;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
}

/* Project Dropdown Custom Styling */
.project-dropdown-wrap {
    display: flex;
    justify-content: center;
    margin-bottom: 30px;
}

.custom-dropdown {
    position: relative;
    width: 320px;
    font-family: var(--font-body);
    font-size: 0.9rem;
    user-select: none;
    z-index: 100; /* Ensure dropdown displays above project cards */
}

.dropdown-trigger {
    background: var(--bg-panel-solid);
    border: 1px solid rgba(0, 255, 210, 0.25);
    border-radius: 6px;
    padding: 12px 20px;
    color: #fff;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: var(--transition-smooth);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.dropdown-trigger:hover {
    border-color: var(--accent-cyan);
    box-shadow: 0 0 12px rgba(0, 255, 210, 0.25);
}

.dropdown-arrow {
    font-size: 0.75rem;
    color: var(--accent-cyan);
    transition: transform 0.3s ease;
}

.custom-dropdown.active .dropdown-arrow {
    transform: rotate(180deg);
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin-top: 8px;
    background: rgba(13, 15, 30, 0.95);
    border: 1px solid rgba(0, 255, 210, 0.25);
    border-radius: 6px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
    opacity: 0;
    transform: translateY(-10px);
    pointer-events: none;
    transition: var(--transition-smooth);
    /* 
       Limit the height to show exactly first 3 projects (each item height is ~40px). 
       40px * 3 = 120px, so 130px is a perfect max-height to show the scrollbar 
       and make subsequent projects viewable via scrolling down (下拉).
    */
    max-height: 130px; 
    overflow-y: auto;
}

.custom-dropdown.active .dropdown-menu {
    opacity: 1;
    transform: translateY(0);
    pointer-events: all;
}

.dropdown-item {
    padding: 10px 16px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition-smooth);
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.dropdown-item:last-child {
    border-bottom: none;
}

.dropdown-item:hover {
    background: rgba(0, 255, 210, 0.08);
    color: #fff;
}

.dropdown-item.active {
    background: rgba(0, 255, 210, 0.15);
    color: var(--accent-cyan);
    font-weight: 600;
}

/* Custom Scrollbar for Dropdown Menu */
.dropdown-menu::-webkit-scrollbar {
    width: 6px;
}
.dropdown-menu::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
}
.dropdown-menu::-webkit-scrollbar-thumb {
    background: rgba(0, 255, 210, 0.3);
    border-radius: 3px;
}
.dropdown-menu::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 255, 210, 0.6);
}

.projects-grid-container {
    display: flex;
    flex-direction: column;
    gap: 30px;
    width: 100%;
}

/* Project Card layout rules */
.project-card {
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-left: 3px solid var(--accent-cyan);
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    flex-direction: row;
    align-items: stretch;
    transition: var(--transition-smooth);
    position: relative;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.25);
    min-height: 220px;
}

.project-card:hover {
    background: var(--bg-card-hover);
    border-color: rgba(0, 255, 210, 0.25);
    border-left-color: var(--accent-cyan);
    box-shadow: var(--shadow-cyan), 0 10px 30px rgba(0,0,0,0.4);
    transform: translateY(-3px);
}

.project-card.online {
    border-left-color: var(--accent-purple);
}

.project-card.online:hover {
    border-color: rgba(138, 43, 226, 0.25);
    border-left-color: var(--accent-purple);
    box-shadow: var(--shadow-purple), 0 10px 30px rgba(0,0,0,0.4);
}

.project-info-side {
    flex: 3;
    display: flex;
    flex-direction: row;
    align-items: stretch;
    min-width: 0;
}

.project-thumbnail {
    width: 220px;
    min-width: 220px;
    height: 100%;
    min-height: 220px;
    background-size: cover;
    background-position: center;
    position: relative;
}

.project-meta-badges {
    position: absolute;
    top: 15px;
    left: 15px;
    display: flex;
    gap: 8px;
}

.badge {
    font-family: var(--font-heading);
    font-size: 0.65rem;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 3px;
    text-transform: uppercase;
}

.badge.single {
    background: rgba(0, 255, 210, 0.15);
    border: 1px solid var(--accent-cyan);
    color: var(--accent-cyan);
}

.badge.online {
    background: rgba(138, 43, 226, 0.15);
    border: 1px solid var(--accent-purple);
    color: #b983ff;
}

.badge.version {
    background: rgba(0, 0, 0, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #fff;
}

.project-card-body {
    padding: 24px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    flex: 1;
    min-width: 0;
}

.project-card-title {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 800;
    color: #fff;
    margin-bottom: 8px;
}

.project-card-desc {
    font-size: 0.88rem;
    color: var(--text-secondary);
    line-height: 1.6;
    flex: 1;
    min-height: 60px;
}

.project-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 15px;
}

.card-admin-actions {
    display: flex;
    gap: 8px;
}

.card-admin-btn {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-secondary);
    width: 32px;
    height: 32px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.card-admin-btn:hover {
    border-color: var(--accent-cyan);
    color: var(--accent-cyan);
    background: rgba(0, 255, 210, 0.05);
}

.card-admin-btn.delete:hover {
    border-color: var(--accent-pink);
    color: var(--accent-pink);
    background: rgba(247, 37, 133, 0.05);
}

.project-video-side {
    flex: 2;
    background: #000;
    border-left: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    min-width: 320px;
}

.game-demo-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.card-admin-btn svg {
    width: 16px;
    height: 16px;
}

/* ==========================================================================
   SECTION 4: NOTES
   ========================================================================== */
.notes-section-layout {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.notes-control-bar {
    display: flex;
    justify-content: flex-end;
}

.notes-search-bar {
    position: relative;
    width: 320px;
}

.notes-search-bar input {
    width: 100%;
    background: var(--bg-input);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    padding: 11px 20px 11px 40px;
    color: #fff;
    font-family: var(--font-body);
    font-size: 0.85rem;
    transition: var(--transition-smooth);
}

.notes-search-bar input:focus {
    outline: none;
    border-color: var(--accent-cyan);
    box-shadow: 0 0 12px rgba(0, 255, 210, 0.2);
}

.notes-search-bar .search-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.95rem;
    color: var(--text-dark);
}

.notes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
    gap: 20px;
}

/* Note Card Item */
.note-item {
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: 8px;
    padding: 22px;
    cursor: pointer;
    transition: var(--transition-smooth);
    position: relative;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 130px;
}

.note-item:hover {
    background: var(--bg-card-hover);
    border-color: rgba(0, 255, 210, 0.25);
    box-shadow: var(--shadow-cyan);
    transform: translateY(-3px);
}

.note-item-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 15px;
    margin-bottom: 12px;
}

.note-item-title {
    font-family: var(--font-body);
    font-weight: 700;
    font-size: 1.05rem;
    color: #fff;
    line-height: 1.4;
}

.note-item-tag {
    font-family: var(--font-heading);
    font-size: 0.65rem;
    color: var(--accent-cyan);
    border: 1px solid rgba(0, 255, 210, 0.35);
    background: rgba(0, 255, 210, 0.05);
    padding: 3px 8px;
    border-radius: 4px;
    white-space: nowrap;
}

.note-item-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    color: var(--text-dark);
    border-top: 1px solid rgba(255, 255, 255, 0.04);
    padding-top: 10px;
}

.note-item-meta span:last-child {
    color: var(--accent-cyan);
    font-weight: 600;
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.app-footer {
    background: linear-gradient(180deg, rgba(8, 10, 24, 0.5) 0%, #030407 100%);
    border-top: 1px solid rgba(0, 255, 210, 0.15);
    padding: 50px 20px;
    margin-top: 100px;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 30px;
}

.footer-info {
    text-align: center;
}

.footer-info p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 5px;
}

.footer-slogan {
    font-style: italic;
    color: var(--accent-cyan) !important;
    font-size: 0.8rem !important;
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-family: var(--font-heading);
    font-size: 0.75rem;
    color: var(--text-dark);
}

/* ==========================================================================
   MODALS BASE SYSTEM
   ========================================================================== */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(3, 4, 8, 0.82);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.modal-backdrop.active {
    opacity: 1;
    pointer-events: all;
}

.modal-card {
    background: var(--bg-panel-solid);
    border: 1px solid rgba(0, 255, 210, 0.25);
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.8), 0 0 30px rgba(0, 255, 210, 0.1);
    border-radius: 8px;
    width: 90%;
    max-width: 680px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    transform: scale(0.92);
    transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    overflow: hidden;
}

.modal-backdrop.active .modal-card {
    transform: scale(1);
}

.modal-header {
    padding: 18px 25px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    color: #fff;
    letter-spacing: 1px;
}

.close-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 1.8rem;
    cursor: pointer;
    transition: var(--transition-smooth);
    line-height: 1;
}

.close-btn:hover {
    color: var(--accent-cyan);
    text-shadow: 0 0 8px var(--accent-cyan);
}

.modal-body {
    padding: 25px;
    overflow-y: auto;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

.modal-btn {
    padding: 10px 24px;
    border-radius: 4px;
    font-family: var(--font-heading);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.cancel-btn {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-secondary);
}

.cancel-btn:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
}

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

/* Input Form Layouts */
.input-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 18px;
}

.input-group label {
    font-family: var(--font-heading);
    font-size: 0.75rem;
    color: var(--text-secondary);
    letter-spacing: 1px;
    text-transform: uppercase;
}

.input-group input, 
.input-group select, 
.input-group textarea {
    background: var(--bg-input);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 4px;
    padding: 10px 14px;
    color: #fff;
    font-family: var(--font-body);
    font-size: 0.9rem;
    transition: var(--transition-smooth);
}

.input-group input:focus, 
.input-group select:focus, 
.input-group textarea:focus {
    outline: none;
    border-color: var(--accent-cyan);
    box-shadow: 0 0 10px rgba(0, 255, 210, 0.2);
}

.form-row {
    display: flex;
    gap: 15px;
}

.form-row .input-group {
    flex: 1;
}

/* Login panel width */
.auth-card {
    max-width: 400px;
    border-color: var(--accent-cyan);
}

.auth-message-box {
    padding: 10px 15px;
    border-radius: 4px;
    font-size: 0.8rem;
    margin-bottom: 15px;
    border: 1px solid transparent;
}

.auth-message-box.error {
    background: rgba(247, 37, 133, 0.1);
    border-color: var(--accent-pink);
    color: var(--accent-pink);
}

.submit-btn {
    width: 100%;
    justify-content: center;
    padding: 12px;
    margin-top: 10px;
}

/* ==========================================================================
   NOTE EDITOR CARD (With Upload elements)
   ========================================================================== */
.note-editor-card {
    max-width: 100%;
    width: 100vw;
    height: 100vh;
    max-height: 100vh;
    border-radius: 0;
    border: none;
}

.note-editor-card .modal-body {
    flex: 1;
    display: flex;
    overflow: hidden;
    padding: 20px;
}

.editor-container {
    display: flex;
    gap: 20px;
    flex: 1;
    overflow: hidden;
    min-height: 0;
}

.editor-pane, .preview-pane {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.editor-toolbar-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.editor-toolbar-row label {
    font-family: var(--font-heading);
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.toolbar-upload-btn {
    background: rgba(0, 255, 210, 0.08);
    border: 1px solid rgba(0, 255, 210, 0.35);
    color: var(--accent-cyan);
    font-family: var(--font-body);
    font-size: 0.75rem;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 4px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: var(--transition-smooth);
}

.toolbar-upload-btn:hover {
    background: rgba(0, 255, 210, 0.2);
    box-shadow: 0 0 10px rgba(0, 255, 210, 0.3);
}

.editor-pane textarea {
    flex: 1;
    resize: none;
    font-family: 'Consolas', 'Courier New', monospace;
    font-size: 0.85rem;
    line-height: 1.5;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 4px;
    padding: 15px;
    color: #e2e8f0;
    overflow-y: auto;
}

.editor-pane textarea:focus {
    outline: none;
    border-color: var(--accent-cyan);
    box-shadow: 0 0 8px rgba(0, 255, 210, 0.15);
}

.preview-pane label {
    font-family: var(--font-heading);
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.preview-pane .preview-content {
    flex: 1;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 4px;
    padding: 15px;
    overflow-y: auto;
}

/* ==========================================================================
   MARKDOWN STYLES (Supports Image renders)
   ========================================================================== */
.markdown-body {
    color: #cbd5e1;
    font-size: 0.95rem;
    line-height: 1.6;
}

.markdown-body h1, .markdown-body h2, .markdown-body h3 {
    color: #fff;
    margin-top: 20px;
    margin-bottom: 10px;
    font-family: var(--font-body);
    font-weight: 700;
}

.markdown-body h1 { font-size: 1.5rem; border-bottom: 1px solid rgba(255,255,255,0.08); padding-bottom: 6px; }
.markdown-body h2 { font-size: 1.25rem; border-bottom: 1px solid rgba(255,255,255,0.05); padding-bottom: 4px; }
.markdown-body h3 { font-size: 1.1rem; }

.markdown-body p {
    margin-bottom: 12px;
}

.markdown-body img {
    max-width: 100%;
    max-height: 350px;
    object-fit: contain;
    border-radius: 6px;
    margin: 12px 0;
    border: 1px solid rgba(0, 255, 210, 0.25);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
    display: block;
}

.markdown-body code {
    background: rgba(138, 43, 226, 0.15);
    border: 1px solid rgba(138, 43, 226, 0.3);
    color: var(--accent-cyan);
    padding: 2px 6px;
    border-radius: 3px;
    font-family: monospace;
    font-size: 0.85rem;
}

.markdown-body pre {
    background: #080a13;
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 6px;
    padding: 15px;
    margin-bottom: 15px;
    overflow-x: auto;
}

.markdown-body pre code {
    background: transparent;
    border: none;
    color: #e2e8f0;
    padding: 0;
    font-size: 0.85rem;
}

.markdown-body ul, .markdown-body ol {
    margin-bottom: 12px;
    padding-left: 20px;
}

.markdown-body li {
    margin-bottom: 6px;
}

.markdown-body blockquote {
    border-left: 4px solid var(--accent-purple);
    background: rgba(138, 43, 226, 0.05);
    padding: 10px 15px;
    margin: 15px 0;
    color: #94a3b8;
    border-radius: 0 4px 4px 0;
}

/* Reader Card */
.reader-card {
    max-width: 800px;
    width: 90%;
    height: 85vh;
}

.reader-meta {
    display: flex;
    align-items: center;
    gap: 12px;
}

.note-tag-badge {
    background: rgba(0, 255, 210, 0.15);
    border: 1px solid var(--accent-cyan);
    color: var(--accent-cyan);
    font-family: var(--font-heading);
    font-size: 0.7rem;
    padding: 3px 10px;
    border-radius: 20px;
}

.note-date {
    font-size: 0.8rem;
    color: var(--text-dark);
}

.reader-body {
    flex: 1;
    overflow-y: auto;
    padding: 30px;
}

.modal-footer {
    padding: 15px 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    justify-content: flex-end;
    gap: 15px;
}

/* ==========================================================================
   UNITY GAME PLAYER MODAL
   ========================================================================== */
.player-card {
    max-width: 1080px; /* 增大游戏小屏显示区域，更适合 16:9 比例游玩 */
    width: 95%;
    border-color: var(--accent-cyan);
}

.player-controls {
    display: flex;
    align-items: center;
    gap: 15px;
}

.player-fullscreen-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-smooth);
}

.player-fullscreen-btn:hover {
    color: var(--accent-cyan);
}

.player-fullscreen-btn svg {
    width: 20px;
    height: 20px;
}

.player-container {
    padding: 0;
    background: #000;
    position: relative;
    aspect-ratio: 16 / 9;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.unity-loader {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #05060b;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 10;
    padding: 20px;
    text-align: center;
}

.ghost-loader-spinner {
    width: 60px;
    height: 60px;
    border: 3px solid rgba(0, 255, 210, 0.05);
    border-radius: 50%;
    border-top-color: var(--accent-cyan);
    border-bottom-color: var(--accent-purple);
    animation: loader-spin 1.5s cubic-bezier(0.5, 0, 0.5, 1) infinite;
    margin-bottom: 20px;
    box-shadow: 0 0 15px rgba(0, 255, 210, 0.2);
}

.loader-text {
    font-family: var(--font-heading);
    font-size: 0.9rem;
    letter-spacing: 3px;
    color: var(--accent-cyan);
    margin-bottom: 20px;
    text-shadow: 0 0 8px rgba(0, 255, 210, 0.4);
}

.progress-bar-container {
    width: 300px;
    height: 16px;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(0, 255, 210, 0.3);
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 20px;
    padding: 2px;
}

.progress-bar-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--accent-purple) 0%, var(--accent-cyan) 100%);
    border-radius: 8px;
    transition: width 0.1s linear;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: 8px;
    font-size: 0.65rem;
    font-family: var(--font-heading);
    font-weight: 900;
    color: #fff;
    box-shadow: 0 0 8px var(--accent-cyan);
}

.loader-tips {
    font-size: 0.75rem;
    color: var(--text-dark);
}

.unity-viewport-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

#unity-canvas-emulator {
    width: 100%;
    height: 100%;
    background: #080a13;
    display: block;
}

#unity-iframe-loader {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 1920px;
    height: 1080px;
    border: none;
    transform-origin: center;
    transform: translate(-50%, -50%) scale(var(--game-scale, 1));
}

.hidden {
    display: none !important;
}

/* ==========================================================================
   ANIMATIONS & KEYFRAMES
   ========================================================================== */
@keyframes float-logo {
    0% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-4px) rotate(3deg); }
    100% { transform: translateY(0) rotate(0deg); }
}

@keyframes float-slow {
    0% { transform: translate(-50%, 0); }
    50% { transform: translate(-50%, -8px); }
    100% { transform: translate(-50%, 0); }
}

@keyframes pulse-dot {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.4); opacity: 0.4; }
    100% { transform: scale(1); opacity: 1; }
}

@keyframes scroll-wheel-anim {
    0% { top: 6px; opacity: 1; }
    50% { top: 14px; opacity: 0.4; }
    100% { top: 6px; opacity: 1; }
}

@keyframes text-shadow-pulse {
    0% { text-shadow: 2px 0 0 var(--accent-pink), -2px -1px 0 var(--accent-cyan); }
    50% { text-shadow: 4px 0 0 var(--accent-purple), -4px 1px 0 var(--accent-cyan); }
    100% { text-shadow: 2px 0 0 var(--accent-pink), -2px -1px 0 var(--accent-cyan); }
}

@keyframes loader-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}


/* ==========================================================================
   SUB MODALS & C# HIGHLIGHT & NOTE VIDEOS
   ========================================================================== */
.modal-backdrop.sub-modal {
    z-index: 1010;
}

.sub-modal-card {
    max-width: 550px !important;
    border-color: var(--accent-purple) !important;
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.8), 0 0 30px rgba(138, 43, 226, 0.15) !important;
}

/* C# Visual Studio & CSDN Style Code Block */
.cs-code-block {
    background-color: #1e1e1e;
    border: 1px solid #333;
    border-radius: 6px;
    margin: 18px 0;
    overflow: hidden;
    font-family: 'Consolas', 'Courier New', monospace;
    font-size: 0.85rem;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.5);
}

.cs-code-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #2d2d2d;
    padding: 6px 15px;
    border-bottom: 1px solid #3c3c3c;
    color: #969696;
    font-size: 0.75rem;
    font-family: var(--font-heading);
}

.cs-code-lang {
    font-weight: 600;
    color: var(--accent-cyan);
    text-shadow: 0 0 5px rgba(0, 255, 210, 0.3);
}

.cs-code-copy {
    background: transparent;
    border: 1px solid #555;
    color: #ccc;
    padding: 3px 10px;
    border-radius: 3px;
    font-size: 0.7rem;
    cursor: pointer;
    font-family: var(--font-body);
    transition: var(--transition-smooth);
}

.cs-code-copy:hover {
    background-color: #3e3e3e;
    color: #fff;
    border-color: var(--accent-cyan);
    box-shadow: 0 0 8px rgba(0, 255, 210, 0.3);
}

.cs-code-body {
    display: flex;
    overflow-x: auto;
    background-color: #1e1e1e;
    padding: 12px 0;
}

.cs-line-numbers {
    text-align: right;
    padding: 0 12px 0 15px;
    color: #858585;
    user-select: none;
    border-right: 1px solid #333;
    line-height: 1.5;
}

.cs-code-lines {
    padding: 0 15px;
    white-space: pre;
    line-height: 1.5;
    color: #d4d4d4;
    flex: 1;
    tab-size: 4;
    -moz-tab-size: 4;
}

/* Ensure consistent tab-size for textareas and standard code blocks */
textarea, pre, code {
    tab-size: 4;
    -moz-tab-size: 4;
}

#code-input-textarea {
    font-family: 'Consolas', 'Courier New', monospace !important;
    font-size: 0.85rem !important;
    line-height: 1.5 !important;
    white-space: pre !important;
    overflow-x: auto !important;
}

/* VS Dark Syntax Tokens */
.cs-comment { color: #57a64a; font-style: italic; }
.cs-string { color: #d69d85; }
.cs-char { color: #d69d85; }
.cs-keyword { color: #569cd6; font-weight: bold; }
.cs-method { color: #dcdcaa; }
.cs-number { color: #b5cea8; }
.cs-type { color: #4ec9b0; }
.cs-preprocessor { color: #9b9b9b; }

/* Note Video Styling */
.note-video-container {
    margin: 18px 0;
    border: 1px solid rgba(0, 255, 210, 0.25);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.5);
    border-radius: 6px;
    overflow: hidden;
    background-color: #000;
}

.note-video-player {
    width: 100%;
    max-height: 450px;
    display: block;
    outline: none;
}

/* ==========================================================================
   RESPONSIVE LAYOUTS
   ========================================================================== */
@media (max-width: 960px) {
    .app-header {
        padding: 15px 20px;
    }
    
    .header-nav {
        display: none; /* Hide anchors on tablets/mobiles */
    }
    
    .intro-grid {
        grid-template-columns: 1fr;
    }
    
    .glitch-title {
        font-size: 2.4rem;
    }
    
    .hero-title {
        font-size: 2.8rem;
    }
    
    .projects-grid-container {
        flex-direction: column;
        gap: 20px;
    }
    
    .project-card {
        flex-direction: column;
    }
    
    .project-info-side {
        flex-direction: column;
    }
    
    .project-thumbnail {
        width: 100%;
        height: 180px;
        min-height: 180px;
    }
    
    .project-video-side {
        width: 100%;
        height: 220px;
        min-width: auto;
        border-left: none;
        border-top: 1px solid rgba(255, 255, 255, 0.05);
    }
    
    .notes-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .editor-container {
        flex-direction: column;
    }
    
    .preview-pane {
        height: 200px;
        margin-top: 15px;
    }
}
