654 lines
11 KiB
CSS
654 lines
11 KiB
CSS
* {
|
|
margin: 0;
|
|
padding: 0;
|
|
box-sizing: border-box;
|
|
}
|
|
|
|
body {
|
|
width: 400px;
|
|
min-height: 600px;
|
|
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
|
|
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
|
|
background-attachment: fixed;
|
|
color: #333;
|
|
line-height: 1.6;
|
|
margin: 0;
|
|
padding: 0;
|
|
overflow-x: hidden;
|
|
}
|
|
|
|
.container {
|
|
position: relative;
|
|
min-height: 100vh;
|
|
display: flex;
|
|
flex-direction: column;
|
|
}
|
|
|
|
/* Header */
|
|
.header {
|
|
background: rgba(255, 255, 255, 0.95);
|
|
backdrop-filter: blur(20px);
|
|
padding: 20px;
|
|
border-bottom: 1px solid rgba(255, 255, 255, 0.3);
|
|
}
|
|
|
|
.logo {
|
|
display: flex;
|
|
align-items: center;
|
|
margin-bottom: 12px;
|
|
}
|
|
|
|
.logo-icon {
|
|
font-size: 24px;
|
|
margin-right: 12px;
|
|
}
|
|
|
|
.logo h1 {
|
|
font-size: 20px;
|
|
font-weight: 600;
|
|
color: #2d3748;
|
|
}
|
|
|
|
.status-indicator {
|
|
display: flex;
|
|
align-items: center;
|
|
font-size: 14px;
|
|
color: #666;
|
|
}
|
|
|
|
.status-dot {
|
|
width: 8px;
|
|
height: 8px;
|
|
border-radius: 50%;
|
|
background-color: #fbbf24;
|
|
margin-right: 8px;
|
|
animation: pulse 2s infinite;
|
|
}
|
|
|
|
.status-indicator.connected .status-dot {
|
|
background-color: #10b981;
|
|
animation: none;
|
|
}
|
|
|
|
@keyframes pulse {
|
|
0%, 100% { opacity: 1; }
|
|
50% { opacity: 0.5; }
|
|
}
|
|
|
|
/* Sections */
|
|
.section {
|
|
padding: 20px;
|
|
flex: 1;
|
|
}
|
|
|
|
.section:last-child {
|
|
padding-bottom: 20px;
|
|
}
|
|
|
|
.section.hidden {
|
|
display: none;
|
|
}
|
|
|
|
.completely-hidden {
|
|
display: none !important;
|
|
}
|
|
|
|
/* Cards */
|
|
.card {
|
|
background: rgba(255, 255, 255, 0.95);
|
|
backdrop-filter: blur(20px);
|
|
border-radius: 16px;
|
|
padding: 20px;
|
|
margin-bottom: 16px;
|
|
border: 1px solid rgba(255, 255, 255, 0.3);
|
|
box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
|
|
}
|
|
|
|
.card h2, .card h3 {
|
|
margin-bottom: 16px;
|
|
color: #2d3748;
|
|
font-weight: 600;
|
|
}
|
|
|
|
.card h2 {
|
|
font-size: 18px;
|
|
}
|
|
|
|
.card h3 {
|
|
font-size: 16px;
|
|
}
|
|
|
|
/* Forms */
|
|
.form-group {
|
|
margin-bottom: 16px;
|
|
}
|
|
|
|
.form-row {
|
|
display: flex;
|
|
gap: 8px;
|
|
align-items: end;
|
|
}
|
|
|
|
label {
|
|
display: block;
|
|
margin-bottom: 6px;
|
|
font-weight: 500;
|
|
color: #4a5568;
|
|
font-size: 14px;
|
|
}
|
|
|
|
input, select, textarea {
|
|
width: 100%;
|
|
padding: 12px 16px;
|
|
border: 2px solid rgba(255, 255, 255, 0.3);
|
|
border-radius: 12px;
|
|
background: rgba(255, 255, 255, 0.8);
|
|
font-size: 14px;
|
|
transition: all 0.2s ease;
|
|
}
|
|
|
|
input:focus, select:focus, textarea:focus {
|
|
outline: none;
|
|
border-color: #667eea;
|
|
background: rgba(255, 255, 255, 0.95);
|
|
box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
|
|
}
|
|
|
|
.select {
|
|
flex: 1;
|
|
}
|
|
|
|
/* Buttons */
|
|
.btn {
|
|
padding: 12px 24px;
|
|
border: none;
|
|
border-radius: 12px;
|
|
font-size: 14px;
|
|
font-weight: 500;
|
|
cursor: pointer;
|
|
transition: all 0.2s ease;
|
|
text-decoration: none;
|
|
display: inline-flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
}
|
|
|
|
.btn-primary {
|
|
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
|
|
color: white;
|
|
}
|
|
|
|
.btn-primary:hover {
|
|
transform: translateY(-1px);
|
|
box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
|
|
}
|
|
|
|
.btn-secondary {
|
|
background: rgba(255, 255, 255, 0.8);
|
|
color: #4a5568;
|
|
border: 2px solid rgba(102, 126, 234, 0.2);
|
|
}
|
|
|
|
.btn-secondary:hover {
|
|
background: rgba(255, 255, 255, 0.95);
|
|
border-color: rgba(102, 126, 234, 0.4);
|
|
}
|
|
|
|
.btn-ghost {
|
|
background: transparent;
|
|
color: #667eea;
|
|
border: 1px solid rgba(102, 126, 234, 0.3);
|
|
}
|
|
|
|
.btn-ghost:hover {
|
|
background: rgba(102, 126, 234, 0.1);
|
|
}
|
|
|
|
.btn-small {
|
|
padding: 8px 16px;
|
|
font-size: 12px;
|
|
}
|
|
|
|
.btn:disabled {
|
|
opacity: 0.5;
|
|
cursor: not-allowed;
|
|
transform: none !important;
|
|
}
|
|
|
|
.btn.loading {
|
|
position: relative;
|
|
color: transparent !important;
|
|
pointer-events: none;
|
|
}
|
|
|
|
.btn.loading::after {
|
|
content: '';
|
|
position: absolute;
|
|
top: 50%;
|
|
left: 50%;
|
|
width: 16px;
|
|
height: 16px;
|
|
margin: -8px 0 0 -8px;
|
|
border: 2px solid transparent;
|
|
border-top: 2px solid currentColor;
|
|
border-radius: 50%;
|
|
animation: btn-spin 0.8s linear infinite;
|
|
color: white;
|
|
}
|
|
|
|
.btn-secondary.loading::after {
|
|
color: #4a5568;
|
|
}
|
|
|
|
@keyframes btn-spin {
|
|
0% { transform: rotate(0deg); }
|
|
100% { transform: rotate(360deg); }
|
|
}
|
|
|
|
/* Inline Loading Components */
|
|
.inline-loading {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
gap: 8px;
|
|
padding: 8px;
|
|
color: #666;
|
|
font-size: 14px;
|
|
}
|
|
|
|
.inline-spinner {
|
|
width: 16px;
|
|
height: 16px;
|
|
border: 2px solid rgba(102, 126, 234, 0.2);
|
|
border-top: 2px solid #667eea;
|
|
border-radius: 50%;
|
|
animation: btn-spin 0.8s linear infinite;
|
|
}
|
|
|
|
.button-group {
|
|
display: flex;
|
|
gap: 12px;
|
|
}
|
|
|
|
.btn-copy {
|
|
background: transparent;
|
|
border: none;
|
|
cursor: pointer;
|
|
padding: 4px;
|
|
border-radius: 6px;
|
|
transition: background 0.2s ease;
|
|
}
|
|
|
|
.btn-copy:hover {
|
|
background: rgba(102, 126, 234, 0.1);
|
|
}
|
|
|
|
/* Vault Header */
|
|
.vault-header {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
margin-bottom: 20px;
|
|
}
|
|
|
|
.vault-header h2 {
|
|
color: white;
|
|
font-size: 20px;
|
|
font-weight: 600;
|
|
}
|
|
|
|
/* Add Keypair Toggle */
|
|
.add-keypair-toggle {
|
|
margin-bottom: 16px;
|
|
text-align: center;
|
|
}
|
|
|
|
.btn-icon {
|
|
margin-right: 8px;
|
|
font-weight: bold;
|
|
transition: transform 0.2s ease;
|
|
}
|
|
|
|
.add-keypair-form {
|
|
transform: translateY(-10px);
|
|
opacity: 0;
|
|
transition: all 0.3s ease;
|
|
max-height: 0;
|
|
overflow: hidden;
|
|
padding: 0;
|
|
margin-bottom: 0;
|
|
}
|
|
|
|
.add-keypair-form:not(.hidden) {
|
|
transform: translateY(0);
|
|
opacity: 1;
|
|
max-height: 300px;
|
|
padding: 20px;
|
|
margin-bottom: 16px;
|
|
}
|
|
|
|
.form-header {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
margin-bottom: 16px;
|
|
padding-bottom: 12px;
|
|
border-bottom: 1px solid rgba(102, 126, 234, 0.1);
|
|
}
|
|
|
|
.form-header h3 {
|
|
margin: 0;
|
|
color: #2d3748;
|
|
}
|
|
|
|
.btn-close {
|
|
background: none;
|
|
border: none;
|
|
font-size: 20px;
|
|
color: #666;
|
|
cursor: pointer;
|
|
padding: 4px 8px;
|
|
border-radius: 6px;
|
|
transition: all 0.2s ease;
|
|
line-height: 1;
|
|
}
|
|
|
|
.btn-close:hover {
|
|
background: rgba(239, 68, 68, 0.1);
|
|
color: #ef4444;
|
|
}
|
|
|
|
.form-content {
|
|
animation: slideInUp 0.3s ease-out;
|
|
}
|
|
|
|
.form-actions {
|
|
margin-top: 16px;
|
|
display: flex;
|
|
justify-content: flex-end;
|
|
gap: 8px;
|
|
}
|
|
|
|
/* Keypairs List */
|
|
.keypairs-list {
|
|
max-height: 200px;
|
|
overflow-y: auto;
|
|
overflow-x: hidden;
|
|
}
|
|
|
|
.keypair-item {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
padding: 12px;
|
|
border-radius: 8px;
|
|
margin-bottom: 8px;
|
|
background: rgba(102, 126, 234, 0.05);
|
|
border: 1px solid rgba(102, 126, 234, 0.1);
|
|
transition: all 0.2s ease;
|
|
min-width: 0; /* Allow flex items to shrink */
|
|
}
|
|
|
|
.keypair-item:hover {
|
|
background: rgba(102, 126, 234, 0.1);
|
|
transform: translateX(4px);
|
|
}
|
|
|
|
.keypair-item.selected {
|
|
background: rgba(16, 185, 129, 0.1);
|
|
border-color: rgba(16, 185, 129, 0.3);
|
|
transform: translateX(4px);
|
|
}
|
|
|
|
.keypair-item.selected .keypair-name {
|
|
color: #065f46;
|
|
font-weight: 600;
|
|
}
|
|
|
|
.keypair-item.selected .select-btn {
|
|
background: rgba(16, 185, 129, 0.2);
|
|
color: #065f46;
|
|
border-color: rgba(16, 185, 129, 0.3);
|
|
}
|
|
|
|
.keypair-item.selected .select-btn:hover {
|
|
background: rgba(16, 185, 129, 0.3);
|
|
}
|
|
|
|
.keypair-info {
|
|
flex: 1;
|
|
min-width: 0; /* Allow shrinking */
|
|
margin-right: 12px;
|
|
}
|
|
|
|
.keypair-name {
|
|
font-weight: 500;
|
|
color: #2d3748;
|
|
word-break: break-word; /* Break long names */
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
}
|
|
|
|
.keypair-type {
|
|
font-size: 12px;
|
|
color: #666;
|
|
background: rgba(102, 126, 234, 0.1);
|
|
padding: 2px 8px;
|
|
border-radius: 12px;
|
|
margin-top: 4px;
|
|
}
|
|
|
|
.empty-state, .loading {
|
|
text-align: center;
|
|
color: #666;
|
|
font-style: italic;
|
|
padding: 20px;
|
|
}
|
|
|
|
/* Selected Keypair Info */
|
|
.keypair-info .info-row {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
margin-bottom: 8px;
|
|
padding: 8px 0;
|
|
border-bottom: 1px solid rgba(102, 126, 234, 0.1);
|
|
}
|
|
|
|
.keypair-info .info-row:last-child {
|
|
border-bottom: none;
|
|
}
|
|
|
|
.keypair-info label {
|
|
font-weight: 500;
|
|
color: #4a5568;
|
|
margin: 0;
|
|
}
|
|
|
|
.public-key-container, .signature-container {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 8px;
|
|
flex: 1;
|
|
margin-left: 12px;
|
|
}
|
|
|
|
.keypair-info code, .signature-result code {
|
|
background: rgba(102, 126, 234, 0.1);
|
|
padding: 6px 10px;
|
|
border-radius: 6px;
|
|
font-size: 11px;
|
|
word-break: break-all;
|
|
flex: 1;
|
|
color: #2d3748;
|
|
}
|
|
|
|
/* Signature Result */
|
|
.signature-result {
|
|
margin-top: 16px;
|
|
padding: 16px;
|
|
background: rgba(16, 185, 129, 0.1);
|
|
border-radius: 12px;
|
|
border: 1px solid rgba(16, 185, 129, 0.2);
|
|
}
|
|
|
|
.signature-result.hidden {
|
|
display: none;
|
|
}
|
|
|
|
.signature-result label {
|
|
color: #065f46;
|
|
font-weight: 500;
|
|
margin-bottom: 8px;
|
|
}
|
|
|
|
/* Loading Overlay */
|
|
.loading-overlay {
|
|
position: absolute;
|
|
top: 0;
|
|
left: 0;
|
|
right: 0;
|
|
bottom: 0;
|
|
background: rgba(255, 255, 255, 0.95);
|
|
backdrop-filter: blur(8px);
|
|
display: flex;
|
|
flex-direction: column;
|
|
align-items: center;
|
|
justify-content: center;
|
|
z-index: 1000;
|
|
}
|
|
|
|
.loading-overlay.hidden {
|
|
display: none;
|
|
}
|
|
|
|
.spinner {
|
|
width: 40px;
|
|
height: 40px;
|
|
border: 3px solid rgba(102, 126, 234, 0.3);
|
|
border-top: 3px solid #667eea;
|
|
border-radius: 50%;
|
|
animation: spin 1s linear infinite;
|
|
margin-bottom: 16px;
|
|
}
|
|
|
|
@keyframes spin {
|
|
0% { transform: rotate(0deg); }
|
|
100% { transform: rotate(360deg); }
|
|
}
|
|
|
|
/* Toast Notifications */
|
|
.toast {
|
|
position: fixed;
|
|
top: 20px;
|
|
left: 20px;
|
|
right: 20px;
|
|
max-width: 360px;
|
|
margin: 0 auto;
|
|
padding: 12px 16px;
|
|
border-radius: 12px;
|
|
font-size: 14px;
|
|
font-weight: 500;
|
|
text-align: center;
|
|
z-index: 1001;
|
|
transform: translateY(-100px);
|
|
opacity: 0;
|
|
transition: all 0.3s ease;
|
|
backdrop-filter: blur(20px);
|
|
box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
|
|
}
|
|
|
|
.toast:not(.hidden) {
|
|
transform: translateY(0);
|
|
opacity: 1;
|
|
}
|
|
|
|
.toast.success {
|
|
background: rgba(16, 185, 129, 0.9);
|
|
color: white;
|
|
border: 1px solid rgba(16, 185, 129, 1);
|
|
}
|
|
|
|
.toast.error {
|
|
background: rgba(239, 68, 68, 0.9);
|
|
color: white;
|
|
border: 1px solid rgba(239, 68, 68, 1);
|
|
}
|
|
|
|
.toast.info {
|
|
background: rgba(59, 130, 246, 0.9);
|
|
color: white;
|
|
border: 1px solid rgba(59, 130, 246, 1);
|
|
}
|
|
|
|
/* Scrollbar Styles */
|
|
.keypairs-list::-webkit-scrollbar {
|
|
width: 6px;
|
|
}
|
|
|
|
.keypairs-list::-webkit-scrollbar-track {
|
|
background: rgba(102, 126, 234, 0.1);
|
|
border-radius: 3px;
|
|
}
|
|
|
|
.keypairs-list::-webkit-scrollbar-thumb {
|
|
background: rgba(102, 126, 234, 0.3);
|
|
border-radius: 3px;
|
|
}
|
|
|
|
.keypairs-list::-webkit-scrollbar-thumb:hover {
|
|
background: rgba(102, 126, 234, 0.5);
|
|
}
|
|
|
|
/* Responsive adjustments */
|
|
@media (max-width: 400px) {
|
|
body {
|
|
width: 350px;
|
|
}
|
|
|
|
.form-row {
|
|
flex-direction: column;
|
|
gap: 12px;
|
|
}
|
|
|
|
.button-group {
|
|
flex-direction: column;
|
|
}
|
|
}
|
|
|
|
/* Animation for card entrance */
|
|
.card {
|
|
animation: slideInUp 0.3s ease-out;
|
|
}
|
|
|
|
@keyframes slideInUp {
|
|
from {
|
|
transform: translateY(20px);
|
|
opacity: 0;
|
|
}
|
|
to {
|
|
transform: translateY(0);
|
|
opacity: 1;
|
|
}
|
|
}
|
|
|
|
/* Hover effects for better UX */
|
|
.keypair-item {
|
|
position: relative;
|
|
overflow: hidden;
|
|
}
|
|
|
|
.keypair-item::before {
|
|
content: '';
|
|
position: absolute;
|
|
top: 0;
|
|
left: -100%;
|
|
width: 100%;
|
|
height: 100%;
|
|
background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
|
|
transition: left 0.5s;
|
|
}
|
|
|
|
.keypair-item:hover::before {
|
|
left: 100%;
|
|
} |