{% extends "webapp/base.html" %} {% block title %}{{ match.title }} — {{ t('brand') }}{% endblock %} {% from "webapp/_game_logo.html" import glogo, glogo_hero %} {% block content %}
🎮 {{ match.game.name if match.game else '🏆' }} {{ match.title }} {{ match.entry_fee == 0 and t('free') | default('FREE') or '$' ~ match.entry_fee }}
{% if winners_announced %} 🏆 {{ t('finished') | default('FINISHED') }} {% elif is_registered %} ✓ {{ t('registered') }} {% elif not session.get('user_id') %} {{ t('login_to_join') | default('LOGIN TO JOIN') }} {% elif match.registration_not_yet_open %} 🕐 {{ t('reg_not_open_yet') | default('Registration Not Open Yet') }} {% elif match.registration_open %} {% else %} 🔒 {{ t('reg_closed') | default('Registration Closed') }} {% endif %}
{% if not winners_announced and not is_registered %} {% if not session.get('user_id') %} 🔐{{ t('login_to_join') | default('LOGIN TO JOIN') }} {% elif match.registration_open %} {% elif match.registration_not_yet_open %} 🕐{{ t('reg_not_open_yet') | default('Registration Not Open Yet') }} {% endif %} {% endif %}
{% if match.game %} {{ glogo_hero(match.game) }} {% else %}
🏆
{% endif %}
{% if match.game %} {{ match.game.name }} {% endif %} {% if match.mode %} {{ match.mode.name }} {% endif %} {% if match.status == 'live' %} {{ t('live') | default('LIVE') }} {% elif match.status == 'upcoming' %} {{ t('upcoming') | default('UPCOMING') }} {% elif winners_announced %} ✓ {{ t('finished') | default('FINISHED') }} {% endif %}

{{ match.title }}

{{ t('featured_tournament_desc') | default('The ultimate competitive showdown. Compete for glory and the top prize pool.') }}

${{ match.prize_pool }}
{{ t('prize_pool') | default('Prize Pool') }}
{{ match.current_players }}/{{ match.capacity }}
{{ t('players') | default('Players') }}
{{ match.entry_fee == 0 and t('free') | default('FREE') or '$' ~ match.entry_fee }}
{{ t('entry_fee') | default('Entry Fee') }}
{% if match.starts_at %}
00:00:00
{{ t('starts_in') | default('Starts In') }}
{% endif %}
{% if winners_announced %}
{% endif %}

{{ t('tournament_info') | default('Tournament Info') }}

{{ t('format') | default('Format') }} {{ match.mode.name if match.mode else '—' }}
{{ t('entry_fee') | default('Entry Fee') }} {{ match.entry_fee == 0 and t('free') | default('FREE') or '$' ~ match.entry_fee }} USDT
{{ t('prize_pool') | default('Prize Pool') }} ${{ match.prize_pool }}
{{ t('status') | default('Status') }} {% if match.status == 'live' %}LIVE{% else %}{{ match.status }}{% endif %}
{% if match.starts_at %}
{{ t('starts_at') | default('Starts At') }} {{ match.starts_at.strftime('%Y-%m-%d %H:%M UTC') }}
{% endif %}
{{ t('players') | default('Players') }} {{ match.current_players }} / {{ match.capacity }}
{% if session.get('user_id') %}
{% if winners_announced %}
🏆 {{ t('winners_announced') | default('Winners Announced') }}
{{ t('tournament_over') | default('This tournament has ended.') }}
{% elif is_registered %}
✓ {{ t('registered') }}
{{ t('you_are_in') | default('You are registered!') }}
{% elif match.registration_not_yet_open %}
🕐 {{ t('reg_not_open_yet') | default('Registration Not Open Yet') }}
{{ t('reg_opens_at_line') | default('Registration opens at 12 midnight (00:00) before the match day:') }}
{{ reg_opens_at.strftime('%Y-%m-%d') if reg_opens_at else '—' }} · 00:00
{% elif match.registration_closed %}
🔒 {{ t('reg_closed') | default('Registration Closed') }}
{{ t('reg_closed_started') if reg_closed_reason == 'started' else t('reg_closed') | default('Registration is closed for this match.') }}
{% else %} {% endif %}
{% else %} {% endif %}

📋 {{ t('match_rules') | default('Match Rules') }}

{% if match.rules %}
{% for line in match.rules.splitlines() %}{% if line.strip() %}
• {{ line }}
{% endif %}{% endfor %}
{% else %}
  • • {{ t('rule_1v1') | default('Best of 1 single elimination') }}
  • • {{ t('rule_match_code') | default('Room code published at match start') }}
  • • {{ t('rule_report') | default('Must report results within 30 min') }}
  • • {{ t('rule_disconnect') | default('Disconnect > 5 min = forfeit') }}
  • • {{ t('rule_cheat') | default('Cheating = permanent ban') }}
{{ t('rules_default_note') | default('No specific rules have been set for this match yet.') }}
{% endif %}

{{ t('bracket') | default('BRACKET') }}

{{ t('round_of_16') | default('ROUND OF 16') }}
Team Alpha 3
Team Alpha WON
Team Bravo 2
Team Bravo WON
Team Charlie 1
Team Delta
Team Echo 3
Team Echo WON
{{ t('quarter_finals') | default('QUARTER FINALS') }}
Team Alpha WON
Team Bravo
Team Charlie
Team Echo WON
{{ t('semi_finals') | default('SEMI FINALS') }}
Team Alpha
Team Echo WON
🏆 {{ t('finals') | default('FINALS') }}
Team Alpha
Team Echo
{% if winners_announced and winner_rows %} {% for p in winner_rows[:3] %}
${{ '%.2f' | format(match_prizes.get(p.user_id, 0)) }}
{% if loop.index0 == 0 %}🥇{% elif loop.index0 == 1 %}🥈{% else %}🥉{% endif %} {{ t('first_place') if loop.index0 == 0 else (t('second_place') if loop.index0 == 1 else t('third_place')) }}
{% endfor %} {% else %}
${{ match.prize_pool }}
🏆 {{ t('prize_by_rank_note') | default('Prizes are paid per rank and shown here once winners are announced.') }}
{% endif %}
{% endblock %} {% block scripts %} {% endblock %}