/* elements.css */ body { margin: 0; font-family: Arial, sans-serif; background-color: #f4f4f4; } .periodic-table { display: grid; grid-template-columns: repeat(18, 1fr); grid-gap: 5px; padding: 20px; max-width: 1600px; margin: auto; } /* .element { width: 100%; aspect-ratio: 1 / 1; background-color: #e0e0e0; border: 1px solid #999; text-align: center; cursor: pointer; border-radius: 5px; display: flex; flex-direction: column; justify-content: center; align-items: center; font-size: 12px; box-sizing: border-box; } */ .element { background-color: #e0e0e0; border: 1px solid #999; text-align: center; cursor: pointer; border-radius: 5px; display: flex; flex-direction: column; justify-content: flex-start; align-items: center; padding: 5px; aspect-ratio: 1 / 1; box-sizing: border-box; position: relative; overflow: hidden; } .element .number { font-size: 12px; position: absolute; top: 5px; left: 5px; } .element .symbol { font-size: 20px; font-weight: bold; } .element .name { font-size: 12px; } /* Classification colors */ .alkali-metal { background-color: #ff6666; } .alkaline-earth-metal { background-color: #ffdead; } .lanthanoid { background-color: #ffbfff; } .actinoid { background-color: #ff99cc; } .transition-metal { background-color: #ffc0c0; } .post-transition-metal { background-color: #cccccc; } .metalloid { background-color: #cccc99; } .reactive-nonmetal { background-color: #b3e6ff; } noble-gas { background-color: #c0ffff; } .unknown { background-color: #e5e5e5; } /* Overlay and popup */ #overlay { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background-color: rgba(0, 0, 0, 0.6); backdrop-filter: blur(4px); z-index: 1000; } #popup { display: none; position: fixed; top: 10%; left: 50%; transform: translateX(-50%); width: 80%; max-width: 600px; background-color: #fff; padding: 20px; border-radius: 8px; z-index: 1001; overflow-y: auto; max-height: 80%; } #popup h2 { margin-top: 0; } #popup button { display: block; margin: 20px auto 0; padding: 10px 20px; font-size: 16px; border: none; background-color: #007bff; color: white; border-radius: 5px; cursor: pointer; } #popup button:hover { background-color: #0056b3; }