body {
    background-color: #04040d;
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    font-family: "Red Hat Display", sans-serif;
    overflow: hidden;
    margin: 0;
}

.card {
    background: #07071a;
    padding: 35px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 35px;
    transition: transform 0.2s ease-out, opacity 0.2s ease-out;
}

/* When popup is open, card shrinks slightly and becomes unclickable */
.card-dim {
    transform: scale(0.95);
    opacity: 0.4;
    pointer-events: none;
}

.profile-pic {
    width: 150px;
    border-radius: 2px;
}

.info {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 10px;
    margin-right: 80px;
}

.icons {
    display: flex;
    gap: 15px;
}

.icons a {
    color: white;
    font-size: 30px;
    transition: transform 0.2s;
}

.icons a:hover {
    color: #53bda7;
    transform: translateY(-3px);
}

.name-link {
    cursor: pointer;
}

/* E621 Icon */
.e621-icon img {
    width: 32px;
    height: 32px;
    filter: brightness(0) invert(1);
    transition: filter 0.2s;
}

.e621-icon:hover img {
    filter: invert(71%) sepia(18%) saturate(960%) hue-rotate(117deg) brightness(91%) contrast(85%);
}

/* Popup Overlay */
.popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(4, 4, 13, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    
    /* The Fix for Lag: */
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.15s linear, visibility 0.15s linear;
}

.popup.show {
    opacity: 1;
    visibility: visible;
}

.popup-content {
    background: #07071a;
    padding: 30px;
    border-radius: 10px;
    text-align: center;
    width: 400px;
    max-width: 85%;
    transform: scale(0.8);
    transition: transform 0.15s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.popup.show .popup-content {
    transform: scale(1);
}

.popup-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 20px;
}

.popup-buttons button {
    background: #53bda7;
    color: white;
    border: none;
    padding: 12px 25px;
    cursor: pointer;
    border-radius: 5px;
    font-weight: bold;
    flex: 1;
}

.age-warning .popup-content { background: #180606; }
.age-warning .popup-buttons button { background-color: #bd51bd; }

@media screen and (max-width: 768px) {
    .card { flex-direction: column; text-align: center; gap: 15px; }
    .info { margin-right: 0; }
}