-
Notifications
You must be signed in to change notification settings - Fork 16
/
Copy pathcard.css
139 lines (119 loc) · 2.38 KB
/
card.css
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
.card-container {
margin-top: 20px; /* Add separation from the filter */
display: flex; /* Keep flex layout for cards */
flex-wrap: wrap; /* Ensure cards wrap respons-content: flex-start; /* Align cards to the left */
position: relative; /* Prevent overlap or positioning issues */
z-index: 1;
}
.card {
width: calc(16.66% - 14px);
margin: 0 7px 14px;
background: #2a2c31;
border-radius: 8px;
overflow: hidden;
box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
transition: transform 0.2s;
}
.card:hover {
transform: translateY(-5px);
}
.poster {
position: relative;
width: 100%;
padding-bottom: 130%;
overflow: hidden;
}
.image {
position: absolute;
width: 100%;
height: 100%;
object-fit: cover;
top: 0;
left: 0;
}
.overlay {
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
background-color: rgba(0, 0, 0, 0.5);
opacity: 0;
transition: opacity 0.3s ease;
}
.poster:hover .overlay {
opacity: 1;
}
.info-left, .info-right {
position: absolute;
bottom: 10px;
z-index: 3;
}
.info-left {
left: 10px;
}
.info-right {
right: 10px;
}
.btn, .btn-episode {
font-size: 12px;
font-family: Arial, sans-serif;
font-weight: 600;
padding: 4px 8px;
border-radius: 5px;
background: #fff;
color: #111;
margin-right: 4px;
transition: background 0.3s;
}
.btn:hover, .btn-episode:hover {
background: #e0e0e0;
}
.btn-episode {
background: #7bfcfc;
}
.details {
color: #aaa;
font-size: 12px;
padding: 10px;
border-radius: 0 0 10px 10px;
}
.name {
color: #fff;
font-size: 14px;
margin: 0;
font-weight: 500;
margin-bottom: 8px;
line-height: 1.3em;
}
/* Play button styling */
.play-button {
position: absolute;
width: 40px; /* Adjust size as needed */
height: 40px; /* Adjust size as needed */
left: 50%;
top: 50%;
transform: translate(-50%, -50%);
opacity: 0; /* Hide initially */
transition: opacity 0.5s;
}
.overlay:hover .play-button {
opacity: 1; /* Show on hover */
}
/* Responsive styles */
@media (max-width: 1024px) {
.card {
width: calc(25% - 14px);
}
}
@media (max-width: 760px) {
.card {
width: calc(33% - 14px);
}
}
@media (max-width: 480px) {
.card {
width: calc(50% - 6px);
margin: 0 3px 6px;
}
}