@import url('https://fonts.googleapis.com/css2?family=Rubik:ital,wght@0,300..900;1,300..900&display=swap');
@font-face {
    font-family: 'techover';
    src: url('./techover.ttf') format("truetype");
}
*{
    margin: 0;
    padding: 0;

}
body{
    font-family: "Kanit", sans-serif;
    background: var(--main-900);
    overflow-x: hidden;
}

::-moz-selection { /* Code for Firefox */
    color: var(--second-900);
    background: var(--text-100);
}
  
::selection {
    color: var(--second-900);
    background: var(--text-100);
}
.head{
    font-family: "techover";
    width: 80vw;
    height: 15vh;
    background-color: var(--main-500);
    color: var(--text-100);
    border-radius: 15px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-left: 10vw;
    margin-top: 5vh;
    font-size: 60px;
    user-select: none;
}
.head > h1{
    cursor: pointer;
}
.cat{
    position: absolute;
    top: calc(5vh - 37px);
    left: 15vw;
    width: 40px;
    height: 40px;
    background: url("./src/s_inc/cat.svg");
    color: var(--text-100);
}

.navBar{
    width: 80vw;
    margin-left: 10vw;
    display: flex;
    align-items: center;
    justify-content: end;
}
.navBar > a{
    width: 40px;
    height: 40px;
    border-radius: 50%;
    margin-top: 10px;
    margin-left: 10px;
    color: var(--text-200);
    background: var(--main-500);
    cursor: pointer;
    border: none;
    display: flex;
    justify-content: center;
    align-items: center;
}
.navBar > a:hover{
    color: var(--text-100);
}
.navBar > a:active{
    color: var(--text-100);

}

.modalAsk{
    position: fixed;
    width: 400px;
    height: 100px;
    left: calc(50vw - 200px);
    top: calc(50vh - 50px);
    border-radius: 10px;
    border: solid 2px var(--primary-500);
    background-color: var(--second-500);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}
.hide{
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: #000000a1;
}
#modalText{
    all: unset;
    padding: 5px 10px;
    background: var(--main-500);
    width: 280px;
    border-radius: 10px;

}
#submitModal{
    padding: 5px;
    border: solid 2px var(--primary-500);
    border-radius: 10px;
    margin-top: 10px;
    background: transparent;
    color: var(--text-100);
    cursor: pointer;
}
#submitModal:hover{
    background: var(--primary-500);
}

.searchDiv{
    position: relative;
    display: flex;
    flex-direction: column;
    color: var(--text-100);
    width: 80vw;
    flex-direction: column;
    justify-content: center;
    border-radius: 15px;
    display: flex;
    align-items: center;
    margin-left: 10vw;
    margin-top: 3vh;
    font-size: 30px;
}

.searchDiv > input{
    border: none;
    padding-left: 10px;
    width: 80vw;
    height: 5vh;
    font-size: 20px;
    font-family: "Kanit", sans-serif;
    background-color: var(--main-600);
    color: var(--text-200);
}
.searchDiv > input:focus{
    outline: none;
}
.foundNote{
    background-color: var(--main-700);
    width: 80vw;
    min-height: 300px;
}
.newArticles{
    display: flex;
    justify-content: space-between;
    align-items: stretch;
    flex-wrap: wrap;
    text-align: left;
    box-sizing: border-box;
    width: 80vw;
    margin-left: 10vw;
    margin-top: 10px;
    background-color: var(--main-600);
}
.article{
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    flex-grow: 1;
    color: var(--text-200);
    min-width: 150px;
    cursor: pointer;
    height: 5vh;
    padding: 2px 1vw;
}
.article:hover{
  background-color: var(--main-800);
}

.article > span{
    font-weight: 600;
    font-size: 25px;
}


img{
    max-width: 100%;
}




/* ERROR PAGE */
.errorbody{
    opacity: 0.9;
}
.errorhead{
    flex-direction: column;
    height: fit-content;
    opacity: 0.5;
    position: relative;
    z-index: 2;
}
.ulErr{
    color: var(--text-100);
    position: absolute;
    left: 20%;
    top: 0;
    opacity: 0.1;
}
.ulErr > li{
    display: flex;
    user-select: none;
    flex-direction: row;
    align-items: center;
    margin-top: 1vh;
}
.nameErr{
    width: 5vh;
    height: 5vh;
    border-radius: 50%; 
    display: flex;
    justify-content: center;
    align-items: center;
    margin-right: 5px;
}
.kerr{
    background-color: #ffffff;
    color: #000;
}
.jerr{
    background-color: #000000;

}
/* Article Page */

.mainArticle{
    width: 100vw;
    display: flex;
    justify-content: center;
}

.info{
    width: 70vw;
}
.info > *, .md > *{
    margin-top: 20px;
}

a{
    color: var(--primary-500);
    text-decoration: none;
}
a:visited{
    color: none;
}
a:hover{
    color: var(--primary-500);
    text-decoration: underline;
}
a:active{
    color: var(--primary-400);
}

.articleBody{
    color: var(--text-100);
    padding-bottom: 100px;
}

.info > h1, .info > h2, .md > h1, .md > h2{
    border-bottom: solid 1px var(--text-100);
    display: flex;
    align-items: baseline;
}
.info > h1:hover > .copyBtn, .info > h2:hover > .copyBtn{
    display: block;
}
.copyBtn{
    width: 20px;
    height: 20px;
    color: var(--text-100);
    background: transparent;
    border: none;
    cursor: pointer;
    display: none;
    margin-left: 10px;
}
.copyBtn:hover{
    color: var(--text-400);

}   
/* sdfasdf */
.hljs{
    position: relative;
}
.hljs-copy {
    position: absolute;
    right: 5px;
    top: 5px;
    cursor: pointer;
    background: none;
    border: none;
    color: var(--text-200);
}
.hljs-copy:hover{
    color: var(--text-300);
}
.hljs-copy:active{
    color: var(--text-500);
}

.hljs-copied::before{
    right: 20px;
    position: absolute;
    display: flex;
    content: "Copied";
    color: #000;
    width: 60px;
    height: 20px;
    padding-left: 10px;
    background: var(--primary-500);
    color: var(--text-100);
    align-content: center;
    align-items: center;
    clip-path: polygon(85% 0, 100% 50%, 85% 100%, 0 100%, 0 0);
}

code{
    padding: 4px;
    background-color: var(--second-400);
    border-radius: 5px;
}
 
pre > code{
    width: calc(100% - 40px);
    background-color: var(--main-700);
    display: block;
    padding: 20px;
    overflow:scroll;
}
blockquote{
    background-color: var(--main-600);
    padding: 10px 10px;
    border-left: solid 5px var(--primary-500);
    border-top-left-radius: 5px;
    border-bottom-left-radius: 5px;
}
li{
    line-height: 1.5;
    margin-top: 5px;
}
li > ul{
    margin-left: 50px;
}
/* table */
table {
	border-collapse: collapse;
	overflow: hidden;
}

th,
td {
	padding: 15px;
	color: #fff;
}

th {
	text-align: left;
}

thead {
	th {
		/* background-color: #ff4500; */
        border-bottom: solid 2px var(--main-100);
	}
}

tbody {
	tr {
        border-top: solid 2px var(--main-500);
	}
	td {
		position: relative;
		&:hover {
			&:before {
				content: "";
				position: absolute;
				left: 0;
				right: 0;
				top: -9999px;
				bottom: -9999px;
				/* background-color: rgba(255,255,255,0.2); */
				z-index: -1;
			}
		}
	}
}
/* table */
/* Community */
.community{
    display: flex;
    flex-direction: column;
    width: 100vw;
    justify-content: center;
    align-items: center;
    margin-top: 30px;
}
.likes{
    cursor: pointer;
    width: 40px;
    height: 40px;
    color: var(--main-500);
}
.likes.active{
    color: var(--primary-500);
}

.comms{
    width: 70vw;
    display: flex;
    flex-direction: column;
    margin-top: 20px;
}
.comms > h2{
    border-bottom: solid 3px var(--main-500);
    margin-top: 20px;

}
.comDiv{
    position: relative;
    margin-top: 20px;
}
.comDiv > .name{
    font-size: 20px;
    font-weight: bold;
}
.comDiv > .description{
    font-size: 14px;
    margin-top: 10px;
}
.comDiv > .timeStamp{
    position: absolute;
    right: 5px;
    top: 0;
    font-size: 12px;
    color: var(--text-400);
}

/*  */
/* Comments */
.inputComment{
    display: flex;
    width: 70vw;
    flex-direction: column;
}
#inputComent{
    background: var(--main-500);
    color: var(--text-100);
    font-size: 16px;
    padding: 10px;
    min-height: 100px;
    border: none;
    resize: none;
}
#inputComent:focus{
    outline: none;
}
#sendComent{
    background-color: transparent;
    border: solid 1px var(--second-400);
    color: var(--text-100);
    font-size: 18px;
    cursor: pointer;
    padding: 5px 0;
}
#sendComent:hover{
    background-color: var(--text-100);
    color: var(--second-900);
}

/* Comments */
/* MDRED */
.mdred{
    display: flex;
    justify-content: space-evenly;
    width: 100vw;
    min-height: 75vh;
    margin-top: 10px;
}
.md{
    width: 45vw;
}
#MdRed{
    resize: none;
    width: 45vw;
    min-height: 100%;
    background: var(--main-800);
    color: var(--main-100);
    border-radius: 5px;
    border: solid 3px var(--main-500);
    padding: 10px;
}
#MdRed:focus{
    outline: none;
}
.buttonsControl{
    margin-top: 10px;
    width: 100vw;
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
}
.buttonsControl > button{
    background-color: transparent;
    border: none;
    cursor: pointer;
    color: var(--text-100);
    margin: 0 10px;
}
.buttonsControl > button:hover{
    color: var(--main-300);
}   
.buttonsControl > button:active{
    color: var(--main-400);
}   
.modal{
    display: flex;
    flex-direction: column;
    position: fixed;
    top: calc(50% - 50px);
    left: calc(50% - 200px);
    background: var(--main-500);
    width: 400px;
    height: 100px;
    padding: 10px;
    z-index: 3;
}
#text{
    font-size: 20px;
}
#back{
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: #1717188b;
    z-index: 2;
}
.buttons{
    display: flex;
    flex-direction: column;

}
.modalBtn{
    padding: 5px 0;
    margin-bottom: 5px;
    background: var(--main-500);
    color: var(--text-100);
    cursor: pointer;
    border: solid 2px var(--text-100);
}
.modalBtn:hover{
    background: var(--text-200);
    color: var(--main-900);
}
/*  */
/* Phone */
@media screen and (max-width: 992px) {
    .head{
        width: 100vw;
        margin-left: 0;
        margin-top: 0;
        border-radius: 0;
    }
    .head > h1{
        display: flex;
        justify-content: center;
        align-items: center;
        font-size: 100px;
    }
    .cat{
        position: absolute;
        top: 0;
        left: calc(50% - 20px);
        width: 40px;
        height: 40px;
        background: url("./src/s_inc/lie_cat.svg");
        color: var(--text-100);
    }

    .info{
        width: 90vw;
    }
    .inputComment{
        width: 90vw;
    }
    .comms{
        width: 90vw;
    }


    .ulErr{
        left: 2%;
        opacity: 0.1;
    }
    .ulErr > li{
        margin-top: 1vh;
    }
    th,td {
	    padding: 5px 2px;
	    color: #fff;
    }

    .mdred{
        flex-direction: column;
        justify-content: center;
        align-items: center;

        &>.md{
            width: 90vw;
        }
    }
    #MdRed {
        width: 90vw;
    }
}

