summaryrefslogtreecommitdiff
path: root/elements.css
blob: b326eef2feb371e26ef29af2dbfe9edfabd60e91 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
/* 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;
  }