<?php
require_once 'config.php';

// Get current champion
$dayOfWeek = date('w'); // 0 = Sunday
$stmt = getDB()->prepare("SELECT * FROM champions WHERE day_index = ?");
$stmt->execute([$dayOfWeek]);
$currentChampion = $stmt->fetch();

if (!$currentChampion) {
    $currentChampion = [
        'name' => 'Unknown',
        'theme_class' => 'theme-zealer',
        'color' => '#ffd700'
    ];
}
?>
<!DOCTYPE html>
<html lang="en" class="<?php echo $currentChampion['theme_class']; ?>">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Champion's Habit RPG</title>
    <link rel="stylesheet" href="styles.css">
</head>
<body>
    <nav class="nav-bar">
        <div class="nav-brand">
            <img src="<?php echo getChampionImage($currentChampion['name'], 'card'); ?>" 
                 alt="<?php echo $currentChampion['name']; ?>" 
                 class="nav-champion-img"
                 onerror="this.style.display='none'">
            <span>CHAMPION'S RPG</span>
        </div>
        <div class="nav-links">
            <a href="index.php" class="nav-btn <?php echo basename($_SERVER['PHP_SELF']) == 'index.php' ? 'active' : ''; ?>">Dashboard</a>
            <a href="champions.php" class="nav-btn <?php echo basename($_SERVER['PHP_SELF']) == 'champions.php' ? 'active' : ''; ?>">Champions</a>
            <a href="inventory.php" class="nav-btn <?php echo basename($_SERVER['PHP_SELF']) == 'inventory.php' ? 'active' : ''; ?>">Inventory</a>
            <a href="calendar.php" class="nav-btn <?php echo basename($_SERVER['PHP_SELF']) == 'calendar.php' ? 'active' : ''; ?>">Calendar</a>
            <a href="bounties.php" class="nav-btn <?php echo basename($_SERVER['PHP_SELF']) == 'bounties.php' ? 'active' : ''; ?>">Bounties</a>
            <a href="add.php" class="nav-btn <?php echo basename($_SERVER['PHP_SELF']) == 'add.php' ? 'active' : ''; ?>">+ Add</a>
        </div>
    </nav>
    <div class="container">


