:root {
--glow-color-primary: hsl(186, 100%, 50%);
--glow-color-secondary: hsl(320, 100%, 50%);
}
html, body {
height: 100%;
width: 100%;
margin: 0;
padding: 0;
overflow: hidden;
}
body {
display: flex;
justify-content: center;
align-items: center;
font-family: 'Exo 2', sans-serif;
background-color: #000;
background-image: radial-gradient(ellipse at center, #1b2735 0%, #090a0f 100%);
}
.container {
text-align: center;
}
.glowing-text {
color: #fff;
font-size: clamp(3rem, 15vw, 10rem);
font-weight: 700;
text-transform: uppercase;
letter-spacing: 0.1em;
cursor: default;
user-select: none;
/* The core animation */
animation: glow-animation 3s ease-in-out infinite alternate;
}
@keyframes glow-animation {
0% {
text-shadow:
0 0 10px #fff,
0 0 20px var(--glow-color-primary),
0 0 30px var(--glow-color-primary),
0 0 40px var(--glow-color-primary),
0 0 50px var(--glow-color-primary),
0 0 60px var(--glow-color-primary),
0 0 70px var(--glow-color-primary);
}
100% {
text-shadow:
0 0 20px #fff,
0 0 30px var(--glow-color-secondary),
0 0 40px var(--glow-color-secondary),
0 0 50px var(--glow-color-secondary),
0 0 60px var(--glow-color-secondary),
0 0 70px var(--glow-color-secondary),
0 0 80px var(--glow-color-secondary);
}
}
.glowing-box {
position: relative;
width: clamp(200px, 40vw, 400px);
aspect-ratio: 1.618;
background: rgba(255, 255, 255, 0.05);
border-radius: 15px;
margin-top: 5vh;
display: flex;
justify-content: center;
align-items: center;
overflow: hidden;
}
.glowing-box::before {
content: '';
position: absolute;
width: 200%;
height: 200%;
background: conic-gradient(
transparent,
var(--glow-color-primary),
var(--glow-color-secondary),
transparent 30%
);
animation: rotate-glow 5s linear infinite;
}
.glowing-box::after {
content: '';
position: absolute;
inset: 6px;
background: #090a0f;
border-radius: 10px;
}
.glowing-box span {
z-index: 1;
color: #ccc;
font-size: clamp(1rem, 3vw, 1.5rem);
}
@keyframes rotate-glow {
from {
transform: rotate(0deg);
}
to {
transform: rotate(360deg);
}
}
</style>
:root {
--glow-color-primary: hsl(186, 100%, 50%);
--glow-color-secondary: hsl(320, 100%, 50%);
}
html, body {
height: 100%;
width: 100%;
margin: 0;
padding: 0;
overflow: hidden;
}
body {
display: flex;
justify-content: center;
align-items: center;
font-family: 'Exo 2', sans-serif;
background-color: #000;
background-image: radial-gradient(ellipse at center, #1b2735 0%, #090a0f 100%);
}
.container {
text-align: center;
}
.glowing-text {
color: #fff;
font-size: clamp(3rem, 15vw, 10rem);
font-weight: 700;
text-transform: uppercase;
letter-spacing: 0.1em;
cursor: default;
user-select: none;
/* The core animation */
animation: glow-animation 3s ease-in-out infinite alternate;
}
@keyframes glow-animation {
0% {
text-shadow:
0 0 10px #fff,
0 0 20px var(--glow-color-primary),
0 0 30px var(--glow-color-primary),
0 0 40px var(--glow-color-primary),
0 0 50px var(--glow-color-primary),
0 0 60px var(--glow-color-primary),
0 0 70px var(--glow-color-primary);
}
100% {
text-shadow:
0 0 20px #fff,
0 0 30px var(--glow-color-secondary),
0 0 40px var(--glow-color-secondary),
0 0 50px var(--glow-color-secondary),
0 0 60px var(--glow-color-secondary),
0 0 70px var(--glow-color-secondary),
0 0 80px var(--glow-color-secondary);
}
}
.glowing-box {
position: relative;
width: clamp(200px, 40vw, 400px);
aspect-ratio: 1.618;
background: rgba(255, 255, 255, 0.05);
border-radius: 15px;
margin-top: 5vh;
display: flex;
justify-content: center;
align-items: center;
overflow: hidden;
}
.glowing-box::before {
content: '';
position: absolute;
width: 200%;
height: 200%;
background: conic-gradient(
transparent,
var(--glow-color-primary),
var(--glow-color-secondary),
transparent 30%
);
animation: rotate-glow 5s linear infinite;
}
.glowing-box::after {
content: '';
position: absolute;
inset: 6px;
background: #090a0f;
border-radius: 10px;
}
.glowing-box span {
z-index: 1;
color: #ccc;
font-size: clamp(1rem, 3vw, 1.5rem);
}
@keyframes rotate-glow {
from {
transform: rotate(0deg);
}
to {
transform: rotate(360deg);
}
}
</style>