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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    height: 100vh;
    height: 100dvh; /* Dynamic viewport height for mobile browsers */
    overflow: hidden;
    -webkit-text-size-adjust: 100%;
    -webkit-overflow-scrolling: touch;
}

.chat-container {
    display: flex;
    flex-direction: column;
    height: 100vh;
    max-width: 1200px;
    margin: 0 auto;
    background: white;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
}

.header {
    background: #EEF4FF;
    color: #1E293B;
    padding: 15px 30px;
    text-align: left;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    backdrop-filter: blur(10px);
    position: relative;
    z-index: 10;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

/* Main Site Link */
.main-site-link {
    display: flex;
    align-items: center;
    gap: 4px;
    color: #7da9ff !important;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.main-site-link:hover {
    color: #6b96ff !important;
    text-decoration: underline;
}

.main-site-link svg {
    width: 20px;
    height: 20px;
    stroke-width: 2;
    opacity: 0.7;
}

.header h1 {
    font-size: 34px;
    font-weight: 800;
    margin: 0 0 4px 0;
    letter-spacing: -0.02em;
    display: flex;
    align-items: center;
    gap: 12px;
}

.title-wrapper {
    position: relative;
    display: inline-block;
}

.title-wrapper .version {
    font-size: 12px;
    font-weight: 400;
    opacity: 0.6;
}

.header-logo {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 2px solid #7da9ff;
    object-fit: cover;
    background: white;
    padding: 2px;
}

.header p {
    font-size: 14px;
    color: #475569; 
    font-weight: 400;
    line-height: 1.6;
    margin: 0;
}

.messages-container {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    padding-bottom: 20px; /* Space for input container */
    background: #fafbfc;
    scroll-behavior: smooth;
}

.messages-container::-webkit-scrollbar {
    width: 6px;
}

.messages-container::-webkit-scrollbar-track {
    background: #f1f3f4;
}

.messages-container::-webkit-scrollbar-thumb {
    background: #c1c8cd;
    border-radius: 3px;
}

.message {
    margin-bottom: 20px;
    animation: messageSlideIn 0.3s ease-out;
}

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

.message.user {
    display: flex;
    justify-content: flex-end;
}

.message.ai {
    display: flex;
    justify-content: flex-start;
}

.message-bubble {
    max-width: 75%;
    padding: 16px 20px;
    border-radius: 18px;
    word-wrap: break-word;
    line-height: 1.4;
    position: relative;
}

.message.user .message-bubble {
    background: #7da9ff;
    color: white;
    border-bottom-right-radius: 1px;
    padding: 16px 20px;
    padding-bottom: 8px;
}

.message.ai .message-bubble {
    background: white;
    color: #2c3e50;
    border: 1px solid #e1e8ed;
    border-bottom-left-radius: 1px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    padding: 0;
    overflow: hidden;
    max-width: 75%;
    flex: 1;
}

.message.user .message-time {
    color: rgba(255, 255, 255, 0.8);
}

.message.ai .message-time {
    color: #666;
    padding: 0px 20px;
    padding-bottom: 8px;
}

.message-time {
    font-size: 11px;
    opacity: 0.6;
    text-align: right;
}



/* Loading Animation */
.loading-message {
    display: flex;
    align-items: center;
    padding: 16px 20px;
    background: white;
    border-radius: 18px;
    border: 1px solid #e1e8ed;
    max-width: 200px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.loading-dots {
    display: flex;
    gap: 4px;
    margin-left: 8px;
}

.loading-dots span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #667eea;
    animation: loadingDot 1.4s ease-in-out infinite both;
}

.loading-dots span:nth-child(1) { animation-delay: -0.32s; }
.loading-dots span:nth-child(2) { animation-delay: -0.16s; }

@keyframes loadingDot {
    0%, 80%, 100% {
        transform: scale(0);
        opacity: 0.5;
    }
    40% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Analysis Sections */
.wallet-analysis-container {
    max-width: 100%;
}

.analysis-header {
    background: #EEF4FF;
    color: #1E293B;
    padding: 20px 24px;
    text-align: center;
    animation: fadeIn 0.5s ease-out;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.analysis-header h2 {
    margin: 0 0 8px 0;
    font-size: 20px;
    font-weight: 600;
    letter-spacing: -0.01em;
}

.wallet-address-main {
    background: rgba(30, 41, 59, 0.05);
    padding: 8px 12px;
    border-radius: 6px;
    font-family: 'Monaco', 'Courier New', monospace;
    font-size: 14px;
    word-break: break-all;
    color: #475569;
}

.analysis-section {
    background: white;
    border: none;
    border-bottom: 1px solid #e1e8ed;
    padding: 20px;
}

.analysis-section:last-child {
    border-bottom: none;
    border-bottom-left-radius: 18px;
    border-bottom-right-radius: 18px;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

.analysis-section h3 {
    margin: 0 0 16px 0;
    color: #2c3e50;
    font-size: 18px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.analysis-section p {
    margin: 0 0 16px 0;
}

.wallet-address {
    background: #f8f9fa;
    border-radius: 6px;
    margin-bottom: 16px;
    font-size: 14px;
    word-break: break-all;
}

/* Info Grid */
.info-grid {
    display: grid;
    gap: 8px;
}

.info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: #fafbfc;
    border-radius: 8px;
    border: 1px solid #f0f0f0;
    transition: background-color 0.2s ease;
}

.info-item:hover {
    background: #f5f6f7;
}

.info-item span {
    color: #5a6c7d;
    font-weight: 500;
}

.info-item strong {
    color: #2c3e50;
    font-weight: 600;
}

.info-item img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid #e1e8ed;
}

/* Balance Summary */
.balance-summary {
    display: flex;
    gap: 20px;
    margin-bottom: 16px;
    padding: 16px;
    background: linear-gradient(135deg, #f8f9ff 0%, #e6f3ff 100%);
    border-radius: 12px;
    border: 1px solid #e0e6ff;
}

.summary-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
    text-align: center;
}

.summary-item span {
    color: #5a6c7d;
    font-size: 14px;
    font-weight: 500;
}

.summary-item strong {
    font-size: 18px;
    font-weight: 700;
}

/* Token List */
.token-list {
    background: #fafbfc;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #e9ecef;
}

.token-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid #f0f0f0;
    transition: background-color 0.2s ease;
}

.token-row:hover {
    background: #f5f6f7;
}

.token-row:last-child {
    border-bottom: none;
}



/* Deploy Stats */
.deploy-stats {
    display: flex;
    gap: 20px;
    margin-bottom: 16px;
    padding: 16px;
    background: linear-gradient(135deg, #f0f8ff 0%, #e6f3ff 100%);
    border-radius: 12px;
    border: 1px solid #cce7ff;
}

.deploy-stats span {
    font-size: 14px;
    color: #5a6c7d;
}

.deploy-stats strong {
    color: #2c3e50;
    font-weight: 600;
}

/* Funding Info */
.funding-info {
    background: #f8f9fa;
    padding: 16px;
    border-radius: 12px;
    border: 1px solid #e9ecef;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.funding-address {
    font-size: 14px;
    margin: 0;
    color: #2c3e50;
}

.funding-address code {
    background: #e9ecef;
    padding: 4px 8px;
    border-radius: 4px;
    font-family: 'Monaco', 'Courier New', monospace;
    font-size: 12px;
    word-break: break-all;
    color: #7da9ff;
    cursor: pointer;
    transition: all 0.2s ease;
}

.funding-address code:hover {
    background: #7da9ff;
    color: white;
    transform: scale(1.02);
}

/* Relay Badge */
.relay-badge {
    background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
    color: #856404;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    margin: 0;
    display: inline-block;
    border: 1px solid #f1c40f;
    white-space: nowrap;
}

/* Error States */
.error {
    border-left: 4px solid #e74c3c;
    background: linear-gradient(135deg, #fff5f5 0%, #ffe6e6 100%);
}

.error h3 {
    color: #c53030;
}

.error-content p {
    color: #e74c3c;
    margin: 8px 0;
}

/* More Info */
.more-info {
    text-align: center;
    color: #7f8c8d;
    font-size: 14px;
    margin-top: 16px;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 8px;
    font-style: italic;
}

/* Input Container */
.input-container {
    padding: 20px 30px;
    background: white;
    border-top: 1px solid #e1e8ed;
    display: flex;
    gap: 12px;
    align-items: flex-end;
    position: sticky;
    bottom: 0;
    z-index: 100;
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
}

.input-field {
    flex: 1;
    min-height: 44px;
    max-height: 120px;
    padding: 12px 16px;
    border: 2px solid #e1e8ed;
    border-radius: 22px;
    font-size: 16px;
    font-family: inherit;
    resize: none;
    outline: none;
    transition: all 0.3s ease;
    background: #fafbfc;
    -webkit-appearance: none;
    appearance: none;
    -webkit-border-radius: 22px;
    -webkit-user-select: text;
    user-select: text;
    -webkit-touch-callout: default;
    position: relative;
    z-index: 101;
    will-change: transform;
}

.input-field:focus {
    border-color: #667eea;
    background: white;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    -webkit-appearance: none;
    appearance: none;
    -webkit-tap-highlight-color: transparent;
}

.send-button {
    width: 44px;
    height: 44px;
    border: none;
    border-radius: 50%;
    background: #7da9ff;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.send-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.send-button:active {
    transform: translateY(0);
}

.send-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Welcome Message */
.welcome-message {
    text-align: center;
    padding: 40px 20px;
    color: #7f8c8d;
}

.welcome-message h2 {
    margin-bottom: 16px;
    color: #2c3e50;
    font-size: 24px;
}

.welcome-message p {
    margin-bottom: 20px;
    line-height: 1.6;
}

.welcome-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-top: 24px;
}

.feature-item {
    background: white;
    padding: 16px;
    border-radius: 12px;
    border: 1px solid #e1e8ed;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.feature-item h4 {
    color: #667eea;
    margin-bottom: 8px;
    font-size: 16px;
}

.feature-item p {
    color: #5a6c7d;
    font-size: 14px;
    margin: 0;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .header {
        padding: 16px 20px;
    }
    
    .header-content {
        align-items: center;
        gap: 16px;
    }
    
    .main-site-link {
        font-size: 13px;
        gap: 3px;
    }
    
    .main-site-link svg {
        width: 11px;
        height: 11px;
    }

    .header h1 {
        font-size: 24px;
        gap: 10px;
    }

    .title-wrapper .version {
        bottom: 1px;
        right: -34px;
        font-size: 12px;
    }
    
    .header-logo {
        width: 32px;
        height: 32px;
    }

    .messages-container {
        padding: 16px;
        padding-bottom: 100px;
    }

    .message-bubble {
        max-width: 100%;
    }
    
    .message.ai .message-bubble {
        max-width: 100%;
    }

    .input-container {
        padding: 16px 20px;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        width: 100%;
        box-sizing: border-box;
        z-index: 1000;
        -webkit-transform: translateZ(0);
        transform: translateZ(0);
    }
    
    /* Profile tablet/mobile fixes */
    .profile-header {
        flex-wrap: wrap;
    }
    
    .profile-name {
        font-size: 20px;
        max-width: calc(100% - 20px);
    }
    
    .profile-tier-badges {
        max-width: 100%;
    }
    
    /* Chrome mobile specific fixes */
    .input-field {
        -webkit-user-select: text !important;
        user-select: text !important;
        -webkit-appearance: none !important;
        -moz-appearance: none !important;
        appearance: none !important;
        -webkit-tap-highlight-color: transparent !important;
        box-sizing: border-box;
    }
    
    /* Ensure input is visible when keyboard appears */
    .chat-container {
        height: 100vh;
        height: 100dvh; /* Dynamic viewport height for mobile browsers */
    }

    .balance-summary {
        flex-direction: column;
        gap: 12px;
    }


    .token-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
        padding: 16px;
    }

    .token-value {
        text-align: left;
        min-width: auto;
    }

    .info-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .welcome-features {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    /* Header mobile fixes for very small screens */
    .header-content {
        gap: 12px;
        align-items: center;
    }
    
    .main-site-link {
        font-size: 12px;
        gap: 2px;
    }
    
    .main-site-link svg {
        width: 10px;
        height: 10px;
    }

    /* Profile mobile fixes */
    .profile-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .profile-avatar {
        width: 60px;
        height: 60px;
        align-self: center;
    }
    
    .profile-main-info {
        width: 100%;
        text-align: center;
    }
    
    .profile-name {
        font-size: 20px;
        text-align: center;
    }
    
    .profile-tier-badges {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .profile-description {
        text-align: center;
        font-size: 13px;
    }

    .analysis-header h2 {
        font-size: 20px;
    }

    .wallet-address-main {
        font-size: 12px;
    }

    .token-address {
        font-size: 10px;
    }
    .moonshot-token-main {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .moonshot-token-right {
        text-align: left !important;
    }

    .holder-card {
        align-items: flex-start !important;
    }
    
    .holder-name {
        flex-direction: column-reverse !important;
        align-items: flex-start !important;
        gap: 4px !important;
    }
    .holder-rank {
        background: none !important;
        border: none !important;
        padding: 0 !important;
        margin-top: 1px !important;
        min-width: auto !important;
    }
    .portal-link {
        display: none !important;
    }
}



/* Profile Section Improvements */
.profile-section {
    padding: 16px !important;
    overflow: hidden;
    width: 100%;
    box-sizing: border-box;
}

.profile-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
    overflow: hidden;
    width: 100%;
}

.profile-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 3px solid #7da9ff;
    object-fit: cover;
}

.profile-main-info {
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

.profile-name {
    font-size: 24px;
    font-weight: 700;
    color: #2c3e50;
    margin: 0 0 8px 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100%;
}

.profile-tier-badges {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    flex-wrap: wrap;
    overflow: hidden;
    max-width: 100%;
}

.tier-badge {
    padding: 4px 12px;
    border-radius: 16px;
    font-size: 12px;
    font-weight: 600;
    text-transform: capitalize;
    white-space: nowrap;
}

.tier-badge.bronze {
    background: #f4e6d3;
    color: #8b4513;
    border: 1px solid #cd853f;
}

.tier-badge.silver {
    background: #f0f0f0;
    color: #666;
    border: 1px solid #c0c0c0;
}

.tier-badge.gold {
    background: #fef9e7;
    color: #b8860b;
    border: 1px solid #f8dc96;
}

.tier-badge.platinum {
    background: #f5f5f5;
    color: #666;
    border: 1px solid #bbb;
}

.badges-count {
    background: #e3f2fd;
    color: #1976d2;
    padding: 4px 12px;
    border-radius: 16px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}

.streaming-status {
    padding: 4px 12px;
    border-radius: 16px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}

.streaming-status.no {
    background: #ffebee;
    color: #c62828;
}

.streaming-status.yes {
    background: #e8f5e8;
    color: #2e7d32;
}

.profile-description {
    color: #666;
    font-size: 14px;
    line-height: 1.4;
    margin-top: 8px;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
    max-width: 100%;
}

/* Hide old profile grid */
.profile-grid {
    display: none;
}

/* Token Display */
.token-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 12px;
    margin-top: 16px;
    width: 100%;
}

.token-card {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    padding: 12px;
    display: flex;
    gap: 8px;
    overflow: hidden;
    word-wrap: break-word;
    min-height: fit-content;
}

/* Token Info Container */
.token-info {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: flex-start;
    gap: 4px;
    flex: 1;
    overflow: hidden;
    word-wrap: break-word;
    min-width: 0;
}

/* Token Header (Left side - rank, symbol, name) */
.token-header {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
}

.token-rank {
    background: #f0f4f8;
    color: #64748b;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
    flex-shrink: 0;
    border: 1px solid #e2e8f0;
}

.token-header h4 {
    font-size: 16px;
    color: #2c3e50;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
    margin: 0;
}

.token-header .token-name,
.token-name {
    font-size: 12px;
    color: #666;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
}

/* Token Details (Right side - prices) */
.token-details {
    display: flex;
    flex-direction: column;
    gap: 4px;
    align-items: flex-end;
    text-align: right;
    flex-shrink: 0;
}

.token-details .token-value,
.token-value {
    font-size: 16px;
    font-weight: 600;
    color: #27ae60;
    text-align: right;
    min-width: 120px;
}

.token-details .token-price,
.token-value .price {
    font-size: 11px;
    color: #999;
    margin: 0;
}



.token-balance {
    color: #95a5a6;
    font-size: 12px;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.token-address {
    color: #95a5a6;
    font-size: 12px;
    font-family: 'Monaco', 'Courier New', monospace;
    word-break: break-all;
    margin-top: 2px;
}

.token-value .value {
    font-weight: 600;
    color: #27ae60;
    font-size: 16px;
}

/* Deploy Section */
.deploys-section {
    padding: 16px !important;
}

.deploy-stats {
    display: flex;
    gap: 20px;
    margin-bottom: 16px;
    padding: 12px 16px;
    background: linear-gradient(135deg, #f0f8ff 0%, #e6f3ff 100%);
    border-radius: 8px;
    border: 1px solid #cce7ff;
}

.deploy-stats span {
    font-size: 14px;
    color: #5a6c7d;
    font-weight: 500;
}

.deploy-stats strong {
    color: #2c3e50;
    font-weight: 600;
}

/* Relay Stats */
.relay-stats {
    display: flex;
    gap: 20px;
    margin-bottom: 16px;
    padding: 12px 16px;
    background: linear-gradient(135deg, #fff8f0 0%, #ffecdc 100%);
    border-radius: 8px;
    border: 1px solid #ffd4a3;
}

.relay-stats span {
    font-size: 14px;
    color: #7d5a3f;
    font-weight: 500;
}

.relay-stats strong {
    color: #8b4513;
    font-weight: 600;
}

.deploys-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 12px;
    margin-top: 16px;
}

.deploy-item {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    padding: 12px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    transition: all 0.2s ease;
}

.deploy-item:hover {
    background: #f5f6f7;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.deploy-left {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.deploy-left h4 {
    margin: 0;
    font-size: 16px;
    color: #2c3e50;
    font-weight: 600;
}

.deploy-left .token-symbol {
    font-size: 12px;
    color: #666;
    font-weight: 500;
}

.deploy-right {
    flex-shrink: 0;
    text-align: right;
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 100px;
}

.deploy-address {
    font-family: 'Monaco', 'Courier New', monospace;
    font-size: 11px;
    color: #7da9ff;
    background: #e9ecef;
    padding: 4px 8px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: all;
    word-break: break-all;
}

.deploy-address:hover {
    background: #7da9ff;
    color: white;
    transform: scale(1.02);
}

.deploy-status {
    font-size: 12px;
    color: #666;
    font-style: italic;
}

/* Total value highlight */
.total-value {
    background: linear-gradient(135deg, #e8f5e8 0%, #f0fff0 100%);
    border: 1px solid #c3e6c3;
    border-radius: 8px;
    padding: 12px;
    text-align: center;
    margin-bottom: 16px;
}

.total-value strong {
    font-size: 18px;
    color: #27ae60;
}

/* Total Holders Block */
.total-holders {
    background: linear-gradient(135deg, #e8e4f5 0%, #f0ebff 100%);
    border: 1px solid #c3b5e6;
    border-radius: 8px;
    padding: 12px;
    text-align: center;
    margin-bottom: 16px;
}

.total-holders strong {
    font-size: 18px;
    color: #8b5cf6;
}

/* Holders List - Single Column Layout */
.holders-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 16px;
}

/* Holder Card - Similar to token-card but single column */
.holder-card {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    padding: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.holder-card.error-card {
    background: #fef2f2;
    border-color: #fca5a5;
}

/* Holder Info Container */
.holder-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.holder-header {
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.holder-rank {
    background: #f0f4f8;
    color: #64748b;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 8px;
    font-size: 12px;
    font-weight: 600;
    min-width: 32px;
    text-align: center;
}

.holder-details {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.holder-name {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 2px;
}

.holder-name .agw-name {
    color: #8b5cf6;
    font-weight: 600;
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.wallet-name.agw-name {
    color: #27ae60;
    font-weight: 600;
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Portal Link - General Styles */
.portal-link {
    color: #6b7280;
    text-decoration: none;
    font-size: 14px;
    opacity: 0.7;
    transition: opacity 0.2s;
    display: inline-block;
}

.portal-link:hover {
    opacity: 1;
    color: #8b5cf6;
}

.portal-link img {
    width: 14px;
    height: 14px;
    vertical-align: middle;
    filter: opacity(0.7);
    transition: filter 0.2s;
}

.portal-link:hover img {
    filter: opacity(1) sepia(1) saturate(2) hue-rotate(230deg);
}

/* Portal Link in Profile Name */
.profile-name .portal-link {
    display: inline-block !important;
    font-size: 16px;
    margin-left: 0px;
    vertical-align: middle;
    line-height: 16px;
}

.profile-name .portal-link img {
    width: 16px;
    height: 16px;
}

/* Portal Link in Holder Name */
.holder-name .portal-link {
    font-size: 12px;
}

.holder-name .portal-link img {
    width: 12px;
    height: 12px;
}

/* Portal Link in Funding Address */
.funding-address .portal-link {
    font-size: 12px;
    margin-left: 4px;
}

.funding-address .portal-link img {
    width: 12px;
    height: 12px;
}

/* AGW Badge Link */
.agw-badge-link {
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s;
}

.agw-badge-link:hover {
    transform: scale(1.05);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.holder-address {
    font-size: 12px;
    color: #3b82f6;
    cursor: pointer;
    background: transparent;
    border: none;
    padding: 2px 4px;
    border-radius: 4px;
    display: inline-block;
    width: auto;
    min-width: 0;
}

.holder-address:hover {
    background: #eff6ff;
    color: #2563eb;
}

/* Holder Stats Container */
.holder-stats {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
    min-width: 100px;
}

.holder-balance {
    font-size: 14px;
    font-weight: 600;
    color: #1f2937;
}

.holder-percentage {
    font-size: 12px;
    color: #6b7280;
}

.holder-percentage.profit {
    color: #059669;
    font-weight: 600;
    text-align: right;
}

.holder-percentage.loss {
    color: #dc2626;
    font-weight: 600;
}

.holder-percentage.neutral {
    color: #6b7280;
    font-weight: 600;
}

.holder-percentage.error {
    color: #dc2626;
    font-weight: 600;
}

.holder-error {
    font-size: 11px;
    color: #dc2626;
    font-weight: 500;
    margin-top: 2px;
}

/* Moonshot Token Card Styles */
.moonshot-token-card {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 16px;
}

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

.moonshot-token-left {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    flex: 1;
    width: 100%;
}

.moonshot-token-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
}

.moonshot-token-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border: 2px solid #dfff16;
    border-radius: 50%;
}

.moonshot-no-icon {
    width: 48px;
    height: 48px;
    background: #dfff16;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 600;
    color: #1E293B;
}

.moonshot-token-info {
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

.moonshot-token-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    overflow: hidden;
    min-width: 0;
}

.moonshot-token-header h4 {
    font-size: 18px;
    font-weight: 600;
    color: #1E293B;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.moonshot-token-symbol {
    font-size: 12px;
    color: #666;
    background: #e9ecef;
    padding: 2px 8px;
    border-radius: 4px;
}

.moonshot-token-address {
    font-family: 'Monaco', 'Courier New', monospace;
    font-size: 11px;
    color: #666;
    word-break: break-all;
}

.creator-address {
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.2s ease;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
}

.creator-address:hover {
    background: #7da9ff;
    color: white;
    transform: scale(1.02);
    box-shadow: 0 2px 8px rgba(125, 169, 255, 0.3);
}

.creator-info-row {
    margin: 8px 0;
    display: flex;
    align-items: flex-start;
    gap: 8px;
    flex-wrap: wrap;
}

.creator-info-row strong {
    color: #2c3e50;
    min-width: 140px;
    flex-shrink: 0;
}

.moonshot-token-right {
    text-align: right;
    flex-shrink: 0;
}

.moonshot-token-price {
    font-size: 18px;
    font-weight: 700;
    color: #27ae60;
    margin-bottom: 7px;
}

.moonshot-token-created {
    font-size: 12px;
    color: #666;
}

.moonshot-progress-section {
    border-top: 1px solid #e9ecef;
    padding-top: 16px;
}

.moonshot-progress-label {
    font-size: 14px;
    font-weight: 500;
    color: #1E293B;
    margin-bottom: 8px;
}

.moonshot-progress-bar {
    width: 100%;
    height: 8px;
    background: #e9ecef;
    border-radius: 4px;
    overflow: hidden;
}

.moonshot-progress-fill {
    height: 100%;
    background: #dfff16;
    border-radius: 4px;
    transition: width 0.3s ease;
}

/* DexScreener-style Stats and Changes */
.moonshot-stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin: 16px 0 12px 0;
}

.moonshot-stats-grid-2x2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    margin: 16px 0 12px 0;
}

.moonshot-stat-card {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    padding: 10px 8px;
    text-align: center;
}

.moonshot-stat-label {
    font-size: 9px;
    font-weight: 500;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    margin-bottom: 4px;
}

.moonshot-stat-value {
    font-size: 14px;
    font-weight: 600;
    color: #1E293B;
}

.moonshot-changes-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin: 12px 0 16px 0;
}

.moonshot-change-card {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    padding: 10px 8px;
    text-align: center;
}

.moonshot-change-period {
    font-size: 9px;
    font-weight: 500;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    margin-bottom: 4px;
}

.moonshot-change-value {
    font-size: 13px;
    font-weight: 600;
}

/* Positive/Negative change colors */
.moonshot-change-value:not(:contains("N/A")) {
    color: #27ae60; /* Green for positive changes */
}

.moonshot-change-value[data-negative="true"] {
    color: #e74c3c; /* Red for negative changes */
}

.moonshot-change-value:contains("N/A") {
    color: #666;
}

/* Token Description */
.moonshot-description {
    margin: 20px 0;
    padding: 16px;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
}

.moonshot-description h4 {
    font-size: 14px;
    font-weight: 600;
    color: #1E293B;
    margin: 0 0 8px 0;
}

.moonshot-description p {
    font-size: 13px;
    color: #666;
    line-height: 1.4;
    margin: 0;
}

/* Social Links Grid */
.moonshot-links {
    margin: 16px 0 0 0;
}

.moonshot-links h4 {
    font-size: 14px;
    font-weight: 600;
    color: #1E293B;
    margin: 0 0 12px 0;
}

.moonshot-links-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 8px;
}

.moonshot-link-button {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 16px;
    border: none;
    border-radius: 8px;
    background: #7da9ff;
    color: white;
    text-decoration: none;
    font-size: 12px;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(125, 169, 255, 0.3);
}

.moonshot-link-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(125, 169, 255, 0.4);
}

.moonshot-link-button:active {
    transform: translateY(0);
}

/* Relay Pagination Styles */
.relay-pagination {
    margin: 20px 0;
    text-align: center;
    padding: 10px;
    border-top: 1px solid #eee;
    background: #f8f9fa;
    border-radius: 0 0 8px 8px;
}

.pagination-controls {
    display: inline-flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
    justify-content: center;
}

.pagination-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 16px;
    border: none;
    border-radius: 8px;
    background: #7da9ff;
    color: white;
    text-decoration: none;
    font-size: 12px;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(125, 169, 255, 0.3);
    min-width: 40px;
    margin: 0 4px;
}

.pagination-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(125, 169, 255, 0.4);
}

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

.pagination-btn.pagination-current {
    background: #667eea;
    color: white;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.pagination-btn.pagination-current:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.pagination-btn.pagination-disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: #9ca3af;
    color: #f9fafb;
    box-shadow: 0 2px 8px rgba(156, 163, 175, 0.3);
}

.pagination-btn.pagination-disabled:hover {
    transform: none;
    box-shadow: 0 2px 8px rgba(156, 163, 175, 0.3);
}

.pagination-ellipsis {
    padding: 8px 4px;
    color: #999;
    font-weight: 500;
}

/* Related Wallets Analysis Styles */
.analysis-stats {
    display: flex;
    gap: 20px;
    margin-bottom: 16px;
    padding: 12px 16px;
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    border-radius: 8px;
    border: 1px solid #bbf7d0;
}

.analysis-stats span {
    font-size: 14px;
    color: #2c3e50;
    font-weight: 500;
}

.analysis-stats strong {
    color: #27ae60;
    font-weight: 600;
}

/* Wallets List Container */
.wallets-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
}

/* Individual Wallet Item - styled like funding-info */
.wallet-item {
    background: #f8f9fa;
    padding: 16px;
    border-radius: 12px;
    border: 1px solid #e9ecef;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.wallet-address {
    font-size: 14px;
    margin: 0;
    color: #2c3e50;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

/* Wallet Rank Number */
.wallet-rank {
    background: #f0f4f8;
    color: #64748b;
    padding: 4px 8px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    border: 1px solid #e2e8f0;
    display: inline-flex;
    align-items: center;
    min-width: 30px;
    justify-content: center;
}

/* Wallet Analysis Button */
.wallet-analyze-btn {
    background: none;
    border: none;
    padding: 4px 8px;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    font-size: 14px;
}

.wallet-analyze-btn:hover {
    transform: translateY(-1px);
}

/* AGW Wallet Button */
.wallet-analyze-btn.agw {
    color: #28a745;
    background: rgba(40, 167, 69, 0.1);
}

.wallet-analyze-btn.agw:hover {
    background: rgba(40, 167, 69, 0.2);
}

/* Regular Wallet Button */
.wallet-analyze-btn.regular {
    color: #007bff;
    background: rgba(0, 123, 255, 0.1);
}

.wallet-analyze-btn.regular:hover {
    background: rgba(0, 123, 255, 0.2);
}

/* Wallet Address Code */
.wallet-address code {
    background: #e9ecef;
    padding: 4px 8px;
    border-radius: 4px;
    font-family: 'Monaco', 'Courier New', monospace;
    font-size: 12px;
    word-break: break-all;
    color: #7da9ff;
    cursor: pointer;
    transition: all 0.2s ease;
}

.wallet-address code:hover {
    background: #7da9ff;
    color: white;
    transform: scale(1.02);
}

/* Token Info in Wallets */
.wallet-tokens {
    display: flex;
    flex-direction: column;
    gap: 8px;
    color: #5a6c7d;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.4;
    margin-top: 4px;
}

.token-amount {
    color: #2c3e50;
}

.tips-compact {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 15px 0;
}

.tip-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 15px;
    background: #e9ecef;
    border: 1px solid rgba(125, 169, 255, 0.3);
    border-radius: 20px;
    color: #2c3e50;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    outline: none;
}

.tip-btn:hover {
    background: #7da9ff;
    color: white;
    border-color: #7da9ff;
    transform: translateY(-1px);
}

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

.tip-icon {
    font-size: 16px;
}

.tip-text {
    white-space: nowrap;
}

.tips-row {
    margin-bottom: 12px;
}
.tips-row:last-child {
    margin-bottom: 0;
}
.tips-label {
    font-size: 14px;
    color: #7da9ff;
    font-weight: 500;
    margin-bottom: 8px;
    padding-left: 4px;
}

.capabilities-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin: 20px 0;
}

.capability-group {
    background: rgba(125, 169, 255, 0.1);
    padding: 15px;
    border-radius: 8px;
    border: 1px solid rgba(125, 169, 255, 0.2);
}

.capability-group h4 {
    margin: 0 0 12px 0;
    color: #7da9ff;
    font-size: 14px;
    font-weight: 600;
}

.capability-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.capability-item {
    font-size: 13px;
    color: #2c3e50;
    padding: 4px 0;
    border-left: 3px solid transparent;
    padding-left: 8px;
    transition: all 0.2s ease;
}

.capability-item:hover {
    border-left-color: #7da9ff;
    background: rgba(125, 169, 255, 0.05);
    padding-left: 12px;
}


@media (max-width: 768px) {
    .capabilities-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
}

/* Related Wallets Pagination */
.pagination {
    margin: 20px 0;
    text-align: center;
    padding: 16px;
    border-top: 1px solid #e1e8ed;
    background: #f8f9fa;
    border-radius: 0 0 12px 12px;
}

.pagination button {
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    padding: 10px 16px !important;
    border: none !important;
    border-radius: 8px !important;
    background: #7da9ff !important;
    color: white !important;
    text-decoration: none !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    text-align: center !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    justify-content: center !important;
    box-shadow: 0 2px 8px rgba(125, 169, 255, 0.3) !important;
    min-width: 40px !important;
    margin: 0 4px !important;
}

.pagination button:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 15px rgba(125, 169, 255, 0.4) !important;
}

.pagination button:active {
    transform: translateY(0) !important;
}

.pagination strong {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 16px;
    border: none;
    border-radius: 8px;
    background: #667eea !important;
    color: white !important;
    text-decoration: none;
    font-size: 12px;
    font-weight: 600;
    text-align: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
    min-width: 40px;
    margin: 0 4px;
}

/* Mobile Responsiveness for Related Wallets */
@media (max-width: 768px) {
    .analysis-stats {
        flex-direction: column;
        gap: 12px;
        text-align: left;
    }
    
    .wallet-item {
        padding: 12px;
    }
    
    .wallet-address {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
    
    .wallet-address code {
        font-size: 10px;
        word-break: break-all;
    }
    
    .pagination button,
    .pagination-btn {
        padding: 8px 12px !important;
        font-size: 11px !important;
        min-width: 36px !important;
        gap: 4px !important;
    }
}

/* P&L Analysis Section Styles */
.pnl-section {
    background: linear-gradient(135deg, #f8f9ff 0%, #e8f2ff 100%);
    border: 1px solid #e1e8ed;
    border-radius: 12px;
    padding: 20px;
    margin: 20px 0;
}

.pnl-summary {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.pnl-disclaimer {
    background: #fef3c7;
    border: 1px solid #fde68a;
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 16px;
}

.pnl-disclaimer p {
    margin: 0 0 8px 0;
    font-size: 13px;
    color: #92400e;
    line-height: 1.4;
}

.pnl-disclaimer p:last-child {
    margin-bottom: 0;
}

.pnl-overview {
    background: white;
    border-radius: 8px;
    padding: 16px;
    border: 1px solid #e1e8ed;
}

.pnl-overview h4 {
    color: #1e293b;
    margin-bottom: 12px;
    font-size: 16px;
    font-weight: 600;
}

.pnl-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
}

.pnl-stat {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background: #f8f9fa;
    border-radius: 6px;
    border: 1px solid #e1e8ed;
}

.pnl-stat .label {
    font-weight: 500;
    color: #64748b;
    font-size: 14px;
}

.pnl-stat .value {
    font-weight: 600;
    color: #1e293b;
    font-size: 14px;
}

.risk-assessment {
    background: white;
    border-radius: 8px;
    padding: 16px;
    border: 1px solid #e1e8ed;
}

.risk-assessment h4 {
    margin-bottom: 12px;
    font-size: 16px;
    font-weight: 600;
    padding: 8px 12px;
    border-radius: 6px;
}

.risk-assessment h4.low-risk {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.risk-assessment h4.medium-risk {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fde68a;
}

.risk-assessment h4.high-risk {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.risk-score {
    font-size: 14px;
    color: #64748b;
    margin-bottom: 8px;
}

.risk-recommendation {
    font-size: 14px;
    color: #1e293b;
    font-weight: 500;
    line-height: 1.5;
}

.risk-distribution {
    margin-top: 16px;
}

.risk-distribution h5 {
    font-size: 14px;
    color: #64748b;
    margin-bottom: 12px;
    font-weight: 500;
}

.distribution-bars {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.dist-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
}

.dist-bar.high-profit {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.dist-bar.moderate-profit {
    background: #dbeafe;
    color: #1e40af;
    border: 1px solid #bfdbfe;
}

.dist-bar.low-profit {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fde68a;
}

.dist-bar.loss {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.dist-bar .count {
    font-weight: 600;
    background: white;
    padding: 2px 8px;
    border-radius: 4px;
    min-width: 24px;
    text-align: center;
}

.pnl-holders-details {
    background: white;
    border-radius: 8px;
    padding: 16px;
    border: 1px solid #e1e8ed;
}

.pnl-holders-details h4 {
    color: #1e293b;
    margin-bottom: 16px;
    font-size: 16px;
    font-weight: 600;
}

.pnl-holders-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.pnl-holder-card {
    background: #f8f9fa;
    border: 1px solid #e1e8ed;
    border-radius: 8px;
    padding: 16px;
    transition: all 0.2s ease;
}

.pnl-holder-card.error-card {
    border-color: #fca5a5;
    background: #fef2f2;
}

.pnl-holder-card.error-card .pnl-holder-header {
    border-bottom-color: #fca5a5;
}

.pnl-holder-error {
    margin-bottom: 12px;
    padding: 8px 12px;
    background: #fee2e2;
    border: 1px solid #fca5a5;
    border-radius: 6px;
}

.error-message {
    color: #991b1b;
    font-weight: 600;
    font-size: 13px;
    margin-bottom: 4px;
}

.error-note {
    color: #7f1d1d;
    font-size: 12px;
    font-style: italic;
}

.pnl-holder-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid #e1e8ed;
}

.pnl-holder-rank {
    background: #7da9ff;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
}

.pnl-holder-address {
    font-family: 'Monaco', 'Menlo', monospace;
    font-size: 12px;
    color: #64748b;
    background: #f1f5f9;
    padding: 4px 8px;
    border-radius: 4px;
}

.pnl-holder-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 8px;
}

.pnl-stat-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 8px;
    background: white;
    border-radius: 4px;
    border: 1px solid #e1e8ed;
    font-size: 13px;
}

.pnl-stat-row .label {
    font-weight: 500;
    color: #64748b;
}

.pnl-stat-row .value {
    font-weight: 600;
    color: #1e293b;
}

.pnl-stat-row .note {
    font-size: 11px;
    color: #64748b;
    font-style: italic;
    margin-left: 8px;
}

.pnl-stat-row.profit .value {
    color: #059669;
}

.pnl-stat-row.loss .value {
    color: #dc2626;
}

.pnl-stat-row.neutral .value {
    color: #6b7280;
}

.pnl-note {
    background: rgba(33, 150, 243, 0.1);
    border: 1px solid rgba(33, 150, 243, 0.3);
    border-radius: 6px;
    padding: 8px 12px;
    margin: 8px 0;
    font-size: 13px;
    color: #2196f3;
    font-style: italic;
}

.transactions-details {
    margin: 12px 0;
    padding: 12px;
    background: #f8fafc;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.transactions-details h4 {
    margin: 0 0 8px 0;
    font-size: 14px;
    font-weight: 600;
    color: #475569;
}

.transactions-details h4:contains("📤 Продажи") {
    color: #dc2626;
}

.transactions-details h4:contains("📥 Покупки") {
    color: #059669;
}

.tx-detail {
    padding: 4px 0;
    font-size: 13px;
    color: #64748b;
    border-bottom: 1px solid #e2e8f0;
}

.tx-detail:last-child {
    border-bottom: none;
}

.tx-detail.note {
    font-style: italic;
    color: #94a3b8;
    background: #f1f5f9;
    padding: 6px 8px;
    border-radius: 4px;
    margin-top: 8px;
    text-align: center;
}

/* Mobile Responsiveness for P&L Section */
@media (max-width: 768px) {
    .pnl-stats {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    
    .pnl-holder-stats {
        grid-template-columns: 1fr;
        gap: 6px;
    }
    
    .pnl-holder-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .distribution-bars {
        gap: 6px;
    }
    
    .dist-bar {
        font-size: 12px;
        padding: 6px 10px;
    }
}

/* Новые стили для PNL метрик-карточек */
.holder-card-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
    border-bottom: 1px solid #e2e8f0;
    padding-bottom: 10px;
    margin-bottom: 10px;
}

.holder-card-container:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.pnl-metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 12px;
    margin-bottom: 10px;
}

.metric-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background: #f8f9fa;
    border-radius: 6px;
    border: 1px solid #e1e8ed;
}

.metric-label {
    font-size: 12px;
    font-weight: 500;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.metric-value {
    font-size: 14px;
    font-weight: 600;
    color: #1e293b;
}

.metric-value.profit {
    color: #059669;
}

.metric-value.loss {
    color: #dc2626;
}

.metric-value.neutral {
    color: #6b7280;
}

.metric-note {
    font-size: 11px;
    color: #94a3b8;
    font-style: italic;
}

/* Стили для аккордеона транзакций */

.accordion-header {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px 8px 0 0;
    padding: 12px 16px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.2s ease;
    user-select: none;
}

.accordion-header:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
}

.accordion-title {
    font-weight: 600;
    color: #475569;
    font-size: 14px;
}

.accordion-icon {
    font-size: 12px;
    color: #64748b;
    transition: transform 0.2s ease;
}

/* Стили для контейнера транзакций */
.transactions-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 0;
    border: 1px solid #e2e8f0;
    border-top: none;
    border-radius: 0 0 8px 8px;
    padding: 16px;
    background: white;
    overflow: hidden;
    transition: padding 0.3s ease, border 0.3s ease, max-height 0.3s ease;
}

.transactions-container.accordion-content.collapsed {
    max-height: 0;
    padding: 0 16px;
    border: none;
}

.transactions-section {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 16px;
}

.transactions-section h4 {
    margin: 0 0 16px 0;
    font-size: 16px;
    font-weight: 600;
    color: #475569;
    display: flex;
    align-items: center;
    gap: 8px;
}

.transactions-section.purchases h4 {
    color: #059669;
}

.transactions-section.sales h4 {
    color: #dc2626;
}

.transactions-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.transaction-item {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    transition: all 0.2s ease;
    position: relative;
}

/* Hover effect now handled by .transaction-link:hover */

.transaction-item.purchase {
    border-left: 4px solid #059669;
}

.transaction-item.sale {
    border-left: 4px solid #dc2626;
}

.transaction-item.note {
    text-align: center;
    font-style: italic;
    color: #94a3b8;
    background: #f1f5f9;
    border-color: #cbd5e1;
}

.transaction-link {
    text-decoration: none;
    color: inherit;
    display: block;
    cursor: pointer;
}

.transaction-link:hover {
    text-decoration: none;
}

.transaction-link:hover .transaction-item {
    border-color: #7da9ff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
}

.tx-main {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.tx-secondary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: #64748b;
}

.tx-amount {
    font-weight: 600;
    color: #1e293b;
    font-size: 14px;
}

.tx-eth {
    color: #64748b;
    font-size: 13px;
    font-weight: 500;
}

.tx-date {
    color: #64748b;
    font-size: 12px;
}

.tx-token-price {
    color: #059669;
    font-size: 13px;
    font-weight: 500;
}

.tx-details {
    color: #64748b;
    font-size: 13px;
    text-align: right;
    max-width: 60%;
}

/* Адаптивность для мобильных устройств */
@media (max-width: 768px) {
    .pnl-metrics-grid {
        gap: 8px;
    }
    
    .metric-card {
        padding: 12px;
    }
    
    .metric-value {
        font-size: 16px;
    }
    
    .transactions-container {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .accordion-header {
        padding: 10px 12px;
    }
    
    .accordion-title {
        font-size: 13px;
    }
    
    .holder-card-container {
        padding-bottom: 16px;
        margin-bottom: 16px;
    }
    
    .transaction-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .tx-main, .tx-secondary {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
    
    .tx-details {
        text-align: left;
        max-width: 100%;
    }
}
