@font-face {
    font-family: 'Legacy';
    src: url(../fonts/legacy.otf);
}

:root {
    --b: white;
    /* container backgrounds */
    --bw: 4px;
    /* border width */
    --bc: #4cd4de;
    /* border color */
    --h: #c9eff2;
    /* header backgrounds */
    --pink: #e74492;
    --bt: solid;
    --color: #000;
    --display: flex;
    --ibw: 4px;
    --font: 'Arial';
    --hfont: 'Legacy';
    --size: 17px;
}

* {
    box-sizing: border-box;
    scrollbar-color: var(--pink) #fff;
    scrollbar-width: thin;
    cursor: url('../images/arrow.png'), pointer;
}

::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-thumb {
    background: var(--pink);
    border: 3.5px var(--bt) #FFFFFF;
    border-radius: 0;
}

::-webkit-scrollbar-track {
    background: #FFFFFF;
    border-radius: 0;
    box-shadow: inset 0 0 0 0 #F0F0F0;
}

::selection {
    background: var(--bc);
    color: white;
}

::-moz-selection {
    background: var(--bc);
    color: white;
}

a:not(:has(img, div, button)) {
    text-decoration: none;
    color: var(--pink);
    text-shadow: rgb(255, 255, 255) 2px 0 0, rgb(255, 255, 255) 1.75517px 0.958851px 0, rgb(255, 255, 255) 1.0806px 1.68294px 0, rgb(255, 255, 255) 0.141474px 1.99499px 0, rgb(255, 255, 255) -0.832294px 1.81859px 0, rgb(255, 255, 255) -1.60229px 1.19694px 0, rgb(255, 255, 255) -1.97999px 0.28224px 0, rgb(255, 255, 255) -1.87291px -0.701566px 0, rgb(255, 255, 255) -1.30729px -1.51361px 0, rgb(255, 255, 255) -0.421592px -1.95506px 0, rgb(255, 255, 255) 0.567324px -1.91785px 0, rgb(255, 255, 255) 1.41734px -1.41108px 0, rgb(255, 255, 255) 1.92034px -0.558831px 0;
    filter: drop-shadow(0 2px var(--bc)) drop-shadow(2px 0 var(--bc)) drop-shadow(0 -2px var(--bc)) drop-shadow(-2px 0 var(--bc));
    transition: 0.3s;
}

a:not(:has(img, div, button)):hover {
    letter-spacing: 3px;
}

p {
    line-height: 110%;
}

summary {
    font-weight: bold;
}

body {
    background-color: white;
    color: #000;
    font-family: var(--font);
    font-size: var(--size);
    line-height: 110%;
    text-align: center;
    margin: 10px;
    animation: fadeEffect 0.5s;
}

.bg {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='100%25' width='100%25'%3E%3Cdefs%3E%3Cpattern id='doodad' width='195' height='195' viewBox='0 0 40 40' patternUnits='userSpaceOnUse' patternTransform='rotate(221)'%3E%3Crect width='100%25' height='100%25' fill='rgba(255, 255, 255, 1)'/%3E%3Cpath d='M19 19h6v6h-6z' fill='rgba(76, 212, 222, 1)'/%3E%3Cpath d='M-10-10h60v60h-60zM1 1v38h38v-38z' fill='rgba(201, 239, 242, 1)'/%3E%3C/pattern%3E%3C/defs%3E%3Crect fill='url(%23doodad)' height='200%25' width='200%25'/%3E%3C/svg%3E");
    background-attachment: fixed;
    position: fixed;
    left: 0;
    top: 0;
    width: 100vw;
    height: 100vh;
    z-index: -999999999999999;
}

@keyframes fadeEffect {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

header {
    color: var(--pink);
    font-family: var(--hfont);
    font-size: 27px;
    letter-spacing: 3px;
    margin-bottom: 10px;
    text-shadow: rgb(255, 255, 255) 2px 0 0, rgb(255, 255, 255) 1.75517px 0.958851px 0, rgb(255, 255, 255) 1.0806px 1.68294px 0, rgb(255, 255, 255) 0.141474px 1.99499px 0, rgb(255, 255, 255) -0.832294px 1.81859px 0, rgb(255, 255, 255) -1.60229px 1.19694px 0, rgb(255, 255, 255) -1.97999px 0.28224px 0, rgb(255, 255, 255) -1.87291px -0.701566px 0, rgb(255, 255, 255) -1.30729px -1.51361px 0, rgb(255, 255, 255) -0.421592px -1.95506px 0, rgb(255, 255, 255) 0.567324px -1.91785px 0, rgb(255, 255, 255) 1.41734px -1.41108px 0, rgb(255, 255, 255) 1.92034px -0.558831px 0;
    line-height: 100%;
    text-align: center;
}

#wrapper {
    max-width: 1100px;
    margin: auto;
    animation: fadeEffect 0.5s;
}

#miku {
    display: flex;
    justify-content: right;
    align-items: center;
    text-align: center;
    width: 100%;
    outline: var(--bw) var(--bt) var(--bc);
    border: var(--ibw) solid white;
    background-image: url(../images/header.png);
    background-position: -250% 0%;
    background-repeat: no-repeat;
    background-color: var(--h);
    box-sizing: border-box;
    border-radius: 10px 10px 0 0;
    height: 320px;
    padding: 10px;
}

.virtualdiva img {
    display: block;
    width: 460px;
    max-width: 100%;
    max-height: 100%;
}

.container {
    max-width: 100%;
    display: grid;
    grid-template-columns: 25% 1fr 25%;
    /* Let the rows adjust height automatically */
    grid-template-rows: auto;
    grid-template-areas:
        "links main jukebox";
    gap: 10px;
    outline: var(--bw) var(--bt) var(--bc);
    padding: 10px;
    box-sizing: border-box;
    background: var(--b);
    margin: var(--ibw) 0;
    position: relative;
}

.main {
    grid-area: main;
    z-index: 2;
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
    order: 2;
}

#mainframe {
    border: var(--bw) var(--bt) var(--bc);
    flex-grow: 1;
    width: 100%;
    height: 100%;
    min-height: 500px;
}

.banner img {
    border: var(--bw) var(--bt) var(--bc);
    box-sizing: border-box;
    display: flex;
    justify-content: flex-end;
    align-content: flex-end;
    align-items: flex-end;
    flex-direction: column;
    padding: var(--bw);
    width: 100%;
}

.logo{
    width: 500px;
    max-width: 100%;
    max-height: 100%;
    margin-bottom: 20px;
}

.logo-table{
    max-width: 700px;
}

.profile-list{
    text-align: left;
}

.foot-credit{
    margin-bottom: -5px;
}

.footer {
    outline: var(--bw) var(--bt) var(--bc);
    border: var(--bw) var(--bt) white;
    background-color: var(--h);
    text-align: center;
    padding: 5px;
    position: relative;
    z-index: 1;
}

.title {
    position: sticky;
    border: var(--bw) var(--bt) white;
    border-radius: 8px 8px 0 0;
    background-color: var(--h);
    padding: 10px;
    text-align: center;
}

.links {
    grid-area: links;
    order: 1;
    border: var(--bw) var(--bt) var(--bc);
    border-radius: 10px 10px 0 0;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    padding: 20px;
}

.inner {
    padding: 20px;
    background-color: var(--b);
    border-top: var(--bw) var(--bt) var(--bc);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.inner>table {
    height: 100%;
    width: 100%;
}

.inner>table>tbody {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
}

.inner>table>tbody>tr {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-grow: 1;
}

.inner>table>tbody>tr>td {
    display: flex;
    align-items: center;
    padding: 5px;
}

.inner>table>tbody>tr>td>a {
    line-height: 150%;
    font-size: 1.5rem;
    padding: 10px 20px;
    display: block;
    color: var(--pink);
    transition: color 0.3s;
}

.inner>table>tbody>tr>td>a:hover {
    color: var(--bc);
    text-decoration: underline;
}

.bullet {
    width: 20px;
    height: 20px;
}

.jukebox {
    grid-area: jukebox;
    border: var(--bw) var(--bt) var(--bc);
    border-radius: 10px 10px 0 0;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    order: 3;
    /* Remove fixed height if any */
}

.jukebox .title header {
    margin: 0;
}

.jukebox .inner {
    padding: 0;
}

#musicplayer {
    background-color: var(--b);
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.player-top {
    text-align: center;
    width: 100%;
}

.now-playing {
    background-color: var(--h);
    padding: 20px;
    font-weight: bold;
    font-size: 1.2em;
    margin-bottom: 20px;
}

.track-info {
    background-color: var(--h);
    padding: 20px;
    /* Adjusted padding */
    margin-top: 20px;
    /* Adjusted margin */
    width: 100%;
    box-sizing: border-box;
}

.track-name {
    font-size: 1.5em;
    font-weight: bold;
    margin-top: 10px;
    /* Added margin-top for spacing above */
    margin-bottom: 15px;
    /* Increased margin-bottom for spacing below */
    line-height: 1.4;
    /* Adjusted line-height for better readability */
    text-align: center;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.track-artist {
    font-size: 1.2em;
    margin-bottom: 15px;
    text-align: center;
    line-height: 1.4;
}

.player-controls {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    margin-top: 20px;
}

.seeking {
    display: flex;
    flex-direction: row;
    align-items: center;
    width: 100%;
    margin-top: 20px;
}

.seeking .current-time,
.seeking .total-duration {
    font-size: 1em;
}

.seeking .current-time {
    margin-right: 10px;
}

.seeking .total-duration {
    margin-left: 10px;
}

.controls {
    font-size: 1em;
    text-align: center;
    width: 100%;
    margin-top: 20px;
}

.controls td {
    padding: 10px;
}

.volume {
    display: flex;
    flex-direction: row;
    align-items: center;
    width: 100%;
    margin-top: 20px;
}

.volume .volume-icon {
    margin-right: 10px;
}

.volume i {
    font-size: 1.5em;
}

i.fa-play,
i.fa-pause,
i.fa-forward,
i.fa-backward {
    color: var(--pink);
}

i.fa-play,
i.fa-pause {
    font-size: 1.5em !important;
}

input[type=range] {
    width: 100%;
    background-color: var(--b);
}

input[type=range]:focus {
    outline: none;
}

input[type=range]::-webkit-slider-runnable-track {
    width: 100%;
    height: 4px;
    background: var(--pink);
    border-radius: 1px;
}

input[type=range]::-webkit-slider-thumb {
    -webkit-appearance: none;
    height: 10px;
    width: 10px;
    background: var(--pink);
    margin-top: -4px;
    border-radius: 0;
}

input[type=range]:focus::-webkit-slider-runnable-track {
    background: var(--pink);
}

input[type=range]::-moz-range-track {
    width: 100%;
    height: 4px;
    background: var(--pink);
    border-radius: 1px;
}

input[type=range]::-moz-range-thumb {
    height: 10px;
    width: 10px;
    background: var(--pink);
    border-radius: 0;
}

.lines {
    position: fixed;
    left: 0;
    top: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 999999999999999999999999999999999999999999999999999999999999;
    opacity: 0.05;
}

.lines:before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    background: linear-gradient(to bottom, transparent 50%, rgba(0, 0, 0, 0.5) 51%);
    background-size: 100% 4px;
    will-change: background, background-size;
    animation: scanlines 0.2s linear infinite;
}

@keyframes scanlines {
    from {
        background: linear-gradient(to bottom, transparent 10%, rgba(0, 0, 0, 0.5) 51%);
        background-size: 100% 4px;
    }

    to {
        background: linear-gradient(to bottom, rgba(0, 0, 0, 0.5) 50%, transparent 51%);
        background-size: 100% 4px;
    }
}

ul {
    list-style: none;
    margin: 0;
    line-height: 110%;
}

ul li:before {
    content: "\25A0 ";
    color: var(--pink);
    display: inline-block;
    width: 1.3em;
    margin-left: -1.3em;
}

button,
input[type=submit] {
    border: var(--bw) var(--bt) var(--bc);
    outline: var(--bw) var(--bt) var(--b);
    padding: 8px 8px;
    background-color: var(--h);
    font-family: var(--font);
    font-size: var(--size);
    margin: 0;
    transition: 0.2s;
    color: var(--pink);
    min-width: 84px;
    outline-offset: -8px;
}

button:hover,
input[type=submit]:hover {
    background-color: var(--pink);
    color: white;
    transition: 0.2s;
}

button:disabled,
input[type=submit]:disabled {
    opacity: 50%;
}

iframe {
    color: var(--color);
}

input[type="text"]:focus {
    outline: none;
    box-shadow: none;
    border: none;
    font-family: var(--font);
}

input[type="text"]:focus:hover {
    outline: none;
    box-shadow: none;
    border: none;
    border-radius: 0;
}

input[type="number"] {
    width: 150px;
    padding: 4px;
    color: black;
    border: var(--bw) var(--bt) var(--bc);
    outline: none;
}

.highlight {
    font-weight: bold;
}

form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

@media only screen and (max-width: 1000px) {
    .container {
        display: flex;
        flex-direction: column;
    }

    /* Ensure elements stack correctly */
    .links {
        order: 1;
    }

    .main {
        order: 2;
    }

    .jukebox {
        order: 3;
    }

    /* Adjust heights and other properties */
    #mainframe {
        min-height: 400px;
    }

    /* Hide background image on smaller screens */
    #miku {
        height: fit-content;
        background-image: none;
    }
}