@charset "utf-8";
@import "reset.css";
@font-face {
    font-family: 'YouTube Sans';
    font-style: normal;
    font-weight: 300 900;
    font-display: swap;
    src: url(https://fonts.gstatic.com/s/youtubesans/v22/Qw38ZQNGEDjaO2m6tqIqX5E-AVS5_rSejo46_PCTRspJ0OosolrBEJL3HO_Z7fH6Cg.woff2) format('woff2');
}

/* ----------------------------
    common Init
---------------------------- */
* {
    box-sizing: border-box;
}

:root{
    --font:'YouTube Sans', sans-serif;
    font-family: var(--font);
    font-size: 12pt;
    word-break: keep-all;
    --point:#f59c00;
    --point-light:#ffc562;
    --point-dark:#e07f00;
    --white:#fff;
    --gray:#b6b6b6;
    --gray-light:#eee;
    --gray-dark:#777;
    --black:#444;
    --shadow-soft:rgba(0,0,0,.1);
    --shadow-hard:rgba(0,0,0,.5);
    --warning:#ff5050;
    --warning-dark: #dd3d3d;
    --navy: #1e435d;
    --navy-dark:#162731;
    --green: #1fb75b;
    --sky-dark: #238ebb;
    background-color: var(--white);
    color: var(--white);
}

:focus-visible {
    outline: solid var(--gray) 1px
}

::selection {
    background-color: var(--sky-dark);
}

::-webkit-scrollbar {
    display: none;
}

html {
    width: 100%;
    height: 100%;
    overflow-y: auto;
    overflow-x: hidden;
    scroll-behavior: smooth;
}

body {
    width: 100%;
    min-height: 100%;
    position: relative;
    text-align: center;
    background: url(../img/pattern.png) 0 0 / 20% var(--navy);
    display: flex;
    align-items: start;
    flex-direction: column;
    overflow: hidden;
    line-height: 1.25;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: bolder;
    margin: 0;
}
h1 {
    font-size: 4em;
    line-height: 1.75;
    font-weight: 900;
}
h2 {
    font-size: 3em;
    line-height: 1.75;
}
h3 {
    font-size: 2em;
    line-height: 1.5;
}
h4 {
    font-size: 1.5em;
    line-height: 1.25;
}
h5 {
    font-size: 1.2em;
    line-height: 1.25;
}
h6 {
    font-size: .7em;
    color: var(--gray-dark);
}
a {
    color: inherit;
    text-decoration: none;
}
p {
    line-height: 1.5;
    margin-bottom: 10px;
}
p:last-child {
    margin-bottom: 0;
}
img {
    display: block;
    width: 100%;
    max-width: 500px;
    height: auto;
    margin: 0 auto 20px;
}

input {
    box-sizing: border-box;
    width: 100%;
    padding: 10px 5px;
    border-radius: 5px;
    border: 1px solid var(--gray);
    text-align: center;
    font-family: var(--font);
    font-size: 2em;
    color: var(--black);
}

input::placeholder {
    color: var(--gray);
}

input[type="text"],
input[type="number"] {
    margin-top: 10px;
}

input[type="checkbox"] {
    width: auto;
    cursor: pointer;
}

label {
    display: block;
    cursor: pointer;
    padding: 15px 0;
    width: 100%;
}

button {
    padding: 20px 30px;
    margin: 0;
    border: none;
    border-radius: 10px;
    background-color: var(--point);
    cursor: pointer;
    font-family: var(--font);
    color: var(--white);
    font-size: 1.5em;
    line-height: 1;
    transition: background-color ease-in-out .1s;
}

button:hover {
    background-color: var(--point-dark);
}

button.full {
    display: block;
    width: 100%;
    margin: 20px 0;
}

button.btn-dark {
    font-size: 1em;
    border: 1px solid var(--point);
    background-color: var(--shadow-hard);
}

button.btn-dark:hover {
    border: 1px solid var(--point-light);
    background-color: var(--shadow-soft);
}

.point {
    color: var(--point);
}
.warn {
    color: var(--warning);
}

.decorate {
    position: absolute;
    width: 20px;
    height: 20px;
    background-color: var(--navy-dark);
    border: 1px solid var(--point);
    left: calc(50% - 10px);
    transform: rotate(45deg);
    margin-top: 10px;
}

.separate {
    width: 100%;
    height: 20px;
    border-top: 1px solid var(--point);
}

.separate + .decorate {
    margin-top: -30px;
}

/* ----------------------------
    scoreboard
---------------------------- */
#scoreboard {
    background-color: var(--shadow-hard);
    padding: 10px;
    margin-bottom: 20px;
    overflow-y: hidden;
    max-height: 36px;
}
#scoreboard .board-item {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 10px;
    transition: margin ease-in-out .2s;
    min-height: 40px;
    font-size: 16px;
}

/* ----------------------------
    main
---------------------------- */
main {
    max-width: 650px;
    min-height: 500px;
    margin: 50px auto 0;
    padding: 40px;
    background-color: var(--navy-dark);
    border-radius: 60px;
    position: relative;
}


/* ----------------------------
    index
---------------------------- */
section.intro img:first-child {
    margin: 0 auto;
}

section.intro img {
    max-width: 400px;
}

section.intro ~ section.desc {
    font-size: 1.2em;
}

.login {
    position: absolute;
    z-index: 1;
    right: 10px;
    top: 10px;
}

.login .show {
    opacity: 0;
    font-size: 2em;
    padding: 0;
    margin-bottom: 10px;
    background-color: transparent;
    color: var(--gray-light);
}

.login .show:hover {
    opacity: 1;
    color: var(--gray-dark);
}

.login #loginForm {
    position: absolute;
    transition: right ease-in-out .2s;
    width: 300px;
    right: -400px;
    padding: 20px;
    border-radius: 10px;
    background-color: var(--navy-dark);
}

.login #loginForm input {
    font-size: 1em;
}

.login #loginForm button {
    margin-bottom: 0;
}

/* ----------------------------
    statistics
---------------------------- */
main.statistics > section {
    margin-bottom: 30px;
}

main.statistics > section .item {
    text-align: left;
    padding: 20px;
    border-bottom: 1px dashed var(--navy);
}

main.statistics > section .item:last-child {
    border-bottom: 0;
}

main.statistics h6 {
    color: var(--warning-dark);
    display: inline-block;
    margin-left: 50px;
}

main.statistics .ratio {
    position: absolute;
    top: .9em;
    left: 0;
    display: block;
    height: 2em;
    background-color: var(--point-dark);
}

main.statistics ol {
    list-style: auto;
}

main.statistics ol li {
    display: list-item;
    padding: 20px 0;
    margin-left: 40px;
    position: relative;
    padding-left: 10px;
}

main.statistics ol li span:first-child {
    position: absolute;
    z-index: 1;
}

main.statistics ul .point {
    font-weight: bolder;
}

main.statistics ul li {
    padding: 10px;
}

main.statistics ul li:first-child {
    font-size: 2em;
}

main.statistics ul li:nth-child(2) {
    font-size: 1.8em;
}

main.statistics ul li:nth-child(3) {
    font-size: 1.5em;
}

main.statistics ul li small {
    font-size: smaller;
    color: var(--gray);
}

main.statistics ul li br + small {
    font-size: .7em;
}

/* ----------------------------
    survey
---------------------------- */
#progress {
    width: 100%;
    height: 20px;
    background-color: var(--navy);
    border-radius: 20px;
    overflow: hidden;
}

#progress #bar {
    width: 0%;
    height: 20px;
    background-color: var(--point);
    transition: width ease-in-out .2s;
}

#loading {
    display: none; /* 쓰게되면 block */
    width: 300px;
    float: left;
    position: absolute;
    top: 35%;
    left: calc(50% - 150px);
}

#ring {
    margin: 0 auto;
    width: 40px;
    border: 10px solid transparent;
    border-radius: 20px;
    height: 40px;
    background-image: linear-gradient(var(--navy-dark), var(--navy-dark)), linear-gradient(to top, var(--point) 0%, var(--warning) 100%);
    background-origin: border-box;
    background-clip: content-box, border-box;
    transform: rotate(0);
}

#survey {
    width: 500px;
    min-width: 300px;
    max-width: 500px;
    margin: 0 auto;
}

#survey section.item {
    position: relative;
    display: none;
    opacity: 0;
    border-radius: 10px;
    padding-top: 20px;
    margin-top: 30px;
    transition: all ease-in-out .2s;
}

#survey section.item:first-child {
    display: block;
    opacity: 1;
    margin-top: 0;
    height: inherit;
}

#survey img {
    background-color: var(--navy-dark);
}

#survey label {
    margin-top: 15px;
    padding: 20px;
    color: var(--white);
    background-color: var(--point-dark);
    border-radius: 10px;
    font-size: 1.4em;
}

#survey label:hover {
    background-color: var(--point);
}

#survey input[type="radio"] {
    display: none;
}

#survey label:has(input[type="radio"]:checked) {
    background-color: var(--point);
}

/* ----------------------------
    result
---------------------------- */
:root:has(main#result) {    
    font-size: 21px;
}

section.title h3.point {
    background:var(--shadow-hard);
    padding: 30px 40px;
    margin: 20px 0;
    border-top: 1px solid var(--point);
    border-bottom: 1px solid var(--point);
    color: var(--point-light);
    text-shadow: 0 0 15px var(--point-dark);
}

section.desc {
    margin: 30px 0 50px;
    text-align: left;
    position: relative;
}

section.desc .ring {
    position: absolute;
    width: 400px;
    height: 400px;
    top: 15%;
    left: calc(50% - 200px);
    border-radius: 400px;
    border: 4px solid transparent;
    background-image: linear-gradient(var(--navy-dark), var(--navy-dark)), linear-gradient(to top, var(--point-dark) 0%, var(--point-light) 100%);
    background-origin: border-box;
    background-clip: content-box, border-box;
    animation: rotate 1s ease-in-out infinite;
}

@keyframes rotate {
    from { /* 애니메이션 시작 시점 */
        transform: rotate(0deg);
    }
    to { /* 애니메이션 종료 시점 */
        transform: rotate(360deg);
    }
}

section.desc .content {
    position: absolute;
    z-index: 1;
}

section.desc .hide-content {
    opacity: 0;
}

section.desc ul {
    padding-left: 30px;
}

section.desc li {
    margin: 15px 0;
    text-indent: -30px;
}

section.desc li::before {
    content: '◆ ';
    color: var(--point);
}

section.troll {
    margin-bottom: 40px;
}

section.troll .poro-group {
    text-align: center;
}

section.troll .poro-group img {
    display: inline-block;
    max-width: 60px;
    margin-bottom: 10px;
}

section.partner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    padding: 20px 0;
    margin-bottom: 20px;
}

section.partner .icon {
    display: inline-block;
    width: 45px;
    height: 45px;
    padding-top: 5px;
    border-radius: 45px;
    background-color: var(--shadow-hard);
    margin-bottom: 10px;
}

section.partner .icon:has(.fa-check) {
    color: var(--green);
}
section.partner .icon:has(.fa-xmark) {
    color: var(--warning);
}

section.partner h4.point {
    background-color: var(--shadow-hard);
    padding: 10px 0;
    color: var(--gray-light);
    margin-bottom: 10px;
}

section.partner img {
    max-width: 200px;
}

section.sns {
    margin: 30px 0 40px;
}

section.sns h4 {
    margin-bottom: 20px;
}

section.sns .btn-group {
    display: flex;
    gap: 10px;
    justify-content: center;
}

section.sns button {
    width: 70px;
    height: 70px;
    border-radius: 70px;
    padding: 0;
    text-align: center;
    font-size: 1.5em;
}

section.sns #urlBlank {
    opacity: 0;
    position: absolute;
    z-index: -99;
}

/* ----------------------------
    modal
---------------------------- */
.modal, #dimm {
    display: none;
    opacity: 0;
    transition: opacity ease-in-out .2s;
    position: absolute;
    z-index: 1;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
}

.modal {
    justify-content: center;
    align-items: flex-start;
    position: fixed;;
    top: 5%;
    margin-left: 35px;
}

.modal:not(:has(.modal-close)) {
    margin: 0;
}

.modal h3 {
    margin-bottom: 20px;
}

.modal:not(:has(article)) h3 {
    margin-bottom: 0;
}

.modal section {
    background-color: var(--navy);
    max-width: 80%;
    max-height: 90%;
    overflow-y: scroll;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(0,0,0,.5);
}

.modal section article {
    padding: 20px 20px 20px 20px;
    background-color: var(--navy-dark);
}

.modal section article + article {
    padding-top: 0px;
}

.modal section button {
    margin-top: 20px;
}

#dimm {
    overflow: hidden;
    background-color: var(--shadow-hard);
}

.modal .btn-troll {
    font-size: .5em;
    padding: 5px 10px;
    background-color: var(--warning);
}

.modal button.modal-close {
    padding: 0;
    width: 50px;
    height: 50px;
    border-radius: 50px;
    line-height: 0;
    margin-left: 20px;
}

section.sangchuu .modal article span.member {
    display: inline-block;
    margin: 5px;
}
section.sangchuu .modal article span.member:first-child {
    margin-left: 0;
}
section.sangchuu .modal article span.member:last-child {
    margin-right: 0;
}
section.sangchuu .modal article h5 {
    border-top: 1px dashed var(--navy);
    margin-top: 10px;
    padding-top: 10px;
}

section#allcham .modal article {
    display: grid;
    gap: 10px;
    grid-template-columns: 1fr 3fr;
    grid-template-rows: 1fr 3fr;
    text-align: left;
    font-size: .8em;
    border-bottom: 1px dashed var(--navy);
    padding: 20px;
}

section#allcham .modal article.troll {
    border-bottom: 0;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: auto;
    gap: 0;
    padding: 0;
}
section#allcham .modal article.troll article {
    border-right: 1px dashed var(--navy);
    border-bottom: 0;
    display: block;
    text-align: center;
}
section#allcham .modal article.troll article:last-child {
    border-right: 0;
}

section#allcham .modal article img {
    max-width: 150px;
    margin-bottom: 0;
    grid-row: 1 / 3;
}

section#allcham .modal article h5,
section#allcham .modal article ul {
    grid-column: 2 / 3;
}

section#allcham .modal article ul {
    padding-left: 15px;
}

section#allcham .modal article ul li {
    display: list-item;
    text-indent: -15px;
    margin-bottom: 5px;
}
section#allcham .modal article ul li::before {
    content: '- ';
}

section.troll .modal img {
    max-width: 300px;
}

/* ----------------------------
    footer
---------------------------- */
footer {
    width: 100%;
    padding: 20px;
    font-size: 9px;
    text-align: center;
}

/* ----------------------------
    media query
---------------------------- */
@media all and (min-width: 321px) and (max-width: 768px) {
    :root {
        font-size: 11pt;
    }

    body {
        padding: 20px;
    }

    main {
        width: 100%;
        min-height: 400px;
        margin: 0;
        padding: 20px;
        border-radius: 30px;
    }

    .modal {
        margin: 0;
    }

    .modal h3 {
        font-size: 1.2em;
    }

    .modal section {
        width: 90%;
    }
    
    .modal section article {
        text-align: left;
    }

    .modal button.modal-close {
        margin: -20px 0 0;
        position: absolute;
        right: 15px;
    }

    #survey {
        width: auto;
        min-width: auto;
    }

    section.desc .ring {
        top: 5%;
        width: 250px;
        height: 250px;
        left: calc(50% - 125px);
    }

    section.partner {
        grid-template-columns: 1fr;
        grid-template-rows: 1fr 1fr;
    }

    section.sangchuu .modal p {
        font-size: .8em;
    }

    section.sangchuu .modal article span.member {
        margin-left: 0;
    }

    section#allcham .modal article {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
    }

    section#allcham .modal article.troll {
        grid-template-columns: auto;
    }
    section#allcham .modal article.troll article {
        border-right: 0;
        border-bottom: 1px dashed var(--navy);
    }
    section#allcham .modal article.troll article:last-child {
        border-bottom: 0;
    }

    section#allcham .modal article img {
        max-width: 100px;
        grid-row: 1;
    }
    
    section#allcham .modal article h5 {
        text-align: center;
    }

    section#allcham .modal article h5,
    section#allcham .modal article ul {
        grid-column: 1;
    }

    footer {
        padding-bottom: 0;
    }

    footer *:last-child {
        margin: 0;
    }
}