The girl, now 17, was only 12 when Katie, 18, was stabbed to death in June 1992, Winchester Crown Court was told.
Katie, who had spent the last evening of her life at a nightclub in Camberley, Surrey, was found with 29 stab wounds in a street in Farnborough, Hampshire, the court heard.
The girl, who for legal reasons cannot be named, denies murder.
Yesterday Stewart Jones QC, for the prosecution, read from the girl's diaries of 1994, 1995 and 1996. "She is constantly preoccupied with the whole question of Katie, as all these writ- ings will demonstrate," he said.
A diary entry from 13 January, 1995, said: "Remember KR. Oh God, she did get me going, so hot, pity really.
"I think about it and my head is spinning, but against the cops I'm winning."
An entry from 7 March, 1995 said: "I bet she's all bone and maggots by now. She shouldn't have tested."
In another entry she wrote: "I believe in pain as the mirror of the extreme perfection of man's ability, the sublimation of the ego, the resurrection of the animal, the supreme animal, that's why she had to be killed."
Another entry said: "If only I could kill you again, I promise I'd make you suffer more, you slag. Your terrified screams turn me on."
An entry for 4 July said: "Death by knife wounds and sex go together, they both take you, and all women should be taken."
Another entry said: "I enjoyed putting the blade up her. It made me feel powerful. I had to overcome her serenity, her security, she needed to be raped."
An entry in November 1995 said: "Last night it occurred to me, that killing her did me good. I know what I'm capable of, and will do it again."
On 7 December, the diary entry said: "Two-and-a-half years today, I put that slag in the ground." Mr Jones said that by then it was actually three- and-a-half years.
Mr Jones said the attack on Katie must have been frenzied. The victim's heart, lungs, liver and stomach were cut and penetrated time and time again and there were also stab wounds to the victim's genitals.
Mr Jones said the killing remained a mystery until the early part of 1996 when police in- terviewed the accused, who proceeded in a series of interviews to admit she had stabbed Katie to death. At the time police went to see her, she was in custody in a young offenders' institution, he said.
Mr Jones said: "It is the appalling truth that this young girl ... did in fact kill Katie Rackliff, was haunted by it since, or alternatively has exulted about it, even going so far as to mention sexual pleasure she had gained from it at the time."