* {
    margin: 0;
    padding: 0;
    font-family: inherit;
}

body {
    width: 100vw;
    height: 100vh;
    display: grid;
    place-content: center;
    font-family: sans-serif;
    background-color: #0a0a0a;
    color: #d2d2d2;
}

.home {
    position: absolute;
    top: 1.5rem;
    left: 1.5rem;
    z-index: 999;
    display: flex;
    justify-content: center;
}

.home button {
    background: #0a0a0a;
    border-radius: 50%;
    width: 50px;
    aspect-ratio: 1 / 1;
    border: 1px solid #1a1a1a;
    box-shadow: 0 1px 5px rgba(0,0,0, 0.2);
    cursor: pointer;
    display: flex;
    justify-content: center;
    padding: 10px;
}

.home svg {
    width: 100%;
    height: 100%;
}


.profit-wrapper {
    display: none;
    height: 100vh;
    min-width: 600px;
    display: none;
    position: relative;
}

.profit-wrapper h2 {
    text-align: center;
}

.profit-table-container {
    max-height: calc(100% - 10rem);
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #1a1a1a transparent;
}

.profit-table-container::-webkit-scrollbar {
    width: 4px;
    background-color: #0a0a0a;
}

.profit-table-container::-webkit-scrollbar-thumb {
    background-color: #1a1a1a;
}

.dates-container {
    display: flex;
    justify-content: end;
    gap: 1rem;
    padding: 2rem 1rem 1rem;
}

.dates-container .row {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.dates-container .row input {
    padding: .5rem 1rem;
    border-radius: 5px;
    background-color: #0a0a0a;
    color: white;
    color-scheme: dark;
    border: 1px solid #1a1a1a;
    width: 130px;
    text-align: center;
    position: relative;
}

::-webkit-calendar-picker-indicator {
    padding: 0 1rem;
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0;
    width: 100%;
    height: 100%;

}

.no-results {
    display: none;
    margin-top: 2rem;
}

.cards-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;    
}

.card {    
    background-color: #1a1a1a;
    color: #f0f0f0;
    padding: .35rem .75rem;
    border-radius: 7px;
}

.card .tick {
    background-color: #f4e7d5;
    color: #ffad3a;
    width: 60px;
    height: 18px;
    padding: 5px 10px;
    text-align: center;
    font-weight: bold;
    border-radius: 30px;
    font-size: 14px;
}

.card-row {
    display: flex;
    justify-content: space-between;
    margin: 1rem 0;
}

.card-row.last {
    margin: 1rem 0 0;
}

.card b {
    font-size: 13px;
    margin-bottom: 2px;
    display: block;
}

.card-row > div:nth-child(2):not(.tick) {
    text-align: right;
}

table {
    border-collapse: collapse;
    padding-right: 5px;
}

table thead {
    position: sticky;
    top: 0;
    background-color: #0a0a0a;
    box-shadow: 0 1px 5px rgba(0,0,0, 0.2);
    font-weight: 600;
}

table td {
    padding: 1rem;
    max-width: 15ch;
    text-align: center;
    font-size: 15px;
    user-select: none;
}

table tbody tr td:first-child {
    width: 50px
}

table tr .row-icon-container,
.card .row-icon-container {
    display: flex;
    align-items: center;
    gap: 5px;
}

table .row-icon-container svg,
.card svg {
    width: 40px;
}

table .second-icon-container svg,
.card .second-icon-container svg {
    width: 25px;
}

table .second-icon-container svg path:nth-of-type(2),
.card .second-icon-container svg path:nth-of-type(2) {
    fill: #ff444f;
}

table .second-icon-container svg path:nth-of-type(3),
.card .second-icon-container svg path:nth-of-type(3) {
    fill: #85acb0;
}

table .second-icon-container svg path:only-child, 
.card .second-icon-container svg path:only-child {
    fill: #ff444f;
}

table .second-icon-container svg path:first-child:nth-last-child(2),
.card .second-icon-container svg path:first-child:nth-last-child(2) {
    fill: #85acb0;
}

table td svg g,
.card svg g {
    fill: none;
}

table tr:hover {
    background-color: #1a1a1a;
}

table td {
    line-height: 1.4;
}

tbody td:last-of-type {
    font-weight: 600;
}

.stats {
    display: flex;
    justify-content: space-between;
    margin-top: .5rem;
    padding: 1rem .5rem;
    border-top: 2px solid rgba(0,0,0, 0.2);
}

.stats p:last-child {
    font-weight: 600;
}


table tr td span {
    padding: 2px 6px;
    display: block;
    /* margin-inline: auto; */
    border-radius: 20px;
}

table tr td span.win {
    background-color: #85acb0;
    color: white;
}

table tr td span.lose {
    background-color: #ff444f;
    color: white;
}

.lose {
    color: #ff444f;
}

.win {
    color: #85acb0;
}

.load img {
    width: 100%;
}

@media(max-width: 670px) {
    body {
        overflow: hidden;
    }

    .home {
        position: fixed;
        top: auto;
        bottom: 4rem;
        left: .5rem;
    }

    .profit-wrapper {
        min-width: 100%;
    }

    .stats {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        padding-inline: 2rem;
        background-color: #0a0a0a;
    }

    .dates-container {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        justify-content: center;
        border-bottom: 2px solid rgba(0,0,0, 0.2);
        gap: .5rem;
    }

    .cards-container {
        width: calc(100vw - 1rem);
        overflow-y: scroll;
        max-height: calc(100% - 9rem);
        padding: 10px 0 5px;
        margin-top: 4.8rem;
    }

    .no-results {
        margin-top: 10rem;
        text-align: center;
    }
}

@media(max-width: 450px) {  

    .dates-container {
        flex-direction: column;
        padding: 1rem;
    }

    .cards-container {
        margin-top: 7rem;
        max-height: calc(100% - 12.5rem);
    }

    .dates-container .row input {
        width: 100%;
    }

    .stats {
        padding-inline: .5rem;
    }
}