ChandimaPrabath's picture
update
0527ba9
raw
history blame
3.96 kB
.film-card {
box-sizing: border-box;
width: 220px;
height: 390px;
border: 1px solid #333;
background-color: #2c2c2c;
border-radius: 15px;
overflow: hidden;
box-shadow: 0 6px 12px rgba(0, 0, 0, 0.5);
transition: background-color 0.3s ease;
display: flex;
flex-direction: column;
justify-content: space-between;
margin: 10px;
position: relative;
}
.film-card:hover {
background-color: #1e1e1e;
}
.film-card-image {
width: 100%;
object-fit: cover;
border-bottom: 3px solid #f8b525;
transition: transform 0.5s ease;
position: relative;
z-index: 1;
}
.film-card:hover .film-card-image {
transform: scale(1.1);
}
.film-card-overlay {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: linear-gradient(to bottom, rgba(18, 36, 65, 0) 0%, rgba(2, 12, 30, 0.658) 80%);
opacity: .6;
transition: opacity 0.3s ease;
z-index: 2;
}
.film-card:hover .film-card-overlay {
opacity: 1;
}
.film-card-info {
height: 100%;
padding: 10px;
background-color: rgba(0, 0, 0, 0.807);
border-top: 1px solid #333;
z-index: 3;
position: relative;
}
@import url('https://fonts.googleapis.com/css2?family=Calistoga&family=Pacifico&family=Rubik+Burned&family=Rubik+Marker+Hatch&family=Rubik+Maze&family=Rubik+Microbe&family=Rubik:ital,wght@0,300..900;1,300..900&family=Signika:[email protected]&display=swap');
.film-card-title {
margin: 0;
font-family: "Signika", sans-serif;
font-optical-sizing: auto;
font-style: normal;
font-variation-settings:
"GRAD" 0;
font-weight: 600;
color: #f5f5f5;
width: 100%;
box-sizing: border-box;
text-align: center;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.film-card-year {
margin: 0;
font-size: .9em;
font-family: "Signika", sans-serif;
font-optical-sizing: auto;
font-style: normal;
font-variation-settings:
"GRAD" 0;
font-weight: 600;
color: #949494;
border: none;
width: 100%;
box-sizing: border-box;
text-align: center;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.spinner {
display: flex;
justify-content: center;
align-items: center;
margin: auto;
}
.spinner div {
width: 15px;
height: 15px;
background-color: #ff8c00;
border-radius: 50%;
animation: spin 1s infinite ease-in-out;
margin: 0 5px;
}
.spinner div:nth-child(1) {
animation-delay: -0.32s;
}
.spinner div:nth-child(2) {
animation-delay: -0.16s;
}
@keyframes spin {
0%, 100% {
transform: translateY(0);
}
50% {
transform: translateY(-20px);
}
}
.film-card.loading {
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
text-align: center;
background-color: #2c2c2c;
border: 1px solid #333;
border-radius: 15px;
padding: 20px;
box-shadow: 0 6px 12px rgba(0, 0, 0, 0.5);
width: 250px;
height: 420px;
position: relative;
}
.film-card.loading::before {
content: '';
position: absolute;
top: 0;
left: 0;
width: 250px;
height: 420px;
background: rgba(0, 0, 0, 0.5);
border-radius: 15px;
z-index: 1;
}
.film-card.loading .spinner {
margin-bottom: 20px;
}
.film-card.loading .film-card-title {
font-size: 1em;
color: #f5f5f5;
width: 100%;
text-align: center;
z-index: 2;
margin-top: 10px;
}
/* Media Queries for Mobile Devices */
@media (max-width: 768px) {
.film-card {
width: 150px;
height: 265px;
margin: 10px 0;
}
.film-card.loading{
width: 150px;
height: 265px;
margin: 10px 0;
}
.film-card-info {
padding: 5px;
}
.film-card-title, .film-card-year {
font-size: 0.8em;
}
}