Pixel art, with its nostalgic charm and intricate designs, has captivated artists and gamers alike for decades. This unique art form, characterized by its use of small, distinct pixels, continues to inspire creativity in the digital age.
In this article, we will explore ten stunning examples of pixel art that showcase the versatility and beauty of this medium. From retro game sprites to modern masterpieces, these examples highlight the enduring appeal of pixel art.
CODE1
Here's the code:
CODETEXT1
CODE2
Here's the code:
CODETEXT2
CODE3
Here's the code:
CODETEXT3
CODE4
Here's the code:
CODETEXT4
CODE5
Here's the code:
CODETEXT5
Subframe's drag-and-drop interface and intuitive, responsive canvas make it effortless to design pixel-perfect UI. Loved by designers and developers alike, it ensures precision and creativity in every project.
Start for free and bring your pixel art visions to life with Subframe today!
CODE6
Here's the code:
CODETEXT6
CODE7
Here's the code:
CODETEXT7
CODE8
Here's the code:
CODETEXT8
CODE9
Here's the code:
CODETEXT9
CODE10
Here's the code:
CODETEXT10
Ready to elevate your UI designs? With Subframe, you can create pixel-perfect interfaces and stunning pixel art effortlessly. Our drag-and-drop editor ensures efficiency and precision in every project.
Don't wait to bring your creative visions to life. Start for free and begin designing immediately with Subframe!
<html> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Retro Gaming Navigation</title> <style> @import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap'); :root { --black: #0f0f0f; --white: #f8f8f8; --yellow: #ffbc42; --red: #d81159; --blue: #0496ff; --green: #5fad56; --purple: #8067b7; } * { margin: 0; padding: 0; box-sizing: border-box; } body { font-family: 'Press Start 2P', cursive; background-color: var(--black); color: var(--white); padding: 20px; height: 100vh; display: flex; flex-direction: column; overflow-x: hidden; background-image: radial-gradient(var(--purple) 1px, transparent 1px), radial-gradient(var(--blue) 1px, transparent 1px); background-size: 50px 50px; background-position: 0 0, 25px 25px; background-blend-mode: multiply; background-attachment: fixed; background-opacity: 0.05; } .container { max-width: 700px; width: 100%; margin: 0 auto; padding: 10px; } .header { margin-bottom: 20px; text-align: center; animation: scanlines 6s linear infinite; text-shadow: 2px 2px 0 var(--red), -2px -2px 0 var(--blue); } .header h1 { font-size: 1.8rem; margin-bottom: 15px; color: var(--yellow); letter-spacing: -1px; } .header p { font-size: 0.7rem; line-height: 1.5; color: var(--white); max-width: 80%; margin: 0 auto; } .nav-container { position: relative; width: 100%; height: 115px; background-color: var(--black); border: 5px solid var(--white); padding: 10px; margin-bottom: 30px; box-shadow: 0 0 0 5px var(--black), 0 0 0 10px var(--red), 10px 10px 0 0 rgba(0,0,0,0.5); } .nav-bar { display: flex; justify-content: space-around; gap: 5px; width: 100%; height: 100%; padding: 5px; background: repeating-linear-gradient( 45deg, var(--blue), var(--blue) 10px, var(--purple) 10px, var(--purple) 20px ); border: 3px solid var(--white); position: relative; overflow: hidden; } .nav-bar::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px; background: rgba(255, 255, 255, 0.5); animation: scanline 6s linear infinite; z-index: 1; } .nav-item { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 8px 5px; text-decoration: none; color: var(--white); font-size: 0.6rem; position: relative; transition: all 0.2s ease; cursor: pointer; z-index: 2; } .nav-item:hover { transform: scale(1.1); color: var(--yellow); } .nav-item.active { background-color: rgba(248, 248, 248, 0.2); color: var(--yellow); } .nav-icon { display: block; width: 32px; height: 32px; background-size: contain; background-repeat: no-repeat; background-position: center; margin-bottom: 8px; image-rendering: pixelated; transition: transform 0.3s ease; } .nav-item:hover .nav-icon { animation: sprite-bounce 0.5s infinite alternate; } .home-icon { background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAACXBIWXMAAAsTAAALEwEAmpwYAAABMElEQVR4nO2WsU7DMBCG/44MWYs6dujSBbF2QIwdmPsCDLwEEg/AE3RgYWTuCzCzZmNm6JoNoTJE4pE+JYri2LFxB0T+pFOUu9z333lnRpHp0FbMB0XxzHYIuAVWQMD/RQC8ArfM3ZMDkT+XjM++ZBtQ32Fs9F8G5KYvOZw63Pm21lIwYxs9zFxuSr/xnJ3e9xJwp9xVa7Qna7xyG5Bj08N/vY3kd7M+3Mfw+sPr+eV5VwE+JrY1dD0H3g0D2q+3uTvQAWP6ZaAvhtZoD6xNYM0q5mKYQAdKU1AoA7kJqG1gqBU8AifANXAJ7MvYgbx7lOfkI0YE8ql21Vc5vQtsM1jLeN4HJF9tRy/7gORXvkpPKVX7knkMJMqtPJI/6uv+u2a3+70ZDDRyoFJ9An7ZQPpA07Y6AAAAAElFTkSuQmCC"); } .games-icon { background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAACXBIWXMAAAsTAAALEwEAmpwYAAABc0lEQVR4nO2WPU/DMBDHf67aSVEXundgQwixMcDOF+gHQEKiAzyCBAtjly4dYMjCB2CCEcZIfQF2MEKlRrwIpYljx05MJf6nk+y77O//znYuSdKNJEnuklQCfOTWI3BD5MgAfAPvwC3Qi+oBcVFLPgrFEvgGfnT/taaFcxcDFrGiOVAAnkUDtv55bmghp1Ow/6g0eVIB00rzvv9LnkJ9qoyjbYDQ4pUJlRRtlXFseKRKrIm49G+OVHuoOg/6qrPEkZeJJ4LFqYnJI5mYSzRWn+UWDWwRrdUe8AQcNmWgaeQNNuAcuNePO6B7RAcnpqr+pLRdBo43YiAHLv6wAP5D6jDw5KiBeAO6BebAJ/A8pNb1PB+jFbYJuIxDAezrC+QMWAB3IbWV59mS+LH0nZF/XcqBI2BHH1b6b2qN1nN8j8Uux8X1qqQDTGKQTwznXkpqRh9HrmyWA9rEuObcFQ3wQNPIiXjhU0Z+ZrPgL+kbaCRrXJMnwA8jCjmFLu6PnAAAAABJRU5ErkJggg=="); } .shop-icon { background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAACXBIWXMAAAsTAAALEwEAmpwYAAAA5ElEQVR4nO2WMQ6CQBBF/7JegJ3cQw9gZ0M8i1fQwniNNRQ2Vl7AkxhrbfQIxtJKExXdZR1IhJnZgonzkt2Qme3+P7MLEKWpSTLbcg4Ax0zeckoJORD5cMrDAM+l+bUhygCOryUeOQG4tJ3JAZBj2xn3AE0PiKKDqAxgLxHg9QWGnhBlAEtdz+rXdwKsJ3WvkbBF/pBIA6xG9R9iBrAc1wDSAFRsAF2UdIDFsJGEVcD0NukAeWAPFgFJB9gNGsD7t+z3ggHQ/QaUP6UKAMQ3QR5gPWnJ2DYAJcQ9wbkmANlzaYAEryS1VYDPoDkAAAAASUVORK5CYII="); } .forum-icon { background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAACXBIWXMAAAsTAAALEwEAmpwYAAAA3klEQVR4nO2XMQrCQBREZ9MZe7UT7L2APYKVpZ2NYBevsLWx8ggWXsITeAkrO0URsRLBJNmNGwzMg6nCzOzjf5tAiFEGsA3mSOeYXwJYkT73OTCdC3BOnvmJxB8KAC6Zw3J4blyAOvP/ZXkHthlQZc8QY9vHDN4C2HzZj3ZDdrcbVruzB5LfjDMB3DKgMYeDKwHyxcEDJnVsxu1+5D+CfP49nYt0z4FwA+qbWbQ5UHyb/wpQJoC4AVUGyBrQJ6C3oDfAEoGsBaMDSgRSCT09kAiUEMTaA0IAmfeCGOM8eAETzV3r2XsktAAAAABJRU5ErkJggg=="); } .account-icon { background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAACXBIWXMAAAsTAAALEwEAmpwYAAAA/ElEQVR4nO2WMQrCQBBFfyIWdnoDO0FsrL2AeCTvYCVYew8voLWljXgLCwvtPIBtClFQsxvXEJjdZDYuIjLwIc3szP5/JgshSSfGSE0MnN8cqcvUdQtgBrwbrhPQAY4uAJ/AG8AB2oZ7OXBQEXwCS+AK3IEVkGn+GtirCEbAU9jOwBg4Cfs1MPAGcIWKV/6nvlfYj60B1DWvtH+BtrU5vY/Np4Z3z9hcA/TXuVZLc27Nk77+qfM5NuJMtlzUgP1Nn78AhXS3TNKANpDb/OmKBiygD5y1s7w0qfQDt/+UbGcL4Kqk0sIEcTkHDOKqTQiUBSCZz7EU5LEFJHnyAXQ0Mx6zefCYAAAAAElFTkSuQmCC"); } .content { margin-top: 20px; text-align: center; } .game-preview { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 20px; margin-top: 20px; } .game-card { background-color: var(--black); border: 3px solid var(--white); padding: 10px; border-radius: 5px; text-align: center; transition: all 0.3s ease; transform-origin: center; position: relative; overflow: hidden; } .game-card:before { content: ''; position: absolute; top: -5px; left: -5px; right: -5px; bottom: -5px; border: 2px solid var(--yellow); border-radius: 7px; opacity: 0; transition: opacity 0.3s ease; } .game-card:hover { transform: translateY(-5px) scale(1.05); box-shadow: 0 10px 15px rgba(0,0,0,0.3); } .game-card:hover:before { opacity: 1; } .game-card img { width: 100%; height: 80px; image-rendering: pixelated; margin-bottom: 8px; border: 2px solid var(--blue); } .game-card h3 { font-size: 0.6rem; margin-bottom: 5px; color: var(--yellow); } .game-card p { font-size: 0.5rem; color: var(--white); } .footer { margin-top: auto; text-align: center; font-size: 0.6rem; padding: 15px 0; color: var(--white); border-top: 2px dashed var(--purple); } .coin { position: absolute; width: 16px; height: 16px; background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAACXBIWXMAAAsTAAALEwEAmpwYAAAA4ElEQVR4nM2TMQrCQBBFX2KnYCeW9nZiLYKlFxA8g+AVPIXgGcTOykI9g5VYiGAjamGZQAw7MZpdSeEPn2Z25s/fGcgVLKAF9MAduOmaNM/tgEPp8BwY60o6mwG3EHCVSR3gCTyACVADF9XYIWRVMqgCbWAJHIGzhC6AB3ACVsBSQofvVLQPDoEI2ABnCX18CnMpTJMz31OxzQR0gcgj4xKYS75oZvhEaZjUJeAVR7EoGAqofGlgVbMJmJf5+AbVnL3yAqzJV/jvP2FfcpBaoDKbNbAz+VaZzW9UlBQ+Ad6DMWl3zJC6AAAAAElFTkSuQmCC"); background-size: contain; z-index: 10; pointer-events: none; opacity: 0; animation: coin-spin 0.5s linear infinite; } @keyframes coin-spin { 0%, 100% { background-position: 0 0; } 25% { background-position: -4px 0; } 50% { background-position: -8px 0; } 75% { background-position: -12px 0; } } @keyframes scanline { 0% { top: 0; } 100% { top: 100%; } } @keyframes scanlines { 0% { text-shadow: 2px 2px 0 var(--red), -2px -2px 0 var(--blue); } 25% { text-shadow: -2px 2px 0 var(--green), 2px -2px 0 var(--yellow); } 50% { text-shadow: 2px -2px 0 var(--blue), -2px 2px 0 var(--red); } 75% { text-shadow: -2px -2px 0 var(--yellow), 2px 2px 0 var(--green); } 100% { text-shadow: 2px 2px 0 var(--red), -2px -2px 0 var(--blue); } } @keyframes sprite-bounce { 0% { transform: translateY(0); } 100% { transform: translateY(-5px); } } /* Responsive styles */ @media (max-width: 600px) { .header h1 { font-size: 1.4rem; } .header p { font-size: 0.6rem; } .nav-item { font-size: 0.5rem; } .nav-icon { width: 24px; height: 24px; margin-bottom: 4px; } .game-preview { grid-template-columns: repeat(auto-fit, minmax(100px, 1fr)); gap: 15px; } .game-card h3 { font-size: 0.5rem; } .game-card p { font-size: 0.4rem; } } @media (max-width: 400px) { .nav-container { height: auto; } .nav-bar { flex-wrap: wrap; } .nav-item { min-width: 30%; margin-bottom: 10px; } .header h1 { font-size: 1.2rem; } } /* Retro CRT Effect */ .crt-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.25) 50%); background-size: 100% 4px; z-index: 100; opacity: 0.15; pointer-events: none; } .crt-flicker { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(255, 255, 255, 0.05); animation: flicker 0.3s infinite alternate; pointer-events: none; z-index: 101; } @keyframes flicker { 0% { opacity: 0.1; } 100% { opacity: 0; } } </style> </head> <body> <div class="container"> <div class="header"> <h1>8-BIT ARCADE ZONE</h1> <p>PRESS START TO ENTER THE GOLDEN AGE OF GAMING</p> </div> <div class="nav-container"> <nav class="nav-bar"> <a class="nav-item active"> <div class="nav-icon home-icon"></div> HOME </a> <a class="nav-item"> <div class="nav-icon games-icon"></div> GAMES </a> <a class="nav-item"> <div class="nav-icon shop-icon"></div> SHOP </a> <a class="nav-item"> <div class="nav-icon forum-icon"></div> FORUM </a> <a class="nav-item"> <div class="nav-icon account-icon"></div> ACCOUNT </a> </nav> </div> <div class="content"> <h2 style="font-size: 0.9rem; color: var(--green); margin-bottom: 10px;">FEATURED CLASSICS</h2> <div class="game-preview"> <div class="game-card"> <img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGQAAABkCAYAAABw4pVUAAAACXBIWXMAAAsTAAALEwEAmpwYAAAFFklEQVR4nO2dW4hWVRTHf6NlZWWWMnQxKbuQUYFFN4pMu0APUURRQtRDQtBT0UtJD0EPUfTSRQ1EusNEUN0wukgXioIuu5T2UGlRYWqTzeh8LGsdHM+c75w9e+99vn2+9YNhYM7aa6/zn7PX3muvvSFJkiRJkiRJkiRpF8dKukfSaklbJe2V9LWkFZJubLrxMTJC0kJJP0iqBmq7pGWShjXdEdcVCwf4cEbqi6YbH4tDaghxUdMdiEGKrBaQIqsFpMhqASmyWkCKrBaQIqsFpMiKFFmDIwZP+yS9JelySSeY7ZekKyW9I6lvaR2a7ogLMyRt8FxAf9TZBt8mDiZKWj/ID/GzpHslHWN9TZa0qcZ2W5tumAvnSnpZ0jpJX0l6X9IDko4OoW2XFHR+Q9IsScdZh3+RdHaoIDlb0ld13qlLSFk5TpP0fqC+PKqaFXRG24KjpCQYJ/r2I0Rk9YLuURLKYI38bUkTJH0QsD/LvKLLg2nW4KxAosr//kFLQ5pZs0f1tQO1tA59KGxVHMKCsHh1oD6NdYush+se1VcN1NK6Zb9JejFQn3oflqN6kVXx9g/XoUc+Jg7BxTuYKDv+Ik2V9EPgfl3iFVm3DWwsyxzwSJcJ7+w3Jf0YuG9TQkVWr4lDCbOcP4NKKyXt9zjaXR+6cT2aOJRQZO2TtM6OC3ZJmm42z0zYnQGPdFd4tTdEE4cSiu9GGOqJzFCReGfIJg4lRFZPFr+qZ57NlsNtN0YehonDPklXlTBxKEFkTQ39jfpkTUwTh7YTwsSh7RQ3cUiRFTkpsiInRVbkpMiKnBRZkZMiK3JSZEVOiqzISZEVOSmyIidFVuSkyIqcFFmRkyIrclJkRU6KrDgZJelcSec13ZEUWZEzydJJLbLdwx2pmjklUmQVxGWNzVYr45Lj74MVlI5m4lAs5dRJkr6RtCNVHDNWXHaApFsk3d50h4ohVXx7qUPF9wGXHRBLGamU8e0hZXw7yCXj20HK+HaQMr4dtC3j+/dUF924gXKAZKq5pHRSxvdfNOsQ2Q8O0dH9Dc0QvwvVSRnfR1Onli7j+2OqC9eno1NG97uqLs7qZWQVSMr4DiG9mDiEPOu+PUfUGplHZv6jI2V8h6CXZXxT+l4vyvimmFsPqrrkHJQyvimGfxZ1iTooZXzXJeWgHkJHUsZ3XVLG911SxvddUsb3XVLGt24Z31SV1yVlfOuWMr7vkjK+75Iyvu+SMr7vkjK+75Iyvu+SMr7vUncwvCnpKFxfU8b3XVLGt24Z30scr5Eyvu+SMr7vkjK+75Iyvu+SMr7vkjK+75Iyvu+SMr7v0pExBz2gI1PGd11Sxre+mVsydct9nYs6MmV816UjKePbgymjA3RkyvgOYeTYJGeqahndHZK25v7c66Rswug40pE5453+4O9jnJTNtl3J5vxw3IXjbFb9GVhkhZ7QdIdKMN4iwx0SWbPOdVK2yfaWM/LL5tLb31bNtAiyK91EpyRr35V0ilVnmOhcJXoB/v1USX3KD+VbJF3eRKdKLBUMtvZJOr+BPjXOLZLe85ihH7B5SpfnyudIOqPuZceBzhZJsyUdnZWl/89oybdK6k9f/f4FwixJbzQ1cShhZOxXXuJjLn56I1VYo+L5EsrqpbLaETPVsoZ9N9gPssbf7ZwQJ+A+jJH0oCTI4mVlm/n9c62vyZLutXLbB+yYgPb7Lf+YJElRJEmSJEmSJEmSJEmSJEmSJEmSJEkT/AXGdE91dHt0hQAAAABJRU5ErkJggg==" alt="Space Invaders"> <h3>SPACE INVADERS</h3> <p>Shoot aliens before they reach Earth!</p> </div> <div class="game-card"> <img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGQAAABkCAYAAABw4pVUAAAACXBIWXMAAAsTAAALEwEAmpwYAAADmklEQVR4nO3dS2sTURQH8NNabUFFLbgQP4DiY+HCvQvfix+guhLBlRs/gtCFCF1YwScudOPCCoIIFdGFFkT8Ci6sShWlVkWttVXrOzGBpLRJrnd675lz8v/BUJIhbebXO/dMZiYThBBCCCGEEEIIIYQQFn0uMSRB2kF/YFfMkvDNZeGxsO8lbHb5kkZ1+ScXhH1KcbfLpzQqpI9GW0LQVMj9KMN0qlpCDMvCZpdvFPgX9bgsj3mGV//4LSu8wmuZJ+S2FGk8jMU0GY9+T4iPsJYQt3SvhN8jXn81/KXP0S98znMIb/QyT4iP8NYQ9HuG8EYvlxBeQ9YS4pbusSG81RM+n/mEsIrFt5BDsU2IPzhNw6dJOJPxzF2I3Cuk1L2vLPQPyXUFIS6YbBQKRf7S38n2Urhbwx7N+1qVbcLHPIfw0k2IPOlJM5j5C9knDU9K2FnjZT9YVtZPXRZ+5BWic4S45QnZGgaUJeHBPzKr5Fm75Bvhy8Vw7WA6v+Yy8RfzhLBlJSGuZZmQjWGjFuRX8Uu2C6Mylmq+MxX9bvkqXNR+RDiYJgT/EuJalgmRJ+5JCQ+F9f8RIeXxVDjazCPCQdYQk/Jqm6xR2bTsw2ql7ElzfxZOaNyf3GUVuZ3tQX1RDkvCVynE0bvCd7nLzfp8RTVUGrJaThKu1tncLQnDrdzpBmk2y0g1GZcGJQv25d1uMUY9sUW4I3c58olP8j15fmvv3fGkVUOltFxdPbWxOdN0ORlBw+VkBC2VkxEyVU5GSI4P8M0KmiknI2SwnIyQyXIyQobLyQgZLScjtJ2NsE3NDt4ueRffm5YLeSY03WVrMGitnHsljqo8LlwS8RuVnJrDreQbQZiWF+lRN2Zt3p2GQ/0tXZJdz4oeQUgJoWEFIVoQGlYQogWhYQUhWhAaVhCiBaFhBSFaEBpWEKIFoWEFIVoQGlYQogWhYQUhWhAaVhCiBaFhBSFaEBpWEKIFoWEFIVoQGlYQogWhYQUhWhAaVhCiBaFhBSE2hNTDDwbHDodgFT+tD0kbxPfYX7pnLR1YSL7xPdYJyTyOFzghGUK5oHXgqCWky5Czz3xsPCH1qBa0DnxCSH0qBcmDnxDSnOrBTwipT3+dz6dTfx99uEPCGaLyftSFvxSOVA6pXo1yXcEm4UNJCDfLJ8Uy+VDvlT2b5aetR3fP/mQ4ECDXwvTx1c4gECGEEEIIIYQQQgghhNgX/ALddNMkXKWJugAAAABJRU5ErkJggg==" alt="Pac-Man"> <h3>PAC-MAN</h3> <p>Navigate the maze and chomp all dots!</p> </div> <div class="game-card"> <img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGQAAABkCAYAAABw4pVUAAAACXBIWXMAAAsTAAALEwEAmpwYAAADUElEQVR4nO3dTWsTURQG4JPa+o0iCC4E9yL4D7TqH1AXbhTdiKAIunChO/+NghsRBcWFCCouXLhw4aIiXbQgKgiKoFhbrdim9YyOkGKa5t47c++Z5DxQaNOk03lz5su5MwkhhBBCCCGEEEIIIYQQQgghhBCdgG3ADuAIcB64BtwBHgIvgK/Au7W/vQCeAHeBa8B54DCwVRX0x6I+Q+AG8BZYHvhOXvUJeCTfEfYAo6rw/yzIkxL+GfgzZA3y+gNMk3A1RMPYBtwGVoQFGMRPYBLYrBbF2ARcAdoR1pNBvAb2q2WD2wvcDLhAdKUFXFTrBnMUeJfQDunlNXBQLezfCPBEWZdUZCOvSVXRn/FE69+wVoBxle7PsUSfrYpeVMn1TRDnlZ3Ry21V/3+2kPYLwFHMqoSN1UpkXVYq/rrx5KPJTiqfznbKuqOJ1mctdV3tYj0Dn9NdldIWTa4+P4DbYh2d7UwkPrF6vZPwyp0TaxgFZpVlpXy2+Iq1zCvLSvkafoC1ROkE9UU5KKw40xUXZVU5i1jUQdlVh1zRMOWc6RP9mxTJb0q9XHXWcUh21cFS03/bSpnzW5LR3RGycNPPnJcpFGVRztHW1aZQlBWeE8hUUVapYWvMeJHnL2mX8GveFnzEJHJRCkPUrEjnQDpFOZJ6UXZ6nCbpiPKM8mLqRRn3PNXTllXrmpxDLOp0oJ2xFngJTHgUJVhneynLFcVa0iEwhzpnqKK05fK7GWPAe2VnVGEJOKOK+re3gCtYi7IAHJPL7uo3AcwFqP5LYEKVHMwu4E4FMyNZLzPc0+D6Q/aTm3NFV+9ZqdfaIrBPy8dgCpdlPM+xgCwC0zpJrM4m4FzJZerTwKjyHsaOEp4f5lz+5NKPzaTiYsUL+xJwLvVHFus8X1RBW8CDtV5lPWv2zPL9vwLeAI+Bi8AR3VaozyjaqJtBQQYRRSnKoCiDogwK0ihKoyiNojSKMihKoyiNojSKMihKoyiNojSKMihKo6iYSu+FD4oaUlHYijJIWEVhK8ogYRWFrSiDhFUUtqIMElZR2IoySFhFYSvKIGEVha0og4QdIoQQQgghhBBCCCGEEEIIIYQQIiT9BY/MQU+AHDQ7AAAAAElFTkSuQmCC" alt="Tetris"> <h3>TETRIS</h3> <p>Stack blocks and clear lines to score!</p> </div> <div class="game-card"> <img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGQAAABkCAYAAABw4pV
<html> <head> <style> * { margin: 0; padding: 0; box-sizing: border-box; } body { display: flex; justify-content: center; align-items: center; height: 100vh; background-color: #0F0F1B; font-family: monospace; overflow: hidden; perspective: 1000px; } .container { position: relative; width: 100%; max-width: 700px; height: 700px; display: flex; flex-direction: column; justify-content: center; align-items: center; background: repeating-linear-gradient( 0deg, rgba(15, 15, 27, 0.3), rgba(15, 15, 27, 0.3) 5px, rgba(20, 20, 35, 0.3) 5px, rgba(20, 20, 35, 0.3) 10px ); border-radius: 10px; } .screen { width: 80%; background: #1a1a2e; padding: 20px; border: 4px solid #3F3F63; border-radius: 8px; box-shadow: 0 0 15px rgba(0, 255, 255, 0.2); text-align: center; } .title { font-size: 2rem; color: #ff6b6b; text-shadow: 2px 2px 0 #000; margin-bottom: 20px; font-weight: bold; letter-spacing: 2px; animation: textFlicker 3s infinite alternate; } .subtitle { font-size: 1rem; color: #70e1f5; margin-bottom: 40px; line-height: 1.5; } .cta-button { position: relative; width: 220px; height: 70px; background: none; border: none; margin: 20px auto; cursor: pointer; display: block; transition: transform 0.2s; transform-style: preserve-3d; } .button-face { position: absolute; width: 100%; height: 100%; display: flex; justify-content: center; align-items: center; font-size: 1.5rem; font-weight: bold; text-transform: uppercase; color: #fff; background-color: #ff0062; border: 4px solid #fff; letter-spacing: 1px; backface-visibility: hidden; transform-style: preserve-3d; } .pixel-corners { clip-path: polygon( 0% 8px, 4px 8px, 4px 4px, 8px 4px, 8px 0%, calc(100% - 8px) 0%, calc(100% - 8px) 4px, calc(100% - 4px) 4px, calc(100% - 4px) 8px, 100% 8px, 100% calc(100% - 8px), calc(100% - 4px) calc(100% - 8px), calc(100% - 4px) calc(100% - 4px), calc(100% - 8px) calc(100% - 4px), calc(100% - 8px) 100%, 8px 100%, 8px calc(100% - 4px), 4px calc(100% - 4px), 4px calc(100% - 8px), 0% calc(100% - 8px) ); } .button-shadow { position: absolute; width: 100%; height: 100%; background-color: #660029; transform: translateZ(-10px) translateY(10px); filter: blur(2px); opacity: 0.5; clip-path: polygon( 0% 8px, 4px 8px, 4px 4px, 8px 4px, 8px 0%, calc(100% - 8px) 0%, calc(100% - 8px) 4px, calc(100% - 4px) 4px, calc(100% - 4px) 8px, 100% 8px, 100% calc(100% - 8px), calc(100% - 4px) calc(100% - 8px), calc(100% - 4px) calc(100% - 4px), calc(100% - 8px) calc(100% - 4px), calc(100% - 8px) 100%, 8px 100%, 8px calc(100% - 4px), 4px calc(100% - 4px), 4px calc(100% - 8px), 0% calc(100% - 8px) ); } .button-inner { font-family: 'Press Start 2P', cursive, monospace; font-size: 16px; position: relative; z-index: 2; text-shadow: 2px 2px 0 #000; padding: 12px 0; } .button-glow { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: linear-gradient(45deg, rgba(255, 0, 98, 0), rgba(255, 0, 98, 0.2)); opacity: 0; transition: opacity 0.3s; clip-path: polygon( 0% 8px, 4px 8px, 4px 4px, 8px 4px, 8px 0%, calc(100% - 8px) 0%, calc(100% - 8px) 4px, calc(100% - 4px) 4px, calc(100% - 4px) 8px, 100% 8px, 100% calc(100% - 8px), calc(100% - 4px) calc(100% - 8px), calc(100% - 4px) calc(100% - 4px), calc(100% - 8px) calc(100% - 4px), calc(100% - 8px) 100%, 8px 100%, 8px calc(100% - 4px), 4px calc(100% - 4px), 4px calc(100% - 8px), 0% calc(100% - 8px) ); } .cta-button:hover { transform: translateZ(5px) translateY(-5px); } .cta-button:hover .button-glow { opacity: 1; } .cta-button:active { transform: translateZ(0) translateY(0); transition: transform 0.1s; } .cta-button:active .button-shadow { transform: translateZ(-5px) translateY(5px); transition: transform 0.1s; } .pixel-border { position: relative; padding: 4px; background-color: #fff; width: 100%; height: 100%; } .pixel-border::before { content: ''; position: absolute; top: 4px; left: 4px; right: 4px; bottom: 4px; background-color: #ff0062; } @keyframes blinkAnimation { 0%, 45%, 55%, 100% { opacity: 1; } 50% { opacity: 0.7; } } @keyframes pixelShift { 0%, 100% { background-position: 0 0; } 25% { background-position: 1px 0; } 50% { background-position: 1px 1px; } 75% { background-position: 0 1px; } } @keyframes textFlicker { 0%, 19.999%, 22%, 62.999%, 64%, 64.999%, 70%, 100% { opacity: 1; text-shadow: 0 0 5px #ff6b6b, 0 0 10px #ff6b6b, 0 0 15px #ff6b6b; } 20%, 21.999%, 63%, 63.999%, 65%, 69.999% { opacity: 0.8; text-shadow: none; } } .pixels { position: absolute; width: 100%; height: 100%; background-image: radial-gradient(rgba(255, 255, 255, 0.1) 1px, transparent 1px), radial-gradient(rgba(255, 255, 255, 0.1) 1px, transparent 1px); background-size: 4px 4px; background-position: 0 0, 2px 2px; pointer-events: none; animation: pixelShift 2s infinite steps(1); } .scanline { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: linear-gradient( to bottom, transparent 50%, rgba(0, 0, 0, 0.1) 51%, transparent 51% ); background-size: 100% 8px; pointer-events: none; opacity: 0.3; } @media (max-width: 700px) { .title { font-size: 1.5rem; } .subtitle { font-size: 0.9rem; margin-bottom: 30px; } .cta-button { width: 180px; height: 60px; } .button-inner { font-size: 14px; } } </style> </head> <body> <div class="container"> <div class="screen"> <h1 class="title">RETRO ARCADE QUEST</h1> <p class="subtitle">Insert coin to unlock 8-bit adventures. Conquer the digital realm one pixel at a time!</p> <button class="cta-button" id="pixelButton"> <div class="button-face pixel-corners"> <div class="button-inner">INSERT COIN</div> <div class="button-glow"></div> </div> <div class="button-shadow"></div> </button> <div class="pixels"></div> <div class="scanline"></div> </div> </div> <script> document.addEventListener('DOMContentLoaded', () => { const button = document.getElementById('pixelButton'); const buttonInner = button.querySelector('.button-inner'); // Blink animation logic let blinkInterval; button.addEventListener('mouseenter', () => { buttonInner.style.animation = 'blinkAnimation 0.5s infinite'; // Add pixel movement on hover button.querySelector('.button-face').style.backgroundImage = 'radial-gradient(rgba(255, 255, 255, 0.3) 1px, transparent 1px)'; button.querySelector('.button-face').style.backgroundSize = '4px 4px'; button.querySelector('.button-face').style.animation = 'pixelShift 0.8s infinite steps(1)'; // Add CRT scan effect const scan = document.createElement('div'); scan.style.position = 'absolute'; scan.style.top = '0'; scan.style.left = '0'; scan.style.width = '100%'; scan.style.height = '2px'; scan.style.background = 'rgba(255, 255, 255, 0.5)'; scan.style.boxShadow = '0 0 5px rgba(255, 255, 255, 0.5)'; scan.style.zIndex = '5'; scan.style.pointerEvents = 'none'; button.querySelector('.button-face').appendChild(scan); let scanPos = 0; blinkInterval = setInterval(() => { scanPos = (scanPos + 2) % 70; // Button height is 70px scan.style.top = scanPos + 'px'; }, 20); }); button.addEventListener('mouseleave', () => { buttonInner.style.animation = ''; button.querySelector('.button-face').style.backgroundImage = ''; button.querySelector('.button-face').style.animation = ''; // Clean up scan effect const scan = button.querySelector('.button-face > div:not(.button-inner):not(.button-glow)'); if (scan) { scan.remove(); } clearInterval(blinkInterval); }); button.addEventListener('click', () => { // Create pixel explosion effect const explosion = document.createElement('div'); explosion.style.position = 'absolute'; explosion.style.top = '0'; explosion.style.left = '0'; explosion.style.width = '100%'; explosion.style.height = '100%'; explosion.style.zIndex = '10'; explosion.style.pointerEvents = 'none'; button.appendChild(explosion); // Create 50 pixels for the explosion for (let i = 0; i < 50; i++) { const pixel = document.createElement('div'); pixel.style.position = 'absolute'; pixel.style.width = Math.random() * 5 + 3 + 'px'; pixel.style.height = pixel.style.width; pixel.style.backgroundColor = '#ff0062'; pixel.style.top = '50%'; pixel.style.left = '50%'; // Random direction for each pixel const angle = Math.random() * Math.PI * 2; const distance = Math.random() * 100 + 50; const duration = Math.random() * 0.5 + 0.5; pixel.style.transform = 'translate(-50%, -50%)'; pixel.style.transition = `all ${duration}s cubic-bezier(0.1, 0.9, 0.2, 1)`; setTimeout(() => { pixel.style.transform = `translate(${Math.cos(angle) * distance}px, ${Math.sin(angle) * distance}px) rotate(${Math.random() * 360}deg)`; pixel.style.opacity = '0'; }, 10); explosion.appendChild(pixel); } // Display message setTimeout(() => { buttonInner.textContent = 'GAME ON!'; button.querySelector('.button-face').style.backgroundColor = '#00b894'; // Remove explosion after animation completes setTimeout(() => { explosion.remove(); // Reset after 2 seconds setTimeout(() => { buttonInner.textContent = 'INSERT COIN'; button.querySelector('.button-face').style.backgroundColor = '#ff0062'; }, 2000); }, 1000); }, 200); }); // Add some randomized glitchy movement to the pixels in the background setInterval(() => { const pixels = document.querySelector('.pixels'); if (Math.random() > 0.7) { pixels.style.transform = `translate(${Math.random() * 2 - 1}px, ${Math.random() * 2 - 1}px)`; setTimeout(() => { pixels.style.transform = 'translate(0, 0)'; }, 100); } }, 1000); }); </script> </body> </html>
<html> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>RetroWave Player - Pixel Perfect Controls</title> <style> :root { --primary: #ff00ff; --secondary: #00ffff; --background: #120040; --gridline: rgba(0, 255, 255, 0.15); --text: #ffffff; --accent: #ffcc00; --accent2: #00ff66; --shadow: rgba(255, 0, 255, 0.5); } * { margin: 0; padding: 0; box-sizing: border-box; user-select: none; } body { font-family: 'Courier New', monospace; background-color: var(--background); color: var(--text); display: flex; justify-content: center; align-items: center; width: 100%; height: 100vh; overflow: hidden; } .container { width: 100%; max-width: 700px; height: 700px; position: relative; display: flex; flex-direction: column; justify-content: center; padding: 20px; } .grid-background { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background-image: linear-gradient(to right, var(--gridline) 1px, transparent 1px), linear-gradient(to bottom, var(--gridline) 1px, transparent 1px); background-size: 16px 16px; z-index: -1; opacity: 0.7; animation: gridPulse 8s infinite linear; } @keyframes gridPulse { 0% { opacity: 0.5; } 50% { opacity: 0.8; } 100% { opacity: 0.5; } } .app-title { text-align: center; font-size: 32px; margin-bottom: 20px; color: var(--secondary); text-shadow: 4px 4px 0 var(--shadow); letter-spacing: 2px; animation: glitch 5s infinite alternate; } @keyframes glitch { 0%, 95%, 100% { transform: none; opacity: 1; } 96% { transform: skewX(3deg); opacity: 0.8; } 97% { transform: skewX(-3deg); opacity: 0.9; } 98% { transform: skewX(1deg); opacity: 1; } 99% { transform: skewX(-1deg); opacity: 0.9; } } .player-card { background: rgba(30, 10, 60, 0.8); border: 4px solid var(--primary); border-radius: 8px; box-shadow: 0 0 20px var(--shadow), inset 0 0 10px var(--secondary); padding: 20px; margin-bottom: 40px; position: relative; overflow: hidden; } .player-card::before { content: ""; position: absolute; top: -50%; left: -50%; width: 200%; height: 200%; background: linear-gradient( 45deg, transparent 0%, rgba(255, 0, 255, 0.1) 30%, transparent 70% ); animation: shine 4s infinite linear; pointer-events: none; } @keyframes shine { 0% { transform: translateX(-100%) translateY(-100%) rotate(45deg); } 100% { transform: translateX(100%) translateY(100%) rotate(45deg); } } .song-info { display: flex; align-items: center; margin-bottom: 25px; } .album-art { width: 80px; height: 80px; background: #ff00aa; border: 4px solid var(--accent); border-radius: 4px; margin-right: 20px; position: relative; overflow: hidden; } .album-art::before { content: ""; position: absolute; width: 100%; height: 100%; background-image: repeating-linear-gradient(45deg, transparent, transparent 5px, rgba(0, 0, 0, 0.1) 5px, rgba(0, 0, 0, 0.1) 10px); } .song-details h3 { font-size: 24px; margin-bottom: 5px; color: var(--accent); text-shadow: 2px 2px 0 rgba(0, 0, 0, 0.5); } .song-details p { font-size: 16px; opacity: 0.9; color: var(--secondary); } .slider-container { width: 100%; padding: 20px 0; position: relative; } .slider-track { height: 16px; background: rgba(0, 0, 0, 0.5); border: 2px solid var(--primary); border-radius: 4px; position: relative; } .slider-fill { height: 100%; width: 50%; background: linear-gradient(90deg, var(--secondary), var(--primary)); position: absolute; top: 0; left: 0; transition: width 0.05s linear; z-index: 1; } .slider-markers { position: absolute; top: 0; left: 0; width: 100%; height: 100%; display: flex; justify-content: space-between; padding: 0 2px; pointer-events: none; z-index: 2; } .marker { width: 2px; height: 60%; background-color: rgba(255, 255, 255, 0.3); align-self: center; } .slider-handle { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 32px; height: 32px; background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAACXBIWXMAAAsTAAALEwEAmpwYAAAFEmlUWHRYTUw6Y29tLmFkb2JlLnhtcAAAAAAAPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4gPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgWE1QIENvcmUgNS42LWMxNDIgNzkuMTYwOTI0LCAyMDE3LzA3LzEzLTAxOjA2OjM5ICAgICAgICAiPiA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPiA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtbG5zOmRjPSJodHRwOi8vcHVybC5vcmcvZGMvZWxlbWVudHMvMS4xLyIgeG1sbnM6cGhvdG9zaG9wPSJodHRwOi8vbnMuYWRvYmUuY29tL3Bob3Rvc2hvcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RFdnQ9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZUV2ZW50IyIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgQ0MgKFdpbmRvd3MpIiB4bXA6Q3JlYXRlRGF0ZT0iMjAyMC0wNy0wN1QxNjoxMTozOCswODowMCIgeG1wOk1vZGlmeURhdGU9IjIwMjAtMDctMDdUMTY6MTM6MjArMDg6MDAiIHhtcDpNZXRhZGF0YURhdGU9IjIwMjAtMDctMDdUMTY6MTM6MjArMDg6MDAiIGRjOmZvcm1hdD0iaW1hZ2UvcG5nIiBwaG90b3Nob3A6Q29sb3JNb2RlPSIzIiBwaG90b3Nob3A6SUNDUHJvZmlsZT0ic1JHQiBJRUM2MTk2Ni0yLjEiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6YzI0MGRmNzQtY2FmMy0yMjRkLWJiYmUtNDMzMTUzN2I4ODAyIiB4bXBNTTpEb2N1bWVudElEPSJ4bXAuZGlkOmMyNDBkZjc0LWNhZjMtMjI0ZC1iYmJlLTQzMzE1MzdiODgwMiIgeG1wTU06T3JpZ2luYWxEb2N1bWVudElEPSJ4bXAuZGlkOmMyNDBkZjc0LWNhZjMtMjI0ZC1iYmJlLTQzMzE1MzdiODgwMiI+IDx4bXBNTTpIaXN0b3J5PiA8cmRmOlNlcT4gPHJkZjpsaSBzdEV2dDphY3Rpb249ImNyZWF0ZWQiIHN0RXZ0Omluc3RhbmNlSUQ9InhtcC5paWQ6YzI0MGRmNzQtY2FmMy0yMjRkLWJiYmUtNDMzMTUzN2I4ODAyIiBzdEV2dDp3aGVuPSIyMDIwLTA3LTA3VDE2OjExOjM4KzA4OjAwIiBzdEV2dDpzb2Z0d2FyZUFnZW50PSJBZG9iZSBQaG90b3Nob3AgQ0MgKFdpbmRvd3MpIi8+IDwvcmRmOlNlcT4gPC94bXBNTTpIaXN0b3J5PiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PrrP240AAAXUSURBVFiFtZdbbBRVGIC//8zs7OxOd7vb0nal0BK0sRQKpakQEwMaiLQRgxYrBenciEDAcH0gWh54wMtb44sJEh98kHgJYFDg2VYqYMBgREJXLNcWsqXdbbdtZ3fmHB9mZzvZdsuF/8vMnP/Mfuf/z5x//gFrq7/7fKiiZbti+j+kmrINoFCzYlNcbz7u3bb3wG9/CR3mnB/7dcvm6EsNm8PNvU+qbikxLxGtNcMzTQAU5rn2uB19b0SqHw3FNwHg9p7/cPxPV6ZJ/nOiTVv5rnj4+G+P1BEr3lz0YrB7//88DBfeI5TErDMrszquR14KHjvFrpRFLvNcM2h0YEzEFZYCQFGOA4CZRMpixgCFJqZ3gMQi7PGITNPLzSuVyamZbcECPRYWa24NrGQ/GL11hXSIUDRGMjlHU8Pcz4Xp7HV3t78VD7fOKH1Pp4ZUYcP/HTf7xWXqPqwWYgmD/ouVXBqssvSzvl67Xvz+W/Hu5mMnlvxdU9Vl4ld31J8e95MXlyGaFvHdJdZ36rKcFAhvLe6vLS9b0K1pMp8M0uWbZT4skQAjLorrdYDHHnnhsWxKq7PE/XtLOe/5khrySGd5lLUw6yMSYHo6ivDkRr8GMPOD+J4c1qpwOnz3OUJj+KcqDEcOuOLQzLTVi/hm6MNk8lc1fhM1vMKMicSdJIqETCSq9QdoSoKm5j9Gx6u/v3RrD0BD1kPcZ4ONMJWYm68HVWEFioZUTDmgx0A/LKR1/EJr2CJy73jHQAg9bQfcHirB19DOP9dH5zE9gPKp0HH6x0UVtqUPJaFdpNwCswnMRJQZN05xzKPz5J5xq1JvrBXD/3WCkM7lDbWUlQYAPAQsnf+yYbMS+bR1GWyNnE5j9LVYs32eyjzs9vqRuRa19cFpv4F+xURPZCY7M80CeBLQnXHHmmM8lrHPbVgmoTQRVpPmYI57mRl0PdS/QBVVclfWfIb2MvJSzHMCc5ZhSRVEU5wLPPAP0nh8EjPefOTrCwoFML+MHHa/1JJYvQYiEDYO6Wk5nwVFW9dTUXoHHIqx0MKMKzJsF2Nfi82TzN2vG8vQKk6FZx31m5RFMVTa9I5d78i2MQiRSC0bCgVUSY5VXVMLGD4EaIRcxU7C4b3/8PPXr4tFr0JzJlqhWDBu8Lku6wU5YgcoBN1tA1KL0+CKdWV1MFoYPJGIRVPzqVNGlqAQxXQGGTlGz7X4vHpSFO++kJ+JwPYLugKH2AoTM8VJFcXMz82ZlRc+z5IHm9UzUjlmUJ6L+m1lrZxmYiZ2XWYeq8s7MzK5cENnmR16YxJATBw0dw79HbmUh7oWJwYAXx4rqMxmXs8gBcSjCxpFtQWYNCf1M8BUMkVrS/u8elUVWWdrmG3qSwpIVyYA4gvAhcQLUZejw8B4fJaGl5rs6upq+7o5aeApGgFQMwEWPVKO3WvwmaDqoLkzR6MQg3JnXF+h6QvRIwbC5rEHBhVdVeaOvmLgJCIGpj7H+Y4hS1dQXm43wXIgxZXKQn3zCCwGXohjWR+5mHuQJtX0QsGMA+G8Fn3TKxTsSfWUlMHvlp6/bSKw6Q4Fl3mcVkTq0ZdQuJG6wfMkSRMYo4tL52dVGKzWKXhUpQJYFmGWgRYVwRVKfGLzTYdUqQRjFKZ65rWDXW2WfvJU59YXH6vcICkpDYVdYZcLJhTh7G9rNcDYpBF+IHg6bOt5+4F4pW9E14HnD/R0xwriFfs+4tV18Vo81ZVbjlXVPbPjbPtw0tL3dp/9+PPen17ZXjkjXOnrvUl3RL9JzSYb0ybpzxfjw1P6KkC48Lya+5T1/vnh0diOe+Oz/jvRWdWmG9JwOpQcV4E9R5P46tduRQoAEsrbj87GmQWOSJ7Fcb8LvwcOL7c2BnSdkM+h1+l2ZYRLdL/pnMeIbZXd/wEg26Ruk0W0EwAAAABJRU5ErkJggg=='); background-size: contain; cursor: pointer; z-index: 5; filter: drop-shadow(0 0 5px var(--accent)); transform-origin: center; transition: transform 0.1s; } .slider-handle.active { transform: translate(-50%, -50%) scale(1.2); } .slider-handle:hover { animation: bounce 0.5s infinite alternate; } @keyframes bounce { 0% { transform: translate(-50%, -50%); } 100% { transform: translate(-50%, calc(-50% - 3px)); } } .time-labels { display: flex; justify-content: space-between; margin-top: 10px; font-size: 12px; color: var(--accent); } .controls { display: flex; justify-content: center; margin-top: 30px; gap: 20px; } .control-btn { width: 50px; height: 50px; border: 3px solid var(--primary); background-color: rgba(0, 0, 0, 0.5); border-radius: 4px; display: flex; justify-content: center; align-items: center; cursor: pointer; color: var(--text); font-size: 20px; transition: all 0.2s; position: relative; overflow: hidden; } .control-btn::after { content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0) 60%); pointer-events: none; } .control-btn:hover { background-color: rgba(255, 0, 255, 0.3); transform: scale(1.05); } .control-btn:active { transform: scale(0.95); } .play-btn { width: 60px; height: 60px; border-color: var(--accent); } .control-icon { display: inline-block; width: 20px; height: 20px; background-size: contain; background-repeat: no-repeat; } .play-icon { width: 24px; height: 24px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23ffcc00'%3E%3Cpath d='M8 5v14l11-7z'/%3E%3C/svg%3E"); } .prev-icon { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%2300ffff'%3E%3Cpath d='M6 6h2v12H6zm3.5 6l8.5 6V6z'/%3E%3C/svg%3E"); } .next-icon { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%2300ffff'%3E%3Cpath d='M6 18l8.5-6L6 6v12zM16 6v12h2V6h-2z'/%3E%3C/svg%3E"); } .volume-icon { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%2300ffff'%3E%3Cpath d='M3 9v6h4l5 5V4L7 9H3zm13.5 3c0-1.77-1.02-3.29-2.5-4.03v8.05c1.48-.73 2.5-2.25 2.5-4.02zM14 3.23v2.06c2.89.86 5 3.54 5 6.71s-2.11 5.85-5 6.71v2.06c4.01-.91 7-4.49 7-8.77s-2.99-7.86-7-8.77z'/%3E%3C/svg%3E"); } .pixel-effects { position: absolute; width: 100%; height: 100%; top: 0; left: 0; pointer-events: none; z-index: 10; opacity: 0.03; background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyAQMAAAAk8RryAAAABlBMVEUAAAAAAAClZ7nPAAAAAnRSTlMA/1uRIrUAAAAmSURBVBjTY4CBrz9QyABl/6si78vAwIjChtLvfh6F/fU9Cv/TLwCyJGUPfau+VQAAAABJRU5ErkJggg=='); animation: scanline 8s linear infinite; } @keyframes scanline { 0% { transform: translateY(0); opacity: 0.05; } 50% { opacity: 0.01; } 100% { transform: translateY(100%); opacity: 0.05; } } .volume-slider { position: relative; width: 100px; height: 10px; background: rgba(0, 0, 0, 0.5); border: 2px solid var(--secondary); border-radius: 2px; margin-top: 20px; } .volume-fill { height: 100%; width: 70%; background: linear-gradient(to right, var(--accent2), var(--accent)); position: absolute; top: 0; left: 0; } .volume-handle { position: absolute; top: 50%; left: 70%; transform: translate(-50%, -50%); width: 16px; height: 16px; background-color: var(--accent); border-radius: 3px; cursor: pointer; z-index: 2; } .volume-container { display: flex; flex-direction: column; align-items: center; margin-top: 20px; } .volume-label { font-size: 12px; margin-bottom: 5px; color: var(--secondary); } .song-list { margin-top: 20px; background: rgba(30, 10, 60, 0.6); border: 2px solid var(--secondary); border-radius: 4px; padding: 10px; max-height: 140px; overflow-y: auto; } .song-list h4 { color: var(--accent); margin-bottom: 10px; text-align: center; font-size: 16px; text-shadow: 2px 2px 0 rgba(0, 0, 0, 0.5); } .song-item { padding: 5px; margin-bottom: 5px; cursor: pointer; border-left: 3px solid transparent; transition: all 0.2s; font-size: 14px; display: flex; justify-content: space-between; } .song-item:hover { background: rgba(255, 0, 255, 0.2); border-left-color: var(--primary); } .song-item.active { background: rgba(255, 0, 255, 0.3); border-left-color: var(--accent); color: var(--accent); } .song-item span.duration { color: var(--secondary); font-size: 12px; } /* Custom scrollbar */ ::-webkit-scrollbar { width: 8px; } ::-webkit-scrollbar-track { background: rgba(0, 0, 0, 0.3); } ::-webkit-scrollbar-thumb { background: var(--primary); border-radius: 4px; } ::-webkit-scrollbar-thumb:hover { background: var(--accent); } @media screen and (max-width: 600px) { .player-card { padding: 15px; } .song-info { flex-direction: column; text-align: center; } .album-art { margin: 0 auto 15px; } .controls { gap: 10px; } .control-btn { width: 40px; height: 40px; } .play-btn { width: 50px; height: 50px; } } /* Pixel snap animation */ @keyframes pixelSnap { 0% { transform: translate(-50%, -50%) scale(1.2); } 30% { transform: translate(-50%, -50%) scale(0.9); } 60% { transform: translate(-50%, -50%) scale(1.1); } 100% { transform: translate(-50%, -50%) scale(1); } } .pixel-snap { animation: pixelSnap 0.3s ease-out; } </style> </head> <body> <div class="container"> <div class="grid-background"></div> <h1 class="app-title">RetroWave Player v1.0</h1> <div class="player-card"> <div class="song-info"> <div class="album-art"></div> <div class="song-details"> <h3>Neon Dreams</h3> <p>Pixel Pulse Syndicate</p> </div> </div> <div class="slider-container"> <div class="slider-track"> <div class="slider-fill"></div> <div class="slider-markers"> <div class="marker"></div> <div class="marker"></div> <div class="marker"></div> <div class="marker"></div> <div class="marker"></div> <div class="marker"></div> <div class="marker"></div> <div class="marker"></div> <div class="marker"></div> </div> <div class="slider-handle" id="sliderHandle"></div> </div> <div class="time-labels"> <span>1:24</span> <span>2:47</span> </div> </div> <div class="controls"> <div class="control-btn" id="prevBtn"> <div class="control-icon prev-icon"></div> </div> <div class="control-btn play-btn" id="playBtn"> <div class="control-icon play-icon"></div> </div> <div class="control-btn" id="nextBtn"> <div class="control-icon next-icon"></div> </div> </div> <div class="volume-container"> <div class="volume-label">VOLUME</div> <div class="volume-slider"> <div class="volume-fill"></div> <div class="volume-handle" id="volumeHandle"></div> </div> </div> </div> <div class="song-list"> <h4>8-BIT PLAYLIST</h4> <div class="song-item active"> <span>Neon Dreams</span> <span class="duration">2:47</span> </div> <div class="song-item"> <span>Arcade Memories</span> <span class="duration">3:12</span> </div> <div class="song-item"> <span>Pixel Paradise</span> <span class="duration">4:05</span> </div> <div class="song-item"> <span>8-Bit Warrior</span> <span class="duration">2:33</span> </div> <div class="song-item"> <span>Chiptune Nights</span> <span class="duration">3:49</span> </div> </div> <div class="pixel-effects"></div> </div> <script> document.addEventListener('DOMContentLoaded', function() { // Slider functionality const sliderTrack = document.querySelector('.slider-track'); const sliderFill = document.querySelector('.slider-fill'); const sliderHandle = document.getElementById('sliderHandle'); let isDragging = false; // Grid step calculation (10 steps along the track) const gridSteps = 10; function updateSlider(e) { const trackRect = sliderTrack.getBoundingClientRect(); let x = e.clientX - trackRect.left; // Constrain within track if (x < 0) x = 0; if (x > trackRect.width) x = trackRect.width; // Calculate the nearest grid position const stepSize = trackRect.width / gridSteps; const nearestStep = Math.round(x / stepSize); const snappedX = nearestStep * stepSize; // Calculate percentage (0-100) const percentage = (snappedX / trackRect.width) * 100; // Update slider fill and handle position sliderFill.style.width = `${percentage}%`; sliderHandle.style.left = `${percentage}%`; // Add snap animation sliderHandle.classList.add('pixel-snap'); setTimeout(() => { sliderHandle.classList.remove('pixel-snap'); }, 300); // Play 8-bit sound effect playPixelSound(percentage / 100); } function playPixelSound(pitch) { // Create a simple 8-bit style sound try { const audioCtx = new (window.AudioContext || window.webkitAudioContext)(); const oscillator = audioCtx.createOscillator(); const gainNode = audioCtx.createGain(); oscillator.type = 'square'; oscillator.frequency.setValueAtTime(300 + pitch * 600, audioCtx.currentTime); gainNode.gain.setValueAtTime(0.1, audioCtx.currentTime); gainNode.gain.exponentialRampToValueAtTime(0.001, audioCtx.currentTime + 0.1); oscillator.connect(gainNode); gainNode.connect(audioCtx.destination); oscillator.start(); oscillator.stop(audioCtx.currentTime + 0.1); } catch (e) { // Audio context might not be available or could be blocked console.log("Audio playback not available"); } } sliderTrack.addEventListener('mousedown', function(e) { isDragging = true; sliderHandle.classList.add('active'); updateSlider(e); }); document.addEventListener('mousemove', function(e) { if (isDragging) { updateSlider(e); } }); document.addEventListener('mouseup', function() { if (isDragging) { isDragging = false; sliderHandle.classList.remove('active'); } }); // Volume slider functionality const volumeSlider = document.querySelector('.volume-slider'); const volumeFill = document.querySelector('.volume-fill'); const volumeHandle = document.getElementById('volumeHandle'); let isDraggingVolume = false; function updateVolumeSlider(e) { const trackRect = volumeSlider.getBoundingClientRect(); let x = e.clientX - trackRect.left; // Constrain within track if (x < 0) x = 0; if (x > trackRect.width) x = trackRect.width; // Calculate percentage (0-100) const percentage = (x / trackRect.width) * 100; // Update volume fill and handle position volumeFill.style.width = `${percentage}%`; volumeHandle.style.left = `${percentage}%`; } volumeSlider.addEventListener('mousedown', function(e) { isDraggingVolume = true; updateVolumeSlider(e); }); document.addEventListener('mousemove', function(e) { if (isDraggingVolume) { updateVolumeSlider(e); } }); document.addEventListener('mouseup', function() { isDraggingVolume = false; }); // Button hover sound effects const buttons = document.querySelectorAll('.control-btn, .song-item'); buttons.forEach(button => { button.addEventListener('mouseenter', () => { try { const audioCtx = new (window.AudioContext || window.webkitAudio
<html> <head> <style> * { margin: 0; padding: 0; box-sizing: border-box; } body { font-family: 'Press Start 2P', monospace; background-color: #0f0f1b; display: flex; flex-direction: column; align-items: center; justify-content: center; height: 100vh; color: #fff; overflow: hidden; } .container { width: 100%; max-width: 650px; padding: 20px; text-align: center; position: relative; } .screen-border { border: 8px solid #444; border-radius: 10px; background-color: #222; padding: 25px; box-shadow: 0 0 15px rgba(0, 255, 0, 0.2), inset 0 0 10px rgba(0, 0, 0, 0.5); position: relative; overflow: hidden; } .screen-border::before { content: ''; position: absolute; top: 0; left: 0; right: 0; bottom: 0; background: repeating-linear-gradient( 0deg, rgba(0, 0, 0, 0.15), rgba(0, 0, 0, 0.15) 1px, transparent 1px, transparent 2px ); pointer-events: none; } .title { margin-bottom: 15px; font-size: 18px; color: #0f0; text-shadow: 0 0 5px #0f0, 0 0 10px #0f0; letter-spacing: 1px; } .game-title { font-size: 24px; margin-bottom: 20px; color: #ff0; text-shadow: 0 0 5px #ff0, 0 0 10px #ff0; animation: pulse 2s infinite; } .progress-container { position: relative; height: 40px; margin: 20px 0; background-color: #000; border: 4px solid #555; overflow: hidden; } .progress-bar { height: 100%; width: 0%; display: flex; transition: width 0.3s ease; } .pixel { width: 10px; height: 32px; margin-right: 2px; background-color: #0f0; box-shadow: 0 0 5px #0f0; transition: background-color 0.3s ease; } .percentage { font-size: 14px; margin-bottom: 15px; color: #0f0; } .status-message { font-size: 14px; margin-bottom: 10px; height: 20px; color: #fff; text-shadow: 0 0 5px #fff; } .tip-container { margin-top: 25px; background-color: #000; border: 2px dashed #444; padding: 15px; position: relative; } .tip-title { position: absolute; top: -12px; left: 50%; transform: translateX(-50%); background-color: #222; padding: 0 10px; font-size: 14px; color: #ff0; } .tip-text { font-size: 12px; line-height: 1.5; color: #aaa; } .buttons { margin-top: 25px; display: flex; justify-content: center; gap: 15px; } .btn { font-family: 'Press Start 2P', monospace; background-color: #000; color: #fff; border: 3px solid #444; padding: 10px 15px; font-size: 12px; cursor: pointer; transition: all 0.2s ease; } .btn:hover { background-color: #333; border-color: #0f0; color: #0f0; transform: translateY(-2px); box-shadow: 0 0 10px rgba(0, 255, 0, 0.5); } .btn:active { transform: translateY(1px); } .decorative-pixels { position: absolute; width: 10px; height: 10px; background-color: #0f0; z-index: -1; opacity: 0.5; animation: float 5s infinite ease-in-out; } @keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-20px); } } @keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.5; } } .pixel-character { width: 32px; height: 32px; background-color: #ff0; position: absolute; bottom: 8px; left: -32px; clip-path: polygon( 50% 0%, 60% 30%, 100% 30%, 70% 50%, 80% 100%, 50% 70%, 20% 100%, 30% 50%, 0% 30%, 40% 30% ); z-index: 10; } /* Media queries for responsiveness */ @media (max-width: 700px) { .container { max-width: 100%; padding: 10px; } .title { font-size: 16px; } .game-title { font-size: 20px; } .pixel { width: 8px; } } @media (max-width: 500px) { .title { font-size: 14px; } .game-title { font-size: 18px; } .buttons { flex-direction: column; gap: 10px; } } </style> </head> <body> <div class="container"> <div class="screen-border"> <h1 class="title">LOADING GAME ASSETS</h1> <h2 class="game-title">PIXEL QUEST IV</h2> <div class="progress-container"> <div class="progress-bar" id="progressBar"></div> <div class="pixel-character" id="character"></div> </div> <div class="percentage" id="percentage">0%</div> <div class="status-message" id="statusMessage">Initializing world map...</div> <div class="tip-container"> <div class="tip-title">PLAYER TIP</div> <div class="tip-text" id="tipText">Hidden power-ups can be found by destroying cracked walls with bombs. Look for discolored sections!</div> </div> <div class="buttons"> <button class="btn" id="startBtn">START LOADING</button> <button class="btn" id="resetBtn">RESET</button> <button class="btn" id="speedBtn">TURBO MODE</button> </div> </div> </div> <script> // Create decorative pixel elements in the background function createDecorativePixels() { const container = document.querySelector('.container'); for (let i = 0; i < 15; i++) { const pixel = document.createElement('div'); pixel.className = 'decorative-pixels'; pixel.style.left = `${Math.random() * 100}%`; pixel.style.top = `${Math.random() * 100}%`; pixel.style.animationDelay = `${Math.random() * 5}s`; container.appendChild(pixel); } } // Load Google Fonts dynamically function loadGoogleFont() { const link = document.createElement('link'); link.rel = 'stylesheet'; link.href = 'https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap'; document.head.appendChild(link); } loadGoogleFont(); createDecorativePixels(); // Progress bar implementation const progressBar = document.getElementById('progressBar'); const percentageDisplay = document.getElementById('percentage'); const statusMessage = document.getElementById('statusMessage'); const startBtn = document.getElementById('startBtn'); const resetBtn = document.getElementById('resetBtn'); const speedBtn = document.getElementById('speedBtn'); const tipText = document.getElementById('tipText'); const character = document.getElementById('character'); // Game loading messages const loadingMessages = [ "Initializing world map...", "Generating dungeons...", "Loading enemy sprites...", "Calibrating jump physics...", "Randomizing item drops...", "Preparing boss battles...", "Optimizing pixel shaders...", "Tuning difficulty levels...", "Arranging chiptune soundtrack...", "Finalizing save points..." ]; // Game tips const gameTips = [ "Hidden power-ups can be found by destroying cracked walls with bombs. Look for discolored sections!", "Hold DOWN + JUMP for a super high backflip that reaches secret areas.", "The Pixel Master sword deals double damage if your health is at maximum.", "Enemies flash red right before a special attack. That's your cue to dodge!", "Drinking a speed potion and a jump potion at the same time unlocks a temporary flight ability.", "The third dungeon has a false wall in the northeast corner. It leads to legendary armor!", "Pause the game and press UP, UP, DOWN, DOWN, LEFT, RIGHT for a secret sound test menu.", "Bosses are vulnerable to specific weapon types. Experiment to find their weakness!", "Certain enemies can be turned against each other. Lure them carefully!" ]; let progress = 0; let pixelElements = []; let timer = null; let interval = 150; // Default speed let isPaused = false; // Create initial pixel blocks function createPixels() { progressBar.innerHTML = ''; pixelElements = []; const progressWidth = progressBar.clientWidth; const pixelWidth = 10; const numberOfPixels = Math.floor(progressWidth / (pixelWidth + 2)); for (let i = 0; i < numberOfPixels; i++) { const pixel = document.createElement('div'); pixel.className = 'pixel'; pixel.style.backgroundColor = '#000'; progressBar.appendChild(pixel); pixelElements.push(pixel); } } // Update the progress bar function updateProgress() { if (isPaused) return; if (progress < 100) { progress += 1; const filledPixels = Math.floor((pixelElements.length * progress) / 100); for (let i = 0; i < pixelElements.length; i++) { if (i < filledPixels) { // Create a more interesting color gradient const hue = (i / pixelElements.length) * 120; // Gradient from red to green pixelElements[i].style.backgroundColor = `hsl(${hue}, 100%, 50%)`; } else { pixelElements[i].style.backgroundColor = '#000'; } } progressBar.style.width = `${progress}%`; percentageDisplay.textContent = `${progress}%`; // Move character along with progress character.style.left = `${(progress / 100) * (progressBar.parentElement.clientWidth - 32)}px`; // Update loading messages const messageIndex = Math.floor((progress / 100) * loadingMessages.length); statusMessage.textContent = loadingMessages[Math.min(messageIndex, loadingMessages.length - 1)]; // Update tips at certain intervals if (progress % 25 === 0) { const randomTip = gameTips[Math.floor(Math.random() * gameTips.length)]; tipText.textContent = randomTip; } // Add some "loading hiccups" for realism if (progress % 20 === 0 && progress < 90) { isPaused = true; setTimeout(() => { isPaused = false; }, Math.random() * 1000 + 300); } } else { clearInterval(timer); statusMessage.textContent = "PRESS START TO BEGIN YOUR ADVENTURE!"; statusMessage.style.color = "#ff0"; statusMessage.style.animation = "pulse 1s infinite"; } } // Start the loading animation function startLoading() { resetLoading(); timer = setInterval(updateProgress, interval); startBtn.disabled = true; } // Reset the loading animation function resetLoading() { clearInterval(timer); progress = 0; progressBar.style.width = '0%'; percentageDisplay.textContent = '0%'; statusMessage.textContent = "Initializing world map..."; statusMessage.style.color = "#fff"; statusMessage.style.animation = "none"; createPixels(); character.style.left = '-32px'; startBtn.disabled = false; interval = 150; // Reset to default speed speedBtn.textContent = "TURBO MODE"; tipText.textContent = gameTips[0]; } // Toggle loading speed function toggleSpeed() { if (interval === 150) { interval = 50; // Faster speedBtn.textContent = "NORMAL MODE"; if (timer) { clearInterval(timer); timer = setInterval(updateProgress, interval); } } else { interval = 150; // Normal speedBtn.textContent = "TURBO MODE"; if (timer) { clearInterval(timer); timer = setInterval(updateProgress, interval); } } } // Initialize the progress bar window.addEventListener('resize', createPixels); startBtn.addEventListener('click', startLoading); resetBtn.addEventListener('click', resetLoading); speedBtn.addEventListener('click', toggleSpeed); // Initialize on load document.addEventListener('DOMContentLoaded', () => { createPixels(); }); </script> </body> </html>
<html> <head> <style> @import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap'); * { margin: 0; padding: 0; box-sizing: border-box; } :root { --bg-color: #181425; --primary: #ff004d; --secondary: #29adff; --accent: #00e756; --text: #faef5d; --dark: #5f574f; --light: #fff1e8; --pixel-size: 4px; } body { font-family: 'Press Start 2P', cursive; background-color: var(--bg-color); height: 100vh; display: flex; justify-content: center; align-items: center; overflow: hidden; color: var(--light); font-size: 14px; image-rendering: pixelated; } .container { width: 100%; max-width: 700px; height: 700px; display: flex; flex-direction: column; justify-content: center; align-items: center; position: relative; } .pixel-button { background-color: var(--primary); border: none; color: var(--light); padding: 16px 20px; font-family: 'Press Start 2P', cursive; font-size: 16px; cursor: pointer; position: relative; image-rendering: pixelated; transition: all 0.3s; } .pixel-button::before { content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: var(--pixel-size) solid transparent; border-image: url("data:image/svg+xml,%3Csvg width='3' height='3' viewBox='0 0 3 3' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Crect width='1' height='1' fill='%23ff004d'/%3E%3Crect width='1' height='1' transform='translate(1)' fill='%23ff004d'/%3E%3Crect width='1' height='1' transform='translate(2)' fill='%23ff004d'/%3E%3Crect width='1' height='1' transform='translate(0 1)' fill='%23ff004d'/%3E%3Crect width='1' height='1' transform='translate(2 1)' fill='%23ff004d'/%3E%3Crect width='1' height='1' transform='translate(0 2)' fill='%23ff004d'/%3E%3Crect width='1' height='1' transform='translate(1 2)' fill='%23ff004d'/%3E%3Crect width='1' height='1' transform='translate(2 2)' fill='%23ff004d'/%3E%3C/svg%3E") 1 stretch; } .pixel-button:hover { transform: scale(1.05); background-color: var(--secondary); } .pixel-button:active { transform: scale(0.95); } .modal-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background-color: rgba(0, 0, 0, 0.7); display: flex; justify-content: center; align-items: center; opacity: 0; visibility: hidden; transition: opacity 0.3s; z-index: 10; } .modal { background-color: var(--dark); width: 80%; max-width: 500px; padding: var(--pixel-size); position: relative; transform: translateY(20px); transition: transform 0.3s; image-rendering: pixelated; box-shadow: 10px 10px 0px rgba(0, 0, 0, 0.5); } .modal-content { background-color: var(--bg-color); padding: 24px; border: var(--pixel-size) solid transparent; border-image: url("data:image/svg+xml,%3Csvg width='3' height='3' viewBox='0 0 3 3' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Crect width='1' height='1' fill='%23faef5d'/%3E%3Crect width='1' height='1' transform='translate(1)' fill='%23faef5d'/%3E%3Crect width='1' height='1' transform='translate(2)' fill='%23faef5d'/%3E%3Crect width='1' height='1' transform='translate(0 1)' fill='%23faef5d'/%3E%3Crect width='1' height='1' transform='translate(2 1)' fill='%23faef5d'/%3E%3Crect width='1' height='1' transform='translate(0 2)' fill='%23faef5d'/%3E%3Crect width='1' height='1' transform='translate(1 2)' fill='%23faef5d'/%3E%3Crect width='1' height='1' transform='translate(2 2)' fill='%23faef5d'/%3E%3C/svg%3E") 1 stretch; } .modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; } .modal-title { color: var(--text); font-size: 18px; text-transform: uppercase; display: flex; align-items: center; } .modal-title .pixel-icon { width: 24px; height: 24px; margin-right: 12px; image-rendering: pixelated; background-image: url("data:image/svg+xml,%3Csvg width='6' height='6' viewBox='0 0 6 6' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Crect width='1' height='1' transform='translate(2 0)' fill='%23ff004d'/%3E%3Crect width='1' height='1' transform='translate(3 0)' fill='%23ff004d'/%3E%3Crect width='1' height='1' transform='translate(1 1)' fill='%23ff004d'/%3E%3Crect width='1' height='1' transform='translate(2 1)' fill='%23ff004d'/%3E%3Crect width='1' height='1' transform='translate(3 1)' fill='%23ff004d'/%3E%3Crect width='1' height='1' transform='translate(4 1)' fill='%23ff004d'/%3E%3Crect width='1' height='1' transform='translate(0 2)' fill='%23ff004d'/%3E%3Crect width='1' height='1' transform='translate(1 2)' fill='%23ff004d'/%3E%3Crect width='1' height='1' transform='translate(2 2)' fill='%23ff004d'/%3E%3Crect width='1' height='1' transform='translate(3 2)' fill='%23ff004d'/%3E%3Crect width='1' height='1' transform='translate(4 2)' fill='%23ff004d'/%3E%3Crect width='1' height='1' transform='translate(5 2)' fill='%23ff004d'/%3E%3Crect width='1' height='1' transform='translate(0 3)' fill='%23ff004d'/%3E%3Crect width='1' height='1' transform='translate(1 3)' fill='%23ff004d'/%3E%3Crect width='1' height='1' transform='translate(2 3)' fill='%23ff004d'/%3E%3Crect width='1' height='1' transform='translate(3 3)' fill='%23ff004d'/%3E%3Crect width='1' height='1' transform='translate(4 3)' fill='%23ff004d'/%3E%3Crect width='1' height='1' transform='translate(5 3)' fill='%23ff004d'/%3E%3Crect width='1' height='1' transform='translate(1 4)' fill='%23ff004d'/%3E%3Crect width='1' height='1' transform='translate(2 4)' fill='%23ff004d'/%3E%3Crect width='1' height='1' transform='translate(3 4)' fill='%23ff004d'/%3E%3Crect width='1' height='1' transform='translate(4 4)' fill='%23ff004d'/%3E%3Crect width='1' height='1' transform='translate(2 5)' fill='%23ff004d'/%3E%3Crect width='1' height='1' transform='translate(3 5)' fill='%23ff004d'/%3E%3C/svg%3E"); background-size: contain; background-repeat: no-repeat; } .close-button { background: none; border: none; color: var(--secondary); font-size: 24px; cursor: pointer; width: 40px; height: 40px; display: flex; justify-content: center; align-items: center; position: relative; } .close-button::before { content: ''; position: absolute; width: 16px; height: 16px; background-image: url("data:image/svg+xml,%3Csvg width='4' height='4' viewBox='0 0 4 4' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Crect width='1' height='1' fill='%2329adff'/%3E%3Crect width='1' height='1' transform='translate(3 0)' fill='%2329adff'/%3E%3Crect width='1' height='1' transform='translate(1 1)' fill='%2329adff'/%3E%3Crect width='1' height='1' transform='translate(2 1)' fill='%2329adff'/%3E%3Crect width='1' height='1' transform='translate(1 2)' fill='%2329adff'/%3E%3Crect width='1' height='1' transform='translate(2 2)' fill='%2329adff'/%3E%3Crect width='1' height='1' transform='translate(0 3)' fill='%2329adff'/%3E%3Crect width='1' height='1' transform='translate(3 3)' fill='%2329adff'/%3E%3C/svg%3E"); background-size: contain; background-repeat: no-repeat; image-rendering: pixelated; } .close-button:hover::before { transform: rotate(90deg); transition: transform 0.3s; } .tool-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 24px; } .tool-item { background-color: var(--dark); height: 70px; border: var(--pixel-size) solid transparent; border-image: url("data:image/svg+xml,%3Csvg width='3' height='3' viewBox='0 0 3 3' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Crect width='1' height='1' fill='%235f574f'/%3E%3Crect width='1' height='1' transform='translate(1)' fill='%235f574f'/%3E%3Crect width='1' height='1' transform='translate(2)' fill='%235f574f'/%3E%3Crect width='1' height='1' transform='translate(0 1)' fill='%235f574f'/%3E%3Crect width='1' height='1' transform='translate(2 1)' fill='%235f574f'/%3E%3Crect width='1' height='1' transform='translate(0 2)' fill='%235f574f'/%3E%3Crect width='1' height='1' transform='translate(1 2)' fill='%235f574f'/%3E%3Crect width='1' height='1' transform='translate(2 2)' fill='%235f574f'/%3E%3C/svg%3E") 1 stretch; display: flex; flex-direction: column; align-items: center; justify-content: center; cursor: pointer; transition: all 0.2s; position: relative; overflow: hidden; } .tool-item:hover { transform: translateY(-4px); border-image: url("data:image/svg+xml,%3Csvg width='3' height='3' viewBox='0 0 3 3' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Crect width='1' height='1' fill='%2329adff'/%3E%3Crect width='1' height='1' transform='translate(1)' fill='%2329adff'/%3E%3Crect width='1' height='1' transform='translate(2)' fill='%2329adff'/%3E%3Crect width='1' height='1' transform='translate(0 1)' fill='%2329adff'/%3E%3Crect width='1' height='1' transform='translate(2 1)' fill='%2329adff'/%3E%3Crect width='1' height='1' transform='translate(0 2)' fill='%2329adff'/%3E%3Crect width='1' height='1' transform='translate(1 2)' fill='%2329adff'/%3E%3Crect width='1' height='1' transform='translate(2 2)' fill='%2329adff'/%3E%3C/svg%3E") 1 stretch; } .tool-item:active { transform: translateY(2px); } .tool-icon { width: 24px; height: 24px; margin-bottom: 8px; image-rendering: pixelated; } .tool-name { font-size: 10px; color: var(--light); text-align: center; text-transform: uppercase; } .pencil-icon { background-image: url("data:image/svg+xml,%3Csvg width='6' height='6' viewBox='0 0 6 6' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Crect width='1' height='1' transform='translate(4 0)' fill='%23ff004d'/%3E%3Crect width='1' height='1' transform='translate(3 1)' fill='%23ff004d'/%3E%3Crect width='1' height='1' transform='translate(2 2)' fill='%23ff004d'/%3E%3Crect width='1' height='1' transform='translate(1 3)' fill='%23ff004d'/%3E%3Crect width='1' height='1' transform='translate(0 4)' fill='%23ff004d'/%3E%3C/svg%3E"); background-size: contain; background-repeat: no-repeat; } .eraser-icon { background-image: url("data:image/svg+xml,%3Csvg width='6' height='6' viewBox='0 0 6 6' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Crect width='1' height='1' transform='translate(1 1)' fill='%2329adff'/%3E%3Crect width='1' height='1' transform='translate(2 1)' fill='%2329adff'/%3E%3Crect width='1' height='1' transform='translate(3 1)' fill='%2329adff'/%3E%3Crect width='1' height='1' transform='translate(4 1)' fill='%2329adff'/%3E%3Crect width='1' height='1' transform='translate(1 2)' fill='%2329adff'/%3E%3Crect width='1' height='1' transform='translate(4 2)' fill='%2329adff'/%3E%3Crect width='1' height='1' transform='translate(1 3)' fill='%2329adff'/%3E%3Crect width='1' height='1' transform='translate(4 3)' fill='%2329adff'/%3E%3Crect width='1' height='1' transform='translate(1 4)' fill='%2329adff'/%3E%3Crect width='1' height='1' transform='translate(2 4)' fill='%2329adff'/%3E%3Crect width='1' height='1' transform='translate(3 4)' fill='%2329adff'/%3E%3Crect width='1' height='1' transform='translate(4 4)' fill='%2329adff'/%3E%3C/svg%3E"); background-size: contain; background-repeat: no-repeat; } .bucket-icon { background-image: url("data:image/svg+xml,%3Csvg width='6' height='6' viewBox='0 0 6 6' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Crect width='1' height='1' transform='translate(2 0)' fill='%2300e756'/%3E%3Crect width='1' height='1' transform='translate(1 1)' fill='%2300e756'/%3E%3Crect width='1' height='1' transform='translate(2 1)' fill='%2300e756'/%3E%3Crect width='1' height='1' transform='translate(3 1)' fill='%2300e756'/%3E%3Crect width='1' height='1' transform='translate(0 2)' fill='%2300e756'/%3E%3Crect width='1' height='1' transform='translate(1 2)' fill='%2300e756'/%3E%3Crect width='1' height='1' transform='translate(2 2)' fill='%2300e756'/%3E%3Crect width='1' height='1' transform='translate(3 2)' fill='%2300e756'/%3E%3Crect width='1' height='1' transform='translate(4 2)' fill='%2300e756'/%3E%3Crect width='1' height='1' transform='translate(1 3)' fill='%2300e756'/%3E%3Crect width='1' height='1' transform='translate(3 3)' fill='%2300e756'/%3E%3Crect width='1' height='1' transform='translate(2 4)' fill='%2300e756'/%3E%3C/svg%3E"); background-size: contain; background-repeat: no-repeat; } .selector-icon { background-image: url("data:image/svg+xml,%3Csvg width='6' height='6' viewBox='0 0 6 6' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Crect width='1' height='1' transform='translate(1 1)' fill='%23faef5d'/%3E%3Crect width='1' height='1' transform='translate(2 1)' fill='%23faef5d'/%3E%3Crect width='1' height='1' transform='translate(1 2)' fill='%23faef5d'/%3E%3Crect width='1' height='1' transform='translate(4 2)' fill='%23faef5d'/%3E%3Crect width='1' height='1' transform='translate(1 3)' fill='%23faef5d'/%3E%3Crect width='1' height='1' transform='translate(3 3)' fill='%23faef5d'/%3E%3Crect width='1' height='1' transform='translate(1 4)' fill='%23faef5d'/%3E%3Crect width='1' height='1' transform='translate(2 4)' fill='%23faef5d'/%3E%3C/svg%3E"); background-size: contain; background-repeat: no-repeat; } .color-palette { display: flex; gap: 12px; margin-bottom: 24px; flex-wrap: wrap; justify-content: center; } .color-swatch { width: 32px; height: 32px; cursor: pointer; border: var(--pixel-size) solid transparent; border-image: url("data:image/svg+xml,%3Csvg width='3' height='3' viewBox='0 0 3 3' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Crect width='1' height='1' fill='%235f574f'/%3E%3Crect width='1' height='1' transform='translate(1)' fill='%235f574f'/%3E%3Crect width='1' height='1' transform='translate(2)' fill='%235f574f'/%3E%3Crect width='1' height='1' transform='translate(0 1)' fill='%235f574f'/%3E%3Crect width='1' height='1' transform='translate(2 1)' fill='%235f574f'/%3E%3Crect width='1' height='1' transform='translate(0 2)' fill='%235f574f'/%3E%3Crect width='1' height='1' transform='translate(1 2)' fill='%235f574f'/%3E%3Crect width='1' height='1' transform='translate(2 2)' fill='%235f574f'/%3E%3C/svg%3E") 1 stretch; position: relative; transition: transform 0.2s; } .color-swatch:hover { transform: scale(1.2); z-index: 2; } .color-swatch.active { border-image: url("data:image/svg+xml,%3Csvg width='3' height='3' viewBox='0 0 3 3' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Crect width='1' height='1' fill='white'/%3E%3Crect width='1' height='1' transform='translate(1)' fill='white'/%3E%3Crect width='1' height='1' transform='translate(2)' fill='white'/%3E%3Crect width='1' height='1' transform='translate(0 1)' fill='white'/%3E%3Crect width='1' height='1' transform='translate(2 1)' fill='white'/%3E%3Crect width='1' height='1' transform='translate(0 2)' fill='white'/%3E%3Crect width='1' height='1' transform='translate(1 2)' fill='white'/%3E%3Crect width='1' height='1' transform='translate(2 2)' fill='white'/%3E%3C/svg%3E") 1 stretch; } .color-1 { background-color: #ff004d; } .color-2 { background-color: #ff77a8; } .color-3 { background-color: #00e756; } .color-4 { background-color: #29adff; } .color-5 { background-color: #83769c; } .color-6 { background-color: #ffec27; } .color-7 { background-color: #fff1e8; } .color-8 { background-color: #000000; } .canvas-preview { width: 100%; height: 120px; background-color: var(--dark); position: relative; overflow: hidden; border: var(--pixel-size) solid transparent; border-image: url("data:image/svg+xml,%3Csvg width='3' height='3' viewBox='0 0 3 3' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Crect width='1' height='1' fill='%235f574f'/%3E%3Crect width='1' height='1' transform='translate(1)' fill='%235f574f'/%3E%3Crect width='1' height='1' transform='translate(2)' fill='%235f574f'/%3E%3Crect width='1' height='1' transform='translate(0 1)' fill='%235f574f'/%3E%3Crect width='1' height='1' transform='translate(2 1)' fill='%235f574f'/%3E%3Crect width='1' height='1' transform='translate(0 2)' fill='%235f574f'/%3E%3Crect width='1' height='1' transform='translate(1 2)' fill='%235f574f'/%3E%3Crect width='1' height='1' transform='translate(2 2)' fill='%235f574f'/%3E%3C/svg%3E") 1 stretch; margin-bottom: 24px; } .pixel-grid { position: absolute; top: 0; left: 0; width: 100%; height: 100%; display: grid; grid-template-columns: repeat(16, 1fr); grid-template-rows: repeat(8, 1fr); } .pixel { background-color: transparent; transition: background-color 0.2s; position: relative; border: 1px solid rgba(0, 0, 0, 0.1); } .action-buttons { display: flex; justify-content: space-between; gap: 16px; } .action-button { flex: 1; padding: 12px; font-family: 'Press Start 2P', cursive; font-size: 12px; background-color: var(--dark); color: var(--light); border: var(--pixel-size) solid transparent; border-image: url("data:image/svg+xml,%3Csvg width='3' height='3' viewBox='0 0 3 3' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Crect width='1' height='1' fill='%235f574f'/%3E%3Crect width='1' height='1' transform='translate(1)' fill='%235f574f'/%3E%3Crect width='1' height='1' transform='translate(2)' fill='%235f574f'/%3E%3Crect width='1' height='1' transform='translate(0 1)' fill='%235f574f'/%3E%3Crect width='1' height='1' transform='translate(2 1)' fill='%235f574f'/%3E%3Crect width='1' height='1' transform='translate(0 2)' fill='%235f574f'/%3E%3Crect width='1' height='1' transform='translate(1 2)' fill='%235f574f'/%3E%3Crect width='1' height='1' transform='translate(2 2)' fill='%235f574f'/%3E%3C/svg%3E") 1 stretch; cursor: pointer; transition: all 0.2s; } .action-button.primary { background-color: var(--primary); } .action-button.secondary { background-color: var(--secondary); } .action-button:hover { transform: translateY(-4px); } .action-button:active { transform: translateY(2px); } .pixel-burst { position: absolute; width: 24px; height: 24px; pointer-events: none; z-index: 2; } .burst-particle { position: absolute; width: var(--pixel-size); height: var(--pixel-size); background-color: var(--primary); animation: burstAnim 0.6s forwards ease-out; } @keyframes burstAnim { 0% { transform: translate(0, 0); opacity: 1; } 100% { transform: translate(var(--x), var(--y)); opacity: 0; } } .modal-active .modal-overlay { opacity: 1; visibility: visible; } .modal-active .modal { transform: translateY(0); } .pixelated-cursor { width: 24px; height: 24px; position: absolute; pointer-events: none; z-index: 1000; background-image: url("data:image/svg+xml,%3Csvg width='6' height='6' viewBox='0 0 6 6' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Crect width='1' height='1' transform='translate(0 0)' fill='white'/%3E%3Crect width='1' height='1' transform='translate(1 1)' fill='white'/%3E%3Crect width='1' height='1' transform='translate(2 2)' fill='white'/%3E%3Crect width='1' height='1' transform='translate(3 3)' fill='white'/%3E%3Crect width='1' height='1' transform='translate(4 4)' fill='white'/%3E%3Crect width='1' height='1' transform='translate(5 5)' fill='white'/%3E%3C/svg%3E"); background-size: contain; background-repeat: no-repeat; transform: translate(-12px, -12px); display: none; } .help-text { color: var(--light); font-size: 10px; text-align: center; margin-top: 16px; opacity: 0.7; } .editor-bg { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background-image: url("data:image/svg+xml,%3Csvg width='20' height='20' viewBox='0 0 20 20' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Crect width='10' height='10' fill='%23232323'/%3E%3Crect width='10' height='10' transform='translate(10 10)' fill='%23232323'/%3E%3Crect width='10' height='10' transform='translate(10 0)' fill='%231e1e1e'/%3E%3Crect width='10' height='10' transform='translate(0 10)' fill='%231e1e1e'/%3E%3C/svg%3E"); background-size: 40px 40px; background-repeat: repeat; opacity: 0.3; z-index: -1; } @media (max-width: 500px) { .tool-grid { grid-template-columns: repeat(2, 1fr); } .modal-title { font-size: 14px; } .action-button { font-size: 10px; padding: 8px; } } </style> </head> <body> <div class="container"> <div class="editor-bg"></div> <div class="pixelated-cursor"></div> <button class="pixel-button" id="open-modal">OPEN PIXEL EDITOR</button> <div class="modal-overlay"> <div class="modal"> <div class="modal-content"> <div class="modal-header"> <h2 class="modal-title"><span class="pixel-icon"></span>PIXEL STUDIO</h2> <button class="close-button" id="close-modal"></button> </div> <div class="tool-grid"> <div class="tool-item" data-tool="pencil"> <div class="tool-icon pencil-icon"></div> <div class="tool-name">Pencil</div> </div> <div class="tool-item" data-tool="eraser"> <div class="tool-icon eraser-icon"></div> <div class="tool-name">Eraser</div> </div> <div class="tool-item" data-tool="bucket"> <div class="tool-icon bucket-icon"></div> <div class="tool-name">Fill</div> </div> <div class="tool-item" data-tool="selector"> <div class="tool-icon selector-icon"></div> <div class="tool-name">Select</div> </div> </div> <div class="color-palette"> <div class="color-swatch color-1 active" data-color="#ff004d"></div> <div class="color-swatch color-2" data-color="#ff77a8"></div> <div class="color-swatch color-3" data-color="#00e756"></div> <div class="color-swatch color-4" data-color="#29adff"></div> <div class="color-swatch color-5" data-color="#83769c"></div> <div class="color-swatch color-6" data-color="#ffec27"></div> <div class="color-swatch color-7" data-color="#fff1e8"></div> <div class="color-swatch color-8" data-color="#000000"></div> </div> <div class="canvas-preview"> <div class="pixel-grid" id="pixelGrid"></div> </div> <div class="action-buttons"> <button class="action-button" id="clear-canvas">CLEAR</button> <button class="action-button secondary" id="undo-button">UNDO</button> <button class="action-button primary" id="save-button">SAVE</button> </div> <div class="help-text">PRESS [SPACE] TO TOGGLE GRID</div> </div> </div> </div> </div> <script> document.addEventListener('DOMContentLoaded', function() { // DOM Elements const container = document.querySelector('.container'); const openModalBtn = document.getElementById('open-modal'); const closeModalBtn = document.getElementById('close-modal'); const modalOverlay = document.querySelector('.modal-overlay'); const pixelGrid = document.getElementById('pixelGrid'); const toolItems = document.querySelectorAll('.tool-item'); const colorSwatches = document.querySelectorAll('.color-swatch'); const clearCanvasBtn = document.getElementById('clear-canvas'); const undoButton = document.getElementById('undo-button'); const saveButton = document.getElementById('save-button'); const customCursor = document.querySelector('.pixelated-cursor'); // State variables let currentTool = 'pencil'; let currentColor = '#ff004d'; let isDrawing = false; let showGrid = true; let history = []; let currentState = []; const gridSize = { width: 16, height: 8 }; // Create pixel grid function initializeGrid() { pixelGrid.innerHTML = ''; for (let y = 0; y < gridSize.height; y++) { for (let x = 0; x < gridSize.width; x++) { const pixel = document.createElement('div'); pixel.classList.add('pixel'); pixel.dataset.x = x; pixel.dataset.y = y; pixelGrid.appendChild(pixel); // Add initial state if (!currentState[y]) currentState[y] = []; currentState[y][x] = ''; } } saveHistory(); }
<html> <head> <style> @import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap'); * { margin: 0; padding: 0; box-sizing: border-box; } :root { --pixel-size: 4px; --primary: #ff6b6b; --secondary: #4ecdc4; --dark: #1a1a2e; --light: #f8f9fa; --console-green: #92f29c; } body { font-family: 'Press Start 2P', cursive; background-color: var(--dark); color: var(--light); overflow-x: hidden; display: flex; flex-direction: column; justify-content: center; align-items: center; min-height: 700px; padding: 20px; background-image: linear-gradient(rgba(26, 26, 46, 0.9), rgba(26, 26, 46, 0.9)), repeating-linear-gradient(0deg, transparent, transparent var(--pixel-size), rgba(255, 255, 255, 0.05) var(--pixel-size), rgba(255, 255, 255, 0.05) calc(var(--pixel-size) * 2)), repeating-linear-gradient(90deg, transparent, transparent var(--pixel-size), rgba(255, 255, 255, 0.05) var(--pixel-size), rgba(255, 255, 255, 0.05) calc(var(--pixel-size) * 2)); } .container { max-width: 680px; width: 100%; margin: 0 auto; } header { text-align: center; margin-bottom: 30px; position: relative; padding: 15px 0; } .title { font-size: 24px; letter-spacing: 1px; color: var(--console-green); text-shadow: 4px 4px 0 rgba(0, 0, 0, 0.6); margin-bottom: 10px; animation: flicker 4s infinite alternate; } .subtitle { font-size: 12px; color: var(--secondary); margin-bottom: 15px; } .cards-container { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 25px; justify-content: center; margin-bottom: 30px; } .card { background-color: var(--dark); border: var(--pixel-size) solid var(--light); position: relative; cursor: pointer; transition: transform 0.3s ease, box-shadow 0.3s ease; border-radius: 2px; overflow: hidden; box-shadow: 8px 8px 0 rgba(0, 0, 0, 0.3); } .card:hover { transform: translateY(-10px); box-shadow: 12px 12px 0 rgba(0, 0, 0, 0.4); } .card::before { content: ""; position: absolute; top: 0; left: 0; width: 100%; height: 100%; background-image: linear-gradient(rgba(26, 26, 46, 0.1), rgba(26, 26, 46, 0.1)), repeating-linear-gradient(0deg, transparent, transparent var(--pixel-size), rgba(255, 255, 255, 0.05) var(--pixel-size), rgba(255, 255, 255, 0.05) calc(var(--pixel-size) * 2)), repeating-linear-gradient(90deg, transparent, transparent var(--pixel-size), rgba(255, 255, 255, 0.05) var(--pixel-size), rgba(255, 255, 255, 0.05) calc(var(--pixel-size) * 2)); pointer-events: none; z-index: 2; } .card-inner { padding: 15px; display: flex; flex-direction: column; align-items: center; height: 100%; } .pixel-art { width: 80px; height: 80px; margin: 10px 0; image-rendering: pixelated; image-rendering: crisp-edges; transform-origin: center; transition: transform 0.3s ease; position: relative; z-index: 1; } .card:hover .pixel-art { animation: bounce 0.5s infinite alternate; } .card-name { font-size: 12px; text-align: center; margin: 10px 0; color: var(--primary); text-shadow: 2px 2px 0 rgba(0, 0, 0, 0.5); } .card-game { font-size: 8px; text-align: center; color: var(--secondary); margin-bottom: 10px; } .card-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background-color: rgba(26, 26, 46, 0.9); display: flex; flex-direction: column; justify-content: center; align-items: center; padding: 20px; opacity: 0; transition: opacity 0.3s ease; z-index: 3; border-width: var(--pixel-size); border-style: solid; border-color: var(--secondary); transform: scale(0.95); backdrop-filter: blur(3px); } .card:hover .card-overlay { opacity: 1; transform: scale(1); } .stat { font-size: 8px; margin: 3px 0; text-align: center; width: 100%; display: flex; justify-content: space-between; } .stat-label { color: var(--console-green); } .stat-value { color: var(--light); } .stat-bar { height: 8px; background-color: rgba(255, 255, 255, 0.1); margin-top: 5px; position: relative; width: 100%; overflow: hidden; } .stat-fill { height: 100%; background-color: var(--primary); position: absolute; top: 0; left: 0; width: 0; transition: width 0.5s ease; } .card:hover .stat-fill { animation: fillBar 0.8s forwards; } .retro-btn { margin-top: 20px; background-color: var(--primary); color: var(--dark); border: none; padding: 10px 20px; font-family: 'Press Start 2P', cursive; font-size: 14px; cursor: pointer; position: relative; transition: all 0.2s ease; box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.5); } .retro-btn:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 rgba(0, 0, 0, 0.5); } .retro-btn:active { transform: translate(2px, 2px); box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.5); } .controls { display: flex; justify-content: center; margin-top: 20px; gap: 15px; } .view-toggle { background-color: var(--dark); color: var(--light); border: 2px solid var(--secondary); padding: 8px 16px; font-family: 'Press Start 2P', cursive; font-size: 10px; cursor: pointer; transition: all 0.2s ease; } .view-toggle.active { background-color: var(--secondary); color: var(--dark); } .special-move { color: var(--primary); font-size: 10px; margin-top: 10px; text-align: center; text-shadow: 2px 2px 0 rgba(0, 0, 0, 0.5); } .footer { margin-top: 30px; font-size: 8px; color: var(--light); opacity: 0.5; text-align: center; } /* Scanline effect */ .scanline { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: linear-gradient( to bottom, transparent 50%, rgba(0, 0, 0, 0.05) 50% ); background-size: 100% 4px; z-index: 999; pointer-events: none; opacity: 0.3; } /* CRT effect */ .crt-effect { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: radial-gradient( ellipse at center, transparent 0%, rgba(0, 0, 0, 0.2) 100% ); pointer-events: none; z-index: 998; } @keyframes bounce { 0% { transform: translateY(0); } 100% { transform: translateY(-5px); } } @keyframes fillBar { 0% { width: 0; } 100% { width: var(--fill-percent); } } @keyframes flicker { 0%, 19.999%, 22%, 62.999%, 64%, 64.999%, 70%, 100% { opacity: 1; } 20%, 21.999%, 63%, 63.999%, 65%, 69.999% { opacity: 0.8; } } @media (max-width: 600px) { .cards-container { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); } .title { font-size: 20px; } .subtitle { font-size: 10px; } } .hidden { display: none; } /* Grid View */ .grid-view .cards-container { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); } /* List View */ .list-view .cards-container { grid-template-columns: 1fr; } .list-view .card { max-width: 100%; } .list-view .card-inner { flex-direction: row; justify-content: flex-start; text-align: left; } .list-view .pixel-art { margin-right: 20px; } .list-view .card-details { display: flex; flex-direction: column; align-items: flex-start; } .card-badge { position: absolute; top: 5px; right: 5px; background-color: var(--primary); color: var(--dark); font-size: 8px; padding: 3px 6px; z-index: 4; } /* Glitch effect */ .glitch { animation: glitch 1s linear infinite; } @keyframes glitch { 2%, 64% { transform: translate(2px, 0) skew(0deg); } 4%, 60% { transform: translate(-2px, 0) skew(0deg); } 62% { transform: translate(0, 0) skew(5deg); } } .glitch:before, .glitch:after { content: attr(title); position: absolute; left: 0; } .glitch:before { animation: glitchTop 1s linear infinite; clip-path: polygon(0 0, 100% 0, 100% 33%, 0 33%); -webkit-clip-path: polygon(0 0, 100% 0, 100% 33%, 0 33%); } @keyframes glitchTop { 2%, 64% { transform: translate(2px, -2px); } 4%, 60% { transform: translate(-2px, 2px); } 62% { transform: translate(13px, -1px) skew(-13deg); } } .glitch:after { animation: glitchBottom 1.5s linear infinite; clip-path: polygon(0 67%, 100% 67%, 100% 100%, 0 100%); -webkit-clip-path: polygon(0 67%, 100% 67%, 100% 100%, 0 100%); } @keyframes glitchBottom { 2%, 64% { transform: translate(-2px, 0); } 4%, 60% { transform: translate(-2px, 0); } 62% { transform: translate(-22px, 5px) skew(21deg); } } </style> </head> <body> <div class="scanline"></div> <div class="crt-effect"></div> <div class="container"> <header> <h1 class="title">PIXEL LEGENDS</h1> <p class="subtitle">RETRO GAMING HALL OF FAME</p> </header> <div class="controls"> <button class="view-toggle active" data-view="grid">GRID VIEW</button> <button class="view-toggle" data-view="list">LIST VIEW</button> </div> <div class="cards-container grid-view"> <!-- Card 1 --> <div class="card"> <div class="card-badge">HERO</div> <div class="card-inner"> <img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAaklEQVR42mNgGAU4gCbQAWJOIs3QBOJnQPwciPOJMUATiJ8C8X8o/YxYA56CNAD5z4g1QBeqGYaBeriaYYCmQPwBiwnvgTgPXQzZdkwvwGsAulegyTpf0NVhugtZM8w7cO/AXDNqAD4AAMz/HK7/r8LnAAAAAElFTkSuQmCC" class="pixel-art" alt="Mario character"> <div class="card-details"> <h2 class="card-name">SUPER MARIO</h2> <p class="card-game">SUPER MARIO BROS. (1985)</p> </div> </div> <div class="card-overlay"> <div class="stat"> <span class="stat-label">JUMP</span> <span class="stat-value">92/100</span> </div> <div class="stat-bar"> <div class="stat-fill" style="--fill-percent: 92%"></div> </div> <div class="stat"> <span class="stat-label">SPEED</span> <span class="stat-value">75/100</span> </div> <div class="stat-bar"> <div class="stat-fill" style="--fill-percent: 75%"></div> </div> <div class="stat"> <span class="stat-label">POWER</span> <span class="stat-value">80/100</span> </div> <div class="stat-bar"> <div class="stat-fill" style="--fill-percent: 80%"></div> </div> <div class="special-move">SPECIAL: FIREBALL</div> </div> </div> <!-- Card 2 --> <div class="card"> <div class="card-badge">CLASSIC</div> <div class="card-inner"> <img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAY0lEQVR42mNgGAWDCmgC8TMgfo7GfwbEuiSaAVL7H4p/ArEuMQZoAvFPqKJnUPo5MQY8BeLnaPxnxBqgC8TPoPgZVA03YADVDNOMKeCFaobxcQE8GkG2Y3oBvwHoXhkFVAIAFw8crsW7hn4AAAAASUVORK5CYII=" class="pixel-art" alt="Pac-Man character"> <div class="card-details"> <h2 class="card-name">PAC-MAN</h2> <p class="card-game">PAC-MAN (1980)</p> </div> </div> <div class="card-overlay"> <div class="stat"> <span class="stat-label">SPEED</span> <span class="stat-value">85/100</span> </div> <div class="stat-bar"> <div class="stat-fill" style="--fill-percent: 85%"></div> </div> <div class="stat"> <span class="stat-label">APPETITE</span> <span class="stat-value">100/100</span> </div> <div class="stat-bar"> <div class="stat-fill" style="--fill-percent: 100%"></div> </div> <div class="stat"> <span class="stat-label">EVASION</span> <span class="stat-value">88/100</span> </div> <div class="stat-bar"> <div class="stat-fill" style="--fill-percent: 88%"></div> </div> <div class="special-move">SPECIAL: GHOST CHOMPER</div> </div> </div> <!-- Card 3 --> <div class="card"> <div class="card-badge">SPEEDSTER</div> <div class="card-inner"> <img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAbElEQVR42mNgGAWDEmgC8XMgfg7Ez6D0cyDWJcYATSB+CsT/ofQzIA4kxoD/UPoZED8l1gBdIH4GxT+JNUATiD9ADfkAxHnEGqAJNQSGdYk1QBNqCIzWJdYAmFeew7xCrAF6QGwAxfoD75VRAAAjyx2u6hRrQAAAAABJRU5ErkJggg==" class="pixel-art" alt="Sonic character"> <div class="card-details"> <h2 class="card-name">SONIC</h2> <p class="card-game">SONIC THE HEDGEHOG (1991)</p> </div> </div> <div class="card-overlay"> <div class="stat"> <span class="stat-label">SPEED</span> <span class="stat-value">99/100</span> </div> <div class="stat-bar"> <div class="stat-fill" style="--fill-percent: 99%"></div> </div> <div class="stat"> <span class="stat-label">JUMP</span> <span class="stat-value">82/100</span> </div> <div class="stat-bar"> <div class="stat-fill" style="--fill-percent: 82%"></div> </div> <div class="stat"> <span class="stat-label">ATTITUDE</span> <span class="stat-value">95/100</span> </div> <div class="stat-bar"> <div class="stat-fill" style="--fill-percent: 95%"></div> </div> <div class="special-move">SPECIAL: SPIN DASH</div> </div> </div> <!-- Card 4 --> <div class="card"> <div class="card-badge">LEGEND</div> <div class="card-inner"> <img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAaklEQVR42mNgGAU4gCYQPwPi52j0MyDWJdIcTSB+CsT/gfgnEOcTYwC6QaS4QBdqyDMofk6sAZpA/AGIPwBxHrEGaALxczQXEm2AJhA/g2LiDYBphroKeAPQDXqGphmuGWYIcYaNAqoBABCfHK78kSlpAAAAAElFTkSuQmCC" class="pixel-art" alt="Link character"> <div class="card-details"> <h2 class="card-name glitch" title="LINK">LINK</h2> <p class="card-game">THE LEGEND OF ZELDA (1986)</p> </div> </div> <div class="card-overlay"> <div class="stat"> <span class="stat-label">COURAGE</span> <span class="stat-value">97/100</span> </div> <div class="stat-bar"> <div class="stat-fill" style="--fill-percent: 97%"></div> </div> <div class="stat"> <span class="stat-label">WISDOM</span> <span class="stat-value">80/100</span> </div> <div class="stat-bar"> <div class="stat-fill" style="--fill-percent: 80%"></div> </div> <div class="stat"> <span class="stat-label">POWER</span> <span class="stat-value">85/100</span> </div> <div class="stat-bar"> <div class="stat-fill" style="--fill-percent: 85%"></div> </div> <div class="special-move">SPECIAL: MASTER SWORD</div> </div> </div> <!-- Card 5 --> <div class="card"> <div class="card-badge">HUNTER</div> <div class="card-inner"> <img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAaElEQVR42mNgGAU4gCYQPwPi51A6j0hz9IH4JxD/h+JnQKxLjAEw8AmIdYkxQBOIn8IMAeJ8Yg3QBOIPUEc8J9YAXah3YIboEmsAzPZnQJxHrAF6UO88I9YATajtz9BsJ84FWDS/GDUAFQAANV8cruoUa0AAAAAASUVORK5CYII=" class="pixel-art" alt="Samus character"> <div class="card-details"> <h2 class="card-name">SAMUS ARAN</h2> <p class="card-game">METROID (1986)</p> </div> </div> <div class="card-overlay"> <div class="stat"> <span class="stat-label">FIREPOWER</span> <span class="stat-value">95/100</span> </div> <div class="stat-bar"> <div class="stat-fill" style="--fill-percent: 95%"></div> </div> <div class="stat"> <span class="stat-label">DEFENSE</span> <span class="stat-value">90/100</span> </div> <div class="stat-bar"> <div class="stat-fill" style="--fill-percent: 90%"></div> </div> <div class="stat"> <span class="stat-label">AGILITY</span> <span class="stat-value">83/100</span> </div> <div class="stat-bar"> <div class="stat-fill" style="--fill-percent: 83%"></div> </div> <div class="special-move">SPECIAL: MORPH BALL</div> </div> </div> <!-- Card 6 --> <div class="card"> <div class="card-badge">FIGHTER</div> <div class="card-inner"> <img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAZklEQVR42mNgGAU4gCYQPwPi50CcR6Q5mkD8FIj/Q/EzINYlxgBNIH4KM4RYAzSB+AMQPwfiPGINgLkC5h1dYg2AeeMZEOcRa4AeVPMzYg3QhGp+RqwBmlDNz9BsJ84FWDS/GDUAFQAA5uEcrsUoZuIAAAAASUVORK5CYII=" class="pixel-art" alt="Ryu character"> <div class="card-details"> <h2 class="card-name">RYU</h2> <p class="card-game">STREET FIGHTER II (1991)</p> </div> </div> <div class="card-overlay"> <div class="stat"> <span class="stat-label">STRENGTH</span> <span class="stat-value">88/100</span> </div> <div class="stat-bar"> <div class="stat-fill" style="--fill-percent: 88%"></div> </div> <div class="stat"> <span class="stat-label">TECHNIQUE</span> <span class="stat-value">95/100</span> </div> <div class="stat-bar"> <div class="stat-fill" style="--fill-percent: 95%"></div> </div> <div class="stat"> <span class="stat-label">SPEED</span> <span class="stat-value">78/100</span> </div> <div class="stat-bar"> <div class="stat-fill" style="--fill-percent: 78%"></div> </div> <div class="special-move">SPECIAL: HADOUKEN</div> </div> </div> </div> <button class="retro-btn" id="randomize-btn">RANDOMIZE STATS</button> <footer class="footer"> © 2023 PIXEL LEGENDS • PRESS START TO PLAY </footer> </div> <script> // Toggle between Grid and List view const viewToggles = document.querySelectorAll('.view-toggle'); const cardsContainer = document.querySelector('.cards-container'); viewToggles.forEach(toggle => { toggle.addEventListener('click', () => { // Remove active class from all toggles viewToggles.forEach(t => t.classList.remove('active')); // Add active class to clicked toggle toggle.classList.add('active'); // Update view const view = toggle.getAttribute('data-view'); cardsContainer.className = 'cards-container ' + view + '-view'; }); }); // Randomize Stats Button document.getElementById('randomize-btn').addEventListener('click', () => { const statFills = document.querySelectorAll('.stat-fill'); const statValues = document.querySelectorAll('.stat-value'); statFills.forEach((fill, index) => { const randomStat = Math.floor(Math.random() * 51) + 50; // Random number between 50-100 fill.style.setProperty('--fill-percent', randomStat + '%'); // Update the corresponding stat value if (statValues[index]) { statValues[index].textContent = randomStat + '/100'; } }); // Add glitch effect temporarily const cardNames = document.querySelectorAll('.card-name'); cardNames.forEach(name => { name.classList.add('glitch'); setTimeout(() => { name.classList.remove('glitch'); }, 1000); }); }); // Add hover sound effect const cards = document.querySelectorAll('.card'); cards.forEach(card => { card.addEventListener('mouseenter', () => { // Create audio context only on user interaction if (typeof audioCtx === 'undefined') { const AudioContext = window.AudioContext || window.webkitAudioContext; window.audioCtx = new AudioContext(); } if (window.audioCtx) { const oscillator = window.audioCtx.createOscillator(); const gainNode = window.audioCtx.createGain(); oscillator.type = 'square'; oscillator.frequency.setValueAtTime(500, window.audioCtx.currentTime); oscillator.frequency.exponentialRampToValueAtTime(700, window.audioCtx.currentTime + 0.1); gainNode.gain.setValueAtTime(0.05, window.audioCtx.currentTime); gainNode.gain.exponentialRampToValueAtTime(0.01, window.audioCtx.currentTime + 0.1); oscillator.connect(gainNode); gainNode.connect(window.audioCtx.destination); oscillator.start(); oscillator.stop(window.audioCtx.currentTime + 0.1); } }); }); // Add click sound effect for buttons const buttons = document.querySelectorAll('button'); buttons.forEach(button => { button.addEventListener('click', () => { if (typeof audioCtx === 'undefined') { const AudioContext = window.AudioContext || window.webkitAudioContext; window.audioCtx = new AudioContext(); } if (window.audioCtx) { const oscillator = window.audioCtx.createOscillator(); const gainNode = window.audioCtx.createGain(); oscillator.type = 'square'; oscillator.frequency.setValueAtTime(200, window.audioCtx.currentTime); oscillator.frequency.setValueAtTime(150, window.audioCtx.currentTime + 0.1); gainNode.gain.setValueAtTime(0.1, window.audioCtx.currentTime); gainNode.gain.exponentialRampToValueAtTime(0.01, window.audioCtx.currentTime + 0.2); oscillator.connect(gainNode); gainNode.connect(window.audioCtx.destination); oscillator.start(); oscillator.stop(window.audioCtx.currentTime + 0.2); } }); }); </script> </body> </html>
<html> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Pixel Alert Dialogue</title> <style> @font-face { font-family: 'VT323'; font-style: normal; font-weight: 400; src: url(https://fonts.gstatic.com/s/vt323/v17/pxiKyp0ihIEF2isQFJXUdVNF.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; } * { box-sizing: border-box; margin: 0; padding: 0; } body { display: flex; justify-content: center; align-items: center; height: 100vh; background-color: #222; font-family: 'VT323', monospace; overflow: hidden; background-image: url('data:image/svg+xml;utf8,<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><rect width="10" height="10" fill="%23333"/><rect x="10" y="10" width="10" height="10" fill="%23333"/></svg>'); background-size: 20px 20px; } .container { position: relative; width: 100%; max-width: 700px; height: 700px; display: flex; justify-content: center; align-items: center; } .notification-btn { cursor: pointer; background-color: #FF5555; border: none; padding: 15px 30px; font-family: 'VT323', monospace; font-size: 24px; text-transform: uppercase; color: white; box-shadow: 0 5px 0 #AA3333; transition: transform 0.1s, box-shadow 0.1s; outline: none; position: relative; border: 4px solid #000; } .notification-btn:hover { transform: translateY(2px); box-shadow: 0 3px 0 #AA3333; } .notification-btn:active { transform: translateY(5px); box-shadow: none; } .dialog-container { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; justify-content: center; align-items: center; z-index: 100; } .dialog-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background-color: rgba(0, 0, 0, 0.7); animation: fadeIn 0.3s forwards; } .dialog-box { background-color: #333; border: 8px solid #fff; outline: 4px solid #000; width: 90%; max-width: 500px; padding: 20px; position: relative; z-index: 101; animation: slideDown 0.4s forwards; box-shadow: 0 0 0 4px #000; } .dialog-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 15px; border-bottom: 4px solid #fff; padding-bottom: 10px; } .dialog-title { color: #FF5555; font-size: 32px; letter-spacing: 2px; text-transform: uppercase; text-shadow: 4px 4px 0 #000; } .error-icon { width: 40px; height: 40px; background-color: #FF5555; clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%); position: relative; } .error-icon:after { content: "!"; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); font-size: 28px; color: white; font-weight: bold; } .dialog-content { color: #fff; font-size: 24px; line-height: 1.4; margin-bottom: 20px; padding: 15px; background-color: #222; border: 4px solid #fff; text-shadow: 2px 2px 0 #000; } .dialog-actions { display: flex; justify-content: center; } .dialog-button { cursor: pointer; background-color: #55FF55; border: none; padding: 10px 20px; margin: 0 10px; font-family: 'VT323', monospace; font-size: 24px; color: #000; box-shadow: 0 5px 0 #33AA33; transition: transform 0.1s, box-shadow 0.1s; outline: none; border: 4px solid #000; text-transform: uppercase; min-width: 120px; } .dialog-button.cancel { background-color: #5555FF; box-shadow: 0 5px 0 #3333AA; } .dialog-button:hover { transform: translateY(2px); box-shadow: 0 3px 0 #33AA33; } .dialog-button.cancel:hover { box-shadow: 0 3px 0 #3333AA; } .dialog-button:active { transform: translateY(5px); box-shadow: none; } .pixel { position: absolute; width: 10px; height: 10px; background-color: #FF5555; z-index: 102; transform: translate(-50%, -50%); } @keyframes slideDown { 0% { transform: translateY(-50px); opacity: 0; } 100% { transform: translateY(0); opacity: 1; } } @keyframes fadeIn { 0% { opacity: 0; } 100% { opacity: 1; } } @keyframes pixelFly { 0% { opacity: 1; transform: translate(0, 0) rotate(0deg); } 100% { opacity: 0; transform: translate(var(--tx), var(--ty)) rotate(var(--tr)); } } .scanlines { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: linear-gradient( to bottom, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.03) 50%, rgba(255, 255, 255, 0) 100% ); background-size: 100% 4px; z-index: 999; pointer-events: none; opacity: 0.2; } .crt-effect { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: radial-gradient( ellipse at center, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.3) 100% ); pointer-events: none; z-index: 998; } .flicker { animation: flicker 0.1s infinite alternate; } @keyframes flicker { 0% { opacity: 0.98; } 100% { opacity: 1; } } .game-console { position: absolute; bottom: 20px; left: 20px; background-color: #333; border: 4px solid #fff; padding: 10px; font-size: 18px; color: #55FF55; max-width: 300px; opacity: 0.8; box-shadow: 0 0 0 2px #000; } .console-text { overflow: hidden; border-right: 4px solid #55FF55; white-space: nowrap; margin: 0 auto; animation: typing 3.5s steps(40, end), blink-caret 0.75s step-end infinite; } @keyframes typing { from { width: 0 } to { width: 100% } } @keyframes blink-caret { from, to { border-color: transparent } 50% { border-color: #55FF55 } } @media (max-width: 600px) { .dialog-title { font-size: 28px; } .dialog-content { font-size: 20px; } .dialog-button { font-size: 20px; min-width: 100px; } } </style> </head> <body> <div class="container"> <button class="notification-btn">Launch Mission Alert</button> <div class="dialog-container"> <div class="dialog-overlay"></div> <div class="dialog-box"> <div class="dialog-header"> <h2 class="dialog-title">Critical Alert</h2> <div class="error-icon"></div> </div> <div class="dialog-content"> Enemy forces detected! Our sensors have picked up hostile activity near your base. Take immediate action to defend your territory or risk total annihilation. Shall we deploy the defense system? </div> <div class="dialog-actions"> <button class="dialog-button cancel">Retreat</button> <button class="dialog-button confirm">Deploy</button> </div> </div> </div> <div class="game-console"> <div class="console-text">System booting... Ready for command input...</div> </div> </div> <div class="scanlines"></div> <div class="crt-effect"></div> <script> document.addEventListener('DOMContentLoaded', function() { const notificationBtn = document.querySelector('.notification-btn'); const dialogContainer = document.querySelector('.dialog-container'); const dialogBox = document.querySelector('.dialog-box'); const confirmBtn = document.querySelector('.dialog-button.confirm'); const cancelBtn = document.querySelector('.dialog-button.cancel'); const container = document.querySelector('.container'); const gameConsole = document.querySelector('.game-console'); notificationBtn.addEventListener('click', function() { dialogContainer.style.display = 'flex'; gameConsole.innerHTML = '<div class="console-text">ALERT: Hostile detection confirmed. Awaiting command...</div>'; }); function createPixelExplosion(centerX, centerY) { const colors = ['#FF5555', '#FFAA00', '#FFFF55', '#FFFFFF', '#55FF55']; const pixelCount = 100; for (let i = 0; i < pixelCount; i++) { const pixel = document.createElement('div'); pixel.classList.add('pixel'); // Random pixel size const size = Math.random() * 15 + 5; pixel.style.width = `${size}px`; pixel.style.height = `${size}px`; // Starting position pixel.style.left = `${centerX}px`; pixel.style.top = `${centerY}px`; // Random color pixel.style.backgroundColor = colors[Math.floor(Math.random() * colors.length)]; // Custom properties for animation const tx = (Math.random() - 0.5) * 600; const ty = (Math.random() - 0.5) * 600; const tr = (Math.random() - 0.5) * 720; pixel.style.setProperty('--tx', `${tx}px`); pixel.style.setProperty('--ty', `${ty}px`); pixel.style.setProperty('--tr', `${tr}deg`); document.body.appendChild(pixel); // Animate and then remove pixel.style.animation = `pixelFly ${0.5 + Math.random() * 1}s forwards`; setTimeout(() => { pixel.remove(); }, 1500); } } function closeDialog() { const rect = dialogBox.getBoundingClientRect(); const centerX = rect.left + rect.width / 2; const centerY = rect.top + rect.height / 2; createPixelExplosion(centerX, centerY); setTimeout(() => { dialogContainer.style.display = 'none'; }, 300); } confirmBtn.addEventListener('click', function() { closeDialog(); gameConsole.innerHTML = '<div class="console-text">COMMAND ACCEPTED: Defense systems online. Counterattack initiated.</div>'; // Add flicker effect to the notification button notificationBtn.classList.add('flicker'); notificationBtn.textContent = "DEFENSES ACTIVE"; notificationBtn.style.backgroundColor = "#55FF55"; notificationBtn.style.boxShadow = "0 5px 0 #33AA33"; setTimeout(() => { notificationBtn.classList.remove('flicker'); }, 2000); }); cancelBtn.addEventListener('click', function() { closeDialog(); gameConsole.innerHTML = '<div class="console-text">RETREAT ORDERED: Evacuating base personnel. Shields at maximum.</div>'; // Change the notification button notificationBtn.textContent = "BASE EVACUATING"; notificationBtn.style.backgroundColor = "#5555FF"; notificationBtn.style.boxShadow = "0 5px 0 #3333AA"; }); // Prevent clicks on dialog box from closing the dialog dialogBox.addEventListener('click', function(e) { e.stopPropagation(); }); // Random CRT flicker effect setInterval(() => { if (Math.random() > 0.97) { document.body.classList.add('flicker'); setTimeout(() => { document.body.classList.remove('flicker'); }, 50); } }, 500); }); </script> </body> </html>
<html> <head> <title>8-bit Input Form</title> <style> @font-face { font-family: 'VT323'; font-style: normal; font-weight: 400; src: url('https://fonts.gstatic.com/s/vt323/v17/pxiKyp0ihIEF2isfFJXUdVNF.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; } * { margin: 0; padding: 0; box-sizing: border-box; } body { font-family: 'VT323', monospace; background-color: #222034; color: #f4f4f4; display: flex; justify-content: center; align-items: center; height: 100vh; overflow: hidden; letter-spacing: 1px; background-image: radial-gradient(#445 1px, transparent 1px), radial-gradient(#445 1px, transparent 1px); background-size: 20px 20px; background-position: 0 0, 10px 10px; } .container { width: 100%; max-width: 600px; background-color: #313638; border: 4px solid #f8b700; box-shadow: 0 0 0 4px #313638, 0 0 0 8px #f8b700; padding: 20px; position: relative; overflow: hidden; } .title { font-size: 36px; text-align: center; margin-bottom: 30px; color: #f8b700; text-shadow: 3px 3px 0 #ff004d; animation: pulse 2s infinite; } .form-group { margin-bottom: 20px; position: relative; } .form-group label { display: block; font-size: 20px; margin-bottom: 8px; color: #29adff; } .input-box { width: 100%; padding: 10px; background-color: #222034; border: 3px solid #29adff; color: #f4f4f4; font-family: 'VT323', monospace; font-size: 20px; transition: all 0.3s; outline: none; } .input-box:focus { border-color: #f8b700; box-shadow: 0 0 8px #f8b700; } .error-message { color: #ff004d; font-size: 16px; margin-top: 5px; height: 20px; opacity: 0; transition: opacity 0.3s; } .input-error { border-color: #ff004d; animation: shake 0.5s; } button { display: block; width: 100%; padding: 12px; background-color: #29adff; border: none; color: #222034; font-family: 'VT323', monospace; font-size: 22px; cursor: pointer; margin-top: 10px; position: relative; overflow: hidden; transition: background-color 0.3s; border: 3px solid #29adff; } button:hover { background-color: #f8b700; border-color: #f8b700; } button:active { transform: scale(0.98); } .pixel-corner { position: absolute; width: 10px; height: 10px; background-color: #f8b700; } .pixel-corner-tl { top: 0; left: 0; } .pixel-corner-tr { top: 0; right: 0; } .pixel-corner-bl { bottom: 0; left: 0; } .pixel-corner-br { bottom: 0; right: 0; } .success-message { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background-color: rgba(34, 32, 52, 0.9); display: flex; flex-direction: column; align-items: center; justify-content: center; opacity: 0; visibility: hidden; transition: all 0.5s; z-index: 100; padding: 20px; } .success-message.show { opacity: 1; visibility: visible; } .success-icon { width: 80px; height: 80px; background-color: #00e436; margin-bottom: 20px; position: relative; animation: successPulse 1s infinite; } .success-icon:before, .success-icon:after { content: ''; position: absolute; background-color: #00e436; } .success-icon:before { width: 30px; height: 15px; transform: rotate(45deg); bottom: 25px; left: 15px; } .success-icon:after { width: 60px; height: 15px; transform: rotate(-45deg); bottom: 30px; right: 5px; } .success-title { font-size: 32px; color: #00e436; margin-bottom: 15px; text-align: center; text-shadow: 2px 2px 0 #222034; } .success-text { font-size: 22px; color: #f4f4f4; text-align: center; margin-bottom: 25px; } .restart-btn { background-color: #00e436; border-color: #00e436; max-width: 200px; } .restart-btn:hover { background-color: #29adff; border-color: #29adff; } .loader { display: none; width: 50px; height: 20px; margin: 10px auto; text-align: center; } .loader .dot { display: inline-block; width: 10px; height: 10px; margin: 0 5px; background-color: #f8b700; animation: dotPulse 1s infinite; } .loader .dot:nth-child(2) { animation-delay: 0.2s; } .loader .dot:nth-child(3) { animation-delay: 0.4s; } .pixel-decor { position: absolute; width: 10px; height: 10px; background-color: #ff004d; opacity: 0.7; } @keyframes pulse { 0% { transform: scale(1); } 50% { transform: scale(1.05); } 100% { transform: scale(1); } } @keyframes shake { 0%, 100% { transform: translateX(0); } 20%, 60% { transform: translateX(-5px); } 40%, 80% { transform: translateX(5px); } } @keyframes successPulse { 0% { transform: scale(1); } 50% { transform: scale(1.1); } 100% { transform: scale(1); } } @keyframes dotPulse { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } } .pixel-cursor { display: inline-block; width: 10px; height: 20px; background-color: #f8b700; animation: blink 1s infinite; vertical-align: middle; margin-left: 5px; } @keyframes blink { 0%, 49% { opacity: 1; } 50%, 100% { opacity: 0; } } .input-wrapper { position: relative; } .input-box:focus + .focus-effect { opacity: 1; } .focus-effect { position: absolute; top: 0; left: 0; width: 100%; height: 100%; pointer-events: none; border: 3px solid #f8b700; opacity: 0; transition: opacity 0.3s; } /* Responsive adjustments */ @media (max-width: 700px) { .container { width: 90%; padding: 15px; } .title { font-size: 28px; margin-bottom: 20px; } .form-group label { font-size: 18px; } .input-box { font-size: 18px; padding: 8px; } button { font-size: 20px; padding: 10px; } .success-icon { width: 60px; height: 60px; } .success-title { font-size: 26px; } .success-text { font-size: 18px; } } </style> </head> <body> <div class="container"> <div class="pixel-corner pixel-corner-tl"></div> <div class="pixel-corner pixel-corner-tr"></div> <div class="pixel-corner pixel-corner-bl"></div> <div class="pixel-corner pixel-corner-br"></div> <h1 class="title">SPACE QUEST REGISTRATION<span class="pixel-cursor"></span></h1> <form id="pixelForm"> <div class="form-group"> <label for="username">PILOT NAME:</label> <div class="input-wrapper"> <input type="text" id="username" class="input-box" autocomplete="off"> <div class="focus-effect"></div> </div> <div class="error-message" id="username-error"></div> </div> <div class="form-group"> <label for="email">COMMUNICATION CHANNEL:</label> <div class="input-wrapper"> <input type="email" id="email" class="input-box" autocomplete="off"> <div class="focus-effect"></div> </div> <div class="error-message" id="email-error"></div> </div> <div class="form-group"> <label for="password">SECRET CODE:</label> <div class="input-wrapper"> <input type="password" id="password" class="input-box" autocomplete="off"> <div class="focus-effect"></div> </div> <div class="error-message" id="password-error"></div> </div> <div class="form-group"> <label for="starship">STARSHIP MODEL:</label> <div class="input-wrapper"> <select id="starship" class="input-box"> <option value="">SELECT YOUR VESSEL</option> <option value="pixelracer">PIXEL RACER X9</option> <option value="bitcruiser">BIT CRUISER 64</option> <option value="byteblaster">BYTE BLASTER 2000</option> <option value="retrowarp">RETRO WARP SHUTTLE</option> </select> <div class="focus-effect"></div> </div> <div class="error-message" id="starship-error"></div> </div> <button type="submit" id="submitBtn">INITIALIZE MISSION</button> <div class="loader" id="loader"> <div class="dot"></div> <div class="dot"></div> <div class="dot"></div> </div> </form> <div class="success-message" id="successMessage"> <div class="success-icon"></div> <h2 class="success-title">MISSION INITIALIZED!</h2> <p class="success-text">Welcome aboard, pilot! Your galactic adventure awaits. Prepare for pixel-perfect exploration across the digital cosmos.</p> <button class="restart-btn" id="restartBtn">NEW MISSION</button> </div> </div> <script> document.addEventListener('DOMContentLoaded', function() { // Create random pixel decorations const container = document.querySelector('.container'); for (let i = 0; i < 15; i++) { const pixel = document.createElement('div'); pixel.classList.add('pixel-decor'); pixel.style.left = Math.random() * 100 + '%'; pixel.style.top = Math.random() * 100 + '%'; pixel.style.backgroundColor = ['#29adff', '#ff004d', '#f8b700', '#00e436'][Math.floor(Math.random() * 4)]; container.appendChild(pixel); } const form = document.getElementById('pixelForm'); const usernameInput = document.getElementById('username'); const emailInput = document.getElementById('email'); const passwordInput = document.getElementById('password'); const starshipInput = document.getElementById('starship'); const submitBtn = document.getElementById('submitBtn'); const loader = document.getElementById('loader'); const successMessage = document.getElementById('successMessage'); const restartBtn = document.getElementById('restartBtn'); const usernameError = document.getElementById('username-error'); const emailError = document.getElementById('email-error'); const passwordError = document.getElementById('password-error'); const starshipError = document.getElementById('starship-error'); // Play 8-bit sound effect function playSound(type) { const audioContext = new (window.AudioContext || window.webkitAudioContext)(); const oscillator = audioContext.createOscillator(); const gainNode = audioContext.createGain(); oscillator.connect(gainNode); gainNode.connect(audioContext.destination); if (type === 'error') { oscillator.type = 'square'; oscillator.frequency.setValueAtTime(196, audioContext.currentTime); oscillator.frequency.setValueAtTime(130.81, audioContext.currentTime + 0.1); gainNode.gain.setValueAtTime(0.2, audioContext.currentTime); oscillator.start(); oscillator.stop(audioContext.currentTime + 0.2); } else if (type === 'success') { oscillator.type = 'square'; oscillator.frequency.setValueAtTime(523.25, audioContext.currentTime); oscillator.frequency.setValueAtTime(659.25, audioContext.currentTime + 0.1); oscillator.frequency.setValueAtTime(783.99, audioContext.currentTime + 0.2); gainNode.gain.setValueAtTime(0.2, audioContext.currentTime); oscillator.start(); oscillator.stop(audioContext.currentTime + 0.3); } else if (type === 'click') { oscillator.type = 'square'; oscillator.frequency.setValueAtTime(659.25, audioContext.currentTime); gainNode.gain.setValueAtTime(0.1, audioContext.currentTime); gainNode.gain.exponentialRampToValueAtTime(0.01, audioContext.currentTime + 0.1); oscillator.start(); oscillator.stop(audioContext.currentTime + 0.1); } } // Show error with retro animation function showError(element, errorElement, message) { element.classList.add('input-error'); errorElement.textContent = message; errorElement.style.opacity = '1'; playSound('error'); setTimeout(() => { element.classList.remove('input-error'); }, 500); } // Reset error function resetError(errorElement) { errorElement.style.opacity = '0'; } // Validate the form function validateForm() { let isValid = true; // Reset errors resetError(usernameError); resetError(emailError); resetError(passwordError); resetError(starshipError); // Validate username if (usernameInput.value.trim() === '') { showError(usernameInput, usernameError, 'PILOT NAME REQUIRED!'); isValid = false; } else if (usernameInput.value.length < 3) { showError(usernameInput, usernameError, 'NAME TOO SHORT!'); isValid = false; } // Validate email const emailRegex = /^[^\s@]+@[^\s@]+\.[^\s@]+$/; if (emailInput.value.trim() === '') { showError(emailInput, emailError, 'COMM CHANNEL REQUIRED!'); isValid = false; } else if (!emailRegex.test(emailInput.value)) { showError(emailInput, emailError, 'INVALID CHANNEL FORMAT!'); isValid = false; } // Validate password if (passwordInput.value.trim() === '') { showError(passwordInput, passwordError, 'SECRET CODE REQUIRED!'); isValid = false; } else if (passwordInput.value.length < 6) { showError(passwordInput, passwordError, 'CODE TOO WEAK!'); isValid = false; } // Validate starship if (starshipInput.value === '') { showError(starshipInput, starshipError, 'SELECT YOUR VESSEL!'); isValid = false; } return isValid; } // Form submission form.addEventListener('submit', function(e) { e.preventDefault(); playSound('click'); if (validateForm()) { // Show loader submitBtn.style.display = 'none'; loader.style.display = 'block'; // Simulate form submission setTimeout(() => { loader.style.display = 'none'; successMessage.classList.add('show'); playSound('success'); }, 1500); } }); // Restart button restartBtn.addEventListener('click', function() { playSound('click'); successMessage.classList.remove('show'); form.reset(); submitBtn.style.display = 'block'; }); // Input effects const inputs = document.querySelectorAll('.input-box'); inputs.forEach(input => { input.addEventListener('focus', function() { playSound('click'); }); }); }); </script> </body> </html>
<html> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Retro Sidebar Navigation</title> <style> :root { --primary: #4a3af8; --primary-dark: #3128cc; --secondary: #ff6b6b; --light: #f8f9fa; --dark: #151321; --success: #57e389; --info: #62a0ea; --warning: #f8e45c; --font-pixel: 'VT323', monospace; } * { margin: 0; padding: 0; box-sizing: border-box; } @font-face { font-family: 'VT323'; src: url('https://fonts.googleapis.com/css2?family=VT323&display=swap'); font-display: swap; } body { font-family: var(--font-pixel), 'Courier New', monospace; background-color: var(--light); color: var(--dark); display: flex; height: 100vh; width: 100%; overflow: hidden; } .container { display: flex; width: 100%; height: 100%; max-width: 700px; max-height: 700px; margin: auto; background: repeating-linear-gradient( 45deg, #f8f9fa, #f8f9fa 10px, #f0f0f0 10px, #f0f0f0 20px ); position: relative; overflow: hidden; border: 8px solid var(--dark); box-shadow: 0 0 0 4px var(--light), 0 0 0 8px var(--dark); } /* Sidebar styles */ .sidebar { width: 240px; min-width: 240px; height: 100%; background-color: var(--dark); color: var(--light); transition: all 0.3s ease; overflow-y: auto; z-index: 100; padding: 16px 0; position: relative; border-right: 4px solid var(--primary); } .sidebar-header { text-align: center; padding: 12px; margin-bottom: 16px; } .sidebar-header h1 { font-size: 32px; margin: 0; letter-spacing: 2px; text-shadow: 3px 3px 0 var(--primary); color: var(--light); } .sidebar-header p { font-size: 16px; color: var(--secondary); margin-top: 4px; } /* Pixel art logo */ .pixel-logo { width: 80px; height: 80px; margin: 0 auto 12px; display: grid; grid-template-columns: repeat(8, 1fr); grid-template-rows: repeat(8, 1fr); } .pixel { width: 100%; height: 100%; background-color: transparent; } .pixel.filled { background-color: var(--primary); } .pixel.highlight { background-color: var(--secondary); } /* Navigation */ .nav { list-style-type: none; padding: 0; margin: 0; } .nav-item { margin-bottom: 2px; position: relative; overflow: hidden; } .nav-link { display: flex; align-items: center; padding: 12px 20px; text-decoration: none; color: var(--light); font-size: 20px; transition: all 0.2s; position: relative; z-index: 1; } .nav-link:hover { transform: translateX(4px); color: var(--secondary); } .nav-link.active { background-color: var(--primary); color: var(--light); box-shadow: inset 0 0 0 2px var(--light); } .nav-link.active::before { content: ''; position: absolute; left: 0; top: 0; height: 100%; width: 4px; background-color: var(--secondary); } .nav-link.active::after { content: ''; position: absolute; right: 10px; top: 50%; transform: translateY(-50%); width: 0; height: 0; border-top: 6px solid transparent; border-bottom: 6px solid transparent; border-left: 6px solid var(--light); } .nav-link .icon { display: inline-block; width: 24px; height: 24px; margin-right: 12px; image-rendering: pixelated; background-size: contain; position: relative; } .pixel-icon { width: 24px; height: 24px; display: grid; grid-template-columns: repeat(6, 1fr); grid-template-rows: repeat(6, 1fr); margin-right: 12px; } /* Click effects */ .nav-link:active { transform: scale(0.97); } /* Content area */ .content { flex: 1; padding: 24px; overflow-y: auto; display: flex; flex-direction: column; align-items: center; justify-content: center; position: relative; } .page-content { display: none; opacity: 0; transform: translateY(10px); transition: all 0.3s ease; max-width: 400px; text-align: center; } .page-content.active { display: block; opacity: 1; transform: translateY(0); } .page-title { font-size: 36px; margin-bottom: 16px; color: var(--primary-dark); text-shadow: 2px 2px 0 var(--light), 4px 4px 0 var(--dark); } .page-text { font-size: 18px; line-height: 1.5; margin-bottom: 24px; } /* Scanlines effect */ .scanlines { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: linear-gradient( to bottom, rgba(255, 255, 255, 0) 50%, rgba(0, 0, 0, 0.1) 50% ); background-size: 100% 4px; pointer-events: none; z-index: 10; opacity: 0.15; } /* Toggle button for mobile */ .sidebar-toggle { position: fixed; top: 16px; left: 16px; width: 36px; height: 36px; background-color: var(--dark); border: 2px solid var(--primary); color: var(--light); font-size: 20px; display: none; align-items: center; justify-content: center; cursor: pointer; z-index: 999; } /* Noise Overlay */ .noise { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAYAAAAeP4ixAAAGXklEQVRogX2aW5LsKAyGlYd5mF7JrKRXMusYHqqYi+QfEOJ099REVXY7dmzEl5CEneLPnz/Fez9SSuW9lymlUkopx3GUlFJJKZWU0vguHMdRjuMoOecj51yO4yg553Icx/jutdVa27daa7m/sXvv5f9a6/huz7n3Xo7j8P5prY1n7ft7PEMp9ux7b+UYl7uu6/DeS875uK7ruK7rOI6jXNdVzBGllCEADF3XNb6BKAgDNXseBgJhQAjnAsHz4/l1XQdjKaXje+dcrtGIMQxwL6WM75IKDKI4WENgACMIBCGtEZwDAXEOhOOc/aZUUi9j4LIsywQ6mVhrHQOFO8IVWbAGKlrrEAbnEAaGgFcQNqVUvJm2UiwIoIgSgwSXYx7P4KbgU2ttGDANDhdT12QADGCOIISxpszC4DfgJmSiIAQhkRUMpI8pI3ojhBCwimHEKvbX6BYOLgxsygkKRCuUVNuUcVf+nZnIGFMhIOTEGkYMRKw8e5zPsXtdQjCT0CAQFt2SzYVgFANkY84IQ2p0V+MUh7rAuiwB5dTdOBetJxcFptA4TA0Dq9pPrKnbRUNHt7PfXdf1uDlZiYwgCIIQNF0X4yHUCcZwKwi1r/0kfkcYY0wJcGZmVQYzE6Kh0JnNohtrt3Vl9PvkpHH9VYFYf5BgYluFgVuqu5FVJlz0uq4Hd8aXN5eI8aAKB+xglbLqJsSFxRhxXde4NkJpfNBr1JhkAljBXYkjZ1YLwkO46CJqUbgcREiX00zgshCEoIyBzGhRPK/rep7nWVJK5TzPCVic6F5q1XgnHRB+R5cEHjFAlQvXQxB1TXVPHVs6o1qS5jJkR84dx3E8P8/zeTEaDGQx1hWxHljUOKIJrtZAGP6W84ONKbpUKaW01oZLAl9Aa63c7/dHKaWYzJQdxQEuRAGYVQqOTVERhdUqAZhTrUyMVLGsq9oO5prpwYfCmCsyQ+OYABnBVdU9nHKbcBHG3jEYYMCMG+OJQJmJzLqwJsG8LMt4wUuKEBMegwCRFq6YY9f1vBhhIQAFAQYQJlO9yy7M6maCMRZKGBwxgzJXVoZ+lMbZsFIprWY2ZW7BRVU25pW5YknTeFGDDgZECKvU3jFGrQ7baq21MilEpBmZMWlWCeiiRNkMQ85d6qJBwJnRYoxxRa0c+QYq2V2PZdQJCo6bPTeWNOaaWq/UIGdp3fv9ngoZzKl8LJigEH2emVPdkbFEYYz1zpkttS9RcYBJZlWyw3jfYiBKtY5ioDASf1fW5VzexzneFYEjDMNANM4RInWtGCcxUczuZsZ1oRcJAcZzzofixK0eMWACMdNsGOZZK+FivY7f9QxdX2NEwwFVe+/lvQ+MKLP9Bd6LRVgEEYPHGVkJs0/WcVHqRVXMqnYnZF7wUGrE89K2ZyGOTcFFGIdW8BdlG2VUBKC4oBh5n0UYfSgmYI1Vqz6zZb63rmseI7JDM2X3xK20SGVnVgyG1M0ApxAC4yICrLqyMg93U6YgCKtx1rpxPG3T5XneZ5CTRkhqXOi8XDr3J1pvxI6NJgHdi/OslihQzMasQDRu0C15jZr7eZ7PrbXxgs7XVtRVuWGrQtG5XSBBmDAuEFnVAo3WU0yKGTVWxGD8rd0jrh3D5TxP72OhDT5o9VkpZk49sCo5KnA0CCl+xGDcpXO6GufFJK14Qf5+v582hHGLwWUa0cg6KzfjGUj1qQxhIGc6zQFwUwWJ4EY7RM8Oqpfn87Q+eMwmhWdoMyuKB+9KvChT8TdlVLWqWkrrIxzDAxcz8bxeL4uR8VK8YWQxHQJhhiX7EBrZQyhc8DgM3G5w3tRV2Shg2eT1ev3dOXeXUeZjscSgGFFm1B21UOFGzr4xFnRuGGpG9m+Z8Nus5Hl6ZMvYwKJ6sdL1Ov6u7kc2YmzYvO7nRMXwCAGDwl/Ix1oUjfzb42SFDTarV6uqJZV91W3hngpi+zM+E5mImVxLIYrZwIFmQF6z3pXJx8aVOQZtzVIoq22DucQv1tS6aolGl9d6J2ZpbYI9Fkl6f+3GKbsrI2p+rJW0AxW3dPH+uiCTuTpnlrTq22ZUXVn3xKrO2mtZ54w9NXVfLcy+/fH++2+vl9bozrJakyh2aNx8a4Gj9UpUrKySfK+7QrTt/x/Zf5jWuX0AAAAASUVORK5CYII='); opacity: 0.07; pointer-events: none; z-index: 9; } /* CRT flicker effect */ .crt-flicker { position: absolute; top: 0; left: 0; width: 100%; height: 100%; pointer-events: none; z-index: 11; animation: flicker 0.15s infinite; opacity: 0; } @keyframes flicker { 0% { opacity: 0; } 50% { opacity: 0.02; } 100% { opacity: 0; } } /* Pixel button */ .pixel-button { background-color: var(--primary); border: none; color: white; padding: 10px 20px; margin-top: 10px; font-family: var(--font-pixel); font-size: 18px; position: relative; cursor: pointer; transform-style: preserve-3d; transition: transform 0.1s; } .pixel-button::before { content: ''; position: absolute; width: 100%; height: 100%; left: 0; bottom: -4px; background-color: var(--primary-dark); transform: translateZ(-1px); } .pixel-button::after { content: ''; position: absolute; width: 4px; height: 100%; right: -4px; top: 0; background-color: var(--primary-dark); transform: translateZ(-1px); } .pixel-button:hover { background-color: var(--secondary); } .pixel-button:active { transform: translate(2px, 2px); } /* Social links */ .social-links { display: flex; justify-content: center; margin-top: 24px; gap: 16px; } .social-icon { width: 32px; height: 32px; border: 2px solid var(--light); display: grid; grid-template-columns: repeat(4, 1fr); grid-template-rows: repeat(4, 1fr); cursor: pointer; transition: transform 0.2s; } .social-icon:hover { transform: scale(1.1); } /* Star effect */ .star { position: absolute; width: 2px; height: 2px; background-color: white; animation: twinkle 1.5s infinite alternate; z-index: 8; } @keyframes twinkle { 0% { opacity: 0.3; } 100% { opacity: 1; } } /* Footer in sidebar */ .sidebar-footer { padding: 16px; text-align: center; font-size: 14px; color: var(--secondary); margin-top: 24px; border-top: 2px dashed var(--primary); } /* Theme selector */ .theme-selector { margin-top: 16px; display: flex; justify-content: center; gap: 8px; } .theme-option { width: 20px; height: 20px; border: 2px solid var(--light); cursor: pointer; transition: transform 0.2s; } .theme-option:hover { transform: scale(1.2); } /* Responsive styles */ @media (max-width: 600px) { .sidebar { transform: translateX(-100%); position: absolute; top: 0; left: 0; bottom: 0; box-shadow: 2px 0 10px rgba(0, 0, 0, 0.3); } .sidebar.open { transform: translateX(0); } .sidebar-toggle { display: flex; } .content { padding: 40px 16px 16px; } } /* Custom scrollbar */ ::-webkit-scrollbar { width: 8px; } ::-webkit-scrollbar-track { background: var(--dark); } ::-webkit-scrollbar-thumb { background-color: var(--primary); border-radius: 0; border: 2px solid var(--dark); } ::-webkit-scrollbar-thumb:hover { background-color: var(--secondary); } </style> </head> <body> <div class="container"> <div class="sidebar"> <div class="sidebar-header"> <div class="pixel-logo" id="pixel-logo"></div> <h1>PIXELBLOG</h1> <p>EST. 1985</p> </div> <ul class="nav"> <li class="nav-item"> <a href="#home" class="nav-link active" data-page="home"> <div class="pixel-icon" id="home-icon"></div> HOME.EXE </a> </li> <li class="nav-item"> <a href="#articles" class="nav-link" data-page="articles"> <div class="pixel-icon" id="articles-icon"></div> ARTICLES.DAT </a> </li> <li class="nav-item"> <a href="#games" class="nav-link" data-page="games"> <div class="pixel-icon" id="games-icon"></div> GAMES.ROM </a> </li> <li class="nav-item"> <a href="#gallery" class="nav-link" data-page="gallery"> <div class="pixel-icon" id="gallery-icon"></div> GALLERY.GIF </a> </li> <li class="nav-item"> <a href="#about" class="nav-link" data-page="about"> <div class="pixel-icon" id="about-icon"></div> ABOUT.TXT </a> </li> </ul> <div class="theme-selector"> <div class="theme-option" style="background-color: #4a3af8;" data-theme="default"></div> <div class="theme-option" style="background-color: #e91e63;" data-theme="pink"></div> <div class="theme-option" style="background-color: #4caf50;" data-theme="green"></div> <div class="theme-option" style="background-color: #ff9800;" data-theme="orange"></div> </div> <div class="social-links"> <div class="social-icon" id="twitter-icon"></div> <div class="social-icon" id="github-icon"></div> <div class="social-icon" id="discord-icon"></div> </div> <div class="sidebar-footer"> <p>v1.0.2 @ PIXELBLOG</p> <p>16KB FREE MEM</p> </div> </div> <div class="content"> <div class="page-content active" id="home"> <h2 class="page-title">WELCOME TO PIXELBLOG</h2> <p class="page-text">Booting up the nostalgic vibes from the golden age of computing. This retro-themed blog brings back the 8-bit aesthetic we all love!</p> <button class="pixel-button">LOAD MORE</button> </div> <div class="page-content" id="articles"> <h2 class="page-title">LATEST ARTICLES</h2> <p class="page-text">• The Rise of Pixel Art in Modern Design<br> • 10 Classic Consoles That Changed Gaming<br> • How to Create Authentic 8-bit Music<br> • The History of Text Adventures</p> <button class="pixel-button">READ POSTS</button> </div> <div class="page-content" id="games"> <h2 class="page-title">RETRO GAMES</h2> <p class="page-text">Explore our collection of browser-based retro games or read reviews of classics from the 80s and 90s. Press START to begin your nostalgic journey!</p> <button class="pixel-button">PRESS START</button> </div> <div class="page-content" id="gallery"> <h2 class="page-title">PIXEL GALLERY</h2> <p class="page-text">Browse our collection of pixel art masterpieces, sprite sheets, and retro-inspired digital artwork. Each image carefully crafted one pixel at a time.</p> <button class="pixel-button">LOAD IMAGES</button> </div> <div class="page-content" id="about"> <h2 class="page-title">ABOUT.TXT</h2> <p class="page-text">PIXELBLOG is dedicated to preserving and celebrating the aesthetic of the early computing era. Founded by retro enthusiasts who believe that limitations breed creativity.</p> <button class="pixel-button">READ MORE</button> </div> </div> <div class="scanlines"></div> <div class="noise"></div> <div class="crt-flicker"></div> <div id="stars-container"></div> </div> <button class="sidebar-toggle">≡</button> <script> // Generate the pixel logo const pixelLogo = document.getElementById('pixel-logo'); const logoPattern = [ '00111100', '01111110', '11100111', '11000011', '11111111', '11111111', '01100110', '00111100' ]; for (let i = 0; i < logoPattern.length; i++) { for (let j = 0; j < logoPattern[i].length; j++) { const pixel = document.createElement('div'); pixel.className = 'pixel'; if (logoPattern[i][j] === '1') { pixel.classList.add('filled'); // Add some highlights if ((i === 2 && j === 2) || (i === 2 && j === 3) || (i === 3 && j === 2)) { pixel.classList.add('highlight'); } } pixelLogo.appendChild(pixel); } } // Generate pixel icons const generatePixelIcon = (iconId, pattern) => { const iconElement = document.getElementById(iconId); for (let i = 0; i < pattern.length; i++) { for (let j = 0; j < pattern[i].length; j++) { const pixel = document.createElement('div'); pixel.className = 'pixel'; if (pattern[i][j] === '1') { pixel.classList.add('filled'); } else if (pattern[i][j] === '2') { pixel.classList.add('highlight'); } iconElement.appendChild(pixel); } } }; const homePattern = [ '000000', '001100', '011110', '111111', '011110', '001100' ]; const articlesPattern = [ '000000', '111111', '100001', '111111', '101011', '101011' ]; const gamesPattern = [ '000000', '222222', '211112', '211112', '211112', '222222' ]; const galleryPattern = [ '000000', '111111', '100101', '101001', '100101', '111111' ]; const aboutPattern = [ '000000', '011110', '100001', '101101', '100001', '011110' ]; generatePixelIcon('home-icon', homePattern); generatePixelIcon('articles-icon', articlesPattern); generatePixelIcon('games-icon', gamesPattern); generatePixelIcon('gallery-icon', galleryPattern); generatePixelIcon('about-icon', aboutPattern); // Generate social icons const twitterPattern = [ '0110', '1111', '1111', '0110' ]; const githubPattern = [ '1111', '1001', '1001', '1111' ]; const discordPattern = [ '1111', '1001', '1111', '1001' ]; generatePixelIcon('twitter-icon', twitterPattern); generatePixelIcon('github-icon', githubPattern); generatePixelIcon('discord-icon', discordPattern); // Generate stars for background const starsContainer = document.getElementById('stars-container'); for (let i = 0; i < 50; i++) { const star = document.createElement('div'); star.className = 'star'; star.style.left = `${Math.random() * 100}%`; star.style.top = `${Math.random() * 100}%`; star.style.animationDelay = `${Math.random() * 2}s`; starsContainer.appendChild(star); } // Navigation functionality const navLinks = document.querySelectorAll('.nav-link'); const pageContents = document.querySelectorAll('.page-content'); navLinks.forEach(link => { link.addEventListener('click', function(e) { e.preventDefault(); // Update active state in navigation navLinks.forEach(navLink => navLink.classList.remove('active')); this.classList.add('active'); // Show the appropriate content const pageId = this.getAttribute('data-page'); pageContents.forEach(content => { content.classList.remove('active'); // Add slight delay to improve animation setTimeout(() => { if (content.id === pageId) { content.classList.add('active'); } }, 100); }); // Add CRT effect flash const crtFlicker = document.querySelector('.crt-flicker'); crtFlicker.style.opacity = '0.1'; setTimeout(() => { crtFlicker.style.opacity = '0'; }, 150); // Mobile sidebar close after click if (window.innerWidth <= 600) { document.querySelector('.sidebar').classList.remove('open'); } }); }); // Mobile sidebar toggle const sidebarToggle = document.querySelector('.sidebar-toggle'); sidebarToggle.addEventListener('click', () => { document.querySelector('.sidebar').classList.toggle('open'); }); // Pixel button effects const pixelButtons = document.querySelectorAll('.pixel-button'); pixelButtons.forEach(button => { button.addEventListener('click', function() { // Add quick CRT flicker effect const crtFlicker = document.querySelector('.crt-flicker'); crtFlicker.style.opacity = '0.08'; setTimeout(() => { crtFlicker.style.opacity = '0'; }, 100); // Simulate button press effect this.style.transform = 'translate(2px, 2px)'; setTimeout(() => { this.style.transform = 'none'; }, 150); }); }); // Theme selector const themeOptions = document.querySelectorAll('.theme-option'); themeOptions.forEach(option => { option.addEventListener('click', function() { const theme = this.getAttribute('data-theme'); const root = document.documentElement; switch(theme) { case 'default': root.style.setProperty('--primary', '#4a3af8'); root.style.setProperty('--primary-dark', '#3128cc'); root.style.setProperty('--secondary', '#ff6b6b'); break; case 'pink': root.style.setProperty('--primary', '#e91e63'); root.style.setProperty('--primary-dark', '#c2185b'); root.style.setProperty('--secondary', '#00bcd4'); break; case 'green': root.style.setProperty('--primary', '#4caf50'); root.style.setProperty('--primary-dark', '#388e3c'); root.style.setProperty('--secondary', '#ffc107'); break; case 'orange': root.style.setProperty('--primary', '#ff9800'); root.style.setProperty('--primary-dark', '#f57c00'); root.style.setProperty('--secondary', '#2196f3'); break; } // Add CRT effect flash const crtFlicker = document.querySelector('.crt-flicker'); crtFlicker.style.opacity = '0.1'; setTimeout(() => { crtFlicker.style.opacity = '0'; }, 150); }); }); // Glitch effect for the logo on hover pixelLogo.addEventListener('mouseenter', () => { // Add a slight glitch effect to the logo let glitchCount = 0; const glitchInterval = setInterval(() => { const pixels = pixelLogo.querySelectorAll('.pixel'); // Randomly toggle some pixels for (let i = 0; i < 5; i++) { const randomIndex = Math.floor(Math.random() * pixels.length); pixels[randomIndex].classList.toggle('filled'); } glitchCount++; if (glitchCount > 5) { clearInterval(glitchInterval); // Reset logo for (let i = 0; i < logoPattern.length; i++) { for (let j = 0; j < logoPattern[i].length; j++) { const index = i * 8 + j; if (logoPattern[i][j] === '1') { pixels[index].classList.add('filled'); } else { pixels[index].classList.remove('filled'); } // Restore highlights if ((i === 2 && j === 2) || (i === 2 && j === 3) || (i === 3 && j === 2)) { pixels[index].classList.add('highlight'); } } } } }, 100); }); // Random occasional CRT flicker for authenticity setInterval(() => { if (Math.random() < 0.05) { // 5% chance each interval const crtFlicker = document.querySelector('.crt-flicker'); crtFlicker.style.opacity = '0.03'; setTimeout(() => { crtFlicker.style.opacity = '0'; }, 100); } }, 5000); // Initial animation on load setTimeout(() => { const crtFlicker = document.querySelector('.crt-flicker'); crtFlicker.style.opacity = '0.15'; setTimeout(() => { crtFlicker.style.opacity = '0'; }, 200); }, 500); </script> </body> </html>
<html> <head> <style> @import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&family=VT323&display=swap'); * { margin: 0; padding: 0; box-sizing: border-box; } body { font-family: 'VT323', monospace; background-color: #f5f5f5; color: #333; display: flex; flex-direction: column; min-height: 100vh; width: 100%; max-width: 700px; margin: 0 auto; } .content { flex-grow: 1; padding: 1.5rem; display: flex; flex-direction: column; justify-content: center; align-items: center; } h1 { font-family: 'Press Start 2P', cursive; font-size: 1.5rem; margin-bottom: 1rem; text-align: center; } p { font-size: 1.2rem; line-height: 1.4; margin-bottom: 1rem; text-align: center; } footer { width: 100%; padding: 0; background-color: #111; position: relative; overflow: hidden; } .pixel-mosaic { display: grid; grid-template-columns: repeat(28, 1fr); width: 100%; } .pixel { aspect-ratio: 1/1; transition: all 0.3s ease; cursor: pointer; position: relative; z-index: 1; } .pixel:hover { transform: scale(1.2) rotate(5deg); z-index: 2; box-shadow: 0 0 8px rgba(255, 255, 255, 0.7); } .footer-content { position: absolute; top: 0; left: 0; width: 100%; height: 100%; display: flex; flex-direction: column; justify-content: center; align-items: center; z-index: 3; padding: 1rem; text-align: center; } .footer-title { font-family: 'Press Start 2P', cursive; color: #fff; font-size: 1.5rem; margin-bottom: 1rem; text-shadow: 2px 2px 0 #000; animation: pulse 2s infinite; } .footer-links { display: flex; justify-content: center; gap: 1.5rem; margin-bottom: 1rem; } .footer-link { color: #fff; text-decoration: none; font-size: 1.2rem; position: relative; padding: 0.3rem 0.5rem; background-color: rgba(0, 0, 0, 0.5); border-radius: 4px; transition: all 0.3s ease; } .footer-link:hover { background-color: rgba(255, 255, 255, 0.2); transform: translateY(-3px); } .footer-social { display: flex; gap: 1rem; margin-top: 0.5rem; } .social-icon { width: 32px; height: 32px; display: flex; justify-content: center; align-items: center; background-color: rgba(0, 0, 0, 0.5); border-radius: 4px; transition: all 0.3s ease; color: #fff; text-decoration: none; font-size: 1.2rem; } .social-icon:hover { transform: translateY(-5px) rotate(10deg); background-color: rgba(255, 255, 255, 0.2); } .copyright { font-size: 0.9rem; color: rgba(255, 255, 255, 0.7); margin-top: 1rem; } @keyframes pulse { 0% { text-shadow: 2px 2px 0 #000; } 50% { text-shadow: 2px 2px 8px #ff00ff; } 100% { text-shadow: 2px 2px 0 #000; } } @media (max-width: 600px) { .pixel-mosaic { grid-template-columns: repeat(20, 1fr); } .footer-title { font-size: 1.2rem; } .footer-links { flex-wrap: wrap; gap: 1rem; } } @media (max-width: 400px) { .pixel-mosaic { grid-template-columns: repeat(14, 1fr); } .footer-title { font-size: 1rem; } } </style> </head> <body> <div class="content"> <h1>PIXELAR</h1> <p>Ready to implement our retro pixel design in your project? Scroll down to see our mosaic footer in action!</p> <p>Hover over individual pixels to see them come alive with animations, just like your favorite 8-bit video games.</p> </div> <footer> <div class="pixel-mosaic" id="pixel-mosaic"></div> <div class="footer-content"> <h2 class="footer-title">PIXEL ARCADE</h2> <div class="footer-links"> <a href="#" class="footer-link">8-Bit Gallery</a> <a href="#" class="footer-link">Pixel Tools</a> <a href="#" class="footer-link">Retro Blog</a> </div> <div class="footer-social"> <a href="#" class="social-icon">▶</a> <a href="#" class="social-icon">★</a> <a href="#" class="social-icon">♥</a> <a href="#" class="social-icon">♦</a> </div> <p class="copyright">© 2023 Pixel Arcade • Press START to continue</p> </div> </footer> <script> document.addEventListener('DOMContentLoaded', function() { const pixelMosaic = document.getElementById('pixel-mosaic'); const pixelColors = [ '#FF004D', '#FFA300', '#FFEC27', '#00E436', '#29ADFF', '#83769C', '#FF77A8', '#FFCCAA', '#00B543', '#FF6C24', '#FFEE33', '#1D2B53' ]; // Generate a perlin-like noise pattern for color selection function fakeNoise(x, y) { return ((Math.sin(x * 0.1) + Math.cos(y * 0.1)) * 0.5 + 0.5) * 11; } // Calculate the number of pixels based on screen size const containerWidth = pixelMosaic.clientWidth; const pixelSize = Math.floor(containerWidth / 28); // 28 pixels across const pixelsAcross = Math.ceil(containerWidth / pixelSize); const pixelsDown = Math.ceil(150 / pixelSize); // Footer height approximately 150px // Create pixels for (let y = 0; y < pixelsDown; y++) { for (let x = 0; x < pixelsAcross; x++) { const pixel = document.createElement('div'); pixel.className = 'pixel'; // Select color based on position using our fake noise function const colorIndex = Math.floor(fakeNoise(x, y)) % pixelColors.length; pixel.style.backgroundColor = pixelColors[colorIndex]; // Add randomized delay to hover animations const randomDelay = Math.random() * 0.5; pixel.style.transitionDelay = `${randomDelay}s`; // Add special animation for some pixels if (Math.random() < 0.1) { pixel.style.animation = `pulse ${1 + Math.random() * 3}s infinite ${Math.random() * 2}s`; } pixelMosaic.appendChild(pixel); } } // Interactive effect: clicking anywhere in the footer creates a ripple pixelMosaic.addEventListener('click', function(e) { const pixels = document.querySelectorAll('.pixel'); const rect = pixelMosaic.getBoundingClientRect(); const clickX = e.clientX - rect.left; const clickY = e.clientY - rect.top; pixels.forEach((pixel, index) => { const pixelRect = pixel.getBoundingClientRect(); const pixelCenterX = pixelRect.left + pixelRect.width / 2 - rect.left; const pixelCenterY = pixelRect.top + pixelRect.height / 2 - rect.top; const distance = Math.sqrt( Math.pow(clickX - pixelCenterX, 2) + Math.pow(clickY - pixelCenterY, 2) ); const maxDistance = Math.sqrt( Math.pow(rect.width, 2) + Math.pow(rect.height, 2) ); const delay = (distance / maxDistance) * 0.8; setTimeout(() => { pixel.style.transform = 'scale(1.3) rotate(10deg)'; setTimeout(() => { pixel.style.transform = ''; }, 300); }, delay * 1000); }); }); }); </script> </body> </html>