/* ==========================================================================
   Base Reset
   ========================================================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Noto Sans SC', sans-serif;
}

body {
    width: 100vw;
    height: 100vh;
    background: url('images/wallpaper.png') no-repeat center center/cover;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    position: relative;
}

body::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    z-index: 0;
}

/* ==========================================================================
   Lockscreen
   ========================================================================== */

.lockscreen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: var(--bg-wallpaper) no-repeat center center/cover;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: white;
    z-index: 999;
    cursor: pointer;
    transition: transform 0.6s cubic-bezier(0.85, 0, 0.15, 1);
}

.lockscreen::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: -1;
}

.lockscreen.unlocked {
    transform: translateY(-100%);
}

.lock-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    border: 3px solid rgba(255, 255, 255, 0.5);
    margin-bottom: 20px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
    object-fit: cover;
}

.lock-clock {
    font-family: 'Share Tech Mono', monospace;
    font-size: 6.5rem;
    font-weight: bold;
    text-shadow: 0 4px 15px rgba(0,0,0,0.6);
    line-height: 1;
}

.lock-date {
    font-size: 1.5rem;
    font-weight: 300;
    margin-top: 10px;
    opacity: 0.9;
    text-shadow: 0 2px 8px rgba(0,0,0,0.6);
}

.lock-hint {
    position: absolute;
    bottom: 60px;
    font-size: 0.95rem;
    letter-spacing: 2px;
    opacity: 0.7;
    animation: pulse 2s infinite;
    text-shadow: 0 2px 5px rgba(0,0,0,0.5);
}

@keyframes pulse {
    0%, 100% { opacity: 0.4; transform: scale(0.98); }
    50% { opacity: 0.9; transform: scale(1); }
}

/* ==========================================================================
   Main Container & Glass Panel
   ========================================================================== */

.desktop-container {
    position: relative;
    z-index: 2;
    display: flex;
    gap: 25px;
    align-items: center;
}

.glass-panel {
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 30px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

/* ==========================================================================
   Sidebar
   ========================================================================== */

.sidebar {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px 15px;
    gap: 20px;
    height: 500px;
    width: 70px;
    border-radius: 40px;
}

.sidebar-btn {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: transform 0.2s, background 0.2s;
    text-decoration: none;
    font-size: 1.1rem;
}

.sidebar-btn:hover {
    transform: scale(1.1);
    background: rgba(0, 0, 0, 0.9);
}

.sidebar-btn.search {
    background: rgba(255, 255, 255, 0.8);
    color: #333;
}

/* ==========================================================================
   Main Board
   ========================================================================== */

.main-board {
    width: 900px;
    height: 530px;
    padding: 30px;
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    position: relative;
}

.character-bg-inside {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    max-height: 90%;
    z-index: 1;
    pointer-events: none;
    opacity: 0.85;
    filter: drop-shadow(0 10px 25px rgba(0,0,0,0.4));
}

/* ==========================================================================
   Left Column
   ========================================================================== */

.left-col {
    display: flex;
    flex-direction: column;
    gap: 15px;
    z-index: 3;
    grid-column: 1;
}

.clock-widget {
    color: #fff;
    text-shadow: 0 2px 8px rgba(0,0,0,0.7);
}

.time {
    font-family: 'Share Tech Mono', monospace;
    font-size: 3.5rem;
    font-weight: bold;
    line-height: 1;
    letter-spacing: -2px;
}

.date {
    font-size: 0.9rem;
    font-weight: 600;
    opacity: 0.9;
    margin-left: 5px;
}

.calendar-widget {
    background: rgba(15, 15, 18, 0.85);
    color: #fff;
    border-radius: 20px;
    padding: 12px;
    width: 215px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.5);
    border: 1px solid rgba(255,255,255,0.1);
}

.calendar-header {
    text-align: center;
    font-weight: 600;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    padding-bottom: 4px;
    margin-bottom: 6px;
    font-size: 0.8rem;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
    text-align: center;
    font-size: 0.7rem;
}

.day-name { opacity: 0.5; font-weight: bold; }
.calendar-grid span:not(.day-name) { cursor: pointer; padding: 2px 0; display: inline-block; width: 100%; }
.calendar-grid .active {
    background: #fff;
    color: #000;
    border-radius: 5px;
    font-weight: bold;
}

/* ==========================================================================
   Music Player
   ========================================================================== */

.music-player {
    background: rgba(20, 22, 26, 0.85);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 18px;
    padding: 10px 12px;
    width: 215px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: white;
    box-shadow: 0 10px 25px rgba(0,0,0,0.4);
}

.album-art {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background-size: cover;
    background-position: center;
    flex-shrink: 0;
    transition: background-image 0.3s ease;
}

.track-info {
    flex-grow: 1;
    overflow: hidden;
}

.track-title {
    font-size: 0.72rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.player-controls {
    display: flex;
    gap: 10px;
    font-size: 0.8rem;
    opacity: 0.9;
    margin-top: 4px;
    align-items: center;
}

.player-controls i { cursor: pointer; transition: transform 0.1s; }
.player-controls i:hover { transform: scale(1.15); }
.player-controls i.active-btn { color: hsl(var(--accent-hue), 70%, 60%); }
.player-controls i.liked { color: #ff3b30; }

/* ==========================================================================
   Right Column
   ========================================================================== */

.right-col {
    grid-column: 3;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 15px;
    z-index: 3;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 15px;
    width: 100%;
    justify-content: flex-end;
}

.mini-icon-btn {
    background: rgba(0,0,0,0.8);
    color: white;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 0.9rem;
    cursor: pointer;
    transition: transform 0.2s;
    text-decoration: none;
}

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

.user-tag {
    background: rgba(255, 255, 255, 0.85);
    padding: 5px 15px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.85rem;
    font-weight: bold;
    color: #000;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

.user-avatar {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background-size: cover;
    background-position: center;
}

.greeting {
    color: #fff;
    font-weight: bold;
    font-size: 1.2rem;
    width: 100%;
    text-align: right;
    text-shadow: 0 2px 6px rgba(0,0,0,0.6);
}

.greeting-sub {
    color: var(--text-secondary);
    font-size: 0.8rem;
    text-align: right;
    width: 100%;
    margin-top: -8px;
    text-shadow: 0 1px 4px rgba(0,0,0,0.5);
}

.gallery-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 10px;
    width: 100%;
}

.gallery-item {
    border-radius: 15px;
    background-size: cover;
    background-position: center;
    box-shadow: 0 8px 20px rgba(0,0,0,0.3);
    border: 1px solid rgba(255,255,255,0.15);
    transition: transform 0.3s cubic-bezier(0.25, 1, 0.5, 1);
    cursor: pointer;
}

.gallery-item:hover {
    transform: scale(1.04) rotate(1deg);
}

.item-large {
    height: 140px;
    grid-row: span 2;
    background-image: var(--bg-gallery1);
}
.item-top {
    height: 65px;
    background-image: var(--bg-gallery2);
}
.item-bottom {
    height: 65px;
    background-image: var(--bg-gallery3);
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.3rem;
}

/* ==========================================================================
   Quotes Widget
   ========================================================================== */

.quotes-widget {
    background: rgba(20, 22, 26, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 20px;
    padding: 12px;
    width: 100%;
    color: #fff;
    box-shadow: 0 8px 25px rgba(0,0,0,0.4);
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 6px;
    min-height: 80px;
}

.quotes-header {
    font-size: 0.75rem;
    font-weight: bold;
    opacity: 0.8;
    display: flex;
    align-items: center;
    gap: 6px;
    letter-spacing: 0.5px;
}

.quotes-text {
    font-size: 0.78rem;
    line-height: 1.5;
    color: #e0e0e0;
    font-style: italic;
}

.quotes-author {
    font-size: 0.7rem;
    opacity: 0.6;
    text-align: right;
}

/* ==========================================================================
   Bottom Dock
   ========================================================================== */

.bottom-dock {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 18px;
    padding: 12px 30px;
    border-radius: 35px;
    z-index: 10;
    background: rgba(255, 255, 255, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.4);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
}

.dock-icon {
    width: 48px;
    height: 48px;
    border-radius: 13px;
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
}
.dock-icon:hover { transform: translateY(-10px) scale(1.12); }

.icon-blog { background: linear-gradient(135deg, #667eea, #764ba2); }
.icon-bilibili { background: linear-gradient(135deg, #fb7299, #ff9eb5); }
.icon-github { background: linear-gradient(135deg, #333, #555); }
.icon-qq { background: linear-gradient(135deg, #12b7f5, #4fc3f7); }
.icon-email { background: linear-gradient(135deg, #667eea, #764ba2); }
.icon-rss { background: linear-gradient(135deg, #ff6b35, #f7931e); }

.center-spacer {
    grid-column: 2;
    pointer-events: none;
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 900px) {
    .desktop-container {
        flex-direction: column;
        gap: 15px;
    }
    .sidebar {
        flex-direction: row;
        width: auto;
        height: 70px;
        padding: 15px 20px;
    }
    .main-board {
        width: 95vw;
        height: auto;
        min-height: 500px;
        padding: 20px;
        grid-template-columns: 1fr;
    }
    .left-col, .right-col {
        grid-column: 1;
        align-items: center;
    }
    .greeting, .greeting-sub {
        text-align: center;
    }
    .header-right {
        justify-content: center;
    }
    .character-bg-inside {
        height: 60%;
        opacity: 0.5;
    }
    .lock-clock {
        font-size: 4rem;
    }
    .bottom-dock {
        bottom: 10px;
        padding: 10px 20px;
        gap: 12px;
    }
    .dock-icon {
        width: 42px;
        height: 42px;
        font-size: 1.2rem;
    }
}
