@font-face {
    font-family: 'Montserrat Regular';
    src: url(Montserrat-Regular.ttf) format('truetype');
    font-display: swap;
}

body {
    max-width: 1920px;
    margin: 0 auto;
    background-color: #000;
    background-image: url("images/bg.png");
    color: #ffffff;
    font-family: "Montserrat Regular", Arial;
}

/* Font sizes */
label {font-size: 1.8em;}
h1 {
    font-size: 3em;
    margin: 2rem 0;
}
h2 {font-size: 2em;}
h3 {font-size: 1.5em;}
h4 {font-size: 1.1em;}
h5 {
    margin-top: 0;
    font-size: 0.7em;
}
p {
    font-size: 1em;
    margin: 5px 0;
}
h4 img {
    margin-top: 5px;
    margin-left: 7px;
    margin-bottom: 10px;
}

/* Generic */
.warning {color: red;}
.center {text-align: center;}
.green {color:rgb(30, 215, 96);}

/* Header */
#header {
    padding-top:0.1rem;
    padding-bottom: 1rem;
    margin: 2rem;
    border-radius:5px;
    background-color: #242424;
    color:rgb(30, 215, 96);
}
.headerSection {
    position: relative;
    padding: 0.7rem 0rem;
    margin: 0rem 0.7rem;
    border-radius:5px;
}

/* Inputs */
select, input[type="date"] {font-size:1.4em !important;}
input[type="file"] {display: none;}
.button {
    padding: 0.4rem 0.8rem;
    cursor: pointer;
    border-radius: 20px;
    border: none;
    background-color: rgb(30, 215, 96);
    font-size: 1.8em;
    color: #000;
    transition: background-color 0.3s ease-in-out, padding 0.2s ease-in-out;
}
.button:hover {
    background-color: rgb(20, 190, 80);
    padding: 0.4rem 0.65rem;
}

/* Body generic */
.section {
    padding: 0.5rem 1rem 0.5rem 2rem;
    background-color: #242424;
    margin: 1rem 2rem;
    border-radius:5px;
    position: relative;
}
.section:hover {
    background-color: #262626;
    transition: color 2s ease-in-out, background-color 0.15s ease-in-out;
}
.container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(450px, 1fr));
}

/* Overview */
.itemBox {text-align: center;}
#topSongImage, #topArtistImage {
    width: 12em;
    height: 12em;
    border-radius: 7px;
    object-fit: cover;
}
#imageContainer {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

/* Lists */
ul {padding-left: 0;}
li {
    padding: 5px;
    overflow: hidden;
    color: #ffffff;
    font-size: 1em;
}
li:nth-of-type(odd) {background-color: rgb(48, 49, 48);}

/* Charts */
.barChart {
    margin-right:15px;
    display:grid;
    align-items: end;
    grid-template-columns: repeat(var(--columns), 1fr);
}
.bar {
    margin:0.2vw;
    border-top-left-radius:4px;
    border-top-right-radius:4px;
    background-color: #ffffff;
}
.lineChart {
    margin-right: 15px;
    margin-top: 10px;
    display: grid;
    grid-template-columns: repeat(var(--month-count), 1fr);
}
.point {
    width: 8px;
    height: 8px;
    margin-left: auto;
    margin-right: auto;
    border-radius:50%;
    background-color: #ffffff;
}
.point-line {
    height: 1px;
    width: calc(var(--hyp) * 1px);
    position: absolute;
    left: 50%;
    margin-top: -5px;
    transform: rotate(calc(var(--angle) * 1deg));
    transform-origin: left bottom;
    background-color: #ffffff;
}

#timeDistribution {
    border-bottom:2px solid white;
    height:200px;
}
#ageDistribution {
    border-bottom:2px solid white;
    height:200px;
}
#dateDistribution {
    border-left:2px solid white;
    border-bottom:2px solid white;
    height:200px;
}

/* Loader */
.loader {
    border: 0.3rem solid #f3f3f3;
    border-top: 0.3rem solid #555555;
    border-radius: 50%;
    width: 3rem;
    height: 3rem;
    animation: spin 1.5s linear infinite;
    position: absolute;
    left: 50%;
    top: 50%;
}

/* Footer */
.attribution h5 {
    display:inline-block;
    margin: 1rem 0;
    color: lightgray;
}
.attribution img {
    height: 25px;
    width: 80px;
    vertical-align: middle;
    margin-left: 5px;
}

/* Init visibilities */
#fileResults {
    visibility: hidden;
    position: relative;
    animation-name: fadeUp;
    animation-duration: 0.8s;
}
.wikidataDiv {visibility: hidden;}
#dataDownloadImg {
    height:20rem;
}
#dateTypeDiv, #dateRangeDiv, #startDateDiv, #endDateDiv, #changeDateDiv, #noDataText {
    display: none;
}

/* Responsive */
@media only screen and (max-width: 1200px) {
    p {
        font-size: 0.7em;
        margin: 3px 0;
    }
}

@media only screen and (max-width: 760px) {
    h1 {
        font-size: 1.6em;
        margin: 1rem 0;
    }
    h2 {font-size: 1.4em;}
    h3 {font-size: 1em;}
    h4 {font-size: 0.75em;}
    h5 {font-size: 0.6em;}
    li {font-size: 0.7em;}
    select, input[type="date"] {font-size:1em !important;}
    label {font-size: 1.1em;}
    .button {font-size: 0.8em;}
    .section {
        margin: 0.8rem;
        padding: 0.5rem 0.5rem 0.5rem 1rem;
    }
    .container {grid-template-columns: 1fr;}
    .invisHour {visibility:hidden;}
    #header {
        padding-top:0.3rem;
        padding-bottom: 0.3rem;
        margin: 1.5rem 0.8rem;
    }
    #topSongImage, #topArtistImage {
        width: 8em;
        height: 8em;
    }
    #imageContainer {grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));}
    #dataDownloadImg {height:12rem}
}

/* Animation */
@keyframes spin {
  0% { transform: rotate(0deg); }
  40% { transform: rotate(160deg); }
  60% { transform: rotate(200deg); }
  100% { transform: rotate(360deg); }
}
@keyframes fadeUp {
  from{bottom: -1rem; opacity:0}
  to{bottom:0; opacity:1}
}