refactor: split monolithic App.css into feature-based co-located CSS files

This commit is contained in:
Xiaohan-Tian
2026-04-09 17:31:49 -07:00
parent 58cb4cebef
commit 17610f12f3
28 changed files with 2035 additions and 2029 deletions
+161
View File
@@ -0,0 +1,161 @@
/* File Import Modal */
.file-import-overlay {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
background-color: rgba(0, 0, 0, 0.7);
display: flex;
align-items: center;
justify-content: center;
z-index: 10001;
backdrop-filter: blur(2px);
}
.file-import-modal {
background-color: #2d2d2d;
border: 1px solid #3a3a3a;
border-radius: 8px;
box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
width: 90%;
max-width: 500px;
max-height: 80vh;
overflow: hidden;
animation: fileImportFadeIn 0.2s ease-out;
}
@keyframes fileImportFadeIn {
from {
opacity: 0;
transform: scale(0.95) translateY(-10px);
}
to {
opacity: 1;
transform: scale(1) translateY(0);
}
}
.file-import-header {
display: flex;
justify-content: space-between;
align-items: center;
padding: 20px;
border-bottom: 1px solid #3a3a3a;
background-color: #252525;
}
.file-import-title {
color: #e0e0e0;
font-size: 18px;
font-weight: 600;
margin: 0;
}
.file-import-close-btn {
background: transparent;
border: none;
color: #b0b0b0;
cursor: pointer;
padding: 8px;
border-radius: 4px;
display: flex;
align-items: center;
justify-content: center;
font-size: 16px;
transition: all 0.2s ease;
}
.file-import-close-btn:hover {
background-color: #3a3a3a;
color: #e0e0e0;
}
.file-import-drop-zone {
padding: 40px 20px;
margin: 20px;
border: 2px dashed #555;
border-radius: 8px;
background-color: #1e1e1e;
transition: all 0.3s ease;
cursor: pointer;
}
.file-import-drop-zone:hover {
border-color: #7b68ee;
background-color: rgba(123, 104, 238, 0.05);
}
.file-import-drop-zone.drag-over {
border-color: #7b68ee;
background-color: rgba(123, 104, 238, 0.1);
transform: scale(1.02);
}
.file-import-drop-content {
text-align: center;
color: #e0e0e0;
}
.file-import-icon {
font-size: 48px;
margin-bottom: 16px;
opacity: 0.7;
}
.file-import-description {
font-size: 18px;
font-weight: 500;
margin: 0 0 8px 0;
color: #e0e0e0;
}
.file-import-formats {
font-size: 14px;
color: #b0b0b0;
margin: 0 0 24px 0;
}
.file-import-divider {
position: relative;
margin: 24px 0;
text-align: center;
}
.file-import-divider::before {
content: '';
position: absolute;
top: 0;
left: 0;
right: 0;
height: 1px;
background-color: #3a3a3a;
}
.file-import-divider span {
background-color: #1e1e1e;
padding: 0 12px;
color: #888;
font-size: 12px;
text-transform: uppercase;
letter-spacing: 0.5px;
}
.file-import-browse-btn {
display: inline-block;
background-color: #5a9fd4;
color: #fff;
padding: 12px 24px;
border-radius: 6px;
font-size: 14px;
font-weight: 500;
cursor: pointer;
transition: all 0.2s ease;
border: none;
}
.file-import-browse-btn:hover {
background-color: #4a8fc4;
transform: translateY(-1px);
box-shadow: 0 4px 12px rgba(90, 159, 212, 0.3);
}
@@ -1,4 +1,5 @@
import React, { useCallback, useState } from 'react';
import './FileImportModal.css';
import { FaTimes } from 'react-icons/fa';
interface FileImportModalProps {
+36
View File
@@ -0,0 +1,36 @@
/* Global Loading Overlay */
.global-loading-overlay {
position: fixed;
inset: 0;
background-color: rgba(0, 0, 0, 0.4);
z-index: 20000;
display: flex;
align-items: center;
justify-content: center;
pointer-events: all; /* block interactions */
}
.global-loading-content {
display: flex;
flex-direction: column;
align-items: center;
gap: 10px;
}
.global-loading-spinner {
width: 40px;
height: 40px;
border: 4px solid rgba(255, 255, 255, 0.25);
border-top-color: #ffffff;
border-radius: 50%;
animation: globalSpinner 1s linear infinite;
}
.global-loading-text {
color: #e0e0e0;
font-size: 14px;
}
@keyframes globalSpinner {
to { transform: rotate(360deg); }
}
+1
View File
@@ -1,4 +1,5 @@
import React from 'react';
import './LoadingOverlay.css';
interface LoadingOverlayProps {
visible: boolean;