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

:root {
    --primary: #6366f1;
    --secondary: #8b5cf6;
    --accent: #ec4899;
    --cyan: #06b6d4;
    --dark-bg: #020617;
    --dark-surface: #0f172a;
    --dark-card: #1e293b;
}

/* Connection Status */
.connection-status {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    margin-left: 20px;
}

.connection-status .status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

.connection-status.connected {
    background: rgba(16, 185, 129, 0.2);
    color: #10b981;
}

.connection-status.connected .status-dot {
    background: #10b981;
    box-shadow: 0 0 10px #10b981;
}

.connection-status.connecting {
    background: rgba(245, 158, 11, 0.2);
    color: #f59e0b;
}

.connection-status.connecting .status-dot {
    background: #f59e0b;
}

.connection-status.disconnected {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

.connection-status.disconnected .status-dot {
    background: #ef4444;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: var(--dark-bg);
    min-height: 100vh;
    color: #e2e8f0;
    position: relative;
    overflow-x: hidden;
}

/* Animated Background */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, #020617 0%, #0f172a 50%, #1e293b 100%);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
    z-index: -3;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Particle Grid */
body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(rgba(99, 102, 241, 0.1) 1px, transparent 1px),
        linear-gradient(90deg, rgba(99, 102, 241, 0.1) 1px, transparent 1px);
    background-size: 50px 50px;
    animation: gridMove 20s linear infinite;
    z-index: -2;
}

@keyframes gridMove {
    0% { transform: translate(0, 0); }
    100% { transform: translate(50px, 50px); }
}

/* Floating Orbs */
.orb {
    position: fixed;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.3;
    z-index: -1;
    animation: float 20s ease-in-out infinite;
}

.orb-1 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, var(--primary), var(--secondary));
    top: -200px;
    left: -200px;
}

.orb-2 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, var(--accent), var(--primary));
    top: 50%;
    right: -150px;
    animation-delay: -5s;
}

.orb-3 {
    width: 450px;
    height: 450px;
    background: radial-gradient(circle, var(--cyan), var(--secondary));
    bottom: -150px;
    left: 30%;
    animation-delay: -10s;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(30px, -30px) scale(1.1); }
    66% { transform: translate(-20px, 20px) scale(0.9); }
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    position: relative;
    z-index: 1;
}

/* Navbar */
.navbar {
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(20px);
    box-shadow: 0 4px 30px rgba(99, 102, 241, 0.2);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid rgba(99, 102, 241, 0.2);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.8rem;
    font-weight: bold;
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: shimmer 3s ease-in-out infinite;
    background-size: 200% 200%;
}

@keyframes shimmer {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.nav-links a {
    text-decoration: none;
    color: #e2e8f0;
    font-weight: 500;
    transition: all 0.3s;
    position: relative;
    padding: 0.5rem 0;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    transition: width 0.3s;
}

.nav-links a:hover {
    color: var(--cyan);
    text-shadow: 0 0 10px rgba(6, 182, 212, 0.5);
}

.nav-links a:hover::after {
    width: 100%;
}

/* Search Section */
.search-section {
    margin: 2rem 0;
    display: flex;
    gap: 1rem;
}

.search-input {
    flex: 1;
    padding: 1rem;
    border: 2px solid rgba(99, 102, 241, 0.3);
    border-radius: 12px;
    background: rgba(30, 41, 59, 0.8);
    backdrop-filter: blur(10px);
    color: #e2e8f0;
    font-size: 1rem;
    outline: none;
    transition: all 0.3s;
}

.search-input::placeholder {
    color: rgba(226, 232, 240, 0.5);
}

.search-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.3);
}

.search-btn {
    padding: 1rem 2rem;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}

.search-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.search-btn:hover::before {
    width: 300px;
    height: 300px;
}

.search-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(99, 102, 241, 0.4);
}

.search-btn:active {
    transform: translateY(-1px);
}

/* Sections */
.section {
    background: rgba(30, 41, 59, 0.6);
    backdrop-filter: blur(20px);
    border-radius: 16px;
    padding: 2rem;
    margin: 2rem 0;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(99, 102, 241, 0.2);
    transition: all 0.3s;
}

.section:hover {
    border-color: rgba(99, 102, 241, 0.4);
    box-shadow: 0 12px 48px rgba(99, 102, 241, 0.2);
}

.section h2 {
    margin-bottom: 1.5rem;
    color: #fff;
    font-size: 2rem;
    background: linear-gradient(135deg, #fff, var(--cyan));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section h3 {
    color: var(--cyan);
    margin-bottom: 1rem;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.stat-card {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.2) 0%, rgba(139, 92, 246, 0.2) 100%);
    backdrop-filter: blur(10px);
    color: white;
    padding: 2rem;
    border-radius: 12px;
    text-align: center;
    transition: all 0.3s;
    border: 1px solid rgba(99, 102, 241, 0.3);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.5s;
}

.stat-card:hover::before {
    left: 100%;
}

.stat-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 40px rgba(99, 102, 241, 0.3);
    border-color: var(--primary);
}

.stat-card h3 {
    font-size: 0.9rem;
    opacity: 0.9;
    margin-bottom: 0.5rem;
    color: var(--cyan);
}

.stat-value {
    font-size: 2.5rem;
    font-weight: bold;
    background: linear-gradient(135deg, #fff, var(--cyan));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Blocks List */
.blocks-list, .transactions-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.block-item, .transaction-item {
    background: rgba(30, 41, 59, 0.6);
    backdrop-filter: blur(10px);
    padding: 1.5rem;
    border-radius: 12px;
    border-left: 4px solid var(--primary);
    transition: all 0.3s;
    border: 1px solid rgba(99, 102, 241, 0.2);
}

.block-item:hover, .transaction-item:hover {
    transform: translateX(8px);
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.3);
    border-left-color: var(--cyan);
    background: rgba(30, 41, 59, 0.8);
}

.block-item h3, .transaction-item h3 {
    color: var(--cyan);
    margin-bottom: 0.5rem;
}

.block-item p, .transaction-item p {
    color: #94a3b8;
    margin: 0.25rem 0;
    font-size: 0.9rem;
}

/* Address Info */
.address-info, .security-info, .explain-info {
    background: rgba(30, 41, 59, 0.6);
    backdrop-filter: blur(10px);
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px solid rgba(99, 102, 241, 0.2);
    line-height: 1.8;
}

.security-info ul, .explain-info ul {
    margin: 1rem 0;
    padding-left: 2rem;
}

.security-info li, .explain-info li {
    margin: 0.5rem 0;
    color: #94a3b8;
}

.address-info h3 {
    color: var(--cyan);
    margin-bottom: 1rem;
}

.address-info p {
    color: #94a3b8;
    margin: 0.5rem 0;
}

/* Loading State */
.loading {
    text-align: center;
    color: var(--cyan);
    padding: 2rem;
}

/* Error State */
.error {
    background: rgba(239, 68, 68, 0.1);
    color: #fca5a5;
    padding: 1rem;
    border-radius: 12px;
    border-left: 4px solid #ef4444;
    backdrop-filter: blur(10px);
}

/* Risk Section */
.risk-section {
    margin-top: 1.5rem;
    padding: 1rem;
    background: rgba(30, 41, 59, 0.6);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    border-left: 4px solid var(--primary);
}

.risk-section h4 {
    color: var(--cyan);
    margin-bottom: 0.75rem;
    font-size: 1.1rem;
}

.risk-score {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    padding: 0.75rem;
    border-radius: 8px;
    font-weight: 600;
    backdrop-filter: blur(10px);
}

.risk-score.risk-low {
    background: rgba(16, 185, 129, 0.2);
    color: #10b981;
    border-left: 4px solid #10b981;
}

.risk-score.risk-medium {
    background: rgba(245, 158, 11, 0.2);
    color: #f59e0b;
    border-left: 4px solid #f59e0b;
}

.risk-score.risk-high {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
    border-left: 4px solid #ef4444;
}

.risk-label {
    font-size: 0.9rem;
}

.risk-value {
    font-size: 1.5rem;
    font-weight: bold;
}

.risk-confidence {
    font-size: 0.85rem;
    opacity: 0.7;
    font-weight: normal;
}

.risk-labels {
    margin-top: 0.75rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.risk-label-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 500;
}

.risk-indicator {
    margin-top: 0.5rem;
    padding: 0.5rem;
    font-size: 0.85rem;
}

.risk-badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-right: 0.5rem;
}

.risk-badge.risk-low {
    background: rgba(16, 185, 129, 0.2);
    color: #10b981;
}

.risk-badge.risk-medium {
    background: rgba(245, 158, 11, 0.2);
    color: #f59e0b;
}

.risk-badge.risk-high {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

.risk-label-preview {
    display: inline-block;
    padding: 0.15rem 0.5rem;
    background: rgba(30, 41, 59, 0.6);
    color: #94a3b8;
    border-radius: 4px;
    font-size: 0.75rem;
}

.risk-loading {
    color: #94a3b8;
    font-style: italic;
}

.risk-unavailable {
    color: #94a3b8;
    font-size: 0.8rem;
}

/* Sharding Styles */
.sharding-stats, .sharding-overview {
    margin: 1rem 0;
}

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

.shard-card {
    background: rgba(30, 41, 59, 0.6);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: 12px;
    padding: 1.5rem;
    transition: all 0.3s;
}

.shard-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(99, 102, 241, 0.3);
    border-color: var(--cyan);
}

.shard-card h3 {
    margin: 0 0 0.5rem 0;
    color: var(--cyan);
    font-size: 1.2rem;
}

.shard-stats p {
    margin: 0.5rem 0;
    font-size: 0.9rem;
    color: #94a3b8;
}

.cross-shard-section {
    margin-top: 2rem;
}

.cross-shard-list {
    margin-top: 1rem;
}

.cross-shard-transactions {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1rem;
}

.cross-shard-item {
    background: rgba(30, 41, 59, 0.6);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(76, 175, 80, 0.3);
    border-left: 4px solid #4CAF50;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
    transition: all 0.3s;
}

.cross-shard-item:hover {
    transform: translateX(4px);
    box-shadow: 0 4px 16px rgba(76, 175, 80, 0.2);
}

.cross-shard-item h4 {
    margin: 0 0 0.5rem 0;
    color: #4CAF50;
}

.cross-shard-item p {
    margin: 0.25rem 0;
    font-size: 0.9rem;
    color: #94a3b8;
}

.status-pending {
    color: #ff9800;
    font-weight: bold;
}

.status-committed {
    color: #4CAF50;
    font-weight: bold;
}

.status-failed {
    color: #f44336;
    font-weight: bold;
}

.shard-section {
    background: rgba(33, 150, 243, 0.1);
    border: 1px solid rgba(33, 150, 243, 0.3);
    border-radius: 8px;
    padding: 1rem;
    margin: 1rem 0;
    backdrop-filter: blur(10px);
}

.shard-section h4 {
    margin: 0 0 0.5rem 0;
    color: #2196F3;
}

.cross-shard-badge {
    display: inline-block;
    background: linear-gradient(135deg, #4CAF50, #45a049);
    color: white;
    padding: 0.2rem 0.5rem;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: bold;
    margin-left: 0.5rem;
}

/* Fairness & MEV Styles */
.ordering-policy-section, .mev-metrics-section, .block-fairness-section {
    margin: 1rem 0;
    padding: 1rem;
    background: rgba(30, 41, 59, 0.4);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    border: 1px solid rgba(99, 102, 241, 0.2);
}

.policy-display, .mev-display, .fairness-display {
    margin: 1rem 0;
}

.policy-info, .mev-summary, .fairness-details {
    padding: 1rem;
    background: rgba(30, 41, 59, 0.6);
    backdrop-filter: blur(10px);
    border-radius: 8px;
    border: 1px solid rgba(99, 102, 241, 0.3);
}

.policy-name {
    font-weight: bold;
    color: var(--cyan);
    font-size: 1.1rem;
}

.policy-controls {
    margin-top: 1rem;
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
}

.policy-select {
    padding: 0.5rem;
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: 8px;
    font-size: 1rem;
    background: rgba(30, 41, 59, 0.8);
    color: #e2e8f0;
    backdrop-filter: blur(10px);
}

.set-policy-btn, .trace-btn, .summary-btn, .anomaly-btn {
    padding: 0.5rem 1rem;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s;
}

.set-policy-btn:hover, .trace-btn:hover, .summary-btn:hover, .anomaly-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
}

.mev-metrics-section {
    margin: 2rem 0;
}

.mev-display {
    margin-top: 1rem;
}

.mev-summary.mev-detected {
    border-color: #f44336;
    background: rgba(239, 68, 68, 0.1);
}

.mev-summary.mev-clean {
    border-color: #4CAF50;
    background: rgba(76, 175, 80, 0.1);
}

.mev-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.mev-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
}

.mev-indicator.mev-yes {
    background: #f44336;
    box-shadow: 0 0 10px #f44336;
}

.mev-indicator.mev-no {
    background: #4CAF50;
    box-shadow: 0 0 10px #4CAF50;
}

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

.mev-stat {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem;
    background: rgba(30, 41, 59, 0.6);
    backdrop-filter: blur(10px);
    border-radius: 4px;
}

.stat-label {
    font-weight: 500;
}

.stat-value {
    font-weight: bold;
}

.fairness-score {
    font-size: 1.2rem;
    font-weight: bold;
}

.block-fairness-section {
    margin: 2rem 0;
}

.fairness-display {
    margin-top: 1rem;
}

.fairness-details.fairness-high {
    border-color: #4CAF50;
    background: rgba(76, 175, 80, 0.1);
}

.fairness-details.fairness-medium {
    border-color: #ff9800;
    background: rgba(245, 158, 11, 0.1);
}

.fairness-details.fairness-low {
    border-color: #f44336;
    background: rgba(239, 68, 68, 0.1);
}

.fairness-metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.metric-item {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem;
    background: rgba(30, 41, 59, 0.6);
    backdrop-filter: blur(10px);
    border-radius: 4px;
}

.metric-label {
    font-weight: 500;
    color: #94a3b8;
}

.metric-value {
    font-weight: bold;
    color: #e2e8f0;
}

/* Forensics Styles */
.forensic-section {
    margin: 2rem 0;
    padding: 1rem;
    background: rgba(30, 41, 59, 0.4);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    border: 1px solid rgba(99, 102, 241, 0.2);
}

.tracing-controls, .summary-controls, .anomaly-controls {
    display: flex;
    gap: 1rem;
    margin: 1rem 0;
    align-items: center;
    flex-wrap: wrap;
}

.address-input {
    flex: 1;
    min-width: 200px;
    padding: 0.5rem;
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: 8px;
    font-size: 1rem;
    font-family: monospace;
    background: rgba(30, 41, 59, 0.8);
    color: #e2e8f0;
    backdrop-filter: blur(10px);
}

.hops-input {
    width: 100px;
    padding: 0.5rem;
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: 8px;
    font-size: 1rem;
    background: rgba(30, 41, 59, 0.8);
    color: #e2e8f0;
    backdrop-filter: blur(10px);
}

.fund-flows-display, .summary-display, .anomaly-display {
    margin-top: 1rem;
    padding: 1rem;
    background: rgba(30, 41, 59, 0.6);
    backdrop-filter: blur(10px);
    border-radius: 8px;
    border: 1px solid rgba(99, 102, 241, 0.2);
}

.flows-summary {
    margin-bottom: 1rem;
    padding: 1rem;
    background: rgba(6, 182, 212, 0.1);
    border-radius: 8px;
    backdrop-filter: blur(10px);
}

.flows-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.flow-item {
    padding: 1rem;
    background: rgba(30, 41, 59, 0.6);
    backdrop-filter: blur(10px);
    border-radius: 8px;
    border-left: 4px solid var(--cyan);
    margin-bottom: 1rem;
}

.flow-path {
    margin: 0.5rem 0;
    font-family: monospace;
    font-size: 0.9rem;
}

.path-address {
    color: var(--cyan);
    cursor: pointer;
    text-decoration: underline;
}

.path-address:hover {
    color: var(--primary);
}

.flow-transactions {
    margin-top: 0.5rem;
    font-size: 0.9rem;
}

.tx-link {
    color: #4CAF50;
    cursor: pointer;
    text-decoration: underline;
}

.tx-link:hover {
    color: #45a049;
}

.summary-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

.summary-stat {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem;
    background: rgba(30, 41, 59, 0.6);
    backdrop-filter: blur(10px);
    border-radius: 4px;
}

.suspicious-patterns, .risk-indicators {
    margin-top: 1rem;
    padding: 1rem;
    background: rgba(245, 158, 11, 0.1);
    border-radius: 8px;
    border-left: 4px solid #ffc107;
    backdrop-filter: blur(10px);
}

.suspicious-patterns h4, .risk-indicators h4 {
    margin-top: 0;
    color: #ffc107;
}

.suspicious-patterns ul, .risk-indicators ul {
    margin: 0.5rem 0;
    padding-left: 1.5rem;
}

.anomaly-summary {
    padding: 1rem;
    border-radius: 12px;
    margin-bottom: 1rem;
    display: flex;
    gap: 2rem;
    align-items: center;
    backdrop-filter: blur(10px);
}

.anomaly-summary.anomaly-high {
    background: rgba(239, 68, 68, 0.2);
    border: 2px solid #f44336;
}

.anomaly-summary.anomaly-medium {
    background: rgba(245, 158, 11, 0.2);
    border: 2px solid #ff9800;
}

.anomaly-summary.anomaly-low {
    background: rgba(76, 175, 80, 0.2);
    border: 2px solid #4CAF50;
}

.anomaly-score, .anomaly-confidence, .anomaly-count {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.score-value, .confidence-value, .count-value {
    font-size: 1.5rem;
    font-weight: bold;
}

.anomalies-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.anomaly-item {
    padding: 1rem;
    border-radius: 8px;
    border-left: 4px solid #ddd;
    margin-bottom: 1rem;
    backdrop-filter: blur(10px);
}

.anomaly-item.severity-high {
    background: rgba(239, 68, 68, 0.1);
    border-color: #f44336;
}

.anomaly-item.severity-medium {
    background: rgba(245, 158, 11, 0.1);
    border-color: #ff9800;
}

.anomaly-item.severity-low {
    background: rgba(76, 175, 80, 0.1);
    border-color: #4CAF50;
}

.anomaly-description {
    margin: 0.5rem 0;
    color: #94a3b8;
}

.anomaly-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.9rem;
    color: #94a3b8;
}

/* Explain Section Styles */
.explain-content {
    margin-top: 2rem;
    min-height: 200px;
}

.explain-loading, .explain-error, .info-message {
    padding: 2rem;
    text-align: center;
    color: #94a3b8;
    font-size: 1.1rem;
}

.explain-error {
    color: #fca5a5;
    background: rgba(239, 68, 68, 0.1);
    border-radius: 12px;
}

.explain-card {
    background: rgba(30, 41, 59, 0.6);
    backdrop-filter: blur(20px);
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(99, 102, 241, 0.2);
    margin-bottom: 1.5rem;
}

.explain-card h3 {
    margin-top: 0;
    color: var(--cyan);
    border-bottom: 2px solid rgba(99, 102, 241, 0.3);
    padding-bottom: 1rem;
}

.explain-section {
    margin: 1.5rem 0;
    padding: 1rem;
    background: rgba(30, 41, 59, 0.4);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    border-left: 4px solid var(--primary);
}

.explain-section h4 {
    margin-top: 0;
    color: var(--cyan);
    font-size: 1.2rem;
}

.overall-assessment.risk-high {
    border-left-color: #ef4444;
    background: rgba(239, 68, 68, 0.1);
}

.overall-assessment.risk-medium {
    border-left-color: #f59e0b;
    background: rgba(245, 158, 11, 0.1);
}

.overall-assessment.risk-low {
    border-left-color: #10b981;
    background: rgba(16, 185, 129, 0.1);
}

.assessment-text, .summary-text, .overview-text, .risk-text, .type-text {
    line-height: 1.8;
    color: #94a3b8;
    font-size: 1rem;
}

.insight {
    margin-top: 0.5rem;
    padding: 0.75rem;
    background: rgba(6, 182, 212, 0.1);
    border-radius: 8px;
    border-left: 3px solid var(--cyan);
    color: var(--cyan);
}

.risk-factors-list, .patterns-list, .anomalies-list, .recommendations-list {
    list-style: none;
    padding-left: 0;
}

.risk-factors-list li, .patterns-list li, .anomalies-list li {
    padding: 0.5rem;
    margin: 0.5rem 0;
    background: rgba(30, 41, 59, 0.6);
    backdrop-filter: blur(10px);
    border-radius: 8px;
    border-left: 3px solid #ff9800;
}

.recommendations-list li {
    padding: 0.75rem;
    margin: 0.75rem 0;
    background: rgba(30, 41, 59, 0.6);
    backdrop-filter: blur(10px);
    border-radius: 8px;
    line-height: 1.6;
}

.recommendation-high {
    border-left: 4px solid #ef4444;
    background: rgba(239, 68, 68, 0.1) !important;
}

.recommendation-medium {
    border-left: 4px solid #f59e0b;
    background: rgba(245, 158, 11, 0.1) !important;
}

.recommendation-low {
    border-left: 4px solid #10b981;
    background: rgba(16, 185, 129, 0.1) !important;
}

.anomaly-score {
    font-weight: bold;
    color: #94a3b8;
    margin-bottom: 1rem;
}

.risk-labels {
    margin-top: 0.5rem;
    color: #94a3b8;
    font-style: italic;
}

/* Responsive */
@media (max-width: 768px) {
    .nav-links {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .search-section {
        flex-direction: column;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .risk-score {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .explain-card {
        padding: 1rem;
    }
    
    .explain-section {
        padding: 0.75rem;
    }
    
    .policy-controls, .tracing-controls, .summary-controls, .anomaly-controls {
        flex-direction: column;
        align-items: stretch;
    }
}

/* Scroll animations */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}
