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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    overflow: hidden; /* Prevent native window scroll */
    color: #ffffff;
    height: 100vh;
    width: 100vw;
    font-weight: 300; /* Thin, elegant font weight */
}

/* Background Layers */
.bg-layer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-size: cover;
    background-position: center;
    transition: opacity 1s ease-in-out;
    z-index: 1;
    opacity: 0;
}

.bg-layer.active {
    opacity: 1;
}

/* Uniform dark overlay for clean text contrast */
.bg-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.4);
    z-index: 2;
    pointer-events: none;
}

/* Main Layout Container */
.main-container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
    display: flex;
    gap: 40px;
    width: 85%;
    max-width: 1000px;
    height: 70vh;
    align-items: stretch;
}

.left-column {
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 260px;
    flex-shrink: 0;
}

.right-column {
    flex: 1;
    position: relative;
}

/* Minimalist Glass Panel */
.glass-panel {
    background: rgba(0, 0, 0, 0.1); /* Reduced opacity for more transparency */
    backdrop-filter: blur(8px); /* Lowered blur so backgrounds don't look like mosaics */
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.03); /* Barely visible border */
    border-radius: 12px;
}

/* Avatar Panel */
.avatar-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 30px;
    text-align: center;
}

.avatar-wrapper {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    margin-bottom: 25px;
    overflow: hidden;
}

.avatar {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.name {
    font-size: 1.4rem;
    font-weight: 400;
    margin-bottom: 8px;
    letter-spacing: 2px;
}

.bio {
    font-size: 0.85rem;
    font-weight: 200;
    opacity: 0.6;
    letter-spacing: 1px;
}

/* Socials Panel */
.socials-panel {
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: space-evenly;
}

.social-icon {
    color: #ffffff;
    font-size: 1.3rem;
    text-decoration: none;
    opacity: 0.5; /* Subtle idle state */
    transition: opacity 0.3s ease;
}

.social-icon:hover {
    opacity: 1; /* Clean hover effect, no jumping */
}

/* Section Panels */
.section-panel {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    padding: 60px; /* Generous breathing room */
    display: flex;
    flex-direction: column;
    opacity: 0;
    pointer-events: none;
    /* Soft elegant slide transition */
    transition: opacity 0.7s ease-in-out, transform 0.7s cubic-bezier(0.2, 0.8, 0.2, 1);
    transform: translateY(20px);
}

.section-panel.active-section {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

/* Typography */
.welcome-title {
    font-size: 2.4rem;
    font-weight: 200;
    margin-bottom: 40px;
    letter-spacing: 3px;
    text-transform: uppercase;
}

.content-body {
    flex: 1;
    overflow-y: auto;
    padding-right: 20px;
}

/* Invisible thin scrollbar */
.content-body::-webkit-scrollbar {
    width: 2px;
}
.content-body::-webkit-scrollbar-track {
    background: transparent;
}
.content-body::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
}

.minimal-text {
    font-size: 1.05rem;
    line-height: 2.2;
    opacity: 0.75;
    margin-bottom: 15px;
}

/* Minimalist Article List */
.article-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.article-item {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    padding: 15px;
    border-radius: 8px;
    transition: background 0.3s ease, transform 0.2s ease;
}

.article-item:hover {
    background: rgba(255, 255, 255, 0.05);
    transform: translateX(5px);
}

.article-date {
    font-size: 0.8rem;
    font-weight: 300;
    color: rgba(255, 255, 255, 0.4);
    min-width: 90px;
    font-family: 'Inter', monospace;
    letter-spacing: 0.5px;
}

.article-content {
    flex: 1;
}

.article-title {
    color: #ffffff;
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 400;
    opacity: 0.85;
    transition: opacity 0.3s ease;
    display: block;
    margin-bottom: 6px;
}

.article-title:hover {
    opacity: 1;
}

.article-summary {
    font-size: 0.9rem;
    font-weight: 200;
    color: rgba(255, 255, 255, 0.5);
    line-height: 1.6;
    margin: 0;
}

/* Project List Styles */
.project-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.project-item {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    padding: 15px;
    border-radius: 8px;
    transition: background 0.3s ease, transform 0.2s ease;
}

.project-item:hover {
    background: rgba(255, 255, 255, 0.05);
    transform: translateX(5px);
}

.project-date {
    font-size: 0.8rem;
    font-weight: 300;
    color: rgba(255, 255, 255, 0.4);
    min-width: 90px;
    font-family: 'Inter', monospace;
    letter-spacing: 0.5px;
}

.project-content {
    flex: 1;
}

.project-title {
    color: #ffffff;
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 400;
    opacity: 0.85;
    transition: opacity 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}

.project-title:hover {
    opacity: 1;
}

.project-external-icon {
    font-size: 0.75rem;
    opacity: 0.6;
}

.project-summary {
    font-size: 0.9rem;
    font-weight: 200;
    color: rgba(255, 255, 255, 0.5);
    line-height: 1.6;
    margin: 0;
}

/* Games Panel Grid */
.game-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 25px;
    padding: 10px 0;
}

.game-card {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 25px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition: transform 0.3s ease, background 0.3s ease, box-shadow 0.3s ease;
}

.game-card:hover {
    transform: translateY(-8px);
    background: rgba(255, 255, 255, 0.06);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.game-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0.05));
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
    font-size: 1.8rem;
    color: rgba(255, 255, 255, 0.9);
}

.game-title {
    font-size: 1.1rem;
    font-weight: 400;
    color: #ffffff;
    margin-bottom: 8px;
    letter-spacing: 1px;
}

.game-desc {
    font-size: 0.85rem;
    font-weight: 200;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 15px;
    line-height: 1.5;
}

.game-link {
    font-size: 0.85rem;
    font-weight: 300;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.08);
    transition: all 0.3s ease;
}

.game-link:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #ffffff;
}

.game-link i {
    font-size: 0.7rem;
}

/* Tools Panel Grid - same as games */
.tool-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 25px;
    padding: 10px 0;
}

.tool-card {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 25px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition: transform 0.3s ease, background 0.3s ease, box-shadow 0.3s ease;
}

.tool-card:hover {
    transform: translateY(-8px);
    background: rgba(255, 255, 255, 0.06);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.tool-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0.05));
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
    font-size: 1.8rem;
    color: rgba(255, 255, 255, 0.9);
}

.tool-title {
    font-size: 1.1rem;
    font-weight: 400;
    color: #ffffff;
    margin-bottom: 8px;
    letter-spacing: 1px;
}

.tool-desc {
    font-size: 0.85rem;
    font-weight: 200;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 15px;
    line-height: 1.5;
}

.tool-link {
    font-size: 0.85rem;
    font-weight: 300;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.08);
    transition: all 0.3s ease;
}

.tool-link:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #ffffff;
}

.tool-link i {
    font-size: 0.7rem;
}

/* More Articles Link - elegant CTA at bottom of Articles panel */
.more-articles-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 30px;
    padding: 12px 24px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 24px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
    font-weight: 300;
    text-decoration: none;
    transition: all 0.3s ease;
    letter-spacing: 0.5px;
}

.more-articles-link:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.15);
    transform: translateX(5px);
}

.more-articles-link i {
    font-size: 0.75rem;
    transition: transform 0.3s ease;
}

.more-articles-link:hover i {
    transform: translateX(3px);
}

/* Gallery File Explorer Styling */
.gallery-breadcrumb {
    margin-bottom: 30px;
    font-size: 0.95rem;
    display: flex;
    gap: 8px;
    align-items: center;
}
.breadcrumb-item {
    cursor: pointer;
    opacity: 0.5;
    transition: opacity 0.3s;
}
.breadcrumb-item:hover {
    opacity: 1;
}
.breadcrumb-item::after {
    content: "/";
    margin-left: 8px;
    opacity: 0.4;
}
.breadcrumb-item:last-child::after {
    content: "";
}
.breadcrumb-item.active {
    opacity: 1;
    font-weight: 400;
}

.gallery-view {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    gap: 30px 20px;
    align-items: start;
}

.gallery-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    transition: transform 0.2s;
    text-align: center;
}
.gallery-item:hover {
    transform: translateY(-5px);
}
.gallery-item .folder-icon {
    font-size: 3.5rem;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 12px;
}
.gallery-item.empty .folder-icon {
    opacity: 0.3;
}
.gallery-item .image-thumbnail {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 12px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    opacity: 0.85;
    transition: opacity 0.3s;
}
.gallery-item:hover .image-thumbnail {
    opacity: 1;
}
.gallery-item .item-name {
    font-size: 0.85rem;
    opacity: 0.8;
    word-break: break-all;
    max-width: 100%;
}

/* Mobile Responsive */
@media (max-width: 900px) {
    .main-container {
        flex-direction: column;
        height: auto;
        bottom: 5%;
        top: 5%;
        transform: translateX(-50%);
        width: 90%;
    }
    .left-column {
        width: 100%;
        flex-direction: row;
        height: 140px;
    }
    .avatar-panel {
        padding: 15px;
    }
    .avatar-wrapper {
        width: 60px;
        height: 60px;
        margin-bottom: 10px;
    }
    .socials-panel {
        flex: 1;
        flex-direction: column;
        height: 100%;
    }
    .right-column {
        min-height: 60vh;
    }
    .section-panel {
        padding: 30px;
    }
}

/* --- Music Drawer --- */
.music-drawer {
    position: fixed;
    bottom: 40px;
    left: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    transform: translateX(-320px); /* 320px is content width */
    transition: transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.music-drawer:hover,
.music-drawer.pinned {
    transform: translateX(20px); /* Slide out and leave 20px margin */
}

.player-content {
    width: 300px;
    background: rgba(15, 15, 15, 0.8);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    box-shadow: 10px 10px 30px rgba(0,0,0,0.5);
}

.drawer-handle {
    width: 40px;
    height: 80px;
    background: rgba(15, 15, 15, 0.5);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-left: none;
    border-radius: 0 12px 12px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.drawer-handle i {
    color: #fff;
    font-size: 1.2rem;
    opacity: 0.6;
    transition: opacity 0.3s;
}

.drawer-handle:hover i { opacity: 1; }

.music-drawer:hover .drawer-handle,
.music-drawer.pinned .drawer-handle {
    opacity: 0;
    pointer-events: none;
}

/* Inside Player */
.player-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    padding-bottom: 10px;
}
.player-title { font-size: 0.9rem; font-weight: 400; opacity: 0.8; letter-spacing: 1px; }
.icon-btn { background: none; border: none; color: #fff; opacity: 0.4; cursor: pointer; transition: opacity 0.3s; }
.icon-btn:hover { opacity: 1; }
.icon-btn.active { opacity: 1; color: #fecfef; } 

.track-info { display: flex; align-items: center; gap: 15px; }
.cover-art {
    width: 50px; height: 50px; border-radius: 8px;
    background: linear-gradient(135deg, rgba(255,255,255,0.2), rgba(255,255,255,0.05));
    display: flex; align-items: center; justify-content: center;
    font-size: 1.5rem; opacity: 0.7;
}
.track-details { display: flex; flex-direction: column; gap: 4px; overflow: hidden; }
.track-name { font-size: 1rem; font-weight: 400; white-space: nowrap; text-overflow: ellipsis; overflow: hidden; }
.artist-name { font-size: 0.8rem; font-weight: 200; opacity: 0.6; }

.progress-container { display: flex; flex-direction: column; gap: 5px; }
.progress-bar { width: 100%; height: 4px; background: rgba(255,255,255,0.1); border-radius: 2px; }
.progress { width: 30%; height: 100%; background: #fff; border-radius: 2px; opacity: 0.8; }
.time-info { display: flex; justify-content: space-between; font-size: 0.7rem; opacity: 0.5; font-family: monospace; }

.controls { display: flex; justify-content: center; align-items: center; gap: 20px; margin: 10px 0; }
.control-btn { background: none; border: none; color: #fff; font-size: 1.2rem; opacity: 0.7; cursor: pointer; transition: transform 0.2s, opacity 0.2s; }
.control-btn:hover { opacity: 1; transform: scale(1.1); }
.play-btn { font-size: 1.8rem; }

.playlist-section { border-top: 1px solid rgba(255,255,255,0.1); padding-top: 10px; }
.playlist-tabs { display: flex; gap: 15px; margin-bottom: 10px; }
.tab { font-size: 0.85rem; opacity: 0.4; cursor: pointer; transition: opacity 0.3s; padding-bottom: 4px; }
.tab:hover { opacity: 0.8; }
.tab.active { opacity: 1; border-bottom: 1px solid #fff; }
.playlist-items { display: flex; flex-direction: column; gap: 8px; max-height: 120px; overflow-y: auto; overscroll-behavior: contain; }
.playlist-items::-webkit-scrollbar { width: 2px; }
.playlist-items::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.2); }
.song-item { font-size: 0.85rem; opacity: 0.6; cursor: pointer; transition: opacity 0.2s; white-space: normal; line-height: 1.4; overflow: hidden; padding: 6px; border-radius: 4px; word-break: break-word; }
.song-item:hover { opacity: 1; background: rgba(255,255,255,0.05); }
.song-item.active { opacity: 1; color: #fecfef; background: rgba(255,255,255,0.08); }

/* --- Preloader --- */
.preloader {
    position: fixed;
    top: 0; left: 0; width: 100vw; height: 100vh;
    background-color: #050505;
    z-index: 99999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: opacity 0.8s ease-out, visibility 0.8s ease-out;
}
.preloader.hidden {
    opacity: 0;
    visibility: hidden;
}
.spinner {
    width: 60px;
    height: 60px;
    position: relative;
    margin-bottom: 25px;
}
.double-bounce1, .double-bounce2 {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.5);
    opacity: 0.6;
    position: absolute;
    top: 0; left: 0;
    animation: sk-bounce 2.0s infinite ease-in-out;
}
.double-bounce2 {
    animation-delay: -1.0s;
}
@keyframes sk-bounce {
    0%, 100% { transform: scale(0.0) }
    50% { transform: scale(1.0) }
}
.loading-text {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1.1rem;
    font-weight: 300;
    letter-spacing: 2px;
}

/* --- Immersive Music Room --- */
.immersive-room {
    position: fixed;
    top: 0; left: 0; width: 100vw; height: 100vh;
    background: #000;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    opacity: 0;
    transition: opacity 1.5s ease-in-out;
}

.immersive-room.active {
    opacity: 1;
}

.exit-btn {
    position: absolute;
    top: 30px; left: 40px;
    background: none; border: none;
    color: #fff; font-size: 2rem;
    opacity: 0.5; cursor: pointer;
    transition: opacity 0.3s;
    z-index: 10000;
}
.exit-btn:hover { opacity: 1; transform: scale(1.1); }

.immersive-content {
    position: relative;
    width: 75vw;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 颗粒状的背景 (Grainy effect overlay) */
.immersive-bg {
    position: absolute;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 3s ease-in-out;
    filter: brightness(0.6) contrast(1.1); 
}
.immersive-bg::after {
    content: "";
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    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)" opacity="0.15"/%3E%3C/svg%3E');
    pointer-events: none;
}
.immersive-bg.loaded {
    opacity: 1;
    box-shadow: 0 0 50px rgba(255,255,255,0.05);
}

.immersive-right-sidebar {
    position: relative;
    width: 25vw;
    height: 100vh;
    background: rgba(15, 15, 15, 0.7);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border-left: 1px solid rgba(255,255,255,0.05);
    z-index: 100;
    padding: 30px 20px;
    box-shadow: -10px 0 30px rgba(0,0,0,0.5);
    display: flex;
    flex-direction: column;
}


/* 歌词区 */
.immersive-lyrics {
    position: relative;
    z-index: 10;
    width: 80%;
    height: 60%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    overflow: hidden;
    text-align: center;
    -webkit-mask-image: linear-gradient(to bottom, transparent, black 30%, black 70%, transparent);
    mask-image: linear-gradient(to bottom, transparent, black 30%, black 70%, transparent);
}

.lyric-line {
    font-size: 2rem;
    font-weight: 300;
    color: rgba(255,255,255,0.3);
    margin: 15px 0;
    transition: all 0.5s ease;
    text-shadow: 
        0 2px 4px rgba(0,0,0,1), 
        0 4px 10px rgba(0,0,0,0.8), 
        0 0 20px rgba(0,0,0,0.8),
        0 0 40px rgba(0,0,0,0.8);
    letter-spacing: 2px;
}
.lyric-line.active {
    color: #fff;
    transform: scale(1.1);
    font-weight: 600;
    text-shadow: 
        0 2px 5px rgba(0,0,0,1), 
        0 5px 15px rgba(0,0,0,1), 
        0 0 25px rgba(0,0,0,0.9),
        0 0 40px rgba(0,0,0,0.9),
        0 0 10px rgba(255,255,255,0.4);
}

/* --- Admin Link (subtle, bottom of left column) --- */
.admin-link {
    display: block;
    width: fit-content;
    margin: 12px auto 0;
    font-size: 0.65rem;
    font-weight: 200;
    letter-spacing: 0.12em;
    color: rgba(255,255,255,0.08);
    text-decoration: none;
    transition: color 0.6s ease;
    cursor: default;
}

.admin-link:hover {
    color: rgba(255,255,255,0.30);
    cursor: pointer;
}
