<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>词典界面CSS优化</title>
    <style>
        /* 基础样式重置 */
        * {margin:0;padding:0;box-sizing:border-box}
        body {font-family:Helvetica,Arial,sans-serif;line-height:1.5;color:#333;background:#f5f5f5;padding:20px}
        
        /* 词典容器 */
        .r2O {background:#fff;border-radius:8px;box-shadow:0 2px 10px rgba(0,0,0,0.1);padding:20px;max-width:800px;margin:0 auto}
        
        /* 单词标题 */
        wh {display:block;font-size:32px;font-weight:bold;color:#2c3e50;margin-bottom:10px;padding-bottom:10px;border-bottom:2px solid #4a6fa5}
        
       /* 词性标签 */
        uh {display:flex;margin-bottom:15px;border-bottom:1px solid #e0e0e0}
        ue {padding:8px 15px;color:#7f8c8d;font-weight:500;border-bottom:3px solid transparent;transition:all 0.2s}
        ue:hover, ue.active {color:#3498db;border-bottom-color:#3498db}
        
        /* 词性部分 */
       section {
    margin: 20px 0;
    padding: 1px;
    position: relative;
    }

    section::after {
    content: "";
    position: absolute;
    bottom: -10;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, 
        #f0f0f0 0%, 
        #3498db 50%, 
        #f0f0f0 100%);
}
    
    section:last-child::after {
    display: none;
}

        
        /* 词性标题 */
        uey {font-size:18px;font-weight:bold;color:#2c3e50;margin-bottom:15px;display:flex;align-items:center}
        
er {
            color: #e74c3c; /* 使用更鲜艳的红色替代tomato */
            font-weight: bold;
            font-size: 110%; /* 稍微增大字体 */
            margin: 15px 0 10px; /* 调整边距 */
            display: block;
            padding: 12px 15px; /* 增加内边距 */
            background-color: #fff5f5; /* 浅红色背景 */
            border-left: 4px solid #e74c3c; /* 左侧边框 */
            border-radius: 4px; /* 圆角 */
            box-shadow: 0 2px 4px rgba(0,0,0,0.05); /* 轻微阴影 */
            position: relative;
            transition: all 0.3s ease; /* 添加过渡效果 */
        }

/* 添加一个小图标增强视觉效果 */
      er::before {
            content: "📝";
            margin-right: 8px;
            font-size: 90%;
        }
        
gz, qz {
    color: #7a9eb5;
    font-style: italic;
    font-size: 93%;
    font-family: Helvetica;
    letter-spacing: 0.5px
}

.KFq {
    color: #7a9eb5;
}

qkz {   
    text-transform: uppercase;
}

tj {display:inline-block;width:25px;height:25px;background:#3498db;color:#fff;border-radius:50%;text-align:center;line-height:25px;margin-right:10px;font-size:14px;font-weight:bold}
        
        /* 释义块 */
        nat, na {display:block;margin:15px 0;padding-left:15px;border-left:3px solid #e0e0e0}
        tn {font-weight:bold;color:#2c3e50;margin-bottom:5px}
        a1 {color:#555;margin-bottom:10px}
        
        /* 搭配类型 */
        vtc {font-size:14px;font-weight:bold;color:#1e6bb8;display: block;text-transform:uppercase;letter-spacing:1px;margin:10px 0 8px;padding-left:10px;border-left:3px solid #e74c3c}
        
        /* 搭配列表 */
        co {margin-left:15px}
        st {display:block;margin-bottom:5px;padding:5px 8px}
        z,sac, sa {font-weight:bold;color:#2c3e50}
        
        /* 例句 */
        rq {font-style:italic;color:#7f8c8d;margin-top:3px;padding-left:10px;border-left:1px solid #e0e0e0;display: block;margin-bottom: 8px;}
        rq sa, rq sac {
        color: currentColor;
        font-size: 100%;
        font-weight: normal;     /*此处可改为 bold，实现例句关键词加粗 */
        }
        
        /* 相关用法 */
        dv {margin-top: 16px;  display: block;}
        u4 {font-size:13px;font-weight:bold;color:#2980b9;margin-bottom:10px}
        fm {display:flex;flex-wrap:wrap;gap:2px;align-items: center;margin: 8px 0;}
        fm a {background:#3498db;color:#fff;padding:2px 4px;border-radius:4px;font-size:14px;text-decoration:none;line-height: 1.2;}
        
     /* 释义列表区域 - 添加背景色和分割线 */
nay {
    display: block;
    background: linear-gradient(to right, #e8f4fd, #ffffff); 
    padding: 15px; /* 新增：内边距 */
    border-radius: 6px; /* 新增：圆角 */
    margin-bottom: 20px; /* 新增：底部外边距 */
    border: 1px solid #ddeced;  
    position: relative; /* 新增：为伪元素定位 */
}

vt {
    border-bottom: 1px solid #e0e0e0;
    padding-bottom: 2px;
    margin-bottom: 5px;
}

vto{display: block;margin-top: 15px;}

        /* 响应式设计 */
        @media (max-width:600px) {
            body {padding:10px}
            .r2O {padding:15px}
            wh {font-size:24px}
            uh {flex-wrap:wrap}
            ue {padding:6px 10px;font-size:14px}
        }
    </style>
</head>
<body>
    <!-- 词典内容示例 -->
    <div class="r2O">
        <wh>stroke</wh>
        <uh>
            <ue class="active">verb</ue>
            <ue>noun</ue>
        </uh>
        
        <section>
            <tj>II.</tj>
            <uey>verb</uey>
            
            <vto>
                <vt>ADVERB</vt>
            </vto>
            
            <co>
                <st><z>gently, lightly, slowly, softly, tenderly</z></st>
                <st><z>thoughtfully</z></st>
            </co>
            <rq>He stroked his beard thoughtfully.</rq>
            
            <co>
                <st><z>absently, absent-mindedly, idly</z></st>
            </co>
            <rq>She stroked his hair absently.</rq>
            
            <dv>
                <details>
                    <summary><u4>Stroke is used with these nouns as the subject:</u4></summary>
                    <fm><a>hand</a></fm>
                </details>
            </dv>
        </section>
        
        <section>
            <tj>I.</tj>
            <uey>noun</uey>
            
            <nat>
                <tn>1</tn>
                <a1>of a brush, pen, etc.</a1>
            </nat>
            
            <vto>
                <vt>ADJECTIVE</vt>
            </vto>
            
            <co>
                <st><z>long, short</z></st>
                <st><z>broad (often figurative), thick</z></st>
            </co>
            <rq>I will outline in broad strokes our main ideas.</rq>
        </section>
    </div>

    <script>
        // 简单的交互功能
        document.addEventListener('DOMContentLoaded', function() {
            // 词性标签切换
            const tabs = document.querySelectorAll('ue');
            tabs.forEach(tab => {
                tab.addEventListener('click', function() {
                    tabs.forEach(t => t.classList.remove('active'));
                    this.classList.add('active');
                });
            });
        });
    </script>
</body>
</html>