|
1 | | -.algorithm-intro { |
| 1 | +/* 算法思路按钮 */ |
| 2 | +.algorithm-intro-btn { |
| 3 | + padding: 6px 12px; |
| 4 | + background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%); |
| 5 | + border: 1px solid #90caf9; |
| 6 | + border-radius: 6px; |
| 7 | + color: #1976d2; |
| 8 | + font-size: 13px; |
| 9 | + font-weight: 600; |
| 10 | + cursor: pointer; |
| 11 | + transition: all 0.2s; |
| 12 | + display: flex; |
| 13 | + align-items: center; |
| 14 | + gap: 6px; |
| 15 | +} |
| 16 | + |
| 17 | +.algorithm-intro-btn:hover { |
| 18 | + background: linear-gradient(135deg, #bbdefb 0%, #90caf9 100%); |
| 19 | + transform: translateY(-1px); |
| 20 | + box-shadow: 0 2px 8px rgba(25, 118, 210, 0.2); |
| 21 | +} |
| 22 | + |
| 23 | +/* 弹窗遮罩 */ |
| 24 | +.modal-overlay { |
| 25 | + position: fixed; |
| 26 | + top: 0; |
| 27 | + left: 0; |
| 28 | + right: 0; |
| 29 | + bottom: 0; |
| 30 | + background: rgba(0, 0, 0, 0.5); |
| 31 | + display: flex; |
| 32 | + align-items: center; |
| 33 | + justify-content: center; |
| 34 | + z-index: 1000; |
| 35 | + animation: fadeIn 0.2s ease; |
| 36 | +} |
| 37 | + |
| 38 | +@keyframes fadeIn { |
| 39 | + from { |
| 40 | + opacity: 0; |
| 41 | + } |
| 42 | + to { |
| 43 | + opacity: 1; |
| 44 | + } |
| 45 | +} |
| 46 | + |
| 47 | +/* 弹窗内容 */ |
| 48 | +.modal-content { |
2 | 49 | background: #fff; |
3 | | - border-radius: 8px; |
4 | | - border: 1px solid #e0e0e0; |
5 | | - margin-bottom: 12px; |
| 50 | + border-radius: 12px; |
| 51 | + width: 90%; |
| 52 | + max-width: 500px; |
| 53 | + max-height: 80vh; |
6 | 54 | overflow: hidden; |
| 55 | + box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3); |
| 56 | + animation: slideUp 0.3s ease; |
| 57 | +} |
| 58 | + |
| 59 | +@keyframes slideUp { |
| 60 | + from { |
| 61 | + opacity: 0; |
| 62 | + transform: translateY(20px); |
| 63 | + } |
| 64 | + to { |
| 65 | + opacity: 1; |
| 66 | + transform: translateY(0); |
| 67 | + } |
7 | 68 | } |
8 | 69 |
|
9 | | -.intro-header { |
| 70 | +.modal-header { |
10 | 71 | display: flex; |
11 | 72 | align-items: center; |
12 | | - gap: 8px; |
13 | | - padding: 10px 12px; |
| 73 | + gap: 10px; |
| 74 | + padding: 16px 20px; |
14 | 75 | background: linear-gradient(135deg, #e3f2fd 0%, #fff 100%); |
15 | | - cursor: pointer; |
16 | | - user-select: none; |
17 | | -} |
18 | | - |
19 | | -.intro-header:hover { |
20 | | - background: linear-gradient(135deg, #bbdefb 0%, #e3f2fd 100%); |
| 76 | + border-bottom: 1px solid #e0e0e0; |
21 | 77 | } |
22 | 78 |
|
23 | | -.intro-icon { |
24 | | - font-size: 16px; |
| 79 | +.modal-icon { |
| 80 | + font-size: 24px; |
25 | 81 | } |
26 | 82 |
|
27 | | -.intro-title { |
| 83 | +.modal-title { |
28 | 84 | flex: 1; |
| 85 | + font-size: 18px; |
29 | 86 | font-weight: 600; |
30 | 87 | color: #1976d2; |
31 | | - font-size: 13px; |
32 | 88 | } |
33 | 89 |
|
34 | | -.toggle-icon { |
35 | | - font-size: 10px; |
| 90 | +.modal-close { |
| 91 | + width: 32px; |
| 92 | + height: 32px; |
| 93 | + border: none; |
| 94 | + background: transparent; |
36 | 95 | color: #666; |
| 96 | + font-size: 18px; |
| 97 | + cursor: pointer; |
| 98 | + border-radius: 50%; |
| 99 | + display: flex; |
| 100 | + align-items: center; |
| 101 | + justify-content: center; |
| 102 | + transition: all 0.2s; |
37 | 103 | } |
38 | 104 |
|
39 | | -.intro-content { |
40 | | - padding: 12px; |
41 | | - font-size: 12px; |
42 | | - line-height: 1.6; |
43 | | - max-height: 280px; |
44 | | - overflow-y: auto; |
45 | | -} |
46 | | - |
47 | | -.intro-content::-webkit-scrollbar { |
48 | | - width: 4px; |
49 | | -} |
50 | | - |
51 | | -.intro-content::-webkit-scrollbar-track { |
| 105 | +.modal-close:hover { |
52 | 106 | background: #f0f0f0; |
| 107 | + color: #333; |
53 | 108 | } |
54 | 109 |
|
55 | | -.intro-content::-webkit-scrollbar-thumb { |
56 | | - background: #ccc; |
57 | | - border-radius: 2px; |
| 110 | +.modal-body { |
| 111 | + padding: 20px; |
| 112 | + overflow-y: auto; |
| 113 | + max-height: calc(80vh - 70px); |
58 | 114 | } |
59 | 115 |
|
| 116 | +/* 内容区域样式 */ |
60 | 117 | .intro-section { |
61 | | - margin-bottom: 12px; |
| 118 | + margin-bottom: 20px; |
62 | 119 | } |
63 | 120 |
|
64 | 121 | .intro-section:last-child { |
|
68 | 125 | .section-title { |
69 | 126 | font-weight: 600; |
70 | 127 | color: #333; |
71 | | - margin-bottom: 6px; |
72 | | - font-size: 12px; |
| 128 | + margin-bottom: 8px; |
| 129 | + font-size: 14px; |
73 | 130 | } |
74 | 131 |
|
75 | | -.intro-content p { |
76 | | - margin: 0 0 6px 0; |
| 132 | +.modal-body p { |
| 133 | + margin: 0 0 8px 0; |
77 | 134 | color: #555; |
| 135 | + font-size: 14px; |
| 136 | + line-height: 1.6; |
78 | 137 | } |
79 | 138 |
|
80 | | -.intro-content code { |
| 139 | +.modal-body code { |
81 | 140 | background: #f5f5f5; |
82 | | - padding: 2px 6px; |
83 | | - border-radius: 3px; |
| 141 | + padding: 2px 8px; |
| 142 | + border-radius: 4px; |
84 | 143 | font-family: 'Monaco', 'Menlo', monospace; |
85 | | - font-size: 11px; |
| 144 | + font-size: 13px; |
86 | 145 | color: #d32f2f; |
87 | 146 | } |
88 | 147 |
|
89 | 148 | .thought-steps { |
90 | | - margin: 6px 0 0 0; |
91 | | - padding-left: 20px; |
| 149 | + margin: 8px 0 0 0; |
| 150 | + padding-left: 24px; |
92 | 151 | color: #555; |
| 152 | + font-size: 14px; |
| 153 | + line-height: 1.8; |
93 | 154 | } |
94 | 155 |
|
95 | 156 | .thought-steps li { |
96 | | - margin-bottom: 4px; |
| 157 | + margin-bottom: 6px; |
97 | 158 | } |
98 | 159 |
|
99 | 160 | .thought-steps strong { |
|
102 | 163 |
|
103 | 164 | .key-insight { |
104 | 165 | background: #fff8e1; |
105 | | - padding: 8px 10px; |
106 | | - border-radius: 6px; |
107 | | - border-left: 3px solid #ffc107; |
| 166 | + padding: 12px 16px; |
| 167 | + border-radius: 8px; |
| 168 | + border-left: 4px solid #ffc107; |
108 | 169 | margin: 0; |
| 170 | + font-size: 14px; |
109 | 171 | } |
110 | 172 |
|
111 | 173 | .key-insight strong { |
112 | 174 | color: #f57c00; |
113 | 175 | } |
114 | 176 |
|
115 | 177 | .watch-points { |
116 | | - margin: 6px 0 0 0; |
| 178 | + margin: 8px 0 0 0; |
117 | 179 | padding: 0; |
118 | 180 | list-style: none; |
119 | 181 | } |
120 | 182 |
|
121 | 183 | .watch-points li { |
122 | 184 | display: flex; |
123 | 185 | align-items: center; |
124 | | - gap: 6px; |
125 | | - margin-bottom: 4px; |
| 186 | + gap: 8px; |
| 187 | + margin-bottom: 8px; |
126 | 188 | color: #555; |
| 189 | + font-size: 14px; |
127 | 190 | } |
128 | 191 |
|
129 | 192 | .color-dot { |
130 | | - width: 10px; |
131 | | - height: 10px; |
| 193 | + width: 12px; |
| 194 | + height: 12px; |
132 | 195 | border-radius: 50%; |
133 | 196 | flex-shrink: 0; |
134 | 197 | } |
|
147 | 210 |
|
148 | 211 | .visual-example { |
149 | 212 | background: #fafafa; |
150 | | - padding: 10px; |
151 | | - border-radius: 6px; |
152 | | - margin-top: 8px; |
| 213 | + padding: 16px; |
| 214 | + border-radius: 8px; |
| 215 | +} |
| 216 | + |
| 217 | +.shortcut-list { |
| 218 | + margin: 8px 0 0 0; |
| 219 | + padding: 0; |
| 220 | + list-style: none; |
| 221 | + display: flex; |
| 222 | + flex-wrap: wrap; |
| 223 | + gap: 12px; |
| 224 | +} |
| 225 | + |
| 226 | +.shortcut-list li { |
| 227 | + display: flex; |
| 228 | + align-items: center; |
| 229 | + gap: 6px; |
| 230 | + font-size: 13px; |
| 231 | + color: #555; |
153 | 232 | } |
154 | 233 |
|
155 | | -/* 折叠状态 */ |
156 | | -.algorithm-intro.collapsed .intro-content { |
157 | | - display: none; |
| 234 | +.shortcut-list kbd { |
| 235 | + background: #f5f5f5; |
| 236 | + border: 1px solid #ddd; |
| 237 | + border-radius: 4px; |
| 238 | + padding: 2px 8px; |
| 239 | + font-family: inherit; |
| 240 | + font-size: 12px; |
| 241 | + color: #333; |
158 | 242 | } |
0 commit comments