Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Buttons styling improved #10

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
158 changes: 118 additions & 40 deletions style.css
Original file line number Diff line number Diff line change
@@ -1,50 +1,128 @@
/* Modern background with gradient overlay */
html {
font-size: 10px;
background: url(background\ \(1\).jpg) bottom center;
background-size: cover;
}
body,html {
margin: 0;
padding: 0;
font-family: sans-serif;
}

font-size: 10px;
background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)),
url(background\ \(1\).jpg) bottom center;
background-size: cover;
min-height: 100vh;
}

body, html {
margin: 0;
padding: 0;
font-family: 'Poppins', sans-serif;
}

.keys {
display: flex;
flex-wrap: wrap;
min-height: 100vh;
align-items: center;
justify-content: center;
gap: 2rem;
padding: 2rem;
}

.key {
border: 0.3rem solid rgba(255, 255, 255, 0.1);
border-radius: 1.5rem;
margin: 0;
font-size: 1.5rem;
padding: 2rem 1rem;
transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
width: 12rem;
text-align: center;
color: white;
background: rgba(255, 255, 255, 0.1);
backdrop-filter: blur(10px);
box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1),
0 2px 4px -1px rgba(0, 0, 0, 0.06);
text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
position: relative;
overflow: hidden;
}

.key::before {
content: '';
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: linear-gradient(
45deg,
rgba(255, 255, 255, 0.1),
rgba(255, 255, 255, 0.05)
);
border-radius: 1.5rem;
}

.key:hover {
transform: translateY(-2px);
box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.2),
0 4px 6px -2px rgba(0, 0, 0, 0.1);
}

.playing {
transform: scale(1.1);
border-color: #ffc600;
box-shadow: 0 0 2rem rgba(255, 198, 0, 0.5),
inset 0 0 2rem rgba(255, 198, 0, 0.3);
background: rgba(255, 198, 0, 0.2);
}

kbd {
display: block;
font-size: 4.8rem;
font-weight: 700;
margin-bottom: 0.5rem;
font-family: 'Montserrat', sans-serif;
position: relative;
}

.sound {
font-size: 1.4rem;
text-transform: uppercase;
letter-spacing: 0.2rem;
color: #ffc600;
font-weight: 600;
opacity: 0.8;
display: block;
margin-top: 0.5rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
.keys {
display: flex;
flex: 1;
min-height: 100vh;
align-items: center;
justify-content: center;
gap: 1rem;
padding: 1rem;
}

.key {
border: .4rem solid black;
border-radius: .5rem;
margin: 1rem;
font-size: 1.5rem;
padding: 1rem .5rem;
transition: all .07s ease;
width: 10rem;
text-align: center;
color: white;
background: rgba(0,0,0,0.4);
text-shadow: 0 0 .5rem black;
}

.playing {
transform: scale(1.1);
border-color: #ffc600;
box-shadow: 0 0 1rem #ffc600;
width: 9rem;
padding: 1.5rem 0.8rem;
}

kbd {
display: block;
font-size: 4rem;
font-size: 3.6rem;
}

.sound {
font-size: 1.2rem;
text-transform: uppercase;
letter-spacing: .1rem;
color: #ffc600;
letter-spacing: 0.1rem;
}
}

/* Animation for key press */
@keyframes ripple {
0% {
box-shadow: 0 0 0 0 rgba(255, 198, 0, 0.3);
}
100% {
box-shadow: 0 0 0 2rem rgba(255, 198, 0, 0);
}
}

.playing {
animation: ripple 0.8s cubic-bezier(0, 0, 0.2, 1);
}