/* 基础样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Toast */
.toast {
    position: fixed;
    left: 50%;
    bottom: 130px;
    transform: translateX(-50%);
    background: rgba(0,0,0,.8);
    color: #fff;
    padding: 10px 16px;
    border-radius: 8px;
    display: none;
  }

body {
    font-family: 'Arial', sans-serif;
    background-color: #f7f7f7;
    color: #333;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

/* Header 样式 */
header {
    background-color: #000000;
    color: white;
    padding: 28px 0;
}

header h1 {
    font-size: 32px;
    text-align: center;
    margin-bottom: 10px;
}

header nav {
    display: flex;
    justify-content: center;
    gap: 20px;
}

header nav a {
    color: white;
    text-decoration: none;
    font-size: 16px;
    padding: 8px 50px;
    background-color: #000000;
    border-radius: 30px;
    transition: background-color 0.3s;
}

header nav a:hover {
    background-color: #ff9800;
}

/* 主体部分样式 */
.coin-list-section {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding-bottom: 60px;
}

.coin-list-section h2 {
    text-align: center;
    font-size: 24px;
    margin-bottom: 30px;
}

.coin-list {
    padding: 10px 5px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 8px;
}

.coin-item {
    display: flex;
    align-items: center;
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    padding: 10px;
    transition: transform 0.3s, box-shadow 0.3s;
}

/* .coin-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
} */

.coin-item h3 {
    font-size: 15px;
    margin-bottom: 10px;
    color: #4caf50;
}

.coin-item p {
    font-size: 14px;
    margin-bottom: 5px;
    color: #555;
}

.coin-item .price {
    font-size: 18px;
    color: #333;
    font-weight: bold;
}

.coin-item .change {
    font-size: 16px;
    color: #e91e63;
    font-weight: bold;
}

.coin-item .volume {
    font-size: 14px;
    color: #777;
    margin-bottom: 20px;
}

.coin-item a {
    display: inline-block;
    background-color: #4caf50;
    color: white;
    text-decoration: none;
    padding: 5px 10px;
    border-radius: 5px;
    font-weight: bold;
    transition: background-color 0.3s;
}

.coin-item a:hover {
    background-color: #388e3c;
}

/* Footer 样式 */
footer {
    text-align: center;
    padding: 20px;
    background-color: #333;
    color: white;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    display: flex;
    justify-content: space-around;
}

footer a{
    color: #fff;
    text-decoration: none;
    font-weight: bold;
}
/* 关注列表样式 */
.favourites-list-section {
    padding: 18px 0 0;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.favourites-list-section h2 {
    text-align: center;
    font-size: 24px;
    margin-bottom: 30px;
}

.favourites-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.favourites-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.favourites-item h3 {
    font-size: 15px;
    color: #4caf50;
}

.favourites-item a {
    background-color: #4caf50;
    color: white;
    text-decoration: none;
    padding: 6px 16px;
    border-radius: 5px;
}

.favourites-item button {
    background-color: #e91e63;
    color: white;
    border: none;
    padding: 6px 16px;
    border-radius: 5px;
    cursor: pointer;
}

.favourites-item button:hover {
    background-color: #c2185b;
}

/* 图表容器样式 */
.chart-container {
    padding: 20px 0;
    background-color: #fff;
    margin-bottom: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.coin-detail p{
    margin: 5px 0;
}
.favourite-btn {
    display: block;
    width: 200px;
    margin: 20px auto 86px;
    padding: 12px 0;
    text-align: center;
    background-color: #4caf50;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 18px;
    cursor: pointer;
}

.favourite-btn:hover {
    background-color: #388e3c;
}

/* 响应式设计 */
@media (max-width: 768px) {
    header nav {
        /* flex-direction: column; */
        gap: 10px;
    }

    .coin-list {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }
}
