body {
    overflow: hidden;
    background: #000;
    text-align: center;
    width: 100%;
    min-height: 100vh;
    color: white;
    overflow-x: hidden;
    position: relative;
    isolation: isolate;
}

/* Full-viewport cyan glow layer (prevents hard cutoff) */
/* Default: cyan glow */
body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: -1;
}

/* Cyan glow */
body.glow-cyan::before {
    background:
        radial-gradient(circle at 50% 38%, rgba(0,255,255,0.18) 0%, rgba(0,255,255,0.08) 20%, rgba(0,255,255,0.03) 35%, rgba(0,0,0,0) 60%),
        linear-gradient(to bottom, rgba(5,7,10,0.9) 0%, rgba(4,4,4,0.95) 50%, rgba(0,0,0,1) 100%);
}

/* Red glow (lost > 3) */
body.glow-red::before {
    background:
        radial-gradient(circle at 50% 38%, rgba(255,0,0,0.28) 0%, rgba(255,0,0,0.14) 20%, rgba(255,0,0,0.06) 35%, rgba(0,0,0,0) 60%),
        linear-gradient(to bottom, rgba(10,5,5,0.9) 0%, rgba(5,4,4,0.95) 50%, rgba(0,0,0,1) 100%) !important;
}

/* Purple glow (else) */
body.glow-purple::before {
    background:
        radial-gradient(circle at 50% 38%, rgba(170,0,255,0.22) 0%, rgba(170,0,255,0.10) 20%, rgba(170,0,255,0.04) 35%, rgba(0,0,0,0) 60%),
        linear-gradient(to bottom, rgba(8,5,10,0.9) 0%, rgba(5,4,5,0.95) 50%, rgba(0,0,0,1) 100%);
}

.ptable {
    width: 600px;
    margin-left: auto;
    margin-right: auto;
    font-family: Verdana;
    font-size: 19px;
    position: relative;
    z-index: 1;
}

.candleth {
    vertical-align: bottom;
}

.parent {
    text-align: center;
    width: 95%;
    margin: auto;
    position: relative;
    z-index: 1;
}

#thgrave {
    position: relative;
}

#player_box {
    position: absolute;
    left: 200px;
    top: 174px;
    width: 0;
    height: 0;
}

.essential_audio {
    position: absolute;
    left: 0;
    top: 0;
    z-index: 10;
}

#day, #dead, #alive {
    color: white;
}

.search {
    width: 250px;
    margin-left: auto;
    margin-right: auto;
    font-family: Verdana;
    font-size: 15px;
    position: relative;
    z-index: 1;
}

input[type=text] {
    border: 2px solid #aaa;
    border-radius: 4px;
    margin: 3px 0;
    outline: none;
    padding: 2px;
    box-sizing: border-box;
    transition: .3s;
}

input[type=text]:focus {
    border-color: rgb(56, 67, 211);
    box-shadow: 0 0 18px 0 rgb(30, 8, 197);
}

#button {
    background-color: black;
    border: 1px solid white;
    color: white;
    padding: 3px 6px;
    text-align: center;
    font-size: 12px;
    border-radius: 20px;
}

#button:hover {
    background-color: rgb(60, 61, 74);
}

.laurence img {
    text-align: center;
    width: 90%;
    height: auto;
}

a:link {
    text-decoration: none;
    color: white;
    font-size: 22px;
}

a:visited {
    color: white;
}

a:hover {
    color: rgb(56, 67, 211);
}

#dead a:hover {
    color: red;
    text-shadow: 0 0 10px red;
}

.name {
    position: absolute;
    font-size: 20px;
    color: #00FFFF;
    text-shadow: 0 0 5px rgba(0, 255, 255, 0.8), 0 0 15px rgba(0, 255, 255, 0.5);
    opacity: 0;
    animation: appear 2.8s ease-out;
    pointer-events: none;
}

/* Red names */
body.glow-red .name {
    color: #ff4444 !important;
    text-shadow: 0 0 6px rgba(255, 0, 0, 1), 0 0 18px rgba(255, 0, 0, 0.85) !important;
}

/* Purple names */
body.glow-purple .name {
    color: #d78cff !important;
    text-shadow: 0 0 6px rgba(190, 80, 255, 1), 0 0 18px rgba(170, 0, 255, 0.85) !important;
}

.sparkle {
    position: absolute;
    width: 6px;
    height: 6px;
    background-color: #00FFFF;
    border-radius: 50%;
    box-shadow: 0 0 6px rgba(0, 255, 255, 0.9);
    animation: sparkle 1.5s ease-out;
    opacity: 0;
    pointer-events: none;
}

/* Red sparkles */
body.glow-red .sparkle {
    background-color: #ff4444 !important;
    box-shadow: 0 0 8px rgba(255, 0, 0, 1) !important;
}

/* Purple sparkles */
body.glow-purple .sparkle {
    background-color: #c070ff;
    box-shadow: 0 0 6px rgba(170, 0, 255, 0.9);
}

@keyframes appear {
    0% { opacity: 0; transform: scale(0.5) rotate(0deg); }
    50% { opacity: 1; transform: scale(1) rotate(var(--rotation)); }
    100% { opacity: 0; transform: scale(1.2) rotate(var(--rotation)); }
}

@keyframes sparkle {
    0% { transform: scale(0.5); opacity: 0.8; }
    50% { transform: scale(1.5); opacity: 1; }
    100% { transform: scale(0.2); opacity: 0; }
}

@media only screen and (max-width: 767px) {
    .ptable {
        width: 300px;
    }

    .search {
        font-size: 13px;
    }

    #graveimg {
        width: 150px;
    }

    #candleimg1, #candleimg2 {
        width: 30px;
    }

    #player_box {
        position: absolute;
        left: 88px;
        top: 88px;
        width: 0;
        height: 0;
    }

    .essential_audio {
        position: absolute;
        left: 0;
        top: 0;
        width: 10px;
    }

    #dead {
        font-size: 18px;
    }

    #day, #alive {
        font-size: 13px;
    }
}
