Files
spore-ui/public/styles.css

1024 lines
21 KiB
CSS

* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
background: linear-gradient(135deg, #2c3e50 0%, #34495e 50%, #1a252f 100%);
min-height: 100vh;
padding: 1rem;
color: #ecf0f1;
}
.container {
max-width: 1200px;
margin: 0 auto;
}
/* Header styles removed - integrated into navigation */
p {
font-size: 1.2rem;
opacity: 0.9;
margin-bottom: 2rem;
}
.cluster-section {
background: rgba(0, 0, 0, 0.3);
border-radius: 20px;
backdrop-filter: blur(10px);
box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
border: 1px solid rgba(255, 255, 255, 0.1);
padding: 1rem;
margin-bottom: 1rem;
}
.cluster-header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 1rem;
padding-bottom: 1rem;
border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.cluster-header-left {
/* Placeholder for future content if needed */
}
.firmware-header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 2.5rem;
padding-bottom: 1.5rem;
border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.firmware-header-left {
/* Placeholder for future content if needed */
}
.refresh-btn {
background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.05) 100%);
border: 1px solid rgba(255, 255, 255, 0.15);
color: rgba(255, 255, 255, 0.9);
padding: 0.75rem 1.25rem;
border-radius: 12px;
cursor: pointer;
font-size: 0.9rem;
font-weight: 500;
transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
display: flex;
align-items: center;
gap: 0.5rem;
backdrop-filter: blur(10px);
margin: 0;
}
.refresh-btn:hover {
background: linear-gradient(135deg, rgba(255, 255, 255, 0.15) 0%, rgba(255, 255, 255, 0.08) 100%);
border-color: rgba(255, 255, 255, 0.25);
transform: translateY(-2px);
box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}
.refresh-btn:active {
transform: translateY(0);
}
.refresh-icon {
width: 16px;
height: 16px;
stroke: currentColor;
stroke-width: 2;
transition: transform 0.3s ease;
}
.refresh-btn:hover .refresh-icon {
transform: rotate(180deg);
}
.members-grid {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
gap: 1rem;
}
.member-card {
background: rgba(0, 0, 0, 0.2);
border: 1px solid rgba(255, 255, 255, 0.1);
border-radius: 12px;
padding: 1.5rem;
transition: all 0.3s ease;
cursor: pointer;
position: relative;
margin-bottom: 0.5rem;
}
.member-card::before {
content: '';
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: rgba(255, 255, 255, 0.08);
border-radius: 12px;
opacity: 0;
transition: opacity 0.3s ease;
pointer-events: none;
}
.member-card:hover::before {
opacity: 1;
}
.member-card:hover {
box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}
.member-card.expanded {
background: rgba(0, 0, 0, 0.6);
border-color: rgba(255, 255, 255, 0.2);
box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6);
}
.member-card.expanded:hover {
transform: scale(1.02);
}
.expand-icon:hover {
background: rgba(255, 255, 255, 0.1);
color: rgba(255, 255, 255, 0.9);
border-color: rgba(255, 255, 255, 0.2);
}
.expand-icon:hover svg {
}
.member-card.expanded .expand-icon {
background: rgba(255, 255, 255, 0.15);
border-color: rgba(255, 255, 255, 0.25);
color: rgba(255, 255, 255, 0.9);
}
.member-card.expanded .expand-icon svg {
transform: rotate(180deg);
}
.member-header {
display: flex;
justify-content: space-between;
align-items: flex-start;
margin-bottom: 1rem;
}
.member-info {
flex: 1;
}
.expand-icon {
color: rgba(255, 255, 255, 0.7);
cursor: pointer;
transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
margin-left: auto;
padding: 0.25rem;
border-radius: 8px;
background: rgba(255, 255, 255, 0.05);
border: 1px solid rgba(255, 255, 255, 0.1);
display: flex;
align-items: center;
justify-content: center;
}
.expand-icon svg {
width: 20px;
height: 20px;
stroke: currentColor;
stroke-width: 2;
transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.member-details {
display: none;
opacity: 0;
margin-top: 0;
padding-top: 0;
border-top: 1px solid transparent;
transition: opacity 0.3s ease;
}
.member-card.expanded .member-details {
display: block;
opacity: 1;
margin-top: 1rem;
padding-top: 1rem;
border-top: 1px solid rgba(255, 255, 255, 0.2);
}
.detail-row {
display: flex;
justify-content: space-between;
margin-bottom: 0.5rem;
font-size: 0.9rem;
}
.detail-label {
opacity: 0.7;
font-weight: 500;
}
.detail-value {
font-family: 'Courier New', monospace;
opacity: 0.9;
}
.api-endpoints {
margin-top: 1rem;
}
.api-endpoints h4 {
margin-bottom: 0.5rem;
font-size: 0.9rem;
opacity: 0.8;
}
.endpoint-item {
background: rgba(0, 0, 0, 0.3);
padding: 0.5rem;
border-radius: 6px;
margin-bottom: 0.5rem;
font-size: 0.8rem;
font-family: 'Courier New', monospace;
border: 1px solid rgba(255, 255, 255, 0.05);
}
.loading-details {
text-align: center;
padding: 1rem;
opacity: 0.7;
font-size: 0.9rem;
}
.member-name {
font-size: 1.2rem;
font-weight: 600;
margin-bottom: 0.5rem;
color: #fff;
}
.member-ip {
font-size: 0.9rem;
opacity: 0.8;
margin-bottom: 0.5rem;
font-family: 'Courier New', monospace;
}
.member-status {
display: inline-block;
padding: 0.25rem 0.75rem;
border-radius: 20px;
font-size: 0.8rem;
font-weight: 500;
text-transform: uppercase;
letter-spacing: 0.5px;
}
.status-online {
background: rgba(76, 175, 80, 0.3);
color: #4caf50;
border: 1px solid rgba(76, 175, 80, 0.5);
}
.status-offline {
background: rgba(244, 67, 54, 0.3);
color: #f44336;
border: 1px solid rgba(244, 67, 54, 0.5);
}
.member-latency {
font-size: 0.85rem;
margin-top: 0.5rem;
display: flex;
align-items: center;
gap: 0.5rem;
}
.latency-label {
color: rgba(255, 255, 255, 0.7);
font-weight: 500;
}
.latency-value {
color: #ecf0f1;
font-weight: 600;
background: rgba(0, 0, 0, 0.3);
padding: 0.2rem 0.5rem;
border-radius: 4px;
border: 1px solid rgba(255, 255, 255, 0.1);
}
/* Tab Styles */
.tabs-container {
margin-top: 1rem;
background: rgba(255, 255, 255, 0.03);
border-radius: 8px;
padding: 0.5rem;
}
.tabs-header {
display: flex;
border-bottom: 1px solid rgba(255, 255, 255, 0.15);
margin-bottom: 1rem;
gap: 0.5rem;
}
.tab-button {
background: rgba(255, 255, 255, 0.08);
border: 1px solid rgba(255, 255, 255, 0.15);
color: rgba(255, 255, 255, 0.8);
padding: 0.5rem 1rem;
border-radius: 8px 8px 0 0;
cursor: pointer;
font-size: 0.9rem;
transition: all 0.3s ease;
border-bottom: none;
}
.tab-button:hover {
background: rgba(255, 255, 255, 0.15);
color: rgba(255, 255, 255, 0.95);
border-color: rgba(255, 255, 255, 0.25);
}
.tab-button.active {
background: rgba(255, 255, 255, 0.2);
color: #ffffff;
border-color: rgba(255, 255, 255, 0.3);
box-shadow: 0 2px 8px rgba(255, 255, 255, 0.1);
}
.tab-content {
display: none;
padding: 1rem 0;
}
.tab-content.active {
display: block;
}
/* Task Styles */
.task-item {
background: rgba(0, 0, 0, 0.2);
border: 1px solid rgba(255, 255, 255, 0.1);
border-radius: 8px;
padding: 1rem;
margin-bottom: 0.75rem;
}
.task-header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 0.5rem;
}
.task-name {
font-weight: 600;
color: #ecf0f1;
}
.task-status {
font-size: 0.85rem;
padding: 0.25rem 0.5rem;
border-radius: 4px;
font-weight: 500;
}
.task-status.running {
background: rgba(76, 175, 80, 0.2);
color: #4caf50;
border: 1px solid rgba(76, 175, 80, 0.3);
}
.task-status.stopped {
background: rgba(244, 67, 54, 0.2);
color: #f44336;
border: 1px solid rgba(244, 67, 54, 0.3);
}
.task-details {
display: flex;
gap: 1rem;
font-size: 0.8rem;
opacity: 0.8;
}
.task-interval, .task-enabled {
background: rgba(0, 0, 0, 0.2);
padding: 0.2rem 0.5rem;
border-radius: 4px;
border: 1px solid rgba(255, 255, 255, 0.05);
}
/* Firmware Upload Styles */
.firmware-upload h4 {
margin-bottom: 1rem;
color: #ecf0f1;
}
.upload-area {
text-align: center;
padding: 2rem;
border: 2px dashed rgba(255, 255, 255, 0.2);
border-radius: 12px;
background: rgba(0, 0, 0, 0.2);
}
.upload-btn {
background: rgba(255, 255, 255, 0.1);
border: 1px solid rgba(255, 255, 255, 0.2);
color: #ecf0f1;
padding: 0.75rem 1.5rem;
border-radius: 8px;
cursor: pointer;
font-size: 1rem;
transition: all 0.3s ease;
margin-bottom: 1rem;
}
.upload-btn:hover {
background: rgba(255, 255, 255, 0.2);
transform: translateY(-2px);
}
.upload-info {
font-size: 0.9rem;
opacity: 0.7;
color: rgba(255, 255, 255, 0.8);
}
/* Upload Status Styles */
#upload-status {
margin-top: 1rem;
padding: 1rem;
border-radius: 8px;
border: 1px solid rgba(255, 255, 255, 0.1);
}
.upload-progress {
text-align: center;
color: #ffa726;
}
.upload-success {
text-align: center;
color: #4caf50;
background: rgba(76, 175, 80, 0.1);
border: 1px solid rgba(76, 175, 80, 0.2);
padding: 0.75rem;
border-radius: 6px;
}
.upload-error {
text-align: center;
color: #f44336;
background: rgba(244, 67, 54, 0.1);
border: 1px solid rgba(244, 67, 54, 0.2);
padding: 0.75rem;
border-radius: 6px;
}
.upload-btn:disabled {
opacity: 0.6;
cursor: not-allowed;
transform: none !important;
}
.no-tasks {
text-align: center;
padding: 2rem;
opacity: 0.7;
}
.loading-tasks {
text-align: center;
padding: 1rem;
opacity: 0.7;
font-style: italic;
}
.loading {
text-align: center;
padding: 2rem;
opacity: 0.7;
}
.error {
background: rgba(244, 67, 54, 0.2);
border: 1px solid rgba(244, 67, 54, 0.3);
color: #ffcdd2;
padding: 1rem;
border-radius: 8px;
margin-top: 1rem;
}
.empty-state {
text-align: center;
padding: 2rem;
opacity: 0.7;
}
.empty-state-icon {
font-size: 3rem;
margin-bottom: 1rem;
opacity: 0.5;
}
/* Main Navigation Styles */
.main-navigation {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 1rem;
background: rgba(0, 0, 0, 0.2);
border-radius: 16px;
padding: 0.5rem;
border: 1px solid rgba(255, 255, 255, 0.1);
backdrop-filter: blur(10px);
}
.nav-left {
display: flex;
gap: 0.25rem;
}
.nav-right {
display: flex;
align-items: center;
}
.nav-tab {
background: transparent;
border: none;
color: rgba(255, 255, 255, 0.6);
padding: 0.875rem 1.75rem;
border-radius: 12px;
cursor: pointer;
font-size: 0.95rem;
font-weight: 500;
transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
position: relative;
overflow: hidden;
}
.nav-tab::before {
content: '';
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.05) 100%);
opacity: 0;
transition: opacity 0.3s ease;
}
.nav-tab:hover {
color: rgba(255, 255, 255, 0.9);
transform: translateY(-1px);
}
.nav-tab:hover::before {
opacity: 1;
}
.nav-tab.active {
background: rgba(255, 255, 255, 0.15);
color: #ffffff;
box-shadow: 0 4px 20px rgba(255, 255, 255, 0.1);
transform: translateY(-1px);
}
.nav-tab.active::before {
opacity: 0;
}
/* Cluster Status */
.cluster-status {
background: linear-gradient(135deg, rgba(0, 255, 0, 0.15) 0%, rgba(0, 255, 0, 0.08) 100%);
border: 1px solid rgba(0, 255, 0, 0.25);
color: #00ff88;
padding: 0.75rem 1.25rem;
border-radius: 20px;
font-size: 0.9rem;
font-weight: 600;
text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
box-shadow: 0 2px 8px rgba(0, 255, 0, 0.1);
}
/* View Content Styles */
.view-content {
display: none;
}
.view-content.active {
display: block;
}
/* Firmware Section Styles */
.firmware-section {
background: rgba(0, 0, 0, 0.25);
border-radius: 24px;
backdrop-filter: blur(15px);
box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
border: 1px solid rgba(255, 255, 255, 0.08);
padding: 1rem;
margin-bottom: 1rem;
position: relative;
overflow: hidden;
}
.firmware-section::before {
content: '';
position: absolute;
top: 0;
left: 0;
right: 0;
height: 1px;
background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
}
/* Firmware header styles moved to general header section above */
/* Firmware Stats */
.firmware-stats {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
gap: 1.5rem;
margin-bottom: 3rem;
}
.stat-card {
background: linear-gradient(135deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.03) 100%);
border: 1px solid rgba(255, 255, 255, 0.08);
border-radius: 16px;
padding: 2rem 1.5rem;
text-align: center;
position: relative;
overflow: hidden;
transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.stat-card::before {
content: '';
position: absolute;
top: 0;
left: 0;
right: 0;
height: 2px;
background: linear-gradient(90deg, #667eea, #764ba2);
opacity: 0.7;
}
.stat-card:hover {
transform: translateY(-4px);
box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
border-color: rgba(255, 255, 255, 0.15);
}
.stat-title {
font-size: 0.85rem;
color: rgba(255, 255, 255, 0.6);
margin-bottom: 0.75rem;
text-transform: uppercase;
letter-spacing: 1px;
font-weight: 600;
}
.stat-value {
font-size: 2.5rem;
font-weight: 800;
color: #ffffff;
text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}
/* Firmware Actions */
.firmware-actions {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
gap: 2.5rem;
margin-bottom: 3rem;
}
.action-group {
background: rgba(0, 0, 0, 0.2);
border-radius: 20px;
padding: 2rem;
border: 1px solid rgba(255, 255, 255, 0.06);
position: relative;
overflow: hidden;
}
.action-group::before {
content: '';
position: absolute;
top: 0;
left: 0;
right: 0;
height: 1px;
background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);
}
.action-group h3 {
color: #ffffff;
margin-bottom: 1.5rem;
font-size: 1.2rem;
font-weight: 600;
text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}
.upload-area-large {
text-align: center;
padding: 2.5rem;
border: 2px dashed rgba(255, 255, 255, 0.15);
border-radius: 16px;
background: linear-gradient(135deg, rgba(255, 255, 255, 0.03) 0%, rgba(255, 255, 255, 0.01) 100%);
transition: all 0.3s ease;
}
.upload-area-large:hover {
border-color: rgba(255, 255, 255, 0.25);
background: linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.02) 100%);
}
.upload-btn-large {
background: linear-gradient(135deg, rgba(255, 255, 255, 0.15) 0%, rgba(255, 255, 255, 0.08) 100%);
border: 1px solid rgba(255, 255, 255, 0.2);
color: #ffffff;
padding: 1.25rem 2.5rem;
border-radius: 12px;
cursor: pointer;
font-size: 1.1rem;
font-weight: 600;
transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
margin-bottom: 1.5rem;
position: relative;
overflow: hidden;
}
.upload-btn-large::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 ease;
}
.upload-btn-large:hover {
background: linear-gradient(135deg, rgba(255, 255, 255, 0.2) 0%, rgba(255, 255, 255, 0.12) 100%);
transform: translateY(-3px);
box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}
.upload-btn-large:hover::before {
left: 100%;
}
.upload-info-large {
font-size: 0.9rem;
color: rgba(255, 255, 255, 0.7);
line-height: 1.5;
}
/* Target Selection */
.target-selection {
display: flex;
flex-direction: column;
gap: 1.25rem;
}
.target-selection label {
display: flex;
align-items: center;
gap: 0.75rem;
color: rgba(255, 255, 255, 0.9);
cursor: pointer;
padding: 0.75rem;
border-radius: 10px;
transition: all 0.2s ease;
border: 1px solid transparent;
}
.target-selection label:hover {
background: rgba(255, 255, 255, 0.05);
border-color: rgba(255, 255, 255, 0.1);
}
.target-selection input[type="radio"] {
margin: 0;
width: 18px;
height: 18px;
accent-color: #667eea;
}
.target-selection select {
background: linear-gradient(135deg, rgba(0, 0, 0, 0.6) 0%, rgba(0, 0, 0, 0.5) 100%);
border: 1px solid rgba(255, 255, 255, 0.2);
color: #ffffff;
padding: 0.75rem 1rem;
border-radius: 10px;
margin-top: 0.75rem;
font-size: 0.95rem;
transition: all 0.2s ease;
cursor: pointer;
font-weight: 500;
text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}
.target-selection select:hover {
border-color: rgba(255, 255, 255, 0.3);
background: linear-gradient(135deg, rgba(0, 0, 0, 0.7) 0%, rgba(0, 0, 0, 0.6) 100%);
}
.target-selection select:focus {
outline: none;
border-color: #667eea;
box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
background: linear-gradient(135deg, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0.7) 100%);
}
/* Style the dropdown options */
.target-selection select option {
background: #2c3e50;
color: #ffffff;
padding: 0.5rem;
font-size: 0.9rem;
}
.target-selection select option:hover {
background: #34495e;
}
.target-selection select option:checked {
background: #667eea;
color: #ffffff;
}
/* Ensure the select field text is always visible */
.target-selection select:invalid {
color: rgba(255, 255, 255, 0.7);
}
.target-selection select:valid {
color: #ffffff;
}
/* Text shadow already added to main select rule above */
/* Responsive design for smaller screens */
@media (max-width: 768px) {
.header {
flex-direction: column;
gap: 1rem;
text-align: center;
}
h1 {
font-size: 2rem;
}
.status {
padding: 0.5rem 1rem;
font-size: 0.9rem;
}
/* Mobile navigation */
.main-navigation {
flex-direction: column;
gap: 1rem;
padding: 1rem;
}
.nav-left {
flex-direction: column;
gap: 0.25rem;
}
.nav-tab {
padding: 0.75rem 1rem;
font-size: 0.9rem;
border-radius: 10px;
text-align: center;
}
.cluster-status {
padding: 0.5rem 1rem;
font-size: 0.85rem;
}
/* Mobile firmware stats */
.firmware-stats {
grid-template-columns: 1fr;
gap: 1rem;
}
.stat-card {
padding: 1.5rem 1rem;
}
.stat-value {
font-size: 2rem;
}
.firmware-actions {
grid-template-columns: 1fr;
gap: 2rem;
}
.action-group {
padding: 1.5rem;
}
.upload-area-large {
padding: 2rem 1.5rem;
}
.upload-btn-large {
padding: 1rem 2rem;
font-size: 1rem;
}
/* Mobile tab responsiveness */
.tabs-header {
flex-wrap: wrap;
gap: 0.25rem;
padding-bottom: 0.5rem;
}
.tab-button {
flex: 1 1 auto;
min-width: 0;
padding: 0.4rem 0.75rem;
font-size: 0.8rem;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.tabs-container {
padding: 0.25rem;
margin-top: 0.75rem;
}
.tab-content {
padding: 0.75rem 0;
}
/* Mobile member card improvements */
.member-card {
padding: 1rem;
margin-bottom: 0.75rem;
}
.member-info {
gap: 0.25rem;
}
.member-name {
font-size: 1.1rem;
}
.member-ip {
font-size: 0.8rem;
}
.member-latency {
margin-top: 0.4rem;
font-size: 0.8rem;
}
}
/* Extra small screens */
@media (max-width: 480px) {
.tabs-header {
gap: 0.2rem;
}
.tab-button {
padding: 0.35rem 0.6rem;
font-size: 0.75rem;
border-radius: 6px 6px 0 0;
}
.tabs-container {
padding: 0.2rem;
margin-top: 0.5rem;
}
}