
:root {
    --bg-color: #111;
    --text-color: #fff;
    --particle-dark: #333;
    --particle-light: #ccc;
}

[data-theme="day"] {
    --bg-color: #f0f0f0;
    --text-color: #333;
    --particle-dark: #666;
    --particle-light: #888;
}

/* 在日间主题下添加图片反色效果 */
[data-theme="day"] .sidebar-image {
    filter: invert(1);
    opacity: 0.8;
    transition: filter 0.3s ease;
}

[data-theme="day"] .brand-logo {
    filter: invert(1); /* 日间主题反色 */
}

body {
    margin: 0;
    font-family: 'Arial', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    transition: background 0.3s ease;
}

/* 导航栏样式 */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 12px 20px; /* 减少左右内边距 */
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1002;
    background: var(--bg-color);
    box-sizing: border-box;
    transition: transform 0.3s ease;
    gap: 10px; /* 添加元素间隙 */
}

/* 左侧部分样式 */
.left-section {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

/* 中间的标题样式 */
.nav-title {
    flex-grow: 1; /* 让标题占满剩余空间 */
    text-align: center; 
    margin-right: 12%; 
}

.brand {
    font-size: clamp(1.1rem, 3vw, 1.8rem);
    white-space: nowrap;
    font-weight: bold;
    cursor: pointer;
    text-decoration: none;
    color: var(--text-color);
    transition: opacity 0.3s;
}

.brand:hover {
    opacity: 0.8;
}

.brand-logo {
    height: 45px; /* 电脑端默认大小 */
    width: auto;
    max-width: 80px; 
    object-fit: contain; 
    display: block;
}

.brand2 {
    font-size: 1.0em;
    font-weight: bold;
    cursor: pointer;
    text-decoration: none;
    color: var(--text-color);
    transition: opacity 0.3s;
}

.brand2:hover {
    opacity: 0.8;
}

/* 上传区域样式 */
.upload-container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 600px;
    height: 300px;
    border: 2px dashed var(--text-color);
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: border-color 0.3s;
}

.upload-container:hover {
    border-color: var(--particle-light);
}

.upload-icon {
    font-size: 3em;
    margin-bottom: 20px;
}

/* 容器样式 */
.contact-btn-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    display: flex;
    gap: 10px;
    z-index: 1000;
}

/* 每个按钮样式 */
.contact-btn {
    background: rgba(255, 255, 255, 0.1);
    padding: 10px 15px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 鼠标悬停效果 */
.contact-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

/* 新增主题按钮样式 */
#themeToggle {
    background: none;
    border: none;
    font-size: 1.5em;
    cursor: pointer;
    padding: 5px;
    margin-right: -5px;
    color: var(--text-color);
}

/* 新增上传反馈样式 */
.upload-loading {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 15px 30px;
    border-radius: 25px;
    display: none;
}

/* 新增进度条样式 */
#progressBar {
    position: fixed;
    top: 60%;
    left: 50%;
    transform: translateX(-50%);
    width: 200px;
    height: 3px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
    display: none;
}

#progressFill {
    height: 100%;
    background: #00ff88;
    width: 0%;
    transition: width 0.3s ease;
}

/* 侧边栏样式 */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 240px;
    height: 100%;
    background-color: var(--bg-color);
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.2);
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    z-index: 1001;
}

/* 当侧边栏展开时调整导航栏位置 */
.sidebar:not(.collapsed)+.nav {
    padding-left: 240px;
}
.sidebar:not(.collapsed)~.nav {
    transform: translateX(240px);
}

.sidebar.collapsed {
    transform: translateX(-100%);
}

.sidebar:not(.collapsed) {
    transform: translateX(0);
}

.sidebar-header {
    padding: 15px;
    background-color: var(--bg-color);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sidebar-header h3 {
    color: var(--text-color);
    margin: 0;
}

.sidebar-content {
    padding: 15px;
    overflow-y: auto;
    height: calc(100vh - 70px);
}

.image-list {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: 10px;
    padding-bottom: 20px;
}

.image-item {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
    padding: 8px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    transition: background 0.2s;
}

.image-item:hover {
    background: rgba(255, 255, 255, 0.1);
}

.sidebar-image {
    width: auto;
    height: 130px;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.2s;
}

.image-name {
    flex: 1;
    color: var(--text-color);
}

.sidebar-image:hover {
    transform: scale(1.05);
}

.sidebar-toggle-btn {
    background: none;
    border: none;
    font-size: 1.2em;
    cursor: pointer;
    color: var(--text-color);
    margin-right: 15px;
    font-size: 1.5em;
}

/*邮箱 */
.email-address {
    display: none;
}
@media (max-width: 768px) {
    /* 移动端屏幕宽度小于768px时的样式 */

    /* 导航栏样式 */
    .nav {
        padding: 10px 15px;
        justify-content: flex-start;
        min-height: 56px;
    }

   
    .nav-title {
        text-align: left; /* 左对齐标题 */
        margin-left: 10px;
        flex-grow: 0; /* 取消自动扩展 */
    }

    #themeToggle {
        margin-left: auto; /* 主题按钮靠右 */
    }

    .sidebar {
        width: 40vw; /* 改为视口宽度比例 */
        max-width: 250px; /* 最大宽度限制 */
    }

    .sidebar-image {
        height: 90px !important; /* 缩小图片高度 */
        object-fit: contain; /* 保持图片比例 */
    }

    .image-item {
        flex-direction: column; /* 改为垂直布局 */
        align-items: flex-start;
        padding: 6px;
    }

    .image-name {
        font-size: 0.9em; /* 缩小文字 */
        margin-top: 5px;
    }

    /* 取消导航栏位移 */
    .sidebar:not(.collapsed)+.nav {
        padding-left: 0;
    }
    .sidebar:not(.collapsed)~.nav {
        transform: none;
    }

    .sidebar-toggle-btn {
        margin-right: 10px;
        font-size: 1.3em;
    }


    /* 上传区域的宽度 */
    .upload-container {
        width: 80%;
        height: 40%;
    }

    /* 字体大小 */
    p {
        font-size: 0.8em;
    }

    /* 按钮大小 */
    .contact-btn {
        justify-content: flex-end;
        padding: 0.5px 8px;
        gap: 5px; 
        margin-right: -5px; 
    }

    #reuploadBtn {
        position: fixed;
        right: 0px; 
    }
    .brand-logo {
        height: 35px; /* 移动端稍小 */
        max-width: 60px; 
    }
    .brand {
        gap: 4px; /* 缩小间距 */

    }
    .subtitle {
        font-size: 0.6em; /* 主标题字号的60% */
        opacity: 0.8;     /* 降低对比度 */
        margin-top: 2px;  /* 微调间距 */
        white-space: nowrap;
    }

    /* 隐藏电脑端标题 */
    .desktop-title {
        display: none;
    }

}
@media (min-width: 769px) {
    .subtitle {
        display: none; /* 保持原有副标题隐藏 */
    }
}