<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8" />
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
  <title>iYAD</title>
  <meta name="title" content="iYAD - Watch Your Favorite Filipino Shows Online">
  <meta name="description" content="Watch live TV channels online. Stream your favorite Pinoy shows, news, dramas, and movies for free.">
  <link rel="icon" href="/favicon.ico" type="image/x-icon" />
  <script disable-devtool-auto src='js/dev.js'></script>
  <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0-beta3/css/all.min.css"> 
    <script src="https://cdnjs.cloudflare.com/ajax/libs/shaka-player/4.0.0/shaka-player.compiled.js"></script>
    <script src="https://cdn.jsdelivr.net/npm/hls.js@1.4.0"></script>
    <script src="https://www.youtube.com/iframe_api"></script> <!-- YouTube API -->
  	<script src="js/main.js" defer></script>
    <link type="text/css" rel="stylesheet" href="styles.css">
  	<link type="text/css" rel="stylesheet" href="leaf.css">
  	<link type="text/css" rel="stylesheet" href="css/chatbox.css">
  
</head>
<body>
    <div id="channel-grid"></div>

    <div id="overlay"></div>
    <div id="player-container">
        <video id="videoPlayer" controls autoplay></video>
        <div id="error-message"></div>
        <button id="close-button" onclick="closePlayer()">Close</button>
    </div>
  
<div class="loading-spinner" id="loading-spinner"></div>

  <!----- Header ----->
<div id="page-manager" class="yad-app">  
  <!-- Logo -->
  <div class="header-place">
    <div class="header">
    <!-- Logo -->
    <div id="logo-container" title="iYAD">
      <a href="http://10.0.0.1">
        <img src="logo.png" alt="Logo">
        <span class="logo-text"></span>
      </a>
    </div>

    <!-- Search Bar -->
    <div class="search-bar">
    <input 
        type="text" 
        id="search-input" 
        placeholder="Search channels or category" 
        autocomplete="off" 
        autocorrect="off" 
        aria-autocomplete="list" 
        role="combobox"/>
    <button id="search-button">&#xf002;</button>
    <button id="clear-button" style="display:none;">✖</button>
</div>



    <!-- Hamburger Menu -->
    <div class="hamburger-menu" id="menu-toggle">
      &#xf0c9;
    </div>

    <!-- Navigation Menu -->
    <nav class="menu" id="menu" style="display: none;">
      <ul>
        <li><a href="videoplayer">Video Player</a></li>
        <li><a href="imgresizer">Image Resizer</a></li>
        <li class="hidden"><a href="urlchecker.html">M3U URL Checker</a></li>
        <li class="hidden"><a href="converter.html">M3U to JS Structure</a></li>
        <li class="hidden"><a href="obfuscator.html">Obfuscator</a></li>
        <li><a href="mailto:earlyzeven@gmail.com?subject=Hello!">Email Me</a></li>
      </ul>
    </nav>
  </div>
</div>
	<!-- Login Modal -->
    <div id="loginModal" class="modal">
        <div class="modal-content">
            <span class="close" style="font-family: 'Font Awesome 5 Free';">&#xf2d4;</span>
            <div id="logo-container" title="iYAD">
              <img src="../images/cyberyadix.png" alt="Logo"/> <h2> Login ng Pogi</h2>
      		</div>
            <input type="text" id="username" placeholder="Username">
            <input type="password" id="password" placeholder="Password">
            <button id="loginButton">Login</button>
        </div>
    </div>
    <script src="leaf.js"></script>
  </div>

<!-- Chat Button and Box -->
    <div id="chat-button"></div>

    <div id="chatbox">
        <div id="chat-messages"></div>
        <div id="chat-input">
            <input type="text" id="message" placeholder="Type a message" autocomplete="off"/>
            <button id="send">Send</button>
            <button id="auth-btn">Login</button>
        </div>
    </div>

    <div id="auth-modal" style="display: none;">
        <div>
            <span id="close-auth-modal" class="close-btn" style="cursor: pointer;">&times;</span>
            <h2>Login or Register</h2>
            <input type="email" id="email" name="auth-email" placeholder="Email" autocomplete="new-email"/> <!-- Added autocomplete="new-email" -->
            <input type="password" id="password" name="auth-password" placeholder="Password" autocomplete="new-password"/> <!-- Added autocomplete="new-password" -->
            <div class="auth-buttons">
                <button id="login">Login</button>
                <button id="register">Register</button>
            </div>
            <button id="google-signin-btn">
                <svg height="100%" viewBox="0 0 20 20" width="100%" fit="" preserveAspectRatio="xMidYMid meet" focusable="false">
                    <path d="M19.6 10.23c0-.82-.1-1.42-.25-2.05H10v3.72h5.5c-.15.96-.74 2.31-2.04 3.22v2.45h3.16c1.89-1.73 2.98-4.3 2.98-7.34z" fill="#4285F4"></path>
                    <path d="M13.46 15.13c-.83.59-1.96 1-3.46 1-2.64 0-4.88-1.74-5.68-4.15H1.07v2.52C2.72 17.75 6.09 20 10 20c2.7 0 4.96-.89 6.62-2.42l-3.16-2.45z" fill="#34A853"></path>
                    <path d="M3.99 10c0-.69.12-1.35.32-1.97V5.51H1.07A9.973 9.973 0 000 10c0 1.61.39 3.14 1.07 4.49l3.24-2.52c-.2-.62-.32-1.28-.32-1.97z" fill="#FBBC05"></path>
                    <path d="M10 3.88c1.88 0 3.13.81 3.85 1.48l2.84-2.76C14.96.99 12.7 0 10 0 6.09 0 2.72 2.25 1.07 5.51l3.24 2.52C5.12 5.62 7.36 3.88 10 3.88z" fill="#EA4335"></path>
                </svg>
                Login with Google
            </button>
        </div>
    </div>


<noscript>
    <meta http-equiv="refresh" content="0; url=/javascript-error">
  </noscript>  
<script src="../js/menu.js"></script>
<script type="module" src="../js/firebase.js"></script>
<script type="module" src="../js/chatmanager.js"></script>
</body>
</html>