#PytEditorDriveDiv {
	position: relative;
}

.PytEditorFrame {
	width: 100%;
	display: block;
	box-sizing: border-box;
	border-radius: 16px;
	border: 1px solid #e0e4f0;
	overflow: hidden;
	position: relative;
	background: linear-gradient(145deg, #ffffff, #f8f9fc);
	box-shadow: 
		0 4px 20px rgba(10, 22, 70, 0.08),
		inset 0 1px 4px rgba(255, 255, 255, 0.7);
	transition: all 0.3s ease;
}

.PytEditorFrame:hover {
	transform: translateY(-2px);
	box-shadow: 
		0 6px 24px rgba(10, 22, 70, 0.12),
		inset 0 1px 6px rgba(255, 255, 255, 0.9);
	border-color: #d0d8f0;
}

.PytEditorFrame:focus-within {
	border-color: #a0b0ff;
	box-shadow: 
		0 0 0 3px rgba(160, 176, 255, 0.2),
		0 6px 24px rgba(10, 22, 70, 0.15);
}

.PytEditorFrame * {
    box-sizing: border-box;
}

.PytEditorFrame .PytToolbar {
    float: left;
    width: 100%;
    padding: 12px 16px; 
    color: #5a6c94;
    background: #ffffff;
    border-bottom: 1px solid #e0e4f0;
    outline: none;
    font-size: 0px; 
    display: flex; 
    align-items: center; 
    flex-wrap: wrap; 
    gap: 8px; 
    position: relative; 
    z-index: 2;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.PytEditorFrame .PytToolbar:hover {
    background-color: #ffffff; 
}

.PytEditorFrame .PytToolbar::before {
    content: none;
}

.PytEditorFrame .PytToolbar>span:hover,
.PytEditorFrame .PytToolbar>input:hover,
.PytEditorFrame .PytToolbar>select:hover {
    background-color: #f5f7ff;
    border-color: #a0b4ff;
}

.PytEditorFrame .PytToolbar:focus {
	outline: none;
}

.PytEditorFrame .PytToolbar>span,
.PytEditorFrame .PytToolbar>input,
.PytEditorFrame .PytToolbar>select {
    float: left;
    display: inline-block;
    text-align: center;
    cursor: pointer;
    margin-right: 8px;
    border: solid 1px #d0d5e3;
    color: #3a4668;
    background-color: #ffffff;
    margin-bottom: 5px;
    border-radius: 8px; 
    padding: 8px 12px; 
    transition: all 0.3s ease; 
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.08);
    min-height: 36px; 
    outline: none; 
}

/* 字体大小控件 - 核心调整区域 */
.PytEditorFrame .PytToolbar>select.font-size-control {
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='8' viewBox='0 0 14 8'%3E%3Cpath fill='%233a4668' d='M7 7.5L0.5 1H13.5L7 7.5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 14px 8px;
    padding-right: 36px;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 8px;
    background-color: #ffffff;
    border: 1px solid #d0d5e3;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    font-size: 13px; /* 文字基础大小 */
    color: #3a4668;
    /* 文字垂直上移：调整内边距+行高 */
    padding: 6px 30px 6px 8px; /* 上6px、下6px（减少下 padding 让文字上移），左8px（文字左移避免重叠） */
    line-height: 1.2; /* 行高适配垂直居中 */
    vertical-align: middle; /* 强制垂直居中 */
}

/* 字体大小控件悬停/聚焦状态 */
.PytEditorFrame .PytToolbar>select.font-size-control:hover {
    background-color: #f5f7ff;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.12);
    border-color: #a0b4ff;
}
.PytEditorFrame .PytToolbar>select.font-size-control:focus {
    outline: none;
    border-color: #5a9cff;
    box-shadow: 0 0 0 3px rgba(90, 140, 255, 0.2);
}

/* 通用选择框 fallback（非字体大小控件） */
.PytEditorFrame .PytToolbar>select:not(.font-size-control) {
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='8' viewBox='0 0 14 8'%3E%3Cpath fill='%233a4668' d='M7 7.5L0.5 1H13.5L7 7.5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 14px 8px;
    padding-right: 36px;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 8px;
    background-color: #ffffff;
    border: 1px solid #d0d5e3;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    font-size: 13px;
    color: #3a4668;
    padding: 8px 30px 8px 12px;
    line-height: 1;
}

.PytEditorFrame .PytToolbar>span {
    overflow: hidden;
    background-repeat: no-repeat;
    color: #3a4668;
    background-position: center center;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: #f9fafc;
    font-size: 13px;
}

.PytEditorFrame .PytToolbar>span:hover,
.PytEditorFrame .PytToolbar>input:hover,
.PytEditorFrame .PytToolbar>select:hover {
    background-color: #f0f4ff;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.12);
    border-color: #a0b4ff;
}

.PytEditorFrame .PytToolbar>input:focus,
.PytEditorFrame .PytToolbar>select:focus {
    background-color: #ffffff;
    border-color: #5a8cff;
    box-shadow: 0 0 0 3px rgba(90, 140, 255, 0.2);
}

.PytEditorFrame .PytToolbar>span {
    position: relative;
    overflow: hidden;
}

.PytEditorFrame .PytToolbar>span.active {
    background-color: #e6eeff;
    border-color: #5a8cff;
    box-shadow: 0 0 0 2px rgba(90, 140, 255, 0.2);
}

.PytEditorFrame .PytToolbar>span::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg, 
        transparent, 
        rgba(255, 255, 255, 0.3), 
        rgba(255, 255, 255, 0.6),
        rgba(255, 255, 255, 0.3),
        transparent
    );
    transition: all 0.6s cubic-bezier(0.19, 1, 0.22, 1);
    z-index: -1;
}

.PytEditorFrame .PytToolbar>span:hover::after {
    left: 100%;
    transition-duration: 1.2s;
}

/* 输入框样式 */
.PytEditorFrame .PytToolbar>input {
    min-width: 140px;
    padding: 10px 16px;
    border-radius: 8px;
    background-color: #ffffff;
    border: 1px solid #d0d5e3;
    color: #3a4668;
    box-shadow: 
        inset 0 1px 3px rgba(0, 0, 0, 0.05),
        0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    font-size: 13px;
}

.PytEditorFrame .PytToolbar>input:hover {
    background-color: #f5f7ff;
    border-color: #a0b4ff;
    transform: translateY(-2px);
    box-shadow: 
        inset 0 1px 4px rgba(0, 0, 0, 0.06),
        0 4px 12px rgba(0, 0, 0, 0.1);
}

.PytEditorFrame .PytToolbar>input:focus {
    outline: none;
    background-color: #ffffff;
    border-color: #5a9cff;
    box-shadow: 
        inset 0 1px 5px rgba(0, 0, 0, 0.08),
        0 0 0 3px rgba(90, 140, 255, 0.2);
}

.PytEditorFrame .PytToolbar>input::placeholder {
    color: #8a9bc7;
    font-style: italic;
    transition: all 0.3s ease;
}

.PytEditorFrame .PytToolbar>input:focus::placeholder {
    color: #a0b0e0;
    opacity: 0.7;
}

/* 活动状态指示器 - 向右偏移避免文字重叠 */
.PytEditorFrame .PytToolbar>span.active::before {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 60%; /* 从50%改为60%，指示器向右移 */
    transform: translateX(-50%);
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #5a8cff;
    box-shadow: 0 0 8px rgba(90, 140, 255, 0.7);
    z-index: 10;
}

/* 大屏幕响应式优化 */
@media only screen and (min-width: 1001px) {
    .PytEditorFrame .PytToolbar>span {
        width: 24px;
        height: 24px;
        line-height: 24px;
        background-size: 18px auto;
        border-radius: 6px;
        font-size: 11px;
    }

    .PytEditorFrame .PytToolbar>input,
    .PytEditorFrame .PytToolbar>select {
        height: 24px;
        line-height: 24px;
        font-size: 11px;
        padding: 0 10px;
    }
    
    /* 大屏幕下字体大小控件 */
    .PytEditorFrame .PytToolbar>select.font-size-control {
        font-size: 11px;
        padding: 4px 30px 4px 8px; /* 进一步缩小上下内边距 */
    }
}

/* 移动设备响应式优化 */
@media only screen and (max-width: 1000px) {
    .PytEditorFrame .PytToolbar>span {
        width: 36px;
        height: 36px;
        line-height: 36px;
        background-size: 28px auto;
        margin-right: 6px;
        border-radius: 8px;
        font-size: 12px;
    }

    .PytEditorFrame .PytToolbar>input,
    .PytEditorFrame .PytToolbar>select {
        height: 36px;
        line-height: 36px;
        font-size: 13px;
        padding: 0 12px;
    }
    
    /* 移动设备下字体大小控件 */
    .PytEditorFrame .PytToolbar>select.font-size-control {
        font-size: 12px;
        padding: 6px 30px 6px 8px;
    }
}

.PytEditorFrame .PytToolbar>span.pk-active,
.PytEditorFrame .PytToolbar>span:hover {
    border: solid 1.5px #4a90e2;
    background-color: #ebf4ff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(74, 144, 226, 0.2);
    transform: translateY(-1px);
}

.PytEditorFrame .PytContent {
    width: 100%;
    padding: 12px;
    border: solid 1px #e2e8f0;
    resize: none;
    overflow-x: hidden;
    overflow-y: auto;
    background-color: #f9fafb;
    border-radius: 0 0 12px 12px;
    min-height: 200px;
    font-family: 'SF Mono', monospace;
    font-size: 15px;
    line-height: 1.6;
    transition: all 0.3s ease;
}

.PytDiv {
    padding: 10px;
    width: 354px;
    max-width: 100%;
    max-height: 100%;
    position: fixed;
    left: 50%;
    top: 75%;
    transform: translate(-50%, -50%);
    font-size: 14px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
    display: none;
    z-index: 999;
    background-color: white;
    border-radius: 20px;
}

.PytDiv.Emotion {
    width: 90%;
    height: 296px;
}

.PytDiv.Emotion>div:nth-of-type(1) {
    width: 100%;
    height: 228px;
    overflow-y: auto;
}

.PytDiv.Emotion>div:nth-of-type(2) {
    height: 42px;
    padding-top: 10px;
    text-align: center;
}

.PytDiv.Emotion img {
    cursor: pointer;
    width: 40px;
    height: -1px;
    margin: 16px;
    float: left;
}

.PytDiv button {
    padding: 0 18px;
    border-radius: 8px;
    color: #fff;
    background-color: #4a90e2;
    height: 36px;
    line-height: 36px;
    font-size: 15px;
    font-weight: 500;
    transition: all 0.2s ease;
    margin: 0 5px;
    border: none;
}

.PytDiv button:hover {
    opacity: 0.9;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(74, 144, 226, 0.3);
}

.PytDiv button:active {
    transform: translateY(1px);
}

.PytDiv button.up {
    background-color: #38b2ac;
}

.PytDiv button.cancel {
    background-color: #a0aec0;
}

#PytImagesBox>div {
    position: relative;
    padding: 8px;
    margin-bottom: 10px;
}

/* 图片预览容器优化 */

#PytImagesBox > div {
  position: relative;
  aspect-ratio: 1/1; /* 保持正方形比例 */
}

#PytImagesBox img {
  width: 100%;
  height: 100%;
  object-fit: cover; /* 保持比例填充 */
  border-radius: 8px;
  border: 2px solid #edf2f7;
  transition: all 0.3s ease;
}

#PytImagesBox img.pk-active {
  border-color: #38a169;
  box-shadow: 0 0 12px rgba(56, 161, 105, 0.4);
}

#PytImagesBox > div > i.fa-trash-o {
  position: absolute;
  top: 8px;
  right: 8px;
  font-size: 18px;
  color: #e53e3e;
  background: rgba(255,255,255,0.8);
  border-radius: 50%;
  padding: 4px;
  cursor: pointer;
}


#PytImagesBox>div>i.fa-trash-o {
    font-size: 16px;
    top: 8px;
    right: 18px;
    color: #e53e3e;
}

#PytImagesBox>div>img {
    border: solid 2px #edf2f7;
    border-radius: 8px;
    transition: all 0.3s ease;
}

#PytImagesBox>div>img.pk-active {
    border-color: #38a169;
    box-shadow: 0 2px 10px rgba(56, 161, 105, 0.2);
}

@media only screen and (max-width: 999px) {
    #PytEasyImagesBox>div {
        width: 50%;
        height: auto;
        aspect-ratio: 1/1;
    }
    
    .PytDiv {
        width: 90%;
        padding: 15px;
    }
}

#PytEasyImagesBox:after,
#PytEasyImagesBox:before {
	display: table;
	clear: both;
	content: " ";
}

@media only screen and (max-width: 999px) {
	#PytEasyImagesBox>div {
		width: 33.3333%;
	}
}