/* Reset and base styles */

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

:root {
    --primary-blue: #1a365d;
    --secondary-blue: #2b77e6;
    --accent-blue: #3b82f6;
    --dark-blue: #0f1419;
    --darker-blue: #0a0e14;
    --gold: #fbbf24;
    --gold-dark: #d97706;
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --bg-primary: var(--dark-blue);
    --bg-secondary: var(--primary-blue);
    --bg-card: #1e293b;
    --bg-card-hover: #253447;
    --border: #334155;
    --border-light: #475569;
    --shadow: rgba(0, 0, 0, 0.4);
    --shadow-lg: rgba(0, 0, 0, 0.6);
    --success: #10b981;
    --error: #ef4444;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--bg-primary);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
    box-sizing: border-box;
}


/* Header */

.header {
    background: var(--bg-secondary);
    color: var(--text-primary);
    padding: 1rem 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    border-bottom: 2px solid var(--border-light);
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(10px);
}

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

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--gold) 0%, #fbbf24 50%, #f59e0b 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.5px;
    text-shadow: 0 0 30px rgba(251, 191, 36, 0.3);
}

.logo a {
    text-decoration: none;
    color: inherit;
    display: inline-block;
    transition: opacity 0.2s ease, filter 0.2s ease;
}

.logo a:hover {
    opacity: 0.9;
    filter: brightness(1.1);
}

.nav {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.nav .btn {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--bg-card);
    border: 1.5px solid var(--border-light);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 0.9rem;
    margin-left: 0.5rem;
}

.user-icon {
    font-size: 1.1rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
}

.user-email {
    color: var(--text-primary);
    font-weight: 500;
}

.btn {
    display: inline-block;
    padding: 0.625rem 1.5rem;
    border: none;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.9rem;
    letter-spacing: 0.3px;
    text-transform: none;
    white-space: nowrap;
}

.btn-secondary {
    background: var(--bg-card);
    color: var(--text-primary);
    border: 1.5px solid var(--border-light);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.btn-secondary:hover {
    background: var(--bg-card-hover);
    border-color: var(--accent-blue);
    color: var(--accent-blue);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.25);
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-blue) 0%, var(--secondary-blue) 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.4);
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--secondary-blue) 0%, #2563eb 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.5);
    border-color: rgba(59, 130, 246, 0.5);
}

.btn-gold {
    background: linear-gradient(135deg, var(--gold) 0%, var(--gold-dark) 100%);
    color: var(--dark-blue);
    box-shadow: 0 4px 15px rgba(251, 191, 36, 0.3);
    font-weight: 700;
}

.btn-gold:hover {
    background: linear-gradient(135deg, var(--gold-dark) 0%, #b45309 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(251, 191, 36, 0.4);
}


/* Main content */

.main {
    flex: 1;
    padding: 0;
}


/* Hero section */

.hero {
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--darker-blue) 100%);
    color: var(--text-primary);
    padding: 2.5rem 0 2rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 30% 40%, rgba(59, 130, 246, 0.08) 0%, transparent 50%), radial-gradient(circle at 70% 80%, rgba(251, 191, 36, 0.08) 0%, transparent 50%);
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero h2 {
    font-size: 2rem;
    margin-bottom: 0.75rem;
    font-weight: 800;
    text-shadow: 0 2px 10px var(--shadow);
    line-height: 1.2;
}

.hero p {
    font-size: 1rem;
    margin-bottom: 1.5rem;
    opacity: 0.9;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    color: var(--text-secondary);
}

.hero-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
    margin-top: 1.5rem;
    max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
}

.feature {
    background: rgba(30, 41, 59, 0.6);
    padding: 1.25rem;
    border-radius: 12px;
    backdrop-filter: blur(10px);
    border: 1px solid var(--border);
    box-shadow: 0 4px 16px var(--shadow);
    transition: all 0.3s ease;
}

.feature:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.2);
    border-color: var(--accent-blue);
    background: rgba(30, 41, 59, 0.8);
}

.feature h3 {
    margin-bottom: 0.5rem;
    font-size: 1rem;
    color: var(--gold);
    font-weight: 700;
}

.feature p {
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin: 0;
    line-height: 1.4;
}


/* Dashboard preview */

.dashboard-preview {
    padding: 3rem 0;
    background: var(--bg-card);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.dashboard-preview h2 {
    text-align: center;
    margin-bottom: 2.5rem;
    font-size: 2rem;
    color: var(--text-primary);
    font-weight: 800;
    letter-spacing: -0.5px;
}

.tx-feed {
    padding: 3rem 0;
    background: var(--bg-primary);
}

.tx-feed-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

@media (min-width: 1024px) {
    .tx-feed-layout {
        grid-template-columns: 280px 1fr;
    }
}

.tx-feed-sidebar {
    order: 2;
}

@media (min-width: 1024px) {
    .tx-feed-sidebar {
        order: 1;
    }
}

.wallet-list-card {
    background: rgba(15, 23, 42, 0.5);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.5rem;
    position: sticky;
    top: 100px;
}

.wallet-list-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.wallet-icon {
    font-size: 1.1rem;
}

.wallet-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.wallet-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.wallet-item:hover {
    background: rgba(148, 163, 184, 0.1);
}

.wallet-item .wallet-address {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: 'Monaco', 'Menlo', monospace;
    font-size: 0.85rem;
    color: var(--text-secondary);
    transition: color 0.2s ease;
}

.wallet-item:hover .wallet-address {
    color: var(--text-primary);
}

.wallet-item .wallet-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--success);
    animation: pulse 2s infinite;
}

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

.tx-feed-content {
    order: 1;
}

@media (min-width: 1024px) {
    .tx-feed-content {
        order: 2;
    }
}

.tx-feed-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    gap: 1rem;
    flex-wrap: wrap;
}

.tx-feed-header h2 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.tx-feed-header .title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--text-primary);
    font-weight: 800;
    letter-spacing: -0.3px;
}

.tx-feed-icon {
    font-size: 1.25rem;
    color: var(--accent-blue);
}

.tx-feed-stats {
    display: flex;
    gap: 1.5rem;
    align-items: center;
    flex-wrap: wrap;
}

.tx-feed-stats .stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.tx-feed-stats .stat-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.25rem;
}

.tx-feed-stats .stat-item.alert .stat-label {
    color: var(--success);
    font-weight: 700;
}

.tx-feed-stats .stat-value {
    font-family: 'Monaco', 'Menlo', monospace;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
}

.tx-feed-stats .stat-item.alert .stat-value {
    color: var(--success);
}

.tx-feed-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.tx-card {
    background: rgba(15, 23, 42, 0.5);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1rem;
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
    margin-bottom: 0.75rem;
    opacity: 0;
    transform: translateY(-20px) scale(0.98);
}

@keyframes slideInFromTop {
    0% {
        opacity: 0;
        transform: translateY(-30px) scale(0.95);
        filter: blur(4px);
    }
    50% {
        opacity: 0.8;
        transform: translateY(5px) scale(1.02);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
        filter: blur(0);
    }
}

@keyframes slideIn {
    0% {
        opacity: 0;
        transform: translateY(-20px) scale(0.98);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.tx-card:hover {
    border-color: var(--border-light);
    transform: translateY(-4px) scale(1.01);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.tx-card.alert {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.15) 0%, rgba(34, 197, 94, 0.05) 100%);
    border-color: rgba(34, 197, 94, 0.5);
    box-shadow: 0 0 20px rgba(34, 197, 94, 0.3);
    animation: slideInFromTop 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) forwards, pulseGlow 3s ease-in-out infinite;
    position: relative;
}

.tx-card.alert::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(34, 197, 94, 0.2), transparent);
    animation: shimmer 3s infinite;
}

@keyframes shimmer {
    0% {
        left: -100%;
    }
    100% {
        left: 100%;
    }
}

@keyframes pulseGlow {
    0%,
    100% {
        box-shadow: 0 0 20px rgba(34, 197, 94, 0.2), 0 0 40px rgba(34, 197, 94, 0.1);
        border-color: rgba(34, 197, 94, 0.4);
    }
    50% {
        box-shadow: 0 0 30px rgba(34, 197, 94, 0.4), 0 0 60px rgba(34, 197, 94, 0.2);
        border-color: rgba(34, 197, 94, 0.7);
    }
}

@keyframes pulseSubtle {
    0%,
    100% {
        box-shadow: 0 0 15px rgba(34, 197, 94, 0.1);
        border-color: rgba(34, 197, 94, 0.3);
    }
    50% {
        box-shadow: 0 0 25px rgba(34, 197, 94, 0.25);
        border-color: rgba(34, 197, 94, 0.6);
    }
}

@keyframes statusFlash {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.8;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.monitor-rpc-status {
    transition: all 0.3s ease;
}

.monitor-rpc-status[data-status="connected"] .rpc-status-dot {
    background: #10b981;
    box-shadow: 0 0 8px rgba(16, 185, 129, 0.5);
    animation: pulseGreen 2s ease-in-out infinite;
}

.monitor-rpc-status[data-status="connecting"] .rpc-status-dot {
    background: #f59e0b;
    box-shadow: 0 0 8px rgba(245, 158, 11, 0.5);
    animation: pulseYellow 1.5s ease-in-out infinite;
}

.monitor-rpc-status[data-status="disconnected"] .rpc-status-dot {
    background: #ef4444;
    box-shadow: 0 0 8px rgba(239, 68, 68, 0.5);
}

@keyframes pulseGreen {
    0%,
    100% {
        box-shadow: 0 0 8px rgba(16, 185, 129, 0.5);
        transform: scale(1);
    }
    50% {
        box-shadow: 0 0 16px rgba(16, 185, 129, 0.8);
        transform: scale(1.1);
    }
}

@keyframes pulseYellow {
    0%,
    100% {
        box-shadow: 0 0 8px rgba(245, 158, 11, 0.5);
        transform: scale(1);
    }
    50% {
        box-shadow: 0 0 16px rgba(245, 158, 11, 0.8);
        transform: scale(1.1);
    }
}


/* Transfer Methods Section */

.monitored-methods {
    padding: 3rem 0;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.transfer-methods-grid {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.transfer-methods-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1rem;
}

.transfer-method-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1.25rem;
    transition: all 0.3s ease;
}

.transfer-method-card:hover {
    border-color: var(--accent-blue);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15);
    transform: translateY(-2px);
}

.method-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border);
}

.method-id {
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    color: var(--accent-blue);
    font-weight: 600;
    background: rgba(59, 130, 246, 0.1);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
}

.method-badge {
    font-size: 0.75rem;
    color: var(--text-secondary);
    background: var(--bg-secondary);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
}

.method-signature {
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.method-signature strong {
    color: var(--text-primary);
    margin-right: 0.5rem;
}

.method-signature code {
    font-family: 'Courier New', monospace;
    color: var(--gold);
    background: rgba(251, 191, 36, 0.1);
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-size: 0.85rem;
}

.method-description {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.6;
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.transfer-event-info {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1.5rem;
    margin-top: 1rem;
}

.transfer-event-info h4 {
    color: var(--text-primary);
    margin-bottom: 0.75rem;
    font-size: 1.1rem;
}

.event-signature {
    display: block;
    font-family: 'Courier New', monospace;
    font-size: 0.85rem;
    color: var(--accent-blue);
    background: rgba(59, 130, 246, 0.1);
    padding: 0.75rem;
    border-radius: 6px;
    word-break: break-all;
    margin-bottom: 0.75rem;
    line-height: 1.6;
}

.event-note {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.6;
    margin: 0;
    font-style: italic;
}


/* Transactions Page Styles */

.transactions-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
    gap: 1rem;
}

.transaction-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1.25rem;
    transition: all 0.3s ease;
}

.transaction-card:hover {
    border-color: var(--accent-blue);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15);
    transform: translateY(-2px);
}

.transaction-card.transaction-our-wallet {
    border-left: 3px solid #ef4444;
    background: rgba(239, 68, 68, 0.05);
}

.transaction-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border);
    flex-wrap: wrap;
    gap: 0.5rem;
}

.transaction-hash {
    flex: 1;
    min-width: 200px;
}

.transaction-badges {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.transaction-details {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.transaction-detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
}

.detail-label {
    color: var(--text-secondary);
    font-weight: 500;
}

.detail-value {
    color: var(--text-primary);
    word-break: break-all;
    text-align: right;
    max-width: 60%;
}

.badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
}

.badge-alert {
    background: #ef4444;
    color: white;
}

.tx-card .alert-banner {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    padding: 0.5rem 1rem;
    background: rgba(34, 197, 94, 0.1);
    color: #34d399;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid rgba(34, 197, 94, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.tx-main {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-top: 0.35rem;
}

.tx-left {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 0;
}

.tx-chain-icon {
    width: 20px;
    height: 20px;
    border-radius: 4px;
    object-fit: cover;
    flex-shrink: 0;
}

.tx-chain-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.tx-chain {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
}

.tx-hash {
    font-family: 'Monaco', 'Menlo', monospace;
    font-size: 0.75rem;
    color: var(--text-secondary);
    max-width: 120px;
    text-overflow: ellipsis;
    overflow: hidden;
    white-space: nowrap;
}

.tx-flow {
    display: none;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.85rem;
}

.tx-flow .flow-item {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    min-width: 0;
}

.tx-flow .flow-label {
    font-size: 0.7rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.25rem;
}

.tx-flow .flow-address {
    font-family: 'Monaco', 'Menlo', monospace;
    font-size: 0.8rem;
    color: var(--text-primary);
    max-width: 140px;
    text-overflow: ellipsis;
    overflow: hidden;
    white-space: nowrap;
}

.tx-flow .flow-address.monitored {
    color: var(--success);
    font-weight: 700;
}

.tx-flow .flow-arrow {
    color: var(--text-secondary);
    font-size: 1rem;
}

.tx-amount {
    text-align: right;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.tx-amount .value {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1.2;
}

.tx-amount .unit {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: 0.25rem;
}

.tx-meta {
    margin-top: 0.75rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.75rem;
    color: var(--text-secondary);
    border-top: 1px solid var(--border);
    padding-top: 0.75rem;
}

.tx-meta .time {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.tx-meta a {
    color: var(--text-secondary);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    transition: color 0.2s ease;
}

.tx-meta a:hover {
    color: var(--accent-blue);
}

@media (min-width: 768px) {
    .tx-hash {
        max-width: 180px;
    }
    .tx-flow {
        display: flex;
    }
}

.monitor-group {
    margin-bottom: 3rem;
}

.monitor-group:last-child {
    margin-bottom: 0;
}

.group-title {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--border);
    padding-bottom: 0.5rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.dashboard-mockup {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1.5rem;
}

.monitor-card {
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 1.5rem;
    text-align: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    position: relative;
    overflow: hidden;
}

.monitor-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-blue), var(--accent-blue));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.monitor-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.3), 0 8px 10px -6px rgba(0, 0, 0, 0.2);
    border-color: var(--border-light);
    background: rgba(30, 41, 59, 0.8);
}

.monitor-card:hover::before {
    opacity: 1;
}

.monitor-icon {
    font-size: 2rem;
    margin-bottom: 1rem;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.monitor-icon-img {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    margin-bottom: 1rem;
    object-fit: cover;
    background: var(--bg-primary);
    border: 2px solid var(--border);
    padding: 4px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.monitor-card h3 {
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    font-size: 1.1rem;
    font-weight: 700;
}

.monitor-stats {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.monitor-count {
    color: var(--text-primary);
    font-size: 0.9rem;
    font-weight: 700;
}

.monitor-block {
    color: var(--text-muted);
    font-size: 0.8rem;
    font-family: 'Monaco', 'Menlo', monospace;
}

.status-indicator {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-indicator::before {
    content: '';
    display: block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    margin-right: 6px;
}

.status-active {
    background-color: rgba(16, 185, 129, 0.1);
    color: var(--success);
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.status-active::before {
    background-color: var(--success);
    box-shadow: 0 0 8px var(--success);
}

.status-inactive {
    background-color: rgba(239, 68, 68, 0.1);
    color: var(--error);
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.status-inactive::before {
    background-color: var(--error);
}


/* Footer */

.footer {
    background: var(--bg-card);
    color: var(--text-secondary);
    padding: 1rem 0;
    margin-top: auto;
    border-top: 1px solid var(--border);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer p {
    margin: 0;
    font-size: 0.85rem;
}

.footer-user-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.75rem;
    color: var(--text-secondary);
    flex-wrap: wrap;
}

.footer-session-timer {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.footer-user-email {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.footer-user-email .user-icon {
    font-size: 0.9rem;
}

.footer-logout-btn {
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 4px;
    color: #ef4444;
    cursor: pointer;
    transition: all 0.2s ease;
}

.footer-logout-btn:hover {
    background: rgba(239, 68, 68, 0.2);
    border-color: rgba(239, 68, 68, 0.5);
}

@media (max-width: 768px) {
    .footer-content {
        flex-direction: column;
        text-align: center;
    }
    .footer-user-info {
        justify-content: center;
    }
}


/* Responsive design */

@media (max-width: 768px) {
    .hero h2 {
        font-size: 2rem;
    }
    .hero p {
        font-size: 1rem;
    }
    .hero-features {
        grid-template-columns: 1fr;
    }
    .dashboard-mockup {
        grid-template-columns: 1fr;
    }
    .header-content {
        flex-direction: column;
        gap: 1rem;
    }
    .nav {
        width: 100%;
        text-align: center;
        justify-content: center;
        flex-wrap: wrap;
    }
    .btn {
        font-size: 0.85rem;
        padding: 0.5rem 1rem;
    }
    .container {
        padding: 0 16px;
    }
}


/* Monitor Cards Styles */

.monitors-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1rem;
    margin-top: 1.5rem;
}

.monitor-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 1rem;
    position: relative;
    transition: all 0.2s ease;
    min-height: 140px;
    padding-top: 3rem;
    /* Further increased top padding to accommodate error section and prevent overlap */
    overflow: visible;
    /* Ensure content doesn't get clipped */
}

.monitor-card:hover {
    border-color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

.monitor-card.monitor-healthy {
    border-left: 3px solid #10b981;
}

.monitor-card.monitor-unhealthy {
    border-left: 3px solid #ef4444;
}

.monitor-error-dot {
    width: 10px;
    height: 10px;
    background: #ef4444;
    border-radius: 50%;
    flex-shrink: 0;
    cursor: help;
    animation: pulse-error 2s infinite;
    order: 1;
    /* Ensure error dot comes before button */
}

@keyframes pulse-error {
    0%,
    100% {
        opacity: 1;
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7);
    }
    50% {
        opacity: 0.8;
        box-shadow: 0 0 0 4px rgba(239, 68, 68, 0);
    }
}

.monitor-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    /* Changed back to center for proper alignment */
    margin-bottom: 0.75rem;
    gap: 0.5rem;
    padding-right: 6.5rem;
    /* Further increased padding to prevent overlap with error section/modal button */
    min-height: 40px;
    /* Increased height to accommodate status indicators */
    margin-top: 0;
    /* Reset margin since we're using card padding-top */
}

.monitor-status-indicators {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
    /* Prevent shrinking */
    flex-wrap: nowrap;
    /* Prevent wrapping - keep all indicators on one line */
    justify-content: flex-end;
    /* Align indicators to the right */
    min-width: 0;
    /* Allow shrinking if needed */
}

.monitor-icons {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex: 1;
}

.monitor-blockchain-icon {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    object-fit: contain;
    flex-shrink: 0;
    cursor: help;
    transition: transform 0.1s ease, opacity 0.1s ease;
    position: relative;
}

.monitor-blockchain-icon:hover {
    transform: scale(1.1);
    opacity: 0.9;
}

.monitor-currency-icon {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    object-fit: contain;
    flex-shrink: 0;
    cursor: help;
    transition: transform 0.1s ease, opacity 0.1s ease;
    position: relative;
}

.monitor-currency-icon:hover {
    transform: scale(1.1);
    opacity: 0.9;
}


/* Fast tooltip styles */

.fast-tooltip {
    position: fixed;
    background: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 0.4rem 0.75rem;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 500;
    line-height: 1.25;
    pointer-events: none;
    z-index: 10000;
    white-space: normal;
    max-width: 360px;
    word-break: break-word;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    animation: tooltipFadeIn 0.1s ease-out;
}

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

.monitor-health-badge {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    font-weight: 700;
    flex-shrink: 0;
    /* Prevent shrinking */
    cursor: help;
}

.monitor-health-badge.health-healthy {
    background: #10b981;
    color: white;
}

.monitor-health-badge.health-unhealthy {
    background: #ef4444;
    color: white;
}

.monitor-rpc-status {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    background: rgba(0, 0, 0, 0.2);
    font-size: 0.7rem;
    /* Slightly smaller font */
    font-weight: 500;
    cursor: help;
    flex-shrink: 1;
    /* Allow slight shrinking if needed */
    white-space: nowrap;
    /* Prevent text wrapping */
    max-width: 130px;
    /* Limit max width to prevent overflow */
    min-width: fit-content;
    /* Ensure it fits its content */
}

.monitor-rpc-status[data-status="connected"] {
    color: #10b981;
}

.monitor-rpc-status[data-status="connected"] .rpc-status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #10b981;
    box-shadow: 0 0 8px rgba(16, 185, 129, 0.5);
    animation: pulseGreen 2s ease-in-out infinite;
}

.monitor-rpc-status[data-status="connecting"] {
    color: #f59e0b;
}

.monitor-rpc-status[data-status="connecting"] .rpc-status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #f59e0b;
    box-shadow: 0 0 8px rgba(245, 158, 11, 0.5);
    animation: pulseYellow 1.5s ease-in-out infinite;
}

.monitor-rpc-status[data-status="disconnected"] {
    color: #ef4444;
}

.monitor-rpc-status[data-status="disconnected"] .rpc-status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #ef4444;
    box-shadow: 0 0 8px rgba(239, 68, 68, 0.5);
}

.rpc-status-text {
    font-size: 0.65rem;
    /* Slightly smaller to fit better */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 80px;
    /* Limit text width */
}

@keyframes pulse-connected {
    0%,
    100% {
        opacity: 1;
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
    }
    50% {
        opacity: 0.8;
        box-shadow: 0 0 0 3px rgba(16, 185, 129, 0);
    }
}

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

.status-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-badge.status-active {
    background: rgba(16, 185, 129, 0.2);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.4);
}

.status-badge.status-suspended {
    background: rgba(251, 191, 36, 0.2);
    color: #fbbf24;
    border: 1px solid rgba(251, 191, 36, 0.4);
}

.status-badge.status-deleted {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.4);
}

.status-badge.status-unknown {
    background: rgba(148, 163, 184, 0.2);
    color: #94a3b8;
    border: 1px solid rgba(148, 163, 184, 0.4);
}

.status-active {
    color: #10b981;
    font-weight: 600;
}

.status-inactive {
    color: #ef4444;
    font-weight: 600;
}

.monitor-details {
    border-top: 1px solid var(--border-color);
    padding-top: 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 0.75rem;
    /* Increased margin to push down from header */
    clear: both;
    /* Ensure it clears any floating elements */
}

.monitor-detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
}

.monitor-detail-label {
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.8rem;
}

.monitor-detail-value {
    color: var(--text-primary);
    font-weight: 400;
    text-align: right;
    word-break: break-word;
    font-size: 0.85rem;
}

.monitor-rpc-url {
    font-family: 'Courier New', monospace;
    font-size: 0.75rem;
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.monitor-error-section {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    /* Align content to the right */
    gap: 1rem;
    z-index: 10;
    min-width: 120px;
    /* Further increased width to ensure enough space for error dot and button */
    padding: 0.25rem 0.5rem;
    /* Consistent padding */
    height: 32px;
    /* Fixed height to prevent overlap */
    background: rgba(15, 23, 42, 0.9);
    /* Stronger background to prevent content showing through */
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    /* Add shadow for better separation */
}

.monitor-details-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 4px;
    padding: 0.25rem 0.5rem;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
    /* Prevent button from shrinking */
    min-width: 36px;
    /* Increased minimum width */
    height: 28px;
    /* Fixed height to prevent overlap */
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: auto;
    /* Push button to the right */
    order: 2;
    /* Ensure button is last in flex order */
}

.monitor-details-btn:hover {
    background: var(--accent-blue);
    transform: scale(1.05);
}


/* Monitor Details Modal */

.monitor-details-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    animation: fadeIn 0.2s ease;
}

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

.monitor-details-modal-content {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    animation: slideUp 0.3s ease;
}

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

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

.monitor-details-header h3 {
    margin: 0;
    font-size: 1.25rem;
    color: var(--text-primary);
}

.monitor-details-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s ease;
}

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

.monitor-details-body {
    padding: 1.5rem;
}

.monitor-detail-section {
    margin-bottom: 2rem;
}

.monitor-detail-section:last-child {
    margin-bottom: 0;
}

.monitor-detail-section h4 {
    margin: 0 0 1rem 0;
    font-size: 1rem;
    color: var(--text-primary);
    font-weight: 600;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.5rem;
}

.monitor-detail-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.75rem;
    gap: 1rem;
}

.monitor-detail-item:last-child {
    margin-bottom: 0;
}

.detail-label {
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.9rem;
    min-width: 120px;
}

.detail-value {
    color: var(--text-primary);
    font-size: 0.9rem;
    text-align: right;
    flex: 1;
    word-break: break-word;
}

.detail-value.error-message {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 6px;
    padding: 0.75rem;
    font-family: 'Courier New', monospace;
    font-size: 0.85rem;
    text-align: left;
    color: #ef4444;
}

.error-type-rpc_connection_failed,
.error-type-websocket_failed {
    color: #ef4444;
    font-weight: 600;
}

.monitor-detail-suggestion {
    background: rgba(251, 191, 36, 0.1);
    border: 1px solid rgba(251, 191, 36, 0.3);
    border-radius: 6px;
    padding: 1rem;
    margin-top: 1rem;
    color: var(--text-primary);
    font-size: 0.9rem;
    line-height: 1.5;
}

.monitor-detail-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.monitor-detail-actions .btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.monitor-detail-actions .btn-primary {
    background: var(--primary-color);
    color: white;
}

.monitor-detail-actions .btn-primary:hover:not(:disabled) {
    background: var(--accent-blue);
    transform: translateY(-1px);
}

.monitor-detail-actions .btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}


/* Toast Notifications */

.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    z-index: 10001;
    max-width: 500px;
    word-wrap: break-word;
    animation: slideInRight 0.3s ease;
    font-size: 0.9rem;
    line-height: 1.5;
}

.notification div {
    margin-bottom: 0.25rem;
}

.notification div:last-child {
    margin-bottom: 0;
}

.notification-info {
    background: #3b82f6;
    color: white;
    border-left: 4px solid #2563eb;
}

.notification-success {
    background: #10b981;
    color: white;
    border-left: 4px solid #059669;
}

.notification-error {
    background: #ef4444;
    color: white;
    border-left: 4px solid #dc2626;
}

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

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

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

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}
