<?php $host = $_SERVER['HTTP_HOST'] ?? ''; $scheme = (!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off') ? 'https' : 'http'; $base = htmlspecialchars($scheme . '://' . $host, ENT_XML1); header('Content-Type: application/xml; charset=utf-8'); echo '<?xml version="1.0" encoding="UTF-8"?>'; ?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<?php foreach (['/','/brand-video/','/community/','/ai-lab/','/anime/','/creator/','/contact/','/emotion-space/','/selected-video/','/sweet-community/','/ai-tools/'] as $path): ?>
  <url><loc><?php echo $base . $path; ?></loc><lastmod><?php echo date('Y-m-d'); ?></lastmod><changefreq>daily</changefreq><priority><?php echo $path==='/'?'1.0':'0.8'; ?></priority></url>
<?php endforeach; ?>
</urlset>
