/* 定义全局变量 */
:root {
    --primary-color: #4a90e2;  /* 主要颜色，用于按钮和重点元素 */
    --secondary-color: #61dafb;  /* 次要颜色，用于强调和悬停效果 */
    --background-color: #1e1e1e;  /* 页面背景色 */
    --text-color: #d4d4d4;  /* 主要文本颜色 */
    --border-color: #333333;  /* 边框颜色 */
    --header-height: 60px;  /* 头部高度 */
    --editor-bg: #1e1e1e;  /* 编辑器背景色 */
    --hint-bg: #252526;  /* 提示框背景色 */
    --button-hover: #2980b9;  /* 按钮悬停颜色 */
}

/* 全局样式 */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    background-color: var(--background-color);
    color: var(--text-color);
}

/* 主容器样式 */
#app {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* 头部样式 */
header {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    height: var(--header-height);
    padding: 0 20px;
    background-color: var(--hint-bg);
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
}

/* 头部按钮容器 */
.header-buttons {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* 标题样式 */
h1 {
    color: var(--primary-color);
    font-size: 24px;
    font-weight: 600;
    margin-right: auto;
}

/* 主内容区域样式 */
.content {
    margin-top: calc(var(--header-height) + 20px);
}

/* 工作原理提示容器 */
#workflowHintContainer {
    background-color: var(--hint-bg);
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
    margin-bottom: 10px;
    overflow: hidden;
    position: relative;
}

/* 工作原理提示头部 */
.hint-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;  /* 减小上下内边距 */
    background-color: var(--primary-color);
    color: #fff;
}

/* 工作原理提示标题 */
.hint-header h2 {
    margin: 0;
    font-size: 16px;  /* 稍微减小字体大小 */
    font-weight: 500;
    text-align: left;
}

/* 工作原理提示内容 */
#workflowHint {
    padding: 20px;
    max-height: 1000px;
    transition: max-height 0.3s ease-out, opacity 0.3s ease-out, padding 0.3s ease-out;
    opacity: 1;
    overflow: hidden;
}

/* 工作原理提示折叠状态 */
#workflowHint.collapsed {
    max-height: 0;
    opacity: 0;
    padding-top: 0;
    padding-bottom: 0;
}

/* 操作按钮容器 */
.action-buttons {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap; /* 允许按钮换行 */
}

/* 操作按钮和图标按钮通用样式 */
.action-button, .icon-button {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px 15px;
    background-color: var(--primary-color);
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s ease;
}

/* 按钮悬停效果 */
.action-button:hover, .icon-button:hover {
    background-color: var(--button-hover);
}

/* 按钮内图标样式 */
.action-button iconify-icon, .icon-button iconify-icon {
    margin-right: 6px;
    font-size: 18px;
}

/* 文件名输入容器 */
.file-input-container {
    display: flex;
    align-items: center;
    background-color: var(--hint-bg);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    overflow: hidden;
    flex-grow: 1; /* 允许容器占据剩余空间 */
    max-width: 300px; /* 设置最大宽度，根据需要调整 */
}

/* 文件名输入框 */
#fileNameInput {
    padding: 8px 12px;
    border: none;
    font-size: 14px;
    flex-grow: 1; /* 允许输入框占据剩余空间 */
    background-color: var(--hint-bg);
    color: var(--text-color);
}

/* 文件名输入框占位符样式 */
#fileNameInput::placeholder {
    color: #666;
}

/* 折叠/展开按钮 */
.toggle-button {
    background: none;
    border: none;
    color: #fff;
    cursor: pointer;
    padding: 2px;  /* 减小按钮内边距 */
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
}

/* 折叠/展开按钮图标 */
.toggle-button iconify-icon {
    font-size: 20px;  /* 稍微减小图标大小 */
    transition: transform 0.3s ease;
}

/* 折叠状态下的按钮图标 */
.toggle-button.collapsed iconify-icon {
    transform: rotate(180deg);
}

/* 编辑器容器 */
#editor-container {
    margin-top: 20px;
    background-color: var(--editor-bg);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

/* Editor.md 样式覆盖 */
.editormd {
    border: none !important;
}

/* 响应式设计 */
@media (max-width: 768px) {
    #app {
        padding: 10px;
    }

    .action-buttons {
        flex-direction: column;
        gap: 10px;
    }

    .file-input-container {
        width: 100%;
    }

    #fileNameInput {
        width: 100%;
    }
}

/* 主内容区域样式 */
.main-content {
    margin-top: calc(var(--header-height) + 20px);
    padding-top: 20px;
}

/* 导航栏样式 */
nav {
    margin-left: 20px;
}

nav ul {
    list-style-type: none;
    padding: 0;
    margin: 0;
    display: flex;
}

nav ul li {
    margin-right: 20px;
}

nav ul li a {
    color: var(--text-color);
    text-decoration: none;
    font-size: 16px;
    transition: color 0.3s ease;
}

nav ul li a:hover {
    color: var(--secondary-color);
}

/* 授权页面样式 */
#authPage {
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
    background-color: var(--hint-bg);
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

#authPage h2 {
    color: var(--primary-color);
    margin-bottom: 20px;
}

.auth-steps {
    margin-bottom: 30px;
}

.auth-steps ol {
    padding-left: 20px;
}

.auth-steps li {
    margin-bottom: 10px;
}

#authorizeButton {
    width: 100%;
    padding: 12px;
    font-size: 16px;
}

/* 隐藏类 */
.hidden {
    display: none;
}

/* 响应式设计调整 */
@media (max-width: 768px) {
    header {
        flex-direction: column;
        height: auto;
        padding: 10px;
    }

    nav {
        margin-left: 0;
        margin-top: 10px;
    }

    nav ul {
        flex-direction: column;
        align-items: center;
    }

    nav ul li {
        margin-right: 0;
        margin-bottom: 10px;
    }
}

/* 编辑器容器的滑入滑出动画 */
#editor-container {
    transition: max-height 0.3s ease-out, opacity 0.3s ease-out;
    max-height: 0;
    opacity: 0;
    overflow: hidden;
}

#editor-container.slide-in {
    max-height: 1000px; /* 根据需要调整这个值 */
    opacity: 1;
}

/* 在现有的 CSS 代码中修改或添加以下样式 */

/* 响应式设计调整 */
@media (max-width: 768px) {
    .action-buttons {
        flex-direction: column;
        align-items: stretch;
    }

    .file-input-container {
        max-width: none; /* 在小屏幕上取消最大宽度限制 */
    }
}

#userInfo {
    display: flex;
    align-items: center;
    gap: 10px;
}

#userAvatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
}

#logoutButton {
    padding: 5px 10px;
    font-size: 12px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

#logoutButton:hover {
    background-color: var(--button-hover);
}


