@import url("https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/dist/web/static/pretendard.min.css");
@import url('theme.css');

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

*::-webkit-scrollbar-corner, *::-webkit-scrollbar-track {
    background-color: transparent;
}

*::-webkit-scrollbar-thumb {
    background-color: #9e9e9e;
    border-radius: 10px;
    background-clip: padding-box;
    border: 1px solid transparent;
}

*::-webkit-scrollbar-thumb:hover {
    background-color: #717171;
}

*::-webkit-scrollbar-track {
    border-radius: 8px;
    border: 4px solid transparent;
    background-clip: content-box;
}

*::-webkit-scrollbar-corner, ::-webkit-scrollbar-track {
    background-color: transparent;
}

@media (hover: none) and (pointer: coarse), (max-width: 719px) {
    body::-webkit-scrollbar {
        width: 1px;
    }
    
    #main {
        width: calc(100% - 17px) !important;
        padding-right: 0 !important;
    }
}

div {
    -webkit-tap-highlight-color: transparent;
}

button {
    all: unset;
    display: flex;
    vertical-align: top;
}

button {
    user-select: none;
    transition: color 0.15s cubic-bezier(.4, 0, .2, 1), background-color 0.15s cubic-bezier(.4, 0, .2, 1);
}

button:focus-visible {
    outline: auto;
}

img {
    pointer-events: none;
}

html, body {
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    overflow-y: auto;

    background-color: var(--canvas-color);

    font-family: Pretendard, sans-serif;
    font-size: 14px;
    font-weight: 400;
    line-height: 100%;
    color: var(--color);
}

html {
    font-size: 14px;
}

#main {
    width: calc(100% - 18px);
    min-height: 100dvh;
    padding: 0 9px 9px 9px;

    display: flex;
    flex-direction: column;
    align-items: center;
}

#title-box {
    width: 100%;
    max-width: 768px;
    background-color: hsl(var(--sonner));
    border: 1px solid var(--border-color);
    border-radius: calc(0.6rem - 2px);
    box-shadow: 0 0 #0000, 0 0 #0000, 0 1px 2px 0 rgba(0,0,0,.05);
    display: flex;
    flex-direction: column;
    margin-top: 9px;
    margin-bottom: 9px;
    padding: 10px 16px;
    box-sizing: border-box;
    height: 270px;
    flex-shrink: 0;
}

#title-wrapper {
    width: 100%;
    height: 100%;
    gap: 1.25rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

#bottom {
    width: 100%;
    height: 1px;
    flex-shrink: 0;
}

#navigation-bar {
    width: 100%;
    height: 24px;
    display: flex;
    margin-bottom: 6px;
    gap: 20px;
    box-sizing: border-box;
    position: relative;
    flex-shrink: 0;
}

#horizontal-line {
    width: 100%;
    height: 1px;
    margin-bottom: 2px;

    background-color: hsl(var(--border));
    flex-shrink: 0;
}

.select {
    height: 100%;
    padding: 12px 0 12px 0;

    display: flex;
    align-items: center;
    position: relative;

    color: var(--navigation-color);
    font-size: 16px;
    font-weight: 600;

    text-decoration: none;
    box-sizing: border-box;
    
    cursor: pointer;
}

.select[data-view="selected"] {
    font-weight: 700;
    color: var(--navigation-selected-color);
}

#title {
    font-size: 2.25rem;
    font-weight: 700;
    height: 54px;
    display: flex;
    align-items: center;
}

#search-box {
    width: 100%;
    max-width: 495px;
    padding-left: 1rem;
    padding-right: 1rem;
    position: relative;
    box-sizing: border-box;
}

#search-area {
    width: 100%;
    height: 40px;
    background-color: hsl(var(--input));
    border: 1px solid hsl(var(--border) / .5);
    border-radius: calc(0.6rem - 4px);
    display: flex;
    align-items: center;
    box-sizing: border-box;
}

#combobox {
    font-size: .875rem;
    font-weight: 600;
    line-height: 1.25rem;
    padding: .5rem .75rem;
    margin-left: 5px;
    white-space: nowrap;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
    width: 3.1rem;
    display: flex;
    cursor: pointer;
    position: relative;
}

#combobox svg {
    opacity: .5;
    width: 1rem;
    height: 1rem;
    display: block;
}

#dropdown-menu {
    position: absolute;
    margin: 0;
    padding: 0;
    top: 40px;
    left: -7px;
    width: 62px;
    padding: 5px;
    background-color: var(--dropdown-background-color);
    border: 1px solid var(--dropdown-border);
    border-radius: calc(0.6rem - 4px);
    box-shadow: rgba(0, 0, 0, 0) 0px 0px 0px 0px, rgba(0, 0, 0, 0) 0px 0px 0px 0px, rgba(0, 0, 0, 0.1) 0px 4px 6px -1px, rgba(0, 0, 0, 0.1) 0px 2px 4px -2px;
    z-index: 1;
    cursor: auto;
    transform: translate(0%, -4%);
    scale: 0.97;
    opacity: 0;
    visibility: hidden;
    display: block;
    transition: transform 0.15s ease, opacity 0.15s ease, scale 0.15s ease;
}

#dropdown-menu.show {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
}

#dropdown-menu.hide {
    transition: none;
}

#dropdown-menu li {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 30px;
    border-radius: calc(0.6rem - 6px);
}

#dropdown-menu li svg {
    opacity: 1;
    margin-right: 5px;
    pointer-events: none;
    visibility: hidden;
}

#dropdown-menu li[data-view="selected"] svg {
    visibility: visible;
}

#search {
    width: 100%;
    height: 26px;
    font-family: 'Noto Sans KR', sans-serif;
    font-size: .875rem;
    font-weight: 600;
    line-height: 1.25rem;
    padding-left: .75rem;
    padding-right: .75rem;
    padding-top: .5rem;
    padding-bottom: .5rem;
    border: none;
    outline: none;
    background-color: transparent;
    color: var(--input-color);
}

#clear,
#do-search {
    width: 17.5px;
    height: 17.5px;
    padding: 6px;
    margin-left: 0;
    margin-right: 4px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: calc(0.6rem - 2px);
    cursor: pointer;
}

#clear {
    visibility: hidden;
}

#statistics {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(2, 1fr);
    width: 100%;
    max-width: 768px;
    flex-grow: 1;
    column-gap: 9px;
}

@media (max-width: 510px) {
    #statistics {
        grid-template-columns: repeat(1, 1fr);
    }
    #statistics .statistics-box:nth-last-child(2) {
        margin-bottom: 9px !important;
    }
}

.statistics-box {
    box-shadow: 0 0 #0000, 0 0 #0000, 0 1px 2px 0 rgba(0,0,0,.05);
    color: hsl(var(--card-foreground));
    padding: .625rem 13px;
    background-color: var(--ranking-background-color);
    border: 1px solid hsl(var(--border) / .5);
    border-radius: calc(0.6rem - 4px);
    margin-bottom: 9px;
    min-height: calc(304.5px - 1.25rem);
}

#statistics .statistics-box:last-child,
#statistics .statistics-box:nth-last-child(2) {
    margin-bottom: 0;
}

.statistics-title {
    font-size: 15px;
    font-style: normal;
    font-weight: 700;
    line-height: 1.5rem;
    margin-top: .2rem;
    margin-bottom: .375rem;
    height: 24px;
}

.horizontal-line {
    background-color: hsl(var(--border));
    width: 100%;
    height: 1px;
    margin-bottom: .4rem;
}

.statistics-data {
    width: 100%;
    height: calc(100% - 40px - .2rem);
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    grid-template-rows: repeat(10, 1fr);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
}

.list {
    width: 100%;
    padding: .1rem 0;
    padding-left: .25rem;
    padding-right: .5rem;
    border-radius: calc(0.6rem - 2px);
    column-gap: .25rem;
    align-items: center;
    display: flex;
    justify-content: space-between;
    box-sizing: border-box;
    margin-top: .5rem;
    cursor: pointer;
    transition: none;
}

.num {
    width: 20px;
    text-align: left;
    flex-grow: 0; flex-shrink: 0; flex-basis: auto;
}

.name {
    font-size: 13px;
    font-weight: 600;
    color: inherit;
    text-decoration: inherit;
    flex-grow: 1; flex-shrink: 1; flex-basis: 0;
}

.detail,
.count {
    color: rgb(113 113 122);
    font-size: .75rem;
    line-height: 1rem;
    text-align: center;
    flex-grow: 0; flex-shrink: 0; flex-basis: auto;
}

.count {
    color: hsl(var(--foreground));
    font-weight: 700;
    text-align: right;
}

.loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: var(--loading-color);
}

.loading svg {
    width: 20px;
    height: 20px;
    transform: rotate(0deg);
}

.loading svg {
    animation: rotate 2s linear infinite;
}

#search-container {
    padding: .25rem;
    background-color: hsl(var(--input));
    border: 1px solid var(--dropdown-border);
    border-radius: calc(0.6rem - 4px);
    border-top-left-radius: 0;
    border-top-right-radius: 0;
    border-top: 1px solid hsl(var(--border));
    box-sizing: border-box;
    position: absolute;
    width: calc(100% - 28px);
    z-index: 2;
    box-shadow: 0 0 #0000, 0 0 #0000, 0 25px 50px -12px rgba(0, 0, 0, .15);
}

#search-result {
    min-height: 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

#nothing {
    color: var(--info-color);
    font-size: .975rem;
    line-height: 1.25rem;
    text-align: center;
    padding: .5rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.result {
    line-height: 1em;
    font-size: 1rem;
    font-family: 'Noto Sans KR', sans-serif;
    font-weight: 600;
    padding-top: .25rem;
    padding-bottom: .25rem;
    padding-left: .25rem;
    padding-right: .25rem;
    border-radius: calc(0.6rem - 4px);
    display: flex;
    color: inherit;
    text-decoration: inherit;
    height: 28px;
    box-sizing: border-box;
    align-items: center;
    cursor: pointer;
    margin-top: 2px;
    justify-content: space-between;
    width: 100%;
}

.text {
    margin-left: 4px;
    margin-right: 4px;
}

.text span {
    color: var(--filtered);
}

.type {
    color: var(--type-color);
    line-height: 1;
    font-size: .875rem;
    margin-right: 4px;
}

#notice {
    margin-top: .225rem;
    color: var(--type-color);
    font-size: .8rem;
    line-height: 1rem;
    text-align: center;
}

.count-wrapper {
    color: var(--count-color);
    line-height: 1;
    font-size: .875rem;
    margin-right: 4px;
    display: flex;
    gap: 2px;
}

@keyframes rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

@media (hover: hover) and (pointer: fine) {
    #dropdown-menu li:hover {
        background-color: var(--dropdown-hover);
    }
    
    #clear:hover,
    #do-search:hover {
        background-color: var(--hover);
    }

    .list:hover {
        background-color: var(--ranking-hover);
    }

    .result:hover {
        background-color: hsla(240, 4%, 46%, .1);
    }
}

@media (hover: none) and (pointer: coarse), (max-width: 719px) {
    #dropdown-menu li:active {
        background-color: var(--dropdown-hover);
    }
    
    #clear:active,
    #do-search:active {
        background-color: var(--hover);
    }

    .list:active {
        background-color: var(--ranking-hover);
    }

    .result:active {
        background-color: hsla(240, 4%, 46%, .1);
    }
}