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

:root {
    --bg-primary: #1a1a2e;
    --bg-secondary: #16213e;
    --bg-card: #1f2940;
    --bg-card-alt: #253354;
    --text-primary: #ffffff;
    --text-secondary: #8892b0;
    --text-muted: #5a6785;
    --accent-purple: #5865F2;
    --accent-green: #00D4AA;
    --accent-blue: #3498db;
    --accent-orange: #f39c12;
    --accent-red: #e74c3c;
    --accent-yellow: #f1c40f;
    --border-color: #2d3a5a;
    --nav-height: 60px;
    --header-height: 100px;
}

html, body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
}

body {
    padding-bottom: var(--nav-height);
}

.header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
}

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

.logo-icon {
    flex-shrink: 0;
}

.logo-text {
    display: flex;
    flex-direction: column;
}

.logo-name {
    font-size: 18px;
    font-weight: 700;
    background: linear-gradient(135deg, var(--accent-purple), var(--accent-green));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.logo-subtitle {
    font-size: 10px;
    color: var(--text-muted);
}

.header-actions {
    display: flex;
    gap: 8px;
}

.icon-btn {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    border: none;
    background: var(--bg-card);
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.icon-btn:hover {
    background: var(--bg-card-alt);
    color: var(--text-primary);
}

.network-stats-bar {
    display: flex;
    justify-content: space-around;
    padding: 8px 16px 12px;
    gap: 8px;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.stat-label {
    font-size: 10px;
    color: var(--text-muted);
}

.stat-value {
    font-size: 12px;
    color: var(--text-primary);
    font-weight: 500;
}

.main-content {
    padding: 16px;
    min-height: calc(100vh - var(--header-height) - var(--nav-height));
}

.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: var(--nav-height);
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-around;
    align-items: center;
    z-index: 100;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    text-decoration: none;
    color: var(--text-muted);
    font-size: 10px;
    padding: 8px 12px;
    transition: all 0.2s;
}

.nav-item i {
    font-size: 18px;
}

.nav-item.active {
    color: var(--accent-purple);
}

.nav-item:hover {
    color: var(--text-primary);
}

.page-section {
    margin-bottom: 24px;
}

.section-title {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.section-title i {
    color: var(--accent-purple);
}

.card {
    background: var(--bg-card);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 12px;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.card-title {
    font-size: 12px;
    color: var(--text-muted);
}

.card-value {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
}

.card-subtitle {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 4px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.stats-grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

.stat-card {
    background: var(--bg-card);
    border-radius: 10px;
    padding: 14px;
    text-align: center;
}

.stat-card-title {
    font-size: 11px;
    color: var(--text-muted);
    margin-bottom: 6px;
}

.stat-card-value {
    font-size: 18px;
    font-weight: 700;
}

.stat-card-sub {
    font-size: 10px;
    color: var(--text-secondary);
    margin-top: 4px;
}

.change-positive {
    color: var(--accent-green);
}

.change-negative {
    color: var(--accent-red);
}

.chart-container {
    background: var(--bg-card);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 12px;
}

.chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.chart-title {
    font-size: 14px;
    font-weight: 600;
}

.chart-tabs {
    display: flex;
    gap: 8px;
}

.chart-tab {
    padding: 4px 10px;
    font-size: 11px;
    border-radius: 4px;
    background: transparent;
    color: var(--text-muted);
    border: none;
    cursor: pointer;
    transition: all 0.2s;
}

.chart-tab.active {
    background: var(--accent-purple);
    color: white;
}

.chart-wrapper {
    height: 200px;
    position: relative;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th,
.data-table td {
    padding: 10px 8px;
    text-align: left;
    font-size: 12px;
    border-bottom: 1px solid var(--border-color);
}

.data-table th {
    color: var(--text-muted);
    font-weight: 500;
}

.data-table td {
    color: var(--text-primary);
}

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

.rank-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 6px;
    background: var(--bg-card-alt);
    font-size: 11px;
    font-weight: 600;
}

.list-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
}

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

.list-item-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.list-item-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: var(--bg-card-alt);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-purple);
}

.list-item-info h4 {
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 2px;
}

.list-item-info p {
    font-size: 11px;
    color: var(--text-muted);
}

.list-item-value {
    text-align: right;
}

.list-item-value h4 {
    font-size: 13px;
    font-weight: 600;
}

.list-item-value p {
    font-size: 11px;
    color: var(--text-muted);
}

.progress-bar {
    height: 6px;
    background: var(--bg-card-alt);
    border-radius: 3px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.3s ease;
}

.donut-chart-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
}

.donut-legend {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
}

.legend-color {
    width: 12px;
    height: 12px;
    border-radius: 3px;
}

.mempool-blocks {
    display: flex;
    overflow-x: auto;
    gap: 4px;
    padding: 10px 0;
    -webkit-overflow-scrolling: touch;
}

.mempool-block {
    min-width: 60px;
    height: 80px;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    color: white;
    text-align: center;
    flex-shrink: 0;
}

.mempool-block-fee {
    font-weight: 700;
    font-size: 12px;
}

.mempool-block-size {
    opacity: 0.8;
    margin-top: 4px;
}

.fee-range {
    display: flex;
    justify-content: space-between;
    margin-top: 8px;
    font-size: 11px;
    color: var(--text-muted);
}

.network-map {
    background: var(--bg-card);
    border-radius: 12px;
    padding: 16px;
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.network-node {
    position: absolute;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent-purple);
    box-shadow: 0 0 10px var(--accent-purple);
}

.network-line {
    position: absolute;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent-blue), transparent);
    transform-origin: left center;
}

.tabs {
    display: flex;
    gap: 0;
    margin-bottom: 16px;
    background: var(--bg-card);
    border-radius: 8px;
    padding: 4px;
}

.tab {
    flex: 1;
    padding: 10px 16px;
    font-size: 12px;
    border: none;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.2s;
}

.tab.active {
    background: var(--accent-purple);
    color: white;
}

.footer {
    background: var(--bg-secondary);
    padding: 24px 16px;
    margin-top: 24px;
    border-top: 1px solid var(--border-color);
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.footer-links {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    margin-bottom: 24px;
}

.footer-section h4 {
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.footer-section a {
    display: block;
    font-size: 12px;
    color: var(--text-muted);
    text-decoration: none;
    margin-bottom: 8px;
    transition: color 0.2s;
}

.footer-section a:hover {
    color: var(--text-primary);
}

.social-links {
    display: flex;
    gap: 16px;
    justify-content: center;
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
}

.social-link {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--bg-card);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.2s;
}

.social-link:hover {
    background: var(--accent-purple);
    color: white;
}

.about-page {
    background: white;
    color: #333;
    min-height: 100vh;
    padding: 20px;
}

.about-page .section-title {
    color: #333;
}

.about-hero {
    text-align: center;
    padding: 40px 20px;
    background: linear-gradient(135deg, var(--accent-purple), var(--accent-blue));
    border-radius: 16px;
    margin-bottom: 24px;
}

.about-hero h1 {
    font-size: 28px;
    color: white;
    margin-bottom: 12px;
}

.about-hero p {
    color: rgba(255,255,255,0.9);
    font-size: 14px;
}

.contributors-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 12px;
    margin-top: 16px;
}

.contributor {
    width: 100%;
    aspect-ratio: 1;
    border-radius: 50%;
    background: var(--bg-card);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.sponsor-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: var(--bg-card);
    border-radius: 20px;
    font-size: 12px;
    margin: 4px;
}

.mining-pool-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px;
    background: var(--bg-card);
    border-radius: 8px;
    margin-bottom: 8px;
}

.pool-color {
    width: 16px;
    height: 16px;
    border-radius: 4px;
}

.pool-info {
    flex: 1;
}

.pool-name {
    font-size: 13px;
    font-weight: 500;
}

.pool-stats {
    font-size: 11px;
    color: var(--text-muted);
}

.pool-percentage {
    font-size: 14px;
    font-weight: 600;
}

.calendar-widget {
    background: var(--bg-card);
    border-radius: 12px;
    padding: 16px;
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.calendar-month {
    font-size: 16px;
    font-weight: 600;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
    text-align: center;
}

.calendar-day {
    padding: 8px 4px;
    font-size: 12px;
    border-radius: 6px;
}

.calendar-day.header {
    color: var(--text-muted);
    font-size: 10px;
}

.calendar-day.active {
    background: var(--accent-purple);
    color: white;
}

.calendar-day.today {
    border: 1px solid var(--accent-purple);
}

.hashrate-display {
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.hashrate-value {
    font-size: 28px;
    font-weight: 700;
}

.hashrate-unit {
    font-size: 14px;
    color: var(--text-muted);
}

.difficulty-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: var(--bg-card-alt);
    border-radius: 20px;
    font-size: 12px;
}

.block-visual {
    display: grid;
    grid-template-columns: repeat(10, 1fr);
    gap: 2px;
    padding: 16px;
    background: var(--bg-card);
    border-radius: 12px;
}

.mini-block {
    aspect-ratio: 1;
    border-radius: 4px;
}

.search-bar {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}

.search-input {
    flex: 1;
    padding: 12px 16px;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    background: var(--bg-card);
    color: var(--text-primary);
    font-size: 14px;
}

.search-input::placeholder {
    color: var(--text-muted);
}

.search-btn {
    padding: 12px 20px;
    border-radius: 10px;
    border: none;
    background: var(--accent-purple);
    color: white;
    font-size: 14px;
    cursor: pointer;
}

.tx-list-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: var(--bg-card);
    border-radius: 10px;
    margin-bottom: 8px;
}

.tx-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}

.tx-details {
    flex: 1;
}

.tx-hash {
    font-size: 12px;
    font-family: monospace;
    color: var(--accent-blue);
    margin-bottom: 4px;
}

.tx-info {
    font-size: 11px;
    color: var(--text-muted);
}

.tx-amount {
    text-align: right;
}

.tx-btc {
    font-size: 13px;
    font-weight: 600;
}

.tx-usd {
    font-size: 11px;
    color: var(--text-muted);
}

.goggles-banner {
    background: linear-gradient(135deg, #1a1a2e 0%, #2d1b4e 100%);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 16px;
    border: 1px solid var(--accent-purple);
}

.goggles-title {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.goggles-title h3 {
    font-size: 16px;
    background: linear-gradient(90deg, var(--accent-purple), var(--accent-green));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.goggles-desc {
    font-size: 12px;
    color: var(--text-secondary);
}

@media (max-width: 380px) {
    .nav-item span {
        font-size: 9px;
    }
    .nav-item i {
        font-size: 16px;
    }
    .stats-grid {
        grid-template-columns: 1fr;
    }
}

@media (min-width: 768px) {
    .stats-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    .main-content {
        max-width: 800px;
        margin: 0 auto;
    }
    .bottom-nav {
        max-width: 800px;
        left: 50%;
        transform: translateX(-50%);
        border-radius: 16px 16px 0 0;
    }
}

.nav-item i {
    font-size: 22px;
}

.world-map-container {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 50%;
    background: url('/attached_assets/5a3b6d2905331_1765418398348.jpg') center center / cover no-repeat;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
}

.world-map-svg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.world-map-svg path {
    fill: #1a2040;
    stroke: #2a3060;
    stroke-width: 0.5;
}

.map-nodes-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.map-lines-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.map-line-svg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.map-node {
    position: absolute;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 0 4px #fff, 0 0 8px #5865F2, 0 0 16px #5865F2, 0 0 24px rgba(88, 101, 242, 0.6);
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
    z-index: 10;
}

.map-node:hover {
    transform: scale(3);
    box-shadow: 0 0 8px #fff, 0 0 16px #00D4AA, 0 0 32px #00D4AA, 0 0 48px rgba(0, 212, 170, 0.8);
    background: #fff;
}

.map-node.large {
    width: 6px;
    height: 6px;
    background: #fff;
    box-shadow: 0 0 6px #fff, 0 0 12px #00D4AA, 0 0 24px #00D4AA, 0 0 36px rgba(0, 212, 170, 0.7);
}

.glow-line {
    stroke: url(#lineGradient);
    stroke-width: 0.3;
    fill: none;
    filter: url(#lineGlow);
    opacity: 0.6;
}

.glow-line.animated {
    stroke-dasharray: 200;
    stroke-dashoffset: 200;
    animation: drawLine 4s ease-in-out infinite;
}

@keyframes drawLine {
    0% { stroke-dashoffset: 200; opacity: 0.2; }
    50% { stroke-dashoffset: 0; opacity: 0.7; }
    100% { stroke-dashoffset: -200; opacity: 0.2; }
}

@keyframes nodeGlow {
    0%, 100% { 
        box-shadow: 0 0 4px #fff, 0 0 8px #5865F2, 0 0 12px rgba(88, 101, 242, 0.4);
        transform: scale(1);
    }
    50% { 
        box-shadow: 0 0 8px #fff, 0 0 16px #5865F2, 0 0 24px #5865F2, 0 0 32px rgba(88, 101, 242, 0.6);
        transform: scale(1.2);
    }
}

.map-node {
    animation: nodeGlow 2s ease-in-out infinite;
}

.map-node:nth-child(odd) {
    animation-delay: 0.5s;
}

.map-node:nth-child(3n) {
    animation-delay: 1s;
}

@keyframes pulseRing {
    0% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.8;
    }
    100% {
        transform: translate(-50%, -50%) scale(4);
        opacity: 0;
    }
}

.node-pulse {
    position: absolute;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    border: 1px solid rgba(88, 101, 242, 0.8);
    animation: pulseRing 2s ease-out infinite;
    pointer-events: none;
}

.world-map-page {
    padding: 0;
}

.world-map-full {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 50%;
    min-height: 300px;
    background: url('/attached_assets/5a3b6d2905331_1765418398348.jpg') center center / cover no-repeat;
    overflow: hidden;
}

.map-title {
    position: absolute;
    top: 16px;
    left: 16px;
    z-index: 20;
    font-size: 14px;
    color: var(--text-secondary);
}

.map-title small {
    display: block;
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 4px;
}

.back-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: var(--bg-card);
    border: none;
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 13px;
    cursor: pointer;
    margin-bottom: 16px;
    transition: background 0.2s;
}

.back-btn:hover {
    background: var(--bg-card-alt);
}

.node-detail-page {
    padding: 16px;
}

.node-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-color);
}

.node-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-purple), var(--accent-green));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: white;
}

.node-title h2 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 4px;
}

.node-title p {
    font-size: 11px;
    color: var(--text-muted);
    font-family: monospace;
    word-break: break-all;
}

.node-stats-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}

.node-stat-card {
    background: var(--bg-card);
    border-radius: 10px;
    padding: 14px;
}

.node-stat-label {
    font-size: 11px;
    color: var(--text-muted);
    margin-bottom: 6px;
}

.node-stat-value {
    font-size: 16px;
    font-weight: 600;
}

.node-stat-sub {
    font-size: 10px;
    color: var(--text-secondary);
    margin-top: 2px;
}

.node-location-map {
    height: 200px;
    background: var(--bg-card);
    border-radius: 12px;
    position: relative;
    overflow: hidden;
    margin-bottom: 20px;
}

.node-channels-section {
    margin-top: 20px;
}

.channel-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    background: var(--bg-card);
    border-radius: 8px;
    margin-bottom: 8px;
}

.channel-info h4 {
    font-size: 13px;
    margin-bottom: 4px;
}

.channel-info p {
    font-size: 11px;
    color: var(--text-muted);
}

.channel-capacity {
    text-align: right;
}

.channel-capacity h4 {
    font-size: 13px;
    font-weight: 600;
}

.channel-capacity p {
    font-size: 11px;
    color: var(--text-muted);
}

.fee-chart-container {
    background: var(--bg-card);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 20px;
}

.fee-chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.fee-chart-title {
    font-size: 14px;
    font-weight: 600;
}

.chart-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 200px;
    color: var(--text-muted);
}

.chart-loading i {
    animation: spin 1s linear infinite;
    margin-right: 8px;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}
