/* Enterprise-Grade Continuum Dashboard Styles */

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

:root {
    /* Professional Color Palette */
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #818cf8;
    --secondary: #8b5cf6;
    --accent: #f59e0b;

    /* Neutrals */
    --bg-primary: #0a0a0b;
    --bg-secondary: #111113;
    --bg-tertiary: #18181b;
    --bg-card: #1c1c1f;
    --bg-hover: #222225;

    /* Text */
    --text-primary: #fafafa;
    --text-secondary: #a1a1aa;
    --text-tertiary: #71717a;

    /* Borders */
    --border-primary: #27272a;
    --border-secondary: #3f3f46;

    /* Status Colors */
    --success: #10b981;
    --warning: #f59e0b;
    --error: #ef4444;
    --info: #3b82f6;

    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 32px rgba(99, 102, 241, 0.3);

    /* Transitions */
    --transition-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Notification styles */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 16px 24px;
    border-radius: 8px;
    color: white;
    font-size: 14px;
    font-weight: 500;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    z-index: 10000;
    transform: translateX(400px);
    opacity: 0;
    transition: all 0.3s ease;
    max-width: 400px;
    word-wrap: break-word;
    white-space: pre-line;
}

.notification.show {
    transform: translateX(0);
    opacity: 1;
}

.notification-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.notification-error {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}

.notification-info {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
}

.notification-warning {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Light Theme */
body.light-theme {
    --bg-primary: #f5f5f7;
    --bg-secondary: #ffffff;
    --bg-tertiary: #f0f0f2;
    --bg-card: #ffffff;
    --bg-hover: #e8e8ea;

    --text-primary: #1d1d1f;
    --text-secondary: #6e6e73;
    --text-tertiary: #86868b;

    --border-primary: #d2d2d7;
    --border-secondary: #c7c7cc;
}

/* Connection Banner */
.connection-banner {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 36px;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-primary);
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 0 24px;
    gap: 16px;
    z-index: 1000;
    font-size: 13px;
    transition: all var(--transition-base);
}

.connection-banner.connected {
    background: linear-gradient(90deg, rgba(16, 185, 129, 0.1), transparent);
    border-bottom-color: rgba(16, 185, 129, 0.3);
}

.connection-banner.disconnected {
    background: linear-gradient(90deg, rgba(239, 68, 68, 0.1), transparent);
    border-bottom-color: rgba(239, 68, 68, 0.3);
}

.connection-status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--error);
    animation: pulse-dot 2s ease-in-out infinite;
}

.connection-banner.connected .connection-status-dot {
    background: var(--success);
}

.banner-spacer {
    flex: 1;
}

.time-display {
    display: flex;
    align-items: center;
    gap: 6px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
}

.time-label {
    color: var(--text-tertiary);
    font-weight: 600;
}

.time-value {
    color: var(--text-primary);
    font-weight: 600;
}

.theme-toggle {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    background: var(--bg-card);
    border: 1px solid var(--border-primary);
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
    font-size: 16px;
}

.theme-toggle:hover {
    background: var(--bg-hover);
    border-color: var(--primary);
    transform: scale(1.1);
}

@keyframes pulse-dot {

    0%,
    100% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.2);
        opacity: 0.7;
    }
}

/* Main Container */
.container {
    display: flex;
    min-height: 100vh;
    padding-top: 36px;
}

/* Sidebar */
.sidebar {
    width: 260px;
    background: var(--bg-secondary);
    border-right: 1px solid var(--border-primary);
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 36px;
    height: calc(100vh - 36px);
    overflow-y: auto;
    transition: all var(--transition-base);
}

.logo {
    padding: 24px 20px;
    border-bottom: 1px solid var(--border-primary);
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-icon svg {
    width: 40px;
    height: 40px;
}

.logo-text h1 {
    font-size: 18px;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 1px;
}

.logo-text p {
    font-size: 11px;
    color: var(--text-tertiary);
    margin-top: 2px;
    letter-spacing: 0.5px;
}

/* Navigation */
.nav {
    flex: 1;
    padding: 16px 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: transparent;
    border: none;
    border-radius: 8px;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all var(--transition-fast);
    position: relative;
    overflow: hidden;
}

.nav-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--primary);
    transform: scaleY(0);
    transition: transform var(--transition-fast);
}

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

.nav-item.active {
    background: linear-gradient(90deg, rgba(99, 102, 241, 0.15), transparent);
    color: var(--text-primary);
}

.nav-item.active::before {
    transform: scaleY(1);
}

.nav-icon {
    font-size: 18px;
    width: 24px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.nav-label {
    flex: 1;
    text-align: left;
}

.nav-badge {
    padding: 2px 8px;
    background: var(--bg-tertiary);
    border-radius: 10px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.nav-badge.pulse {
    background: var(--success);
    color: white;
    animation: pulse-badge 2s ease-in-out infinite;
}

.nav-badge.new {
    background: var(--accent);
    color: white;
}

@keyframes pulse-badge {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.6;
    }
}

/* Sidebar Footer */
.sidebar-footer {
    padding: 16px;
    border-top: 1px solid var(--border-primary);
}

.network-indicator {
    background: var(--bg-tertiary);
    border-radius: 8px;
    padding: 12px;
}

.indicator-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    padding: 4px 0;
}

.indicator-label {
    color: var(--text-tertiary);
}

.indicator-value {
    color: var(--text-primary);
    font-weight: 600;
    font-family: 'JetBrains Mono', monospace;
}

.status-good {
    color: var(--success);
}

/* Main Content */
.main-content {
    flex: 1;
    padding: 32px;
    overflow-y: auto;
    height: calc(100vh - 36px);
}

.tab-content {
    display: none;
    animation: fadeIn 0.3s ease-in-out;
}

.tab-content.active {
    display: block;
    opacity: 1 !important;
    /* Override fadeIn animation initial state */
    min-height: 100px;
    /* Ensure tab has some height */
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Page Header */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
}

.page-title {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 4px;
}

.page-subtitle {
    font-size: 14px;
    color: var(--text-tertiary);
}

/* Metrics Grid */
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}

.metric-card {
    background: var(--bg-card);
    border: 1px solid var(--border-primary);
    border-radius: 12px;
    padding: 20px;
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
}

.metric-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    transform: scaleX(0);
    transition: transform var(--transition-base);
}

.metric-card:hover {
    border-color: var(--primary);
    transform: translateY(-4px);
    box-shadow: var(--shadow-glow);
}

.metric-card:hover::before {
    transform: scaleX(1);
}

.metric-card.primary {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), var(--bg-card));
}

.metric-card.success {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1), var(--bg-card));
}

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

.metric-icon {
    font-size: 24px;
}

.metric-trend {
    font-size: 12px;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 4px;
}

.metric-trend.up {
    color: var(--success);
    background: rgba(16, 185, 129, 0.1);
}

.metric-value {
    font-size: 36px;
    font-weight: 700;
    font-family: 'JetBrains Mono', monospace;
    margin-bottom: 8px;
    background: linear-gradient(135deg, var(--text-primary), var(--primary-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.metric-value.small {
    font-size: 24px;
}

.metric-label {
    font-size: 13px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.metric-footer {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border-primary);
    font-size: 12px;
    color: var(--text-tertiary);
}

.metric-sparkline {
    height: 40px;
    margin-top: 12px;
}

/* Data Section */
.data-section {
    background: var(--bg-card);
    border: 1px solid var(--border-primary);
    border-radius: 12px;
    overflow: hidden;
}

.section-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-primary);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.section-header h3 {
    font-size: 18px;
    font-weight: 600;
}

.header-actions {
    display: flex;
    gap: 12px;
    align-items: center;
}

.update-indicator {
    font-size: 12px;
    color: var(--text-tertiary);
}

/* Tables */
.table-wrapper {
    overflow-x: auto;
}

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

.data-table thead {
    background: var(--bg-secondary);
    position: sticky;
    top: 0;
    z-index: 10;
}

.data-table th {
    text-align: left;
    padding: 16px 24px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-tertiary);
    border-bottom: 2px solid var(--primary);
}

.data-table td {
    padding: 16px 24px;
    border-bottom: 1px solid var(--border-primary);
    font-size: 14px;
    font-family: 'JetBrains Mono', monospace;
}

.data-table tbody tr {
    transition: all var(--transition-fast);
}

.data-table tbody tr:hover {
    background: rgba(99, 102, 241, 0.05);
}

.balance-cell {
    color: var(--primary-light);
    font-weight: 600;
}

.text-success {
    color: var(--success);
}

.text-warning {
    color: var(--warning);
}

.text-error {
    color: var(--error);
}

/* Activity Feed */
.activity-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 24px;
}

.activity-feed-container {
    background: var(--bg-card);
    border: 1px solid var(--border-primary);
    border-radius: 12px;
    overflow: hidden;
}

.feed-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-primary);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.feed-header h3 {
    font-size: 18px;
    font-weight: 600;
}

.live-badge {
    padding: 4px 12px;
    background: var(--success);
    color: white;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.activity-feed {
    max-height: 600px;
    overflow-y: auto;
    padding: 12px;
}

.activity-item {
    padding: 16px;
    background: var(--bg-secondary);
    border-radius: 8px;
    margin-bottom: 8px;
    border-left: 3px solid var(--primary);
    animation: slideIn 0.3s ease-out;
}

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

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.activity-item.new {
    animation: slideIn 0.3s ease-out, highlight 2s ease-out;
}

@keyframes highlight {
    0% {
        background: rgba(99, 102, 241, 0.2);
    }

    100% {
        background: var(--bg-secondary);
    }
}

.activity-time {
    font-size: 11px;
    color: var(--text-tertiary);
    margin-bottom: 4px;
}

.activity-content {
    font-size: 14px;
    line-height: 1.5;
}

.activity-stats {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.stat-block {
    background: var(--bg-card);
    border: 1px solid var(--border-primary);
    border-radius: 12px;
    padding: 20px;
}

.stat-block h4 {
    font-size: 14px;
    margin-bottom: 12px;
    color: var(--text-secondary);
}

.stat-value {
    font-size: 32px;
    font-weight: 700;
    font-family: 'JetBrains Mono', monospace;
    color: var(--primary-light);
}

/* Wallet Sections */
.wallet-section {
    max-width: 800px;
    margin: 0 auto;
}

.import-card,
.wallet-card {
    background: var(--bg-card);
    border: 1px solid var(--border-primary);
    border-radius: 12px;
    padding: 32px;
}

.wallet-header-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.balance-showcase {
    text-align: center;
    padding: 40px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(139, 92, 246, 0.1));
    border-radius: 12px;
    margin-bottom: 32px;
    position: relative;
    overflow: hidden;
}

.balance-showcase::before {
    content: '';
    position: absolute;
    inset: -50%;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.1) 0%, transparent 70%);
    animation: pulse-glow 3s ease-in-out infinite;
}

@keyframes pulse-glow {

    0%,
    100% {
        transform: scale(1);
        opacity: 0.5;
    }

    50% {
        transform: scale(1.1);
        opacity: 0.8;
    }
}

.balance-label {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    z-index: 1;
}

.balance-amount {
    font-size: 32px;
    font-weight: 700;
    font-family: 'JetBrains Mono', monospace;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
    z-index: 1;
    word-break: break-all;
}

@media (max-width: 768px) {
    .balance-amount {
        font-size: 24px;
    }
}

.balance-currency {
    font-size: 24px;
    margin-left: 8px;
    color: var(--text-secondary);
}

/* Wallet Interface Styling */
#import-section,
#active-wallet-section {
    background: var(--bg-secondary);
    padding: 32px;
    border-radius: 12px;
    width: 100%;
    /* Full width */
    max-width: 1200px;
    /* Respect content area */
    margin: 0 auto;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.keys-display {
    display: grid;
    grid-template-columns: 1fr;
    /* Full width for keys */
    gap: 24px;
    margin-top: 24px;
    width: 100%;
}

.key-card {
    background: var(--bg-primary);
    padding: 20px;
    border-radius: 8px;
    border: 1px solid var(--border-primary);
    width: 100%;
    /* Full width */
}

.key-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    font-size: 13px;
    color: var(--text-secondary);
}

.btn-copy {
    padding: 6px 12px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 12px;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.btn-copy:hover {
    background: var(--primary-dark);
    transform: scale(1.05);
}

.key-code {
    display: block;
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    word-break: break-all;
    color: var(--text-primary);
    line-height: 1.6;
}

.key-warning {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border-primary);
    font-size: 12px;
    color: var(--warning);
}

.transfer-panel {
    background: var(--bg-secondary);
    padding: 24px;
    border-radius: 8px;
}

.transfer-panel h4 {
    margin-bottom: 20px;
    font-size: 16px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
}

.form-group input {
    width: 100%;
    padding: 12px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border-primary);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 14px;
    font-family: 'JetBrains Mono', monospace;
    transition: all var(--transition-fast);
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.form-group input::placeholder {
    color: var(--text-tertiary);
}

/* Buttons */
.button-group {
    display: flex;
    gap: 12px;
}

.btn-primary,
.btn-secondary,
.btn-logout {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    flex: 1;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
}

.btn-secondary {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--border-primary);
    flex: 1;
}

.btn-secondary:hover {
    background: var(--bg-hover);
    border-color: var(--primary);
}

.btn-logout {
    background: rgba(239, 68, 68, 0.1);
    color: var(--error);
    border: 1px solid var(--error);
}

.btn-logout:hover {
    background: var(--error);
    color: white;
}

.full-width {
    width: 100%;
}

/* Charts */
.chart-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 24px;
}

.chart-card {
    background: var(--bg-card);
    border: 1px solid var(--border-primary);
    border-radius: 12px;
    padding: 24px;
}

.chart-card h4 {
    margin-bottom: 16px;
    font-size: 16px;
    color: var(--text-secondary);
}

/* Toast Notifications */
#toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.toast {
    min-width: 300px;
    padding: 16px 20px;
    background: var(--bg-card);
    border: 1px solid var(--border-primary);
    border-radius: 8px;
    box-shadow: var(--shadow-lg);
    animation: slideInRight 0.3s ease-out;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.toast.success {
    border-left: 3px solid var(--success);
}

.toast.error {
    border-left: 3px solid var(--error);
}

.toast.info {
    border-left: 3px solid var(--info);
}

/* Responsive */
@media (max-width: 1024px) {
    .sidebar {
        width: 220px;
    }

    .metrics-grid {
        grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    }

    .activity-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .sidebar {
        position: fixed;
        transform: translateX(-100%);
    }

    .main-content {
        padding: 16px;
    }

    .page-title {
        font-size: 24px;
    }

    .metric-value {
        font-size: 28px;
    }
}

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

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

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

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

/* Modal Styles */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    animation: fadeIn 0.2s ease-out;
}

.modal-content {
    background: var(--card-bg);
    border: 1px solid var(--border-primary);
    border-radius: 16px;
    width: 90%;
    max-width: 700px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    animation: slideUp 0.3s ease-out;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px;
    border-bottom: 1px solid var(--border-primary);
}

.modal-header h3 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: all 0.2s;
}

.modal-close:hover {
    background: var(--border-primary);
}

.modal-body {
    padding: 24px;
}

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

.detail-section h4 {
    margin: 0 0 8px 0;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    text-transform: uppercase;
}

.key-code {
    display: block;
    background: var(--bg-secondary);
    padding: 16px;
    border-radius: 8px;
    font-family: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;
    font-size: 11px;
    /* Smaller font for long quantum keys */
    color: var(--primary-light);
    border: 1px solid var(--border-primary);
    margin: 12px 0;
    /* Allow wrapping for long quantum keys */
    word-wrap: break-word;
    word-break: break-all;
    white-space: pre-wrap;
    line-height: 1.5;
    max-height: none;
    /* Remove height limit */
    overflow-wrap: break-word;
    user-select: all;
    cursor: pointer;
    /* Click to copy */
    transition: background 0.2s ease;
}

.key-code:hover {
    background: var(--bg-primary);
    border-color: var(--primary);
}

.detail-value {
    font-size: 1rem;
    padding: 12px;
    background: var(--input-bg);
    border: 1px solid var(--border-primary);
    border-radius: 8px;
    word-break: break-all;
}

.detail-value.large {
    font-size: 2rem;
    font-weight: 700;
    color: var(--accent-primary);
    text-align: center;
}

.detail-value.mono {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.875rem;
}

.detail-value.small {
    font-size: 0.75rem;
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 16px;
}

.clickable-wallet {
    cursor: pointer;
    color: var(--accent-primary);
    transition: all 0.2s;
}

.clickable-wallet:hover {
    text-decoration: underline;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Fix for large supply numbers */
#supply-display {
    font-size: 1.25rem !important;
    word-break: break-all;
    line-height: 1.2;
}

/* Responsive font sizing for metric values */
@media (max-width: 1400px) {
    .metric-value.small {
        font-size: 1rem;
    }
}

/* Activity Tab - New Layout */
.activity-stats-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 24px;
}

.stat-card {
    background: var(--card-bg);
    border: 1px solid var(--border-primary);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
}

.stat-card h4 {
    margin: 0 0 12px 0;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-card .stat-value {
    font-size: 3rem;
    font-weight: 700;
    color: var(--accent-primary);
    margin: 8px 0;
}

.stat-card p {
    margin: 8px 0 0 0;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.activity-feed-section {
    background: var(--card-bg);
    border: 1px solid var(--border-primary);
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: calc(100vh - 380px);
    min-height: 400px;
}

.activity-feed-section .feed-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-primary);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--input-bg);
}

.activity-feed-section .feed-header h3 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
}

.activity-feed-grid {
    flex: 1;
    overflow-y: auto;
    padding: 12px;
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    align-content: start;
}

.activity-feed-grid .activity-item {
    background: var(--input-bg);
    border: 1px solid var(--border-primary);
    border-radius: 8px;
    padding: 12px 16px;
    transition: all 0.2s;
}

.activity-feed-grid .activity-item:hover {
    background: var(--card-bg);
    border-color: var(--accent-primary);
}

.activity-feed-grid .activity-time {
    font-size: 0.75rem;
    color: var(--text-tertiary);
    margin-bottom: 4px;
}

.activity-feed-grid .activity-content {
    font-size: 0.875rem;
    color: var(--text-primary);
    line-height: 1.4;
}

/* Rich List Styles */
.rank-badge {
    display: inline-block;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 700;
}

.address-link {
    color: #00ffc8;
    text-decoration: none;
    font-family: 'Monaco', 'Menlo', 'Consolas', monospace;
    font-size: 0.9rem;
    transition: all 0.2s;
    border-bottom: 1px solid transparent;
}

.address-link:hover {
    color: #00d4ff;
    border-bottom-color: #00d4ff;
}

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

.status-converging {
    color: var(--warning);
    font-weight: 600;
}

.status-high-entropy {
    color: var(--error);
    font-weight: 600;
}

/* Input Styles */
.input-modern {
    width: 100%;
    padding: 12px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-primary);
    border-radius: 8px;
    color: var(--text-primary);
    font-family: 'Monaco', 'Menlo', 'Consolas', monospace;
    /* Monospace for addresses */
    font-size: 0.85rem;
    /* Slightly smaller to fit more chars */
    transition: all 0.2s;
    box-sizing: border-box;
    /* Ensure padding doesn't affect width */
}

.input-modern:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.2);
}

.input-modern.valid {
    border-color: var(--success);
    background-color: rgba(16, 185, 129, 0.05);
}

.input-modern.invalid {
    border-color: var(--error);
    background-color: rgba(239, 68, 68, 0.05);
}

/* Specific override for recipient address to ensure it handles long text */
#recipient-address {
    min-width: 100%;
    /* Allow horizontal scrolling for long addresses instead of cropping */
    text-overflow: clip;
}

/* Validation Feedback */
.validation-feedback {
    margin-top: 8px;
    font-size: 0.85rem;
    padding: 8px 12px;
    border-radius: 6px;
    background: var(--bg-tertiary);
    border: 1px solid transparent;
}

.validation-feedback.valid {
    background: rgba(16, 185, 129, 0.1);
    border-color: rgba(16, 185, 129, 0.2);
    color: var(--success);
}

.validation-feedback.invalid {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.2);
    color: var(--error);
}

.address-preview {
    font-family: 'Monaco', 'Menlo', 'Consolas', monospace;
    word-break: break-all;
}

.valid-icon,
.invalid-icon {
    margin-right: 6px;
    font-weight: bold;
}

/* ============================================
   MOBILE RESPONSIVE STYLES
   ============================================ */

/* Hamburger Menu Toggle Button - Hidden on Desktop */
.mobile-menu-toggle {
    display: none;
    position: fixed;
    top: 48px;
    left: 16px;
    z-index: 2000;
    width: 44px;
    height: 44px;
    background: var(--bg-card);
    border: 1px solid var(--border-primary);
    border-radius: 8px;
    cursor: pointer;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 6px;
    padding: 10px;
    transition: all var(--transition-base);
}

.mobile-menu-toggle:hover {
    background: var(--bg-hover);
    border-color: var(--primary);
}

.mobile-menu-toggle:active {
    transform: scale(0.95);
}

.hamburger-line {
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: all var(--transition-base);
}

/* Hamburger Animation when menu is open */
.mobile-menu-toggle.active .hamburger-line:nth-child(1) {
    transform: rotate(45deg) translate(7px, 7px);
}

.mobile-menu-toggle.active .hamburger-line:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active .hamburger-line:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

/* Mobile Responsive Breakpoint */
@media (max-width: 768px) {

    /* Show hamburger menu on mobile */
    .mobile-menu-toggle {
        display: flex;
    }

    /* Adjust body for mobile menu button */
    body {
        padding-top: 0;
    }

    /* Connection Banner adjustments for mobile */
    .connection-banner {
        padding: 0 12px;
        height: 32px;
        font-size: 11px;
        flex-wrap: nowrap;
        overflow-x: auto;
    }

    .time-display {
        font-size: 10px;
    }

    .theme-toggle {
        width: 28px;
        height: 28px;
        font-size: 14px;
    }

    /* Container adjustments */
    .container {
        flex-direction: column;
        padding-top: 32px;
    }

    /* Sidebar becomes top menu on mobile */
    .sidebar {
        position: fixed;
        top: 32px;
        left: 0;
        width: 100%;
        height: auto;
        max-height: calc(100vh - 32px);
        z-index: 1500;
        transform: translateX(-100%);
        transition: transform var(--transition-base);
        overflow-y: auto;
        border-right: none;
        border-bottom: 1px solid var(--border-primary);
    }

    /* Show sidebar when menu is active */
    .sidebar.active {
        transform: translateX(0);
    }

    /* Logo section adjustments */
    .logo {
        padding: 16px;
        border-bottom: 1px solid var(--border-primary);
    }

    .logo-icon svg {
        width: 32px;
        height: 32px;
    }

    .logo-text h1 {
        font-size: 16px;
    }

    .logo-text p {
        font-size: 10px;
    }

    /* Navigation adjustments */
    .nav {
        padding: 12px 8px;
        gap: 2px;
    }

    .nav-item {
        padding: 10px 14px;
        font-size: 13px;
    }

    .nav-icon {
        font-size: 16px;
        width: 20px;
    }

    .nav-badge {
        font-size: 9px;
        padding: 2px 6px;
    }

    /* Sidebar footer */
    .sidebar-footer {
        padding: 12px;
    }

    .network-indicator {
        padding: 10px;
    }

    .indicator-row {
        font-size: 11px;
    }

    /* Main content adjustments */
    .main-content {
        padding: 16px;
        height: auto;
        min-height: calc(100vh - 32px);
    }

    /* Page header */
    .page-header {
        flex-direction: column;
        align-items: flex-start;
        margin-bottom: 20px;
        gap: 12px;
    }

    .page-title {
        font-size: 22px;
    }

    .page-subtitle {
        font-size: 12px;
    }

    .page-actions {
        width: 100%;
        display: flex;
        justify-content: flex-end;
    }

    /* Metrics Grid - Stack vertically on mobile */
    .metrics-grid {
        grid-template-columns: 1fr;
        gap: 16px;
        margin-bottom: 24px;
    }

    .metric-card {
        padding: 16px;
    }

    .metric-value {
        font-size: 28px;
    }

    .metric-value.small {
        font-size: 20px;
    }

    .metric-label {
        font-size: 11px;
    }

    .metric-footer {
        font-size: 11px;
    }

    /* Data sections */
    .data-section {
        margin-bottom: 20px;
    }

    .section-header {
        padding: 16px;
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .section-header h3 {
        font-size: 16px;
    }

    .update-indicator {
        font-size: 11px;
    }

    /* Tables - Make horizontally scrollable */
    .table-wrapper {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .data-table {
        min-width: 600px;
    }

    .data-table th,
    .data-table td {
        padding: 12px 16px;
        font-size: 12px;
    }

    .data-table th {
        font-size: 10px;
    }

    /* Activity Feed adjustments */
    .activity-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .activity-stats-row {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .activity-feed {
        max-height: 400px;
    }

    .activity-item {
        padding: 12px;
        font-size: 13px;
    }

    .activity-time {
        font-size: 10px;
    }

    .activity-content {
        font-size: 12px;
    }

    /* Stat blocks */
    .stat-block {
        padding: 16px;
    }

    .stat-block h4 {
        font-size: 12px;
    }

    .stat-value {
        font-size: 24px;
    }

    /* Chart grid */
    .chart-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .chart-card {
        padding: 16px;
    }

    .chart-card h4 {
        font-size: 14px;
    }

    /* Wallet section mobile adjustments */
    .wallet-section {
        max-width: 100%;
        padding: 0;
    }

    .import-card,
    .wallet-card {
        padding: 20px;
        border-radius: 8px;
    }

    .wallet-import-container {
        margin: 20px auto;
    }

    .import-card-modern {
        padding: 24px;
    }

    .import-title {
        font-size: 20px;
    }

    .import-description {
        font-size: 13px;
    }

    /* Wallet active section */
    .wallet-active-container {
        padding: 12px;
    }

    .balance-card-modern {
        padding: 24px;
        margin-bottom: 20px;
    }

    .balance-amount-large {
        font-size: 32px;
    }

    /* Keys grid - stack on mobile */
    .keys-grid-modern {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .key-card-modern {
        padding: 16px;
    }

    .key-display {
        padding: 12px;
        font-size: 10px;
    }

    .address-display {
        font-size: 11px;
        line-height: 1.6;
    }

    .private-key-display {
        font-size: 9px;
        max-height: 120px;
    }

    /* Transfer panel */
    .transfer-panel-modern {
        padding: 20px;
    }

    .transfer-title {
        font-size: 18px;
    }

    .input-modern {
        padding: 12px 14px;
        font-size: 13px;
    }

    .btn-send-modern {
        width: 100%;
        padding: 14px 20px;
        font-size: 15px;
    }

    /* Form buttons */
    .button-group-modern {
        flex-direction: column;
    }

    .btn-primary-modern,
    .btn-secondary-modern {
        width: 100%;
        padding: 12px 20px;
        font-size: 14px;
    }

    /* Modal adjustments for mobile */
    .modal-content {
        width: 95% !important;
        margin: 5% auto !important;
        padding: 16px !important;
    }

    .modal-header h3 {
        font-size: 18px;
    }

    .detail-value {
        font-size: 13px;
    }

    .detail-value.large {
        font-size: 20px;
    }

    .detail-grid {
        grid-template-columns: 1fr;
    }

    /* Notification adjustments */
    .notification {
        top: 40px;
        right: 10px;
        left: 10px;
        max-width: calc(100% - 20px);
        font-size: 12px;
        padding: 12px 16px;
    }

    /* Feed header */
    .feed-header {
        padding: 16px;
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .feed-header h3 {
        font-size: 16px;
    }

    .live-badge {
        font-size: 10px;
        padding: 3px 10px;
    }

    /* Button improvements for mobile touch */
    button,
    .btn-icon,
    .nav-item {
        min-height: 44px;
        /* iOS recommended touch target */
    }

    .btn-icon {
        width: 44px;
        padding: 10px;
    }

    /* Improve touch targets */
    .nav-item {
        padding: 14px 16px;
    }
}

/* Tablet landscape adjustments (768px - 1024px) */
@media (min-width: 769px) and (max-width: 1024px) {
    .sidebar {
        width: 220px;
    }

    .logo-text h1 {
        font-size: 16px;
    }

    .nav-item {
        padding: 10px 14px;
        font-size: 13px;
    }

    .main-content {
        padding: 24px;
    }

    .metrics-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Small mobile devices (max 375px) */
@media (max-width: 375px) {
    .page-title {
        font-size: 20px;
    }

    .metric-value {
        font-size: 24px;
    }

    .balance-amount-large {
        font-size: 28px;
    }

    .data-table {
        min-width: 500px;
    }

    .main-content {
        padding: 12px;
    }

    .metric-card {
        padding: 12px;
    }
}