|
| 1 | +@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@200;400;700&display=swap"); |
| 2 | + |
| 3 | +:root { |
| 4 | + --background-color: #b8c6db; |
| 5 | + --secondary-background-color: #f5f7fa; |
| 6 | + --light-color: #fff; |
| 7 | + --border-color: #aaa; |
| 8 | +} |
| 9 | + |
| 10 | +* { |
| 11 | + box-sizing: border-box; |
| 12 | +} |
| 13 | + |
| 14 | +body { |
| 15 | + background-color: var(--background-color); |
| 16 | + background-image: linear-gradient(315deg, var(--background-color) 0%, var(--secondary-background-color) 100%); |
| 17 | + font-family: "Poppins", sans-serif; |
| 18 | + display: flex; |
| 19 | + flex-direction: column; |
| 20 | + align-items: center; |
| 21 | + justify-content: center; |
| 22 | + height: 100vh; |
| 23 | + overflow: hidden; |
| 24 | + margin: 0; |
| 25 | +} |
| 26 | + |
| 27 | +h1 button { |
| 28 | + position: absolute; |
| 29 | + top: 0; |
| 30 | + right: 2rem; |
| 31 | + z-index: 2; |
| 32 | +} |
| 33 | + |
| 34 | +.btn { |
| 35 | + background-color: var(--background-color); |
| 36 | + border: 1px solid var(--border-color); |
| 37 | + border-radius: 0.625rem; |
| 38 | + font-size: 0.875rem; |
| 39 | + margin-top: 1.25rem; |
| 40 | + padding: 0.5rem 1rem; |
| 41 | +} |
| 42 | + |
| 43 | +.btn-small { |
| 44 | + font-size: 0.75rem; |
| 45 | + padding: 0.25rem 0.5rem; |
| 46 | +} |
| 47 | + |
| 48 | +.btn-ghost { |
| 49 | + border: 0; |
| 50 | + background-color: transparent; |
| 51 | +} |
| 52 | + |
| 53 | +.clear { |
| 54 | + position: absolute; |
| 55 | + bottom: 2rem; |
| 56 | + left: 2rem; |
| 57 | +} |
| 58 | + |
| 59 | +.cards { |
| 60 | + perspective: 1000px; |
| 61 | + position: relative; |
| 62 | + width: 31.25rem; |
| 63 | + max-width: 90%; |
| 64 | + height: 18.75rem; |
| 65 | +} |
| 66 | + |
| 67 | +.card { |
| 68 | + background-color: var(--light-color); |
| 69 | + border-radius: 0.625rem; |
| 70 | + position: absolute; |
| 71 | + font-size: 1.5rem; |
| 72 | + top: 0; |
| 73 | + left: 0; |
| 74 | + width: 100%; |
| 75 | + height: 100%; |
| 76 | + opacity: 0; |
| 77 | + transform: translateX(50%) rotateY(-10deg); |
| 78 | + transition: transform 0.4s ease, opacity 0.4s ease; |
| 79 | +} |
| 80 | + |
| 81 | +.card.active { |
| 82 | + cursor: pointer; |
| 83 | + opacity: 1; |
| 84 | + z-index: 10; |
| 85 | + transform: translateX(0) rotateY(0deg); |
| 86 | +} |
| 87 | + |
| 88 | +.card.left { |
| 89 | + transform: translateX(-50%) rotateY(10deg); |
| 90 | +} |
| 91 | + |
| 92 | +.inner-card { |
| 93 | + box-shadow: 0 1px 10px rgba(0, 0, 0, 0.3); |
| 94 | + border-radius: 0.625rem; |
| 95 | + position: relative; |
| 96 | + width: 100%; |
| 97 | + height: 100%; |
| 98 | + transform-style: preserve-3d; |
| 99 | + transition: transform 0.4s ease; |
| 100 | +} |
| 101 | + |
| 102 | +.card.show-answer .inner-card { |
| 103 | + transform: rotateX(180deg); |
| 104 | +} |
| 105 | + |
| 106 | +.inner-card-front, .inner-card-back { |
| 107 | + backface-visibility: hidden; |
| 108 | + background-color: var(--light-color); |
| 109 | + border-radius: 0.625rem; |
| 110 | + position: absolute; |
| 111 | + top: 0; |
| 112 | + left: 0; |
| 113 | + display: flex; |
| 114 | + align-items: center; |
| 115 | + justify-content: center; |
| 116 | + width: 100%; |
| 117 | + height: 100%; |
| 118 | +} |
| 119 | + |
| 120 | +.inner-card-front { |
| 121 | + transform: rotateX(0deg); |
| 122 | + z-index: 2; |
| 123 | +} |
| 124 | + |
| 125 | +.inner-card-back { |
| 126 | + transform: rotateX(180deg); |
| 127 | +} |
| 128 | + |
| 129 | +.inner-card-front::after, .inner-card-back::after { |
| 130 | + content: '\f021 Flip'; |
| 131 | + font-family: 'Font Awesome 5 Free', 'Poppins', sans-serif; |
| 132 | + position: absolute; |
| 133 | + top: 0.625rem; |
| 134 | + right: 0.625rem; |
| 135 | + font-weight: bold; |
| 136 | + font-size: 1rem; |
| 137 | + color: var(--background-color); |
| 138 | +} |
| 139 | + |
| 140 | +.navigation { |
| 141 | + display: flex; |
| 142 | + margin: 1.25rem 0; |
| 143 | +} |
| 144 | + |
| 145 | +.navigation .nav-button { |
| 146 | + border: none; |
| 147 | + background-color: transparent; |
| 148 | + cursor: pointer; |
| 149 | + font-size: 1rem; |
| 150 | +} |
| 151 | + |
| 152 | +.navigation p { |
| 153 | + margin: 0 1.5rem; |
| 154 | +} |
| 155 | + |
| 156 | +.add-container { |
| 157 | + background-color: var(--secondary-background-color); |
| 158 | + border-top: 2px solid var(--border-color); |
| 159 | + display: flex; |
| 160 | + flex-direction: column; |
| 161 | + align-items: center; |
| 162 | + justify-content: center; |
| 163 | + padding: 0.625rem 0; |
| 164 | + position: absolute; |
| 165 | + top: 0; |
| 166 | + bottom: 0; |
| 167 | + width: 100%; |
| 168 | + opacity: 0; |
| 169 | + z-index: -1; |
| 170 | + transition: all 0.3s ease; |
| 171 | +} |
| 172 | + |
| 173 | +.add-container.show { |
| 174 | + opacity: 1; |
| 175 | + z-index: 2; |
| 176 | +} |
| 177 | + |
| 178 | +.add-container h3 { |
| 179 | + margin: 0.625rem 0; |
| 180 | +} |
| 181 | + |
| 182 | +.form-group { |
| 183 | + display: flex; |
| 184 | + flex-direction: column; |
| 185 | + align-items: center; |
| 186 | + justify-content: center; |
| 187 | +} |
| 188 | + |
| 189 | +.form-group label { |
| 190 | + display: block; |
| 191 | + margin: 1.25rem 0 0.625rem; |
| 192 | +} |
| 193 | + |
| 194 | +.form-group textarea { |
| 195 | + border: 1px solid var(--border-color); |
| 196 | + border-radius: 0.625rem; |
| 197 | + font-size: 1rem; |
| 198 | + padding: 0.75rem; |
| 199 | + width: 31.25rem; |
| 200 | + max-width: 90%; |
| 201 | +} |
0 commit comments