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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 100%;
    margin: 0 auto;
    padding: 15px;
    padding-bottom: 70px; /* 为固定在底部的按钮留出空间 */
}

.header {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 15px;
    padding: 10px 0;
    border-bottom: 1px solid #ddd;
}

/* 编辑和保存按钮样式 */
.edit-btn {
    background-color: #FF9800; /* 橙色 */
    color: white;
    border: none;
    padding: 12px 20px; /* 稍大一些的内边距 */
    text-align: center;
    text-decoration: none;
    display: inline-block;
    font-size: 16px;
    margin: 4px 8px;
    cursor: pointer;
    border-radius: 4px;
    transition: background-color 0.3s;
    font-weight: 500;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1); /* 添加阴影效果 */
}

.edit-btn:hover {
    background-color: #F57C00; /* 深橙色 */
}

/* 保留旧的按钮样式以兼容性 */
.btn {
    background-color: #FF9800; /* 与edit-btn保持一致 */
    color: white;
    border: none;
    padding: 12px 20px;
    text-align: center;
    text-decoration: none;
    display: inline-block;
    font-size: 16px;
    margin: 4px 8px;
    cursor: pointer;
    border-radius: 4px;
    transition: background-color 0.3s;
    font-weight: 500;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.btn:hover {
    background-color: #F57C00;
}

.content-area {
    background-color: white;
    padding: 15px;
    border-radius: 5px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    min-height: 300px;
}

#editMode {
    width: 100%;
    height: 300px;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    line-height: 1.6;
    resize: vertical;
}

#viewMode {
    width: 100%;
    min-height: 300px;
}

.content-line {
    display: flex;
    align-items: center;
    padding: 8px 0; /* 增加上下内边距，使行高更大 */
    border-bottom: 1px solid #eee;
    justify-content: space-between; /* 内容靠左，按钮靠右 */
}

.copy-btn {
    color: white;
    border: none;
    padding: 8px 15px; /* 增加内边距使按钮更大 */
    margin-left: 15px; /* 增加左边距 */
    border-radius: 4px; /* 稍微增大圆角 */
    cursor: pointer;
    font-size: 16px; /* 增大字体 */
    transition: background-color 0.3s;
    flex-shrink: 0; /* 防止按钮被压缩 */
    font-weight: 500; /* 稍微加粗字体 */
}

/* 绿色复制按钮 */
.copy-btn-green {
    background-color: #FF0000;
}

.copy-btn-green:hover {
    background-color: #CC0000;
}

/* 蓝色复制按钮 */
.copy-btn-blue {
    background-color: #2196F3;
}

.copy-btn-blue:hover {
    background-color: #0b7dda;
}

.line-content {
    flex-grow: 1;
}

.heading-line {
    font-weight: bold;
    font-size: 1.5em;
    color: #333;
    padding: 10px 0;
}

/* 复制成功提示 */
.copy-toast {
    position: fixed;
    top: 20px; /* 改为顶部显示 */
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 12px 24px;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 500;
    opacity: 0;
    transition: opacity 0.3s;
    z-index: 1000; /* 确保在最顶层 */
    box-shadow: 0 2px 10px rgba(0,0,0,0.2); /* 添加阴影效果 */
}

.copy-toast.show {
    opacity: 1;
}

/* 底部按钮区域样式 */
.footer {
    display: flex;
    justify-content: center;
    padding: 15px 0;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: #fff;
    box-shadow: 0 -2px 5px rgba(0,0,0,0.1);
    z-index: 100;
}

/* 编辑模式文本框样式 */
#editMode {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: calc(100vh - 60px); /* 只减去footer的高度 */
    margin: 0;
    padding: 15px;
    box-sizing: border-box;
    border: none;
    font-size: 16px;
    line-height: 1.5;
    resize: none;
    z-index: 50; /* 确保在其他内容之上，但在footer之下 */
    background-color: white;
}

/* 编辑模式下调整container的样式 */
.container {
    max-width: 100%;
    margin: 0 auto;
    padding: 15px;
    padding-bottom: 70px;
}