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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #0a0a0a;
    color: #e0e0e0;
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* Animated Background */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 20% 80%, rgba(0, 229, 255, 0.1) 0%, transparent 50%),
                radial-gradient(circle at 80% 20%, rgba(255, 0, 255, 0.1) 0%, transparent 50%),
                radial-gradient(circle at 40% 40%, rgba(0, 255, 127, 0.05) 0%, transparent 50%);
    z-index: -1;
    animation: backgroundPulse 10s ease-in-out infinite;
}

@keyframes backgroundPulse {
    0%, 100% { opacity: 0.7; }
    50% { opacity: 1; }
}

/* Address Link */
.address-link {
    color: #00e5ff;
    text-decoration: none;
    font-family: 'Courier New', monospace;
    padding: 5px 8px;
    border-radius: 5px;
    background: rgba(0, 229, 255, 0.1);
    transition: all 0.3s ease;
    word-break: break-all;
    position: relative;
    overflow: hidden;
}

.address-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, #00e5ff, #00ff80);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.address-link:hover {
    color: #00ff80;
    background: rgba(0, 229, 255, 0.2);
    text-decoration: none;
}

.address-link:hover::before {
    transform: scaleX(1);
}

/* Fee Info */
.fee-info {
    background: rgba(255, 255, 255, 0.05);
    padding: 15px;
    border-radius: 10px;
    margin: 15px 0;
    border-left: 3px solid #00ff80;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.fee-info::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, #00e5ff, #00ff80);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.fee-info:hover::before {
    transform: scaleX(1);
}

.fee-info:hover {
    transform: translateY(-3px);
    border-color: #00e5ff;
    box-shadow: 0 10px 20px rgba(0, 229, 255, 0.2);
}

.fee-high {
    border-left-color: #ff4444;
    background: rgba(255, 68, 68, 0.1);
}

.fee-medium {
    border-left-color: #ffaa00;
    background: rgba(255, 170, 0, 0.1);
}

/* Status */
.status {
    padding: 4px 8px;
    border-radius: 5px;
    font-size: 0.9em;
    font-weight: 600;
    display: inline-block;
    margin-left: 10px;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.status.confirmed {
    background: rgba(0, 255, 127, 0.2);
    color: #00ff80;
}

.status.partial {
    background: rgba(255, 170, 0, 0.2);
    color: #ffaa00;
}

.status.unconfirmed {
    background: rgba(255, 68, 68, 0.1);
    color: #ff4444;
}

/* Transaction Amount */
.tx-amount {
    font-weight: 700;
}

.tx-amount.positive {
    color: #00ff80;
}

.tx-amount.negative {
    color: #ff4444;
}

/* Precision Display */
.precision-display {
    font-family: 'Courier New', monospace;
    background: rgba(0, 229, 255, 0.1);
    padding: 5px 8px;
    border-radius: 5px;
    display: inline-block;
    color: #e0e0e0;
}

/* Hash Truncated */
.hash-truncated {
    cursor: help;
    border-bottom: 1px dotted #888;
    color: #00e5ff;
    transition: all 0.3s ease;
}

.hash-truncated:hover {
    color: #00ff80;
}

/* Block Stats */
.block-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin: 20px 0;
}

.stat-card {
    background: rgba(255, 255, 255, 0.05);
    padding: 20px;
    border-radius: 10px;
    border: 1px solid rgba(0, 229, 255, 0.2);
    text-align: center;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, #00e5ff, #00ff80);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-3px);
    border-color: #00e5ff;
    box-shadow: 0 10px 20px rgba(0, 229, 255, 0.2);
}

.stat-card:hover::before {
    transform: scaleX(1);
}

.stat-value {
    font-size: 1.6em;
    font-weight: 700;
    color: #00e5ff;
    margin-bottom: 5px;
    animation: bounce 2s infinite;
}

.stat-label {
    color: #888;
    font-size: 0.9em;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Coinbase Badge */
.coinbase-badge {
    background: rgba(255, 170, 0, 0.2);
    color: #ffaa00;
    padding: 4px 8px;
    border-radius: 5px;
    font-size: 0.8em;
    margin-left: 10px;
}

/* Zero Value */
.zero-value {
    color: #ff4444;
    font-style: italic;
}

/* Output Script */
.output-script {
    color: #888;
    font-style: italic;
    font-family: 'Courier New', monospace;
}

/* Transaction Item */
.tx-item {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    padding: 12px;
    margin: 5px 0;
    border-left: 3px solid #00ff80;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.tx-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, #00e5ff, #00ff80);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.tx-item:hover {
    transform: translateY(-3px);
    border-color: #00e5ff;
    box-shadow: 0 10px 20px rgba(0, 229, 255, 0.2);
}

.tx-item:hover::before {
    transform: scaleX(1);
}

/* Transaction Summary */
.transaction-summary {
    margin: 20px 0;
    padding: 15px;
    background: rgba(0, 229, 255, 0.05);
    border-radius: 10px;
    border: 1px solid rgba(0, 229, 255, 0.2);
    backdrop-filter: blur(10px);
}

/* Responsive Design */
@media (max-width: 768px) {
    .block-stats {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 10px;
    }

    .stat-card {
        padding: 15px;
    }

    .precision-display {
        font-size: 0.9em;
    }

    .tx-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
}

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

::-webkit-scrollbar-track {
    background: #1a1a1a;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #00e5ff, #00ff80);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #00b8cc, #00cc66);
}

/* Focus Styles for Accessibility */
.address-link:focus,
.stat-card:focus {
    outline: 2px solid #00e5ff;
    outline-offset: 2px;
}