This isn't science fiction, but it's kind of "fantasy" in a way.
It's about some girl who gets sent to/starts to attend some sort of fancy boarding school or something like that. I know she falls for a classmate and they sneak out on a sort of a date, even though they're not allowed. I remember that the plot of the book had something to do with a strange coin or medallion being found, whereupon classmates start disappearing. It ends up that these classmates are dying/are already dead (I can't remember) and I think are passing on to the afterlife. The female main character eventually figures this all out in like the last 50 pages of the book, and she encounters whoever is in charge, maybe of the River Styx.
I think she argues with him while coming to terms that he controls the River Styx, and that she's been dead the whole time or something like that. It came out in the last five years, and was certainly a young adult novel. I remember lots of people liking it but being frustrated that the entire novel basically happens in the last 50 pages; the rest is build-up. I think the cover was purple, with silhouettes.
Someone help, I want to read it again or at least remember the name or author to find it. Thanks!