/* Light theme (default) */ :root { /* Background colors */ --bg-primary: #667eea; --bg-secondary: #764ba2; --bg-sidebar: #ffffff; --bg-nav-item: #f8f9fa; --bg-nav-hover: #e9ecef; --bg-nav-active: #3498db; --bg-nav-active-border: #2980b9; --bg-main-content: #fafafa; --bg-status-card: #f5f5f5; --bg-info-card: #ffffff; --bg-logout: #dc3545; --bg-logout-hover: #c82333; --bg-lang-switcher: rgba(255, 255, 255, 0.2); --bg-lang-btn-hover: rgba(255, 255, 255, 0.3); --bg-lang-btn-active: rgba(255, 255, 255, 0.4); /* Status background colors */ --bg-success: #d4edda; --bg-error: #f8d7da; --bg-warning: #fff3cd; --bg-success-dark: #28a745; --bg-error-dark: #dc3545; --bg-warning-dark: #ffc107; /* Border colors */ --border-sidebar: #e0e0e0; --border-nav-item: #dee2e6; --border-main: #e0e0e0; --border-card: #e0e0e0; --border-hover: #3498db; --border-footer: #dee2e6; --border-logout: #c82333; --border-lang: rgba(255, 255, 255, 0.3); --border-success: #c3e6cb; --border-error: #f5c6cb; --border-warning: #ffeaa7; /* Text colors */ --text-primary: #333; --text-white: white; --text-nav: #495057; --text-heading: #343a40; --text-body: #495057; --text-muted: #6c757d; --text-success: #155724; --text-error: #721c24; --text-warning: #856404; /* Shadow colors */ --shadow-light: rgba(0, 0, 0, 0.1); --shadow-medium: rgba(0, 0, 0, 0.15); --shadow-dark: rgba(0, 0, 0, 0.2); --shadow-heavy: rgba(0, 0, 0, 0.3); } /* Dark theme */ [data-theme="dark"] { /* Background colors */ --bg-primary: #2c3e50; --bg-secondary: #34495e; --bg-sidebar: #37474f; --bg-nav-item: #455a64; --bg-nav-hover: #546e7a; --bg-nav-active: #3498db; --bg-nav-active-border: #2980b9; --bg-main-content: #37474f; --bg-status-card: #455a64; --bg-info-card: #455a64; --bg-logout: #dc3545; --bg-logout-hover: #c82333; --bg-lang-switcher: rgba(0, 0, 0, 0.3); --bg-lang-btn-hover: rgba(255, 255, 255, 0.1); --bg-lang-btn-active: rgba(255, 255, 255, 0.2); /* Status background colors */ --bg-success: #155724; --bg-error: #721c24; --bg-warning: #856404; --bg-success-dark: #28a745; --bg-error-dark: #dc3545; --bg-warning-dark: #ffc107; /* Border colors */ --border-sidebar: #455a64; --border-nav-item: #546e7a; --border-main: #455a64; --border-card: #546e7a; --border-hover: #3498db; --border-footer: #546e7a; --border-logout: #c82333; --border-lang: rgba(255, 255, 255, 0.3); --border-success: #c3e6cb; --border-error: #f5c6cb; --border-warning: #ffeaa7; /* Text colors */ --text-primary: #333; --text-white: white; --text-nav: #eceff1; --text-heading: #eceff1; --text-body: #cfd8dc; --text-muted: #b0bec5; --text-success: #d4edda; --text-error: #f8d7da; --text-warning: #fff3cd; /* Shadow colors */ --shadow-light: rgba(0, 0, 0, 0.2); --shadow-medium: rgba(0, 0, 0, 0.3); --shadow-dark: rgba(0, 0, 0, 0.4); --shadow-heavy: rgba(0, 0, 0, 0.5); } * { margin: 0; padding: 0; box-sizing: border-box; } body { font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%); height: 100vh; color: var(--text-primary); overflow: hidden; /* Prevent body scroll */ } .container { display: grid; grid-template-columns: 250px 1fr; grid-template-rows: auto 1fr auto; grid-template-areas: "header header" "sidebar main" "footer footer"; height: 100vh; width: 100vw; } header { grid-area: header; color: var(--text-white); padding: 20px; background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%); box-shadow: 0 2px 4px var(--shadow-medium); z-index: 100; } .header-content { display: flex; justify-content: space-between; align-items: center; text-align: left; } .header-actions { display: flex; align-items: center; gap: 15px; } .controls-group { display: flex; background: var(--bg-lang-switcher); border-radius: 2px; padding: 2px; border: 1px solid var(--border-lang); gap: 2px; align-items: center; } .theme-btn { background: transparent; color: var(--text-white); border: none; padding: 6px 12px; border-radius: 1px; cursor: pointer; font-size: 12px; font-weight: 600; transition: background 0.2s ease; display: flex; align-items: center; justify-content: center; } .theme-btn:hover { background: var(--bg-lang-btn-hover); } .theme-icon { display: block; transition: transform 0.3s ease; font-size: 12px; } .lang-btn { background: transparent; color: var(--text-white); border: none; padding: 6px 12px; border-radius: 1px; cursor: pointer; font-size: 12px; font-weight: 600; transition: background 0.2s ease; } .lang-btn:hover { background: var(--bg-lang-btn-hover); } .lang-btn.active { background: var(--bg-lang-btn-active); } .logout-btn-header { background: var(--bg-logout); color: var(--text-white); border: none; padding: 6px 12px; border-radius: 1px; cursor: pointer; font-size: 12px; font-weight: 600; transition: background 0.2s ease; display: flex; align-items: center; justify-content: center; margin-left: 2px; } .logout-btn-header:hover { background: var(--bg-logout-hover); } .header-content > div:first-child { text-align: center; flex: 1; } header h1 { font-size: 2.2rem; margin-bottom: 10px; text-shadow: 1px 1px 2px var(--shadow-heavy); font-weight: 700; letter-spacing: -0.5px; } header p { font-size: 1.2rem; opacity: 0.9; } .action-btn { background: var(--bg-nav-active); color: var(--text-white); border: 1px solid var(--bg-nav-active-border); padding: 8px 16px; border-radius: 4px; cursor: pointer; font-size: 14px; font-weight: 500; transition: all 0.2s ease; margin-top: 10px; } .action-btn:hover { background: var(--bg-nav-active-border); border-color: var(--bg-nav-active-border); transform: translateY(-1px); } /* Notification system */ .notifications-container { position: fixed; bottom: 20px; right: 20px; z-index: 1000; max-width: 350px; } .notification { background: var(--bg-info-card); border: 1px solid var(--border-card); border-radius: 8px; padding: 16px; margin-bottom: 12px; box-shadow: 0 4px 12px var(--shadow-medium); display: flex; align-items: flex-start; gap: 12px; animation: slideIn 0.3s ease-out; position: relative; overflow: hidden; } .notification::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--bg-nav-active); } .notification.success::before { background: var(--bg-success-dark); } .notification.error::before { background: var(--bg-error-dark); } .notification.warning::before { background: var(--bg-warning-dark); } .notification.info::before { background: var(--bg-nav-active); } .notification-icon { font-size: 20px; line-height: 1; flex-shrink: 0; margin-top: 2px; } .notification-content { flex: 1; color: var(--text-primary); } .notification-title { font-weight: 600; margin-bottom: 4px; font-size: 14px; color: var(--text-body); } .notification-message { font-size: 13px; line-height: 1.4; color: var(--text-body); } .notification-close { background: none; border: none; color: var(--text-muted); cursor: pointer; font-size: 18px; line-height: 1; padding: 0; margin-left: 8px; transition: color 0.2s ease; } .notification-close:hover { color: var(--text-primary); } @keyframes slideIn { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } } @keyframes slideOut { from { transform: translateX(0); opacity: 1; max-height: 200px; margin-bottom: 12px; } to { transform: translateX(100%); opacity: 0; max-height: 0; margin-bottom: 0; } } .notification.removing { animation: slideOut 0.3s ease-in forwards; } [data-theme="dark"] .notification { background: var(--bg-sidebar); border-color: var(--border-sidebar); box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4); } /* Mobile responsiveness for notifications */ @media (max-width: 768px) { .notifications-container { bottom: 10px; right: 10px; left: 10px; max-width: none; } .notification { padding: 12px; font-size: 14px; } .notification-title { font-size: 13px; } .notification-message { font-size: 12px; } .notification-icon { font-size: 18px; } } .sidebar { grid-area: sidebar; background: var(--bg-sidebar); padding: 20px; box-shadow: 2px 0 4px var(--shadow-light); border-right: 1px solid var(--border-sidebar); overflow-y: auto; } .nav-menu { display: flex; flex-direction: column; gap: 10px; } .nav-item { display: flex; align-items: center; gap: 12px; padding: 12px 16px; background: var(--bg-nav-item); border-radius: 2px; cursor: pointer; transition: background 0.2s ease; color: var(--text-nav); border: 1px solid var(--border-nav-item); font-weight: 500; } .nav-item:hover { background: var(--bg-nav-hover); } .nav-item.active { background: var(--bg-nav-active); border-color: var(--bg-nav-active-border); color: var(--text-white); } .nav-icon { font-size: 20px; } .nav-text { font-weight: 500; font-size: 16px; } .main-content { grid-area: main; background: var(--bg-main-content); padding: 30px; overflow-y: auto; } .content-section { display: none; } .content-section.active { display: block; } .status-card { background: var(--bg-status-card); border-radius: 2px 2px 0px 0px; padding: 10px; margin-bottom: 30px; text-align: center; box-shadow: 0 1px 4px var(--shadow-light); margin-top: -30px; margin-left: -30px; margin-right: -30px; } .status-card h2 { color: var(--text-heading); font-weight: 700; margin-bottom: 5px; font-size: 1.3rem; } .status-card p { color: var(--text-body); font-weight: 500; font-size: 0.7rem; } .status-indicator { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 15px 0; } .status-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--text-muted); } .status-dot.active { background: var(--bg-nav-active); animation: pulse 2s infinite; } @keyframes pulse { 0% { opacity: 1; } 50% { opacity: 0.5; } 100% { opacity: 1; } } .info-grid { display: grid; grid-template-columns: 1fr; gap: 20px; } .info-card { background: var(--bg-info-card); border: 1px solid var(--border-card); border-radius: 4px; padding: 20px; text-align: center; transition: box-shadow 0.2s ease; box-shadow: 0 1px 4px var(--shadow-light); } .info-card:hover { box-shadow: 0 2px 8px var(--shadow-medium); border-color: var(--border-hover); } .info-card h3 { color: var(--text-heading); margin-bottom: 10px; font-weight: 600; font-size: 1.1rem; } .info-card p { color: var(--text-body); margin-bottom: 10px; font-weight: 500; } .info-card small { color: var(--text-muted); font-weight: 500; text-transform: uppercase; font-size: 0.75rem; letter-spacing: 0.5px; } .mobile-controls { display: none; } footer { grid-area: footer; text-align: center; color: var(--text-white); opacity: 0.8; padding: 15px; background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%); border-top: 1px solid var(--border-footer); } @media (max-width: 768px) { body { overflow: auto; /* Allow body scroll on mobile */ } .container { display: block; /* Reset grid for mobile */ padding: 10px; height: auto; width: auto; min-height: 100vh; } .header-content { flex-direction: column; gap: 15px; } .header-actions { display: none; } .controls-group { flex-wrap: wrap; justify-content: center; } .header-content > div:first-child { text-align: center; } header { padding: 20px 10px; margin-bottom: 40px; } header h1 { font-size: 1.8rem; } header p { font-size: 1rem; } .sidebar { min-width: auto; padding: 15px; border-right: none; border-bottom: 1px solid var(--border-sidebar); box-shadow: 0 2px 4px var(--shadow-light); margin-bottom: 15px; } .nav-menu { display: flex; flex-direction: row; gap: 8px; margin-bottom: 0; justify-content: space-around; } .nav-item { justify-content: center; padding: 12px; min-height: 50px; min-width: 50px; flex: 1; text-align: center; } .nav-text { display: none; } .nav-icon { font-size: 20px; } .main-content { padding: 20px 15px; overflow-y: visible; height: auto; margin-bottom: 15px; } .status-card { margin-left: -15px; margin-right: -15px; margin-top: -20px; padding: 15px; } .status-card h2 { font-size: 1.1rem; } .status-card p { font-size: 0.75rem; } .info-grid { grid-template-columns: 1fr; gap: 15px; } .info-card { padding: 15px; } .info-card h3 { font-size: 1rem; margin-bottom: 8px; } .info-card p { font-size: 0.9rem; margin-bottom: 8px; word-break: break-word; } .info-card small { font-size: 0.7rem; } .peers-container { margin-top: 1.5rem; } .peer-item { padding: 12px; } .peer-header { flex-direction: column; align-items: flex-start; gap: 8px; margin-bottom: 0.5rem; } .peer-address-section { width: 100%; } .peer-address { font-size: 0.8rem; word-break: break-all; margin-bottom: 0.125rem; } .peer-key { font-size: 0.7rem; } .peer-status-section { flex-direction: row; align-items: center; gap: 0.5rem; align-self: flex-start; } .peer-status { font-size: 0.7rem; padding: 0.2rem 0.5rem; } .peer-direction { font-size: 0.7rem; padding: 0.15rem 0.4rem; } .peer-uri { font-size: 0.75rem; padding: 0.375rem; } .peer-info-grid { grid-template-columns: 1fr; gap: 0.75rem; margin-top: 0.375rem; } .peer-info-section { padding: 0.5rem; } .peer-info-title { font-size: 0.75rem; margin-bottom: 0.375rem; } .peer-info-stats { gap: 0.25rem; } .info-item { font-size: 0.7rem; } .info-label { flex: 1; } .info-value { font-size: 0.7rem; } .peer-remove-btn { padding: 0.4rem 0.8rem; font-size: 0.75rem; } .mobile-controls { display: flex; justify-content: center; margin: 0px 0px 20px 0px; } footer { padding: 15px 10px; } .mobile-controls .controls-group { background: var(--bg-lang-switcher); border-radius: 4px; padding: 4px; border: 1px solid var(--border-lang); gap: 4px; } } /* Additional mobile optimizations for very small screens */ @media (max-width: 480px) { .container { padding: 8px; } header h1 { font-size: 1.6rem; margin-bottom: 8px; } header p { font-size: 0.9rem; } .mobile-controls .controls-group { width: auto; justify-content: center; } .mobile-controls .theme-btn, .mobile-controls .lang-btn, .mobile-controls .logout-btn-header { padding: 8px 12px; font-size: 11px; } .mobile-controls .logout-btn-header:before { font-size: 11px; } .sidebar { padding: 10px; } .nav-menu { gap: 6px; } .nav-item { padding: 10px; min-height: 45px; min-width: 45px; } .nav-icon { font-size: 18px; } .main-content { padding: 15px 10px; } .status-card { margin-left: -10px; margin-right: -10px; margin-top: -15px; padding: 12px; } .status-card h2 { font-size: 1rem; } .info-card { padding: 12px; } .info-card h3 { font-size: 0.95rem; } .info-card p { font-size: 0.85rem; } #node-key, #node-version, #node-address, #node-subnet, #routing-entries, #peers-count, #peers-online { font-size: 0.8rem; word-break: break-all; } .peer-item { padding: 10px; } .peer-address { font-size: 0.75rem; } .notifications-container { bottom: 8px; right: 8px; left: 8px; } .notification { padding: 10px; } .notification-title { font-size: 12px; } .notification-message { font-size: 11px; } } /* Alternative background solution for mobile devices */ @media (max-width: 768px) { html { height: 100%; } body { position: relative; background: none; min-height: 100vh; } body::before { content: ''; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%); z-index: -1; } } /* Landscape orientation optimizations for mobile */ @media (max-width: 768px) and (orientation: landscape) { .header-actions { display: flex; justify-content: center; } .mobile-controls { display: none; } .container { display: grid; grid-template-columns: 200px 1fr; grid-template-rows: auto 1fr auto; } .sidebar { min-width: 200px; max-width: 250px; border-right: 1px solid var(--border-sidebar); border-bottom: none; margin-bottom: 0; } .nav-menu { grid-template-columns: 1fr; gap: 6px; } .nav-item { padding: 8px 10px; min-height: auto; } .nav-text { font-size: 12px; } .main-content { overflow-y: auto; } } /* Peers container and list styles */ .peers-container { margin-top: 2rem; } .peers-container h3 { color: var(--text-heading); margin-bottom: 1rem; font-size: 1.1rem; } .peers-list { display: flex; flex-direction: column; gap: 1rem; } .peer-item { background: var(--bg-info-card); border: 1px solid var(--border-card); border-radius: 8px; padding: 1rem; box-shadow: 0 2px 4px var(--shadow-light); transition: all 0.2s; } .peer-item:hover { border-color: var(--border-hover); box-shadow: 0 4px 8px var(--shadow-medium); } .peer-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 0.75rem; gap: 1rem; } .peer-address-section { flex: 1; min-width: 0; } .peer-address { font-family: 'Courier New', monospace; font-weight: bold; color: var(--text-heading); font-size: 0.9rem; margin-bottom: 0.25rem; } .peer-key { font-family: 'Courier New', monospace; font-size: 0.8rem; color: var(--text-muted); word-break: break-all; } .peer-status-section { display: flex; flex-direction: column; align-items: flex-end; gap: 0.25rem; } .peer-status { padding: 0.25rem 0.75rem; font-size: 0.8rem; font-weight: bold; white-space: nowrap; } .peer-status.status-online { color: var(--text-success); } .peer-status.status-offline { background: var(--bg-error); color: var(--text-error); border: 1px solid var(--border-error); } .peer-direction { font-size: 0.75rem; font-weight: 600; padding: 0.2rem 0.5rem; white-space: nowrap; } .peer-direction.inbound { background: var(--bg-nav-item); color: var(--text-nav); } .peer-direction.outbound { background: var(--bg-nav-item); color: var(--text-nav); } [data-theme="dark"] .peer-status.status-online { color: var(--text-success); } [data-theme="dark"] .peer-status.status-offline { background: var(--bg-error); color: var(--text-error); } .peer-details { display: flex; flex-direction: column; gap: 0.75rem; } .peer-uri { font-family: 'Courier New', monospace; font-size: 0.85rem; color: var(--text-muted); word-break: break-all; padding: 0.5rem; background: var(--bg-nav-item); border-radius: 4px; border: 1px solid var(--border-nav-item); } .peer-info-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 1rem; margin-top: 0.5rem; } .peer-info-section { background: var(--bg-nav-item); border: 1px solid var(--border-nav-item); border-radius: 6px; padding: 0.75rem; } .peer-info-title { font-weight: 600; font-size: 0.85rem; color: var(--text-heading); margin-bottom: 0.5rem; text-transform: uppercase; letter-spacing: 0.5px; } .peer-info-stats { display: flex; flex-direction: column; gap: 0.375rem; } .info-item { display: flex; justify-content: space-between; align-items: center; font-size: 0.8rem; } .info-label { color: var(--text-body); font-weight: 500; } .info-value { font-family: 'Courier New', monospace; font-weight: bold; color: var(--text-heading); } /* Quality indicators */ .quality-excellent .info-value { color: var(--text-success); } .quality-good .info-value { color: var(--bg-nav-active); } .quality-fair .info-value { color: var(--text-warning); } .quality-poor .info-value { color: var(--text-error); } .quality-unknown .info-value { color: var(--text-muted); } .peer-remove-btn { background: var(--bg-logout); color: var(--text-white); border: none; padding: 0.5rem 1rem; border-radius: 4px; font-size: 0.8rem; cursor: pointer; margin-top: 0.5rem; align-self: flex-start; transition: all 0.2s; } .peer-remove-btn:hover { background: var(--bg-logout-hover); } .no-data { text-align: center; color: var(--text-muted); font-style: italic; padding: 2rem; } .loading { text-align: center; color: var(--text-muted); font-style: italic; padding: 1rem; } /* Status indicators */ #node-key, #node-version, #node-address, #node-subnet, #routing-entries, #peers-count, #peers-online { font-family: 'Courier New', monospace; font-weight: bold; color: var(--text-heading); } /* Copyable fields styling */ .copyable-field { cursor: pointer; padding: 2px 4px; border-radius: 3px; transition: all 0.2s ease; position: relative; } .copyable-field:hover { background: var(--bg-nav-hover); color: var(--border-hover); } .copyable-field:active { transform: scale(0.98); } /* Peer copyable fields */ .peer-address.copyable, .peer-key.copyable { cursor: pointer; padding: 2px 4px; border-radius: 3px; transition: all 0.2s ease; } .peer-address.copyable:hover, .peer-key.copyable:hover { background: var(--bg-nav-hover); color: var(--border-hover); } .peer-address.copyable:active, .peer-key.copyable:active { transform: scale(0.98); } /* Copy button styling */ button[onclick="copyNodeKey()"] { background: var(--bg-nav-item); border: 1px solid var(--border-card); cursor: pointer; border-radius: 3px; transition: all 0.2s; } button[onclick="copyNodeKey()"]:hover { background: var(--bg-nav-hover); border-color: var(--border-hover); } /* Responsive design for peer items */ @media (max-width: 768px) { }