|
1 | | -<!doctype html> |
| 1 | +<!DOCTYPE html> |
2 | 2 | <html lang="en"> |
3 | 3 | <head> |
4 | | - <meta charset="UTF-8" /> |
5 | | - <meta name="viewport" content="width=device-width, initial-scale=1.0" /> |
| 4 | + <meta charset="UTF-8"> |
| 5 | + <meta name="viewport" content="width=device-width, initial-scale=1.0"> |
6 | 6 | <title>Quack Encrypt</title> |
7 | 7 | <style> |
8 | | - :root { color-scheme: light; } |
9 | | - * { box-sizing: border-box; } |
10 | | - body { |
| 8 | + * { |
11 | 9 | margin: 0; |
| 10 | + padding: 0; |
| 11 | + box-sizing: border-box; |
| 12 | + } |
| 13 | + |
| 14 | + body { |
12 | 15 | font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; |
13 | 16 | background: transparent; |
| 17 | + overflow: hidden; |
14 | 18 | } |
| 19 | + |
15 | 20 | .bubble { |
16 | | - position: relative; |
17 | | - width: 340px; |
18 | | - max-height: 420px; |
19 | 21 | background: #ffffff; |
20 | | - color: #111827; |
21 | 22 | border-radius: 12px; |
22 | | - box-shadow: 0 16px 36px rgba(0, 0, 0, 0.16); |
| 23 | + box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15); |
23 | 24 | overflow: hidden; |
24 | 25 | display: none; |
25 | 26 | flex-direction: column; |
26 | | - border: none; |
| 27 | + max-height: 520px; |
27 | 28 | } |
| 29 | + |
28 | 30 | .header { |
29 | 31 | display: flex; |
30 | 32 | align-items: center; |
31 | 33 | justify-content: space-between; |
32 | | - padding: 6px 10px; |
33 | | - background: linear-gradient(120deg, #f7b267, #f79d65); |
34 | | - color: #0b0c0f; |
| 34 | + padding: 10px 12px; |
| 35 | + background: #f9fafb; |
| 36 | + border-bottom: 1px solid #e5e7eb; |
35 | 37 | cursor: grab; |
36 | 38 | user-select: none; |
37 | | - min-height: 32px; |
38 | 39 | } |
| 40 | + |
| 41 | + .header:active { |
| 42 | + cursor: grabbing; |
| 43 | + } |
| 44 | + |
| 45 | + .header-left { |
| 46 | + display: flex; |
| 47 | + align-items: center; |
| 48 | + gap: 8px; |
| 49 | + } |
| 50 | + |
| 51 | + .duck-icon { |
| 52 | + font-size: 18px; |
| 53 | + } |
| 54 | + |
39 | 55 | .title { |
40 | | - font-weight: 700; |
41 | | - font-size: 13px; |
42 | | - letter-spacing: 0.01em; |
| 56 | + font-size: 12px; |
| 57 | + color: #6b7280; |
| 58 | + font-weight: 600; |
43 | 59 | } |
| 60 | + |
44 | 61 | .close-btn { |
| 62 | + background: none; |
45 | 63 | border: none; |
46 | | - background: rgba(0, 0, 0, 0.08); |
47 | | - width: 24px; |
48 | | - height: 24px; |
49 | | - border-radius: 7px; |
50 | 64 | cursor: pointer; |
51 | | - font-weight: 700; |
52 | | - color: #111827; |
| 65 | + padding: 4px; |
| 66 | + border-radius: 4px; |
| 67 | + color: #6b7280; |
| 68 | + font-size: 16px; |
53 | 69 | line-height: 1; |
54 | | - display: inline-flex; |
55 | | - align-items: center; |
56 | | - justify-content: center; |
| 70 | + transition: background 0.15s, color 0.15s; |
57 | 71 | } |
58 | | - .close-btn:hover { background: rgba(0, 0, 0, 0.14); } |
59 | | - |
60 | | - .section { |
61 | | - padding: 10px; |
| 72 | + |
| 73 | + .close-btn:hover { |
| 74 | + background: #e5e7eb; |
| 75 | + color: #374151; |
| 76 | + } |
| 77 | + |
| 78 | + .content { |
| 79 | + flex: 1; |
| 80 | + padding: 12px; |
62 | 81 | display: flex; |
63 | 82 | flex-direction: column; |
64 | | - gap: 8px; |
65 | | - overflow: auto; |
66 | | - max-height: 380px; |
| 83 | + gap: 10px; |
| 84 | + overflow-y: auto; |
67 | 85 | } |
68 | | - |
| 86 | + |
69 | 87 | .textarea { |
70 | 88 | width: 100%; |
71 | | - min-height: 110px; |
| 89 | + min-height: 80px; |
72 | 90 | resize: vertical; |
73 | | - border-radius: 10px; |
| 91 | + border-radius: 8px; |
74 | 92 | border: 1px solid #e5e7eb; |
75 | 93 | padding: 10px; |
76 | 94 | font-size: 14px; |
| 95 | + line-height: 1.5; |
77 | 96 | font-family: inherit; |
| 97 | + color: #111827; |
78 | 98 | outline: none; |
| 99 | + transition: border-color 0.15s, box-shadow 0.15s; |
79 | 100 | } |
| 101 | + |
80 | 102 | .textarea:focus { |
81 | | - border-color: #f79d65; |
82 | | - box-shadow: 0 0 0 2px rgba(247, 157, 101, 0.24); |
| 103 | + border-color: #ea711a; |
| 104 | + box-shadow: 0 0 0 2px rgba(234, 113, 26, 0.15); |
83 | 105 | } |
84 | | - .row { |
| 106 | + |
| 107 | + .textarea:read-only { |
| 108 | + background: #f9fafb; |
| 109 | + color: #374151; |
| 110 | + cursor: default; |
| 111 | + resize: none; |
| 112 | + } |
| 113 | + |
| 114 | + .key-row { |
85 | 115 | display: flex; |
86 | 116 | align-items: center; |
87 | 117 | gap: 8px; |
88 | 118 | } |
89 | | - .label { |
| 119 | + |
| 120 | + .key-label { |
90 | 121 | font-size: 12px; |
91 | | - font-weight: 700; |
| 122 | + font-weight: 600; |
92 | 123 | color: #6b7280; |
93 | | - letter-spacing: 0.02em; |
94 | | - text-transform: uppercase; |
| 124 | + white-space: nowrap; |
95 | 125 | } |
96 | | - select { |
| 126 | + |
| 127 | + .key-select { |
97 | 128 | flex: 1; |
98 | | - border-radius: 10px; |
| 129 | + border-radius: 6px; |
99 | 130 | border: 1px solid #e5e7eb; |
100 | | - padding: 8px 10px; |
101 | | - font-size: 14px; |
| 131 | + padding: 6px 8px; |
| 132 | + font-size: 13px; |
| 133 | + font-family: inherit; |
| 134 | + color: #111827; |
102 | 135 | outline: none; |
| 136 | + background: #ffffff; |
| 137 | + transition: border-color 0.15s, box-shadow 0.15s; |
| 138 | + } |
| 139 | + |
| 140 | + .key-select:focus { |
| 141 | + border-color: #ea711a; |
| 142 | + box-shadow: 0 0 0 2px rgba(234, 113, 26, 0.15); |
| 143 | + } |
| 144 | + |
| 145 | + .status { |
| 146 | + font-size: 11px; |
| 147 | + color: #6b7280; |
| 148 | + text-align: center; |
| 149 | + display: none; |
103 | 150 | } |
104 | | - select:focus { |
105 | | - border-color: #f79d65; |
106 | | - box-shadow: 0 0 0 2px rgba(247, 157, 101, 0.24); |
| 151 | + |
| 152 | + .status.visible { |
| 153 | + display: block; |
107 | 154 | } |
108 | | - .buttons { |
| 155 | + |
| 156 | + .status.error { |
| 157 | + color: #ef4444; |
| 158 | + } |
| 159 | + |
| 160 | + .status.success { |
| 161 | + color: #10b981; |
| 162 | + } |
| 163 | + |
| 164 | + .footer { |
| 165 | + padding: 8px 12px; |
| 166 | + border-top: 1px solid #e5e7eb; |
109 | 167 | display: flex; |
| 168 | + align-items: center; |
110 | 169 | gap: 8px; |
111 | | - margin-top: 4px; |
| 170 | + background: #f9fafb; |
112 | 171 | } |
| 172 | + |
113 | 173 | .btn { |
114 | | - border: 1px solid transparent; |
115 | | - border-radius: 10px; |
116 | | - padding: 10px 12px; |
117 | | - font-weight: 700; |
| 174 | + border: none; |
| 175 | + border-radius: 8px; |
| 176 | + padding: 10px 14px; |
118 | 177 | cursor: pointer; |
119 | | - font-size: 14px; |
| 178 | + font-size: 13px; |
| 179 | + font-weight: 700; |
| 180 | + transition: background 0.2s, transform 0.1s; |
120 | 181 | flex: 1; |
121 | | - transition: background 150ms ease, color 150ms ease, border-color 150ms ease, box-shadow 150ms ease; |
| 182 | + text-align: center; |
122 | 183 | } |
| 184 | + |
| 185 | + .btn:active { |
| 186 | + transform: scale(0.98); |
| 187 | + } |
| 188 | + |
123 | 189 | .btn-primary { |
124 | 190 | background: #ea711a; |
125 | | - color: #fff; |
126 | | - box-shadow: 0 12px 24px rgba(234, 113, 26, 0.22); |
| 191 | + color: #ffffff; |
| 192 | + } |
| 193 | + |
| 194 | + .btn-primary:hover { |
| 195 | + background: #db5810; |
127 | 196 | } |
128 | | - .btn-primary:hover { background: #db5810; } |
| 197 | + |
| 198 | + .btn-primary.copied { |
| 199 | + background: #10b981; |
| 200 | + } |
| 201 | + |
129 | 202 | .btn-secondary { |
130 | | - background: #fff; |
| 203 | + background: #e5e7eb; |
131 | 204 | color: #1f2937; |
132 | | - border-color: #e5e7eb; |
133 | 205 | } |
| 206 | + |
134 | 207 | .btn-secondary:hover { |
135 | | - background: #f9fafb; |
136 | | - border-color: #f79d65; |
137 | | - } |
138 | | - .status { |
139 | | - font-size: 12px; |
140 | | - color: #6b7280; |
141 | | - margin-top: -2px; |
142 | | - } |
143 | | - .status.error { color: #b91c1c; } |
144 | | - .cipher-box { |
145 | | - background: #f9fafb; |
146 | | - border-radius: 10px; |
147 | | - padding: 8px 10px; |
148 | | - font-size: 13px; |
| 208 | + background: #d1d5db; |
149 | 209 | color: #111827; |
150 | | - min-height: 32px; |
151 | | - box-shadow: inset 0 0 0 1px #e5e7eb; |
152 | | - word-break: break-word; |
153 | 210 | } |
154 | 211 | </style> |
155 | 212 | </head> |
156 | 213 | <body> |
157 | 214 | <div class="bubble" id="bubble"> |
158 | 215 | <div class="header" id="drag-handle"> |
159 | | - <div class="title" id="bubble-title">Quack</div> |
160 | | - <button class="close-btn" id="close-btn" aria-label="Close">×</button> |
| 216 | + <div class="header-left"> |
| 217 | + <span class="duck-icon">🦆</span> |
| 218 | + <span class="title" id="bubble-title">Encrypt</span> |
| 219 | + </div> |
| 220 | + <button class="close-btn" id="close-btn" aria-label="Close">✕</button> |
161 | 221 | </div> |
162 | | - <div class="section"> |
| 222 | + <div class="content"> |
163 | 223 | <textarea class="textarea" id="encrypt-text" placeholder="Type your message..."></textarea> |
164 | | - <div class="row"> |
165 | | - <div class="label">Key</div> |
166 | | - <select id="encrypt-key"></select> |
167 | | - </div> |
168 | | - <div class="buttons"> |
169 | | - <button class="btn btn-primary" id="encrypt-submit">Duck it</button> |
170 | | - <button class="btn btn-secondary" id="encrypt-cancel">Dismiss</button> |
| 224 | + <div class="status" id="encrypt-status"></div> |
| 225 | + <div class="key-row" id="key-row"> |
| 226 | + <span class="key-label">Group</span> |
| 227 | + <select class="key-select" id="encrypt-key"></select> |
171 | 228 | </div> |
172 | 229 | </div> |
| 230 | + <div class="footer" id="footer"> |
| 231 | + <button class="btn btn-primary" id="encrypt-submit">🦆 Duck it</button> |
| 232 | + <button class="btn btn-secondary" id="encrypt-cancel">Dismiss</button> |
| 233 | + </div> |
173 | 234 | </div> |
174 | 235 |
|
175 | 236 | <script src="overlay-encrypt.js"></script> |
|
0 commit comments