@charset "UTF-8";
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@100..900&display=swap');
body {
    font-family: "Noto Sans SC";
    margin: 0;
    padding: 0;
    /* background-color: #ECEFF7; */
    --grid-color: #555555;
    --grid-size: 2em;
    --animation-duration: 100s;
    
    background-image: 
        linear-gradient(var(--grid-color) 1px, transparent 1px),
        linear-gradient(to right, var(--grid-color) 1px, #4e4e4e 1px);
    background-size: var(--grid-size) var(--grid-size);
    animation: moveBackground var(--animation-duration) linear infinite;
    color: #ffffff;
}
@keyframes moveBackground {
    0% {
        background-position: 0 0;
    }
    100% {
        background-position: 300% 300%;
    }
}

html, body {
    height: 100%; /* 设置高度为 100% */
    margin: 0; /* 清除默认边距 */
    display: flex; /* 使用 flexbox 布局 */
    justify-content: center; /* 水平居中 */
    align-items: center; /* 垂直居中 */
    flex-direction: column; /* 内容垂直排列 */
}

.account-area {
    border: 1px solid #ddd; /* 边框颜色 */
    padding: 1em; /* 内边距 */
    margin-top: 2em; /* 上外边距 */
    border-radius: 5px; /* 圆角 */
    width: 100%; /* 宽度占满父容器 */
    max-width: 400px; /* 最大宽度限制 */
}

.input-group button {
    flex: 1; /* 输入框占满剩余空间 */
    margin-left: 1em; /* 右侧间距 */
}

#misc button{
    margin: 0.3em;
}

.tips {
    display: block; /* 使 span 元素独占一行 */
    font-style: italic; /* 斜体 */
    font-size: 0.8em; /* 缩小字体 */
    color: #999; /* 淡灰色 */
}

.mode-toggle {
    position: fixed;
    bottom: 1em;
    right: 1em;
    width: 3em;
    height: 3em;
    border-radius: 50%;
    background-color: #333;
    color: #fff;
    border: none;
    cursor: pointer;
    box-shadow: 0 0.2em 0.5em rgba(0, 0, 0, 0.3);
    transition: background-color 0.3s ease, transform 0.3s ease;
    z-index: 9999;
}

.mode-toggle:hover {
    background-color: #444;
    transform: scale(1.1);
}

a {
    color: #fff;
    text-shadow: 0 0 0.5em #ffffff;
    text-decoration: none;
    position: relative;
    display: inline-block;
}

a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: #fff;
    transition: width 0.3s ease;
}
a:hover::after {
    width: 100%;
}

/* Cookie转换区域样式 */
.cookie-convert-area {
    border: 1px solid #ddd; /* 边框颜色 */
    padding: 1em; /* 内边距 */
    margin-top: 2em; /* 上外边距 */
    border-radius: 5px; /* 圆角 */
    width: 100%; /* 宽度占满父容器 */
    max-width: 400px; /* 最大宽度限制 */
}

.cookie-convert-area h3 {
    margin-top: 0;
    margin-bottom: 1em;
    text-align: center;
    color: #fff;
}

.cookie-convert-area textarea {
    width: 100%;
    padding: 0.5em;
    border-radius: 5px;
    border: 1px solid #ddd;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    resize: vertical;
    font-family: inherit;
}

.cookie-convert-area textarea:focus {
    outline: none;
    border-color: #3498db;
}

.cookie-convert-area .input-group {
    display: flex;
    margin-bottom: 1em;
    align-items: flex-start;
}

.cookie-convert-area .input-group textarea {
    flex: 1;
    margin-right: 1em;
}

.cookie-convert-area .input-group button {
    flex-shrink: 0;
}

/* 选项卡容器样式 */
.tab-container {
    border: 1px solid #ddd; /* 边框颜色 */
    padding: 1em; /* 内边距 */
    margin-top: 2em; /* 上外边距 */
    border-radius: 5px; /* 圆角 */
    width: 100%; /* 宽度占满父容器 */
    max-width: 400px; /* 最大宽度限制 */
}

/* 选项卡按钮样式 */
.tab-buttons {
    display: flex;
    margin-bottom: 1em;
    border-bottom: 1px solid #ddd;
}

.tab-btn {
    flex: 1;
    padding: 0.5em 1em;
    background: none;
    border: none;
    color: #fff;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.3s ease;
}

.tab-btn.active {
    border-bottom-color: #3498db;
    background: rgba(52, 152, 219, 0.1);
}

.tab-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* 选项卡内容样式 */
.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* Cookie转换区域样式 */
#convert-tab textarea {
    width: 100%;
    padding: 0.4em;
    border-radius: 5px;
    border: 1px solid #ddd;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    resize: vertical;
    font-family: inherit;
    margin-bottom: 0.7em;
}

#convert-tab textarea:focus {
    outline: none;
    border-color: #3498db;
}

#convert-tab .input-group {
    display: flex;
    margin-bottom: 0.7em;
}

#convert-tab .input-group input {
    width: 100%;
}

/* 转换提交按钮样式 */
.convert-submit-btn {
    width: 100%;
    margin-bottom: 0.7em;
    padding: 0.6em 1em;
}

/* 复制按钮样式 */
.copy-btn {
    width: 100%;
    padding: 0.6em 1em;
}

/* 模态弹窗样式 */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
}

.modal-content {
    background: #2c2c2c;
    border-radius: 8px;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.modal-header {
    padding: 1em;
    border-bottom: 1px solid #444;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    color: #fff;
}

.modal-close {
    background: none;
    border: none;
    color: #fff;
    font-size: 1.5em;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
}

.modal-body {
    flex: 1;
    padding: 1em;
    overflow-y: auto;
}

.modal-footer {
    padding: 1em;
    border-top: 1px solid #444;
    text-align: center;
}

/* 历史记录列表样式 */
.history-list {
    display: flex;
    flex-direction: column;
    gap: 1em;
}

.history-item {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 5px;
    padding: 1em;
    border: 1px solid #444;
}

.history-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5em;
}

.history-time {
    color: #ccc;
    font-size: 0.9em;
}

.history-account {
    color: #fff;
    margin-bottom: 0.3em;
    font-family: monospace;
}

.history-password {
    color: #ccc;
    margin-bottom: 0.5em;
    font-family: monospace;
}

.history-cookie {
    background: rgba(0, 0, 0, 0.3);
    padding: 0.5em;
    border-radius: 3px;
    margin-bottom: 0.5em;
    max-height: 100px;
    overflow-y: auto;
    font-family: monospace;
    font-size: 0.8em;
    color: #fff;
}

.history-actions {
    display: flex;
    gap: 0.5em;
    flex-wrap: wrap;
}

.history-actions .btn {
    padding: 0.3em 0.6em;
    font-size: 0.8em;
}

/* 空状态样式 */
.empty-history {
    text-align: center;
    color: #ccc;
    padding: 2em;
}