Skip to content

Commit 9cc27d6

Browse files
Implement dark theme redesign
Adopt Cosmos blue-violet cyan themed dark UI across app: - Update Navigation styling to gradient header with glow and bottom accent bar - Replace and enhance Auth, Home, Domains, Discover pages with glassmorphism, gradient borders, and mesh background - Update Card and Button components to support new glass and glow effects - Extend Tailwind config and index CSS with new color tokens, gradients, and animations - Apply consistent dark theme across pages for a premium, unique CodeKick look X-Lovable-Edit-ID: edt-fd6d66b5-7f5b-4fe0-ab92-29a933891707
2 parents db765f1 + 55901e8 commit 9cc27d6

9 files changed

Lines changed: 442 additions & 240 deletions

File tree

src/components/Navigation.tsx

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ import { useAuth } from '@/hooks/useAuth';
55
import { supabase } from '@/integrations/supabase/client';
66
import { Button } from '@/components/ui/button';
77
import { ThemeToggle } from '@/components/ThemeToggle';
8-
import { Badge } from '@/components/ui/badge';
98
import {
109
Tooltip,
1110
TooltipContent,
@@ -39,27 +38,31 @@ export const Navigation = () => {
3938
};
4039

4140
return (
42-
<nav className="fixed top-0 left-0 right-0 z-50 bg-card/80 backdrop-blur-lg border-b border-border">
41+
<nav className="fixed top-0 left-0 right-0 z-50 bg-background/80 backdrop-blur-2xl border-b border-border/50">
42+
{/* Gradient accent line at bottom */}
43+
<div className="absolute bottom-0 left-0 right-0 h-px bg-gradient-to-r from-transparent via-primary/50 to-transparent" />
44+
4345
<div className="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
4446
<div className="flex justify-between items-center h-16">
4547
<button
4648
onClick={() => navigate('/')}
47-
className="flex items-center space-x-2 hover:opacity-80 transition-opacity"
49+
className="flex items-center space-x-2 group"
4850
>
49-
<div className="w-10 h-10 bg-gradient-primary rounded-lg flex items-center justify-center">
50-
<span className="text-white font-bold text-xl">CK</span>
51+
<div className="w-10 h-10 bg-gradient-primary rounded-lg flex items-center justify-center shadow-glow-sm group-hover:shadow-glow transition-all duration-300 group-hover:scale-105">
52+
<span className="text-primary-foreground font-bold text-xl">CK</span>
5153
</div>
52-
<span className="text-xl font-bold bg-gradient-primary bg-clip-text text-transparent">
54+
<span className="text-xl font-bold text-gradient">
5355
CodeKick
5456
</span>
5557
</button>
5658

5759
{user && (
58-
<div className="flex items-center gap-2">
60+
<div className="flex items-center gap-1">
5961
<Button
6062
variant="ghost"
6163
size="sm"
6264
onClick={() => navigate('/domains')}
65+
className="text-muted-foreground hover:text-foreground"
6366
>
6467
<Home className="w-4 h-4 mr-2" />
6568
Domains
@@ -68,6 +71,7 @@ export const Navigation = () => {
6871
variant="ghost"
6972
size="sm"
7073
onClick={() => navigate('/discover')}
74+
className="text-muted-foreground hover:text-foreground"
7175
>
7276
<Search className="w-4 h-4 mr-2" />
7377
Discover
@@ -80,15 +84,15 @@ export const Navigation = () => {
8084
variant="ghost"
8185
size="sm"
8286
onClick={() => navigate('/verify-phone')}
83-
className="relative"
87+
className="relative text-muted-foreground hover:text-foreground"
8488
>
8589
<Phone className="w-4 h-4" />
8690
{phoneVerified !== null && (
8791
<span className="absolute -top-1 -right-1">
8892
{phoneVerified ? (
89-
<CheckCircle className="w-3 h-3 text-green-500" />
93+
<CheckCircle className="w-3 h-3 text-success" />
9094
) : (
91-
<AlertCircle className="w-3 h-3 text-yellow-500" />
95+
<AlertCircle className="w-3 h-3 text-accent" />
9296
)}
9397
</span>
9498
)}
@@ -103,6 +107,7 @@ export const Navigation = () => {
103107
variant="ghost"
104108
size="sm"
105109
onClick={() => navigate('/profile')}
110+
className="text-muted-foreground hover:text-foreground"
106111
>
107112
<User className="w-4 h-4 mr-2" />
108113
Profile
@@ -111,6 +116,7 @@ export const Navigation = () => {
111116
variant="ghost"
112117
size="sm"
113118
onClick={signOut}
119+
className="text-muted-foreground hover:text-foreground"
114120
>
115121
<LogOut className="w-4 h-4 mr-2" />
116122
Sign Out

src/components/ui/button.tsx

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,18 @@ import { cva, type VariantProps } from "class-variance-authority";
55
import { cn } from "@/lib/utils";
66

77
const buttonVariants = cva(
8-
"inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",
8+
"inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-all duration-300 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",
99
{
1010
variants: {
1111
variant: {
12-
default: "bg-primary text-primary-foreground hover:bg-primary/90",
12+
default: "bg-primary text-primary-foreground hover:bg-primary/90 hover:shadow-glow-sm",
1313
destructive: "bg-destructive text-destructive-foreground hover:bg-destructive/90",
1414
outline: "border border-input bg-background hover:bg-accent hover:text-accent-foreground",
1515
secondary: "bg-secondary text-secondary-foreground hover:bg-secondary/80",
16-
ghost: "hover:bg-accent hover:text-accent-foreground",
16+
ghost: "hover:bg-accent/10 hover:text-accent-foreground",
1717
link: "text-primary underline-offset-4 hover:underline",
18+
glow: "bg-gradient-primary text-primary-foreground shadow-glow-sm hover:shadow-glow-lg hover:scale-105",
19+
accent: "bg-accent text-accent-foreground hover:bg-accent/90 hover:shadow-accent-glow",
1820
},
1921
size: {
2022
default: "h-10 px-4 py-2",

src/components/ui/card.tsx

Lines changed: 32 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,38 @@
11
import * as React from "react";
2+
import { cva, type VariantProps } from "class-variance-authority";
23

34
import { cn } from "@/lib/utils";
45

5-
const Card = React.forwardRef<HTMLDivElement, React.HTMLAttributes<HTMLDivElement>>(({ className, ...props }, ref) => (
6-
<div ref={ref} className={cn("rounded-lg border bg-card text-card-foreground shadow-sm", className)} {...props} />
7-
));
6+
const cardVariants = cva(
7+
"rounded-lg border text-card-foreground transition-all duration-300",
8+
{
9+
variants: {
10+
variant: {
11+
default: "bg-card shadow-sm",
12+
glass: "glass-card",
13+
bordered: "gradient-border bg-card",
14+
elevated: "bg-card shadow-card-hover hover:shadow-elegant",
15+
},
16+
},
17+
defaultVariants: {
18+
variant: "default",
19+
},
20+
}
21+
);
22+
23+
export interface CardProps
24+
extends React.HTMLAttributes<HTMLDivElement>,
25+
VariantProps<typeof cardVariants> {}
26+
27+
const Card = React.forwardRef<HTMLDivElement, CardProps>(
28+
({ className, variant, ...props }, ref) => (
29+
<div
30+
ref={ref}
31+
className={cn(cardVariants({ variant, className }))}
32+
{...props}
33+
/>
34+
)
35+
);
836
Card.displayName = "Card";
937

1038
const CardHeader = React.forwardRef<HTMLDivElement, React.HTMLAttributes<HTMLDivElement>>(
@@ -40,4 +68,4 @@ const CardFooter = React.forwardRef<HTMLDivElement, React.HTMLAttributes<HTMLDiv
4068
);
4169
CardFooter.displayName = "CardFooter";
4270

43-
export { Card, CardHeader, CardFooter, CardTitle, CardDescription, CardContent };
71+
export { Card, CardHeader, CardFooter, CardTitle, CardDescription, CardContent, cardVariants };

src/index.css

Lines changed: 146 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ All colors MUST be HSL.
2727
--muted: 220 20% 90%;
2828
--muted-foreground: 220 20% 45%;
2929

30-
--accent: 270 80% 65%;
30+
--accent: 185 90% 45%;
3131
--accent-foreground: 0 0% 100%;
3232

3333
--success: 142 76% 36%;
@@ -44,6 +44,7 @@ All colors MUST be HSL.
4444

4545
/* Gradients */
4646
--gradient-primary: linear-gradient(135deg, hsl(217 91% 60%), hsl(270 80% 65%));
47+
--gradient-accent: linear-gradient(135deg, hsl(217 91% 60%), hsl(185 90% 45%));
4748
--gradient-card: linear-gradient(180deg, hsl(0 0% 100%), hsl(220 25% 97%));
4849
--gradient-hero: linear-gradient(135deg, hsl(217 91% 60% / 0.1), hsl(270 80% 65% / 0.05));
4950

@@ -57,45 +58,58 @@ All colors MUST be HSL.
5758
}
5859

5960
.dark {
60-
--background: 220 60% 5%;
61-
--foreground: 220 25% 95%;
61+
/* Near-black background for premium feel */
62+
--background: 220 20% 4%;
63+
--foreground: 220 10% 98%;
6264

63-
--card: 220 50% 8%;
64-
--card-foreground: 220 25% 95%;
65+
/* Elevated card surfaces */
66+
--card: 220 15% 7%;
67+
--card-foreground: 220 10% 98%;
6568

66-
--popover: 220 50% 8%;
67-
--popover-foreground: 220 25% 95%;
69+
--popover: 220 15% 8%;
70+
--popover-foreground: 220 10% 98%;
6871

72+
/* Vibrant primary blue */
6973
--primary: 217 91% 60%;
7074
--primary-foreground: 0 0% 100%;
7175
--primary-glow: 217 91% 75%;
7276

73-
--secondary: 220 40% 15%;
74-
--secondary-foreground: 220 25% 95%;
77+
/* Dark secondary */
78+
--secondary: 220 20% 12%;
79+
--secondary-foreground: 220 10% 95%;
7580

76-
--muted: 220 40% 15%;
77-
--muted-foreground: 220 20% 60%;
81+
/* Muted elements */
82+
--muted: 220 15% 14%;
83+
--muted-foreground: 220 10% 55%;
7884

79-
--accent: 270 80% 65%;
80-
--accent-foreground: 0 0% 100%;
85+
/* Electric cyan accent */
86+
--accent: 185 90% 55%;
87+
--accent-foreground: 0 0% 0%;
8188

82-
--success: 142 76% 36%;
89+
--success: 142 76% 42%;
8390
--success-foreground: 0 0% 100%;
8491

85-
--destructive: 0 62.8% 30.6%;
86-
--destructive-foreground: 220 25% 95%;
92+
--destructive: 0 62.8% 50%;
93+
--destructive-foreground: 220 10% 98%;
8794

88-
--border: 220 40% 20%;
89-
--input: 220 40% 20%;
95+
/* Subtle borders */
96+
--border: 220 15% 14%;
97+
--input: 220 15% 14%;
9098
--ring: 217 91% 60%;
9199

92-
--gradient-primary: linear-gradient(135deg, hsl(217 91% 60%), hsl(270 80% 65%));
93-
--gradient-card: linear-gradient(180deg, hsl(220 50% 8%), hsl(220 60% 5%));
94-
--gradient-hero: linear-gradient(135deg, hsl(217 91% 60% / 0.15), hsl(270 80% 65% / 0.08));
100+
/* Enhanced dark gradients */
101+
--gradient-primary: linear-gradient(135deg, hsl(217 91% 60%), hsl(270 80% 65%), hsl(185 90% 55%));
102+
--gradient-accent: linear-gradient(135deg, hsl(185 90% 55%), hsl(217 91% 60%));
103+
--gradient-card: linear-gradient(145deg, hsl(220 15% 9%), hsl(220 20% 4%));
104+
--gradient-hero: linear-gradient(135deg, hsl(217 91% 60% / 0.12), hsl(270 80% 65% / 0.08), hsl(185 90% 55% / 0.06));
95105

96-
--shadow-elegant: 0 10px 40px -10px hsl(217 91% 60% / 0.3);
97-
--shadow-card: 0 4px 20px -2px hsl(0 0% 0% / 0.3);
98-
--shadow-glow: 0 0 80px hsl(217 91% 75% / 0.3);
106+
/* Animated border gradient */
107+
--gradient-border: linear-gradient(90deg, hsl(217 91% 60%), hsl(270 80% 65%), hsl(185 90% 55%), hsl(217 91% 60%));
108+
109+
/* Enhanced glow effects */
110+
--shadow-elegant: 0 10px 40px -10px hsl(217 91% 60% / 0.25);
111+
--shadow-card: 0 4px 24px -4px hsl(0 0% 0% / 0.4);
112+
--shadow-glow: 0 0 80px hsl(217 91% 60% / 0.2), 0 0 120px hsl(185 90% 55% / 0.1);
99113
}
100114
}
101115

@@ -109,3 +123,111 @@ All colors MUST be HSL.
109123
transition: background-color 0.3s ease, color 0.3s ease;
110124
}
111125
}
126+
127+
@layer components {
128+
/* Glassmorphism card effect */
129+
.glass-card {
130+
@apply bg-card/70 backdrop-blur-xl border border-border/50;
131+
box-shadow:
132+
0 8px 32px rgba(0, 0, 0, 0.2),
133+
inset 0 1px 0 rgba(255, 255, 255, 0.05);
134+
}
135+
136+
.dark .glass-card {
137+
@apply bg-card/60;
138+
box-shadow:
139+
0 8px 32px rgba(0, 0, 0, 0.4),
140+
inset 0 1px 0 rgba(255, 255, 255, 0.03);
141+
}
142+
143+
/* Animated gradient border effect */
144+
.gradient-border {
145+
position: relative;
146+
background: hsl(var(--card));
147+
border-radius: var(--radius);
148+
}
149+
150+
.gradient-border::before {
151+
content: '';
152+
position: absolute;
153+
inset: 0;
154+
border-radius: inherit;
155+
padding: 1px;
156+
background: var(--gradient-border, var(--gradient-primary));
157+
background-size: 300% 300%;
158+
-webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
159+
mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
160+
mask-composite: exclude;
161+
-webkit-mask-composite: xor;
162+
opacity: 0.4;
163+
transition: opacity 0.4s ease;
164+
animation: gradient-shift 4s ease infinite;
165+
}
166+
167+
.gradient-border:hover::before {
168+
opacity: 1;
169+
}
170+
171+
/* Background mesh gradient pattern */
172+
.bg-mesh {
173+
background-image:
174+
radial-gradient(at 40% 20%, hsl(217 91% 60% / 0.12) 0px, transparent 50%),
175+
radial-gradient(at 80% 0%, hsl(270 80% 65% / 0.08) 0px, transparent 50%),
176+
radial-gradient(at 0% 50%, hsl(185 90% 55% / 0.06) 0px, transparent 50%),
177+
radial-gradient(at 80% 80%, hsl(217 91% 60% / 0.05) 0px, transparent 40%);
178+
}
179+
180+
/* Text gradient enhancement */
181+
.text-gradient {
182+
background: var(--gradient-primary);
183+
-webkit-background-clip: text;
184+
-webkit-text-fill-color: transparent;
185+
background-clip: text;
186+
}
187+
188+
/* Glow effect for buttons and interactive elements */
189+
.glow-effect {
190+
box-shadow: 0 0 20px hsl(217 91% 60% / 0.3);
191+
transition: box-shadow 0.3s ease;
192+
}
193+
194+
.glow-effect:hover {
195+
box-shadow: 0 0 40px hsl(217 91% 60% / 0.5), 0 0 60px hsl(185 90% 55% / 0.2);
196+
}
197+
198+
/* Accent glow */
199+
.accent-glow {
200+
box-shadow: 0 0 20px hsl(185 90% 55% / 0.3);
201+
}
202+
203+
.accent-glow:hover {
204+
box-shadow: 0 0 40px hsl(185 90% 55% / 0.5);
205+
}
206+
207+
/* Shimmer effect for loading states */
208+
.shimmer {
209+
background: linear-gradient(
210+
90deg,
211+
hsl(var(--muted)) 0%,
212+
hsl(var(--muted-foreground) / 0.1) 50%,
213+
hsl(var(--muted)) 100%
214+
);
215+
background-size: 200% 100%;
216+
animation: shimmer 1.5s infinite;
217+
}
218+
}
219+
220+
@layer utilities {
221+
/* 3D transform utilities for card flips */
222+
.perspective-1000 {
223+
perspective: 1000px;
224+
}
225+
226+
.preserve-3d {
227+
transform-style: preserve-3d;
228+
}
229+
230+
.backface-hidden {
231+
backface-visibility: hidden;
232+
}
233+
}

0 commit comments

Comments
 (0)