/* ====================================================== */
/* 第一部分：PrismJS 高亮样式 (保持不变) */
/* ====================================================== */

/* PrismJS 1.30.0 (Clean Version) */
code[class*="language-"],
pre[class*="language-"] {
	color: #000;
	font-family: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace;
	font-size: 1em;
	text-align: left;
	white-space: pre;
	word-spacing: normal;
	word-break: normal;
	word-wrap: normal;
	line-height: 1.5;

	-moz-tab-size: 4;
	-o-tab-size: 4;
	tab-size: 4;

	-webkit-hyphens: none;
	-moz-hyphens: none;
	-ms-hyphens: none;
	hyphens: none;
}

pre[class*="language-"] {
	overflow: auto;
}

/* --- Selection & Print --- */
code[class*="language-"]::-moz-selection, code[class*="language-"] ::-moz-selection,
pre[class*="language-"]::-moz-selection, pre[class*="language-"] ::-moz-selection {
	text-shadow: none;
	background: #b3d4fc;
}
code[class*="language-"]::selection, code[class*="language-"] ::selection,
pre[class*="language-"]::selection, pre[class*="language-"] ::selection {
	text-shadow: none;
	background: #b3d4fc;
}
@media print {
	code[class*="language-"],
	pre[class*="language-"] {
		text-shadow: none;
	}
}

/* --- ALL TOKEN COLOR RULES --- */
.token.comment, .token.prolog, .token.doctype, .token.cdata { color: #708090; }
.token.punctuation { color: #999; }
.token.namespace { opacity: .7; }
.token.property, .token.tag, .token.boolean, .token.number, .token.constant, .token.symbol, .token.deleted { color: #905; }
.token.selector, .token.attr-name, .token.string, .token.char, .token.builtin, .token.inserted { color: #690; }
.token.operator, .token.entity, .token.url, .language-css .token.string, .style .token.string { color: #9a6e3a; background: hsla(0, 0%, 100%, .5); }
.token.atrule, .token.attr-value, .token.keyword { color: #07a; }
.token.function, .token.class-name { color: #dd4a68; }
.token.regex, .token.important, .token.variable { color: #e90; }
.token.important, .token.bold { font-weight: bold; }
.token.italic { font-style: italic; }
.token.entity { cursor: help; }


/* ====================================================== */
/* 第二部分：提示词样式 (无背景、蓝色文字) */
/* ====================================================== */

/* 必须显式定义，否则会被下面的清除样式影响 */
.code-btn[data-tooltip]:hover::before {
    content: attr(data-tooltip) !important; /* 强制显示内容 */
    display: block !important;              /* 强制显示区块 */
    visibility: visible !important;
    opacity: 1 !important;
    
    position: absolute;
    bottom: 100%;        
    right: 50%;          
    transform: translateX(50%);
    margin-bottom: 2px;
    
    /* 无背景风格 */
    background: transparent !important; 
    color: #409EFF !important;      
    padding: 0;          
    box-shadow: none;
    border: none !important;
    
    font-size: 13px;     
    font-weight: bold;   
    white-space: nowrap; 
    pointer-events: none; 
    z-index: 100;
}


/* ====================================================== */
/* 第三部分：超细图标样式 (SVG 替换 FontAwesome) */
/* ====================================================== */

/* 1. 图标基础重置 (注意：删除了对 .code-btn::before 的误伤) */
.fa-solid, [class*="fa-"], .fa-regular {
    font-family: sans-serif !important;
    font-style: normal;
    display: inline-block !important;
    width: 18px !important;    
    height: 18px !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
    background-size: contain !important;
    vertical-align: middle;
    color: transparent !important; /* 让原来的字体图标透明 */
    transition: all 0.2s ease;
}

/* 清空 FontAwesome 自身的伪元素，但不清空按钮的伪元素 */
.fa-solid::before, [class*="fa-"]::before,
.fa-solid::after, [class*="fa-"]::after {
    content: "" !important;
    display: none !important;
}

/* --------------------------------------------------- */
/* 2. 定义图标 (SVG stroke-width=1.2 超细线条) */
/* --------------------------------------------------- */

/* [复制图标] 灰色超细线条 */
.fa-copy, .fa-clipboard, .fa-clone {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23666' stroke-width='1.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='9' y='9' width='13' height='13' rx='2' ry='2'/%3E%3Cpath d='M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1'/%3E%3C/svg%3E") !important;
    opacity: 0.8;
}

/* 悬停时变蓝 */
.code-btn:hover .fa-copy, .code-btn:hover .fa-clipboard {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23409EFF' stroke-width='1.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='9' y='9' width='13' height='13' rx='2' ry='2'/%3E%3Cpath d='M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1'/%3E%3C/svg%3E") !important;
    opacity: 1;
    transform: scale(1.05);
}

/* [复制成功] 绿色超细对勾 */
.fa-check {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2367c23a' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E") !important;
    opacity: 1;
    animation: bounce 0.3s;
}

/* [折叠/收起] 向上超细 V 型 */
.fa-angles-up, .fa-angle-up, .fa-chevron-up {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23666' stroke-width='1.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='18 15 12 9 6 15'/%3E%3C/svg%3E") !important;
    opacity: 0.8;
}
.code-btn:hover .fa-angles-up, .code-btn:hover .fa-angle-up {
    opacity: 1;
    /* 悬停变蓝，保持一致 */
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23409EFF' stroke-width='1.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='18 15 12 9 6 15'/%3E%3C/svg%3E") !important; 
}

/* [展开/向下] 向下超细 V 型 */
.fa-angles-down, .fa-angle-down, .fa-chevron-down {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23666' stroke-width='1.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E") !important;
    opacity: 0.8;
}

/* 展开图标悬停变蓝 */
.code-btn:hover .fa-angles-down, .code-btn:hover .fa-angle-down {
     background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23409EFF' stroke-width='1.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E") !important;
}

@keyframes bounce {
    0% { transform: scale(0.8); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}