* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-primary: #0d0d0d;
    --bg-secondary: #141414;
    --bg-tertiary: #1a1a1a;
    --bg-hover: #252525;
    --border-color: #2a2a2a;
    --text-primary: #ffffff;
    --text-secondary: #a0a0a0;
    --text-muted: #666666;
    --accent-green: #00d68f;
    --accent-red: #ff4d4d;
    --accent-blue: #3b82f6;
    --accent-purple: #8b5cf6;
    --accent-yellow: #fbbf24;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    line-height: 1.5;
}

/* Navbar */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 24px;
    height: 64px;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-left {
    display: flex;
    align-items: center;
    gap: 32px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--text-primary);
}

.logo-img {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    object-fit: contain;
}

.logo-text {
    font-size: 20px;
    font-weight: 700;
    background: linear-gradient(135deg, var(--accent-green), var(--accent-blue));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-links {
    display: flex;
    gap: 8px;
}

.nav-link {
    padding: 8px 16px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    border-radius: 8px;
    transition: all 0.2s;
}

.nav-link:hover {
    color: var(--text-primary);
    background: var(--bg-hover);
}

.nav-link.active {
    color: var(--text-primary);
    background: var(--bg-tertiary);
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.search-container {
    position: relative;
    display: flex;
    align-items: center;
}

.search-icon {
    position: absolute;
    left: 12px;
    width: 18px;
    height: 18px;
    color: var(--text-muted);
}

.search-input {
    width: 280px;
    padding: 10px 16px 10px 40px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    color: var(--text-primary);
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
}

.search-input:focus {
    border-color: var(--accent-blue);
}

.search-input::placeholder {
    color: var(--text-muted);
}

.connect-wallet {
    padding: 10px 20px;
    background: linear-gradient(135deg, var(--accent-green), #00b377);
    color: var(--bg-primary);
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.connect-wallet:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 214, 143, 0.3);
}

/* Main Content */
.main-content {
    padding: 24px;
    max-width: 1600px;
    margin: 0 auto;
}

/* Filters */
.filters {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 16px;
}

.chain-filters {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.chain-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.chain-btn:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.chain-btn.active {
    background: var(--bg-tertiary);
    border-color: var(--accent-blue);
    color: var(--text-primary);
}

.chain-icon {
    width: 18px;
    height: 18px;
    border-radius: 50%;
}

.time-filters {
    display: flex;
    gap: 4px;
    background: var(--bg-secondary);
    padding: 4px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.time-btn {
    padding: 6px 12px;
    background: transparent;
    border: none;
    border-radius: 6px;
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.time-btn:hover {
    color: var(--text-primary);
}

.time-btn.active {
    background: var(--accent-blue);
    color: white;
}

/* Table */
.table-container {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    overflow-x: auto;
}

.token-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    min-width: 1200px;
}

.token-table thead {
    background: var(--bg-tertiary);
}

.token-table th {
    padding: 14px 12px;
    text-align: left;
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
    border-bottom: 1px solid var(--border-color);
}

.token-table td {
    padding: 12px;
    border-bottom: 1px solid var(--border-color);
    white-space: nowrap;
}

.token-table tbody tr {
    transition: background 0.2s;
}

.token-table tbody tr:hover {
    background: var(--bg-hover);
}

.token-table tbody tr:last-child td {
    border-bottom: none;
}

.col-rank {
    width: 50px;
    text-align: center !important;
}

.col-token {
    min-width: 200px;
}

.col-change {
    text-align: right !important;
    width: 70px;
}

.col-action {
    width: 100px;
    text-align: center !important;
}

/* Token Cell */
.token-cell {
    display: flex;
    align-items: center;
    gap: 12px;
}

.token-img {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--bg-tertiary);
    object-fit: cover;
}

.token-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.token-name {
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 6px;
}

.token-badge {
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 600;
}

.badge-hot {
    background: rgba(255, 77, 77, 0.2);
    color: var(--accent-red);
}

.badge-new {
    background: rgba(0, 214, 143, 0.2);
    color: var(--accent-green);
}

.badge-trending {
    background: rgba(251, 191, 36, 0.2);
    color: var(--accent-yellow);
}

.token-symbol {
    font-size: 12px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 4px;
}

.chain-tag {
    font-size: 10px;
    padding: 1px 4px;
    border-radius: 3px;
    background: var(--bg-hover);
    color: var(--text-secondary);
}

.rank-number {
    font-weight: 600;
    color: var(--text-secondary);
}

.rank-number.top-3 {
    color: var(--accent-yellow);
}

/* Price Changes */
.change-positive {
    color: var(--accent-green);
}

.change-negative {
    color: var(--accent-red);
}

/* Buy Button */
.buy-btn {
    padding: 6px 16px;
    background: linear-gradient(135deg, var(--accent-green), #00b377);
    color: var(--bg-primary);
    border: none;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.buy-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 2px 8px rgba(0, 214, 143, 0.4);
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    margin-top: 20px;
    padding: 16px;
}

.page-btn {
    padding: 8px 16px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
}

.page-btn:hover:not(:disabled) {
    background: var(--bg-hover);
    border-color: var(--accent-blue);
}

.page-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.page-info {
    color: var(--text-secondary);
    font-size: 13px;
}

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    backdrop-filter: blur(4px);
}

.modal-overlay.active {
    display: flex;
}

.modal {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    width: 100%;
    max-width: 420px;
    margin: 20px;
    animation: modalSlide 0.3s ease;
}

@keyframes modalSlide {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
}

.modal-header h3 {
    font-size: 18px;
    font-weight: 600;
}

.modal-close {
    width: 32px;
    height: 32px;
    background: var(--bg-tertiary);
    border: none;
    border-radius: 8px;
    color: var(--text-secondary);
    font-size: 20px;
    cursor: pointer;
    transition: all 0.2s;
}

.modal-close:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.modal-body {
    padding: 20px;
}

.token-info-modal {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    padding: 16px;
    background: var(--bg-tertiary);
    border-radius: 12px;
}

.modal-token-img {
    width: 48px;
    height: 48px;
    border-radius: 50%;
}

.token-info-modal h4 {
    font-size: 16px;
    font-weight: 600;
}

.token-info-modal p {
    font-size: 13px;
    color: var(--text-muted);
}

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

.swap-input-group {
    margin-bottom: 8px;
}

.swap-input-group label {
    display: block;
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.swap-input {
    display: flex;
    gap: 8px;
    padding: 12px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 10px;
}

.swap-input input {
    flex: 1;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 18px;
    font-weight: 500;
    outline: none;
}

.swap-input input::placeholder {
    color: var(--text-muted);
}

.swap-input select {
    padding: 8px 12px;
    background: var(--bg-hover);
    border: none;
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

.swap-input .receive-token {
    padding: 8px 12px;
    background: var(--bg-hover);
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.swap-arrow {
    text-align: center;
    font-size: 20px;
    color: var(--text-muted);
    margin: 8px 0;
}

.swap-details {
    padding: 16px;
    background: var(--bg-tertiary);
    border-radius: 10px;
    margin-bottom: 20px;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    padding: 6px 0;
}

.detail-row span:first-child {
    color: var(--text-secondary);
}

.swap-btn {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, var(--accent-green), #00b377);
    color: var(--bg-primary);
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.swap-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(0, 214, 143, 0.4);
}

/* Footer */
.footer {
    margin-top: 40px;
    padding: 24px;
    border-top: 1px solid var(--border-color);
    background: var(--bg-secondary);
}

.footer-content {
    max-width: 1600px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}

.footer-content p {
    font-size: 13px;
    color: var(--text-secondary);
}

.footer-links {
    display: flex;
    gap: 24px;
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 13px;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: var(--text-primary);
}

/* Responsive */
@media (max-width: 1024px) {
    .nav-links {
        display: none;
    }
    
    .search-input {
        width: 200px;
    }
}

@media (max-width: 768px) {
    .navbar {
        padding: 0 16px;
    }
    
    .search-container {
        display: none;
    }
    
    .main-content {
        padding: 16px;
    }
    
    .filters {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .chain-filters {
        width: 100%;
        overflow-x: auto;
        padding-bottom: 8px;
    }
    
    .footer-content {
        flex-direction: column;
        text-align: center;
    }
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* About Page */
.about-page {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px 0;
}

.about-hero {
    text-align: center;
    padding: 60px 20px;
    margin-bottom: 40px;
}

.about-logo {
    width: 120px;
    height: 120px;
    border-radius: 24px;
    margin-bottom: 30px;
}

.about-hero h1 {
    font-size: 42px;
    font-weight: 700;
    margin-bottom: 16px;
    line-height: 1.2;
}

.about-hero .highlight {
    background: linear-gradient(135deg, var(--accent-green), #00ffaa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.about-tagline {
    font-size: 18px;
    color: var(--text-secondary);
    max-width: 500px;
    margin: 0 auto;
}

.about-section {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 32px;
    margin-bottom: 24px;
}

.about-section h2 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 20px;
}

.about-section p {
    font-size: 15px;
    line-height: 1.7;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.about-section p:last-child {
    margin-bottom: 0;
}

.about-section strong {
    color: var(--text-primary);
}

/* Price Comparison */
.price-comparison {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.price-card {
    background: var(--bg-tertiary);
    border-radius: 12px;
    padding: 24px;
    border: 2px solid var(--border-color);
}

.price-card.scam {
    border-color: var(--accent-red);
    background: rgba(255, 77, 77, 0.05);
}

.price-card.free {
    border-color: var(--accent-green);
    background: rgba(0, 214, 143, 0.05);
}

.price-card h3 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 16px;
}

.price-card ul {
    list-style: none;
    margin-bottom: 20px;
}

.price-card li {
    padding: 8px 0;
    font-size: 14px;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border-color);
}

.price-card li:last-child {
    border-bottom: none;
}

.price-tag {
    text-align: center;
    font-size: 24px;
    font-weight: 700;
    padding: 12px;
    background: rgba(255, 77, 77, 0.2);
    color: var(--accent-red);
    border-radius: 8px;
}

.price-tag.free-tag {
    background: rgba(0, 214, 143, 0.2);
    color: var(--accent-green);
}

/* Features Grid */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 16px;
    margin-top: 20px;
}

.feature-card {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 24px;
    transition: all 0.2s;
}

.feature-card:hover {
    border-color: var(--accent-blue);
    transform: translateY(-2px);
}

.feature-icon {
    font-size: 32px;
    display: block;
    margin-bottom: 12px;
}

.feature-card h4 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
}

.feature-card p {
    font-size: 13px;
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.5;
}

/* About CTA */
.about-cta {
    text-align: center;
    padding: 60px 20px;
    background: linear-gradient(135deg, rgba(0, 214, 143, 0.1), rgba(59, 130, 246, 0.1));
    border-radius: 16px;
    border: 1px solid var(--border-color);
}

.about-cta h2 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 12px;
}

.about-cta p {
    font-size: 16px;
    color: var(--text-secondary);
    margin-bottom: 24px;
}

.cta-btn {
    padding: 14px 32px;
    background: linear-gradient(135deg, var(--accent-green), #00b377);
    color: var(--bg-primary);
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.cta-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 214, 143, 0.4);
}

/* Empty State */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 20px;
    text-align: center;
}

.empty-icon {
    font-size: 64px;
    margin-bottom: 20px;
    opacity: 0.5;
}

.empty-state h3 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.empty-state p {
    font-size: 14px;
    color: var(--text-secondary);
    max-width: 400px;
}

/* Wallet Connected State */
.connect-wallet.connected {
    background: var(--bg-tertiary);
    border: 1px solid var(--accent-green);
    color: var(--text-primary);
}

.connect-wallet.connected:hover {
    background: var(--bg-hover);
}

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

.wallet-dot {
    width: 8px;
    height: 8px;
    background: var(--accent-green);
    border-radius: 50%;
}

/* Wallet Modal */
.wallet-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.wallet-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.wallet-option:hover {
    background: var(--bg-hover);
    border-color: var(--accent-blue);
}

.wallet-option img {
    width: 40px;
    height: 40px;
    border-radius: 10px;
}

.wallet-option-info h4 {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 2px;
}

.wallet-option-info p {
    font-size: 12px;
    color: var(--text-secondary);
}

.wallet-option.detected::after {
    content: 'Detected';
    margin-left: auto;
    font-size: 11px;
    padding: 4px 8px;
    background: rgba(0, 214, 143, 0.2);
    color: var(--accent-green);
    border-radius: 4px;
    font-weight: 500;
}

/* Loading Animation */
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.loading {
    animation: pulse 1.5s infinite;
}

/* Number formatting */
.value-cell {
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', monospace;
    font-size: 13px;
}
