/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-primary: #0a0a0f;
    --bg-secondary: #12121a;
    --bg-card: #1a1a24;
    --bg-card-hover: #22222e;
    --border-color: #2a2a3a;
    --text-primary: #ffffff;
    --text-secondary: #9ca3af;
    --text-muted: #6b7280;
    --accent-blue: #0052FF;
    --accent-blue-hover: #0066FF;
    --accent-green: #10b981;
    --accent-red: #ef4444;
    --accent-yellow: #f59e0b;
    --accent-orange: #f97316;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.4);
}

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

.app {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

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

.header-left {
    display: flex;
    align-items: center;
    gap: 20px;
}

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

.logo h1 {
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, #fff 0%, #0052FF 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 16px;
    position: relative;
    z-index: 10;
}

/* Update Indicator */
.update-indicator {
    display: none;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: rgba(0, 82, 255, 0.1);
    border: 1px solid var(--accent-blue);
    border-radius: 20px;
    font-size: 0.8rem;
    color: var(--accent-blue);
}

.update-indicator.updating {
    display: flex;
    animation: fadeInOut 2s ease;
}

@keyframes fadeInOut {
    0% { opacity: 0; }
    20% { opacity: 1; }
    80% { opacity: 1; }
    100% { opacity: 0; }
}

.update-spinner {
    width: 14px;
    height: 14px;
    border: 2px solid rgba(0, 82, 255, 0.3);
    border-top-color: var(--accent-blue);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.connection-status {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: var(--bg-secondary);
    border-radius: 20px;
    font-size: 0.875rem;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent-yellow);
    animation: pulse 2s infinite;
}

.status-dot.connected {
    background: var(--accent-green);
    animation: none;
}

.status-dot.disconnected {
    background: var(--accent-red);
    animation: none;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

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

.btn-primary:hover {
    background: var(--accent-blue-hover);
}

.btn-secondary {
    background: var(--bg-card);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover:not(:disabled) {
    background: var(--bg-card-hover);
    color: var(--text-primary);
}

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

.btn-settings {
    width: 40px;
    height: 40px;
    padding: 0;
    background: var(--bg-secondary);
    color: var(--text-secondary);
    border-radius: 10px;
    position: relative;
    z-index: 20;
    pointer-events: auto;
    flex-shrink: 0;
}

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

.btn-settings:active {
    transform: scale(0.95);
}

.btn-search {
    background: var(--accent-blue);
    color: white;
    white-space: nowrap;
}

.btn-search:hover {
    background: var(--accent-blue-hover);
}

.btn-add, .btn-add-small {
    background: var(--accent-green);
    color: white;
    padding: 6px 12px;
    font-size: 0.75rem;
}

.btn-add:hover, .btn-add-small:hover {
    background: #0fa968;
}

.btn-add-small {
    padding: 6px;
    border-radius: 6px;
}

.btn-add-token {
    background: var(--bg-card);
    color: var(--text-primary);
    border: 1px dashed var(--border-color);
    padding: 8px 16px;
}

.btn-add-token:hover {
    background: var(--bg-card-hover);
    border-color: var(--accent-blue);
}

.btn-remove {
    background: transparent;
    color: var(--accent-red);
    padding: 6px;
    border: 1px solid transparent;
    opacity: 0.6;
    border-radius: 6px;
}

.btn-remove:hover {
    background: rgba(239, 68, 68, 0.1);
    border-color: var(--accent-red);
    opacity: 1;
}

.btn-link {
    background: transparent;
    color: var(--text-secondary);
    padding: 6px 10px;
    font-size: 0.75rem;
    text-decoration: none;
}

.btn-link:hover {
    color: var(--accent-blue);
}

/* Wallet Section */
.wallet-section {
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-wallet {
    background: linear-gradient(135deg, #0052FF 0%, #3B82F6 100%);
    color: white;
    padding: 10px 16px;
    font-weight: 500;
    border-radius: 12px;
    gap: 8px;
}

.btn-wallet:hover {
    background: linear-gradient(135deg, #0066FF 0%, #60A5FA 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 82, 255, 0.3);
}

.wallet-info {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--bg-secondary);
    padding: 8px 12px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.wallet-address {
    font-family: monospace;
    font-size: 0.85rem;
    color: var(--text-primary);
}

.wallet-balance {
    font-size: 0.85rem;
    color: var(--accent-green);
    font-weight: 500;
}

.btn-disconnect {
    background: transparent;
    color: var(--text-muted);
    padding: 6px;
    border-radius: 6px;
}

.btn-disconnect:hover {
    background: rgba(239, 68, 68, 0.1);
    color: var(--accent-red);
}

/* Buy Button */
.btn-buy {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    padding: 6px 12px;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 6px;
    gap: 4px;
}

.btn-buy:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

/* Network Badge */
.network-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(0, 82, 255, 0.1);
    color: var(--accent-blue);
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
}

.network-badge.wrong-network {
    background: rgba(239, 68, 68, 0.1);
    color: var(--accent-red);
}

.network-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
}

/* Token Actions Footer */
.token-actions-footer {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* DEX Modal */
.dex-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.dex-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    text-decoration: none;
    color: var(--text-primary);
    transition: all 0.2s ease;
}

.dex-option:hover {
    background: var(--bg-card-hover);
    border-color: var(--accent-blue);
    transform: translateX(4px);
}

.dex-option svg {
    color: var(--text-muted);
    margin-left: auto;
}

.dex-icon {
    font-size: 1.5rem;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-card);
    border-radius: 10px;
}

.dex-info {
    flex: 1;
}

.dex-name {
    font-weight: 600;
    font-size: 0.95rem;
}

.dex-desc {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Swap Modal */
.swap-modal-content {
    max-width: 480px !important;
    width: 100%;
}

.swap-modal-body {
    padding: 0 !important;
}

.swap-tabs {
    display: flex;
    border-bottom: 1px solid var(--border-color);
    padding: 0 16px;
}

.swap-tab {
    flex: 1;
    padding: 14px 16px;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    transition: all 0.2s ease;
}

.swap-tab:hover {
    color: var(--text-secondary);
}

.swap-tab.active {
    color: var(--accent-blue);
    border-bottom-color: var(--accent-blue);
}

.swap-widget-container {
    padding: 16px;
    min-height: 600px;
    display: flex;
    flex-direction: column;
}

.swap-widget-container iframe {
    flex: 1;
    background: var(--bg-secondary);
}

.swap-links-container {
    padding: 20px;
}

.swap-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px;
    color: var(--text-muted);
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.swap-loading p {
    margin: 0;
    font-size: 0.9rem;
}

.wallet-hint {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 16px;
    padding: 12px;
    background: rgba(245, 158, 11, 0.1);
    border-radius: 8px;
    font-size: 0.8rem;
    color: var(--accent-yellow);
}

.wallet-hint svg {
    flex-shrink: 0;
}

.wrong-network {
    color: var(--accent-red);
    font-size: 0.8rem;
    cursor: pointer;
}

.wrong-network:hover {
    text-decoration: underline;
}

/* Wallet Network */
.wallet-network {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
    color: var(--accent-green);
    padding: 4px 8px;
    background: rgba(16, 185, 129, 0.1);
    border-radius: 6px;
}

.wallet-network.wrong-network {
    color: var(--accent-red);
    background: rgba(239, 68, 68, 0.1);
}

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

.wallet-network .network-dot.wrong {
    background: var(--accent-red);
}

/* Portfolio Section */
.portfolio-section {
    margin-bottom: 30px;
    padding: 20px;
    background: linear-gradient(135deg, rgba(0, 82, 255, 0.1) 0%, rgba(16, 185, 129, 0.1) 100%);
    border: 1px solid var(--border-color);
    border-radius: 16px;
}

.portfolio-total {
    text-align: right;
}

.total-label {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.total-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent-green);
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 12px;
    margin-top: 16px;
}

.portfolio-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 30px;
    color: var(--text-muted);
}

.portfolio-empty p {
    font-size: 0.9rem;
    margin-bottom: 4px;
}

.portfolio-empty span {
    font-size: 0.8rem;
}

.portfolio-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    transition: all 0.2s ease;
}

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

.portfolio-token-info {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
}

.portfolio-token-name {
    font-weight: 600;
    font-size: 0.9rem;
}

.portfolio-token-balance {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.portfolio-token-value {
    text-align: right;
    margin-right: 12px;
}

.portfolio-value {
    font-weight: 600;
    font-size: 0.9rem;
}

.portfolio-change {
    font-size: 0.75rem;
}

.portfolio-change.positive {
    color: var(--accent-green);
}

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

.btn-buy-small {
    background: var(--accent-green);
    color: white;
    padding: 6px 10px;
    font-size: 0.7rem;
    border-radius: 6px;
    white-space: nowrap;
}

.btn-buy-small:hover {
    background: #059669;
}

/* Swap Modal */
.modal-swap {
    max-width: 480px;
    max-height: 90vh;
}

.swap-body {
    padding: 0;
    background: #131313;
    border-radius: 0 0 16px 16px;
    overflow: hidden;
}

.swap-body iframe {
    display: block;
}

/* Main Content */
.main {
    padding: 30px 0;
}

/* Sections */
.tokens-section {
    margin-bottom: 40px;
}

.watchlist-section {
    padding-top: 30px;
    border-top: 1px solid var(--border-color);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
    gap: 16px;
}

.section-title h2 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 4px;
}

.section-subtitle {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.section-info {
    text-align: right;
}

.update-time {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Tokens Grid */
.tokens-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 16px;
}

.loading-state, .empty-state {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    text-align: center;
}

.loading-state {
    border-style: solid;
}

.empty-state {
    border-style: dashed;
}

.loading-state svg, .empty-state svg {
    margin-bottom: 16px;
    opacity: 0.5;
}

.loading-state p, .empty-state p {
    font-size: 1rem;
    font-weight: 500;
    margin-bottom: 6px;
    color: var(--text-secondary);
}

.empty-state span {
    color: var(--text-muted);
    font-size: 0.875rem;
}

.spinner {
    width: 32px;
    height: 32px;
    border: 3px solid var(--border-color);
    border-top-color: var(--accent-blue);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 16px;
}

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

/* Token Card */
.token-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 16px;
    transition: all 0.3s ease;
}

.token-card:hover {
    background: var(--bg-card-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.token-card.alert {
    border-color: var(--accent-orange);
    box-shadow: 0 0 20px rgba(249, 115, 22, 0.15);
}

.token-card.loading {
    opacity: 0.7;
}

.token-loading {
    padding: 20px;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.875rem;
}

.token-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.token-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.token-rank {
    width: 28px;
    height: 28px;
    background: var(--bg-secondary);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--accent-yellow);
}

.token-logo {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--bg-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1rem;
    color: var(--accent-blue);
}

.token-logo img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.token-name {
    font-weight: 600;
    font-size: 0.95rem;
    line-height: 1.2;
}

.token-symbol {
    color: var(--text-secondary);
    font-size: 0.8rem;
}

.token-actions {
    display: flex;
    gap: 6px;
}

.token-price-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    margin-bottom: 10px;
    border-bottom: 1px solid var(--border-color);
}

.token-price {
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.price-value {
    font-weight: 600;
    font-size: 1.1rem;
}

.price-change {
    font-size: 0.8rem;
    font-weight: 500;
}

.price-change.positive {
    color: var(--accent-green);
}

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

.volume-change {
    text-align: right;
}

.volume-change-value {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--text-secondary);
}

.volume-change.highlight .volume-change-value {
    color: var(--accent-orange);
}

.volume-change-label {
    display: block;
    font-size: 0.7rem;
    color: var(--text-muted);
}

.token-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin-bottom: 12px;
}

.stat-item {
    background: var(--bg-secondary);
    padding: 8px;
    border-radius: 8px;
    text-align: center;
}

.stat-label {
    font-size: 0.65rem;
    color: var(--text-muted);
    margin-bottom: 2px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-value {
    font-weight: 600;
    font-size: 0.8rem;
}

.token-stats-row {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 12px;
    padding: 8px 0;
    border-top: 1px solid var(--border-color);
}

.stat-mini {
    font-size: 0.7rem;
}

.stat-mini-label {
    color: var(--text-muted);
}

.stat-mini-value {
    color: var(--text-secondary);
    font-weight: 500;
    margin-left: 4px;
}

.holders-link {
    color: var(--accent-blue);
    text-decoration: none;
    transition: color 0.2s;
}

.holders-link:hover {
    color: var(--accent-blue-hover);
    text-decoration: underline;
}

.token-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 10px;
    border-top: 1px solid var(--border-color);
}

.volume-bar {
    flex: 1;
    height: 4px;
    background: var(--bg-secondary);
    border-radius: 2px;
    overflow: hidden;
    margin-right: 12px;
}

.volume-bar-fill {
    height: 100%;
    background: var(--accent-blue);
    border-radius: 2px;
    transition: width 0.5s ease;
}

.volume-bar-fill.high {
    background: var(--accent-yellow);
}

.volume-bar-fill.very-high {
    background: var(--accent-orange);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
}

.modal-content {
    position: relative;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    width: 90%;
    max-width: 480px;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-large {
    max-width: 600px;
}

.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: 1.25rem;
    font-weight: 600;
}

.btn-close {
    width: 32px;
    height: 32px;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
}

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

.modal-body {
    padding: 20px;
}

.setting-group {
    margin-bottom: 20px;
}

.setting-group label {
    display: block;
    font-weight: 500;
    margin-bottom: 8px;
    font-size: 0.9rem;
}

.setting-group input {
    width: 100%;
    padding: 12px 16px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    color: var(--text-primary);
    font-size: 1rem;
}

.setting-group input:focus {
    outline: none;
    border-color: var(--accent-blue);
}

.input-with-suffix {
    position: relative;
}

.input-with-suffix input {
    padding-right: 50px;
}

.input-suffix {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 0.9rem;
}

.setting-hint {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 6px;
}

.setting-hint a {
    color: var(--accent-blue);
    text-decoration: none;
}

.setting-hint a:hover {
    text-decoration: underline;
}

.settings-divider {
    height: 1px;
    background: var(--border-color);
    margin: 20px 0;
}

.settings-section-title {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 16px;
    font-weight: 500;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 20px;
    border-top: 1px solid var(--border-color);
}

/* Search */
.search-container {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
}

.search-input {
    flex: 1;
    padding: 12px 16px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    color: var(--text-primary);
    font-size: 0.875rem;
}

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

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

.search-results {
    max-height: 400px;
    overflow-y: auto;
}

.search-hint, .search-loading, .search-empty, .search-error {
    padding: 40px 20px;
    text-align: center;
    color: var(--text-muted);
}

.search-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.search-loading .spinner {
    width: 20px;
    height: 20px;
    margin: 0;
}

.search-error {
    color: var(--accent-red);
}

.search-result-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    margin-bottom: 8px;
    transition: all 0.2s ease;
}

.search-result-item:hover {
    border-color: var(--accent-blue);
}

.search-result-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.search-result-logo {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--bg-card);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--accent-blue);
}

.search-result-logo img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.search-result-name {
    font-weight: 500;
    font-size: 0.9rem;
}

.search-result-symbol {
    color: var(--text-secondary);
    font-size: 0.8rem;
}

.search-result-address {
    font-size: 0.7rem;
    color: var(--text-muted);
    font-family: monospace;
}

/* Alerts Container */
.alerts-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 360px;
}

.alert-toast {
    background: var(--bg-card);
    border: 1px solid var(--accent-orange);
    border-radius: 12px;
    padding: 14px;
    box-shadow: var(--shadow-lg);
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.alert-toast-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.alert-toast-title {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--accent-orange);
}

.alert-toast-close {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 1.25rem;
    line-height: 1;
}

.alert-toast-body {
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.alert-toast-body strong {
    color: var(--text-primary);
}

/* Responsive */
@media (max-width: 768px) {
    .header {
        flex-direction: row;
        gap: 8px;
        padding: 12px 0;
        flex-wrap: wrap;
    }
    
    .header-left {
        gap: 8px;
    }
    
    .logo-text h1 {
        font-size: 1rem;
    }
    
    .logo-icon {
        width: 28px;
        height: 28px;
    }
    
    .header-right {
        gap: 8px;
    }
    
    .wallet-info {
        padding: 4px 8px;
        gap: 6px;
        font-size: 0.75rem;
    }
    
    .wallet-address {
        font-size: 0.7rem;
        max-width: 80px;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    .wallet-balance {
        font-size: 0.7rem;
    }
    
    .btn-disconnect {
        padding: 4px;
    }
    
    .btn-disconnect svg {
        width: 14px;
        height: 14px;
    }
    
    .network-badge {
        padding: 4px 8px;
        font-size: 0.7rem;
        gap: 4px;
    }
    
    .status-badge {
        padding: 4px 8px;
        font-size: 0.65rem;
    }
    
    .btn-settings {
        width: 36px;
        height: 36px;
        padding: 8px;
    }
    
    .btn-settings svg {
        width: 20px;
        height: 20px;
    }
    
    .section-header {
        flex-direction: column;
        gap: 12px;
    }
    
    .tokens-grid {
        grid-template-columns: 1fr;
    }
    
    .token-stats {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .search-container {
        flex-direction: column;
    }
}

/* Mini App specific - very small screens */
@media (max-width: 420px) {
    .app {
        padding: 0 10px;
    }
    
    .header {
        padding: 8px 0;
        gap: 6px;
    }
    
    .logo-text h1 {
        font-size: 0.9rem;
    }
    
    .logo-icon {
        width: 24px;
        height: 24px;
    }
    
    /* Hide status badge on very small screens */
    .status-badge {
        display: none;
    }
    
    .wallet-info {
        padding: 3px 6px;
        gap: 4px;
        border-radius: 8px;
    }
    
    .wallet-address {
        font-size: 0.65rem;
        max-width: 60px;
    }
    
    .wallet-balance {
        font-size: 0.65rem;
    }
    
    .network-badge {
        padding: 3px 6px;
        font-size: 0.65rem;
    }
    
    .btn-settings {
        width: 32px;
        height: 32px;
        padding: 6px;
    }
    
    .btn-settings svg {
        width: 18px;
        height: 18px;
    }
}

/* Ensure settings button is always clickable */
.btn-settings {
    cursor: pointer !important;
}

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

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

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

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