Glass Dark
Dark glassmorphism — frosted glass panels layered over deep dark backgrounds for a sleek, premium night-mode feel.
MCP
Code
:root {
--gd-bg: #080808;
--gd-blue: rgba(59, 130, 246, 0.3);
--gd-purple: rgba(139, 92, 246, 0.25);
--gd-cyan: rgba(6, 182, 212, 0.2);
--gd-glass-bg: rgba(255, 255, 255, 0.05);
--gd-glass-border: rgba(255, 255, 255, 0.1);
--gd-glass-hover: rgba(255, 255, 255, 0.08);
--gd-text: rgba(255, 255, 255, 0.95);
--gd-text-muted: rgba(255, 255, 255, 0.45);
--gd-radius: 20px;
--font: "Inter", system-ui, sans-serif;
}
*,
*::before,
*::after {
box-sizing: border-box;
margin: 0;
padding: 0;
}
body {
font-family: var(--font);
background: var(--gd-bg);
color: var(--gd-text);
min-height: 100vh;
overflow-x: hidden;
position: relative;
}
/* ── Background blobs ── */
.blob {
position: fixed;
border-radius: 50%;
filter: blur(120px);
pointer-events: none;
z-index: 0;
transition: transform 1.5s ease;
}
.blob--blue {
width: 500px;
height: 500px;
background: var(--gd-blue);
top: -100px;
left: -100px;
animation: blobDrift1 18s ease-in-out infinite;
}
.blob--purple {
width: 600px;
height: 600px;
background: var(--gd-purple);
top: 20%;
right: -150px;
animation: blobDrift2 22s ease-in-out infinite;
}
.blob--cyan {
width: 400px;
height: 400px;
background: var(--gd-cyan);
bottom: -100px;
left: 30%;
animation: blobDrift3 16s ease-in-out infinite;
}
@keyframes blobDrift1 {
0%,
100% {
transform: translate(0, 0) scale(1);
}
33% {
transform: translate(60px, 40px) scale(1.05);
}
66% {
transform: translate(-30px, 80px) scale(0.95);
}
}
@keyframes blobDrift2 {
0%,
100% {
transform: translate(0, 0) scale(1);
}
40% {
transform: translate(-80px, -60px) scale(1.08);
}
70% {
transform: translate(40px, 40px) scale(0.96);
}
}
@keyframes blobDrift3 {
0%,
100% {
transform: translate(0, 0) scale(1);
}
30% {
transform: translate(-40px, -30px) scale(1.1);
}
60% {
transform: translate(70px, -20px) scale(0.92);
}
}
/* ── Page ── */
.page {
position: relative;
z-index: 1;
max-width: 760px;
margin: 0 auto;
padding: 60px 24px 80px;
display: flex;
flex-direction: column;
gap: 32px;
}
/* ── Header ── */
.header {
text-align: center;
margin-bottom: 12px;
}
.header__pill {
display: inline-block;
font-size: 11px;
font-weight: 600;
letter-spacing: 0.1em;
text-transform: uppercase;
color: var(--gd-text-muted);
background: rgba(255, 255, 255, 0.07);
border: 1px solid var(--gd-glass-border);
padding: 6px 16px;
border-radius: 100px;
margin-bottom: 24px;
backdrop-filter: blur(10px);
}
.header__title {
font-size: clamp(52px, 10vw, 96px);
font-weight: 700;
line-height: 1;
letter-spacing: -0.04em;
color: var(--gd-text);
}
.header__title span {
color: transparent;
background: linear-gradient(135deg, #60a5fa, #a78bfa, #22d3ee);
-webkit-background-clip: text;
background-clip: text;
}
.header__tagline {
margin-top: 20px;
font-size: 16px;
font-weight: 300;
color: var(--gd-text-muted);
letter-spacing: 0.01em;
}
/* ── Glass card ── */
.glass-card {
background: var(--gd-glass-bg);
backdrop-filter: blur(20px) saturate(180%);
-webkit-backdrop-filter: blur(20px) saturate(180%);
border: 1px solid var(--gd-glass-border);
border-radius: var(--gd-radius);
padding: 28px;
transition: border-color 0.3s ease, background 0.3s ease;
}
.glass-card:hover {
border-color: rgba(255, 255, 255, 0.18);
background: var(--gd-glass-hover);
}
/* ── Profile card ── */
.card-section {
display: flex;
justify-content: center;
}
.profile-card {
width: 100%;
max-width: 400px;
}
.card__top {
display: flex;
align-items: center;
gap: 16px;
margin-bottom: 20px;
}
.avatar {
flex-shrink: 0;
border-radius: 16px;
overflow: hidden;
}
.card__meta {
flex: 1;
}
.card__name {
font-size: 18px;
font-weight: 600;
color: var(--gd-text);
letter-spacing: -0.01em;
}
.card__role {
font-size: 13px;
color: var(--gd-text-muted);
margin-top: 3px;
font-weight: 400;
}
.status-dot {
width: 10px;
height: 10px;
border-radius: 50%;
background: #22c55e;
box-shadow: 0 0 8px #22c55e, 0 0 16px rgba(34, 197, 94, 0.4);
flex-shrink: 0;
}
.card__divider {
height: 1px;
background: var(--gd-glass-border);
margin: 0 0 20px;
}
.card__stats {
display: grid;
grid-template-columns: repeat(3, 1fr);
gap: 8px;
}
.stat {
text-align: center;
padding: 12px 8px;
border-radius: 12px;
background: rgba(255, 255, 255, 0.03);
border: 1px solid rgba(255, 255, 255, 0.05);
transition: background 0.2s ease;
}
.stat:hover {
background: rgba(255, 255, 255, 0.06);
}
.stat__value {
display: block;
font-size: 22px;
font-weight: 700;
color: var(--gd-text);
letter-spacing: -0.02em;
}
.stat__label {
display: block;
font-size: 11px;
color: var(--gd-text-muted);
text-transform: uppercase;
letter-spacing: 0.08em;
margin-top: 3px;
font-weight: 500;
}
/* ── Controls card ── */
.controls-card {
display: flex;
flex-direction: column;
gap: 24px;
}
/* ── Buttons ── */
.button-row {
display: flex;
flex-wrap: wrap;
gap: 12px;
}
.btn {
font-family: var(--font);
font-size: 14px;
font-weight: 600;
padding: 12px 22px;
border-radius: 10px;
border: none;
cursor: pointer;
transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
letter-spacing: 0.01em;
}
.btn--white {
background: white;
color: #0a0a0a;
}
.btn--white:hover {
transform: translateY(-1px);
box-shadow: 0 8px 30px rgba(255, 255, 255, 0.2);
}
.btn--white:active {
transform: translateY(0);
}
.btn--glass {
background: rgba(255, 255, 255, 0.08);
color: var(--gd-text);
border: 1px solid var(--gd-glass-border);
backdrop-filter: blur(10px);
}
.btn--glass:hover {
background: rgba(255, 255, 255, 0.12);
border-color: rgba(255, 255, 255, 0.2);
transform: translateY(-1px);
}
.btn--ghost {
background: transparent;
color: var(--gd-text-muted);
border: 1px solid rgba(255, 255, 255, 0.15);
}
.btn--ghost:hover {
color: var(--gd-text);
border-color: rgba(255, 255, 255, 0.35);
transform: translateY(-1px);
}
/* ── Input ── */
.field {
display: flex;
flex-direction: column;
gap: 8px;
}
.field__label {
font-size: 12px;
font-weight: 500;
color: var(--gd-text-muted);
text-transform: uppercase;
letter-spacing: 0.09em;
}
.glass-input {
font-family: var(--font);
font-size: 14px;
padding: 12px 16px;
background: rgba(255, 255, 255, 0.07);
border: 1px solid rgba(255, 255, 255, 0.15);
border-radius: 10px;
color: var(--gd-text);
outline: none;
transition: border-color 0.25s ease, background 0.25s ease, box-shadow 0.25s ease;
backdrop-filter: blur(8px);
}
.glass-input:focus {
border-color: rgba(96, 165, 250, 0.6);
background: rgba(255, 255, 255, 0.09);
box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.12);
}
.glass-input::placeholder {
color: rgba(255, 255, 255, 0.2);
}
/* ── Badges ── */
.badge-row {
display: flex;
flex-wrap: wrap;
gap: 8px;
}
.badge {
display: inline-block;
font-size: 12px;
font-weight: 500;
padding: 5px 14px;
border-radius: 100px;
border: 1px solid;
backdrop-filter: blur(8px);
transition: transform 0.2s ease;
}
.badge:hover {
transform: translateY(-1px);
}
.badge--blue {
background: rgba(59, 130, 246, 0.12);
border-color: rgba(59, 130, 246, 0.3);
color: #93c5fd;
}
.badge--purple {
background: rgba(139, 92, 246, 0.12);
border-color: rgba(139, 92, 246, 0.3);
color: #c4b5fd;
}
.badge--cyan {
background: rgba(6, 182, 212, 0.12);
border-color: rgba(6, 182, 212, 0.3);
color: #67e8f9;
}
.badge--white {
background: rgba(255, 255, 255, 0.07);
border-color: rgba(255, 255, 255, 0.15);
color: rgba(255, 255, 255, 0.7);
}
/* ── Responsive ── */
@media (max-width: 520px) {
.page {
padding: 32px 16px 48px;
gap: 24px;
}
.header__title {
font-size: clamp(36px, 12vw, 52px);
}
.header__pill {
font-size: 10px;
padding: 5px 14px;
margin-bottom: 16px;
}
.header__tagline {
font-size: 14px;
margin-top: 14px;
}
.glass-card {
padding: 20px;
}
.profile-card {
max-width: 100%;
}
.card__top {
gap: 12px;
margin-bottom: 16px;
}
.card__name {
font-size: 16px;
}
.card__stats {
gap: 6px;
}
.stat {
padding: 10px 4px;
}
.stat__value {
font-size: 20px;
}
.stat__label {
font-size: 10px;
}
.button-row {
gap: 8px;
}
.btn {
font-size: 13px;
padding: 10px 16px;
}
.blob--blue {
width: 280px;
height: 280px;
}
.blob--purple {
width: 320px;
height: 320px;
}
.blob--cyan {
width: 220px;
height: 220px;
}
}/* Glass Dark — Interactive JS */
(function () {
"use strict";
// ── Mouse-tracked blob drift enhancement ──
const blobBlue = document.getElementById("blobBlue");
const blobPurple = document.getElementById("blobPurple");
const blobCyan = document.getElementById("blobCyan");
let mouseX = 0;
let mouseY = 0;
let blobAnimFrame = null;
document.addEventListener("mousemove", (e) => {
mouseX = e.clientX / window.innerWidth;
mouseY = e.clientY / window.innerHeight;
if (!blobAnimFrame) {
blobAnimFrame = requestAnimationFrame(updateBlobs);
}
});
function updateBlobs() {
blobAnimFrame = null;
// Subtle parallax push on blobs based on mouse (±30px range)
if (blobBlue) {
blobBlue.style.translate = `${mouseX * 30}px ${mouseY * 20}px`;
}
if (blobPurple) {
blobPurple.style.translate = `${-mouseX * 25}px ${-mouseY * 30}px`;
}
if (blobCyan) {
blobCyan.style.translate = `${mouseX * 20}px ${-mouseY * 20}px`;
}
}
// ── Entrance animation for stats ──
const stats = document.querySelectorAll(".stat");
stats.forEach((stat, i) => {
stat.style.opacity = "0";
stat.style.transform = "translateY(12px)";
stat.style.transition = `opacity 0.5s ease ${0.4 + i * 0.1}s, transform 0.5s ease ${0.4 + i * 0.1}s`;
});
requestAnimationFrame(() => {
requestAnimationFrame(() => {
stats.forEach((stat) => {
stat.style.opacity = "1";
stat.style.transform = "translateY(0)";
});
});
});
// ── Glass card entrance ──
const glassCards = document.querySelectorAll(".glass-card");
glassCards.forEach((card, i) => {
card.style.opacity = "0";
card.style.transform = "translateY(20px)";
card.style.transition = `opacity 0.6s ease ${0.2 + i * 0.15}s, transform 0.6s ease ${0.2 + i * 0.15}s`;
});
requestAnimationFrame(() => {
requestAnimationFrame(() => {
glassCards.forEach((card) => {
card.style.opacity = "1";
card.style.transform = "translateY(0)";
});
});
});
// ── Input: glowing border pulse on focus ──
const input = document.getElementById("glassInput");
if (input) {
input.addEventListener("focus", () => {
input.style.boxShadow = "0 0 0 3px rgba(96,165,250,0.15), 0 0 20px rgba(96,165,250,0.1)";
});
input.addEventListener("blur", () => {
input.style.boxShadow = "";
});
}
// ── White button: shimmer on hover ──
const whiteBtn = document.querySelector(".btn--white");
if (whiteBtn) {
whiteBtn.addEventListener("mouseenter", () => {
whiteBtn.style.background = "#f0f0f0";
});
whiteBtn.addEventListener("mouseleave", () => {
whiteBtn.style.background = "white";
});
}
// ── Status dot pulse animation ──
const statusDot = document.querySelector(".status-dot");
if (statusDot) {
const pulseKeyframes = `
@keyframes statusPulse {
0%, 100% { box-shadow: 0 0 8px #22c55e, 0 0 16px rgba(34,197,94,0.4); }
50% { box-shadow: 0 0 14px #22c55e, 0 0 28px rgba(34,197,94,0.6), 0 0 40px rgba(34,197,94,0.2); }
}
`;
const style = document.createElement("style");
style.textContent = pulseKeyframes;
document.head.appendChild(style);
statusDot.style.animation = "statusPulse 2s ease-in-out infinite";
}
})();<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="preconnect" href="https://fonts.googleapis.com" />
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap" rel="stylesheet" />
<link rel="stylesheet" href="style.css" />
<title>Glass Dark — Design Style</title>
</head>
<body>
<!-- Background color blobs -->
<div class="blob blob--blue" id="blobBlue" aria-hidden="true"></div>
<div class="blob blob--purple" id="blobPurple" aria-hidden="true"></div>
<div class="blob blob--cyan" id="blobCyan" aria-hidden="true"></div>
<div class="page">
<!-- Header -->
<header class="header">
<div class="header__pill">Premium Night Mode</div>
<h1 class="header__title">Glass<br /><span>Dark</span></h1>
<p class="header__tagline">Frosted glass panels over deep dark atmospheres.</p>
</header>
<!-- Profile glass card -->
<section class="card-section">
<div class="glass-card profile-card">
<div class="card__top">
<div class="avatar">
<svg width="54" height="54" viewBox="0 0 54 54" fill="none" xmlns="http://www.w3.org/2000/svg">
<rect width="54" height="54" rx="16" fill="rgba(255,255,255,0.08)"/>
<rect width="54" height="54" rx="16" fill="none" stroke="rgba(255,255,255,0.15)" stroke-width="1"/>
<circle cx="27" cy="20" r="10" fill="rgba(59,130,246,0.6)"/>
<path d="M7 50c0-11.046 8.954-20 20-20s20 8.954 20 20" fill="rgba(59,130,246,0.35)"/>
<!-- Glow on avatar -->
<circle cx="27" cy="20" r="10" fill="none" stroke="rgba(59,130,246,0.4)" stroke-width="2"/>
</svg>
</div>
<div class="card__meta">
<h2 class="card__name">Riley Chen</h2>
<p class="card__role">AI Engineer</p>
</div>
<div class="status-dot" title="Online"></div>
</div>
<div class="card__divider"></div>
<div class="card__stats">
<div class="stat">
<span class="stat__value">512</span>
<span class="stat__label">Models</span>
</div>
<div class="stat">
<span class="stat__value">99.9</span>
<span class="stat__label">Uptime %</span>
</div>
<div class="stat">
<span class="stat__value">32k</span>
<span class="stat__label">API Calls</span>
</div>
</div>
</div>
</section>
<!-- Controls -->
<section class="glass-card controls-card">
<!-- Buttons -->
<div class="button-row">
<button class="btn btn--white">Deploy Now</button>
<button class="btn btn--glass">Settings</button>
<button class="btn btn--ghost">Docs →</button>
</div>
<!-- Input -->
<div class="field">
<label class="field__label" for="glassInput">API Endpoint</label>
<input class="glass-input" id="glassInput" type="text" placeholder="https://api.example.com/v1/..." />
</div>
<!-- Badges -->
<div class="badge-row">
<span class="badge badge--blue">Glass</span>
<span class="badge badge--purple">Dark</span>
<span class="badge badge--cyan">Premium</span>
<span class="badge badge--white">Blur</span>
</div>
</section>
</div>
<script src="script.js"></script>
</body>
</html>Glass Dark
Glass Dark is the definitive premium dark-mode aesthetic. Deep, near-black backgrounds hold large blurred color blobs — pools of deep blue, violet, and cyan — that create an atmospheric depth layer. On top of this living canvas, frosted glass panels with backdrop-filter: blur() act as the primary UI surface: semi-transparent, light-catching, and visually sophisticated.
The technique works because the eye perceives the blur and tint as actual glass, not just CSS — especially when the background blobs softly animate. This creates the impression of depth stacking: glowing atmosphere behind glass surfaces, which hold crisp white text and sharp interface elements. The contrast between the near-black background, the luminous blobs, and the bright white primary button (solid white on glass is maximum impact) defines the premium quality of the style.
Color palette is intentionally restrained: everything is either rgba(255,255,255,n) or the colors of the background blobs bleeding through the glass. This restraint prevents visual chaos while the backdrop animation provides richness.
Key characteristics
#080808background with 3 large, blurred color blobs (filter: blur(120px))- Glass cards:
rgba(255,255,255,0.05)+backdrop-filter: blur(20px) saturate(180%) - Solid white primary button for maximum contrast pop on glass
- Animated blob drift via CSS keyframes toggled by JS
border: 1px solid rgba(255,255,255,0.1)on all glass elements- White/muted-white text hierarchy with no hue shifts needed
When to use it
Glass Dark is the default choice for SaaS product landing pages, crypto/fintech apps, AI tools, music players, and any context where premium, modern, and night-mode are the primary brand values. The backdrop-filter property has broad modern browser support but gracefully degrades to the semi-transparent background alone.