<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title><%= title %> | Game Portal Admin</title>
    <link rel="icon" type="image/png" href="/favicon.png">
    <link rel="preconnect" href="https://fonts.googleapis.com">
    <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
    <link href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Orbitron:wght@500;600;700;800&display=swap" rel="stylesheet">
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
    <link rel="stylesheet" href="/admin/assets/style.css">
    <link rel="stylesheet" href="/admin/assets/header-dropdown.css">
    <link rel="stylesheet" href="/admin/assets/toast.css">
    <script src="https://cdn.jsdelivr.net/npm/chart.js@4.4.0/dist/chart.umd.min.js"></script>
    <script src="https://cdn.jsdelivr.net/npm/axios/dist/axios.min.js"></script>
</head>
<body>
    <div id="admin-dashboard" class="admin-dashboard">
        <!-- Top Bar -->
        <header class="top-bar">
            <div class="header-left">
                <button class="sidebar-toggle" id="sidebar-toggle">
                    <i class="fas fa-bars"></i>
                </button>
                <div class="navbar-brand">
                    <img src="/admin/assets/logo.png" alt="Logo" class="navbar-logo">
                    <span class="navbar-title">Admin Portal</span>
                </div>
            </div>
            <div class="header-right">
                <button class="btn-icon" id="refresh-data" title="Refresh Data">
                    <i class="fas fa-sync-alt"></i>
                </button>
                <button class="btn-icon" id="fullscreen-toggle" title="Toggle Fullscreen">
                    <i class="fas fa-expand"></i>
                </button>
                <a href="/admin/settings" class="btn-icon" title="Settings">
                    <i class="fas fa-cog"></i>
                </a>
                <div class="user-profile-dropdown">
                    <div class="user-profile-trigger" id="user-profile-trigger">
                        <div class="user-avatar"><%= user.username.charAt(0).toUpperCase() %></div>
                    </div>
                    <div class="user-dropdown-menu" id="user-dropdown-menu">
                        <div class="dropdown-header">
                            <div class="user-avatar-large"><%= user.username.charAt(0).toUpperCase() %></div>
                            <div class="user-info">
                                <div class="dropdown-username"><%= user.username %></div>
                                <div class="dropdown-role"><%= user.role %></div>
                            </div>
                        </div>
                        <div class="dropdown-divider"></div>
                        <a href="/admin/profile" class="dropdown-item">
                            <i class="fas fa-user-circle"></i>
                            <span>My Profile</span>
                        </a>
                        <a href="/admin/settings" class="dropdown-item">
                            <i class="fas fa-cog"></i>
                            <span>Settings</span>
                        </a>
                        <div class="dropdown-divider"></div>
                        <button class="dropdown-item danger" id="logout-btn">
                            <i class="fas fa-sign-out-alt"></i>
                            <span>Logout</span>
                        </button>
                    </div>
                </div>
            </div>
        </header>
