diff options
| author | Yuval Adam <_@yuv.al> | 2025-03-04 22:57:03 +0100 |
|---|---|---|
| committer | Yuval Adam <_@yuv.al> | 2025-03-04 22:57:03 +0100 |
| commit | 7594c37f28cdaf58a718d2e981000cb2a3a3e7e5 (patch) | |
| tree | b237cd8a15433c981279bec2150482de11799d73 /index.html | |
| parent | 812a1f0c307f23922e939107018191c39b770e24 (diff) | |
Split styles and redesign
Diffstat (limited to 'index.html')
| -rw-r--r-- | index.html | 386 |
1 files changed, 9 insertions, 377 deletions
@@ -19,384 +19,15 @@ <link rel="manifest" href="/site.webmanifest"> <meta name="theme-color" content="#2c3e50"> - <style> - body { - font-family: 'Fredoka One', 'Baloo', 'Arial Rounded MT Bold', sans-serif; - margin: 0; - padding: 0; - background: linear-gradient(135deg, #2c3e50 0%, #1a2530 100%); - color: white; - min-height: 100vh; - display: flex; - flex-direction: column; - align-items: center; - justify-content: center; - font-size: 20px; - } - - .container { - max-width: 800px; - margin: 0 auto; - padding: 20px; - text-align: center; - } - - h1 { - color: #f39c12; - text-shadow: - 0 0 10px rgba(243, 156, 18, 0.7), - 3px 3px 0px #e74c3c; - font-size: 4em; - margin-bottom: 30px; - margin-top: 1rem; - letter-spacing: 2px; - } - - .game-container { - background-color: #34495e; - border-radius: 25px; - padding: 35px; - margin-bottom: 30px; - box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3), - 0 0 20px rgba(243, 156, 18, 0.3); - border: 5px solid #3498db; - } - - .options { - display: grid; - grid-template-columns: 1fr 1fr; - gap: 25px; - margin-top: 35px; - } - - button { - cursor: pointer; - font-family: 'Fredoka One', 'Baloo', 'Arial Rounded MT Bold', sans-serif; - transition: all 0.3s ease; - font-weight: bold; - letter-spacing: 1px; - text-shadow: 2px 2px 0px rgba(0, 0, 0, 0.3); - } - - .start-button { - background-color: #e74c3c; - color: white; - border: none; - border-radius: 50px; - padding: 25px 50px; - font-size: 32px; - margin: 30px 0; - box-shadow: 0 8px 0 #c0392b, - 0 0 20px rgba(231, 76, 60, 0.4); - text-transform: uppercase; - } + <!-- Google Fonts --> + <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=Fredoka:wght@400;600&family=Poppins:wght@400;600;700&display=swap" + rel="stylesheet"> - .start-button:hover { - background-color: #f45c4c; - transform: translateY(-5px); - box-shadow: 0 13px 0 #c0392b, - 0 0 30px rgba(231, 76, 60, 0.6); - } - - .start-button:active { - transform: translateY(3px); - box-shadow: 0 5px 0 #c0392b; - } - - .option-button { - background-color: #3498db; - color: white; - border: none; - border-radius: 20px; - font-size: 36px; - padding: 25px 15px; - box-shadow: 0 8px 0 #2980b9, - 0 0 15px rgba(52, 152, 219, 0.5); - min-height: 120px; - display: flex; - flex-direction: column; - align-items: center; - justify-content: center; - position: relative; - } - - .option-button:hover { - background-color: #4aa3df; - transform: translateY(-5px); - box-shadow: 0 13px 0 #2980b9, - 0 0 25px rgba(52, 152, 219, 0.7); - } - - .option-button:active { - transform: translateY(3px); - box-shadow: 0 5px 0 #2980b9; - } - - .option-button.correct { - background-color: #2ecc71; - box-shadow: 0 8px 0 #27ae60, - 0 0 30px rgba(46, 204, 113, 0.8); - animation: pulse-green 0.5s infinite alternate; - } - - .option-button.incorrect { - background-color: #e74c3c; - box-shadow: 0 8px 0 #c0392b, - 0 0 30px rgba(231, 76, 60, 0.8); - animation: shake 0.5s; - } - - .char-display { - font-size: 36px; - font-weight: bold; - } - - .morse-hint { - display: block; - font-size: 18px; - margin-top: 10px; - color: rgba(255, 255, 255, 0.8); - font-family: monospace; - letter-spacing: 2px; - } - - .key-label { - position: absolute; - top: 5px; - right: 10px; - font-size: 14px; - color: rgba(255, 255, 255, 0.7); - font-family: monospace; - } - - .key-pressed { - transform: translateY(3px) !important; - box-shadow: 0 5px 0 #2980b9 !important; - transition: transform 0.05s, box-shadow 0.05s; - } - - @keyframes pulse-green { - from { - box-shadow: 0 8px 0 #27ae60, 0 0 20px rgba(46, 204, 113, 0.8); - } - - to { - box-shadow: 0 8px 0 #27ae60, 0 0 40px rgba(46, 204, 113, 1); - } - } - - @keyframes shake { - - 0%, - 100% { - transform: translateX(0); - } - - 20%, - 60% { - transform: translateX(-10px); - } - - 40%, - 80% { - transform: translateX(10px); - } - } - - .score-container { - margin-bottom: 20px; - width: 100%; - } - - .score-widget { - background-color: rgba(255, 255, 255, 0.1); - border-radius: 10px; - padding: 15px; - box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); - display: flex; - flex-direction: row; - align-items: center; - justify-content: space-between; - } - - .score-info { - display: flex; - flex-direction: column; - align-items: flex-start; - margin-right: 15px; - min-width: 100px; - } - - .score-label { - font-size: 18px; - margin-bottom: 5px; - color: rgba(255, 255, 255, 0.8); - } - - .score-value { - font-size: 24px; - font-weight: bold; - } - - .score-tracker { - display: flex; - flex-wrap: wrap; - justify-content: center; - gap: 5px; - max-width: 100%; - margin-top: 5px; - } - - .score-dot { - width: 12px; - height: 12px; - border-radius: 50%; - margin: 2px; - transition: all 0.3s ease; - } - - .score-dot.correct { - background-color: #2ecc71; - box-shadow: 0 0 5px rgba(46, 204, 113, 0.7); - } - - .score-dot.incorrect { - background-color: #e74c3c; - box-shadow: 0 0 5px rgba(231, 76, 60, 0.7); - } - - .feedback { - height: 40px; - margin-top: 30px; - font-weight: bold; - font-size: 28px; - color: #f39c12; - text-shadow: 0 0 10px rgba(243, 156, 18, 0.5); - } - - .footer { - margin-top: 30px; - text-align: center; - font-family: Arial, sans-serif; - font-size: 14px; - color: rgba(255, 255, 255, 0.7); - width: 100%; - } - - .footer a { - color: #3498db; - text-decoration: none; - font-weight: bold; - transition: color 0.3s; - } - - .footer a:hover { - color: #4aa3df; - text-decoration: underline; - } - - .title-link { - color: inherit; - text-decoration: none; - transition: text-shadow 0.3s ease; - } - - .title-link:hover { - text-shadow: - 0 0 15px rgba(243, 156, 18, 0.8), - 4px 4px 0px #e74c3c; - } - - .score { - font-size: 32px; - font-weight: bold; - color: #f39c12; - margin-bottom: 30px; - text-shadow: 2px 2px 0px rgba(0, 0, 0, 0.3), - 0 0 10px rgba(243, 156, 18, 0.3); - } - - #gameArea { - display: none; - } - - #startScreen { - margin: 50px 0; - background-color: #34495e; - padding: 40px; - border-radius: 25px; - box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3), - 0 0 20px rgba(231, 76, 60, 0.3); - border: 5px dashed #e74c3c; - } - - #startScreen p { - font-size: 26px; - margin-bottom: 40px; - color: #fff; - line-height: 1.5; - text-shadow: 0 0 10px rgba(255, 255, 255, 0.2); - } - - select { - padding: 15px 25px; - font-size: 24px; - border-radius: 15px; - border: 3px solid #3498db; - background-color: #2c3e50; - color: #fff; - font-family: 'Fredoka One', 'Baloo', 'Arial Rounded MT Bold', sans-serif; - cursor: pointer; - box-shadow: 0 0 15px rgba(52, 152, 219, 0.3); - } - - .settings { - background-color: #34495e; - padding: 25px; - border-radius: 20px; - margin-top: 30px; - font-size: 24px; - border: 3px solid #3498db; - box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2), - 0 0 15px rgba(52, 152, 219, 0.3); - } - - .settings label { - font-size: 24px; - margin-right: 15px; - color: #3498db; - font-weight: bold; - text-shadow: 0 0 10px rgba(52, 152, 219, 0.3); - } - - .hint-setting { - display: inline-block; - margin-left: 30px; - } - - .hint-setting input[type="checkbox"] { - width: 24px; - height: 24px; - vertical-align: middle; - cursor: pointer; - } - - .chart-link { - margin-top: 20px; - font-size: 18px; - } - - .chart-link a { - color: #3498db; - text-decoration: none; - transition: color 0.3s; - } - - .chart-link a:hover { - color: #f39c12; - text-decoration: underline; - } - </style> + <!-- Main Stylesheet --> + <link rel="stylesheet" href="styles.css"> </head> <body> @@ -487,6 +118,7 @@ // Hide start screen and show game area startScreen.style.display = 'none'; gameArea.style.display = 'block'; + document.body.classList.add('game-active'); // Initialize the game init(); |
