/* CSS 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; }
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    position: relative;
    z-index: 1;
}
/* Search Section */
.search-section {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(0, 229, 255, 0.2);
    border-radius: 15px;
    padding: 30px;
    margin-bottom: 30px;
    backdrop-filter: blur(10px);
    box-shadow: 0 5px 20px rgba(0, 229, 255, 0.1);
    position: relative;
    overflow: hidden;
}

.search-section::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;
}

.search-section:hover::before {
    transform: scaleX(1);
}

.search-form {
    display: flex;
    justify-content: center;
}

.search-container {
    display: flex;
    width: 100%;
    max-width: 600px;
    border-radius: 50px;
    overflow: hidden;
    box-shadow: 0 0 15px rgba(0, 229, 255, 0.1);
}

.search-input {
    flex: 1;
    padding: 15px 20px;
    border: none;
    background: rgba(255, 255, 255, 0.05);
    color: #e0e0e0;
    font-size: 1rem;
    outline: none;
    transition: all 0.3s ease;
}

.search-input:focus {
    background: rgba(0, 229, 255, 0.1);
}

.search-input::placeholder {
    color: #888;
}

.search-button {
    padding: 15px 30px;
    background: linear-gradient(135deg, #00e5ff, #00ff80);
    color: #000;
    border: none;
    cursor: pointer;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.search-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(0, 229, 255, 0.5);
}

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

.search-button:hover::before {
    left: 100%;
}

/* Stats Section */
.stats-section {
    margin-bottom: 40px;
}

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

.stat-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(0, 229, 255, 0.3);
    border-radius: 15px;
    padding: 30px 20px;
    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: 3px;
    background: linear-gradient(90deg, #00e5ff, #00ff80);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

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

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

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

.stat-label {
    font-size: 0.9rem;
    opacity: 0.8;
    text-transform: uppercase;
    letter-spacing: 1px;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-10px); }
    60% { transform: translateY(-5px); }
}

/* Blocks and Transactions */
.blocks-section, .transactions-section {
    margin-bottom: 40px;
}

.blocks-list, .transactions-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

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

.block-item::before, .transaction-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;
}

.block-item:hover::before, .transaction-item:hover::before {
    transform: scaleX(1);
}

.block-item:hover, .transaction-item:hover {
    transform: translateY(-5px);
    border-color: #00e5ff;
    box-shadow: 0 15px 30px rgba(0, 229, 255, 0.2);
}

.block-header, .tx-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
}

.block-height, .tx-label {
    font-weight: 700;
    color: #00e5ff;
    font-size: 1.1rem;
}

.block-time, .tx-time {
    color: #888;
    font-size: 0.9rem;
}

.block-hash, .tx-hash {
    margin: 10px 0;
}

.hash-link {
    color: #e0e0e0;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    word-break: break-all;
    padding: 5px;
    border-radius: 5px;
    background: rgba(0, 229, 255, 0.1);
    transition: all 0.3s ease;
}

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

.block-info, .tx-block {
    color: #888;
    font-size: 0.9rem;
    margin-top: 10px;
}

.tx-count {
    background: rgba(0, 255, 127, 0.2);
    color: #00ff80;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.8rem;
    font-weight: 600;
}

/* Search Results */
.search-results {
    margin-top: 30px;
}

.search-term {
    color: #00e5ff;
    font-weight: 600;
    font-family: 'Courier New', monospace;
    background: rgba(0, 229, 255, 0.1);
    padding: 2px 6px;
    border-radius: 5px;
}

.error-message {
    background: rgba(255, 68, 68, 0.1);
    border: 1px solid rgba(255, 68, 68, 0.3);
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
    text-align: center;
}

.error-message h3 {
    color: #ff4444;
    margin-bottom: 10px;
}

/* Result Details */
.result-block, .result-transaction, .result-address {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(0, 229, 255, 0.2);
    border-radius: 15px;
    padding: 25px;
    margin-top: 20px;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.result-block::before, .result-transaction::before, .result-address::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;
}

.result-block:hover::before, .result-transaction:hover::before, .result-address:hover::before {
    transform: scaleX(1);
}

.result-block:hover, .result-transaction:hover, .result-address:hover {
    transform: translateY(-5px);
    border-color: #00e5ff;
    box-shadow: 0 15px 30px rgba(0, 229, 255, 0.2);
}

.result-header {
    border-bottom: 1px solid rgba(0, 229, 255, 0.3);
    padding-bottom: 15px;
    margin-bottom: 20px;
}

.detail-grid {
    display: grid;
    gap: 15px;
    margin-bottom: 25px;
}

.detail-item {
    padding: 15px;
    background: rgba(0, 229, 255, 0.05);
    border-radius: 10px;
    border-left: 3px solid #00e5ff;
    transition: all 0.3s ease;
}

.detail-item:hover {
    background: rgba(0, 229, 255, 0.1);
}

.detail-label {
    color: #888;
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.detail-value {
    color: #e0e0e0;
    font-weight: 500;
    word-break: break-all;
}

.hash-value {
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    background: rgba(0, 229, 255, 0.1);
    padding: 5px 8px;
    border-radius: 5px;
}

/* Transactions in Block or Address */
.transactions-in-block, .transactions-in-address {
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid rgba(0, 229, 255, 0.3);
}

.tx-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.tx-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px;
    background: rgba(0, 229, 255, 0.05);
    border-radius: 10px;
    border-left: 3px solid #00ff80;
    transition: all 0.3s ease;
}

.tx-item:hover {
    background: rgba(0, 229, 255, 0.1);
}

.tx-index {
    background: rgba(0, 255, 127, 0.2);
    color: #00ff80;
    padding: 4px 8px;
    border-radius: 5px;
    font-size: 0.8rem;
    font-weight: 600;
}

/* Inputs and Outputs */
.tx-inputs, .tx-outputs {
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid rgba(0, 229, 255, 0.3);
}

.input-item, .output-item {
    display: flex;
    gap: 15px;
    padding: 15px;
    background: rgba(0, 229, 255, 0.05);
    border-radius: 10px;
    margin-bottom: 10px;
    border-left: 3px solid #ffaa00;
    transition: all 0.3s ease;
}

.input-item:hover, .output-item:hover {
    background: rgba(0, 229, 255, 0.1);
}

.input-index, .output-index {
    background: rgba(255, 170, 0, 0.2);
    color: #ffaa00;
    padding: 4px 8px;
    border-radius: 5px;
    font-size: 0.8rem;
    font-weight: 600;
    min-width: 40px;
    text-align: center;
}

.input-details, .output-details {
    flex: 1;
}

.output-value {
    font-weight: 700;
    color: #00ff80;
    font-size: 1.1rem;
    margin-bottom: 5px;
}

.output-address {
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    color: #888;
}

.address {
    background: rgba(0, 229, 255, 0.1);
    padding: 2px 6px;
    border-radius: 5px;
}

.coinbase {
    color: #00ff80;
    font-weight: 600;
    font-family: 'Courier New', monospace;
    background: rgba(0, 255, 127, 0.1);
    padding: 5px 8px;
    border-radius: 5px;
}

.total-output {
    margin-top: 15px;
    padding: 15px;
    background: rgba(0, 255, 127, 0.1);
    border: 1px solid rgba(0, 255, 127, 0.3);
    border-radius: 10px;
    text-align: center;
    color: #00ff80;
    font-size: 1.2rem;
}

/* Links */
a {
    color: #00e5ff;
    text-decoration: none;
    transition: all 0.3s ease;
}

a:hover {
    color: #00ff80;
    text-decoration: underline;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .search-container {
        flex-direction: column;
        border-radius: 15px;
    }
    
    .search-input {
        border-radius: 15px 15px 0 0;
        border-bottom: 1px solid rgba(0, 229, 255, 0.2);
    }
    
    .search-button {
        border-radius: 0 0 15px 15px;
        border-top: none;
    }
    
    .block-header, .tx-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    
    .detail-grid {
        grid-template-columns: 1fr;
    }
    
    .tx-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .input-item, .output-item {
        flex-direction: column;
        gap: 10px;
    }
}

@media (max-width: 480px) {
    .header h1 a {
        font-size: 2rem;
    }
    
    .search-section {
        padding: 20px;
    }
    
    .search-input, .search-button {
        padding: 12px 15px;
    }
    
    .stat-card {
        padding: 20px 15px;
    }
    
    .stat-value {
        font-size: 2rem;
    }
    
    .block-item, .transaction-item, .result-block, .result-transaction, .result-address {
        padding: 15px;
    }
    
    .detail-item {
        padding: 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 */
a:focus,
button:focus,
.search-button:focus {
    outline: 2px solid #00e5ff;
    outline-offset: 2px;
