herbaguard / App.css
HerbaLensModel's picture
Upload 6 files
d66d1b5 verified
Raw
History Blame Contribute Delete
4.5 kB
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
min-height: 100vh;
}
.App {
min-height: 100vh;
padding: 20px;
}
.App-header {
text-align: center;
color: white;
padding: 40px 20px;
}
.App-header h1 {
font-size: 2.5em;
margin-bottom: 10px;
text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
}
.App-header p {
font-size: 1.2em;
opacity: 0.9;
}
.container {
max-width: 1200px;
margin: 0 auto;
padding: 20px;
}
.card {
background: white;
border-radius: 15px;
padding: 30px;
margin-bottom: 30px;
box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}
.card h2 {
color: #667eea;
margin-bottom: 20px;
font-size: 1.8em;
}
/* File Upload */
.upload-section {
margin: 20px 0;
}
.file-label {
display: inline-block;
padding: 12px 30px;
background: #667eea;
color: white;
border-radius: 8px;
cursor: pointer;
transition: all 0.3s;
font-weight: 600;
}
.file-label:hover {
background: #764ba2;
transform: translateY(-2px);
box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}
input[type="file"] {
display: none;
}
/* Metrics */
.metrics {
margin-top: 30px;
padding: 20px;
background: #f8f9fa;
border-radius: 10px;
}
.metrics h3 {
color: #333;
margin-bottom: 15px;
}
.metrics-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
gap: 15px;
}
.metric {
background: white;
padding: 15px;
border-radius: 8px;
display: flex;
flex-direction: column;
box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}
.metric-label {
font-size: 0.9em;
color: #666;
margin-bottom: 5px;
}
.metric-value {
font-size: 1.5em;
font-weight: bold;
color: #667eea;
}
.model-info {
margin-top: 20px;
padding: 15px;
background: #e8f5e9;
border-left: 4px solid #4caf50;
border-radius: 5px;
}
.model-info p {
margin: 5px 0;
color: #2e7d32;
}
/* Form */
.prediction-form {
margin-top: 20px;
}
.form-group {
margin-bottom: 20px;
}
.form-group label {
display: block;
margin-bottom: 8px;
color: #333;
font-weight: 600;
}
.form-group input,
.form-group select {
width: 100%;
padding: 12px;
border: 2px solid #e0e0e0;
border-radius: 8px;
font-size: 1em;
transition: border-color 0.3s;
}
.form-group input:focus,
.form-group select:focus {
outline: none;
border-color: #667eea;
}
.form-row {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
gap: 15px;
}
.predict-btn {
width: 100%;
padding: 15px;
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
color: white;
border: none;
border-radius: 8px;
font-size: 1.1em;
font-weight: 600;
cursor: pointer;
transition: all 0.3s;
margin-top: 20px;
}
.predict-btn:hover:not(:disabled) {
transform: translateY(-2px);
box-shadow: 0 5px 20px rgba(102, 126, 234, 0.4);
}
.predict-btn:disabled {
opacity: 0.6;
cursor: not-allowed;
}
/* Results */
.results {
margin-top: 30px;
padding: 20px;
background: #f8f9fa;
border-radius: 10px;
}
.results h3 {
color: #667eea;
margin-bottom: 20px;
}
.result-section {
margin-bottom: 30px;
}
.result-section h4 {
color: #333;
margin-bottom: 15px;
padding-bottom: 10px;
border-bottom: 2px solid #e0e0e0;
}
.predictions-list {
display: flex;
flex-direction: column;
gap: 12px;
}
.prediction-item {
display: grid;
grid-template-columns: 40px 1fr 2fr 80px;
align-items: center;
gap: 10px;
padding: 10px;
background: white;
border-radius: 8px;
box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}
.prediction-rank {
font-weight: bold;
color: #667eea;
font-size: 1.1em;
}
.prediction-name {
font-size: 0.95em;
color: #333;
}
.prediction-bar {
height: 20px;
background: #e0e0e0;
border-radius: 10px;
overflow: hidden;
}
.prediction-fill {
height: 100%;
background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
transition: width 0.5s ease;
}
.prediction-score {
text-align: right;
font-weight: 600;
color: #667eea;
}
.error-message {
margin-top: 20px;
padding: 15px;
background: #ffebee;
border-left: 4px solid #f44336;
border-radius: 5px;
color: #c62828;
}
/* Responsive */
@media (max-width: 768px) {
.App-header h1 {
font-size: 1.8em;
}
.prediction-item {
grid-template-columns: 30px 1fr;
gap: 8px;
}
.prediction-bar,
.prediction-score {
grid-column: 2;
}
}