Origin-Demo / frontend /styles.css
Abhisingh-18's picture
Mirror of github.com/Abhisingh18/Origin-Demo
883856e verified
Raw
History Blame Contribute Delete
13.1 kB
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
:root {
--primary: #667eea;
--primary-dark: #764ba2;
--primary-light: #7c8ff5;
--accent: #f093fb;
--success: #00d4ff;
--danger: #ff6b6b;
--dark: #1a1f3a;
--light: #f8f9ff;
}
body {
font-family: 'Inter', 'Segoe UI', sans-serif;
background: linear-gradient(135deg, #0f0f23 0%, #1a1f3a 50%, #2d1b4e 100%);
min-height: 100vh;
padding: 30px 15px;
color: #333;
position: relative;
overflow-x: hidden;
}
/* Animated background */
body::before {
content: '';
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background:
radial-gradient(circle at 20% 50%, rgba(102, 126, 234, 0.1) 0%, transparent 50%),
radial-gradient(circle at 80% 80%, rgba(240, 147, 251, 0.1) 0%, transparent 50%);
pointer-events: none;
z-index: -1;
animation: float 20s ease-in-out infinite;
}
@keyframes float {
0%, 100% { transform: translate(0, 0); }
50% { transform: translate(30px, 30px); }
}
.container {
max-width: 1400px;
margin: 0 auto;
background: rgba(255, 255, 255, 0.95);
backdrop-filter: blur(10px);
border-radius: 20px;
box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
overflow: hidden;
animation: slideUp 0.8s ease-out;
}
@keyframes slideUp {
from {
opacity: 0;
transform: translateY(30px);
}
to {
opacity: 1;
transform: translateY(0);
}
}
.header {
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
color: white;
padding: 60px 40px;
text-align: center;
position: relative;
overflow: hidden;
}
.header::before {
content: '';
position: absolute;
top: -50%;
right: -50%;
width: 200%;
height: 200%;
background: radial-gradient(circle, rgba(255,255,255,0.1) 1px, transparent 1px);
background-size: 50px 50px;
animation: gridMove 20s linear infinite;
}
@keyframes gridMove {
0% { transform: translate(0, 0); }
100% { transform: translate(50px, 50px); }
}
.header-content {
position: relative;
z-index: 1;
}
.header h1 {
font-size: 3.5em;
margin-bottom: 15px;
font-weight: 800;
letter-spacing: -2px;
text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
animation: slideDown 0.6s ease-out;
}
@keyframes slideDown {
from {
opacity: 0;
transform: translateY(-20px);
}
to {
opacity: 1;
transform: translateY(0);
}
}
.header p {
font-size: 1.3em;
opacity: 0.95;
animation: fadeIn 0.8s ease-out 0.2s both;
}
@keyframes fadeIn {
from { opacity: 0; }
to { opacity: 1; }
}
.main-content {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 40px;
padding: 50px 40px;
min-height: 700px;
}
@media (max-width: 1024px) {
.main-content {
grid-template-columns: 1fr;
padding: 30px 25px;
}
}
.section {
display: flex;
flex-direction: column;
gap: 25px;
animation: fadeIn 0.8s ease-out 0.3s both;
}
.section h2 {
color: #333;
font-size: 2em;
font-weight: 700;
display: flex;
align-items: center;
gap: 12px;
margin-bottom: 10px;
}
.section h2::after {
content: '';
flex: 1;
height: 3px;
background: linear-gradient(90deg, #667eea, #764ba2, transparent);
border-radius: 2px;
}
/* Upload Area - Enhanced */
.upload-area {
border: 2px dashed #667eea;
border-radius: 15px;
padding: 50px 30px;
text-align: center;
cursor: pointer;
transition: all 0.3s ease;
background: linear-gradient(135deg, #f8f9ff 0%, #f0f2ff 100%);
position: relative;
overflow: hidden;
}
.upload-area::before {
content: '';
position: absolute;
top: 0;
left: -100%;
width: 100%;
height: 100%;
background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
transition: left 0.5s ease;
}
.upload-area:hover::before {
left: 100%;
}
.upload-area:hover {
border-color: #764ba2;
background: linear-gradient(135deg, #f0f2ff 0%, #e8ebff 100%);
transform: translateY(-2px);
box-shadow: 0 10px 30px rgba(102, 126, 234, 0.2);
}
.upload-area.dragging {
border-color: #764ba2;
background: #e8ebff;
transform: scale(1.02);
box-shadow: 0 15px 40px rgba(102, 126, 234, 0.3);
}
.upload-area input {
display: none;
}
.upload-icon {
font-size: 4em;
margin-bottom: 15px;
animation: bounce 2s ease-in-out infinite;
}
@keyframes bounce {
0%, 100% { transform: translateY(0); }
50% { transform: translateY(-10px); }
}
.upload-area p {
color: #667eea;
margin-bottom: 8px;
font-weight: 600;
}
.upload-area p strong {
color: #764ba2;
display: block;
font-size: 1.1em;
}
.upload-area .small {
font-size: 0.9em;
color: #999;
}
/* Preview - Enhanced */
.preview-image {
border-radius: 12px;
overflow: hidden;
background: linear-gradient(135deg, #f5f5f5 0%, #e8e8e8 100%);
box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
transition: all 0.3s ease;
position: relative;
}
.preview-image:hover {
transform: scale(1.02);
box-shadow: 0 15px 40px rgba(102, 126, 234, 0.2);
}
.preview-image img {
width: 100%;
height: auto;
display: block;
}
.image-label {
font-size: 0.85em;
color: #667;
text-align: center;
margin-top: 10px;
font-weight: 600;
text-transform: uppercase;
letter-spacing: 1px;
}
/* Controls - Enhanced */
.controls {
display: flex;
flex-direction: column;
gap: 18px;
padding: 25px;
background: #f8f9ff;
border-radius: 12px;
border-left: 4px solid #667eea;
}
label {
display: block;
color: #333;
font-weight: 700;
margin-bottom: 8px;
font-size: 0.95em;
text-transform: uppercase;
letter-spacing: 0.5px;
}
select {
padding: 14px 16px;
border: 2px solid #ddd;
border-radius: 10px;
font-size: 1em;
cursor: pointer;
background: white;
color: #333;
transition: all 0.3s ease;
font-weight: 500;
}
select:hover {
border-color: #667eea;
box-shadow: 0 5px 15px rgba(102, 126, 234, 0.1);
}
select:focus {
outline: none;
border-color: #667eea;
box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}
.button-group {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 12px;
}
button {
padding: 14px 20px;
border: none;
border-radius: 10px;
font-size: 1em;
cursor: pointer;
font-weight: 700;
transition: all 0.3s ease;
text-transform: uppercase;
letter-spacing: 0.5px;
position: relative;
overflow: hidden;
}
button::before {
content: '';
position: absolute;
top: 0;
left: -100%;
width: 100%;
height: 100%;
background: rgba(255, 255, 255, 0.2);
transition: left 0.5s ease;
z-index: -1;
}
button:hover::before {
left: 100%;
}
#predictBtn {
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
color: white;
box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
}
#predictBtn:hover:not(:disabled) {
transform: translateY(-3px);
box-shadow: 0 10px 25px rgba(102, 126, 234, 0.4);
}
#clearBtn {
background: #f0f0f0;
color: #333;
}
#clearBtn:hover {
background: #e0e0e0;
transform: translateY(-2px);
}
button:disabled {
opacity: 0.5;
cursor: not-allowed;
transform: none !important;
}
/* Messages - Enhanced */
.message {
padding: 16px 18px;
border-radius: 10px;
margin-bottom: 15px;
display: none;
border-left: 4px solid;
animation: slideIn 0.3s ease-out;
}
@keyframes slideIn {
from {
opacity: 0;
transform: translateX(-20px);
}
to {
opacity: 1;
transform: translateX(0);
}
}
.message.active {
display: block;
}
.message.success {
background: #d4edda;
color: #155724;
border-left-color: #28a745;
}
.message.error {
background: #f8d7da;
color: #721c24;
border-left-color: #f5c6cb;
}
.message.info {
background: #d1ecf1;
color: #0c5460;
border-left-color: #17a2b8;
}
/* Loading Spinner - Advanced */
.loading {
display: none;
text-align: center;
padding: 40px;
}
.loading.active {
display: block;
}
.spinner {
width: 60px;
height: 60px;
margin: 0 auto 20px;
border: 4px solid #f3f3f3;
border-top: 4px solid #667eea;
border-radius: 50%;
animation: spin 1s linear infinite;
}
@keyframes spin {
0% { transform: rotate(0deg); }
100% { transform: rotate(360deg); }
}
.loading p {
color: #667eea;
font-weight: 600;
font-size: 1.1em;
}
/* Results Section - Enhanced */
.results-section {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 25px;
animation: fadeIn 0.6s ease-out;
}
@media (max-width: 768px) {
.results-section {
grid-template-columns: 1fr;
}
}
.result-item {
border-radius: 12px;
overflow: hidden;
background: #f5f5f5;
box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
transition: all 0.3s ease;
}
.result-item:hover {
transform: translateY(-5px);
box-shadow: 0 15px 40px rgba(102, 126, 234, 0.2);
}
.result-item img {
width: 100%;
height: auto;
display: block;
background: linear-gradient(135deg, #f8f9ff, #f0f2ff);
}
/* Comparison Slider */
.comparison-slider {
position: relative;
width: 100%;
overflow: hidden;
border-radius: 12px;
margin-top: 30px;
}
.img-wrapper {
position: relative;
width: 100%;
}
.img-before {
display: block;
width: 100%;
}
.img-after {
position: absolute;
top: 0;
left: 0;
width: 100%;
}
.img-after img {
width: 100%;
height: auto;
display: block;
}
.slider-handle {
position: absolute;
top: 0;
left: 50%;
width: 3px;
height: 100%;
background: linear-gradient(90deg, #667eea, #f093fb);
cursor: ew-resize;
z-index: 3;
box-shadow: 0 0 10px rgba(102, 126, 234, 0.5);
}
.slider-button {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
width: 50px;
height: 50px;
background: linear-gradient(135deg, #667eea, #764ba2);
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
z-index: 4;
color: white;
font-size: 20px;
}
/* Stats Box - Enhanced */
.stats {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
gap: 15px;
margin-top: 25px;
}
.stat-box {
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
padding: 20px;
border-radius: 12px;
text-align: center;
color: white;
box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
transition: all 0.3s ease;
}
.stat-box:hover {
transform: translateY(-5px);
box-shadow: 0 10px 25px rgba(102, 126, 234, 0.4);
}
.stat-label {
color: rgba(255, 255, 255, 0.8);
font-size: 0.8em;
margin-bottom: 8px;
text-transform: uppercase;
letter-spacing: 0.5px;
}
.stat-value {
font-weight: 700;
font-size: 1.5em;
color: white;
}
/* Footer */
.footer {
background: #f5f5f5;
padding: 30px 40px;
text-align: center;
color: #666;
font-size: 0.9em;
border-top: 1px solid #ddd;
}
.footer p {
margin: 5px 0;
}
.footer code {
background: #e8e8e8;
padding: 4px 8px;
border-radius: 4px;
font-family: 'Monaco', monospace;
color: #667eea;
}
.hidden {
display: none !important;
}
/* Smooth scrollbar */
::-webkit-scrollbar {
width: 10px;
}
::-webkit-scrollbar-track {
background: #f1f1f1;
}
::-webkit-scrollbar-thumb {
background: #667eea;
border-radius: 5px;
}
::-webkit-scrollbar-thumb:hover {
background: #764ba2;
}
/* Tooltip */
.tooltip {
position: relative;
display: inline-block;
cursor: help;
}
.tooltip .tooltiptext {
visibility: hidden;
width: 200px;
background-color: #333;
color: #fff;
text-align: center;
border-radius: 6px;
padding: 8px;
position: absolute;
z-index: 1;
bottom: 125%;
left: 50%;
margin-left: -100px;
opacity: 0;
transition: opacity 0.3s;
font-size: 0.85em;
}
.tooltip:hover .tooltiptext {
visibility: visible;
opacity: 1;
}