CNN2 / static /style.css
d-e-e-k-11's picture
Upload folder using huggingface_hub
a0d2afd verified
:root {
--primary: #6366f1;
--primary-hover: #4f46e5;
--bg-dark: #0f172a;
--card-bg: rgba(30, 41, 59, 0.7);
--text-main: #f8fafc;
--text-dim: #94a3b8;
--glass-border: rgba(255, 255, 255, 0.1);
--accent: #f43f5e;
}
* {
margin: 0;
padding: 0;
box-sizing: border-box;
font-family: 'Inter', system-ui, -apple-system, sans-serif;
}
body {
background-color: var(--bg-dark);
color: var(--text-main);
background: radial-gradient(circle at top right, #1e1b4b, #0f172a);
min-height: 100vh;
display: flex;
flex-direction: column;
align-items: center;
padding: 2rem;
}
.container {
width: 100%;
max-width: 900px;
}
header {
text-align: center;
margin-bottom: 3rem;
animation: fadeInDown 0.8s ease-out;
}
h1 {
font-size: 3rem;
font-weight: 800;
background: linear-gradient(to right, #818cf8, #c084fc);
-webkit-background-clip: text;
background-clip: text;
-webkit-text-fill-color: transparent;
margin-bottom: 0.5rem;
}
header p {
color: var(--text-dim);
font-size: 1.1rem;
}
.main-card {
background: var(--card-bg);
backdrop-filter: blur(12px);
border: 1px solid var(--glass-border);
border-radius: 1.5rem;
padding: 2.5rem;
box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
animation: scaleUp 0.6s ease-out;
}
.upload-area {
border: 2px dashed #475569;
border-radius: 1rem;
padding: 3rem;
text-align: center;
transition: all 0.3s ease;
cursor: pointer;
background: rgba(255, 255, 255, 0.02);
}
.upload-area:hover,
.upload-area.drag-over {
border-color: var(--primary);
background: rgba(99, 102, 241, 0.05);
}
.upload-area i {
font-size: 3rem;
color: var(--primary);
margin-bottom: 1rem;
}
.prediction-results {
margin-top: 2rem;
display: none;
animation: fadeIn 0.5s ease-out;
}
.image-preview {
max-width: 256px;
border-radius: 0.75rem;
margin: 0 auto 1.5rem;
display: block;
box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.3);
}
.result-header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 1.5rem;
padding-bottom: 1rem;
border-bottom: 1px solid var(--glass-border);
}
.class-tag {
background: var(--primary);
padding: 0.5rem 1rem;
border-radius: 2rem;
font-size: 1.2rem;
font-weight: 600;
}
.confidence-bar-container {
height: 8px;
background: #1e293b;
border-radius: 1rem;
overflow: hidden;
margin-top: 0.5rem;
}
.confidence-bar {
height: 100%;
background: linear-gradient(to right, #6366f1, #a855f7);
width: 0%;
transition: width 1s cubic-bezier(0.4, 0, 0.2, 1);
}
@keyframes fadeInDown {
from {
opacity: 0;
transform: translateY(-20px);
}
to {
opacity: 1;
transform: translateY(0);
}
}
@keyframes scaleUp {
from {
opacity: 0;
transform: scale(0.95);
}
to {
opacity: 1;
transform: scale(1);
}
}
@keyframes fadeIn {
from {
opacity: 0;
}
to {
opacity: 1;
}
}
.hidden {
display: none;
}
button#predict-btn {
background: var(--primary);
color: white;
border: none;
padding: 1rem 2rem;
border-radius: 0.75rem;
font-weight: 600;
font-size: 1rem;
cursor: pointer;
transition: all 0.2s;
margin-top: 1.5rem;
width: 100%;
}
button#predict-btn:hover {
background: var(--primary-hover);
transform: translateY(-2px);
box-shadow: 0 10px 15px -3px rgba(99, 102, 241, 0.4);
}
button#predict-btn:disabled {
opacity: 0.5;
cursor: not-allowed;
transform: none;
}