:root {
    /* Default (Dark Mode) */
    --glass-bg: rgba(255, 255, 255, 0.1);
    --glass-border: rgba(255, 255, 255, 0.2);
    --glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.15);
    --text-color: #ffffff;
    --text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    --card-hover-bg: rgba(255, 255, 255, 0.2);
    --bg-overlay-start: rgba(0, 0, 0, 0.1);
    --bg-overlay-end: rgba(0, 0, 0, 0.6);
    --icon-color: #ffffff;
}

body.light-mode {
    /* Light Mode */
    --glass-bg: rgba(255, 255, 255, 0.65);
    --glass-border: rgba(255, 255, 255, 0.8);
    --glass-shadow: 0 8px 32px 0 rgba(100, 100, 100, 0.1);
    --text-color: #4a4a4a;
    --text-shadow: none;
    --card-hover-bg: rgba(255, 255, 255, 0.85);
    --bg-overlay-start: rgba(255, 255, 255, 0.2);
    --bg-overlay-end: rgba(255, 255, 255, 0.5);
    --icon-color: #4a4a4a;
}

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

body {
    font-family: 'Quicksand', 'Noto Sans SC', sans-serif;
    color: var(--text-color);
    min-height: 100vh;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: color 0.5s ease;
}

/* Background Layer */
.bg-layer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('https://vip.123pan.cn/1815727707/yk6baz03t0n000d7w33hdqlcz4xly40cDIYPAIUvAwUOAvxvAdrxAa==.png');
    background-size: cover;
    background-position: center;
    z-index: -2;
    transition: background-image 0.5s ease-in-out;
}

.bg-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, var(--bg-overlay-start) 0%, var(--bg-overlay-end) 100%);
    backdrop-filter: blur(2px);
    z-index: -1;
    pointer-events: none;
    transition: background 0.5s ease;
}

#particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
}

.particle {
    position: absolute;
    background: white;
    border-radius: 50%;
    opacity: 0.6;
    animation: float 10s infinite linear;
}

@keyframes float {
    0% {
        transform: translateY(0) translateX(0);
        opacity: 0;
    }

    10% {
        opacity: 0.8;
    }

    90% {
        opacity: 0.8;
    }

    100% {
        transform: translateY(-100vh) translateX(20px);
        opacity: 0;
    }
}

/* Container */
.container {
    width: 100%;
    max-width: 1200px;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
    flex: 1;
}

/* Glassmorphism Utility */
.glass {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-top: 1px solid rgba(255, 255, 255, 0.5);
    border-left: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 24px;
    box-shadow: var(--glass-shadow);
    position: relative;
    overflow: hidden;
    transition: background 0.5s ease, border 0.5s ease, box-shadow 0.5s ease;
}

/* Spotlight Effect */
.glass::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(500px circle at var(--mouse-x, 50%) var(--mouse-y, 50%), rgba(255, 255, 255, 0.4), transparent 40%);
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
    z-index: 1;
}

.glass:hover::after {
    opacity: 1;
}

.glass>* {
    position: relative;
    z-index: 2;
}

/* Time Section */
.time-card {
    padding: 2rem 4rem;
    text-align: center;
    margin-top: 4vh;
    min-width: 300px;
    transition: transform 0.3s ease;
}

.time-card:hover {
    transform: scale(1.02);
}

.clock {
    font-size: 5rem;
    font-weight: 700;
    letter-spacing: 2px;
    text-shadow: var(--text-shadow);
    line-height: 1.1;
}

.date {
    font-size: 1.5rem;
    margin-top: 0.5rem;
    opacity: 0.9;
    text-shadow: var(--text-shadow);
}

.greeting {
    font-size: 1.2rem;
    margin-top: 0.5rem;
    font-weight: 300;
    opacity: 0.8;
}

/* Search Section */
.search-section {
    width: 100%;
    max-width: 600px;
}

.search-box {
    display: flex;
    align-items: center;
    padding: 0.8rem 1.5rem;
    border-radius: 50px;
    transition: background 0.3s ease, box-shadow 0.3s ease;
}

.search-box:focus-within {
    background: rgba(255, 255, 255, 0.25);
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.25);
}

.search-icon {
    font-size: 1.2rem;
    margin-right: 1rem;
    opacity: 0.8;
    color: var(--icon-color);
}

#search-input {
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-color);
    font-size: 1.1rem;
    width: 100%;
    font-family: inherit;
}

#search-input::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

/* Profile Section */
.profile-section {
    width: 100%;
    max-width: 800px;
    margin-bottom: 0.5rem;
}

.profile-card {
    padding: 1.5rem 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.profile-content {
    display: flex;
    align-items: center;
    gap: 2rem;
    width: 100%;
}

.avatar-wrapper {
    position: relative;
    flex-shrink: 0;
}

.avatar {
    width: 85px;
    height: 85px;
    border-radius: 50%;
    border: 3px solid rgba(255, 255, 255, 0.6);
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.avatar:hover {
    transform: rotate(15deg) scale(1.1);
}

.status-indicator {
    position: absolute;
    bottom: 5px;
    right: 5px;
    width: 18px;
    height: 18px;
    background-color: #4ade80;
    border: 3px solid rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.profile-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.profile-name {
    font-size: 1.6rem;
    font-weight: 700;
    margin: 0;
    text-shadow: var(--text-shadow);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.profile-bio {
    font-size: 1rem;
    opacity: 0.9;
    font-weight: 500;
    line-height: 1.4;
}

.blog-btn {
    background: var(--glass-bg);
    padding: 0.8rem 1.8rem;
    border-radius: 50px;
    text-decoration: none;
    color: var(--text-color);
    font-weight: 600;
    border: 1px solid var(--glass-border);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    white-space: nowrap;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.blog-btn:hover {
    background: var(--card-hover-bg);
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.blog-btn i {
    font-size: 1.1rem;
}

/* Navigation Grid */
.nav-grid {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 1rem;
    align-items: start;
}

.glass-panel {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 32px;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
}

.category-title {
    font-size: 1.2rem;
    font-weight: 500;
    padding-left: 0.5rem;
    text-shadow: var(--text-shadow);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.links-wrapper {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    gap: 1.5rem;
}

.link-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1.5rem 1rem;
    text-decoration: none;
    color: var(--text-color);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    border-radius: 16px;
}

.link-card i {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    transition: transform 0.3s ease;
    color: var(--icon-color);
}

.link-card span {
    font-size: 0.9rem;
    font-weight: 500;
}

.link-card:hover {
    background: var(--card-hover-bg);
    transform: translateY(-5px);
    box-shadow: 0 12px 40px 0 rgba(31, 38, 135, 0.25);
}

.link-card:hover i {
    transform: scale(1.1);
}

/* Footer */
.footer {
    margin-top: auto;
    padding: 1rem 2rem;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    border-radius: 50px;
}

.footer p {
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.footer-separator {
    opacity: 0.5;
    margin: 0 0.3rem;
}

.footer-link {
    color: var(--text-color);
    text-decoration: none;
    transition: opacity 0.3s ease;
    font-family: 'Noto Sans SC', 'Microsoft YaHei', 'PingFang SC', 'Hiragino Sans GB', sans-serif;
    font-weight: 500;
}

.footer-link:hover {
    opacity: 0.7;
    text-decoration: underline;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    opacity: 0;
    animation: fadeInUp 0.8s ease-out forwards;
}

/* Theme Toggle Button */
.theme-toggle {
    position: fixed;
    top: 2rem;
    right: 2rem;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 100;
    transition: all 0.3s ease;
    box-shadow: var(--glass-shadow);
    color: var(--text-color);
    font-size: 1.5rem;
}

.theme-toggle:hover {
    transform: rotate(15deg) scale(1.1);
    background: var(--card-hover-bg);
}

/* Responsive */
@media (max-width: 768px) {
    .clock {
        font-size: 3.5rem;
    }

    .container {
        padding: 1rem;
    }

    .profile-content {
        flex-direction: column;
        text-align: center;
        gap: 1.5rem;
    }

    .profile-info {
        align-items: center;
    }

    .blog-btn {
        width: 100%;
        justify-content: center;
    }
}