* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Arial', sans-serif;
}

body {
    background-color: #1c1c1e;
    color: #ffffff;
    line-height: 1.6;
    min-height: 100vh;
    position: relative;
    padding-bottom: 60px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.top-nav {
    background: #1e1e20;
    padding: 15px 0;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    width: 100%;
}

.nav-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    .github-link {
        color: #ffffff;
        transition: color 0.3s ease;
    }
    
    .github-link:hover {
        color: #ffd700;
    }
    
    .nav-content {
        display: flex;
        justify-content: space-between;
        align-items: center;
    }
}

.logo-small {
    display: flex;
    align-items: center;
    gap: 10px;
}

.back-button {
    padding: 10px 20px;
    background: #ffd700;
    color: #000000;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.logo-small img {
    height: 30px;
    width: auto;
    object-fit: contain;
}

.logo-small span {
    font-size: 20px;
    font-weight: 600;
    color: #ffffff;
    line-height: 30px;
}

.center-content {
    padding-top: 60px;
    min-height: calc(100vh - 120px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    max-width: 800px;
    margin: 0 auto;
}

.center-content h2 {
    text-align: center;
}

.main-logo {
    width: 20vw;
    max-width: 200px;
    height: auto;
    border-radius: 16px;
    overflow: hidden;
}

h1 {
    font-size: 48px;
    margin: 20px 0 10px;
}

h2 {
    margin: 0 0 20px;
    color: #ffd700;
    font-size: 14px;
    font-weight: normal;
}

.search-box {
    display: flex;
    gap: 10px;
    width: 100%;
    flex-wrap: wrap;
}

.token-input {
    flex: 1 1 100%;
    min-width: 200px;
    padding: 10px 15px;
    border: 1px solid #333;
    border-radius: 8px;
    background-color: #1c1c1e;
    color: #ffffff;
    transition: border-color 0.3s ease;
}

.token-input:hover,
.token-input:focus {
    border-color: #ffd700;
    outline: none;
}

.selector-row {
    display: flex;
    gap: 10px;
    flex: 1 1 100%;
}

.chain-selector,
.model-selector {
    padding: 10px 15px;
    border: 1px solid #333;
    border-radius: 8px;
    background-color: #1c1c1e;
    color: #ffffff;
    cursor: pointer;
    transition: border-color 0.3s ease;
    appearance: none;
    -webkit-appearance: none;
}

.chain-selector {
    width: 100px;
    background-image: url('../down.svg');
    background-repeat: no-repeat;
    background-position: calc(100% - 10px) center;
    background-size: 12px;
    padding-right: 30px;
}

.model-selector {
    width: 130px;
    background-image: url('../chatgpt.svg'), url('../down.svg');
    background-repeat: no-repeat;
    background-position: 10px center, calc(100% - 10px) center;
    background-size: 20px, 12px;
    padding-left: 40px;
    padding-right: 30px;
    text-align: center;
    text-indent: -15px;
}

@media screen and (max-width: 768px) {
    .model-selector {
        width: 150px;
        padding-left: 45px;
    }
}

.chain-selector:hover,
.model-selector:hover,
.chain-selector:focus,
.model-selector:focus {
    border-color: #ffd700;
    outline: none;
}

.search-button {
    padding: 10px 20px;
    background-color: #ffd700;
    color: #000000;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s;
}

.search-button:hover {
    background-color: #ffed4a;
}

/* Results Container */
.results-container {
    display: none;
    position: absolute;
    top: 60px;
    left: 0;
    right: 0;
    bottom: 60px;
    z-index: 1000;
    background: #1a1a1a;
    padding: 20px;
    box-sizing: border-box;
}

.results-container[style*="display: flex"] {
    display: flex !important;
}

.results-content {
    display: flex;
    gap: 20px;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    box-sizing: border-box;
}

.json-display,
.chat-content {
    min-height: 100px;
    visibility: visible;
    opacity: 1;
    background: #1e1e20;
    border-radius: 12px;
    flex: 1;
    overflow-y: auto;
}

@media screen and (max-width: 768px) {
    .results-container {
        bottom: 110px; 
    }

    .results-content {
        flex-direction: column;
        height: 88%;
    }

    .results-content > div {
        display: none !important; 
    }

    .results-content > div.active {
        display: block !important; 
        height: 100%;
    }

    .results-tabs {
        display: flex;
        position: fixed;
        bottom: 60px; 
        left: 0;
        right: 0;
        background: #1e1e20;
        padding: 10px;
        justify-content: space-around;
        z-index: 1001;
        border-top: 1px solid #333;
    }

    .tab {
        padding: 8px 16px;
        border-radius: 4px;
        cursor: pointer;
        color: #808080;
        flex: 1;
        text-align: center;
    }

    .tab.active {
        background: #2c2c2e;
        color: #ffffff;
    }
}

@media screen and (min-width: 769px) {
    .results-container {
        height: calc(100vh - 120px); 
    }

    .results-content {
        display: flex;
        flex-direction: row;
        height: 90%;
    }

    .json-display,
    .chat-content {
        display: block !important;
        flex: 1;
        max-width: 50%;
    }

    .results-tabs {
        display: none;
    }
}

.close-results {
    position: fixed;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    color: #ffffff;
    font-size: 24px;
    cursor: pointer;
    z-index: 1001;
}

.json-display {
    padding: 20px;
    color: #ffffff;
}

.json-display h1 {
    color: #ffd700;
    font-size: 24px;
    margin-bottom: 20px;
}

.json-display h2 {
    color: #ffd700;
    font-size: 20px;
    margin: 20px 0;
}

.json-display h3 {
    color: #ffd700;
    font-size: 18px;
    margin: 15px 0;
}

.json-display p {
    margin: 10px 0;
    line-height: 1.6;
}

.json-display ul {
    list-style-type: none;
    padding-left: 20px;
}

.json-display li {
    margin: 8px 0;
}

.json-display code {
    background: #2c2c2e;
    padding: 2px 6px;
    border-radius: 4px;
}

.chat-content {
    display: flex;
    flex-direction: column;
    position: relative;
    height: 100%;
}

.chat-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    height: 90%;
}

.chat-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    height: calc(100% - 70px); 
}

.chat-input-container {
    width: 100%;
    position: absolute;
    bottom: 0;
    border-top: 1px solid #333;
    padding: 15px;
    display: flex;
    background: #1e1e20;
    z-index: 100;
    height: 70px;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
}

.message {
    display: inline-flex;
    align-items: flex-start;
    margin-bottom: 15px;
    padding: 12px;
    border-radius: 8px;
    gap: 12px;
    max-width: 80%;
}

.message-avatar img {
    width: 30px;
    height: 30px;
    border-radius: 50%;
}

.message-content {
    flex: 1;
    min-width: 0;
    word-wrap: break-word;
}

.assistant-message {
    background: #1c1c1e;
    align-self: flex-start;
}

.user-message {
    background: #2c2c2e;
    align-self: flex-end;
    flex-direction: row-reverse;
}

.user-message .message-content {
    text-align: right;
}

.chat-input {
    flex-grow: 1;
    padding: 10px 15px;
    border: 1px solid #333;
    border-radius: 4px 0 0 4px;
    background: #1c1c1e;
    color: #ffffff;
    transition: border-color 0.3s ease;
}

.chat-input:hover,
.chat-input:focus {
    border-color: #ffd700;
    outline: none;
}

.chat-send {
    padding: 10px 20px;
    background: #ffd700;
    color: #000000;
    border: none;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
    transition: background-color 0.3s;
}

.chat-send:hover {
    background: #ffed4a;
}

.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.9);
    display: none;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    z-index: 100000;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 3px solid #ffd700;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

.loading-text {
    color: #fff;
    font-size: 16px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

footer {
    background: #1e1e20;
    color: #666;
    text-align: center;
    padding: 15px 0;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    width: 100%;
}

footer p {
    font-size: 12px;
}

.json-display::-webkit-scrollbar,
.chat-messages::-webkit-scrollbar {
    width: 8px;
}

.json-display::-webkit-scrollbar-track,
.chat-messages::-webkit-scrollbar-track {
    background: #1e1e20;
}

.json-display::-webkit-scrollbar-thumb,
.chat-messages::-webkit-scrollbar-thumb {
    background: #333333;
    border-radius: 4px;
}

.json-display::-webkit-scrollbar-thumb:hover,
.chat-messages::-webkit-scrollbar-thumb:hover {
    background: #404040;
}

.json-display,
.chat-messages {
    scrollbar-width: thin;
    scrollbar-color: #333333 #1e1e20;
}

@media screen and (min-width: 769px) {
    .search-box {
        flex-wrap: nowrap;
    }

    .token-input {
        flex: 2;
    }

    .selector-row {
        flex: 2;
    }

    .chain-selector,
    .model-selector {
        min-width: 100px;
    }
}

@media screen and (max-width: 768px) {
    .search-box {
        flex-direction: column;
    }

    .chain-selector,
    .model-selector {
        flex: 1;
        min-width: 120px;
    }

    .search-button {
        width: 50px;
        flex-shrink: 0;
    }

    .main-logo {
        width: 30vw;
    }
}

.token-input,
.chain-selector,
.model-selector {
    padding: 12px 15px;
    min-height: 48px;
}

.search-button {
    min-height: 48px;
    min-width: 48px;
}

.chat-input {
    padding: 12px 15px;
    min-height: 48px;
}

.chat-send {
    padding: 12px 20px;
    min-height: 48px;
    min-width: 60px;
}

@media screen and (max-width: 768px) {
    .chat-input-container {
        padding: 10px;
        min-height: 68px;
    }
    
    .tab {
        padding: 12px 16px;
        min-height: 44px;
    }
}

.social-links {
    display: flex;
    gap: 20px;
    align-items: center;
}

.social-link {
    color: #ffffff;
    transition: color 0.3s ease;
    display: flex;
    align-items: center;
}

.social-link:hover {
    color: #ffd700;
}

@media screen and (max-width: 768px) {
    .social-links {
        gap: 15px;
    }
    
    .social-link svg {
        height: 20px;
        width: 20px;
    }
}

/* 添加合作伙伴样式 */
.partners {
    margin-top: 40px;
    width: 100%;
    max-width: 800px;
    overflow: hidden;
}

.partners h3 {
    color: #ffd700;
    font-size: 24px;
    margin-bottom: 30px;
    text-align: center;
}

.partners-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    padding: 20px;
}

.partner-logo {
    width: 100%;
    height: auto;
    border-radius: 12px;
    transition: transform 0.3s ease;
}

.partner-logo:hover {
    transform: scale(1.05);
}

@media screen and (max-width: 768px) {
    .partners {
        margin-top: 30px;
    }

    .partners h3 {
        font-size: 20px;
        margin-bottom: 20px;
    }

    .partners-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
        padding: 15px;
    }
}

.supported-chains {
    margin-top: 40px;
    width: 100%;
    max-width: 800px;
    overflow: hidden;
}

.supported-chains h3 {
    color: #ffd700;
    font-size: 24px;
    margin-bottom: 30px;
    text-align: center;
}

.chain-track {
    position: relative;
    width: 100%;
    height: 140px;
    overflow: hidden;
}

.chain-cards {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    grid-template-rows: repeat(2, 1fr);
    gap: 20px;
    position: absolute;
    width: 200%;
    animation: slide 20s linear infinite;
}

.chain-card {
    background: rgba(30, 30, 32, 0.8);
    border: 1px solid #333;
    border-radius: 12px;
    padding: 12px 20px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 16px;
}

.chain-card:nth-child(n + 9) {
    transform: translateX(30px);
}

.chain-card:hover {
    border-color: #ffd700;
    background: rgba(40, 40, 42, 0.8);
}

@keyframes slide {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

@media screen and (max-width: 768px) {
    .supported-chains {
        margin-top: 30px;
    }

    .supported-chains h3 {
        font-size: 20px;
        margin-bottom: 20px;
    }

    .chain-track {
        height: 100px;
    }

    .chain-card {
        height: 35px;
        padding: 8px 15px;
        font-size: 14px;
    }
}
