* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    background-color: #1E1E1E;
    padding: 2rem;
}

header {
    text-align: center;
    position: relative;
}

.logo img {
    width: 300px;
    margin: 0 auto;
}

.top-controls {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 1rem;
}

.top-controls input,
.top-controls button {
    padding: 0.5rem;
    border-radius: 8px;
    border: none;
    font-size: 1rem;
    cursor: pointer;
    background-color: #2A2A2A;
    color: #fff;
    outline: none;
}

.heart-icon {
    position: absolute;
    right: 2rem;
    top: 1rem;
    font-size: 2rem;
    cursor: pointer;
}

main {
    margin-top: 2rem;
}

.container {
    max-width: 1500px;
    margin: 0 auto;
    width: 100%;
    display: flex;
}

.card-grid {
    padding-top: 2rem;
    width: 1500px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 5rem;
    color: #fff;
}

.card {
    overflow: visible;
    width: 307px;
    height: 423px;
}

.content {
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
    transition: transform 300ms;
    box-shadow: 0px 0px 10px 1px #000000ee;
    border-radius: 5px;
}

.front,
.back {
    background-color: #2A2A2A;
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    border-radius: 5px;
    overflow: hidden;
}

.back {
    width: 100%;
    height: 100%;
    justify-content: center;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.back::before {
    position: absolute;
    content: ' ';
    display: block;
    width: 160px;
    height: 160%;
    background: linear-gradient(90deg, transparent, #ff9966, #ff9966, #ff9966, #ff9966, transparent);
    animation: rotation_481 5000ms infinite linear;
}

.back-content {
    position: absolute;
    width: 99%;
    height: 99%;
    background-color: #151515;
    border-radius: 5px;
    color: white;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 30px;
}

.card:hover .content {
    transform: rotateY(180deg);
}

@keyframes rotation_481 {
    0% {
        transform: rotateZ(0deg);
    }
    0% {
        transform: rotateZ(360deg);
    }
}

.front {
    transform: rotateY(180deg);
    color: white;
}

.front .front-content {
    position: absolute;
    width: 100%;
    height: 100%;
    padding: 10px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.front-content .badge {
    background-color: #00000055;
    padding: 2px 10px;
    border-radius: 10px;
    backdrop-filter: blur(2px);
    width: fit-content;
}

.description {
    box-shadow: 0px 0px 10px 5px #00000088;
    width: 100%;
    padding: 10px;
    background-color: #00000099;
    backdrop-filter: blur(5px);
    border-radius: 5px;
}

.title {
    font-size: 11px;
    max-width: 100%;
    display: flex;
    justify-content: space-between;
}

.title p {
    width: 50%;
}

.card-footer {
    color: #ffffff88;
    margin-top: 5px;
    font-size: 8px;
}

.front .img {
    position: absolute;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

@keyframes floating {
    0% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(10px);
    }
    100% {
        transform: translateY(0px);
    }
}

.like {
    cursor: pointer;
    background: none;
    border: none;
}

#filter {
    padding: 0.5rem;
    border-radius: 8px;
    border: none;
    font-size: 1rem;
    cursor: pointer;
    background-color: #2A2A2A;
    color: #fff;
}

@media(max-width: 768px) {
    .card-grid {
        align-items: center;
    }
    .card {
        width: 100%;
        max-width: 300px;
    }
}
@media (max-width: 600px) {

header {
        padding: 1rem;
    }
    .logo img {
        width: 200px;
    }
    .top-controls {
        flex-direction: column;
        gap: 0.5rem;
    }
    .top-controls input,
    .top-controls button {
        width: 100%;
    }
    .card-grid {
        width: 100%;
        padding-top: 1rem;
    }
    .card {
        width: 100%;
        max-width: 280px;
    }   
    
}