/* Custom Font & Animations */
@font-face {
    font-family: 'Inter';
    src: url('/static/fonts/Inter-VariableFont_opsz,wght.ttf') format('truetype');
    font-weight: 300 400 500 600 700;
    font-style: normal;
}

html, body {
    height: 100%;
}

body {
    width: 100%;
    background-color: #0b0518;
    background: linear-gradient(-45deg, #0b0518, #180d2b, #2d134d, #0d091a);
    background-size: 400% 400%;
    background-attachment: fixed;
    background-repeat: no-repeat;
    animation: gradientBG 15s ease infinite;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Helvetica Neue", Arial, sans-serif;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.9);
}

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

a {
    color: #c084fc;
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: #a855f7;
    text-decoration: none;
}

h1, h2, h3, h4, h5, h6 {
    color: #ffffff;
    font-weight: 700;
}

h1 small {
    font-size: 65%;
}

h3 {
    margin-top: 24px;
    margin-bottom: 16px;
}

.octicon {
    color: rgba(255, 255, 255, 0.6);
    display: inline-block;
    vertical-align: text-top;
    fill: currentColor;
    height: 16px;
    filter: drop-shadow(0 0 2px rgba(255, 255, 255, 0.2));
}

@media (min-width: 768px) {
    .container {
        max-width: 750px;
    }
}

@media (min-width: 992px) {
    body {
        font-size: 13px;
    }
    .container {
        max-width: 970px;
    }
    .octicon {
        height: 24px;
    }
    .navbar-form .form-control {
        width: 230px;
    }
}

@media (min-width: 1200px) {
    body {
        font-size: 14px;
    }
    .container {
        max-width: 1170px;
    }
    .octicon {
        height: 32px;
    }
    .navbar-form .form-control {
        width: 360px;
    }
}

/* Glassmorphism Components */
.glass-card {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.2);
    padding: 20px;
    margin-bottom: 25px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.glass-card:hover {
    border-color: rgba(255, 255, 255, 0.15);
    box-shadow: 0 12px 40px 0 rgba(0, 0, 0, 0.3);
}

.glass-header {
    background: rgba(15, 10, 25, 0.6) !important;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
}

.glass-dropdown {
    background: rgba(15, 10, 25, 0.95) !important;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 8px !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

/* Header & Search Bar */
#header {
    font-size: 14px;
}

#header input {
    background-color: rgba(0, 0, 0, 0.35) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    color: #fff !important;
    border-radius: 8px 0 0 8px !important;
    padding: 12px 18px !important;
    font-size: 14px;
    transition: all 0.3s ease;
}

#header input:focus {
    background-color: rgba(0, 0, 0, 0.5) !important;
    border-color: rgba(168, 85, 247, 0.6) !important;
    box-shadow: 0 0 12px rgba(168, 85, 247, 0.3) !important;
    outline: none;
}

#header button {
    background-color: #a855f7 !important;
    color: #fff !important;
    border: 1px solid rgba(168, 85, 247, 0.5) !important;
    border-radius: 0 8px 8px 0 !important;
    padding: 0 24px !important;
    font-weight: 600;
    transition: all 0.2s ease;
}

#header button:hover {
    background-color: #c084fc !important;
    box-shadow: 0 0 12px rgba(168, 85, 247, 0.4) !important;
}

.bg-purple {
    background-color: transparent;
}

.bg-gradient {
    background: transparent !important;
}

/* Navigation Link Redesign */
.navbar-dark .navbar-nav .nav-link {
    color: rgba(255, 255, 255, 0.75) !important;
    font-weight: 500;
    transition: color 0.2s ease;
    padding: 0.5rem 1rem !important;
}

.navbar-dark .navbar-nav .nav-link:hover {
    color: #d8b4fe !important;
}

.navbar-brand {
    display: flex;
    align-items: center;
}

.explorer {
    font-weight: 700;
    letter-spacing: 0.05em;
    color: #ffffff;
    margin-left: 8px;
    text-transform: uppercase;
}

#wrap {
    flex: 1 0 auto;
}

/* Footer styling */
#footer {
    color: rgba(255, 255, 255, 0.5);
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(10, 5, 20, 0.4);
    backdrop-filter: blur(10px);
}

#footer a {
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    transition: color 0.2s ease;
}

#footer a:hover {
    color: #d8b4fe;
}

.alert-data {
    color: #ffffff;
    background-color: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    padding: 15px;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    margin-bottom: 20px;
}

.line-top {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding: 12px 0 0;
}

.line-mid {
    padding: 16px;
}

.line-bot {
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding: 0 0 12px;
}

/* Glass Table Styling */
.table {
    color: rgba(255, 255, 255, 0.85);
}

.table td, .table th {
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    vertical-align: middle;
}

.table-striped tbody tr:nth-of-type(odd) {
    background-color: rgba(255, 255, 255, 0.015) !important;
}

.table-hover tbody tr:hover {
    background-color: rgba(255, 255, 255, 0.04) !important;
    color: #ffffff !important;
}

.data-table {
    table-layout: fixed;
    border-radius: 8px;
    background: transparent;
    border-collapse: separate;
    border-spacing: 0;
}

.data-table th {
    font-weight: 600;
    color: #d8b4fe;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 0.05em;
    border-bottom: 2px solid rgba(255, 255, 255, 0.12) !important;
}

.data-table td, .data-table th {
    padding: 12px 10px;
}

.data-table span.ellipsis {
    max-width: 100%;
}

.data {
    font-weight: bold;
    color: #ffffff;
}

table.data-table table.data-table th {
    border-top: 0;
    font-weight: normal;
}

.alert .data-table {
    margin: 0;
}

/* Badges / Values Styling */
.txvalues {
    display: inline-block;
    padding: 0.5em 1.2em;
    font-size: 11px;
    font-weight: 600;
    color: #fff;
    text-align: center;
    white-space: nowrap;
    vertical-align: middle;
    border-radius: 20px;
    margin-top: 5px;
    border: 1px solid transparent;
}

.txvalues:not(:last-child) {
    margin-right: 5px;
}

.txvalues-default {
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.9);
}

.txvalues-success {
    background-color: rgba(16, 185, 129, 0.12);
    border: 1px solid rgba(16, 185, 129, 0.25);
    color: #a7f3d0;
}

.txvalues-primary {
    background-color: rgba(168, 85, 247, 0.12);
    border: 1px solid rgba(168, 85, 247, 0.25);
    color: #d8b4fe;
}

.txvalues-danger {
    background-color: rgba(239, 68, 68, 0.12);
    border: 1px solid rgba(239, 68, 68, 0.25);
    color: #fca5a5;
    text-transform: uppercase;
}

/* Transaction Inputs/Outputs layout */
.tx-own {
    background-color: rgba(168, 85, 247, 0.15) !important;
    border-left: 4px solid #a855f7;
}

.tx-own td {
    background-color: rgba(168, 85, 247, 0.15) !important;
}

.tx-amt {
    float: right !important;
    font-weight: 600;
}

.tx-in .tx-amt {
    color: #fca5a5 !important;
}

.tx-out .tx-amt {
    color: #86efac !important;
}

.tx-addr {
    float: left !important;
}

.tx-descr {
    color: rgba(255, 255, 255, 0.5) !important;
    font-style: italic;
    font-size: 11px;
}

.ellipsis {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.data-div {
    margin: 20px 0 30px 0;
    overflow-x: auto;
    width: 100%;
}

.navbar-nav .nav-link {
    padding-right: 0;
    padding-left: .25rem;
}

.navbar-text .nav-link {
    padding: 0;
}

::-webkit-input-placeholder {
    color: rgba(255, 255, 255, 0.4) !important;
    font-style: italic;
    font-size: 14px;
}

::-moz-placeholder {
    color: rgba(255, 255, 255, 0.4) !important;
    font-style: italic;
    font-size: 14px;
}

.h-container ul, .h-container h3 {
    margin: 0;
}

.h-container h5 {
    margin-top: 6px;
    margin-bottom: 0;
}

/* Glass Pagination styles */
.pagination {
    margin-top: 10px;
}

.page-link {
    background-color: rgba(255, 255, 255, 0.03) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    color: rgba(255, 255, 255, 0.8) !important;
    transition: all 0.2s ease;
    padding: 8px 14px;
}

.page-link:hover {
    background-color: rgba(255, 255, 255, 0.08) !important;
    border-color: rgba(255, 255, 255, 0.15) !important;
    color: #ffffff !important;
}

.page-item.active .page-link {
    background-color: #a855f7 !important;
    border-color: #a855f7 !important;
    color: #ffffff !important;
    box-shadow: 0 4px 12px rgba(168, 85, 247, 0.3);
}

.page-item.disabled .page-link {
    background-color: rgba(255, 255, 255, 0.01) !important;
    border-color: rgba(255, 255, 255, 0.04) !important;
    color: rgba(255, 255, 255, 0.3) !important;
}

.page-text {
    color: rgba(255, 255, 255, 0.4);
    padding: 8px 14px;
    display: inline-block;
}

#txSpecific {
    margin: 0;
    color: #e2e8f0;
}

/* Neon Code Highlighting styling */
.string {
    color: #86efac; /* neon green */
}

.number {
    color: #fbcfe8; /* pastel pink */
}

.boolean {
    color: #60a5fa; /* neon blue */
}

.null {
    color: #fca5a5; /* soft red */
}

.key {
    color: #c084fc; /* light purple */
    font-weight: 600;
}

/* Spinner styling */
.spinner {
    margin: auto;
    width: 70px;
    height: 40px;
    text-align: center;
    font-size: 10px;
}

.spinner > div {
    border: 1px solid rgba(168, 85, 247, 0.4);
    background-color: rgba(168, 85, 247, 0.3);
    margin: 0 2px;
    height: 100%;
    width: 6px;
    display: inline-block;
    -webkit-animation: sk-stretchdelay 1.2s infinite ease-in-out;
    animation: sk-stretchdelay 1.2s infinite ease-in-out;
}

.spinner .rect2 {
    -webkit-animation-delay: -1.1s;
    animation-delay: -1.1s;
}

.spinner .rect3 {
    -webkit-animation-delay: -1.0s;
    animation-delay: -1.0s;
}

.spinner .rect4 {
    -webkit-animation-delay: -0.9s;
    animation-delay: -0.9s;
}

.spinner .rect5 {
    -webkit-animation-delay: -0.8s;
    animation-delay: -0.8s;
}

@-webkit-keyframes sk-stretchdelay {
    0%, 40%, 100% { -webkit-transform: scaleY(0.4) }
    20% { -webkit-transform: scaleY(1.0) }
}

@keyframes sk-stretchdelay {
    0%, 40%, 100% {
        transform: scaleY(0.4);
        -webkit-transform: scaleY(0.4);
    }  20% {
        transform: scaleY(1.0);
        -webkit-transform: scaleY(1.0);
    }
}

.spinner_wrapper {
    width: 100px;
    height: 80px;
    margin: auto;
}

.chart-container {
    margin: 0 auto;
    width: 93%;
}

/* Custom form elements */
.form-control {
    background-color: rgba(0, 0, 0, 0.25) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    color: #ffffff !important;
    border-radius: 8px !important;
    transition: all 0.3s ease;
}

.form-control:focus {
    background-color: rgba(0, 0, 0, 0.45) !important;
    border-color: rgba(168, 85, 247, 0.5) !important;
    box-shadow: 0 0 12px rgba(168, 85, 247, 0.3) !important;
    color: #ffffff !important;
}

.btn-primary {
    background-color: #a855f7 !important;
    border-color: #a855f7 !important;
    border-radius: 8px !important;
    font-weight: 600;
    padding: 10px 24px;
    transition: all 0.2s ease;
}

.btn-primary:hover {
    background-color: #c084fc !important;
    border-color: #c084fc !important;
    box-shadow: 0 0 12px rgba(168, 85, 247, 0.4) !important;
}

.address-filter-select {
    background-color: rgba(15, 10, 25, 0.7) !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    color: #ffffff !important;
    border-radius: 8px !important;
    padding: 8px 32px 8px 12px;
    outline: none;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'></polyline></svg>") !important;
    background-repeat: no-repeat !important;
    background-position: right 10px center !important;
    background-size: 16px !important;
    cursor: pointer;
    transition: all 0.2s ease;
}

.address-filter-select:focus {
    border-color: rgba(168, 85, 247, 0.5) !important;
    box-shadow: 0 0 12px rgba(168, 85, 247, 0.3) !important;
}

.address-filter-select option {
    background-color: #140b24 !important;
    color: #ffffff !important;
}

/* Custom Scrollbars */
html {
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.15) rgba(15, 10, 25, 0.2);
}

::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: rgba(15, 10, 25, 0.2);
}
::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(168, 85, 247, 0.5);
}

/* Dropdown Menu Glass Overrides */
.dropdown-menu {
    background-color: rgba(15, 10, 25, 0.95) !important;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 8px !important;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
}

.dropdown-item {
    color: rgba(255, 255, 255, 0.8) !important;
    transition: all 0.2s ease;
}

.dropdown-item:hover {
    background-color: rgba(168, 85, 247, 0.15) !important;
    color: #fff !important;
}

/* Extra tweaks */
pre {
    color: #f1f5f9;
}
code {
    color: #c084fc;
}
.text-muted {
    color: rgba(255, 255, 255, 0.5) !important;
}
tr {
    transition: background-color 0.2s ease;
}

/* Responsive Block List Table Columns */
.col-height { width: 8%; white-space: nowrap; }
.col-time { width: 22%; white-space: nowrap; }
.col-txs { width: 8%; white-space: nowrap; }
.col-size { width: 8%; white-space: nowrap; }
.col-hash { } /* Allocates remaining free space */

/* Small screens (mobile & portrait tablets) */
@media (max-width: 575px) {
    .col-height { width: 14% !important; }
    .col-time { width: 32% !important; }
    .col-txs { width: 10% !important; }
    .col-size { width: 12% !important; }
    .col-hash { width: 32% !important; } /* Shrinks the hash column more to make space */

    .data-table th {
        white-space: normal !important; /* Allow header text to wrap */
        word-wrap: break-word;
        word-break: break-all;
        font-size: 10px !important;
        padding: 6px 4px !important;
    }
    .data-table td {
        padding: 8px 4px !important;
        font-size: 11px !important;
    }
}

