HoldTheButton/styles.css

239 lines
No EOL
4.6 KiB
CSS

/* reset some default browser styles */
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
/* main page styles */
body {
font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
min-height: 100vh;
display: flex;
align-items: center;
justify-content: center;
background: #0f172a;
position: relative;
overflow: hidden;
}
/* particles container */
#particles-js {
position: absolute;
width: 100%;
height: 100%;
top: 0;
left: 0;
z-index: 1;
opacity: 0.3;
}
/* center everything */
.container {
text-align: center;
padding: 2rem;
position: relative;
z-index: 2;
max-width: 800px;
width: 90%;
background: rgba(30, 41, 59, 0.7);
backdrop-filter: blur(20px);
border-radius: 24px;
border: 1px solid rgba(255, 255, 255, 0.1);
box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}
/* make the title look nice and fade in */
.title {
font-size: 4rem;
margin-bottom: 2rem;
color: #fff;
font-weight: 800;
background: linear-gradient(135deg, #60a5fa, #c084fc);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
opacity: 0;
animation: fadeIn 1s ease forwards;
letter-spacing: -0.02em;
}
/* message container styling */
.message-container {
background: rgba(255, 255, 255, 0.05);
padding: 1.5rem;
border-radius: 16px;
margin-bottom: 2rem;
transition: all 0.3s ease;
border: 1px solid rgba(255, 255, 255, 0.1);
}
.message {
font-size: 1.5rem;
color: #e2e8f0;
display: inline-block;
transition: all 0.3s ease;
font-weight: 500;
}
/* timer container styling */
.timer-container {
margin-bottom: 2rem;
padding: 1rem;
background: rgba(255, 255, 255, 0.05);
border-radius: 16px;
border: 1px solid rgba(255, 255, 255, 0.1);
}
.timer {
font-size: 4rem;
font-weight: 700;
color: #60a5fa;
text-shadow: 0 0 20px rgba(96, 165, 250, 0.3);
font-variant-numeric: tabular-nums;
}
/* hold button styling */
.hold-button {
background: linear-gradient(135deg, #60a5fa, #c084fc);
border: none;
padding: 2rem 4rem;
font-size: 2rem;
color: white;
border-radius: 16px;
cursor: pointer;
transition: all 0.3s ease;
font-weight: 600;
box-shadow: 0 0 30px rgba(96, 165, 250, 0.3);
margin-bottom: 2rem;
width: 100%;
max-width: 400px;
position: relative;
overflow: hidden;
}
.hold-button::before {
content: '';
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: linear-gradient(135deg, #c084fc, #60a5fa);
opacity: 0;
transition: opacity 0.3s ease;
z-index: 1;
}
.hold-button:hover::before {
opacity: 1;
}
.hold-button:hover {
transform: translateY(-2px);
box-shadow: 0 0 40px rgba(96, 165, 250, 0.4);
}
.hold-button:active {
transform: translateY(0);
box-shadow: 0 0 20px rgba(96, 165, 250, 0.2);
}
.hold-button span {
position: relative;
z-index: 2;
color: white;
text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}
/* result container styling */
.result-container {
background: rgba(255, 255, 255, 0.05);
padding: 1.5rem;
border-radius: 16px;
margin-bottom: 2rem;
opacity: 0;
transform: translateY(20px);
transition: all 0.3s ease;
border: 1px solid rgba(255, 255, 255, 0.1);
}
.result-container.show {
opacity: 1;
transform: translateY(0);
}
.result {
font-size: 1.5rem;
color: #e2e8f0;
font-weight: 500;
}
/* footer styling */
.footer {
margin-top: 2rem;
padding-top: 2rem;
border-top: 1px solid rgba(255, 255, 255, 0.1);
}
.website {
color: #94a3b8;
font-size: 1rem;
font-weight: 500;
}
/* fade in animation for the title */
@keyframes fadeIn {
from {
opacity: 0;
transform: translateY(-20px);
}
to {
opacity: 1;
transform: translateY(0);
}
}
/* message change animation */
@keyframes messageChange {
0% {
transform: scale(1);
opacity: 1;
}
50% {
transform: scale(1.05);
opacity: 0.5;
}
100% {
transform: scale(1);
opacity: 1;
}
}
.message.changed {
animation: messageChange 0.3s ease;
}
/* Responsive styles */
@media (max-width: 768px) {
.container {
padding: 1.5rem;
}
.title {
font-size: 2.5rem;
margin-bottom: 1.5rem;
}
.message {
font-size: 1.2rem;
}
.timer {
font-size: 3rem;
}
.hold-button {
padding: 1.5rem 3rem;
font-size: 1.5rem;
}
}