<?php
$ua = $_SERVER['HTTP_USER_AGENT'] ?? '';
$isMobile = preg_match('/Android|iPhone|iPod|Windows Phone|Mobile|Mobi|IEMobile|BlackBerry|webOS/i', $ua) && !preg_match('/iPad/i', $ua);
if (!$isMobile) {
    header('Content-Type: text/plain; charset=utf-8');
    http_response_code(403);
    echo '请使用手机访问';
    exit;
}
?>
<style>
    body {
        font-family: 'Arial', sans-serif;
        background-color: #e8e8e8; /* 深色背景 */
        color: #444;
        margin: 0;
        padding: 0;
        line-height: 1.5; /* 行间距 */
    }
    .container {
        max-width: 700px;
        margin: 30px auto;
        background-color: #ffffff;
        padding: 40px; /* 内边距 */
        border: 2px solid #bbb; /* 边框 */
        border-radius: 12px; /* 圆角 */
    }
    h2 {
        font-size: 2.2em; /* 大标题 */
        margin-bottom: 20px;
        color: #007acc; /* 标题颜色 */
    }
    .media {
        margin-bottom: 30px;
    }
    audio, video {
        width: 100%;
        border: 1px solid #bbb; /* 边框 */
        border-radius: 6px; /* 圆角 */
    }
    button {
        padding: 15px 20px; /* 按钮内边距 */
        font-size: 1.5em; /* 按钮字体 */
        background-color: #007acc; /* 按钮背景 */
        color: white; /* 按钮文字 */
        border: none;
        border-radius: 8px; /* 圆角 */
        cursor: pointer;
        display: block; /* 独占一行 */
        margin: 15px auto; /* 上下间距 */
        transition: background-color 0.2s; /* 简单的背景色变化 */
    }
    button:hover {
        background-color: #005f99; /* 鼠标悬停颜色 */
    }
    @media (max-width: 600px) {
        .container {
            padding: 20px; /* 小屏幕内边距 */
        }
        h2 {
            font-size: 1.8em; /* 小屏幕标题 */
        }
    }
</style>



<?php
if(isset($_GET['u']) && is_string($_GET['u']) && strlen($_GET['u']) <= 100) {
    $userInput = htmlspecialchars($_GET['u']);
} else {
    $userInput = '默认值';
}

?>

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title><?echo($userInput);?></title>
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/animate.css/4.1.1/animate.min.css"/>
    
</head>
<body>
    <div class="container">
        
        
        
        <div class="media animate__animated animate__fadeInUp">
            <h2><?echo($userInput);?>动态示范</h2>
            <video controls>
                <source src="https://mp4.cxewmdz.com/a/202506121841/A2/354/<?echo($userInput)?>动态示范_batch.mp4" type="video/mp4">
                您的浏览器不支持视频元素。
            </video>
        </div>
        <div class="media animate__animated animate__fadeInUp">
            <h2><?echo($userInput);?>动态伴奏</h2>
            <video controls>
                <source src="https://mp4.cxewmdz.com/a/202506121841/A2/354/<?echo($userInput)?>动态伴奏_batch.mp4" type="video/mp4">
                您的浏览器不支持视频元素。
            </video>
        </div>
        
    </div>
</body>
</html>

