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

body {
    background-color: #000000;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    font-family: 'DM Mono', monospace;
}

.back-button {
    display: block;
    margin: 4rem auto;
    background-color: white;
    color: black;
    padding: 0.8rem 2rem;
    border: none;
    border-radius: 9999px;
    cursor: pointer;
    font-weight: 700;
    font-size: 1rem;
    text-decoration: none;
    width: fit-content;
    position: relative;
    z-index: 10;
}

.main-title {
    color: white;
    text-align: center;
    font-size: 2.5rem;
    font-weight: 600;
    margin: 4rem 0 4rem;
    letter-spacing: 2px;
    position: relative;
}

@import url('https://fonts.googleapis.com/css2?family=DM+Mono:wght@600&display=swap');

.grid-container {
    display: flex;
    width: 100%;
    height: 100vh;
}

.grid-item {
    flex: 1;
    min-height: 100vh;
    background-color: #000000;
    display: flex;
    flex-direction: column;
    border-right: 0.5px solid rgba(255, 255, 255, 0.3);
    align-items: center;
    justify-content: center;
    padding: 2rem;
    color: white;
    transition: background-color 0.3s ease;
}

.grid-item:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.grid-item:hover .device-image {
    animation: floatUp 1s ease forwards;
}

.grid-item:not(:hover) .device-image {
    animation: floatDown 1s ease forwards;
}

@keyframes floatUp {
    0% { transform: translateY(0); }
    100% { transform: translateY(-20px); }
}

@keyframes floatDown {
    0% { transform: translateY(-20px); }
    100% { transform: translateY(0); }
}

.device-image {
    width: 60%;
    max-width: 250px;
    height: 250px;
    object-fit: contain;
    margin-bottom: 10px;
}

.device-title {
    font-size: 1.2rem;
    font-weight: 600;
    text-align: center;
    white-space: nowrap;
    margin-bottom: 10px;
}

.item-description {
    text-align: center;
    font-size: 0.9rem;
    opacity: 0.8;
    margin-bottom: 25px;
}

.select-button {
    background-color: white;
    color: black;
    padding: 0.8rem 2rem;
    border: none;
    border-radius: 9999px;
    cursor: pointer;
    font-weight: 700;
    font-size: 1rem;
}

@media (max-width: 768px) {
    .grid-container {
        flex-direction: column;
        height: auto;
        min-height: 100vh;
    }

    .grid-item {
        min-height: 60vh;
        border-right: none;
        border-bottom: 0.5px solid rgba(255, 255, 255, 0.3);
        opacity: 0.5;
        transition: opacity 0.3s ease;
    }

    .grid-item:last-child {
        border-bottom: none;
    }

    .grid-item.in-viewport {
        opacity: 1;
        background-color: rgba(255, 255, 255, 0.1);
    }

    .grid-item.in-viewport .device-image {
        animation: floatUp 1s ease forwards;
    }

    .device-image {
        width: 50%;
        height: 200px;
    }
}
