|
| 1 | +<!DOCTYPE html> |
| 2 | +<html lang="en"> |
| 3 | + <head> |
| 4 | + <meta charset="utf-8" /> |
| 5 | + <link rel="icon" href="%PUBLIC_URL%/favicon.ico" /> |
| 6 | + <meta name="viewport" content="width=device-width, initial-scale=1" /> |
| 7 | + <meta name="theme-color" content="#667eea" /> |
| 8 | + <meta |
| 9 | + name="description" |
| 10 | + content="Elemental Arena - A strategic element-based battle game with mana wagering and upgrades" |
| 11 | + /> |
| 12 | + <meta name="keywords" content="game, strategy, elements, battle, mana, elemental, react" /> |
| 13 | + <meta name="author" content="Elemental Arena Team" /> |
| 14 | + |
| 15 | + <!-- Preload fonts for better performance --> |
| 16 | + <link rel="preconnect" href="https://fonts.googleapis.com" /> |
| 17 | + <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin /> |
| 18 | + <link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Orbitron:wght@400;700;900&family=Rajdhani:wght@400;500;600;700&family=Cinzel:wght@400;600;700&display=swap" rel="stylesheet" /> |
| 19 | + |
| 20 | + <title>⚡ Elemental Arena - Strategic Battle Game</title> |
| 21 | + |
| 22 | + <style> |
| 23 | + /* Loading screen styles */ |
| 24 | + #loading-screen { |
| 25 | + position: fixed; |
| 26 | + top: 0; |
| 27 | + left: 0; |
| 28 | + width: 100%; |
| 29 | + height: 100%; |
| 30 | + background: url("%PUBLIC_URL%/resources/background.png") center/cover no-repeat; |
| 31 | + background-size: cover; |
| 32 | + display: flex; |
| 33 | + flex-direction: column; |
| 34 | + justify-content: center; |
| 35 | + align-items: center; |
| 36 | + z-index: 9999; |
| 37 | + font-family: "Volkhov", serif; |
| 38 | + } |
| 39 | + |
| 40 | + .logo-container { |
| 41 | + margin-bottom: 2rem; |
| 42 | + animation: logo-fade-in 2s ease-out; |
| 43 | + } |
| 44 | + |
| 45 | + .game-logo { |
| 46 | + width: 600px; |
| 47 | + height: 600px; |
| 48 | + filter: drop-shadow(0 0 30px rgba(218, 165, 32, 0.8)); |
| 49 | + animation: logo-glow 3s ease-in-out infinite; |
| 50 | + } |
| 51 | + |
| 52 | + .game-title { |
| 53 | + font-size: 4rem; |
| 54 | + font-weight: 700; |
| 55 | + color: #daa520; |
| 56 | + text-shadow: 0 0 20px rgba(218, 165, 32, 0.8), 0 0 40px rgba(218, 165, 32, 0.6), |
| 57 | + 0 0 60px rgba(218, 165, 32, 0.4), 2px 2px 4px rgba(0, 0, 0, 0.8); |
| 58 | + letter-spacing: 8px; |
| 59 | + text-align: center; |
| 60 | + animation: title-glow 3s ease-in-out infinite; |
| 61 | + } |
| 62 | + |
| 63 | + @keyframes logo-fade-in { |
| 64 | + 0% { |
| 65 | + opacity: 0; |
| 66 | + transform: scale(0.5); |
| 67 | + } |
| 68 | + 100% { |
| 69 | + opacity: 1; |
| 70 | + transform: scale(1); |
| 71 | + } |
| 72 | + } |
| 73 | + |
| 74 | + @keyframes logo-glow { |
| 75 | + 0%, |
| 76 | + 100% { |
| 77 | + filter: drop-shadow(0 0 30px rgba(218, 165, 32, 0.8)); |
| 78 | + } |
| 79 | + 50% { |
| 80 | + filter: drop-shadow(0 0 60px rgba(218, 165, 32, 1)); |
| 81 | + } |
| 82 | + } |
| 83 | + |
| 84 | + @keyframes title-glow { |
| 85 | + 0%, |
| 86 | + 100% { |
| 87 | + text-shadow: 0 0 20px rgba(218, 165, 32, 0.8), 0 0 40px rgba(218, 165, 32, 0.6), |
| 88 | + 0 0 60px rgba(218, 165, 32, 0.4), 2px 2px 4px rgba(0, 0, 0, 0.8); |
| 89 | + } |
| 90 | + 50% { |
| 91 | + text-shadow: 0 0 30px rgba(218, 165, 32, 1), 0 0 60px rgba(218, 165, 32, 0.8), |
| 92 | + 0 0 90px rgba(218, 165, 32, 0.6), 2px 2px 4px rgba(0, 0, 0, 0.8); |
| 93 | + } |
| 94 | + } |
| 95 | + |
| 96 | + @media (max-width: 768px) { |
| 97 | + .game-logo { |
| 98 | + width: 550px; |
| 99 | + height: 550px; |
| 100 | + } |
| 101 | + .game-title { |
| 102 | + font-size: 3rem; |
| 103 | + letter-spacing: 4px; |
| 104 | + } |
| 105 | + } |
| 106 | + |
| 107 | + @media (max-width: 480px) { |
| 108 | + .game-logo { |
| 109 | + width: 450px; |
| 110 | + height: 450px; |
| 111 | + } |
| 112 | + .game-title { |
| 113 | + font-size: 2.5rem; |
| 114 | + letter-spacing: 2px; |
| 115 | + } |
| 116 | + } |
| 117 | + |
| 118 | + /* Hide navigation during loading */ |
| 119 | + .mobile-nav { |
| 120 | + opacity: 0; |
| 121 | + visibility: hidden; |
| 122 | + transition: all 0.5s ease; |
| 123 | + } |
| 124 | + |
| 125 | + /* Show navigation when React loads */ |
| 126 | + .loaded .mobile-nav { |
| 127 | + opacity: 1; |
| 128 | + visibility: visible; |
| 129 | + } |
| 130 | + |
| 131 | + /* Hide loading screen when React loads */ |
| 132 | + .loaded #loading-screen { |
| 133 | + opacity: 0; |
| 134 | + visibility: hidden; |
| 135 | + transition: all 0.5s ease; |
| 136 | + } |
| 137 | + </style> |
| 138 | + </head> |
| 139 | + <body> |
| 140 | + <noscript> |
| 141 | + <div style="text-align: center; padding: 2rem; font-family: Arial, sans-serif"> |
| 142 | + <h1>⚠️ JavaScript Required</h1> |
| 143 | + <p>You need to enable JavaScript to run this app.</p> |
| 144 | + <p>Elemental Arena requires JavaScript for the interactive gameplay experience.</p> |
| 145 | + </div> |
| 146 | + </noscript> |
| 147 | + |
| 148 | + <!-- Loading Screen --> |
| 149 | + <div id="loading-screen"> |
| 150 | + <div class="logo-container"> |
| 151 | + <img src="%PUBLIC_URL%/resources/logo.svg" alt="Logo" class="game-logo" /> |
| 152 | + </div> |
| 153 | + </div> |
| 154 | + |
| 155 | + <!-- React App Root --> |
| 156 | + <div id="root"></div> |
| 157 | + |
| 158 | + <script> |
| 159 | + // Hide loading screen when React app loads |
| 160 | + window.addEventListener("load", function () { |
| 161 | + setTimeout(function () { |
| 162 | + document.body.classList.add("loaded"); |
| 163 | + setTimeout(function () { |
| 164 | + const loadingScreen = document.getElementById("loading-screen"); |
| 165 | + if (loadingScreen) { |
| 166 | + loadingScreen.remove(); |
| 167 | + } |
| 168 | + }, 2000); |
| 169 | + }, 4000); |
| 170 | + }); |
| 171 | + |
| 172 | + // Performance monitoring |
| 173 | + if ("performance" in window) { |
| 174 | + window.addEventListener("load", function () { |
| 175 | + setTimeout(function () { |
| 176 | + const perfData = performance.getEntriesByType("navigation")[0]; |
| 177 | + console.log("🎮 Elemental Arena loaded in:", Math.round(perfData.loadEventEnd - perfData.fetchStart), "ms"); |
| 178 | + }, 0); |
| 179 | + }); |
| 180 | + } |
| 181 | + </script> |
| 182 | + </body> |
| 183 | +</html> |
0 commit comments