body {
    background-color:rgba(160, 160, 160, 0.005);
    color:rgb(46, 49, 52);
    font-family: 'Roboto', sans-serif;
}

header{
    position: fixed; /* 固定位置 */
    top: 0; /* 固定在視窗頂部 */
    left: 0; /* 固定在視窗左側 */
    width: 100%; /* 填滿視窗寬度 */
    background-color: rgb(182, 182, 182);
    padding: 5px 0;
    text-align: center;
}

section{
    position: fixed;
    display: flex;
    top: 100px;
}
.spot, .lastprice, .change{
    display: inline-block;
    position: relative;
}
section .spot{
    position: flex;
    left: 11px;
}

section .lastprice{
    position: flex;
    left: 205px;
}

section .change{
    position: flex;
    left: 315px;
}

.image-container1{
    display: flex;
    align-items: center; 
    margin-top: 150px;
}
.image-container1 img, .image-container2 img{
    width: 65px;
    height: auto;
    margin-right: 15px;
    border-radius: 50%;
}
.image-container2{
    display: flex;
    align-items: center;
    margin-top: 30px; 
}
#eth-price, #ada-price, #btc-price, #snek-price, #btc-change, #eth-change, #ada-change, #snek-change{
    display: inline; /* 讓 div 與 h2 顯示在同一行 */
}

.btcclass{
    position:relative;
    left:70px;
}
.ethclass{
    position:relative;
    left:85px;
}
.adaclass{
    position:relative;
    left:95px;
}
.snekclass{
    position:relative;
    left:40px;
}

.btcchange{
    position:relative;
    left: 200px;
}

.ethchange{
    position:relative;
    left: 215px;
}

.adachange{
    position:relative;
    left: 225px;
}

.snekchange{
    position:relative;
    left: 170px;
}

/* 媒體查詢 - 小於 390px 寬度（適配 iPhone 13 Pro） */
@media(max-width: 390px) {
    header {
        position:fixed;
        font-size: 10px;
        padding: 20px 0;
        width: 100%; /* 保證寬度是 100% */
        margin: 0 auto; /* 水平居中 */
        text-align: center;
    }
    

    h3{
        font-size:15px;
    }

    h2{
        font-size:18px;
    }

    .spot, .lastprice, .change{
        display: inline-block;
        position: relative;
    }

    section .spot{
        position: flex;
        left: 1px;
    }
    
    section .lastprice{
        position: flex;
        left: 115px;
    }
    
    section .change{
        position: flex;
        left: 165px;
    }

    .image-container1{
        display: flex;
        align-items: center; 
        margin-top: 150px;
    }

    .image-container1 img, .image-container2 img{
        width: 40px;
        height: auto;
        margin-right: 15px;
        border-radius: 50%;
    }

    .image-container2{
        display: flex;
        align-items: center; 
        margin-top: 50px;
    }

    #eth-price, #ada-price, #btc-price, #snek-price,
    #btc-change, #eth-change, #ada-change, #snek-change {
        display: inline;
        font-size: 10px; 
    }
    .btcclass{
        position:relative;
        left:65px;
    }
    .ethclass{
        position:relative;
        left:73px;
    }
    .adaclass{
        position:relative;
        left:75px;
    }
    .snekclass{
        position:relative;
        left:48px;
    }

    .btcchange{
        position:relative;
        left: 171px;
    }
    
    .ethchange{
        position:relative;
        left: 174px;
    }
    
    .adachange{
        position:relative;
        left: 181px;
    }
    
    .snekchange{
        position:relative;
        left: 154px;
    }
}