@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@100..900&display=swap');

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

a {
    text-decoration: none;
    color: inherit;
}

html {
    color-scheme: dark light;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    text-wrap: balance;
}

p {
    text-wrap: pretty;
}

img,
picture,
video,
canvas,
svg {
    display: block;
    max-width: 100%;
    height: auto;
}

body {
    min-height: 100vh;
    line-height: 1.5;
    background: var(--main-bg);
    font-size: var(--fs-general);
    font-family: var(--ff-outfit);
    display: grid;
    place-items: center;
}

:root {
    /* Primary*/
    --color-blue: hsl(215, 51%, 70%);
    --color-cyan: hsl(178, 100%, 50%);
    /* Neutral */
    --main-bg: hsl(217, 54%, 11%);
    --card-bg: hsl(216, 50%, 16%);
    --line: hsl(215, 32%, 27%);
    --white: hsl(0, 0%, 100%);
    /* Body Font */
    --fs-general: 18px;
    --ff-outfit: "Outfit", sans-serif;
    /* Font */
    --fw-300: 300;
    --fw-400: 400;
    --fw-600: 600;
}

.card-container {
    display: grid;
    place-items: center;
    padding: clamp(3.125rem, 4vw, 6.25rem);

    .card-nft {
        box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25);
        background: var(--card-bg);
        padding: clamp(1rem, 3.5vw, 1.625rem);
        border-radius: 1.25rem;
        width: min(100%, 21.875rem);

        .image-wrapper {
            position: relative;
            border-radius: 0.5rem;
            overflow: hidden;
            cursor: pointer;
            display: grid;
            place-content: center;

            .img-nft {
                width: 100%;
            }
        }

        .image-wrapper::before {
            content: '';
            position: absolute;
            inset: 0;
            background-color: hsla(178, 100%, 50%, 0.5);
            opacity: 0;
            transition: opacity 0.3s ease;
            z-index: 1;
        }

        .image-wrapper::after {
            content: url(../09-nft-preview-card/images/icon-view.svg);
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%) scale(0.5);
            opacity: 0;
            transition: opacity 0.3s ease, transform 0.3s ease-out;
            z-index: 2;
        }

        .image-wrapper:hover::before {
            opacity: 1;
        }

        .image-wrapper:hover::after {
            opacity: 1;
            transform: translate(-50%, -50%) scale(1);
        }

        .info-nft {
            display: flex;
            flex-direction: column;
            align-items: flex-start;
            gap: 1rem;
            margin: 1.375rem 0;

            .name-nft {
                font-size: 1.5rem;
                font-weight: var(--fw-600);
                color: var(--white);
                cursor: pointer;

                &:hover {
                    color: var(--color-cyan);
                }
            }

            .description-nft {
                font-weight: var(--fw-300);
                color: var(--color-blue);
            }
        }

        .price-nft img,
        .expiration-nft img {
            height: 16px;
            width: auto;
        }

        .buy-nft {
            display: flex;
            width: 100%;
            align-items: center;
            justify-content: space-between;

            .price-nft,
            .expiration-nft {
                display: flex;
                align-items: center;
                gap: .4375rem;
                font-size: 1rem;
            }

            .price-nft {
                color: var(--color-cyan);
            }

            .expiration-nft {
                color: var(--color-blue);
            }
        }

        .line {
            width: 100%;
            height: 1px;
            background-color: var(--line);
            margin: 22px 0;
        }

        .author-nft {
            display: flex;
            align-items: center;
            gap: 1rem;
            margin-bottom: 0.75rem;

            .img-avatar {
                width: min(100%, 1.875rem);
                border: 1px solid white;
                border-radius: 100%;
            }

            .by-nft {
                color: var(--color-blue);
                font-size: 1rem;
                font-weight: var(--fw-300);

                .highlight {
                    color: var(--white);
                    cursor: pointer;

                    &:hover {
                        color: var(--color-cyan);
                    }
                }
            }
        }
    }
}