* {
box-sizing: border-box;
}

html {
background: #f8fafc;
}

body {
margin: 0;
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
background: #f8fafc;
color: #111827;
}

a{color: rgb(30,159,255);font-weight:bold;}

.ai-tag-generator {
width: 100%;
max-width: none;
margin: 0 auto;
padding: 16px;
}

.ai-tag-generator > .layui-form:first-child {
display: flex;
align-items: center;
gap: 10px 18px;
flex-wrap: wrap;
padding: 12px 14px;
border: 1px solid #e5e7eb;
border-radius: 8px;
background: #ffffff;
}

.ai-tag-generator > .layui-form:first-child .layui-input-block {
display: inline-flex !important;
align-items: center;
gap: 6px;
margin: 0 !important;
}

.ai-tag-generator > .layui-form:first-child .layui-input-block:last-child {
margin-left: auto !important;
}

.ai-tag-generator > .layui-form:first-child .layui-form-label {
height: auto;
line-height: 1;
padding: 0 4px 0 0;
}
.r18{display:none}
.nr18{display:block}
th{padding:10px 10px 10px 10px}
td{padding:5px 10px 5px 10px}


#elements-container {
text-align: left;
width:100%;
border-width: 1px;
border-style: solid;
background-color: #f8fafc;
border-radius: 8px;
border-color: #e6e6e6;
margin-top: 14px;
}

.layui-form {
line-height: 1.5;
}

.layui-input-block {
margin-bottom: 8px;
}

.layui-textarea {
font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
}

.draggable-element {
user-select: none;
display: inline-flex;
align-items: center;
text-align: center;
margin: 5px;
padding:0;
font-size: 14px;
min-height: 30px;
line-height: 1.2;
border-radius: 6px;
cursor: grab;
vertical-align: top;
}

.checked{
background:rgb(95,184,120)!important;
color: rgb(255, 255, 255)!important;
}

.minus{
display: inline-flex;
align-items: center;
justify-content: center;
border-width: 1px;
border-style: solid;
border-radius: 4px;
border-color: #e6e6e6;
height: 28px;
width: 28px;
background: white;
color: black;
cursor: zoom-out;
font-weight: 700;
}
.plus{
display: inline-flex;
align-items: center;
justify-content: center;
border-width: 1px;
border-style: solid;
border-radius: 4px;
border-color: #e6e6e6;
height: 28px;
width: 28px;
background: white;
color: black;
cursor: zoom-in;
font-weight: 700;
}
.del{
display: inline-flex;
align-items: center;
justify-content: center;
margin-left:0px;
border-width: 1px;
border-style: solid;
background-color: rgb(255,87,34);
border-radius: 4px;
border-color: #e6e6e6;
height: 28px;
width: 28px;
background: rgb(255,87,34);
color: white;
cursor: no-drop;
font-weight: 700;
font-size: 15px;
}

.tagtext{
background: rgb(95,184,120);
padding: 7px 10px;
display: inline-flex;
align-items: center;
gap: 6px;
min-height: 28px;
color:white;
border-radius: 4px;
font-weight: 600;
}

.tagtext:hover{
background: rgb(115,204,140);
}


.tagbutton{
user-select: none;
display: inline-flex;
align-items: center;
text-align: center;
margin: 5px;
padding:0;
font-size: 14px;
min-height: 30px;
line-height: 1.2;
border-radius: 6px;
vertical-align: top;
}

.buttext{
padding: 6px 10px;
display: inline-flex;
align-items: center;
gap: 6px;
background:white;
color: black;
border-width: 2px;
border-style: solid;
border-radius: 6px;
border-color: #e6e6e6;
min-height: 30px;
}

.buttext:hover{
background: rgb(115,204,140);
color:white;
}

#toast{
    position: fixed;
    top: 15px;
    right: 15px;
    overflow: hidden;
    margin: 0 0 6px;
    padding: 15px 15px 15px 15px;
    width: 300px;
    -moz-border-radius: 3px 3px 3px 3px;
    -webkit-border-radius: 3px 3px 3px 3px;
    border-radius: 3px 3px 3px 3px;
    background-position: 15px center;
    background-repeat: no-repeat;
    -moz-box-shadow: 0 0 12px #999;
    -webkit-box-shadow: 0 0 12px #999;
    box-shadow: 0 0 12px #999;
    color: #fff;
    z-index: 999;
    display: none;
}

.toast_success {
    background:#51a351;
}
.toast_warning {
    background:rgb(255,184,0);
}

/* 图片预览容器的样式 */
#image-preview {
  display: none; /* 默认隐藏 */
  position: absolute; /* 绝对定位 */
  z-index: 1000; /* 确保在其他元素之上 */
  border: 1px solid #ccc; /* 边框，可以根据需要调整 */
  background-color: white; /* 背景色 */
  padding: 5px; /* 内边距 */
}

/* 预览图片的样式 */
#image-preview img {
  max-width: 230px; /* 最大宽度，可以根据需要调整 */
  height: auto; /* 高度自适应 */
}
.english {
    display: none;
}

@media (max-width: 760px) {
.ai-tag-generator {
padding: 10px;
}

.layui-form-label {
padding-left: 0;
padding-right: 8px;
}

.ai-tag-generator > div[style*="flex-flow: row nowrap"] {
display: block !important;
}

.ai-tag-generator > div[style*="flex-flow: row nowrap"] > div[align="center"] {
width: 100% !important;
margin: 8px 0 14px !important;
text-align: left;
}

.layui-tab-title {
height: auto;
white-space: normal;
}

.layui-tab-title li {
min-width: auto;
}

.layui-tab-content {
height: 520px !important;
}
}

/* Match the site's shared reference-library surfaces and controls. */
:root {
  --tool-paper: #fcfcfa;
  --tool-surface: #fff;
  --tool-ink: #182131;
  --tool-muted: #64748b;
  --tool-line: #e3e8ef;
  --tool-accent: #2563eb;
  --tool-soft: #edf3ff;
  color-scheme: light;
}
:root.dark {
  --tool-paper: #151a22;
  --tool-surface: #1c2430;
  --tool-ink: #edf2fa;
  --tool-muted: #a6b4c9;
  --tool-line: #303c4c;
  --tool-accent: #8bb2ff;
  --tool-soft: #243853;
  color-scheme: dark;
}
html, body { background: var(--tool-paper); color: var(--tool-ink); }
body { font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; font-size: 13px; }
a { color: var(--tool-accent); }
.ai-tag-generator { padding: 18px; }
.ai-tag-generator > .layui-form:first-child { background: var(--tool-surface); border-color: var(--tool-line); border-radius: 8px; gap: 10px 16px; }
#elements-container { background: var(--tool-surface); border-color: var(--tool-line); border-radius: 8px; }
.layui-form-label { color: var(--tool-muted); font-size: 12px; }
.layui-textarea, .layui-input { background: var(--tool-surface); color: var(--tool-ink); border-color: var(--tool-line); border-radius: 7px; font-size: 13px; }
.layui-textarea:focus, .layui-input:focus { border-color: var(--tool-accent) !important; }
.layui-btn { border-radius: 6px; }
.layui-btn-normal { background: var(--tool-accent); color: var(--tool-paper); }
.layui-btn-danger { background: var(--tool-surface); color: var(--tool-muted); border: 1px solid var(--tool-line); }
.layui-form-onswitch { border-color: var(--tool-accent); background: var(--tool-accent); }
.layui-tab-card { border: 1px solid var(--tool-line); border-radius: 8px; box-shadow: none; overflow: hidden; background: var(--tool-surface); }
.layui-tab-card > .layui-tab-title { background: var(--tool-paper); border-color: var(--tool-line); }
.layui-tab-title li { color: var(--tool-muted); font-size: 12px; }
.layui-tab-card > .layui-tab-title .layui-this { background: var(--tool-soft); color: var(--tool-accent); }
.layui-tab-title .layui-this:after { border-color: var(--tool-line); }
.layui-tab-content { padding: 14px; }
.buttext { background: var(--tool-surface); color: var(--tool-ink); border-width: 1px; border-color: var(--tool-line); font-size: 12px; }
.buttext:hover, .checked { background: var(--tool-soft) !important; color: var(--tool-accent) !important; border-color: var(--tool-accent); }
.tagtext { background: var(--tool-soft); color: var(--tool-accent); font-size: 12px; font-weight: 500; }
.tagtext:hover { background: var(--tool-soft); opacity: .85; }
.minus, .plus { background: var(--tool-surface); color: var(--tool-ink); border-color: var(--tool-line); }
hr { background: var(--tool-line); }
#toast { width: min(300px, calc(100vw - 30px)); border-radius: 7px; box-shadow: 0 8px 26px rgba(0,0,0,.15); }
.toast_success { background: var(--tool-accent); color: var(--tool-paper) !important; }
@media (max-width: 760px) { .ai-tag-generator { padding: 12px; } .layui-tab-content { padding: 10px; } }
