:root {
    --primary-color: #2196F3;
    --secondary-color: #1976D2;
    --background-color: #f5f5f5;
    --text-color: #333;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem;
}

h1 {
    text-align: center;
    margin-bottom: 2rem;
    color: var(--primary-color);
}

.search-box {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
}

input[type="text"] {
    flex: 1;
    padding: 0.8rem;
    border: 2px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
}

button {
    padding: 0.8rem 1.5rem;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s;
}

button:hover {
    background-color: var(--secondary-color);
}

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 2rem 0;
    padding: 1rem;
    background: white;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.page-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.page-controls button {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    min-width: 80px;
}

.page-controls span {
    font-size: 1rem;
    color: var(--text-color);
    min-width: 80px;
    text-align: center;
}

.page-controls button:disabled {
    background-color: #ccc;
    cursor: not-allowed;
    opacity: 0.7;
}

select {
    padding: 0.5rem;
    border-radius: 4px;
}

.results-grid {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    margin: 0 -1rem;
    padding: 0 1rem;
}

.tokens-table {
    width: 100%;
    min-width: 800px;
    border-collapse: collapse;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.tokens-table th,
.tokens-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.tokens-table th {
    background: var(--primary-color);
    color: white;
    font-weight: 500;
    white-space: nowrap;
}

.tokens-table tr:hover {
    background: #f8f9fa;
}

.logo-cell {
    width: 50px;
}

.token-logo {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

.no-logo {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #eee;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    color: #666;
}

.contract-cell {
    min-width: 120px;
}

.contract-address {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.contract-address .address {
    font-family: monospace;
    letter-spacing: 0.5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.copy-btn {
    padding: 0.25rem;
    background: none;
    border: none;
    cursor: pointer;
    color: #666;
    transition: color 0.2s;
    flex-shrink: 0;
}

.copy-btn:hover {
    color: var(--primary-color);
}

.copy-btn.copied {
    color: #4caf50;
}

.status-badge {
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 500;
    text-transform: uppercase;
}

.status-badge.created {
    background: #e3f2fd;
    color: #1976d2;
}

.status-badge.launched {
    background: #e8f5e9;
    color: #2e7d32;
}

.description-cell {
    max-width: 300px;
    position: relative;
}

.description-wrapper {
    position: relative;
    width: 100%;
}

.description-content {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    transition: all 0.3s ease;
    padding-right: 20px;
}

.description-content.expanded {
    white-space: normal;
    overflow: visible;
    word-break: break-word;
}

.expand-btn {
    position: absolute;
    right: 0;
    bottom: -20px;
    background: none;
    border: none;
    color: var(--primary-color);
    font-size: 0.8rem;
    cursor: pointer;
    padding: 2px 5px;
    transition: opacity 0.2s;
    z-index: 1;
}

.expand-btn:hover {
    text-decoration: underline;
}

.expand-btn .collapse-text {
    display: none;
}

.description-wrapper.expanded .expand-btn .expand-text {
    display: none;
}

.description-wrapper.expanded .expand-btn .collapse-text {
    display: inline;
}

.tokens-table td {
    position: relative;
    padding-bottom: 1.5rem;
    vertical-align: top;
}

.token-card {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: transform 0.2s;
}

.token-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.token-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.description {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.market-data {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 4px;
}

.data-item {
    display: flex;
    flex-direction: column;
}

.data-item .label {
    font-size: 0.8rem;
    color: #666;
}

.data-item .value {
    font-weight: 600;
    color: var(--primary-color);
}

.contract-info {
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.contract-info a {
    color: var(--primary-color);
    text-decoration: none;
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.social-link {
    padding: 0.5rem 1rem;
    border-radius: 4px;
    text-decoration: none;
    color: white;
    font-size: 0.9rem;
    background: var(--primary-color);
}

.social-link:hover {
    background: var(--secondary-color);
}

.loading {
    display: flex;
    justify-content: center;
    margin: 2rem 0;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.error {
    color: #f44336;
    text-align: center;
    padding: 1rem;
    background: #ffebee;
    border-radius: 4px;
    margin: 1rem 0;
}

.hidden {
    display: none;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.search-filters {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
}

.filters {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    padding: 1rem;
    background: white;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.filter-group label {
    font-size: 0.9rem;
    color: #666;
    white-space: nowrap;
}

.filter-group select {
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: white;
    min-width: 120px;
}

@media (max-width: 1200px) {
    .container {
        padding: 1rem;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0.5rem;
    }

    h1 {
        font-size: 1.5rem;
        margin-bottom: 1rem;
    }

    .search-box {
        flex-direction: column;
        gap: 0.5rem;
        margin-bottom: 1rem;
    }

    .search-box input[type="text"] {
        padding: 0.6rem;
        font-size: 0.9rem;
    }

    .search-box button {
        width: 100%;
        padding: 0.6rem;
    }

    .filters {
        flex-direction: column;
        padding: 0.5rem;
        gap: 0.5rem;
    }

    .filter-group {
        width: 100%;
    }

    .filter-group select,
    .filter-input {
        width: 100%;
    }

    .results-grid {
        margin: 0 -0.5rem;
        padding: 0 0.5rem;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .tokens-table {
        font-size: 0.75rem;
    }

    .tokens-table th,
    .tokens-table td {
        padding: 0.5rem;
    }

    .logo-cell {
        width: 32px;
        min-width: 32px;
    }

    .token-logo {
        width: 24px;
        height: 24px;
    }

    .contract-cell {
        width: 80px;
        min-width: 80px;
    }

    .contract-address {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }

    .contract-address .address {
        font-size: 0.75rem;
        width: 100%;
    }

    .copy-btn {
        padding: 0.2rem;
        margin-left: 0;
    }

    .copy-btn svg {
        width: 12px;
        height: 12px;
    }

    .pagination {
        margin: 1rem 0;
        padding: 0.5rem;
    }

    .page-controls {
        gap: 0.25rem;
    }

    .page-controls button {
        padding: 0.4rem;
        min-width: 60px;
        font-size: 0.8rem;
    }

    .status-badge {
        padding: 0.2rem 0.4rem;
        font-size: 0.7rem;
    }

    .expand-btn {
        font-size: 0.7rem;
        bottom: -14px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0.5rem;
    }

    .results-grid {
        margin: 0 -0.5rem;
        padding: 0 0.5rem;
    }

    .tokens-table th,
    .tokens-table td {
        padding: 0.5rem;
        font-size: 0.75rem;
    }

    .contract-cell {
        width: 70px;
        min-width: 70px;
    }

    .contract-address .address {
        font-size: 0.7rem;
    }

    .copy-btn {
        padding: 0.15rem;
    }

    .copy-btn svg {
        width: 10px;
        height: 10px;
    }
}

@media (max-width: 896px) and (orientation: landscape) {
    .container {
        padding: 0.75rem;
        max-width: none;
    }

    .results-grid {
        margin: 0 -0.75rem;
        padding: 0 0.75rem;
    }

    .tokens-table {
        min-width: 900px;
    }
}

.checkbox-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.checkbox-group input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.checkbox-group label {
    cursor: pointer;
    user-select: none;
}

.pump-cell {
    font-weight: 600;
}

.pump-cell.positive-pump {
    color: #4caf50;
}

.pump-cell.negative-pump {
    color: #f44336;
}

.tokens-table td {
    white-space: nowrap;
}

.pump-cell {
    min-width: 80px;
}

.filter-input {
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.9rem;
    min-width: 250px;
    transition: border-color 0.2s;
}

.filter-input:focus {
    border-color: var(--primary-color);
    outline: none;
}

.filter-input::placeholder {
    color: #999;
    font-size: 0.8rem;
}

.results-grid::-webkit-scrollbar {
    height: 6px;
}

.results-grid::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.results-grid::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 3px;
}

/* 超小屏幕设备优化 */
@media screen and (max-width: 320px) {
    .tokens-table {
        font-size: 0.7rem;
    }

    .tokens-table th,
    .tokens-table td {
        padding: 0.4rem;
    }

    .page-controls button {
        min-width: 50px;
        font-size: 0.75rem;
    }
} 