:root {
    --bg-main: #0b0d17;
    --sidebar-bg: #0d0f1a;
    --card-bg: #131625;
    --card-border: rgba(255, 255, 255, 0.05);
    --primary-gradient: linear-gradient(135deg, #818cf8 0%, #a855f7 100%);
    --secondary-gradient: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    --text-main: #ffffff;
    --text-muted: #94a3b8;
    --accent-purple: #a855f7;
    --success-green: #10b981;
    --danger-red: #ef4444;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
body { background-color: var(--bg-main); color: var(--text-main); font-family: 'Inter', sans-serif; display: flex; height: 100vh; overflow: hidden; }

/* Sidebar */
.sidebar { width: 240px; background: var(--sidebar-bg); border-right: 1px solid var(--card-border); display: flex; flex-direction: column; padding: 20px 0; }
.logo { display: flex; align-items: center; gap: 12px; font-weight: 800; font-size: 1.2rem; padding: 20px 25px; color: #fff; }
.logo i { color: var(--accent-purple); font-size: 1.4rem; }
.side-nav { flex: 1; }
.side-nav a { display: flex; align-items: center; gap: 15px; padding: 15px 25px; color: var(--text-muted); text-decoration: none; font-size: 0.9rem; font-weight: 500; }
.side-nav a.active { color: #fff; background: rgba(168, 85, 247, 0.1); border-left: 4px solid var(--accent-purple); }

/* Main Content */
.main-content { flex: 1; display: flex; flex-direction: column; overflow: hidden; }
.top-header { padding: 25px 40px; }
.search-container { background: var(--card-bg); border: 1px solid var(--card-border); padding: 10px 20px; border-radius: 12px; display: flex; align-items: center; gap: 15px; width: 450px; }
.search-container input { background: none; border: none; color: #fff; width: 100%; outline: none; }
.content-body { flex: 1; padding: 0 40px 20px; overflow-y: auto; }

/* Layout Grid */
.primary-layout { display: flex; gap: 25px; }
.primary-column { flex: 1; display: flex; flex-direction: column; gap: 25px; }
.secondary-column { width: 380px; }

/* Cards */
.stats-row { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 20px; }
.stat-card { background: var(--card-bg); border: 1px solid var(--card-border); padding: 25px; border-radius: 16px; min-height: 140px; display: flex; flex-direction: column; justify-content: space-between; }
.balance-card { background: var(--primary-gradient); border: none; box-shadow: 0 10px 30px rgba(168, 85, 247, 0.1); }
.card-label { font-size: 0.8rem; font-weight: 700; opacity: 0.8; }
.card-value { font-size: 1.8rem; font-weight: 800; }
.card-sub { font-size: 0.75rem; opacity: 0.6; }

.action-card { background: var(--card-bg); border: 1px solid var(--card-border); padding: 25px; border-radius: 16px; }
.action-card h3 { font-size: 0.9rem; margin-bottom: 20px; font-weight: 800; color: var(--text-muted); }

/* Transactions Tracking */
.tx-row { display: flex; align-items: center; padding: 20px 0; border-bottom: 1px solid var(--card-border); }
.tx-icon { width: 40px; height: 40px; background: rgba(255,255,255,0.03); border-radius: 50%; display: flex; align-items: center; justify-content: center; margin-right: 20px; }
.tx-icon.confirmed { color: var(--success-green); }
.tx-icon.pending { color: #f59e0b; }
.tx-info { flex: 1; min-width: 0; }
.tx-hash { font-family: 'JetBrains Mono', monospace; font-size: 0.85rem; font-weight: 700; color: #fff; display: block; margin-bottom: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tx-addr { color: var(--accent-purple); font-weight: 600; }
.tx-date { font-size: 0.75rem; color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; }
.conf-badge { color: var(--success-green); font-weight: 700; }

.tx-track-side { text-align: right; display: flex; flex-direction: column; gap: 5px; }
.tx-amount { font-weight: 800; font-size: 1.1rem; }
.tx-fee { font-size: 0.7rem; color: var(--text-muted); font-family: 'JetBrains Mono', monospace; }
.btn-track { background: rgba(129, 140, 248, 0.1); border: 1px solid rgba(129, 140, 248, 0.2); color: #818cf8; padding: 4px 12px; border-radius: 6px; font-size: 0.7rem; font-weight: 700; cursor: pointer; transition: 0.2s; align-self: flex-end; }
.btn-track:hover { background: #818cf8; color: #fff; }

.amount-plus { color: var(--success-green); }
.amount-minus { color: var(--danger-red); }

/* Bottom Nodes Bar */
.network-nodes-bar { display: flex; gap: 15px; padding: 20px 40px; background: #080a12; border-top: 1px solid var(--card-border); overflow-x: auto; }
.node-mini-card { background: var(--card-bg); border: 1px solid var(--card-border); padding: 10px 20px; border-radius: 10px; min-width: 150px; }
.node-id { font-weight: 800; font-size: 0.85rem; color: var(--accent-purple); display: block; margin-bottom: 4px; }
.node-ver { font-size: 0.7rem; color: var(--text-muted); }

/* Toast */
.toast { position: fixed; bottom: 100px; right: 40px; background: var(--accent-purple); color: #fff; padding: 12px 25px; border-radius: 10px; transform: translateY(200px); transition: 0.4s; }
.toast.show { transform: translateY(0); }

/* Terminal Console */
.terminal-card { background: #000; border: 1px solid var(--card-border); border-radius: 12px; height: 500px; display: flex; flex-direction: column; font-family: 'JetBrains Mono', monospace; }
.terminal-header { background: #1a1a1a; padding: 10px 20px; font-size: 0.8rem; font-weight: 700; color: var(--text-muted); border-radius: 12px 12px 0 0; }
.terminal-body { flex: 1; padding: 20px; overflow-y: auto; color: #0f0; font-size: 0.9rem; line-height: 1.4; }
.terminal-footer { display: flex; align-items: center; padding: 10px 20px; background: #1a1a1a; border-radius: 0 0 12px 12px; }
.terminal-footer span { color: #0f0; margin-right: 10px; font-weight: bold; }
.terminal-footer input { background: none; border: none; color: #fff; width: 100%; outline: none; font-family: 'JetBrains Mono', monospace; }

.term-line { margin-bottom: 5px; }
.cmd { color: #fff; font-weight: bold; }
.res { color: #0f0; white-space: pre-wrap; margin-left: 10px; }
.err { color: var(--danger-red); }

/* Mining Active State */
.btn-start.active { background: var(--danger-red); border-color: var(--danger-red); }

/* Premium Grid Layout */
.transfer-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 25px; }

/* Premium Card Styles */
.premium-card { background: linear-gradient(145deg, rgba(19, 22, 37, 0.8) 0%, rgba(11, 13, 23, 0.9) 100%); border: 1px solid rgba(168, 85, 247, 0.15); box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2); position: relative; overflow: hidden; }
.premium-card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px; background: var(--primary-gradient); opacity: 0; transition: opacity 0.3s ease; }
.premium-card:hover::before { opacity: 1; }
.mt-15 { margin-top: 15px; }
.mt-10 { margin-top: 10px; }

/* Premium Inputs */
.premium-input-group { position: relative; margin-bottom: 20px; }
.premium-input-group label { display: block; font-size: 0.75rem; font-weight: 700; color: var(--text-muted); margin-bottom: 8px; letter-spacing: 0.5px; text-transform: uppercase; }
.premium-input-wrapper { display: flex; align-items: center; background: rgba(0, 0, 0, 0.2); border: 1px solid rgba(255, 255, 255, 0.08); border-radius: 12px; padding: 5px 15px; transition: all 0.3s ease; }
.premium-input-wrapper:focus-within { border-color: var(--accent-purple); box-shadow: 0 0 0 3px rgba(168, 85, 247, 0.1); background: rgba(0, 0, 0, 0.4); }
.premium-input-wrapper i { color: var(--text-muted); font-size: 1.1rem; margin-right: 12px; transition: color 0.3s ease; }
.premium-input-wrapper:focus-within i { color: var(--accent-purple); }
.premium-input-wrapper input { background: transparent; border: none; color: #fff; font-size: 1.1rem; font-family: 'JetBrains Mono', monospace; padding: 12px 0; width: 100%; outline: none; }
.currency-badge { background: var(--primary-gradient); padding: 4px 10px; border-radius: 6px; font-size: 0.8rem; font-weight: 800; color: #fff; margin-left: 10px; box-shadow: 0 2px 10px rgba(168, 85, 247, 0.3); }

/* Premium Button */
.btn-premium { width: 100%; padding: 16px; background: var(--primary-gradient); border: none; border-radius: 12px; color: #fff; font-weight: 800; font-size: 1rem; cursor: pointer; transition: all 0.3s ease; display: flex; justify-content: center; align-items: center; gap: 10px; text-transform: uppercase; letter-spacing: 1px; box-shadow: 0 4px 15px rgba(168, 85, 247, 0.3); }
.btn-premium:hover { transform: translateY(-2px); box-shadow: 0 8px 25px rgba(168, 85, 247, 0.5); filter: brightness(1.1); }
.btn-premium:active { transform: translateY(0); }

/* Premium Receive */
.receive-premium { display: flex; flex-direction: column; align-items: center; gap: 20px; width: 100%; }
.qr-mock-premium { width: 140px; height: 140px; border: 2px dashed rgba(168, 85, 247, 0.5); border-radius: 16px; display: flex; justify-content: center; align-items: center; font-size: 4rem; color: var(--accent-purple); background: rgba(168, 85, 247, 0.05); transition: all 0.3s ease; }
.qr-mock-premium:hover { background: rgba(168, 85, 247, 0.1); border-style: solid; transform: scale(1.02); }
.header-with-icon { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; flex-wrap: wrap; gap: 10px; }
.address-box-premium { background: rgba(0, 0, 0, 0.3); border: 1px solid rgba(255, 255, 255, 0.08); padding: 15px 20px; border-radius: 12px; display: flex; justify-content: space-between; align-items: center; width: 100%; gap: 15px; cursor: pointer; transition: all 0.3s ease; }
.address-box-premium:hover { border-color: var(--accent-purple); background: rgba(168, 85, 247, 0.08); transform: translateY(-2px); }
.address-text { font-family: 'JetBrains Mono', monospace; font-size: 0.9rem; color: #fff; word-break: break-all; text-align: left; line-height: 1.4; flex: 1; }
.copy-icon { color: var(--accent-purple); font-size: 1.2rem; transition: transform 0.3s ease; }
.address-box-premium:hover .copy-icon { transform: scale(1.1); }
.receive-hint { font-size: 0.75rem; color: var(--text-muted); opacity: 0.8; }
.spin-on-hover { cursor: pointer; transition: transform 0.5s ease; }
.spin-on-hover:hover { transform: rotate(180deg); color: var(--accent-purple); }
.text-muted { color: var(--text-muted); }

/* Portfolios Premium */
.portfolios-card { display: flex; flex-direction: column; height: 100%; justify-content: space-between; }
.wallet-list { display: flex; flex-direction: column; gap: 12px; max-height: 300px; overflow-y: auto; padding-right: 5px; margin-bottom: 20px; }
.wallet-list::-webkit-scrollbar { width: 4px; }
.wallet-list::-webkit-scrollbar-thumb { background: rgba(168, 85, 247, 0.3); border-radius: 10px; }

.wallet-item { background: rgba(0, 0, 0, 0.2); border: 1px solid rgba(255, 255, 255, 0.05); border-radius: 12px; padding: 15px; display: flex; align-items: center; cursor: pointer; transition: all 0.3s ease; position: relative; overflow: hidden; }
.wallet-item:hover { background: rgba(168, 85, 247, 0.1); border-color: rgba(168, 85, 247, 0.3); transform: translateX(5px); }
.wallet-item.active { background: linear-gradient(90deg, rgba(168, 85, 247, 0.15), rgba(0, 0, 0, 0.2)); border-left: 4px solid var(--accent-purple); border-color: rgba(168, 85, 247, 0.3); }

.wallet-icon { width: 40px; height: 40px; background: rgba(255, 255, 255, 0.05); border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 1.2rem; color: var(--text-muted); margin-right: 15px; transition: all 0.3s ease; }
.wallet-item.active .wallet-icon { background: var(--primary-gradient); color: #fff; box-shadow: 0 4px 15px rgba(168, 85, 247, 0.3); }

.wallet-details { flex: 1; display: flex; flex-direction: column; }
.wallet-name { font-weight: 700; font-size: 1rem; color: #fff; text-transform: uppercase; letter-spacing: 0.5px; }
.wallet-status { font-size: 0.75rem; color: var(--text-muted); margin-top: 2px; }
.wallet-item.active .wallet-status { color: var(--accent-purple); font-weight: 600; }

.active-indicator { color: var(--success-green); font-size: 1.2rem; display: flex; align-items: center; justify-content: center; }

/* Management Section */
.management-section { background: rgba(0, 0, 0, 0.2); border-radius: 12px; padding: 15px; margin-bottom: 20px; border: 1px solid rgba(255,255,255,0.05); }
.management-label { display: flex; align-items: center; gap: 10px; font-size: 0.8rem; color: var(--text-muted); font-weight: 700; margin-bottom: 15px; text-transform: uppercase; }
.active-wallet-badge { background: rgba(168, 85, 247, 0.15); color: var(--accent-purple); padding: 4px 8px; border-radius: 6px; font-weight: 800; }

.management-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.btn-action { background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(255, 255, 255, 0.1); color: #fff; padding: 10px; border-radius: 8px; cursor: pointer; transition: all 0.3s ease; font-size: 0.85rem; font-weight: 600; display: flex; align-items: center; justify-content: center; gap: 8px; font-family: 'Inter', sans-serif; }
.btn-action:hover { background: rgba(255, 255, 255, 0.1); }
.btn-action.danger:hover { background: rgba(239, 68, 68, 0.15); color: var(--danger-red); border-color: rgba(239, 68, 68, 0.3); }

/* Portfolio Footer */
.portfolio-footer { display: flex; flex-direction: column; gap: 10px; }
.btn-premium.outline { background: transparent; border: 1px solid var(--accent-purple); color: var(--accent-purple); box-shadow: none; padding: 14px; }
.btn-premium.outline:hover { background: rgba(168, 85, 247, 0.1); box-shadow: 0 4px 15px rgba(168, 85, 247, 0.2); filter: none; }

/* Premium Explorer Layout (Images Based) */
.explorer-layout-container { display: flex; flex-direction: column; width: 100%; color: #fff; }

.explorer-header { padding: 25px 30px 10px; display: flex; align-items: center; gap: 15px; border-bottom: 1px solid rgba(255,255,255,0.05); }
.explorer-header h2 { font-size: 1.3rem; font-weight: 700; color: #fff; }
.back-btn { background: transparent; border: none; color: var(--text-muted); font-size: 1.2rem; cursor: pointer; transition: color 0.3s; }
.back-btn:hover { color: var(--accent-purple); }

.explorer-tabs { display: flex; gap: 20px; padding: 0 30px; border-bottom: 1px solid rgba(255,255,255,0.05); }
.tab-btn { background: transparent; border: none; color: var(--text-muted); padding: 15px 5px; font-weight: 600; font-size: 0.9rem; cursor: pointer; border-bottom: 3px solid transparent; transition: all 0.3s; }
.tab-btn.active { color: var(--accent-purple); border-bottom-color: var(--accent-purple); }
.tab-btn:hover:not(.active) { color: #fff; }

.explorer-content { padding: 30px; display: flex; flex-direction: column; gap: 20px; }

.info-row { display: flex; flex-direction: column; gap: 8px; margin-bottom: 20px; }
.info-row > span:first-child { font-size: 0.75rem; color: var(--text-muted); text-transform: uppercase; font-weight: 700; letter-spacing: 0.5px; }
.hash-val { font-family: 'JetBrains Mono', monospace; font-size: 1.1rem; color: #fff; word-break: break-all; display: flex; align-items: center; gap: 10px; }
.hash-val i { color: var(--accent-purple); cursor: pointer; opacity: 0.7; }
.hash-val i:hover { opacity: 1; }

.badge { display: inline-block; padding: 4px 10px; border-radius: 6px; font-size: 0.8rem; font-weight: 800; }
.badge.success { background: rgba(16, 185, 129, 0.15); color: var(--success-green); }
.badge.pending { background: rgba(245, 158, 11, 0.15); color: #f59e0b; }

.explorer-section-card { background: rgba(0, 0, 0, 0.2); border: 1px solid rgba(255, 255, 255, 0.05); border-radius: 12px; padding: 25px; }
.section-title { font-size: 0.8rem; color: var(--text-muted); text-transform: uppercase; font-weight: 700; letter-spacing: 0.5px; margin-bottom: 15px; border-bottom: 1px solid rgba(255,255,255,0.05); padding-bottom: 10px; }

.value-summary-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.value-summary-grid > div { display: flex; flex-direction: column; gap: 5px; }
.value-summary-grid span { font-size: 0.7rem; color: var(--text-muted); text-transform: uppercase; font-weight: 600; }
.value-summary-grid strong { font-size: 1.1rem; font-family: 'JetBrains Mono', monospace; color: #fff; }

.tech-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 20px; }
.tech-grid > div { display: flex; flex-direction: column; gap: 5px; }
.tech-grid span { font-size: 0.7rem; color: var(--text-muted); text-transform: uppercase; font-weight: 600; }
.tech-grid strong { font-size: 0.95rem; font-family: 'JetBrains Mono', monospace; color: #fff; }

.block-hero { display: flex; flex-direction: column; align-items: flex-start; gap: 15px; margin-bottom: 30px; }
.block-height-nav { display: flex; align-items: center; gap: 20px; }
.block-height-nav h1 { font-size: 2.5rem; font-weight: 800; color: #fff; margin: 0; }
.block-height-nav i { font-size: 1.5rem; color: var(--accent-purple); cursor: pointer; transition: transform 0.2s; }
.block-height-nav i:hover { transform: scale(1.2); }
.block-time { font-size: 0.9rem; color: var(--text-muted); }

.block-stats-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 15px; }
.stat-box { border: 1px solid rgba(255,255,255,0.05); border-radius: 10px; padding: 15px; display: flex; flex-direction: column; gap: 5px; background: rgba(0,0,0,0.1); }
.stat-box span { font-size: 0.7rem; color: var(--text-muted); text-transform: uppercase; font-weight: 600; }
.stat-box strong { font-size: 1.2rem; color: #fff; font-weight: 700; }

.tx-flow-grid { display: grid; grid-template-columns: 1fr auto 1fr; gap: 20px; align-items: center; }
.tx-flow-column { display: flex; flex-direction: column; gap: 10px; }
.tx-flow-io { background: rgba(0, 0, 0, 0.3); border: 1px solid rgba(255, 255, 255, 0.05); padding: 15px; border-radius: 8px; display: flex; justify-content: space-between; align-items: center; }
.tx-flow-io .addr { color: var(--accent-purple); font-family: 'JetBrains Mono', monospace; font-size: 0.85rem; }
.tx-flow-io .amt { font-weight: 700; font-size: 0.9rem; font-family: 'JetBrains Mono', monospace; }
.tx-flow-center { display: flex; justify-content: center; align-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--primary-gradient); font-size: 1.2rem; color: #fff; box-shadow: 0 0 15px rgba(168, 85, 247, 0.5); }

/* Mining Control Hub Premium */
.mining-layout { display: grid; grid-template-columns: 1.5fr 1fr; gap: 30px; }
.mining-card { background: rgba(0, 0, 0, 0.2); border: 1px solid rgba(255, 255, 255, 0.05); border-radius: 15px; padding: 30px; }
.mining-stats-premium { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 30px; }
.m-stat { background: rgba(168, 85, 247, 0.05); border: 1px solid rgba(168, 85, 247, 0.1); padding: 20px; border-radius: 12px; display: flex; flex-direction: column; gap: 10px; }
.m-stat label { font-size: 0.75rem; color: var(--text-muted); text-transform: uppercase; font-weight: 700; letter-spacing: 1px; }
.m-stat .val { font-size: 1.8rem; font-weight: 800; color: #fff; font-family: 'JetBrains Mono', monospace; }

.miner-download-card { border: 2px dashed rgba(168, 85, 247, 0.3); background: rgba(168, 85, 247, 0.03); padding: 25px; border-radius: 15px; text-align: center; display: none; margin-top: 20px; animation: fadeIn 0.5s ease-out; }
.miner-download-card.active { display: block; }
.miner-download-card h4 { color: var(--accent-purple); margin-bottom: 15px; font-weight: 700; }
.download-links { display: flex; flex-direction: column; gap: 10px; margin-top: 15px; }
.download-btn { background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1); padding: 12px; border-radius: 8px; display: flex; align-items: center; justify-content: center; gap: 10px; color: #fff; text-decoration: none; transition: all 0.3s; }
.download-btn:hover { background: var(--accent-purple); border-color: var(--accent-purple); transform: translateY(-2px); }
.download-btn i { font-size: 1.2rem; }

.mining-visual { height: 150px; background: linear-gradient(90deg, rgba(168, 85, 247, 0.1) 0%, rgba(0,0,0,0) 100%); border-radius: 12px; margin-bottom: 20px; display: flex; align-items: center; justify-content: center; overflow: hidden; position: relative; }
.mining-visual::after { content: ''; position: absolute; width: 100%; height: 2px; background: var(--accent-purple); top: 50%; left: 0; box-shadow: 0 0 20px var(--accent-purple); animation: scan 3s infinite linear; }
@keyframes scan { 0% { transform: translateY(-50px); } 50% { transform: translateY(50px); } 100% { transform: translateY(-50px); } }

/* Responsive Media Queries */
@media (max-width: 1200px) {
    .primary-layout { flex-direction: column; }
    .secondary-column { width: 100%; }
}

@media (max-width: 992px) {
    .stats-row { grid-template-columns: 1fr; }
    .transfer-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    body { flex-direction: column; overflow: auto; height: auto; }
    .sidebar { width: 100%; border-right: none; border-bottom: 1px solid var(--card-border); flex-direction: row; flex-wrap: wrap; justify-content: space-between; padding: 10px 20px; height: auto; align-items: center; }
    .sidebar-header { margin-bottom: 0; }
    .logo { padding: 0; }
    .side-nav { display: flex; overflow-x: auto; width: 100%; padding-top: 15px; border-top: 1px solid var(--card-border); margin-top: 15px; gap: 10px; }
    .side-nav a { padding: 10px 15px; white-space: nowrap; border-left: none; border-bottom: 3px solid transparent; }
    .side-nav a.active { border-left: none; border-bottom: 3px solid var(--accent-purple); background: transparent; color: var(--accent-purple); }
    .sidebar-footer { display: none; }
    .main-content { overflow: visible; height: auto; }
    .content-body { padding: 0 20px 20px; }
    .search-container { width: 100%; }
    .top-header { padding: 20px; }
}
