* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}
.theme-toggle {
  margin-top:0;
  --base-scale: 12px;
  --toggle-width: 5.625em;
  --toggle-height: 2.5em;
  --radius-pill: 100em;
  --sun-diameter: 2.125em;
  --sun-offset: calc((var(--toggle-height) - var(--sun-diameter)) / 2);
  --bg-toggle-light: #3d7eae;
  --bg-toggle-dark: #1d1f2c;
  --color-sun: #ecca2f;
  --color-moon: #c4c9d1;
  --color-crater: #959db1;
  --color-star: #fff;
  --color-cloud-front: #f3fdff;
  --color-cloud-back: #aacadf;
  --shadow-primary: rgba(0, 0, 0, 0.25);
  --shadow-highlight: rgba(255, 255, 255, 0.94);
  --halo-color: rgba(255, 255, 255, 0.1);
}
*::before, *::after
{
    box-sizing: border-box;
    padding: 0;
    margin: 0;
}
body {
    background-color: #f5f7fa;
    color: #333;
    line-height: 1.6;
    padding: 2px;
}
:root {
  --bg-color: #f0f0f0;
  --transition-standard: 0.3s ease;
  --bg-toggle-dark: #1d1f2c;
}
html.dark * {
  --bg-color: #000; 
  background-color: var(--bg-toggle-dark);
  color: aliceblue;
  textarea{
   border: 1px solid #eee;
  }
}
.top_bar{
    position: sticky;
    top: 0;
    z-index:1;
    margin-bottom: 6px; 
    border-bottom:5px solid #777;
}
.top {
    display: grid;
    align-content: center;
    grid-template-columns:1fr 1fr 1fr 1fr 1fr 1fr 80px;
    text-align: center;
    align-items: center;
   
}
div#Tbar {
    display: grid;
    grid-template-columns: 1fr 1fr;
    text-align: center;
    padding: 0;
    border-bottom:1px solid black;
}
.cont {
    display: grid;
    gap:5px;
    grid-template-columns: 85px minmax(10px,5fr);
    padding:10px 10px 0 0;
    
}

.left {
    position: sticky;
    display: flex;
    justify-content: center;
}
.left_menu {
    position: fixed;
   /* top: 20%; */
    border-right:1px solid black;
    text-align:center;
    padding:5px;
    height:100%;
}
.result::before {
    content: '';
    font-weight: 900;
    color: #e3f;
}
.result {
    bottom-border: 3px solid green;
    border-radius: 10px;
    padding: 3px;
    margin: 3px;
    display:flex;
    flex-direction: column;
    img{
        border-radius:10px;
        width:100%;
    }
}
.res img {
    width: 98%;
    border-radius: 10px;
    border: 1px solid green;
    width:-webkit-fill-available;
}
.container {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}
form {
    background: #cef;
    padding: 0px;
    border-radius: 10px;
}
.panel {
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    padding: 20px;
}
.full-width {
    grid-column: 1 / -1;
}
h1 {
    text-align: center;
    margin-bottom: 30px;
    color: #2c3e50;
}
h2 {
    margin-bottom: 15px;
    color: #3498db;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}
h3 {
    margin: 15px 0 10px;
    color: #2c3e50;
}
input, select, textarea {
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 8px;
    vertical-align: middle;
    outline:none;
}
textarea {
    width: 100%;
    padding: 15px 5px 5px 5px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-family: monospace;
    font-size: 14px;
    resize: vertical;
    position: relative;
    top: -1.3em;
    margin-bottom: -1.3em;
    border:1px solid black;
}
button {
    background-color: #3498db;
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    margin-top: 10px;
    transition: background-color 0.3s;
    margin-right: 10px;
}
button:hover {
    background-color: #2980b9;
}
button.secondary {
    background-color: #95a5a6;
}
button.secondary:hover {
    background-color: #7f8c8d;
}
.preview {
    min-height: 300px;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 15px;
    background-color: #f9f9f9;
}
.example {
    background-color: #f8f9fa;
    padding: 10px;
    border-radius: 4px;
    margin-top: 10px;
    font-family: monospace;
    font-size: 13px;
    white-space: pre-wrap;
}
.controls {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    flex-wrap: wrap;
}
.form-group {
    margin-bottom: 0;
    position: relative;
}
textarea:hover,input:hover {
    border:3px solid green;
}
textarea:focus,input:focus {
    border:3px solid red;
}
/* *inspector-stylesheet:1 */
textarea:hover {
    border:3px solid green;
}
.form-group label {
    /* margin-bottom: 5px; */
    display: inline-flex;
    border-radius:6px;
    font-weight: 600;
    position: relative;
    font-weight: 600;
    background-color:white;
    padding:0 0.5em;
    color:green;
    z-index: 10;
    margin-left: 18px;
    border:1px solid black;
}
textarea:placeholder-shown{
    background-color:red;
}
/* 行内表单组 - 用于同一行的文本和输入框 */
.form-inline {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}
.form-inline label {
    margin-bottom: 0;
    min-width: 80px;
    flex-shrink: 0;
}
.form-inline input,
.form-inline select,
.form-inline textarea {
    flex: 1;
}
label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
}
/* 单选框和复选框的特殊样式 */
input[type="checkbox"],
input[type="radio"] {
    margin: 0 5px 0 0;
    vertical-align: middle;
    transform: scale(1.2);
}
/* 表单行内对齐 */
.form-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
.form-row label {
    display: inline-flex;
    align-items: center;
    margin-bottom: 0;
    vertical-align: middle;
    min-width: auto;
}
.form-row input[type="text"],
.form-row input[type="password"],
.form-row input[type="email"],
.form-row input[type="number"],
.form-row input[type="date"],
.form-row input[type="range"],
.form-row select {
    flex: 1;
    min-width: 60px;
}
/* Range输入样式 */
input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    height: 6px;
    background: #ddd;
    outline: none;
    opacity: 0.7;
    transition: opacity 0.2s;
    border-radius: 3px;
    cursor: pointer;
    padding:0;
}
input[type="range"]:hover {
    opacity: 1;
}
input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    background: #3498db;
    cursor: pointer;
    border-radius: 50%;
    border: 2px solid #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}
input[type="range"]::-moz-range-thumb {
    width: 20px;
    height: 20px;
    background: #3498db;
    cursor: pointer;
    border-radius: 50%;
    border: 2px solid #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}
input[type="range"]::-webkit-slider-thumb:hover {
    background: #2980b9;
    transform: scale(1.1);
}
input[type="range"]::-moz-range-thumb:hover {
    background: #2980b9;
    transform: scale(1.1);
}
/* Range值显示 */
.range-value {
    display: inline-block;
    min-width: 40px;
    text-align: center;
    padding: 4px 8px;
    background-color: #e3f2fd;
    border: 1px solid #3498db;
    border-radius: 4px;
    font-weight: 500;
    color: #2c3e50;
    margin-left: 10px;
}
.range-container {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
}
table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 15px;
}
table, th, td {
    border: 1px solid #ddd;
}
th, td {
    padding: 12px 8px;
    text-align: center;
    vertical-align: middle;
    line-height: 1.5;
    min-height: 40px;
}
/* 表格对齐样式 */
.table-align-left {
    text-align: left;
}
.table-align-center {
    text-align: center;
}
.table-align-right {
    text-align: right;
}
th {
    background-color: #f2f2f2;
    font-weight: 600;
}
video{
    border-radius:10px;
}
/* 表格中的表单元素样式 */
table input,
table select,
table textarea,
table button {
    margin: 0;
    vertical-align: middle;
}
table label {
    margin: 0;
    vertical-align: middle;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}
.flex-vertical {
    display: grid;
    grid-template-columns: repeat(auto-fit,minmax(282px,1fr));
    gap: 10px;
    padding: 5px;
    background: aqua;
    /* margin: 3px; */
    border: 1px solid black;
    border-radius: 10px;
}

.flex-horizontal {
    display: flex;
    gap: 5px;
    padding:3px 3px;
    background-color: #a9d7ff;
    border-radius: 4px;
    flex-wrap: wrap;
    border-radius:10px;
}
.inline-container {
    display: inline-flex;
    gap: 10px;
    margin: 5px;
    padding: 5px;
    background-color: #f8f9fa;
    border-radius: 4px;
}
.video-container {
    width: 100%;
    margin-bottom: 15px;
}
video{
    border-radius:10px;
}
.success {
    color: #27ae60;
    font-weight: bold;
}
.error {
    color: #e74c3c;
    font-weight: bold;
}
.output-area {
    margin-top: 20px;
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 4px;
    border: 1px dashed #ccc;
}
.output-title {
    font-weight: bold;
    margin-bottom: 10px;
    color: #2c3e50;
}
.file-upload {
    margin-bottom: 15px;
}
.syntax-guide {
    margin-top: 20px;
}
.syntax-item {
    margin-bottom: 10px;
    padding: 8px;
    background-color: #f8f9fa;
    border-radius: 4px;
}
.syntax-prefix {
    font-weight: bold;
    color: #e74c3c;
}
.syntax-desc {
    margin-left: 10px;
}
.brace {
    color: #e74c3c;
    font-weight: bold;
}
.websocket-status {
    padding: 8px;
    border-radius: 4px;
    margin: 5px 0;
    text-align: center;
    font-weight: bold;
}
.websocket-connected {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}
.websocket-disconnected {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}
.websocket-error {
    background-color: #f8d7da;
    color: #721c24;
    border: 2px solid #dc3545;
    font-weight: bold;
    padding: 10px;
    text-align: center;
    animation: pulse 2s infinite;
}
.websocket-message {
    background-color: #e2e3e5;
    padding: 8px;
    border-radius: 4px;
    margin: 5px 0;
    font-family: monospace;
}
@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.7; }
    100% { opacity: 1; }
}
.table-container {
    margin-bottom: 15px;
    padding: 10px;
    background-color: #fff3cd;
    border-radius: 4px;
}
.image-container img{
    border-radius:10px;
}
/* 图片容器样式 */
.wcml-image-container {
    margin: 10px 0;
    text-align: center;
}
.wcml-image-container img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}
/* 音频容器样式 */
.wcml-audio-container {
    margin: 10px 0;
    text-align: center;
}
.wcml-audio-container audio {
    width: 100%;
    max-width: 400px;
}
/* 标题样式 */
h1, h2, h3, h4, h5, h6 {
    color: #2c3e50;
    font-weight: 600;
    border-radius:10px;
￼    padding:0 7px;
}
h1 {
    font-size: 2.5em;
    border-bottom: 2px solid #3498db;
    padding-bottom: 10px;
    box-shadow:2px -2px black;
    margin-top: 10px;
}
h2 {
    font-size: 2em;
    border-bottom: 1px solid #bdc3c7;
    padding-bottom: 8px;
}
h3 {
    font-size: 1.5em;
    color: #34495e;
}
h4 {
    font-size: 1.25em;
    color: #34495e;
}
h5 {
    font-size: 1.1em;
    color: #5d6d7e;
}
h6 {
    font-size: 1em;
    color: #5d6d7e;
    font-style: italic;
}
/* 段落样式 */
p {
    margin: 10px 0;
    line-height: 1.6;
    color: #333;
    text-indent: 2em;
}
/* 文件上传进度样式 */
.upload-progress {
    margin-top: 10px;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: #f8f9fa;
}
.progress-bar {
    width: 100%;
    height: 12px;
    background-color: #e9ecef;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 8px;
}
.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #3498db, #2980b9);
    width: 0%;
    transition: width 0.3s ease;
    border-radius: 10px;
}
.upload-status {
    font-size: 10px;
    font-weight: 500;
    text-align: center;
}
.upload-preparing {
    color: #6c757d;
}
.upload-uploading {
    color: #007bff;
}
.upload-success {
    color: #28a745;
    font-weight: bold;
}
.upload-error {
    color: #dc3545;
    font-weight: bold;
}
.upload-cancelled {
    color: #ffc107;
    font-weight: bold;
}
input[type=radio]:checked+label, input[type=checkbox]:checked+label {
    /* border: 1px solid gold; */
    border:0;
   /* padding: 0.2vh 0.5vh; */
    color: red;
    font-weight: bold;
    /* font-size: 2vh; */
    background: aquamarine;
    box-shadow: inset 2px 2px 2px black;
    margin: 5px;
    /* width:auto; */
    text-wrap: auto;
    transition:0.5s;
}
input[type=radio]+label:hover, input[type=checkbox]+label:hover {
    transform: translateY(-3px);
}
input[type=radio]+label, input[type=checkbox]+label {
    /* border: 0.1vh solid black; */
    border:0;
    border-radius: 0.5vw;
    box-shadow: 2px 2px 12px black;
    background-color: #36b4cb;
    cursor: pointer;
    padding: 3px 2px;
    color: white;
    /* line-height: 28px; */
    white-space: nowrap;
}
input[type=radio], input[type=checkbox] {
    display: none;
}
input#watermark_text {
    width: 100px;
}
input#submit {
    background: green;
    box-shadow: 3px 2px 12px black;
    border-radius: 10px;
    cursor: pointer;
    color:white;
    font-weight:800;
}
input#submit:hover{
    transform: translateY(-3px);
    padding:10px;
    background: red;
}
#JDT,#jdt{
    border-radius: 0.5vw;
}
#JDT{
   border:1px solid black;
}
#jdt{
   background-color: #3fb4cb;
   height:10px;
}
.VT {
    display: grid;
    grid-template-columns:60px 3fr 60px;
    gap: 10px;
    grid-template-areas: "jdt"
        "jdb";
    align-content: center;
    align-items: center;
}
.top input[type=radio]+label{
    border-radius:0;
    padding:0.2vh 0.5vh;
    box-shadow:0 0 10px;
}
.top input[type=radio]:checked+label{
   padding:0 0.5vh;
   background:#fff;
   margin: 0; 
   color:red;
   box-shadow:0 2px red;
}
.top span:first-child input[type=radio]+label{
   border-radius:10px 0 0 10px;
}
.top span:last-child input[type=radio]+label{
   border-radius:0 10px 10px 0;
}
/* */
.theme-toggle {
  font-size: var(--base-scale);
  background: none;
  border: none;
  padding: 0px 0px;
}
.theme-toggle__container {
  width: var(--toggle-width);
  height: var(--toggle-height);
  background-color: var(--bg-toggle-light);
  border-radius: var(--radius-pill);
  cursor: pointer;
  position: relative;
  transition: background-color var(--transition-standard);
  overflow: hidden;
  box-shadow: 0.06em 0.06em 0.125em var(--shadow-highlight);
}
.theme-toggle__container::after {
  content: "";
  position: absolute;
  inset: 0;
  box-shadow: 0em 0.05em 0.187em rgba(0, 0, 0, 0.5) inset;
  border-radius: var(--radius-pill);
  pointer-events: none;
}
.theme-toggle__sun {
  width: var(--sun-diameter);
  height: var(--sun-diameter);
  background-color: var(--color-sun);
  border-radius: 50%;
  position: absolute;
  top: var(--sun-offset);
  transform: translateX(var(--sun-offset));
  box-shadow: 0.05em 0.125em 0.125em var(--shadow-primary),
    0em 0.05em 0.125em var(--shadow-primary),
    0.05em 0.05em 0.05em 0em rgba(254, 255, 239, 0.61) inset,
    0em -0.05em 0.05em 0em #a1872a inset, 0 0 0 0.625em var(--halo-color),
    0 0 0 1.25em var(--halo-color), 0 0 0 1.875em var(--halo-color);
  transition: transform var(--transition-standard);
  overflow: hidden;
}
html.dark .theme-toggle__container .theme-toggle__sun {
  transform: translateX(
    calc(var(--toggle-width) - var(--sun-diameter) - var(--sun-offset))
  );
}
.theme-toggle__moon-mask {
  position: relative;
  width: 100%;
  height: 100%;
  background-color: var(--color-moon);
  border-radius: inherit;
  transform: translateX(100%);
  transition: transform var(--transition-standard);
  box-shadow: 0.062em 0.062em 0.062em 0em rgba(254, 255, 239, 0.61) inset,
    0em -0.062em 0.062em 0em #969696 inset;
}
html.dark .theme-toggle__container .theme-toggle__moon-mask {
  transform: translateX(0);
}
.theme-toggle__crater {
  position: absolute;
  background-color: var(--color-crater);
  border-radius: 50%;
  box-shadow: 0em 0.03em 0.06em var(--shadow-primary) inset;
}
.theme-toggle__crater:nth-of-type(1) {
  top: 0.75em;
  left: 0.3em;
  width: 0.75em;
  height: 0.75em;
}
.theme-toggle__crater:nth-of-type(2) {
  top: 0.9em;
  left: 1.375em;
  width: 0.375em;
  height: 0.375em;
}
.theme-toggle__crater:nth-of-type(3) {
  top: 0.3em;
  left: 0.8em;
  width: 0.25em;
  height: 0.25em;
}
.theme-toggle__stars {
  position: absolute;
  left: 0.3em;
  transform: translateY(-2em);
  transition: transform var(--transition-standard);
  width: 2.75em;
  color: var(--color-star);
}
html.dark .theme-toggle__container .theme-toggle__stars {
  transform: translateY(0.5em);
}
.theme-toggle__clouds {
  position: absolute;
  left: 0.3em;
  top: 2em;
  transform: translateY(0);
  width: 1.25em;
  height: 1.25em;
  background-color: var(--color-cloud-front);
  border-radius: 50%;
  box-shadow: 0.937em 0.312em var(--color-cloud-front),
    1.437em 0.375em var(--color-cloud-front), 2.187em 0 var(--color-cloud-front),
    2.937em 0.312em var(--color-cloud-front),
    3.625em -0.062em var(--color-cloud-front),
    4.5em -0.312em var(--color-cloud-front),
    4.625em -1.75em 0 0.437em var(--color-cloud-front),
    -0.312em -0.312em var(--color-cloud-back),
    0.5em -0.125em var(--color-cloud-back),
    1.25em -0.062em var(--color-cloud-back),
    2em -0.312em var(--color-cloud-back), 2.625em 0em var(--color-cloud-back),
    3.375em -0.437em var(--color-cloud-back),
    4em -0.625em var(--color-cloud-back),
    4.125em -2.125em 0 0.437em var(--color-cloud-back);
  transition: transform var(--transition-standard);
}
html.dark .theme-toggle__container .theme-toggle__clouds {
  transform: translateY(3em);
}
.theme-toggle__container:hover .theme-toggle__sun {
  transform: translateX(calc(var(--sun-offset) + 0.187em));
}
html.dark .theme-toggle__container:hover .theme-toggle__sun {
  transform: translateX(
    calc(
      var(--toggle-width) - var(--sun-diameter) - var(--sun-offset) - 0.187em
    )
  );
}
/* */
.flex-vertical .flex-vertical{
   background-color: #efdf;
}
.flex-vertical .flex-horizontal{
    grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
}
html.dark .flex-vertical .flex-vertical{
   background-color: #000;
}
.green {
    color: green;
    font-weight: 900;
}
.red{
  color:red;
  font-weight: 900;
}
.translate {
    padding: 10px;
    color: green;
    border: 1px solid;
    border-radius: 10px;
}
