body {
    font-family: Arial, sans-serif;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    background-color: #f5f5f5;
}

.search-container {
    text-align: center;
    margin-bottom: 30px;
}

#searchInput {
    padding: 10px;
    width: 300px;
    font-size: 16px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

#searchButton {
    padding: 10px 20px;
    font-size: 16px;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

#searchButton:hover {
    background-color: #45a049;
}

.loading {
    text-align: center;
    display: none;
}

.pair-card {
    background-color: white;
    padding: 15px;
    margin-bottom: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.price-up {
    color: #4CAF50;
}

.price-down {
    color: #f44336;
}

.error {
    color: #f44336;
    text-align: center;
}

.token-image {
    width: 40px;
    height: 40px;
    border-radius: 20px;
    margin-right: 10px;
}

.token-header {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-bottom: 10px;
}

.info-grid p {
    margin: 0;
}

.stats-container {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin: 10px 0;
    font-size: 0.9em;
}

.stats-box {
    background: #f8f9fa;
    padding: 8px;
    border-radius: 4px;
}

.stats-box h5 {
    margin: 0 0 5px 0;
    font-size: 0.9em;
    color: #666;
}

.stats-box p {
    margin: 0;
}

.chain-selector {
    text-align: center;
    margin: 10px 0 20px;
}

.chain-selector label {
    margin: 0 15px;
    cursor: pointer;
}

.chain-selector input[type="checkbox"] {
    margin-right: 5px;
}

.copy-btn {
    padding: 2px 8px;
    background: #f0f0f0;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    height: 26px;
    line-height: 22px;
    box-sizing: border-box;
}

.copy-btn:hover {
    background: #e0e0e0;
}

.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 10px 20px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border-radius: 4px;
    font-size: 14px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.toast.show {
    opacity: 1;
}

.address-container {
    display: flex;
    align-items: center;
    gap: 8px;
}

.address-text {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
}

.address-text a {
    display: inline-block;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.action-buttons {
    display: flex;
    gap: 8px;
    align-items: center;
    height: 26px;
}

.buy-btn {
    padding: 2px 8px;
    background: #4CAF50;
    border: 1px solid #45a049;
    color: white;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    height: 26px;
    line-height: 22px;
    box-sizing: border-box;
}

.buy-btn:hover {
    background: #45a049;
}

/* 移动端适配样式 */
@media screen and (max-width: 768px) {
    body {
        padding: 10px;
    }

    .search-container {
        margin-bottom: 20px;
    }

    #searchInput {
        width: calc(100% - 20px);
        margin-bottom: 10px;
    }

    #searchButton {
        width: 100%;
    }

    .info-grid {
        grid-template-columns: 1fr;
    }

    .stats-container {
        display: flex;
        flex-direction: row;
        overflow-x: auto;
        gap: 8px;
        padding: 5px 0;
        margin: 10px -10px;
        width: calc(100% + 20px);
        -webkit-overflow-scrolling: touch;
    }

    .stats-box {
        flex: 0 0 auto;
        min-width: 100px;
        padding: 8px;
        margin: 0 5px;
        font-size: 0.8em;
        border: 1px solid #eee;
    }

    .stats-box h5 {
        font-size: 0.9em;
        margin-bottom: 3px;
    }

    .stats-box p {
        margin: 2px 0;
    }

    .address-container {
        display: grid;
        grid-template-columns: 1fr auto;
        align-items: center;
        gap: 8px;
    }

    .address-text {
        font-size: 0.9em;
        min-width: 0;
        width: 100%;
    }

    .address-text a {
        max-width: calc(100% - 70px);
    }

    .action-buttons {
        display: inline-flex;
        gap: 8px;
        align-items: center;
        height: 26px;
        white-space: nowrap;
    }

    .copy-btn, .buy-btn {
        height: 26px;
        line-height: 22px;
        padding: 0 8px;
        display: flex;
        align-items: center;
        justify-content: center;
        margin: 0;
        vertical-align: middle;
        box-sizing: border-box;
        min-width: 40px;
        min-height: 44px;
        touch-action: manipulation;
    }

    .token-header {
        flex-wrap: wrap;
    }

    .token-header h3 {
        font-size: 1.1em;
    }

    .token-image {
        width: 32px;
        height: 32px;
    }

    .token-header div:last-child {
        width: 100%;
        margin-top: 5px;
    }

    .toast {
        left: 50%;
        transform: translateX(-50%);
        width: calc(100% - 40px);
        text-align: center;
    }

    .stats-container::-webkit-scrollbar {
        height: 4px;
    }

    .stats-container::-webkit-scrollbar-track {
        background: #f1f1f1;
    }

    .stats-container::-webkit-scrollbar-thumb {
        background: #888;
        border-radius: 2px;
    }

    .stats-container::-webkit-scrollbar-thumb:hover {
        background: #555;
    }
}

/* 针对超小屏幕的额外优化 */
@media screen and (max-width: 480px) {
    .stats-container {
        grid-template-columns: 1fr;
    }

    .chain-selector label {
        display: block;
        margin: 5px 0;
    }

    .pair-card {
        padding: 10px;
    }
}

/* 暗色模式支持 */
@media (prefers-color-scheme: dark) {
    body {
        background-color: #1a1a1a;
        color: #fff;
    }

    .pair-card {
        background-color: #2d2d2d;
    }

    .stats-box {
        background: #363636;
    }

    .copy-btn {
        background: #404040;
        border-color: #505050;
        color: #fff;
    }

    .copy-btn:hover {
        background: #505050;
    }

    a {
        color: #66b3ff;
    }

    .stats-box h5 {
        color: #aaa;
    }

    .buy-btn {
        background: #45a049;
        border-color: #4CAF50;
    }

    .buy-btn:hover {
        background: #4CAF50;
    }

    /* 暗色模式下的滚动条样式 */
    @media screen and (max-width: 768px) {
        .stats-container::-webkit-scrollbar-track {
            background: #2d2d2d;
        }

        .stats-container::-webkit-scrollbar-thumb {
            background: #666;
        }

        .stats-box {
            border-color: #444;
        }
    }
} 