/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', system-ui, sans-serif;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 50%, #e2e8f0 100%);
    color: #1e293b;
    line-height: 1.6;
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Header Styles */
.header {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border-bottom: 1px solid #e2e8f0;
    box-shadow: 0 1px 3px rgba(30, 64, 175, 0.05);
    position: sticky;
    top: 0;
    z-index: 50;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 0;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.logo-icon {
    width: 2.5rem;
    height: 2.5rem;
    background: linear-gradient(135deg, #1e40af, #1e3a8a);
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.logo h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1e293b;
}

.logo p {
    font-size: 0.875rem;
    color: #6b7280;
}

/* Search Styles */
.search-container {
    flex: 1;
    max-width: 32rem;
    margin: 0 2rem;
}

.search-box {
    position: relative;
}

.search-icon {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
}

.search-box input {
    width: 100%;
    padding: 0.85rem 1.2rem 0.85rem 2.5rem;
    border: 1px solid #d1d5db;
    border-radius: 1rem;
    background: rgba(255,255,255,0.7);
    font-size: 1.05rem;
    transition: box-shadow 0.2s, border-color 0.2s;
    box-shadow: 0 2px 8px rgba(30,64,175,0.06);
}

.search-box input:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 4px rgba(99,102,241,0.12);
}

/* Filter Styles */
.filter-container {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    background: rgba(255,255,255,0.5);
    border-radius: 1rem;
    box-shadow: 0 2px 8px rgba(30,64,175,0.08);
    padding: 0.5rem 1.2rem;
    backdrop-filter: blur(6px);
}

.filter-icon {
    color: #9ca3af;
}

.filter-container select {
    padding: 0.5rem 2rem 0.5rem 1rem;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    font-size: 0.875rem;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 0.5rem center;
    background-repeat: no-repeat;
    background-size: 1.5em 1.5em;
}

.filter-container select:focus {
    outline: none;
    border-color: #1e40af;
    box-shadow: 0 0 0 3px rgba(30, 64, 175, 0.1);
}

/* Get Finloop Button */
.get-finloop-container {
    margin-left: 1rem;
}

.btn-get-finloop {
    background: linear-gradient(135deg, #1e40af 0%, #1e3a8a 100%);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 600;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 4px 6px rgba(30, 64, 175, 0.25);
}

.btn-get-finloop:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(30, 64, 175, 0.35);
    background: linear-gradient(135deg, #1e3a8a 0%, #1e293b 100%);
}

.btn-get-finloop:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(30, 64, 175, 0.25);
}

/* Main Content */
.main {
    padding: 2rem 0;
}

.section-header {
    margin-bottom: 1.5rem;
}

.section-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 0.5rem;
}

.section-header p {
    color: #6b7280;
}

/* Token Grid */
.tokens-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.token-card {
    background: rgba(255,255,255,0.7);
    border: 1px solid #e0e7ef;
    border-radius: 1.25rem;
    padding: 1.5rem 1.2rem;
    cursor: pointer;
    transition: box-shadow 0.3s, transform 0.2s;
    box-shadow: 0 8px 32px rgba(30, 64, 175, 0.12), 0 1.5px 6px rgba(30,64,175,0.08);
    backdrop-filter: blur(8px);
}

.token-card:hover {
    box-shadow: 0 16px 32px rgba(30, 64, 175, 0.18), 0 2px 8px rgba(30,64,175,0.12);
    transform: translateY(-4px) scale(1.02);
    border-color: #a5b4fc;
}

.token-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.token-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.token-logo {
    width: 3rem;
    height: 3rem;
    border-radius: 1rem;
    object-fit: cover;
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
    box-shadow: 0 2px 8px rgba(30,64,175,0.08);
}

.token-symbol {
    font-weight: 700;
    color: #1e40af;
    font-size: 1.1rem;
    letter-spacing: 0.02em;
}

.token-name {
    font-size: 1rem;
    color: #374151;
    font-weight: 500;
    margin-top: 0.2rem;
    white-space: normal;
}

.token-addresses {
    margin: 1.2rem 0 0.8rem 0;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.address-section {
    padding: 0.7rem 1rem;
    background: rgba(245,247,255,0.6);
    border-radius: 0.75rem;
    border: 1px solid #e0e7ef;
    box-shadow: 0 1px 4px rgba(30,64,175,0.04);
}

.address-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.address-header svg {
    color: #6b7280;
}

.address-label {
    font-size: 0.75rem;
    color: #6b7280;
    font-weight: 600;
}

.address-value {
    display: block;
    font-size: 0.875rem;
    color: #1e293b;
    font-family: 'Courier New', monospace;
    word-break: break-all;
    line-height: 1.4;
    padding-left: 1.5rem;
}

.copy-address {
     cursor: pointer;
     border-radius: 4px;
     padding: 2px 6px;
     background: none;
     transition: color 0.2s;
     text-decoration: none;
}
 .copy-address:hover {
     color: #1e40af;
}

.token-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.token-buttons .btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.85rem 1.2rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 0.75rem;
}

/* Token Detail */
.token-detail {
    max-width: 1000px;
    margin: 0 auto;
}

/* 优化 info-blocks 样式 */
.detail-info-blocks {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-top: 2rem;
}

.info-block {
    background: linear-gradient(135deg, #f8fafc 0%, #e0e7ff 100%);
    border: 1px solid #c7d2fe;
    border-radius: 1rem;
    box-shadow: 0 2px 8px rgba(30, 64, 175, 0.08);
    padding: 2rem 1.5rem;
    transition: box-shadow 0.2s, transform 0.2s;
}
.info-block:hover {
    box-shadow: 0 6px 24px rgba(30, 64, 175, 0.18);
    transform: translateY(-2px) scale(1.02);
}
.info-block h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1e40af;
    margin-bottom: 1rem;
    letter-spacing: 0.02em;
}
.info-block ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
.info-block li {
    font-size: 1rem;
    color: #374151;
    margin-bottom: 0.75rem;
    padding-left: 0.5rem;
    position: relative;
}
.info-block li:last-child {
    margin-bottom: 0;
}
.info-block li::before {
    content: '';
    display: inline-block;
    width: 6px;
    height: 6px;
    background: #1e40af;
    border-radius: 50%;
    margin-right: 0.5rem;
    vertical-align: middle;
}
.info-block span {
    background: #eef2ff;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    color: #1e40af;
    cursor: pointer;
    transition: background 0.2s;
}
.info-block span:hover {
    background: #c7d2fe;
}
}

@media (max-width: 900px) {
    .detail-info-blocks {
        grid-template-columns: 1fr;
    }
}

.back-button {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #6b7280;
    background: none;
    border: none;
    font-size: 1rem;
    cursor: pointer;
    margin-bottom: 1.5rem;
    transition: color 0.2s;
}

.back-button:hover {
    color: #111827;
}

.detail-header {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 1px 3px rgba(30, 64, 175, 0.05);
}

.detail-header-content {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
}

.detail-token-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.detail-logo {
    width: 4rem;
    height: 4rem;
    border-radius: 0.75rem;
    object-fit: cover;
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
}

.detail-symbol {
    font-size: 2rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 0.25rem;
}

.detail-name {
    font-size: 1.125rem;
    color: #6b7280;
    margin-bottom: 0.5rem;
}

.detail-description {
    font-size: 0.875rem;
    color: #6b7280;
    max-width: 400px;
}

.detail-price-section {
    text-align: right;
}

.detail-current-price {
    font-size: 2.5rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 0.5rem;
}

.detail-price-change {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.25rem;
    font-size: 1.125rem;
    font-weight: 600;
}

.detail-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
}

.chart-container {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(30, 64, 175, 0.05);
}

.chart-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    color: #6b7280;
}

.chart-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #111827;
}

.chart-canvas {
    height: 320px;
}

.stats-container {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.stat-card {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(30, 64, 175, 0.05);
}

.stat-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    color: #6b7280;
}

.stat-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: #111827;
}

.stat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.stat-item:last-child {
    margin-bottom: 0;
}

.stat-label {
    color: #6b7280;
}

.stat-value {
    font-weight: 600;
    color: #1e293b;
}

.trade-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.btn {
    padding: 0.85rem 1.2rem;
    border-radius: 1rem;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: box-shadow 0.2s, background 0.2s;
    border: none;
    box-shadow: 0 2px 8px rgba(30,64,175,0.10);
}

.btn-primary {
    background: linear-gradient(90deg, #1e40af 0%, #6366f1 100%);
    color: #fff;
}

.btn-primary:hover {
    background: linear-gradient(90deg, #6366f1 0%, #1e40af 100%);
}

.btn-secondary {
    background: linear-gradient(90deg, #e0e7ef 0%, #f1f5f9 100%);
    color: #1e293b;
}

.btn-secondary:hover {
    background: #e0e7ef;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
}

.empty-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.4;
}

.empty-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 0.5rem;
}

.empty-description {
    color: #6b7280;
}

/* Responsive Design */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }

    .search-container {
        margin: 0;
    }

    .filter-container {
        justify-content: center;
    }

    .get-finloop-container {
        margin-left: 0;
        margin-top: 0.5rem;
        display: flex;
        justify-content: center;
    }

    .tokens-container {
        grid-template-columns: 1fr;
    }

    .detail-header-content {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    .detail-price-section {
        text-align: center;
    }

    .detail-grid {
        grid-template-columns: 1fr;
    }

    .detail-token-info {
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 0.2rem;
        max-width: 100vw;
    }

    .token-card {
        padding: 0.5rem 0.3rem;
        border-radius: 0.8rem;
        font-size: 0.95rem;
        box-shadow: 0 2px 8px rgba(30,64,175,0.10);
    }
    .token-logo {
        width: 2.2rem;
        height: 2.2rem;
        border-radius: 0.7rem;
    }
    .token-symbol {
        font-size: 1rem;
    }
    .token-name {
        font-size: 0.95rem;
    }
    .token-addresses {
        margin: 0.7rem 0 0.5rem 0;
        gap: 0.4rem;
    }
    .address-section {
        padding: 0.5rem 0.5rem;
        border-radius: 0.5rem;
        font-size: 0.9rem;
    }
    .token-buttons .btn {
        padding: 0.6rem 0.7rem;
        font-size: 0.95rem;
        border-radius: 0.6rem;
    }
    .btn {
        padding: 0.6rem 0.7rem;
        border-radius: 0.7rem;
        font-size: 0.95rem;
    }
    .btn-primary, .btn-secondary {
        font-size: 0.95rem;
    }
    .filter-container {
        flex-direction: column;
        gap: 0.4rem;
        padding: 0.3rem 0.5rem;
        border-radius: 0.7rem;
        box-shadow: 0 1px 4px rgba(30,64,175,0.06);
    }
    .search-box input {
        padding: 0.6rem 0.7rem 0.6rem 2rem;
        font-size: 0.95rem;
        border-radius: 0.7rem;
    }
    .section-header h2 {
        font-size: 1.1rem;
    }
    .section-header p {
        font-size: 0.95rem;
    }
    .detail-header-content, .detail-token-info {
        flex-direction: column;
        gap: 0.7rem;
        text-align: center;
    }
    .detail-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    .info-block {
        padding: 0.7rem;
        font-size: 0.95rem;
    }
    .info-block h3 {
        font-size: 1rem;
    }
    .info-block ul {
        font-size: 0.95rem;
    }
    .get-finloop-container {
        margin-top: 0.3rem;
        justify-content: center;
    }
    }

    .detail-header {
        padding: 1rem;
    }

    .chart-container,
    .stat-card {
        padding: 1rem;
    }
}
