html, body {
    margin:0;
    padding:0;
    height: 100%;  
    font-family: "Microsoft Jhenghei", "Avant Garde", sans;         
    background: linear-gradient(to right, #42424C, #474752, #4C4C57);
}

/* 任務清單主體 */
main {
    height:auto;
    width: 606px;
    margin:0 auto;
    margin-top: 15px;
    padding:18px 12px;  
    border-radius:15px;
}

ul {
    margin-bottom: 0;
    padding-left: 0;
}

ul li {
    list-style: none;
    font-weight: 700;
    margin: 0;
    display: inline-block;    
    cursor: pointer;
    border-radius: 7px 7px 0 0;
}

/* 未完成頁籤 */
ul li:nth-child(1) {
    background-color: #87A0C0;    
}

ul li:nth-child(1):hover {
    background-color: #374D6D;
}

/* 已完成頁籤 */
ul li:nth-child(2) {
    background-color: #DE6847;    
}

ul li:nth-child(2):hover {
    background-color: #9C371C;
}

/* 所有頁籤 */
ul li:nth-child(3) {
    background-color: #858585;    
}

ul li:nth-child(3):hover {
    background-color: #5C5C5C;
}

ul li:hover {
    transition: 0.5s;
}

li a {
    color: #ffffff;
    text-shadow: 1px 1px 0 #000;    
    text-decoration: none;
    padding: 0 3rem;
}

/* list標題 */
h2 {
    color: #ffffff;
    margin: 0 auto;
    padding: 0.3rem 0;
    text-align: center;
    text-shadow: 1px 1px 0 #ffffff,
                 2px 2px 0 #000,
                 3px 3px 0 #000;
    background-color: #87A0C0; 
    border-top-right-radius: 15px;
    transition: 0.7s;
}

/* 結尾未完成項目提示 */
.tip {
    margin-bottom: 0;
    color: rgb(113 113 122);
    font-size: 14px;
}

/* 任務主體 */
section {
    background-color: #ffffff;
    padding: 0.8rem;
    border-radius: 0 0 15px 15px;
}

section:hover {  
    box-shadow: 0px 5px 0px #E0E0E0;
}

/* 任務清單 */
ol {
    list-style-type: none;   
    padding-left: 0; 
    counter-reset: olListCount;
}

ol li:before {
    font-weight: 700;
    padding: 0 0.5rem;
    margin-right: 0.2rem;       
    border-radius: 10px;    
    background-color: #fff;       
    counter-increment: olListCount;
    content: counter(olListCount);
}
  
ol li {
    font-weight: 800;
    padding: 0.7rem;
    margin: 0.6rem 0;
    border-radius: 10px;
    background-color: #D3BA9C;
    position: relative;
}

li:has(> .completed) {
    background-color: #E8E8E8;
}

.completed {
    color: #8F8F8F;
    text-decoration: line-through;
}

/* 輸入任務名稱文字框 */
input[type="text"] {
    font-size: 16px;
    background-color: transparent;
    border: 0;
    box-shadow: 0px 1px 0px #F4F5F6,
                0px 2px 0px #886444,
                0px 3px 0px #886444;
    outline: none;
}

input[type="text"]:hover {
    background-color: #F4F5F6;
}

::placeholder {
    color:#0F0506;
}

/* 新增任務btn */
#add {
    color:#ffffff;  
    font-size: 24px;
    border: none;
    border-radius: 5px;
    outline: none;
    background-color: #B58F6D;
    box-shadow:2px 2px 0px #886444;  
}

#add:hover {
    background-color: #886444;
    cursor: pointer;
}

/* 核取方塊 */
input[type="checkbox"] {
    height: 20px;
    width: 20px;  
    vertical-align: text-top;    
    border-radius: 7px;
    cursor: pointer;
    outline: none;
}

/* 刪除任務trash */
.remove {
    color:#ffffff;  
    font-size: 16px;
    font-weight: 700;
    text-align: right;
    border: none;
    border-radius: 5px;
    outline: none;   
    background-color: #A90007;
    box-shadow:2px 2px 0px #7A0000;  
}

.remove:hover {
    background-color: #7A0000;
    cursor: pointer;
}

/* 刪除全部任務btn */
#removeAll {
    color:#ffffff;  
    font-size: 16px;
    font-weight: 700;
    border: none;
    border-radius: 5px;
    padding: 1% 2%;
    outline: none;    
    background-color: #A90007;
    box-shadow:2px 2px 0px #7A0000;  
}

#removeAll:hover {
    background-color: #7A0000;
    cursor: pointer;
}

/* 置頂按鈕 */
#topButton {    
    position: fixed;
    right: 20px;
    bottom: 20px;
    padding: 7px 17px;
    font-size: 20px;
    color:#fff;
    background: #87A0C0;
    box-shadow:5px 5px 0px #466386;  
    cursor: pointer;
    border-radius: 10px;
}
  
#topButton:hover {
    background-color: #fff;
    box-shadow:3px 3px 0px #EFEFEF;   
    color: #000;
}

@media screen and (max-width:650px) {
    ul li {
        width: 100%;
        border-radius: 0; 
        text-align: center;    
    }

    main {
        margin: 0 auto;  
        width: auto;                   
    }

    h2 {
        border-top-right-radius: 0;  
    }

	input[type=text] {
        width:100%;
    }    

    #add {
        margin-top: 0.5rem;
    }

}
