/* Intel Page Styles */

/* Intel Container */
.intel-container {
    min-height: 100vh;
    background: #000000;
    position: relative;
    overflow-x: hidden;
    overflow-y: auto;
}

/* Gradient overlay for main content area only */
.intel-container > *:not(::after):not(::before) {
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 100%);
}

/* Simpler: use gradient for the visual content, black for spacing */
.intel-visualization-container,
.intel-search-section,
.intel-header {
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 100%);
}

/* Dot Pattern Background */
.intel-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(circle at 25px 25px, rgba(255, 255, 255, 0.1) 1px, transparent 1px),
        radial-gradient(circle at 75px 75px, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
    background-size: 50px 50px, 100px 100px;
    background-position: 0 0, 25px 25px;
    opacity: 0.3;
    z-index: 0;
}

/* Intel Header */
.intel-header {
    position: relative;
    z-index: 1;
    padding: 2rem 0;
    text-align: center;
    background: #000000;
}

.intel-title h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: #ffffff;
    margin: 0 0 0.5rem 0;
}

.intel-title h1 i {
    color: #e619e6;
    margin-right: 0.5rem;
}

.intel-subtitle {
    font-size: 1.1rem;
    color: #cccccc;
    margin: 0;
    opacity: 0.9;
}

/* Intel Search Section */
.intel-search-section {
    position: relative;
    z-index: 100;
    padding: 2rem 0;
    background: #000000;
}

.intel-search-container {
    max-width: 600px;
    margin: 0 auto;
    padding: 0 1rem;
    position: relative;
    z-index: 101;
}

.search-input-group {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.intel-search-input {
    flex: 1;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(230, 25, 230, 0.3);
    border-radius: 8px;
    color: #ffffff;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.intel-search-input:focus {
    outline: none;
    border-color: #e619e6;
    box-shadow: 0 0 20px rgba(230, 25, 230, 0.3);
    background: rgba(255, 255, 255, 0.15);
}

.intel-search-input::placeholder {
    color: #888888;
}

.intel-search-input:not(:placeholder-shown) {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
}

/* Override browser autofill styling */
.intel-search-input:-webkit-autofill,
.intel-search-input:-webkit-autofill:hover,
.intel-search-input:-webkit-autofill:focus,
.intel-search-input:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 30px rgba(255, 255, 255, 0.1) inset !important;
    -webkit-text-fill-color: #ffffff !important;
    background: rgba(255, 255, 255, 0.1) !important;
    transition: background-color 5000s ease-in-out 0s;
}

.intel-search-btn {
    padding: 1rem 2rem;
    background: linear-gradient(135deg, #e619e6 0%, #b814b8 100%);
    border: none;
    border-radius: 8px;
    color: #ffffff;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.intel-search-btn:hover {
    background: linear-gradient(135deg, #f029f0 0%, #c824c8 100%);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(230, 25, 230, 0.4);
}

.intel-search-btn:active {
    transform: translateY(0);
}

.intel-search-info {
    text-align: center;
}

.intel-search-info p {
    color: #aaaaaa;
    font-size: 0.9rem;
    margin: 0;
}

/* Intel Visualization Container */
.intel-visualization-container {
    position: relative;
    z-index: 1;
    width: 100%;
    height: 80vh;
    min-height: 500px;
    padding: 0;
    margin: 0;
    background: #000000;
    overflow: hidden;
    border-radius: 8px;
    user-select: none !important;
    -webkit-user-select: none !important;
    -moz-user-select: none !important;
    -ms-user-select: none !important;
    cursor: default !important;
}

/* Prevent text selection and set cursor for Cytoscape container */
.intel-visualization-container * {
    user-select: none !important;
    -webkit-user-select: none !important;
    -moz-user-select: none !important;
    -ms-user-select: none !important;
}

/* Cytoscape canvas - prevent text selection */
.intel-visualization-container canvas {
    cursor: default !important;
    user-select: none !important;
    -webkit-user-select: none !important;
}

/* Ensure Cytoscape nodes show grab cursor when draggable */
.intel-visualization-container .cy-container {
    cursor: default !important;
    user-select: none !important;
    -webkit-user-select: none !important;
}

.intel-visualization-container .cy-container > canvas {
    cursor: grab !important;
}

.intel-visualization-container .cy-container:active > canvas {
    cursor: grabbing !important;
}

.intel-network-graph {
    width: 100%;
    height: 100%;
    background: #000;
    border-radius: 12px;
    border: 1px solid rgba(230, 25, 230, 0.2);
    position: relative;
    overflow: hidden;
}

/* Intel States */
.intel-loading-state,
.intel-error-state,
.intel-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 60vh;
    text-align: center;
    color: #ffffff;
    position: relative;
    z-index: 1;
}

.intel-loading-state {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 12px;
    border: 1px solid rgba(230, 25, 230, 0.2);
}

.loading-spinner {
    font-size: 2rem;
    color: #e619e6;
    margin-bottom: 1rem;
}

.intel-loading-state p {
    font-size: 1.1rem;
    margin: 0;
}

.intel-error-state {
    background: rgba(220, 53, 69, 0.1);
    border-radius: 12px;
    border: 1px solid rgba(220, 53, 69, 0.3);
}

.intel-error-state i {
    font-size: 3rem;
    color: #dc3545;
    margin-bottom: 1rem;
}

.intel-error-state p {
    font-size: 1.1rem;
    margin: 0;
}

.intel-empty-state {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 12px;
    border: 1px solid rgba(230, 25, 230, 0.2);
}

.intel-empty-state i {
    font-size: 4rem;
    color: #e619e6;
    margin-bottom: 1rem;
    opacity: 0.7;
}

.intel-empty-state h3 {
    font-size: 1.5rem;
    margin: 0 0 1rem 0;
    color: #ffffff;
}

.intel-empty-state p {
    font-size: 1rem;
    margin: 0;
    color: #aaaaaa;
}

/* Intel Controls */
.intel-controls {
    position: relative;
    z-index: 1;
    padding: 1rem 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(0, 0, 0, 0.2);
    border-top: 1px solid rgba(230, 25, 230, 0.2);
}

.intel-control-group {
    display: flex;
    gap: 0.5rem;
}

.intel-control-btn {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(230, 25, 230, 0.3);
    border-radius: 6px;
    color: #ffffff;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.intel-control-btn:hover {
    background: rgba(230, 25, 230, 0.2);
    border-color: #e619e6;
    transform: translateY(-2px);
}

.intel-control-btn:active {
    transform: translateY(0);
}

.intel-legend {
    display: flex;
    gap: 2rem;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #cccccc;
    font-size: 0.9rem;
}

.legend-color {
    width: 16px;
    height: 16px;
    border-radius: 2px;
}

.legend-color.incoming {
    background: #4CAF50; /* Green for inflow */
}

.legend-color.outgoing {
    background: #EF4444; /* Red for outflow */
}

.legend-color.first-tx {
    background: #10B981; /* Dark green for initial funding */
}

/* Responsive Design */
@media (max-width: 768px) {
    .intel-title h1 {
        font-size: 2rem;
    }
    
    .search-input-group {
        flex-direction: column;
    }
    
    .intel-search-btn {
        width: 100%;
        justify-content: center;
    }
    
    .intel-controls {
        flex-direction: column;
        gap: 1rem;
    }
    
    .intel-legend {
        gap: 1rem;
    }
    
    /* Mobile fixes for Analyze dropdown */
    .intel-header-controls {
        z-index: 10000 !important;
        pointer-events: auto !important;
        touch-action: none !important;
    }
    
    .intel-header-left,
    .intel-header-right {
        pointer-events: auto !important;
        touch-action: manipulation !important;
    }
    
    .intel-dropdown-btn {
        min-width: 120px !important;
        font-size: 11px !important;
        padding: 8px 10px !important;
        touch-action: manipulation !important;
        -webkit-tap-highlight-color: rgba(230, 25, 230, 0.3) !important;
        user-select: none !important;
        -webkit-user-select: none !important;
        pointer-events: auto !important;
        position: relative !important;
        z-index: 10003 !important;
        -webkit-touch-callout: none !important;
        cursor: pointer !important;
    }
    
    .intel-dropdown-panel {
        width: calc(100vw - 32px) !important;
        max-width: 90vw !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
        right: auto !important;
        position: fixed !important;
        bottom: 20px !important;
        top: auto !important;
        max-height: 60vh !important;
        touch-action: pan-y !important;
        -webkit-overflow-scrolling: touch !important;
        z-index: 10002 !important;
        box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.8) !important;
        pointer-events: auto !important;
    }
    
    .intel-header-backdrop {
        z-index: 9998 !important;
        pointer-events: auto !important;
        touch-action: none !important;
        -webkit-tap-highlight-color: transparent !important;
    }
    
    /* Ensure button is always clickable and not blocked */
    .intel-header-left {
        z-index: 10003 !important;
        position: relative !important;
    }
    
    /* Prevent any overlay from blocking the dropdown button */
    .intel-header-controls {
        z-index: 10000 !important;
    }
}

/* Animation for state transitions */
.intel-loading-state,
.intel-error-state,
.intel-empty-state,
.intel-network-graph {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
}

.intel-loading-state[style*="flex"],
.intel-error-state[style*="flex"],
.intel-empty-state[style*="flex"],
.intel-network-graph[style*="block"] {
    opacity: 1;
    transform: translateY(0);
}

/* FAQ Section in Intel - ensure it's above everything */
#intel-faq-section {
    position: relative;
    z-index: 100 !important;
    pointer-events: auto !important;
    background: #000000 !important;
    margin-top: 60px;
    padding-top: 60px;
}

/* Ensure the spacing area between intel container and FAQ is black */
.intel-container + #intel-faq-section,
.intel-container ~ #intel-faq-section {
    background: #000000 !important;
}

/* Add black spacer before FAQ section */
.intel-container::after {
    content: '';
    display: block;
    width: 100%;
    height: 60px;
    background: #000000 !important;
    position: relative;
    z-index: 1;
}

#intel-faq-section .faq-container {
    position: relative;
    z-index: 101;
    pointer-events: auto;
}

#intel-faq-section .faq-item {
    position: relative;
    z-index: 102;
    pointer-events: auto !important;
}

#intel-faq-section .faq-question,
#token-intel-faq-section .faq-question {
    position: relative;
    z-index: 103;
    pointer-events: auto !important;
    cursor: pointer !important;
}

#token-intel-faq-section .faq-question span,
#token-intel-faq-section .faq-question .faq-icon {
    pointer-events: none;
}

#intel-faq-section .faq-answer {
    position: relative;
    z-index: 103;
    pointer-events: auto;
}

/* Tooltip Styles */
.intel-tooltip {
    position: absolute;
    padding: 10px;
    background: rgba(0, 0, 0, 0.9);
    color: white;
    border-radius: 5px;
    font-size: 12px;
    pointer-events: none;
    z-index: 1000;
    max-width: 250px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

/* Network Graph Styles */
.intel-network-graph .links line {
    /* Let JavaScript control stroke colors */
    stroke-opacity: 0.9;
    stroke-width: 0.8;
}

.intel-network-graph .links line.first-tx {
    stroke: #10B981;
    stroke-width: 1.5;
}

.intel-network-graph .links line.receive-tx {
    stroke: #4CAF50; /* Green for inflow */
    stroke-width: 1;
}

.intel-network-graph .links line.incoming-link {
    stroke: #00FF00 !important; /* Bright green for incoming */
    stroke-width: 1;
}

.intel-network-graph .links line.outgoing-link {
    stroke: #FF0000 !important; /* Bright red for outgoing */
    stroke-width: 1;
}

.intel-network-graph .nodes circle {
    cursor: pointer;
    transition: all 0.2s ease;
}

.intel-network-graph .nodes circle:hover {
    stroke-width: 3;
    stroke: #fff;
}

.intel-network-graph .nodes text {
    font-family: 'Inter', sans-serif;
    font-size: 10px;
    fill: #fff;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
    pointer-events: none;
}

.intel-network-graph .nodes text.center-label {
    font-weight: bold;
    font-size: 12px;
}

/* Node type colors */
.intel-network-graph .nodes circle.wallet {
    fill: #8B5CF6;
}

.intel-network-graph .nodes circle.contract {
    fill: #F59E0B;
}

.intel-network-graph .nodes circle.exchange {
    fill: #10B981;
}

.intel-network-graph .nodes circle.bridge {
    fill: #3B82F6;
}

.intel-network-graph .nodes circle.unknown {
    fill: #6B7280;
}

/* Autocomplete Styles */
.intel-autocomplete {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #000000;
    border: 1px solid #333333;
    border-radius: 5px;
    max-height: 200px;
    overflow-y: auto;
    z-index: 9999;
    display: none;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.5);
}

.intel-autocomplete-item {
    padding: 10px 15px;
    cursor: pointer;
    border-bottom: 1px solid #333333;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background-color 0.2s ease;
    background: #000000;
}

.intel-autocomplete-item:hover {
    border: 1px solid #e619e6;
    border-radius: 3px;
}

.intel-autocomplete-item:last-child {
    border-bottom: none;
}

.intel-autocomplete-item .address {
    font-size: 12px;
    color: var(--text-color-light);
}

.intel-autocomplete-item .type {
    font-size: 10px;
    color: var(--secondary-color);
    text-transform: uppercase;
    font-weight: bold;
}

.intel-autocomplete-item .logo {
    width: 20px;
    height: 20px;
    margin-right: 10px;
    border-radius: 3px;
    flex-shrink: 0;
}

.intel-autocomplete-item .item-content {
    display: flex;
    align-items: center;
    flex: 1;
}

/* Loading animation for the network graph */
.intel-network-graph.loading {
    position: relative;
}

.intel-network-graph.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 40px;
    height: 40px;
    margin: -20px 0 0 -20px;
    border: 3px solid #8B5CF6;
    border-top: 3px solid transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Enhanced hover effects */
.intel-network-graph .nodes circle:hover {
    stroke-width: 3;
    stroke: #fff;
    filter: drop-shadow(0 0 8px rgba(139, 92, 246, 0.6));
}

.intel-network-graph .links line:hover {
    stroke-width: 1.2;
    stroke-opacity: 1;
}

/* Center wallet special styling */
.intel-network-graph .nodes circle.center {
    stroke: #fff;
    stroke-width: 2;
    filter: drop-shadow(0 0 10px rgba(139, 92, 246, 0.8));
}

/* Zoom Controls */
.intel-zoom-controls {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.intel-zoom-btn {
    background: #e619e6;
    color: white;
    border: none;
    border-radius: 4px;
    width: 40px;
    height: 40px;
    font-size: 20px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s ease;
}

.intel-zoom-btn:hover {
    background: #c715c7;
}

.intel-zoom-reset {
    background: #333;
    font-size: 16px;
}

.intel-zoom-reset:hover {
    background: #555;
}

/* ============================================================================
   TOKEN HOLDERS INTEL STYLES
   ============================================================================ */

/* Token Intel Container - reuse intel styles but with token-intel prefix */
.token-intel-container {
    min-height: 100vh;
    background: #000000;
    position: relative;
    overflow-x: hidden;
    overflow-y: auto;
}

.token-intel-container > *:not(::after):not(::before) {
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 100%);
}

.token-intel-visualization-container,
.token-intel-search-section,
.token-intel-header {
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 100%);
}

.token-intel-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(circle at 25px 25px, rgba(255, 255, 255, 0.1) 1px, transparent 1px),
        radial-gradient(circle at 75px 75px, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
    background-size: 50px 50px, 100px 100px;
    background-position: 0 0, 25px 25px;
    opacity: 0.3;
    z-index: 0;
}

/* Token Intel Header */
.token-intel-header {
    position: relative;
    z-index: 1;
    padding: 2rem 0;
    text-align: center;
    background: #000000;
}

.token-intel-title h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: #ffffff;
    margin: 0 0 0.5rem 0;
}

.token-intel-title h1 i {
    color: #e619e6;
    margin-right: 0.5rem;
}

.token-intel-subtitle {
    font-size: 1.1rem;
    color: #cccccc;
    margin: 0;
    opacity: 0.9;
}

/* Token Intel Info Row */
.token-intel-info-row {
    position: relative;
    z-index: 1;
    margin-bottom: 20px;
}

.token-intel-info-row-container {
    display: flex;
    gap: 1.5rem;
    align-items: stretch;
    width: 100%;
}

.token-intel-info-row-container > * {
    flex: 1 1 0;
    min-width: 0;
    max-width: 100%;
}

/* Token Intel Header Info */
.token-intel-header-info {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 20;
    background: linear-gradient(135deg, rgba(230, 25, 230, 0.1) 0%, rgba(139, 92, 246, 0.1) 100%);
    border: 2px solid rgba(230, 25, 230, 0.3);
    border-radius: 12px;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    box-sizing: border-box;
    padding: 1rem 1.5rem;
}

.token-intel-header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    width: 100%;
    border: none !important;
    background: transparent !important;
    padding: 0 !important;
}

.token-intel-header-logo {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    border: 2px solid rgba(230, 25, 230, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.3);
}

.token-intel-header-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.token-intel-header-logo-fallback {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #e619e6;
    font-size: 1.5rem;
}

.token-intel-header-details {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    flex: 1;
    min-width: 0;
}

.token-intel-header-name {
    font-size: 1.25rem;
    font-weight: 700;
    color: #ffffff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.token-intel-header-symbol {
    font-size: 0.875rem;
    color: #cccccc;
    opacity: 0.8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.token-intel-header-price {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.3rem;
    flex-shrink: 0;
}

.token-intel-header-price > * {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.35rem;
    flex-wrap: wrap;
    max-width: 100%;
}

.token-intel-header-price .price-source,
.token-intel-header-price .token-intel-price-source,
.token-intel-header-price a.price-source-link {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
    background: rgba(230, 25, 230, 0.15);
    border: 1px solid rgba(230, 25, 230, 0.3);
    color: #e619e6;
    text-decoration: none;
    line-height: 1.2;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

.token-intel-header-price-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: #ffffff;
}

.token-intel-header-price-change {
    font-size: 0.875rem;
    font-weight: 600;
}

.token-intel-header-price-change.positive {
    color: #00ff88;
}

.token-intel-header-price-change.negative {
    color: #ff4444;
}

/* Token Intel Summary Stats */
.token-intel-summary-stats {
    position: relative;
    z-index: 1;
    display: flex;
    flex-wrap: wrap;
    gap: 1.25rem;
    justify-content: center;
    align-items: stretch;
    padding: 1rem 0;
    background: #000000;
    margin: 0 auto 20px auto;
    width: clamp(320px, 80vw, 800px);
    max-width: 100%;
    box-sizing: border-box;
    flex: 0 0 auto;
}

.token-intel-stat-card {
    display: inline-flex;
    align-items: center;
    gap: 1rem;
    padding: 0.875rem 1.25rem;
    background: linear-gradient(135deg, rgba(230, 25, 230, 0.1) 0%, rgba(139, 92, 246, 0.1) 100%);
    border: 2px solid rgba(230, 25, 230, 0.3);
    border-radius: 12px;
    width: auto;
    max-width: none;
    flex: 1 1 260px;
    min-width: 240px;
    transition: all 0.3s ease;
    white-space: normal;
    min-width: unset;
    height: auto;
}

@media (max-width: 860px) {
    .token-intel-summary-stats {
        flex-wrap: wrap;
        width: calc(100% - 32px);
        max-width: calc(100% - 32px);
    }
}

.token-intel-stat-card:hover {
    border-color: rgba(230, 25, 230, 0.6);
    box-shadow: 0 0 20px rgba(230, 25, 230, 0.2);
    transform: translateY(-2px);
}

.token-intel-stat-icon {
    font-size: 2rem;
    color: #e619e6;
    display: flex;
    align-items: center;
    justify-content: center;
}

.token-intel-stat-content {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    align-items: flex-start;
}

.token-intel-stat-label {
    font-size: 0.875rem;
    color: #cccccc;
    opacity: 0.8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.token-intel-stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #ffffff;
}

/* Token Intel Search Section */
.token-intel-search-section {
    position: relative;
    z-index: 100;
    padding: 2rem 0;
    background: #000000;
}

.token-intel-search-container {
    max-width: 600px;
    margin: 0 auto;
    padding: 0 1rem;
    position: relative;
    z-index: 101;
}

.token-intel-search-input {
    flex: 1;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(230, 25, 230, 0.3);
    border-radius: 8px;
    color: #ffffff;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.token-intel-search-input:focus {
    outline: none;
    border-color: #e619e6;
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 0 20px rgba(230, 25, 230, 0.3);
}

.token-intel-search-input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.token-intel-search-input:not(:placeholder-shown) {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
}

/* Override browser autofill styling */
.token-intel-search-input:-webkit-autofill,
.token-intel-search-input:-webkit-autofill:hover,
.token-intel-search-input:-webkit-autofill:focus,
.token-intel-search-input:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 30px rgba(255, 255, 255, 0.1) inset !important;
    -webkit-text-fill-color: #ffffff !important;
    background: rgba(255, 255, 255, 0.1) !important;
    transition: background-color 5000s ease-in-out 0s;
}

.token-intel-search-btn {
    padding: 1rem 2rem;
    background: linear-gradient(135deg, #e619e6 0%, #8000ff 100%);
    border: none;
    border-radius: 8px;
    color: #ffffff;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.token-intel-search-btn:hover {
    background: linear-gradient(135deg, #ff00ff 0%, #a000ff 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(230, 25, 230, 0.4);
}

.token-intel-search-info {
    text-align: center;
    margin-top: 1rem;
}

.token-intel-search-info p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
    margin: 0;
}

/* Token Intel Visualization Container */
.token-intel-visualization-container {
    position: relative;
    min-height: 800px;
    width: 100%;
    background: transparent;
    border: 2px solid rgba(230, 25, 230, 0.3);
    border-radius: 12px;
    padding: 20px;
    z-index: 1;
    overflow: hidden;
}

.token-intel-network-graph {
    width: 100%;
    height: 800px;
    min-height: 800px;
    background: transparent;
    position: relative;
    overflow: hidden;
}

.token-intel-controls {
    position: absolute;
    bottom: 24px;
    left: 24px;
    z-index: 25;
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
    align-items: flex-start;
    pointer-events: auto;
}

.token-intel-control-group {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    align-items: stretch;
}

.token-intel-zoom-controls {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.token-intel-address-list-container {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 25;
    display: flex;
    pointer-events: auto;
}

.token-intel-address-list-dropdown {
    position: absolute;
    bottom: calc(100% + 12px);
    right: 0;
    width: 360px;
    max-width: min(90vw, 420px);
    max-height: 75vh;
    display: none;
}

@media (max-width: 1024px) {
    .token-intel-header-info {
        width: calc(100% - 48px);
        max-width: 460px;
    }
    
    .token-intel-visualization-container {
        min-height: clamp(400px, 72vh, 820px);
        height: clamp(400px, 75vh, 860px);
    }
    
    .token-intel-network-graph {
        min-height: clamp(340px, 68vh, 780px);
    }
}

@media (max-width: 768px) {
    .token-intel-controls {
        display: none !important;
    }
    
    .token-intel-header {
        padding: 1.5rem 0 1rem;
    }
    
    .token-intel-header-info {
        position: static;
        transform: none;
        width: 100%;
        max-width: 340px;
        margin: 0.35rem auto 0.6rem;
        padding: 0.55rem 0.8rem;
        flex-direction: column;
        align-items: stretch;
        text-align: left;
        gap: 0.4rem;
        border-width: 1px;
    }
    
    .token-intel-header-content {
        display: flex;
        width: 100%;
        flex-direction: row;
        align-items: center;
        justify-content: flex-start;
        gap: 0.55rem;
        padding: 0;
    }
    
    .token-intel-header-logo {
        width: 38px;
        height: 38px;
        border-width: 1px;
    }
    
    .token-intel-header-details {
        align-items: flex-start;
        text-align: left;
        gap: 0.1rem;
        min-width: 0;
    }
    
    .token-intel-header-name {
        font-size: 0.98rem;
        line-height: 1.15;
    }
    
    .token-intel-header-symbol {
        font-size: 0.68rem;
        letter-spacing: 0.25px;
    }
    
    .token-intel-header-price {
        margin-left: auto;
        align-items: flex-end;
        text-align: right;
        gap: 0.25rem;
    }
    
    .token-intel-header-price > * {
        justify-content: flex-end;
    }
    
    .token-intel-header-price-value {
        font-size: 0.92rem;
    }
    
    .token-intel-header-price-change {
        font-size: 0.72rem;
    }
    
    .token-intel-summary-stats {
        width: 100% !important;
        max-width: 100% !important;
        padding: 0.75rem 1rem;
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
    }
    
    .token-intel-stat-card {
        width: 100%;
        min-width: 0;
        justify-content: flex-start;
        align-items: flex-start;
        white-space: normal;
    }
    
    .token-intel-stat-icon {
        font-size: 1.75rem;
    }
    
    .token-intel-visualization-container {
        padding: 12px 12px 14px;
        min-height: clamp(260px, 48vh, 460px);
        height: clamp(260px, 52vh, 480px);
    }
    
    .token-intel-network-graph {
        min-height: clamp(230px, 45vh, 440px);
        height: clamp(230px, 48vh, 460px);
    }
    
    .token-intel-address-list-container {
        position: absolute;
        left: 0;
        right: 0;
        bottom: 16px;
        z-index: 30;
        display: flex;
        justify-content: center;
        padding: 0 16px;
        pointer-events: none;
    }
    
    .token-intel-address-list-btn {
        width: 100%;
        max-width: 320px;
        justify-content: center;
        padding: 0.5rem 0.7rem;
        font-size: 0.8rem;
        border-width: 1px;
        pointer-events: auto;
    }
    
    .token-intel-address-list-dropdown {
        position: fixed;
        left: 50%;
        right: auto;
        bottom: 16px;
        top: auto;
        transform: translateX(-50%);
        width: min(92vw, 360px);
        max-height: 55vh;
    }
}

@media (max-width: 540px) {
    .token-intel-title h1 {
        font-size: 2rem;
    }
    
    .token-intel-subtitle {
        font-size: 1rem;
    }
    
    .token-intel-header-logo {
        width: 56px;
        height: 56px;
    }
    
    .token-intel-header-info {
        padding: 0.85rem 1rem;
    }
    
    .token-intel-header-name {
        font-size: 1.05rem;
    }
    
    .token-intel-header-price-value {
        font-size: 1rem;
    }
    
    .token-intel-header-price-change {
        font-size: 0.8rem;
    }
    
    .token-intel-summary-stats {
        padding: 0.75rem;
        gap: 0.65rem;
    }
    
    .token-intel-stat-card {
        padding: 0.75rem 1rem;
        gap: 0.75rem;
    }
    
    .token-intel-stat-label {
        font-size: 0.8rem;
    }
    
    .token-intel-stat-value {
        font-size: 1.35rem;
    }
    
    .token-intel-visualization-container {
        min-height: clamp(340px, 70vh, 640px);
        height: clamp(340px, 72vh, 680px);
    }
    
    .token-intel-network-graph {
        min-height: clamp(300px, 64vh, 600px);
    }
    
    .token-intel-control-btn {
        padding: 0.65rem 1rem;
        font-size: 0.85rem;
    }
    
    .token-intel-zoom-controls .token-intel-control-btn {
        height: 38px;
    }
}

@media (max-width: 400px) {
    .token-intel-header-logo {
        width: 48px;
        height: 48px;
    }
    
    .token-intel-network-graph {
        min-height: 280px;
    }
    
    .token-intel-zoom-controls .token-intel-control-btn {
        flex: 1 1 50%;
        height: 36px;
        padding: 0.5rem 0.6rem;
        font-size: 0.8rem;
    }
    
    .token-intel-csv-btn {
        padding: 0.6rem 0.85rem;
        font-size: 0.85rem;
        letter-spacing: 0.01em;
    }
    
    .token-intel-address-list-btn {
        font-size: 0.8rem;
        padding: 0.55rem 0.75rem;
    }
}

@media (max-width: 768px) {
    .token-intel-watermark .token-intel-watermark-text {
        display: none !important;
    }
    
    .token-intel-address-list-container {
        position: absolute !important;
        top: auto !important;
        bottom: 16px !important;
        left: 16px !important;
        right: 16px !important;
        display: flex !important;
        justify-content: center !important;
        padding: 0 !important;
        pointer-events: none !important;
        z-index: 40 !important;
    }
    
    .token-intel-address-list-btn {
        width: 100% !important;
        max-width: 360px !important;
        pointer-events: auto !important;
    }
    
    .token-intel-address-list-dropdown {
        position: fixed !important;
        left: 50% !important;
        right: auto !important;
        bottom: 16px !important;
        top: auto !important;
        transform: translateX(-50%) !important;
        width: min(92vw, 360px) !important;
        max-height: 55vh !important;
        z-index: 4000 !important;
    }
}

/* Token Intel Loading State */
.token-intel-loading-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    color: #ffffff;
    text-align: center;
}

.token-intel-loading-state .loading-spinner {
    font-size: 3rem;
    color: #e619e6;
    margin-bottom: 1rem;
}

.token-intel-loading-state .loading-spinner i {
    animation: spin 1s linear infinite;
}

.token-intel-loading-state p {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.8);
    margin: 0;
}

/* Token Intel Error State */
.token-intel-error-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    color: #ffffff;
    text-align: center;
}

.token-intel-error-state i {
    font-size: 3rem;
    color: #EF4444;
    margin-bottom: 1rem;
}

.token-intel-error-state p {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.8);
    margin: 0;
}

/* Token Intel Empty State */
.token-intel-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    color: #ffffff;
    text-align: center;
}

.token-intel-empty-state i {
    font-size: 4rem;
    color: #e619e6;
    margin-bottom: 1.5rem;
    opacity: 0.7;
}

.token-intel-empty-state h3 {
    font-size: 1.8rem;
    color: #ffffff;
    margin: 0 0 1rem 0;
}

.token-intel-empty-state p {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.7);
    margin: 0;
    max-width: 500px;
}

/* Token Intel Controls */
.token-intel-controls {
    position: absolute;
    top: 20px;
    left: 20px;
    z-index: 25;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.token-intel-control-group {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    align-items: flex-start;
}

.token-intel-control-btn {
    padding: 0.75rem 1.25rem;
    background: rgba(230, 25, 230, 0.15);
    border: 2px solid rgba(230, 25, 230, 0.4);
    border-radius: 8px;
    color: #ffffff;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
}

.token-intel-control-btn:hover {
    background: rgba(230, 25, 230, 0.25);
    border-color: #e619e6;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(230, 25, 230, 0.3);
}

.token-intel-control-btn:active {
    transform: translateY(0);
}

.token-intel-control-btn i {
    font-size: 1rem;
}

.token-intel-csv-btn {
    width: auto;
    min-width: 160px;
}

.token-intel-zoom-controls {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.token-intel-zoom-controls .token-intel-control-btn {
    width: 40px;
    height: 40px;
    padding: 0;
    justify-content: center;
    min-width: 40px;
}

.token-intel-address-list-container {
    position: absolute;
    bottom: 24px;
    right: 24px;
    z-index: 25;
    display: flex;
    pointer-events: auto;
}

.token-intel-address-list-btn {
    padding: 0.75rem 1.25rem;
    background: rgba(230, 25, 230, 0.15);
    border: 2px solid rgba(230, 25, 230, 0.4);
    border-radius: 8px;
    color: #ffffff;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
    position: relative;
    z-index: 1001;
    pointer-events: auto;
}

.token-intel-address-list-btn:hover {
    background: rgba(230, 25, 230, 0.25);
    border-color: #e619e6;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(230, 25, 230, 0.3);
}

.token-intel-address-list-btn.active {
    background: rgba(230, 25, 230, 0.3);
    border-color: #e619e6;
}

.token-intel-address-list-arrow {
    transition: transform 0.3s ease;
    font-size: 0.75rem;
}

.token-intel-address-list-btn.active .token-intel-address-list-arrow {
    transform: rotate(180deg);
}

.token-intel-address-list-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: 360px;
    max-width: calc(100vw - 40px);
    max-height: 600px;
    background: rgba(0, 0, 0, 0.95);
    border: 2px solid rgba(230, 25, 230, 0.4);
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.8);
    overflow: hidden;
    z-index: 3000;
    pointer-events: auto;
}

.token-intel-address-list-header {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid rgba(230, 25, 230, 0.2);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(230, 25, 230, 0.1);
}

.token-intel-address-list-header h4 {
    margin: 0;
    color: #ffffff;
    font-size: 1rem;
    font-weight: 600;
}

.token-intel-address-list-count {
    color: #cccccc;
    font-size: 0.875rem;
}

.token-intel-address-list-content {
    max-height: 500px;
    overflow-y: auto;
    padding: 0.5rem 0;
}

.token-intel-address-list-item {
    padding: 0.875rem 1.25rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background-color 0.2s ease;
    cursor: pointer;
}

.token-intel-address-list-item:hover {
    background: rgba(230, 25, 230, 0.1);
}

.token-intel-address-list-item:last-child {
    border-bottom: none;
}

.token-intel-address-list-item-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    min-width: 0;
}

.token-intel-address-list-item-address {
    font-size: 0.875rem;
    color: #ffffff;
    font-family: 'Courier New', monospace;
    word-break: break-all;
}

.token-intel-address-list-item-percentage {
    font-size: 0.75rem;
    color: #e619e6;
    font-weight: 600;
}

.token-intel-address-list-item-actions {
    display: flex;
    gap: 0.5rem;
    margin-left: 1rem;
    flex-shrink: 0;
}

.token-intel-address-list-item-btn {
    width: 32px;
    height: 32px;
    padding: 0;
    background: rgba(230, 25, 230, 0.2);
    border: 1px solid rgba(230, 25, 230, 0.4);
    border-radius: 6px;
    color: #ffffff;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
}

.token-intel-address-list-item-btn:hover {
    background: rgba(230, 25, 230, 0.3);
    border-color: #e619e6;
    transform: scale(1.1);
}

.token-intel-address-list-item-btn.intel-btn {
    background: rgba(230, 25, 230, 0.3);
}

.token-intel-address-list-item-btn.intel-btn:hover {
    background: rgba(230, 25, 230, 0.4);
}
