/* QBitcoin Explorer Styles - Matching Home Theme */

:root {
    --dark-bg: #0a1929;
    --darker-bg: #05101f;
    --primary-blue: #1976d2;
    --secondary-blue: #2196f3;
    --accent-blue: #64b5f6;
    --highlight-blue: #00b0ff;
    --text-primary: #ffffff;
    --text-secondary: #b0bec5;
    --gradient-blue: linear-gradient(135deg, #1976d2, #64b5f6);
    --gradient-dark: linear-gradient(135deg, #0a1929, #05101f);
    --gradient-glow: linear-gradient(135deg, rgba(25, 118, 210, 0.8), rgba(0, 176, 255, 0.8));
    --card-bg: rgba(15, 35, 60, 0.7);
    --card-hover: rgba(25, 118, 210, 0.2);
    --box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    --success-color: #4caf50;
    --warning-color: #ff9800;
    --danger-color: #f44336;
    --info-color: #03a9f4;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    background-color: var(--dark-bg);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: var(--accent-blue);
    transition: color 0.3s ease;
}

a:hover {
    color: var(--highlight-blue);
}

.container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Status Indicator */
.status-indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: var(--danger-color);
    animation: pulse 2s infinite;
    display: inline-block;
    margin-right: 0.5rem;
}

.status-indicator.online {
    background-color: var(--success-color);
}

.status-indicator.offline {
    background-color: var(--danger-color);
}

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

.status-text {
    color: white;
    font-size: 0.9rem;
    font-weight: 500;
}

/* Header and Navigation */
header {
    background-color: var(--darker-bg);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

.logo {
    display: flex;
    align-items: center;
}

.logo-link {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: var(--text-primary);
}

.logo-image {
    height: 40px;
    width: auto;
    margin-right: 0.5rem;
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 700;
    background: var(--gradient-blue);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: 0.5px;
}

#main-nav ul {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
}

#main-nav li {
    margin: 0 0.3rem;
}

#main-nav .nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    padding: 0.5rem 0.8rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    border-radius: 4px;
    transition: all 0.3s ease;
}

#main-nav .nav-link i {
    margin-right: 0.4rem;
}

#main-nav .nav-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

#main-nav .active-nav {
    background: var(--gradient-blue);
    color: white;
    font-weight: 600;
}

.mobile-menu-toggle {
    display: none;
    color: var(--text-primary);
    background: transparent;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
}

.node-status {
    display: flex;
    align-items: center;
    padding: 0.5rem 1rem;
    background-color: rgba(0, 0, 0, 0.2);
    border-radius: 20px;
    margin-left: 1rem;
}

/* Explorer Layout */
.explorer-container {
    display: flex;
    min-height: calc(100vh - 70px);
    position: relative;
}

/* Sidebar */
.explorer-sidebar {
    width: 250px;
    background-color: var(--darker-bg);
    border-right: 1px solid rgba(255, 255, 255, 0.05);
    height: calc(100vh - 70px);
    position: sticky;
    top: 70px;
    overflow-y: auto;
    transition: all 0.3s ease;
}

.sidebar-header {
    padding: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.sidebar-header h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
    display: flex;
    align-items: center;
}

.sidebar-header h3 i {
    margin-right: 0.5rem;
    color: var(--accent-blue);
}

.sidebar-search {
    padding: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.search-box {
    display: flex;
    position: relative;
}

.search-box input {
    flex: 1;
    padding: 0.75rem 1rem;
    border-radius: 4px 0 0 4px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background-color: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    font-size: 0.9rem;
    outline: none;
}

.search-box input:focus {
    border-color: var(--accent-blue);
}

.search-box button {
    padding: 0.75rem 1rem;
    background: var(--gradient-blue);
    border: none;
    border-radius: 0 4px 4px 0;
    color: white;
    cursor: pointer;
}

/* Desktop Search Bar */
.desktop-search {
    margin-bottom: 1rem;
    width: 100%;
    max-width: 100%;
}

.desktop-search .search-box {
    max-width: 100%;
}

.sidebar-nav {
    padding: 1rem 0;
}

.sidebar-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-menu li {
    padding: 0;
    margin: 0;
}

.sidebar-menu li a {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
}

.sidebar-menu li a i {
    margin-right: 0.75rem;
    width: 20px;
    text-align: center;
}

.sidebar-menu li a:hover {
    background-color: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
}

.sidebar-menu li.active a {
    background-color: rgba(25, 118, 210, 0.1);
    color: var(--accent-blue);
    border-left-color: var(--primary-blue);
}

.sidebar-footer {
    padding: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    position: sticky;
    bottom: 0;
    background-color: var(--darker-bg);
}

/* Mobile Navigation */
.mobile-explorer-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: var(--darker-bg);
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.3);
    z-index: 100;
}

.mobile-search {
    padding: 0.75rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.mobile-tabs {
    display: flex;
    justify-content: space-around;
    padding: 0.5rem 0;
}

.tab-button {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0.5rem;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 0.75rem;
    cursor: pointer;
}

.tab-button i {
    font-size: 1.25rem;
    margin-bottom: 0.25rem;
}

.tab-button.active {
    color: var(--accent-blue);
}

/* Main Content Area */
.explorer-content {
    flex: 1;
    padding: 2rem;
    overflow-x: hidden;
}

.content-section {
    margin-bottom: 2rem;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.section-header h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
    display: flex;
    align-items: center;
}

.section-header h2 i {
    margin-right: 0.75rem;
    color: var(--accent-blue);
}

.refresh-btn {
    display: flex;
    align-items: center;
    padding: 0.5rem 1rem;
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.3s ease;
}

.refresh-btn:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.refresh-btn i {
    margin-right: 0.5rem;
}

/* Tab Content */
.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* Cards */
.card {
    background-color: var(--card-bg);
    border-radius: 8px;
    box-shadow: var(--box-shadow);
    border: 1px solid rgba(255, 255, 255, 0.05);
    overflow: hidden;
    margin-bottom: 2rem;
}

.card-header {
    padding: 1rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.card-header h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
    display: flex;
    align-items: center;
}

.card-header h3 i {
    margin-right: 0.75rem;
    color: var(--accent-blue);
}

.view-all-link {
    color: var(--accent-blue);
    font-size: 0.9rem;
    font-weight: 500;
}

.card-body {
    padding: 1.5rem;
}

.card-body.p-0 {
    padding: 0;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stats-card {
    background-color: rgba(15, 35, 60, 0.5);
    border-radius: 8px;
    box-shadow: var(--box-shadow);
    padding: 1.5rem;
    display: flex;
    align-items: center;
    transition: transform 0.3s ease, background-color 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.stats-card:hover {
    transform: translateY(-5px);
    background-color: var(--card-hover);
}

.stats-icon {
    width: 50px;
    height: 50px;
    background: var(--gradient-blue);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1rem;
}

.stats-icon i {
    font-size: 1.5rem;
    color: white;
}

.stats-info {
    flex: 1;
}

.stats-info h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.stats-info p {
    color: var(--text-secondary);
    margin: 0;
    font-size: 0.9rem;
}

/* Recent Data Grid */
.recent-data-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
}

/* Data Tables */
.data-table-container {
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    color: var(--text-primary);
}

.data-table thead tr {
    background-color: rgba(0, 0, 0, 0.2);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.data-table th {
    padding: 1rem;
    font-weight: 600;
    text-align: left;
    color: var(--text-secondary);
    font-size: 0.9rem;
    white-space: nowrap;
}

.data-table td {
    padding: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 0.9rem;
}

.data-table tbody tr:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

.data-table tbody tr:last-child td {
    border-bottom: none;
}

.loading-cell {
    text-align: center;
    padding: 2rem !important;
}

.loading-spinner {
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    border-top-color: var(--accent-blue);
    animation: spin 1s linear infinite;
}

.loading-spinner.centered {
    margin: 2rem auto;
    display: block;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Pagination Controls */
.pagination-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.pagination-controls button {
    padding: 0.5rem 1rem;
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.3s ease;
    margin: 0 0.5rem;
}

.pagination-controls button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination-controls button:not(:disabled):hover {
    background-color: var(--primary-blue);
}

.pagination-controls span {
    color: var(--text-secondary);
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1000;
}

.modal.show {
    display: block;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
}

.modal-container {
    position: relative;
    max-width: 800px;
    width: 90%;
    background-color: var(--card-bg);
    border-radius: 8px;
    box-shadow: var(--box-shadow);
    margin: 5vh auto;
    max-height: 90vh;
    overflow-y: auto;
    z-index: 1001;
    animation: modalFadeIn 0.3s ease;
}

@keyframes modalFadeIn {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

.modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0;
    display: flex;
    align-items: center;
}

.modal-header h3 i {
    margin-right: 0.75rem;
    color: var(--accent-blue);
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.25rem;
    cursor: pointer;
    transition: color 0.3s ease;
}

.modal-close:hover {
    color: var(--text-primary);
}

.modal-body {
    padding: 1.5rem;
}

/* Old Paper Modal Styles - Authentic Brown Document */
.royal-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(3px);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    animation: fadeInOverlay 0.6s ease-out;
}

.royal-modal-overlay.show {
    display: flex;
}

.royal-modal {
    position: relative;
    max-width: 500px;
    max-height: 80vh;
    width: 85%;
    margin: 2rem;
    animation: revealPaper 1.2s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.5s both;
    filter: drop-shadow(0 10px 25px rgba(0, 0, 0, 0.8));
}

.royal-letter {
    background: 
        /* Pure brown paper texture */
        radial-gradient(circle at 25% 15%, rgba(101, 67, 33, 0.12) 0%, transparent 25%),
        radial-gradient(circle at 75% 65%, rgba(83, 53, 27, 0.08) 0%, transparent 30%),
        radial-gradient(circle at 15% 85%, rgba(92, 51, 23, 0.06) 0%, transparent 20%),
        /* Main authentic brown background */
        linear-gradient(145deg, #D2B48C, #C8A882, #BFA76F);
    border: none;
    border-radius: 0;
    box-shadow: 
        0 0 0 2px #8B4513,
        0 15px 30px rgba(0, 0, 0, 0.5),
        inset 0 0 30px rgba(101, 67, 33, 0.15);
    overflow: hidden;
    position: relative;
    max-height: 80vh;
    overflow-y: auto;
    transform: rotate(0deg);
}

/* Authentic paper aging effects */
.royal-letter::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        /* Aged spots */
        radial-gradient(circle at 20% 30%, rgba(101, 67, 33, 0.15) 0%, transparent 15%),
        radial-gradient(circle at 80% 70%, rgba(83, 53, 27, 0.12) 0%, transparent 18%),
        radial-gradient(circle at 40% 85%, rgba(92, 51, 23, 0.08) 0%, transparent 12%),
        /* Paper grain */
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 24px,
            rgba(101, 67, 33, 0.04) 25px
        );
    pointer-events: none;
    opacity: 0.8;
}

/* Small coffee stain effect */
.royal-letter::after {
    content: '';
    position: absolute;
    top: 20px;
    right: 25px;
    width: 35px;
    height: 35px;
    background: radial-gradient(circle, rgba(92, 51, 23, 0.2) 0%, transparent 60%);
    border-radius: 50%;
    pointer-events: none;
}

.close-letter {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(101, 67, 33, 0.25);
    border: 2px solid #654321;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    color: #654321;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    font-size: 1rem;
    z-index: 10;
}

.close-letter:hover {
    background: rgba(101, 67, 33, 0.35);
    transform: rotate(90deg);
    box-shadow: 0 0 8px rgba(101, 67, 33, 0.4);
}

.letter-content {
    padding: 2.5rem 2rem 1.5rem 2rem;
    color: #1A0F08;
    font-family: 'Crimson Text', 'Georgia', serif;
    font-size: 1rem;
    line-height: 1.7;
    min-height: 150px;
    max-height: 70vh;
    overflow-y: auto;
    position: relative;
}

/* Title styling */
.letter-content .document-title {
    text-align: center;
    font-family: 'Cinzel', 'Georgia', serif;
    font-size: 1.6rem;
    font-weight: 600;
    color: #1A0F08;
    margin-bottom: 1.8rem;
    text-decoration: underline;
    text-decoration-color: #654321;
    text-underline-offset: 6px;
    letter-spacing: 0.8px;
}

/* Simple paragraph text styling */
.letter-content p {
    margin-bottom: 1rem;
    text-indent: 1.5rem;
    text-align: justify;
    font-size: 0.95rem;
}

.letter-content .info-line {
    margin-bottom: 0.7rem;
    padding-left: 0.8rem;
}

.letter-content .label {
    font-weight: 600;
    color: #1A0F08;
    display: inline;
}

.letter-content .value {
    color: #1A0F08;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    display: inline;
    margin-left: 0.4rem;
}

.letter-content .hash-value {
    word-break: break-all;
    font-family: 'Courier New', monospace;
    font-size: 0.8rem;
    line-height: 1.3;
    background: rgba(101, 67, 33, 0.12);
    padding: 0.25rem 0.4rem;
    border-radius: 2px;
    margin: 0.25rem 0;
    display: block;
    border-left: 3px solid #654321;
}

.letter-content .amount-positive {
    color: #2D4A2D;
    font-weight: 600;
}

.letter-content .amount-negative {
    color: #7A2D2D;
    font-weight: 600;
}

.letter-content .section-break {
    margin: 1.5rem 0 1rem 0;
    text-align: center;
    color: #654321;
}

.letter-content .section-break::before,
.letter-content .section-break::after {
    content: "◆ ◆";
    color: #654321;
    opacity: 0.7;
}

/* Transaction entries */
.letter-content .transaction-entry {
    margin: 1.2rem 0;
    padding: 0.8rem;
    background: rgba(101, 67, 33, 0.06);
    border-left: 3px solid #654321;
    border-radius: 0 3px 3px 0;
}

.letter-content .transaction-entry p {
    text-indent: 0;
    margin-bottom: 0.4rem;
    font-size: 0.9rem;
}

/* Signature area */
.letter-signature {
    padding: 1rem 2rem;
    text-align: right;
    border-top: 2px solid rgba(101, 67, 33, 0.4);
    background: rgba(101, 67, 33, 0.03);
}

.signature-line {
    color: #654321;
    font-style: italic;
    font-family: 'Crimson Text', 'Georgia', serif;
    font-size: 0.9rem;
    margin-top: 0.8rem;
}

.signature-line::before {
    content: "— ";
    margin-right: 0.4rem;
}

/* Animations */
@keyframes fadeInOverlay {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes revealPaper {
    0% {
        clip-path: inset(50% 0 50% 0);
        opacity: 0;
        transform: scale(0.8);
    }
    50% {
        clip-path: inset(25% 0 25% 0);
        opacity: 0.7;
        transform: scale(0.95);
    }
    100% {
        clip-path: inset(0% 0 0% 0);
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes unfoldPaper {
    0% {
        transform: scale(0.1) rotate(45deg);
        opacity: 0;
    }
    50% {
        transform: scale(0.7) rotate(-2deg);
        opacity: 0.8;
    }
    100% {
        transform: scale(1) rotate(-0.5deg);
        opacity: 1;
    }
}

/* Responsive Design for Old Paper Modal */
@media (max-width: 768px) {
    .royal-modal {
        width: 95%;
        margin: 0.5rem;
    }
    
    .letter-content {
        padding: 2rem 1.5rem 1.5rem 1.5rem;
        font-size: 1rem;
    }
    
    .letter-content .document-title {
        font-size: 1.5rem;
    }
    
    .close-letter {
        width: 30px;
        height: 30px;
        font-size: 1rem;
        top: 10px;
        right: 10px;
    }
    
    .letter-content .hash-value {
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .letter-content {
        padding: 1.5rem 1rem;
        font-size: 0.95rem;
    }
    
    .letter-content .document-title {
        font-size: 1.3rem;
        margin-bottom: 1.5rem;
    }
    
    .letter-content p {
        text-indent: 1rem;
    }
}

/* Loading state for modal */
.royal-modal .loading {
    text-align: center;
    padding: 4rem 3rem;
}

.royal-modal .loading .spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(139, 69, 19, 0.2);
    border-left: 3px solid #8B4513;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1.5rem;
}

.royal-modal .loading p {
    color: #2C1810;
    font-family: 'Crimson Text', 'Georgia', serif;
    font-style: italic;
    margin-bottom: 0.5rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Footer Styles */
.footer {
    background-color: var(--darker-bg);
    padding: 3rem 0 1.5rem;
    margin-top: 3rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.footer-logo {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
}

.footer-logo img {
    height: 30px;
    width: auto;
    margin-right: 0.5rem;
}

.footer-logo span {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--accent-blue);
}

.footer-section p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.footer-section h4 {
    color: var(--text-primary);
    font-size: 1.1rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.footer-section ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section ul li a {
    color: var(--text-secondary);
    transition: color 0.3s ease;
    font-size: 0.9rem;
}

.footer-section ul li a:hover {
    color: var(--accent-blue);
}

.footer-bottom {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    text-align: center;
}

.footer-bottom p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin: 0;
}

/* Responsive Styles */
@media (max-width: 1200px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 992px) {
    .explorer-sidebar {
        display: none;
    }

    .mobile-explorer-nav {
        display: block;
    }

    .explorer-content {
        padding: 1.5rem;
    }

    .recent-data-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    #main-nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: var(--darker-bg);
        padding: 1rem 0;
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
    }

    #main-nav.show {
        display: block;
    }

    #main-nav ul {
        flex-direction: column;
    }

    #main-nav li {
        margin: 0;
    }

    #main-nav .nav-link {
        padding: 0.75rem 1.5rem;
    }

    .mobile-menu-toggle {
        display: block;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .modal-container {
        width: 95%;
        margin: 3vh auto;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

/* Desktop/Mobile visibility classes */
.desktop-only {
    display: block;
}

.mobile-only {
    display: none;
}

@media (max-width: 992px) {
    .desktop-only {
        display: none;
    }
    
    .mobile-only {
        display: block;
    }
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.15);
}

.card-header {
    background: rgba(13, 71, 161, 0.1);
    border-bottom: 1px solid var(--border-color);
    border-radius: 12px 12px 0 0 !important;
    font-weight: 600;
}

/* Statistics Cards */
.stats-card {
    transition: all 0.3s ease;
}

.stats-card:hover {
    transform: scale(1.05);
}

.stats-card h3 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.stats-card p {
    font-size: 0.9rem;
    color: #6c757d;
    font-weight: 500;
}

/* Search */
#searchInput {
    border-radius: 8px;
    border: 2px solid var(--border-color);
    padding: 12px 16px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

#searchInput:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(13, 71, 161, 0.25);
}

#searchBtn {
    border-radius: 8px;
    padding: 12px 16px;
    font-weight: 600;
    transition: all 0.3s ease;
}

#searchBtn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

/* List Groups */
.list-group-item {
    border: none;
    border-bottom: 1px solid var(--border-color);
    padding: 1rem;
    transition: all 0.3s ease;
}

.list-group-item:hover {
    background-color: rgba(13, 71, 161, 0.05);
    transform: translateX(4px);
}

.list-group-item:last-child {
    border-bottom: none;
}

/* Block and Transaction Items */
.block-item, .transaction-item {
    cursor: pointer;
}

.block-number {
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.85rem;
    display: inline-block;
    min-width: 60px;
    text-align: center;
}

.tx-hash, .block-hash {
    font-family: 'Courier New', monospace;
    font-size: 0.85rem;
    color: var(--info-color);
    word-break: break-all;
}

.tx-type {
    background: var(--success-color);
    color: white;
    padding: 0.2rem 0.5rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.tx-type.coinbase {
    background: var(--warning-color);
}

.tx-type.token {
    background: var(--info-color);
}

.tx-type.transfer_token {
    background: var(--secondary-color);
}

.amount {
    color: var(--success-color);
    font-weight: 600;
}

.fee {
    color: var(--warning-color);
    font-size: 0.85rem;
}

.timestamp {
    color: #6c757d;
    font-size: 0.85rem;
}

.address {
    font-family: 'Courier New', monospace;
    font-size: 0.85rem;
    color: var(--dark-color);
    word-break: break-all;
}

/* Search Results */
.search-result-item {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
    background: white;
    transition: all 0.3s ease;
}

.search-result-item:hover {
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.search-result-type {
    background: var(--primary-color);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    display: inline-block;
    margin-bottom: 0.5rem;
}

/* Modal Enhancements */
.modal-content {
    border: none;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.modal-header {
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    color: white;
    border-radius: 12px 12px 0 0;
}

.modal-header .btn-close {
    filter: invert(1);
}

/* Tables */
.table {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 0;
}

.table th {
    background: rgba(13, 71, 161, 0.1);
    border: none;
    font-weight: 600;
    padding: 1rem;
}

.table td {
    border: none;
    padding: 1rem;
    vertical-align: middle;
}

.table tbody tr:nth-child(even) {
    background: rgba(0, 0, 0, 0.02);
}

.table tbody tr:hover {
    background: rgba(13, 71, 161, 0.05);
}

/* Buttons */
.btn {
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
}

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

.btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
}

/* Responsive */
@media (max-width: 768px) {
    .stats-card h3 {
        font-size: 2rem;
    }
    
    .tx-hash, .block-hash, .address {
        font-size: 0.75rem;
    }
    
    .container-fluid {
        padding: 0 15px;
    }
}

/* Loading States */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.spinner-border-sm {
    width: 1rem;
    height: 1rem;
}

/* Error States */
.error-message {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    border-radius: 8px;
    padding: 1rem;
    margin: 1rem 0;
}

.success-message {
    background: #d1edff;
    color: #155724;
    border: 1px solid #c3e6cb;
    border-radius: 8px;
    padding: 1rem;
    margin: 1rem 0;
}

/* Animation Classes */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.slide-in {
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from { transform: translateX(-20px); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

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

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--secondary-color);
}

/* Explorer List Styles */
.explorer-list {
    padding: 0;
}

.item-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.loading-item {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    color: #8B4513;
    font-family: 'Crimson Text', serif;
}

.loading-item .loading-spinner {
    margin-right: 0.75rem;
}

.explorer-item {
    background: linear-gradient(135deg, #F5E6D3, #E8D5B7);
    border: 2px solid #8B4513;
    border-radius: 8px;
    margin-bottom: 1rem;
    padding: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Crimson Text', serif;
    position: relative;
    box-shadow: 2px 4px 8px rgba(139, 69, 19, 0.2);
}

.explorer-item:hover {
    background: linear-gradient(135deg, #F0E0CC, #DCC8A8);
    border-color: #A0522D;
    transform: translateY(-2px);
    box-shadow: 4px 8px 16px rgba(139, 69, 19, 0.3);
}

.explorer-item:active {
    transform: translateY(0);
    box-shadow: 2px 4px 8px rgba(139, 69, 19, 0.2);
}

.item-title {
    font-family: 'Cinzel', serif;
    font-size: 1.25rem;
    font-weight: 600;
    color: #4A2C2A;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.item-subtitle {
    font-size: 0.95rem;
    color: #8B4513;
    margin-bottom: 0.25rem;
    font-style: italic;
}

.item-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 0.75rem;
    font-size: 0.9rem;
    color: #6B4423;
}

.item-icon {
    margin-right: 0.5rem;
    color: #8B4513;
}

.item-chevron {
    color: #8B4513;
    font-size: 1.2rem;
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.explorer-item:hover .item-chevron {
    opacity: 1;
}

/* Block and Transaction specific styles */
.block-item .item-title {
    color: #2E4057;
}

.block-item:hover {
    background: linear-gradient(135deg, #E6F2FF, #CCE7FF);
    border-color: #4A90E2;
}

.transaction-item .item-title {
    color: #4A5D23;
}

.transaction-item:hover {
    background: linear-gradient(135deg, #F0F8E6, #E6F2CC);
    border-color: #7BA428;
}

/* Empty state */
.empty-item {
    text-align: center;
    padding: 2rem;
    color: #8B4513;
    font-style: italic;
    background: linear-gradient(135deg, #F5E6D3, #E8D5B7);
    border: 2px dashed #8B4513;
    border-radius: 8px;
}

.error-item {
    text-align: center;
    padding: 2rem;
    color: #8B2635;
    background: linear-gradient(135deg, #FFF0F0, #FFE6E6);
    border: 2px solid #8B2635;
    border-radius: 8px;
}

/* Rich List specific styles */
.rich-list-item .item-title {
    color: #B8860B; /* Dark golden rod for ranking */
}

.rich-list-item:hover {
    background: linear-gradient(135deg, #FFF8DC, #F5DEB3); /* Cornsilk to wheat gradient */
    border-color: #DAA520; /* Golden rod border */
}

.rich-list-item .item-meta {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.rich-list-item .item-meta span {
    font-size: 0.85rem;
    min-width: fit-content;
}

/* Rank specific styling */
.rich-list-item .item-title .item-icon {
    color: #DAA520; /* Golden rod for trophy icon */
}

/* Balance highlighting for top addresses */
.rich-list-item:nth-child(1) .item-title {
    color: #FFD700; /* Gold for #1 */
}

.rich-list-item:nth-child(2) .item-title {
    color: #C0C0C0; /* Silver for #2 */
}

.rich-list-item:nth-child(3) .item-title {
    color: #CD7F32; /* Bronze for #3 */
}

.rich-list-item:nth-child(1) .item-icon {
    color: #FFD700; /* Gold trophy */
}

.rich-list-item:nth-child(2) .item-icon {
    color: #C0C0C0; /* Silver trophy */
}

.rich-list-item:nth-child(3) .item-icon {
    color: #CD7F32; /* Bronze trophy */
}

/* Responsive layout for rich list */
@media (max-width: 768px) {
    .rich-list-item .item-meta {
        flex-direction: column;
        gap: 0.25rem;
    }
    
    .rich-list-item .item-meta span {
        font-size: 0.8rem;
    }
}
