/*
 * pyAEKnow - Unified Stylesheet
 * Generated from template files
 */

/* ========== CSS VARIABLES ========== */
:root {
    --ae-primary: #f7296e;
    --ae-secondary: #311b58;
    --ae-dark: #1a0a2e;
    --ae-light: #f8f9fa;
}

/* ========== BASE STYLES ========== */

:root {
    --ae-primary: #f7296e;
    --ae-secondary: #311b58;
    --ae-dark: #1a0a2e;
    --ae-light: #f8f9fa;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
    background-color: #f4f6f9;
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.5rem;
}

.navbar-brand span {
    color: var(--ae-primary);
}

.bg-ae-primary {
    background-color: var(--ae-primary) !important;
}

.bg-ae-secondary {
    background-color: var(--ae-secondary) !important;
}

.bg-ae-dark {
    background-color: var(--ae-dark) !important;
}

.text-ae-primary {
    color: var(--ae-primary) !important;
}

.btn-ae {
    background-color: var(--ae-primary);
    border-color: var(--ae-primary);
    color: white;
}

.btn-ae:hover {
    background-color: #d91e5c;
    border-color: #d91e5c;
    color: white;
}

.sidebar {
    min-height: calc(100vh - 56px);
    background-color: var(--ae-secondary);
}

.sidebar .nav-link {
    color: rgba(255,255,255,0.8);
    padding: 0.75rem 1rem;
    border-radius: 0.25rem;
    margin: 2px 0;
}

.sidebar .nav-link:hover {
    background-color: rgba(255,255,255,0.1);
    color: white;
}

.sidebar .nav-link.active {
    background-color: var(--ae-primary);
    color: white;
}

.sidebar .nav-link i {
    width: 24px;
}

.content-wrapper {
    min-height: calc(100vh - 56px);
}

.card {
    border: none;
    box-shadow: 0 0 10px rgba(0,0,0,0.08);
    border-radius: 0.5rem;
}

.card-header {
    background-color: white;
    border-bottom: 1px solid #eee;
    font-weight: 500;
}

.table th {
    border-top: none;
    font-weight: 500;
    font-size: 0.85rem;
    text-transform: uppercase;
}

.hash-link {    
    font-size: 0.9rem;
}

.hash-link:hover {
    text-decoration: underline;
}

.info-box {
    background: linear-gradient(135deg, var(--ae-primary) 0%, var(--ae-secondary) 100%);
    border-radius: 0.5rem;
    padding: 1.5rem;
    color: white;
}

.info-box .info-box-icon {
    font-size: 2.5rem;
    opacity: 0.8;
}

.info-box .info-box-number {
    font-size: 1.75rem;
    font-weight: 700;
}

.info-box .info-box-text {
    font-size: 0.85rem;
    opacity: 0.9;
}

.badge-tx-type {
    font-size: 0.75rem;
    font-weight: 500;
}

.search-box {
    max-width: 600px;
    margin: 0 auto;
}

.search-box .form-control {
    border-radius: 2rem 0 0 2rem;
    padding: 0.75rem 1.5rem;
    border: 2px solid #eee;
}

.search-box .btn {
    border-radius: 0 2rem 2rem 0;
    padding: 0.75rem 1.5rem;
}

.pagination .page-link {
    color: var(--ae-primary);
}

.pagination .page-item.active .page-link {
    background-color: var(--ae-primary);
    border-color: var(--ae-primary);
}

.footer {
    background-color: var(--ae-dark);
    color: rgba(255,255,255,0.7);
    padding: 2rem 0;
}

.footer a {
    color: rgba(255,255,255,0.7);
}

.footer a:hover {
    color: white;
}

@media (max-width: 991.98px) {
    .sidebar {
        min-height: auto;
    }
}

/* Offcanvas Sidebar Styles */
.offcanvas .list-group-item-action {
    transition: background-color 0.2s, padding-left 0.2s;
}

.offcanvas .list-group-item-action:hover {
    background-color: rgba(247, 41, 110, 0.2) !important;
    padding-left: 1.5rem;
}

.offcanvas .list-group-item-action.active {
    background-color: rgba(247, 41, 110, 0.3) !important;
    border-left: 3px solid #f7296e;
}

/* Fixed Sidebar Layout */
body {
    display: flex;
    min-height: 100vh;
    flex-direction: column;
}

.app-wrapper {
    display: flex;
    flex: 1;
}

.sidebar-fixed {
    width: 250px;
    min-height: 100vh;
    background: linear-gradient(180deg, #311b58 0%, #1a0a2e 100%);
    position: fixed;
    top: 56px; /* navbar height */
    left: 0;
    bottom: 0;
    overflow-y: auto;
    transition: all 0.3s;
    z-index: 1000;
}

.sidebar-fixed.collapsed {
    width: 60px;
}

.sidebar-fixed.collapsed .sidebar-text,
.sidebar-fixed.collapsed .badge,
.sidebar-fixed.collapsed .section-title-text {
    display: none;
}

.sidebar-fixed.collapsed .list-group-item {
    text-align: center;
    padding-left: 0;
    padding-right: 0;
}

.main-content {
    flex: 1;
    margin-left: 250px;
    transition: margin-left 0.3s;
}

.main-content.expanded {
    margin-left: 60px;
}

.sidebar-toggle-btn {
    position: fixed;
    top: 62px;
    left: 250px;
    z-index: 1001;
    background: #f7296e;
    border: none;
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 0 5px 5px 0;
    cursor: pointer;
    transition: left 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sidebar-toggle-btn.collapsed {
    left: 60px;
}

.sidebar-toggle-btn:hover {
    background: #d91e5c;
}

/* Scrollbar styling for sidebar */
.sidebar-fixed::-webkit-scrollbar {
    width: 6px;
}

.sidebar-fixed::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
}

.sidebar-fixed::-webkit-scrollbar-thumb {
    background: rgba(247, 41, 110, 0.5);
    border-radius: 3px;
}

.sidebar-fixed::-webkit-scrollbar-thumb:hover {
    background: rgba(247, 41, 110, 0.8);
}

@media (max-width: 768px) {
    .sidebar-fixed {
        transform: translateX(-100%);
    }
    
    .sidebar-fixed.mobile-open {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0 !important;
    }
    
    .sidebar-toggle-btn {
        left: 10px;
        top: 62px;
        border-radius: 5px;
    }
}
    

/* ========== BLOCKS PAGE ========== */

/* 紧凑明亮的统计区域 */
.blocks-hero {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 1px solid #dee2e6;
    border-radius: 12px;
    padding: 1rem 1.5rem;
    margin-bottom: 1rem;
}

.hero-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
}

.quote-section {
    flex: 1;
    min-width: 200px;
}

.quote-text {
    font-style: italic;
    color: #495057;
    font-size: 0.95rem;
    margin: 0;
}

.quote-author {
    color: #6c757d;
    font-size: 0.8rem;
}

.stats-row {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.stat-item {
    text-align: center;
    padding: 0.5rem 1rem;
    background: white;
    border-radius: 8px;
    border: 1px solid #e9ecef;
    min-width: 120px;
}

.stat-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: #f76707;
}

.stat-label {
    font-size: 0.75rem;
    color: #868e96;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* 表格美化 */
.blocks-table thead {
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
}

.blocks-table thead th {
    color: white;
    font-weight: 600;
    padding: 0.75rem 1rem;
    border: none;
}

/* 分页信息 */
.pagination-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
    padding: 0.75rem 1rem;
}

.page-stats {
    color: #6c757d;
    font-size: 0.85rem;
}

.page-jump {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.page-jump input {
    width: 70px;
    text-align: center;
}



/* Table Header Styles - High Specificity */
.table-responsive .table thead,
.card-body .table thead,
table.table thead {
    background: linear-gradient(90deg, #311b58 0%, #1a0a2e 100%) !important;
}

.table-responsive .table thead th,
.card-body .table thead th,
table.table thead th {
    color: #ffffff !important;
    font-weight: 600 !important;
    border-bottom: none !important;
    padding: 12px 16px !important;
    background: transparent !important;
}
