* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
display: flex;
justify-content: center;
align-items: center;
min-height: 100vh;
background: #5c00ac;
font-family: 'Arial', sans-serif;
}
.button-container {
display: flex;
gap: 20px;
}
.flip-button {
position: relative;
display: inline-block;
padding: 15px 40px;
font-size: 20px;
color: white;
text-transform: uppercase;
background: #3498db;
border-radius: 10px;
border: 2px solid #fff;
text-decoration: none;
overflow: hidden;
transition: transform 0.6s ease, background 0.3s ease;
perspective: 1000px;
}
.flip-button:hover {
background: #2ecc71;
transform: rotateY(180deg);
}
.flip-button::before {
content: '';
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: rgba(255, 255, 255, 0.2);
transform: translateY(-100%);
transition: transform 0.3s ease;
}
.flip-button:hover::before {
transform: translateY(0);
}
@keyframes flipAnimation {
0% {
transform: rotateY(0deg);
}
100% {
transform: rotateY(180deg);
}
}
.flip-button:hover {
animation: flipAnimation 0.6s forwards;
}
@media (max-width: 768px) {
.flip-button {
font-size: 16px;
padding: 12px 30px;
}
}