diff --git a/2048.css b/2048.css index c8a3573..88da4ad 100644 --- a/2048.css +++ b/2048.css @@ -1,104 +1,146 @@ +/* ====================== + GLOBAL +====================== */ body { - background-color: black; - color: white; /* opsional, biar teks tetap terlihat */ - font-family: Arial, Helvetica, sans-serif; + background: radial-gradient(circle at center, #0a0a0a, #000); + background-size: 300% 300%; + animation: bgMove 15s infinite alternate; + font-family: 'Poppins', sans-serif; + color: white; text-align: center; + padding-top: 20px; } -hr { - width: 500px; +/* Background animasi lembut */ +@keyframes bgMove { + 0% { background-position: 0% 30%; } + 50% { background-position: 50% 70%; } + 100% { background-position: 100% 30%; } } +h1 { + font-size: 40px; + font-weight: bold; + text-shadow: 0 0 20px #00eaff, 0 0 40px #0099ff; +} + +button { + padding: 12px 22px; + margin: 8px; + background: #111; + color: white; + border: 2px solid #00eaff; + border-radius: 10px; + cursor: pointer; + transition: 0.25s; + font-weight: bold; +} +button:hover { + box-shadow: 0 0 15px #00eaff; + transform: scale(1.05); +} + +#score { + color: #00eaff; + text-shadow: 0 0 10px #00eaff; + font-weight: bold; + font-size: 20px; +} + +/* ====================== + BOARD +====================== */ + + +/* ========================== + BOARD — MIRIP BORDER LOGIN +========================== */ + #board { - width: 400px; - height: 400px; - background-color: black; - margin: 0 auto; + width: 460px; + height: 460px; + margin: 35px auto; + padding: 20px; + display: grid; grid-template-columns: repeat(4, 1fr); grid-template-rows: repeat(4, 1fr); - gap: 5px; - padding: 10px; - box-sizing: border-box; - border: 2px solid red; - box-shadow: 0 0 20px red, 0 0 40px red, 0 0 60px red; - border-radius: 15px; + gap: 12px; + + background: rgba(30, 0, 50, 0.6); /* DALAM GELAP SAMA LOGIN */ + backdrop-filter: blur(10px); + + border: 2px solid rgba(0, 217, 255, 0.3); /* SAMA LOGIN */ + border-radius: 20px; + + box-shadow: + 0 20px 60px rgba(0, 0, 0, 0.5), + 0 0 40px rgba(0, 217, 255, 0.3), + inset 0 0 30px rgba(0, 217, 255, 0.1); + + animation: glowBorderBoard 3s ease-in-out infinite; } +/* Border berubah warna seperti login */ +@keyframes glowBorderBoard { + 0%, 100% { + border-color: rgba(0, 217, 255, 0.4); + box-shadow: + 0 20px 60px rgba(0, 0, 0, 0.5), + 0 0 40px rgba(0, 217, 255, 0.3), + inset 0 0 30px rgba(0, 217, 255, 0.1); + } + 50% { + border-color: rgba(255, 0, 255, 0.5); + box-shadow: + 0 20px 60px rgba(0, 0, 0, 0.5), + 0 0 50px rgba(255, 0, 255, 0.4), + inset 0 0 40px rgba(255, 0, 255, 0.15); + } +} + + + +/* ====================== + TILE +====================== */ .tile { - font-size: 40px; - font-weight: bold; + width: 100%; + height: 100%; + border-radius: 14px; display: flex; - justify-content: center; align-items: center; - background-color: white; - border-radius: 15px; -} + justify-content: center; + font-size: 32px; + font-weight: bold; -/* colored tiles */ - -.x2 { - background-color: #eee4da; - color: #727371; -} - -.x4 { - background-color: #ece0ca; - color: #727371; -} - -.x8 { - background-color: #f4b17a; color: white; + background: rgba(255, 255, 255, 0.06); + text-shadow: 0 0 10px white; + + transition: 0.1s; } -.x16{ - background-color: #f59575; - color: white; +/* animasi tile baru */ +.tile.new { + animation: pop 0.25s ease-out; +} +@keyframes pop { + 0% { transform: scale(0.2); opacity: 0; } + 100% { transform: scale(1); opacity: 1; } } -.x32{ - background-color: #f57c5f; - color: white; -} +/* Neon warna berdasarkan angka */ +.tile-2 { background: #00eaff55; box-shadow: 0 0 10px #00eaff; } +.tile-4 { background: #00ff9955; box-shadow: 0 0 10px #00ff99; } +.tile-8 { background: #ff00ff55; box-shadow: 0 0 10px #ff00ff; } +.tile-16 { background: #ff006655; box-shadow: 0 0 10px #ff0066; } +.tile-32 { background: #ffaa0055; box-shadow: 0 0 10px #ffaa00; } +.tile-64 { background: #ff000055; box-shadow: 0 0 10px #ff0000; } +.tile-128 { background: #5f00ff55; box-shadow: 0 0 10px #5f00ff; } +.tile-256 { background: #00ffea55; box-shadow: 0 0 10px #00ffea; } +.tile-512 { background: #ff00aa55; box-shadow: 0 0 10px #ff00aa; } +.tile-1024 { background: #00ffaa55; box-shadow: 0 0 10px #00ffaa; } +.tile-2048 { background: #ffd70066; box-shadow: 0 0 15px #ffd700; } -.x64{ - background-color: #f65d3b; - color: white; -} - -.x128{ - background-color: #edce71; - color: white; -} - -.x256{ - background-color: #edcc63; - color: white; -} - -.x512{ - background-color: #edc651; - color: white; -} - -.x1024{ - background-color: #eec744; - color: white; -} - -.x2048{ - background-color: #ecc230; - color: white; -} - -.x4096 { - background-color: #fe3d3d; - color: white; -} - -.x8192 { - background-color: #ff2020; - color: white; -} \ No newline at end of file diff --git a/2048.html b/2048.html index d68afa0..a150f2e 100644 --- a/2048.html +++ b/2048.html @@ -5,14 +5,19 @@