/* 全局样式和重置 */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    margin: 0;
    background-color: #f4f7f9;
    color: #333;
}

/* 导航栏 */
.navbar {
    display: flex;
    align-items: center;
    padding: 0 24px;
    background-color: #ffffff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    height: 60px;
    flex-wrap: nowrap;
    /* 禁止导航栏整体换行 */
}

.logo-container {
    display: flex;
    align-items: center;
    font-size: 20px;
    font-weight: bold;
    color: #2c3e50;
    white-space: nowrap;
    /* 禁止"老张云"文字自身换行 */
    flex-shrink: 0;
    /* 禁止logo容器收缩 */
}

.logo-container img {
    width: 32px;
    height: 32px;
    margin-right: 12px;
}

.nav-tabs {
    flex-grow: 1;
    /* 让tabs占据所有可用空间 */
    display: flex;
    /* 确保内部按钮水平排列 */
    justify-content: flex-start;
    /* 从左侧开始排列按钮 */
    margin: 0 16px;
    /* 调整左右边距 */
}

.nav-button {
    padding: 8px 16px;
    margin: 0 8px;
    border: none;
    background: none;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.3s ease;
    white-space: nowrap;
    flex-shrink: 0;
    /* 禁止按钮自身收缩 */
}

.nav-button.active {
    color: #3498db;
    border-bottom: 2px solid #3498db;
}

.settings-button {
    margin-left: auto;
    /* 保持在最右侧 */
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    flex-shrink: 0;
    /* 禁止设置按钮收缩 */
}

.settings-button img {
    width: 24px;
    height: 24px;
}

/* 主内容区 */
.main-content {
    padding: 24px;
    max-width: 1100px;
    margin: 0 auto;
}

/* 存储进度条 */
.storage-info {
    margin-bottom: 24px;
    background-color: #fff;
    padding: 16px;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    transition: opacity 0.3s, transform 0.3s, margin 0.3s, padding 0.3s;
    transform-origin: top;
}

.storage-info.hidden {
    opacity: 0;
    transform: scaleY(0);
    height: 0;
    margin-bottom: 0;
    padding-top: 0;
    padding-bottom: 0;
    overflow: hidden;
}

.storage-info label {
    font-size: 14px;
    color: #555;
}

.progress-bar {
    width: 100%;
    background-color: #e9ecef;
    border-radius: 4px;
    height: 10px;
    margin-top: 8px;
    overflow: hidden;
}

.progress-bar-inner {
    height: 100%;
    background-color: #3498db;
    border-radius: 4px;
    transition: width 0.4s ease;
}

/* 内容区域公共样式 */
.content-section {
    background-color: #ffffff;
    padding: 24px;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.section-header {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    margin-bottom: 20px;
}

.action-button {
    background-color: #3498db;
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 5px;
    cursor: pointer;
    margin-left: 10px;
    font-size: 14px;
    font-weight: bold;
    transition: background-color 0.2s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
}

.action-button:hover {
    background-color: #2980b9;
}

/* 文件列表 */
.file-item {
    display: flex;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #f0f0f0;
    gap: 16px;
}

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

.file-icon {
    flex-shrink: 0;
    width: 32px;
}

.file-info-container {
    flex: 1;
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 8px 16px;
    min-width: 0;
}

.file-name {
    font-size: 15px;
    word-break: break-all;
}

.file-size {
    font-size: 14px;
    color: #888;
    white-space: nowrap;
}

.file-actions {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.file-actions button,
.file-actions a {
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    margin-left: 10px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s;
}

.file-actions a:hover {
    background-color: #f0f0f0;
}

.file-actions img {
    width: 24px;
    height: 24px;
    vertical-align: middle;
}

/* 隐藏文本区 */
#text-section {
    display: none;
}

/* 文件上传进度Toast样式 */
.upload-toast {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 320px;
    background-color: #fff;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    padding: 16px;
    z-index: 1002;
    transform: translateX(120%);
    transition: transform 0.4s ease-in-out;
}

.upload-toast.show {
    transform: translateX(0);
}

.upload-header {
    font-weight: bold;
    font-size: 15px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 8px;
}

.upload-progress-bar {
    width: 100%;
    background-color: #e9ecef;
    border-radius: 4px;
    height: 8px;
    overflow: hidden;
}

.upload-progress-bar-inner {
    height: 100%;
    width: 0%;
    background-color: #27ae60;
    border-radius: 4px;
    transition: width 0.2s linear;
}

.upload-details {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: #555;
    margin-top: 8px;
}