<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>WaifuBoard</title>
    <link rel="stylesheet" href="/views/css/globals.css">
    <link rel="stylesheet" href="/views/css/components/navbar.css">
    <link rel="stylesheet" href="/views/css/components/hero.css">
    <link rel="stylesheet" href="/views/css/home.css">
    <link rel="stylesheet" href="/views/css/components/anilist-modal.css">
    <link rel="stylesheet" href="/views/css/components/updateNotifier.css">
    <link rel="stylesheet" href="/views/css/components/local-library.css">
    <link rel="stylesheet" href="/views/css/components/titlebar.css">
    <link rel="stylesheet" href="/views/css/components/create-room.css"/>
    <link rel="icon" href="/public/assets/waifuboards.ico" type="image/x-icon">
    <script src="/src/scripts/titlebar.js"></script>
</head>
<body>
<div class="hero-wrapper">
    <div class="hero-background">
        <img id="hero-bg-media" alt="">
        <div id="player" style="position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 120vw; height: 120vh; pointer-events: none; opacity: 0; transition: opacity 1s;"></div>
    </div>
    <div class="hero-vignette"></div>

    <div class="hero-content">
        <div class="hero-poster-card">
            <div class="skeleton poster-skeleton" id="hero-poster-skeleton"></div>
            <img id="hero-poster" alt="" style="display: none;" onload="this.style.display='block'; document.getElementById('hero-poster-skeleton').style.display='none'">
        </div>
        <div class="hero-text">
            <div id="hero-loading-ui">
                <div class="skeleton title-skeleton"></div>
                <div class="skeleton text-skeleton" style="width: 40%"></div>
                <div class="skeleton text-skeleton" style="width: 100%; height: 4em;"></div>
            </div>

            <div id="hero-real-ui" style="display: none;">
                <h1 class="hero-title" id="hero-title"></h1>
                <div class="hero-meta">
                    <span class="score-badge" id="hero-score"></span>
                    <span id="hero-year"></span>
                    <span id="hero-type"></span>
                </div>
                <p class="hero-desc" id="hero-desc"></p>
                <div class="hero-buttons">
                    <button class="btn-primary" id="watch-btn">Watch Now</button>
                    <button class="btn-blur">+ Add to List</button>
                </div>
            </div>
        </div>
    </div>
    <button class="library-mode-btn icon-only" id="library-mode-btn" onclick="toggleLibraryMode()" title="Switch library mode">
        <svg fill="none" stroke="currentColor" stroke-width="2" viewBox="0 0 24 24">
            <path d="M3 9l9-7 9 7v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z"/>
            <polyline points="9 22 9 12 15 12 15 22"/>
        </svg>
    </button>

</div>

<!-- Online Mode Content -->
<main id="online-content">
    <section class="section">
        <div class="section-header">
            <div class="section-title">Continue watching</div>
        </div>
        <div class="carousel-wrapper">
            <button class="scroll-btn left" onclick="scrollCarousel('my-status', -1)">‹</button>
            <div class="carousel" id="my-status">
                <div class="card"><div class="card-img-wrap skeleton"></div></div>
                <div class="card"><div class="card-img-wrap skeleton"></div></div>
                <div class="card"><div class="card-img-wrap skeleton"></div></div>
                <div class="card"><div class="card-img-wrap skeleton"></div></div>
            </div>
            <button class="scroll-btn right" onclick="scrollCarousel('my-status', 1)">›</button>
        </div>
    </section>

    <section class="section">
        <div class="section-header"><div class="section-title">Trending This Season</div></div>
        <div class="carousel-wrapper">
            <button class="scroll-btn left" onclick="scrollCarousel('trending', -1)">‹</button>
            <div class="carousel" id="trending">
                <div class="card"><div class="card-img-wrap skeleton"></div></div>
                <div class="card"><div class="card-img-wrap skeleton"></div></div>
                <div class="card"><div class="card-img-wrap skeleton"></div></div>
                <div class="card"><div class="card-img-wrap skeleton"></div></div>
            </div>
            <button class="scroll-btn right" onclick="scrollCarousel('trending', 1)">›</button>
        </div>
    </section>

    <section class="section">
        <div class="section-header"><div class="section-title">Top Airing Now</div></div>
        <div class="carousel-wrapper">
            <button class="scroll-btn left" onclick="scrollCarousel('top-airing', -1)">‹</button>
            <div class="carousel" id="top-airing">
                <div class="card"><div class="card-img-wrap skeleton"></div></div>
                <div class="card"><div class="card-img-wrap skeleton"></div></div>
                <div class="card"><div class="card-img-wrap skeleton"></div></div>
                <div class="card"><div class="card-img-wrap skeleton"></div></div>
            </div>
            <button class="scroll-btn right" onclick="scrollCarousel('top-airing', 1)">›</button>
        </div>
    </section>
</main>

<div id="updateToast" class="hidden">
    <p>Update available: <span id="latestVersionDisplay">v1.x</span></p>
    <a id="downloadButton" href="https://git.waifuboard.app/ItsSkaiya/WaifuBoard/releases" target="_blank">
        Click To Download
    </a>
</div>
<script src="/src/scripts/utils/auth-utils.js"></script>
<script src="/src/scripts/room-modal.js"></script>
<script src="/src/scripts/utils/notification-utils.js"></script>
<script src="/src/scripts/utils/search-manager.js"></script>
<script src="/src/scripts/utils/list-modal-manager.js"></script>
<script src="/src/scripts/utils/continue-watching-manager.js"></script>
<script src="/src/scripts/utils/youtube-player-utils.js"></script>
<script src="/src/scripts/anime/animes.js"></script>
<script src="/src/scripts/updateNotifier.js"></script>
<script src="/src/scripts/rpc-inapp.js"></script>
<script src="/src/scripts/auth-guard.js"></script>
<script src="/src/scripts/settings.js"></script>
</body>
</html>