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

body {
    font-family: 'Noto Sans SC', sans-serif;
    height: 100vh;
    color: #e8e8e8;
    position: relative;
    padding-bottom: 60px; /* 为页脚留出空间 */
    overflow-x: hidden;
}

/* 幻灯片背景 */
.slideshow-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0;
    transition: opacity 1s ease;
}

.slide.active { opacity: 1; }

/* 背景遮罩 */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(26, 26, 46, 0.25);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    z-index: -1;
}

.container {
    display: flex;
    min-height: 100vh;
}

/* 侧边栏 */
.sidebar {
    width: 280px;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    padding: 30px 20px;
    display: flex;
    flex-direction: column;
    gap: 24px;
    border-right: 1px solid rgba(255, 255, 255, 0.08);
    flex-shrink: 0;
    color: #fff;
}

.sidebar a {
    color: #fff;
}

.sidebar-section {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 20px;
    transition: transform 0.3s ease;
}

.sidebar-section:hover {
    transform: translateY(-2px);
}

.sidebar-section h3 {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: #888;
    margin-bottom: 12px;
}

/* 时间显示 */
.time-display { text-align: center; }

.time-main {
    font-size: 42px;
    font-weight: 300;
    color: #fff;
    letter-spacing: 2px;
}

.time-date {
    font-size: 14px;
    color: #888;
    margin-top: 8px;
}

/* 天气 */
.weather-display { text-align: center; }

.weather-icon {
    font-size: 48px;
    margin-bottom: 8px;
}

.weather-temp {
    font-size: 32px;
    font-weight: 500;
    color: #fff;
}

.weather-desc {
    font-size: 14px;
    color: #888;
    margin-top: 4px;
}

.weather-location {
    font-size: 12px;
    color: #666;
    margin-top: 8px;
}

/* 服务器状态 */
.status-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

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

.status-label {
    font-size: 13px;
    color: #aaa;
}

.status-value {
    font-size: 13px;
    font-weight: 500;
}

.status-value.online { color: #4ade80; }
.status-value.offline { color: #f87171; }
.status-value.warning { color: #fbbf24; }

/* 主内容区 */
.main-content {
    flex: 1;
    padding: 40px 40px 40px 0;
    overflow-y: auto;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    position: relative;
    -webkit-overflow-scrolling: touch;
    height: calc(100vh - 60px);
}

/* 主界面 */
#homeView {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: calc(100vh - 60px);
    position: absolute;
    top: 0;
    left: 100px;
    right: 0;
    padding: 40px 40px 20px 0;
    opacity: 1;
    visibility: visible;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

#homeView.fade-out {
    opacity: 0;
    visibility: hidden;
}

/* 个人简介卡片 */
.profile-card {
    background: transparent;
    padding: 0;
    border: none;
    display: flex;
    flex-direction: column;
    max-width: 600px;
    max-height: 80%;
    margin: 0 auto 0 0;
    font-size: 1.1em;
    overflow: hidden;
}

.profile-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid rgba(255, 255, 255, 0.2);
}

.avatar {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.4);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.profile-info h2 {
    font-size: 2.5rem;
    color: white;
    margin-bottom: 5px;
}

.tagline {
    color: rgba(255, 255, 255, 0.85);
    font-size: 1.5rem;
}

.profile-content p {
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.6;
    margin-bottom: 12px;
    font-size: 1.1rem;
}

/* 社交图标卡片 */
.social-card {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    width: calc(100vw - 420px);
    margin: 0;
    padding: 0;
    min-height: 60px;
}

.social-links {
    display: flex;
    gap: 20px;
    margin-top: 0;
    padding: 0;
    list-style: none;
}

.social-link {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 1.2rem;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

.social-link:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.2);
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.4);
}

/* 底部区域 */
.bottom-section {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    gap: 10px;
    margin-top: auto;
}

/* 移动端底部区域 */
@media (max-width: 768px) {
    .bottom-section {
        margin-top: 0;
    }
}

/* 语录卡片 */
.quote-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 20px 30px;
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    position: relative;
    min-height: 80px;
    width: calc(100vw - 420px);
    margin: 0;
    gap: 15px;
}

.quote-icon {
    position: relative;
    top: auto;
    left: auto;
    font-size: 1.5rem;
    color: rgba(255, 255, 255, 0.3);
    flex-shrink: 0;
}

.quote-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    flex: 0 1 auto;
    min-width: 0;
}

.quote-text {
    font-size: 1rem;
    line-height: 1.6;
    color: white;
    margin-bottom: 8px;
    font-style: italic;
    text-align: center;
}

.quote-author {
    text-align: center;
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.9rem;
    white-space: nowrap;
    width: 100%;
}

/* ICP备案 - 主视图底部 */
.home-view .icp-footer {
    text-align: center;
    margin-top: 20px;
}

.home-view .icp-footer a {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.4);
    text-decoration: none;
    transition: color 0.3s ease;
}

.home-view .icp-footer a:hover {
    color: rgba(255, 255, 255, 0.7);
}

/* 导航界面 - 二级界面 */
#navView {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 0;
    left: 100px;
    right: 0;
    bottom: 0;
    padding: 60px 40px 60px 0;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s ease, visibility 0.5s ease;
    overflow-y: auto;
}

#navView.active {
    opacity: 1;
    visibility: visible;
}

#navView.fade-out {
    opacity: 0;
    visibility: hidden;
}

.header {
    margin-bottom: 40px;
}

.header h1 {
    font-size: 28px;
    font-weight: 300;
    color: #fff;
    letter-spacing: 2px;
}

.header p {
    font-size: 14px;
    color: #666;
    margin-top: 8px;
}

/* 卡片网格 */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 20px;
}

.nav-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 24px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    display: block;
    position: relative;
    overflow: hidden;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

.nav-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, transparent 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.nav-card:hover::before { opacity: 1; }

.nav-card:hover {
    transform: translateY(-4px);
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
}

.nav-card:active {
    transform: translateY(2px) scale(0.98);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.nav-card .icon {
    font-size: 36px;
    margin-bottom: 12px;
    display: block;
}

.nav-card .title {
    font-size: 14px;
    color: #e8e8e8;
    font-weight: 500;
}

.nav-card .desc {
    font-size: 12px;
    color: #666;
    margin-top: 6px;
}

/* 分类标题 */
.category-title {
    font-size: 13px;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin: 32px 0 16px 0;
}

.category-title:first-of-type { margin-top: 0; }

/* 切换按钮 */
.toggle-btn {
    position: fixed;
    right: 30px;
    top: 50%;
    transform: translateY(-50%);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    z-index: 100;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

.toggle-btn:hover {
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 8px 30px rgba(102, 126, 234, 0.5);
}

.toggle-btn.active {
    background: rgba(255, 255, 255, 0.9);
    color: #667eea;
}

/* 平板设备 */
@media (max-width: 1024px) and (min-width: 769px) {
    #homeView {
        height: auto;
        min-height: 100%;
        justify-content: flex-start;
        gap: 30px;
        padding-bottom: 40px;
    }

    .profile-card {
        width: 100%;
        max-width: 100%;
    }
}

/* 响应式 */
@media (max-width: 1024px) {
    .content-box {
        max-width: 700px;
        height: 60vh;
    }
    .time-display-main .time { font-size: 2.8rem; }
}

@media (max-width: 768px) {
    body {
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    .container { flex-direction: column; }
    .sidebar {
        width: 100%;
        flex-direction: row;
        flex-wrap: wrap;
        padding: 20px;
    }
    .sidebar-section {
        flex: 1;
        min-width: 140px;
    }

    /* 移动端主内容区 */
    .main-content {
        padding: 20px;
        width: 100%;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    /* 移动端主界面和导航界面调整 */
    #homeView {
        position: relative;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        padding: 0;
        height: auto;
        min-height: auto;
        justify-content: flex-start;
        gap: 20px;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    #navView {
        position: relative;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        padding: 0;
        height: auto;
        min-height: 100vh;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    .profile-card {
        width: 100%;
    }

    /* 移动端语录和社交卡片宽度 */
    .quote-card,
    .social-card {
        width: 100% !important;
        margin: 0;
        padding: 0 20px;
        box-sizing: border-box;
    }

    /* 移动端底部区域 */
    .bottom-section {
        padding: 0 20px;
    }

    .card-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    }
    .time-display-main .time { font-size: 2.2rem; }
    .time-display-main .date { font-size: 1rem; }
    .temp-value { font-size: 1.8rem; }
    .quote-text { font-size: 1rem; }
    .profile-info h2 { font-size: 1.2rem; }
    .avatar { width: 55px; height: 55px; font-size: 1.5rem; }

    /* 社交图标调整 */
    .social-links {
        gap: 12px;
    }
    .social-link {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
}

/* 页脚 */
.page-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    text-align: center;
    padding: 15px 20px;
    background: rgba(26, 26, 46, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    z-index: 10;
}

.page-footer a {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.5);
    text-decoration: none;
    transition: color 0.3s ease;
}

.page-footer a:hover {
    color: rgba(255, 255, 255, 0.8);
}

/* 更小屏幕优化 */
@media (max-width: 480px) {
    body {
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    .sidebar-section {
        min-width: 100%;
    }

    #homeView,
    #navView {
        padding: 15px;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    .profile-header {
        gap: 10px;
    }

    .avatar {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }

    .profile-info h2 {
        font-size: 1rem;
    }

    .tagline {
        font-size: 0.9rem;
    }

    .profile-content p {
        font-size: 0.9rem;
    }

    .social-links {
        margin-top: 20px;
        gap: 10px;
    }

    .social-link {
        width: 36px;
        height: 36px;
        font-size: 0.9rem;
    }

    .quote-card {
        padding: 15px 20px;
    }

    .quote-icon {
        font-size: 1.2rem;
    }

    .quote-text {
        font-size: 0.9rem;
    }

    .quote-author {
        font-size: 0.8rem;
    }

    .card-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 12px;
    }

    .nav-card {
        padding: 20px 15px;
    }

    .nav-card .icon {
        font-size: 28px;
    }

    .nav-card .title {
        font-size: 13px;
    }

    .nav-card .desc {
        font-size: 11px;
    }

    .header h1 {
        font-size: 22px;
    }

    .header p {
        font-size: 12px;
    }

    .page-footer a {
        font-size: 0.7rem;
    }

    .page-footer {
        padding: 10px 15px;
    }
}

/* 中等屏幕优化 */
@media (max-width: 600px) and (min-width: 481px) {
    body {
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    .sidebar-section {
        min-width: 120px;
    }

    #homeView,
    #navView {
        padding: 20px 30px 20px 0;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    .profile-header {
        gap: 12px;
    }

    .avatar {
        width: 60px;
        height: 60px;
        font-size: 1.3rem;
    }

    .profile-info h2 {
        font-size: 1.1rem;
    }

    .social-links {
        gap: 12px;
    }

    .social-link {
        width: 42px;
        height: 42px;
    }

    .quote-card {
        padding: 18px 25px;
    }

    .card-grid {
        grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
        gap: 15px;
    }

    .nav-card {
        padding: 22px 18px;
    }

    .nav-card .icon {
        font-size: 30px;
    }
}
