Here are 5 creative redesign options for your .image-modal-content and .close-modal styles, both for light and dark mode considerations. Each option amps up the 3D feel, plays with accentuation and border styles, and brings unique shadows and transitions to create a stylish and modern UI.
Option 1: Neumorphism Pop - Smooth, subtle 3D with soft shadow depth
css Copy code
.image-modal-content {
background: var(--container-bg);
border-radius: 16px;
padding: 20px;
border: 1px solid transparent;
box-shadow:
8px 8px 16px rgba(0,0,0,0.12),
-8px -8px 16px rgba(255,255,255,0.7);
position: relative;
transition: box-shadow 0.3s ease;
}
.image-modal-content:hover {
box-shadow:
10px 10px 20px rgba(0,0,0,0.20),
-10px -10px 20px rgba(255,255,255,0.85);
}
.image-modal img {
border-radius: 12px;
box-shadow: 0 4px 10px rgba(0,0,0,0.15);
max-height: 80vh;
}
.close-modal {
background: var(--th-bg);
color: var(--text-color);
border-radius: 12px;
border: none;
padding: 8px 14px;
box-shadow:
inset 3px 3px 5px rgba(255,255,255,0.7),
5px 5px 10px rgba(0,0,0,0.15);
cursor: pointer;
font-size: 18px;
transition: all 0.3s ease;
}
.close-modal:hover {
box-shadow:
inset 1px 1px 2px rgba(255,255,255,0.9),
3px 3px 6px rgba(0,0,0,0.3);
transform: translate(-2px, 2px);
}
Effect: Soft, extruded surface style with gentle shadows to create that tactile, effortless neumorphic effect.
Option 2: Chrome-ish Metallic Border with sharp offset shadow
css Copy code
.image-modal-content {
background: var(--container-bg);
border-radius: 12px;
border: 3px double #888; /* chrome metallic double border */
box-shadow:
8px 8px 0 0 var(--shadow-color),
inset 0 0 10px #bbb;
padding: 16px;
position: relative;
}
.image-modal img {
border-radius: 10px;
box-shadow: 0 0 20px rgba(255,255,255,0.5) inset;
max-height: 80vh;
}
.close-modal {
background: linear-gradient(145deg, #d1d1d1, #f7f7f7);
border: 2px solid #bbb;
border-radius: 10px;
box-shadow: 3px 3px 0 #555;
color: #444;
font-weight: bold;
font-size: 18px;
transition: all 0.4s ease;
}
.close-modal:hover {
box-shadow: 1px 1px 0 #333;
background: linear-gradient(145deg, #f7f7f7, #d1d1d1);
color: #222;
transform: translate(-3px, 3px);
border-color: #888;
}
Effect: A sturdy, metallic chrome border with subtle highlight that works well on both light & dark backgrounds; the double border increases emphasis.
Option 3: Colorful Gradient Border with soft glow
css Copy code
.image-modal-content {
background: var(--container-bg);
padding: 18px;
border-radius: 16px;
position: relative;
box-shadow: 0 0 10px var(--shadow-color);
}
.image-modal-content::before {
content: '';
position: absolute;
top: -4px; left: -4px; right: -4px; bottom: -4px;
border-radius: 20px;
background: linear-gradient(45deg, #FF6B6B, #FFD93D, #6BCB77, #4D96FF);
z-index: -1;
filter: blur(15px);
opacity: 0.85;
animation: gradientShift 10s ease infinite;
}
@keyframes gradientShift {
0% {background-position: 0% 50%;}
50% {background-position: 100% 50%;}
100% {background-position: 0% 50%;}
}
.image-modal img {
border-radius: 14px;
box-shadow: 0 5px 15px rgba(0,0,0,0.2);
max-height: 80vh;
}
.close-modal {
background: var(--th-bg);
color: var(--text-color);
border-radius: 12px;
border: 2px solid transparent;
padding: 10px 20px;
font-weight: 600;
font-size: 18px;
cursor: pointer;
box-shadow: 0 0 5px rgba(0,0,0,0.15);
transition: all 0.4s ease;
position: relative;
z-index: 1;
}
.close-modal:hover {
box-shadow: 0 0 15px #ff6b6b;
border-color: #ff6b6b;
transform: translate(-1px, 1px);
}
Effect: Vibrant glowing gradient border that softly pulses, making the modal feel alive and energetic.
Option 4: Heavy 3D “Cutout” look with inset and outset borders
css Copy code
.image-modal-content {
background: var(--container-bg);
border-radius: 0;
position: relative;
padding: 12px;
border-top: 4px solid #222;
border-left: 4px solid #222;
border-bottom: 4px solid #eee;
border-right: 4px solid #eee;
box-shadow:
inset 5px 5px 0 var(--shadow-color),
8px 8px 0px #000;
}
.image-modal img {
border-radius: 0;
max-height: 80vh;
box-shadow: inset 1px 1px 10px #00000055;
}
.close-modal {
background: var(--th-bg);
font-weight: bold;
font-size: 18px;
color: var(--text-color);
border: 3px solid #222;
border-radius: 0;
box-shadow:
5px 5px 0 #000;
padding: 6px 16px;
transition: all 0.3s ease;
}
.close-modal:hover {
box-shadow: 2px 2px 0 #000;
border-color: #555;
transform: translate(-4px, 4px);
}
Effect: Blocky, retro 3D block effect with heavy shadows offset to create a "cut-out" 3D feel. This style is notably assertive and bold.
Option 5: Futuristic Glassmorphism + Neon accent border
css Copy code
.image-modal-content {
background: var(--container-bg);
backdrop-filter: blur(12px);
-webkit-backdrop-filter: blur(12px);
border-radius: 16px;
border: 2px solid transparent;
box-shadow: 0 0 20px rgba(0, 255, 255, 0.4);
position: relative;
padding: 16px;
z-index: 1;
}
.image-modal-content::before {
content: '';
position: absolute;
top: -6px; left: -6px; right: -6px; bottom: -6px;
border-radius: 20px;
background: linear-gradient(45deg, #00fff7, #00d4f7, #0076f7);
filter: blur(15px);
opacity: 0.6;
z-index: -1;
animation: neonPulse 3s ease-in-out infinite alternate;
}
@keyframes neonPulse {
0%, 100% {opacity: 0.4;}
50% {opacity: 0.9;}
}
.image-modal img {
border-radius: 14px;
box-shadow: 0 0 20px rgba(0, 255, 255, 0.3);
max-height: 80vh;
}
.close-modal {
background: rgba(0, 0, 0, 0.6);
color: #00ffff;
border-radius: 12px;
border: 2px solid #00ffff;
padding: 10px 22px;
font-weight: 700;
font-size: 18px;
box-shadow: 0 0 12px #00ffff;
cursor: pointer;
transition: all 0.3s ease;
}
.close-modal:hover {
box-shadow: 0 0 20px #00ffff, 0 0 30px #00ffff inset;
background: rgba(0, 0, 0, 0.8);
transform: translate(-2px, 2px);
}
Effect: Glassy frosted background with a neon glowing border and subtle flickering pulse for that futuristic tech feel.
Summary and usage:
Set your CSS variables appropriately for light and dark modes, e.g.:
css Copy code
:root {
--container-bg: #fff;
--container-border: #ccc;
--shadow-color: rgba(0,0,0,0.1);
--th-bg: #f0f0f0;
--text-color: #222;
}
@media (prefers-color-scheme: dark) {
:root {
--container-bg: #111;
--container-border: #444;
--shadow-color: rgba(0,0,0,0.6);
--th-bg: #222;
--text-color: #eee;
}
}
Apply one of the options by replacing your CSS. You can mix & match image-modal and close-modal parts too!
If you want, I can help you generate the full HTML & CSS structure to demo one of these. Just ask!