Skip to content

Commit f311835

Browse files
style: make deep analysis modal glassmorphic
1 parent c1a26ef commit f311835

1 file changed

Lines changed: 22 additions & 18 deletions

File tree

src/components/Analysis/AnalysisConfigModal.tsx

Lines changed: 22 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ export const AnalysisConfigModal: React.FC<Props> = ({
5555

5656
return (
5757
<motion.div
58-
className="absolute left-0 top-0 z-20 flex h-screen w-screen flex-col items-center justify-center bg-black/70 px-4 backdrop-blur-sm md:px-0"
58+
className="fixed inset-0 z-50 flex h-screen w-screen flex-col items-center justify-center bg-backdrop/90 px-4 backdrop-blur-lg md:px-0"
5959
initial={{ opacity: 0 }}
6060
animate={{ opacity: 1 }}
6161
exit={{ opacity: 0 }}
@@ -66,33 +66,35 @@ export const AnalysisConfigModal: React.FC<Props> = ({
6666
}}
6767
>
6868
<motion.div
69-
className="flex w-full flex-col gap-4 rounded-md border border-white/10 bg-background-1 p-5 md:w-[min(500px,40vw)] md:p-6"
69+
className="from-white/10 to-white/5 flex w-full flex-col gap-5 rounded-2xl border border-white/10 bg-gradient-to-br p-6 shadow-none backdrop-blur-xl md:w-[min(500px,40vw)]"
7070
initial={{ y: 20, opacity: 0 }}
7171
animate={{ y: 0, opacity: 1 }}
7272
exit={{ y: 20, opacity: 0 }}
7373
transition={{ duration: 0.3 }}
7474
onClick={(e) => e.stopPropagation()}
7575
>
76-
<div className="flex items-center gap-2">
77-
<span className="material-symbols-outlined text-2xl text-human-3">
76+
<div className="flex items-center gap-3">
77+
<span className="material-symbols-outlined text-2xl text-white/80">
7878
network_intelligence
7979
</span>
80-
<h2 className="text-xl font-semibold">Analyze Entire Game</h2>
80+
<h2 className="text-xl font-semibold text-white">
81+
Analyze Entire Game
82+
</h2>
8183
</div>
8284

8385
<div className="flex flex-col gap-3">
84-
<p className="text-sm text-primary/80">
86+
<p className="text-sm text-white/75">
8587
Choose the Stockfish analysis depth for all positions in the game:
8688
</p>
8789

8890
<div className="flex flex-col gap-2">
8991
{depthOptions.map((option) => (
9092
<label
9193
key={option.value}
92-
className={`flex cursor-pointer items-center gap-3 rounded border p-3 transition duration-200 ${
94+
className={`flex cursor-pointer items-center gap-3 rounded-xl border p-3 transition duration-200 backdrop-blur-sm ${
9395
selectedDepth === option.value
94-
? 'border-human-4 bg-human-4/10'
95-
: 'border-white/10 hover:border-white/20 hover:bg-white/5'
96+
? 'border-white/25 bg-white/10 text-white'
97+
: 'border-white/10 bg-white/5 text-white/80 hover:border-white/20 hover:bg-white/8 hover:text-white'
9698
}`}
9799
htmlFor={`depth-${option.value}`}
98100
aria-label={`Select ${option.label}`}
@@ -104,40 +106,42 @@ export const AnalysisConfigModal: React.FC<Props> = ({
104106
value={option.value}
105107
checked={selectedDepth === option.value}
106108
onChange={(e) => setSelectedDepth(Number(e.target.value))}
107-
className="h-4 w-4 text-human-4"
109+
className="h-4 w-4 border-white/30 text-human-4 focus:ring-human-4"
108110
/>
109111
<div className="flex flex-col gap-0.5">
110-
<span className="text-sm font-medium">{option.label}</span>
111-
<span className="text-xs text-secondary">
112+
<span className="text-sm font-medium text-white">
113+
{option.label}
114+
</span>
115+
<span className="text-xs text-white/70">
112116
{option.description}
113117
</span>
114118
</div>
115119
</label>
116120
))}
117121
</div>
118122

119-
<div className="mt-2 flex items-start gap-2 rounded bg-background-2/60 p-3">
120-
<span className="material-symbols-outlined !text-base text-secondary">
123+
<div className="mt-3 flex items-start gap-2 rounded-xl border border-white/10 bg-white/5 p-3 backdrop-blur-sm">
124+
<span className="material-symbols-outlined !text-base text-white/70">
121125
info
122126
</span>
123-
<p className="text-xs text-secondary">
127+
<p className="text-xs text-white/70">
124128
Higher depths provide more accurate analysis but take longer to
125129
complete. You can cancel the analysis at any time. Analysis will
126130
persist even after you close the tab,
127131
</p>
128132
</div>
129133
</div>
130134

131-
<div className="flex justify-end gap-2 pt-2">
135+
<div className="flex justify-end gap-3 pt-2">
132136
<button
133137
onClick={onClose}
134-
className="flex h-9 items-center gap-1 rounded bg-background-2 px-4 text-sm transition duration-200 hover:bg-background-3"
138+
className="flex h-10 items-center gap-2 rounded-lg border border-white/10 bg-white/5 px-4 text-sm font-medium text-white/80 transition duration-200 hover:border-white/20 hover:bg-white/10 hover:text-white"
135139
>
136140
Cancel
137141
</button>
138142
<button
139143
onClick={handleConfirm}
140-
className="flex h-9 items-center gap-1 rounded bg-human-4 px-4 text-sm font-medium text-white transition duration-200 hover:bg-human-4/90"
144+
className="flex h-10 items-center gap-2 rounded-lg border border-human-4/50 bg-human-4/80 px-4 text-sm font-semibold text-white transition duration-200 hover:bg-human-4"
141145
>
142146
<span className="material-symbols-outlined text-sm">
143147
play_arrow

0 commit comments

Comments
 (0)