<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="2.0" 
                xmlns:html="http://www.w3.org/TR/REC-html40"
                xmlns:sitemap="http://www.sitemaps.org/schemas/sitemap/0.9"
                xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
  <xsl:output method="html" version="1.0" encoding="UTF-8" indent="yes"/>
  <xsl:template match="/">
    <html xmlns="http://www.w3.org/1999/xhtml" lang="zh-CN">
      <head>
        <title>吹雪云 (chuixuecloud.lol) - XML 站点地图</title>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <style type="text/css">
          body {
            font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", sans-serif;
            background: #060913;
            color: #f8fafc;
            padding: 30px;
            margin: 0;
          }
          .container {
            max-width: 1000px;
            margin: 0 auto;
            background: rgba(15, 23, 42, 0.8);
            border: 1px solid rgba(56, 189, 248, 0.2);
            border-radius: 12px;
            padding: 24px;
          }
          h1 {
            color: #38bdf8;
            font-size: 24px;
            margin-bottom: 8px;
          }
          p {
            color: #94a3b8;
            font-size: 14px;
            margin-bottom: 20px;
          }
          table {
            width: 100%;
            border-collapse: collapse;
            font-size: 14px;
          }
          th {
            background: rgba(56, 189, 248, 0.1);
            color: #38bdf8;
            text-align: left;
            padding: 12px 14px;
            border-bottom: 2px solid rgba(56, 189, 248, 0.3);
          }
          td {
            padding: 10px 14px;
            border-bottom: 1px solid rgba(255, 255, 255, 0.05);
            color: #cbd5e1;
          }
          tr:hover td {
            background: rgba(56, 189, 248, 0.05);
          }
          a {
            color: #38bdf8;
            text-decoration: none;
          }
          a:hover {
            text-decoration: underline;
          }
        </style>
      </head>
      <body>
        <div class="container">
          <h1>吹雪云 (ChuiXue Cloud) XML 站点地图</h1>
          <p>共收录 <xsl:value-of select="count(sitemap:urlset/sitemap:url)"/> 个有效公开页面与深度测评文章。</p>
          <table>
            <tr>
              <th width="65%">URL 地址</th>
              <th width="15%">更新频率</th>
              <th width="10%">优先级</th>
              <th width="10%">最后修改</th>
            </tr>
            <xsl:for-each select="sitemap:urlset/sitemap:url">
              <tr>
                <td>
                  <a href="{sitemap:loc}"><xsl:value-of select="sitemap:loc"/></a>
                </td>
                <td><xsl:value-of select="sitemap:changefreq"/></td>
                <td><xsl:value-of select="sitemap:priority"/></td>
                <td><xsl:value-of select="substring(sitemap:lastmod, 0, 11)"/></td>
              </tr>
            </xsl:for-each>
          </table>
        </div>
      </body>
    </html>
  </xsl:template>
</xsl:stylesheet>
