/* Etherscan Clone CSS */
:root {
    --bg-main: #f8f9fa;
    --bg-white: #ffffff;
    --text-main: #212529;
    --text-muted: #6c757d;
    --text-dark: #000000;
    --primary: #0784c3;
    --primary-hover: #066699;
    --border: #e9ecef;
    --shadow: 0 0.5rem 1.2rem rgba(189, 197, 209, 0.2);
    --font: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    --hero-bg: #111a2e;
}

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

body {
    font-family: var(--font);
    background-color: var(--bg-main);
    color: var(--text-main);
    line-height: 1.5;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 15px;
}

a {
    color: var(--primary);
    text-decoration: none;
}
a:hover {
    color: var(--primary-hover);
}

.text-primary { color: var(--primary); }
.text-muted { color: var(--text-muted); }
.me-2 { margin-right: 8px; }
.ms-3 { margin-left: 12px; }

/* Top Bar */
.top-bar {
    background: #f8f9fa;
    border-bottom: 1px solid var(--border);
    font-size: 13px;
    padding: 8px 0;
    color: var(--text-muted);
}
.top-bar-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.icon-btn {
    background: none;
    border: none;
    cursor: pointer;
    margin-left: 8px;
    font-size: 14px;
}

/* Navbar */
.navbar {
    background: var(--bg-white);
    border-bottom: 1px solid var(--border);
    padding: 15px 0;
}
.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.logo {
    display: flex;
    align-items: center;
}
.logo-text {
    font-size: 22px;
    font-weight: 700;
    color: #4a4f55;
    letter-spacing: -0.5px;
}
.nav-links {
    display: flex;
    gap: 24px;
    align-items: center;
}
.nav-links a {
    color: var(--text-main);
    font-weight: 500;
    font-size: 15px;
}
.nav-links a:hover, .nav-links a.active {
    color: var(--primary);
}
.sign-in {
    border: 1px solid var(--border);
    padding: 6px 12px;
    border-radius: 6px;
    background: #f8f9fa;
}

/* Hero Section */
.hero-section {
    background-color: var(--hero-bg);
    background-image: radial-gradient(circle at right top, #1b263b 0%, #111a2e 100%);
    color: #fff;
    padding: 60px 0 100px;
}
.hero-content {
    max-width: 800px;
}
.hero-content h1 {
    font-size: 24px;
    margin-bottom: 24px;
    font-weight: 500;
}
.search-bar {
    display: flex;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    padding: 4px;
}
.search-filter {
    background: #f8f9fa;
    color: var(--text-main);
    padding: 12px 16px;
    font-size: 14px;
    border-right: 1px solid var(--border);
    border-radius: 4px;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}
.search-bar input {
    flex: 1;
    border: none;
    padding: 12px 16px;
    font-size: 15px;
    outline: none;
    color: var(--text-main);
}
.search-bar button {
    background: var(--primary);
    border: none;
    padding: 0 20px;
    color: #fff;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}
.search-bar button:hover {
    background: var(--primary-hover);
}

/* Floating Stats */
.stats-overlap {
    margin-top: -60px;
    position: relative;
    z-index: 10;
}
.stats-card {
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: var(--shadow);
    display: flex;
    padding: 16px 0;
}
.stats-col {
    flex: 1;
    padding: 0 24px;
}
.border-left { border-left: 1px solid var(--border); }
.border-bottom { border-bottom: 1px solid var(--border); margin-bottom: 16px; padding-bottom: 16px; }

.stat-row {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}
.stat-icon {
    font-size: 20px;
}
.stat-label {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 500;
    margin-bottom: 4px;
}
.stat-val {
    font-size: 15px;
    color: var(--text-main);
    font-weight: 500;
}
.chart-col {
    display: flex;
    flex-direction: column;
}
.text-right { text-align: right; }
.fake-chart { width: 100%; height: 60px; margin-top: 10px; }

/* Main Content (Data Panels) */
.main-content {
    padding: 40px 0 80px;
}
.data-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}
.data-panel {
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
}
.panel-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
}
.panel-header h2 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-dark);
}
.panel-body {
    flex: 1;
    max-height: 500px;
    overflow-y: auto;
}
.panel-footer {
    padding: 12px 20px;
    border-top: 1px solid var(--border);
    text-align: center;
    background: #f8f9fa;
    border-radius: 0 0 12px 12px;
}
.panel-footer a {
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
    color: var(--text-muted);
}
.panel-footer a:hover { color: var(--primary); }

/* List Items matching Etherscan */
.list-item {
    display: flex;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
    align-items: center;
}
.list-item:last-child { border-bottom: none; }

.item-left {
    display: flex;
    align-items: center;
    width: 35%;
}
.item-icon {
    width: 44px;
    height: 44px;
    background: #f8f9fa;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 16px;
    font-size: 18px;
    color: var(--text-muted);
}
.item-meta { display: flex; flex-direction: column; gap: 4px; }
.hash-link {
    font-size: 14px;
    font-weight: 500;
}
.time-ago {
    font-size: 12px;
    color: var(--text-muted);
}

.item-middle {
    display: flex;
    flex-direction: column;
    width: 45%;
    gap: 4px;
}
.item-middle span {
    font-size: 14px;
    color: var(--text-main);
}
.item-middle a { font-weight: 400; }

.item-right {
    width: 20%;
    text-align: right;
}
.badge-amount {
    font-size: 12px;
    padding: 4px 8px;
    background: #f8f9fa;
    border: 1px solid var(--border);
    border-radius: 6px;
    display: inline-block;
    color: var(--text-dark);
}

.loading {
    padding: 24px;
    text-align: center;
    color: var(--text-muted);
    font-size: 14px;
}

/* Modal */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.6);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(2px);
}
.modal-overlay.open { display: flex; }
.modal {
    background: #fff;
    width: 90%;
    max-width: 800px;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    display: flex;
    flex-direction: column;
    max-height: 90vh;
}
.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
}
.modal-header h3 { font-size: 18px; font-weight: 600; color: var(--text-main); }
.modal-close { background: none; border: none; font-size: 28px; cursor: pointer; color: var(--text-muted); line-height: 1; }
.modal-close:hover { color: var(--text-main); }

.modal-body {
    padding: 24px;
    overflow-y: auto;
}
.detail-row {
    display: flex;
    padding: 14px 0;
    border-bottom: 1px solid var(--border);
}
.detail-row:last-child { border-bottom: none; }
.detail-label {
    width: 220px;
    color: var(--text-muted);
    font-weight: 500;
    font-size: 15px;
}
.detail-value {
    flex: 1;
    word-break: break-all;
    font-size: 15px;
    color: var(--text-main);
}

/* Responsive */
@media (max-width: 992px) {
    .data-grid { grid-template-columns: 1fr; }
    .stats-card { flex-direction: column; padding: 0; }
    .stats-col { padding: 16px 24px; border-left: none; border-bottom: 1px solid var(--border); }
    .border-bottom { border-bottom: none; margin-bottom: 0; padding-bottom: 0; margin-right: 20px; }
    .stats-col { display: flex; align-items: center; }
    
    .list-item { flex-direction: column; align-items: flex-start; gap: 12px; }
    .item-left, .item-middle, .item-right { width: 100%; text-align: left; }
    .item-right { text-align: left; margin-top: 4px; }
}
