<?xml version="1.0" encoding="UTF-8"?>
<?php
header('Content-Type: application/xml; charset=UTF-8');
$currentHost = $_SERVER['HTTP_HOST'] ?? 'localhost';
$currentOrigin = (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] === 'on' ? 'https' : 'http') . '://' . $currentHost;
$today = date('Y-m-d');
$urls = [
  ['loc' => '/', 'priority' => '1.0', 'changefreq' => 'daily'],
  ['loc' => '/trendy/', 'priority' => '0.9', 'changefreq' => 'daily'],
  ['loc' => '/video-square/', 'priority' => '0.9', 'changefreq' => 'daily'],
  ['loc' => '/ai-play/', 'priority' => '0.9', 'changefreq' => 'daily'],
  ['loc' => '/music-dimension/', 'priority' => '0.9', 'changefreq' => 'daily'],
  ['loc' => '/creator-battle/', 'priority' => '0.8', 'changefreq' => 'weekly'],
  ['loc' => '/contact/', 'priority' => '0.7', 'changefreq' => 'monthly'],
  ['loc' => '/about/', 'priority' => '0.7', 'changefreq' => 'monthly'],
  ['loc' => '/street-diary/', 'priority' => '0.8', 'changefreq' => 'daily'],
  ['loc' => '/music-room/', 'priority' => '0.8', 'changefreq' => 'daily'],
  ['loc' => '/ai-workshop/', 'priority' => '0.8', 'changefreq' => 'daily'],
  ['loc' => '/personality-show/', 'priority' => '0.8', 'changefreq' => 'daily'],
  ['loc' => '/youth-topic/', 'priority' => '0.8', 'changefreq' => 'daily'],
];
?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
        xmlns:video="http://www.google.com/schemas/sitemap-video/1.1">
<?php foreach ($urls as $url): ?>
  <url>
    <loc><?php echo htmlspecialchars($currentOrigin . $url['loc']); ?></loc>
    <lastmod><?php echo $today; ?></lastmod>
    <changefreq><?php echo $url['changefreq']; ?></changefreq>
    <priority><?php echo $url['priority']; ?></priority>
  </url>
<?php endforeach; ?>
</urlset>
