GAN_Project / frontend /src /App.css
Utkarsh64's picture
Upload 21 files
e6bc6be verified
@import url("https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Plus+Jakarta+Sans:wght@600;700;800&display=swap");
/* ==================== LAYOUT & STRUCTURE ==================== */
.app-container {
display: flex;
flex-direction: column;
min-height: 100vh;
background: var(--bg-gradient);
color: var(--text-primary);
font-family: var(--body-font);
overflow-x: hidden;
}
.app-header {
padding: 32px 20px;
background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(139, 92, 246, 0.1));
border-bottom: 1px solid var(--border-light);
position: relative;
animation: slideDown 600ms ease-out;
}
.header-content {
max-width: 1200px;
margin: 0 auto;
}
.logo-section {
display: flex;
align-items: center;
gap: 12px;
margin-bottom: 8px;
}
.logo-icon {
font-size: 28px;
animation: float 3s ease-in-out infinite;
}
.app-title {
font-size: 24px;
font-weight: 700;
margin: 0;
background: linear-gradient(135deg, #3b82f6, #8b5cf6);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
background-clip: text;
}
.brand-image {
width: 64px;
height: 28px;
border-radius: 8px;
background:
linear-gradient(90deg, rgba(17, 24, 39, 0.75) 0 50%, rgba(59, 130, 246, 0.35) 50% 100%);
border: 1px solid rgba(59, 130, 246, 0.35);
box-shadow: 0 6px 18px rgba(15, 23, 42, 0.25);
position: relative;
overflow: hidden;
}
.brand-image::after {
content: "";
position: absolute;
top: 0;
bottom: 0;
left: 50%;
width: 2px;
background: rgba(255, 255, 255, 0.65);
transform: translateX(-1px);
}
.app-tagline {
margin: 0;
color: var(--text-secondary);
font-size: 14px;
font-weight: 500;
}
.app-shell {
flex: 1;
max-width: 1100px;
width: 100%;
margin: 0 auto;
padding: 48px 24px;
display: flex;
flex-direction: column;
gap: 40px;
}
/* ==================== HERO SECTION ==================== */
.hero-section {
text-align: center;
animation: slideUp 600ms ease-out;
}
.hero-content {
max-width: 700px;
margin: 0 auto;
}
.eyebrow {
text-transform: uppercase;
letter-spacing: 0.12em;
font-size: 12px;
font-weight: 700;
color: #3b82f6;
margin: 0 0 12px;
animation: slideUp 600ms ease-out backwards;
animation-delay: 50ms;
}
.hero-title {
font-size: clamp(28px, 6vw, 48px);
font-weight: 800;
letter-spacing: -0.02em;
line-height: 1.1;
margin: 0 0 16px;
background: linear-gradient(135deg, #1e293b, #3b82f6);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
background-clip: text;
animation: slideUp 600ms ease-out 100ms both;
}
.hero-description {
font-size: 16px;
line-height: 1.6;
color: var(--text-secondary);
margin: 0 0 24px;
animation: slideUp 600ms ease-out 200ms both;
}
.feature-pills {
display: flex;
gap: 12px;
justify-content: center;
flex-wrap: wrap;
margin-top: 28px;
}
/* ==================== LOSSES SECTION ==================== */
.losses-section {
background: rgba(15, 23, 42, 0.85);
border: 1px solid rgba(148, 163, 184, 0.2);
border-radius: 18px;
padding: 22px;
display: flex;
flex-direction: column;
gap: 16px;
animation: slideUp 600ms ease-out 120ms both;
}
.losses-header h3 {
margin: 0;
font-size: 18px;
font-weight: 700;
color: #f8fafc;
}
.losses-subtitle {
margin: 6px 0 0;
font-size: 13px;
color: rgba(226, 232, 240, 0.75);
}
.loss-grid {
display: grid;
grid-template-columns: repeat(2, minmax(0, 1fr));
gap: 16px;
}
.loss-card {
padding: 16px;
border-radius: 12px;
background: rgba(15, 23, 42, 0.85);
border: 1px solid rgba(148, 163, 184, 0.25);
display: flex;
flex-direction: column;
gap: 8px;
box-shadow: 0 12px 30px -24px rgba(15, 23, 42, 0.75);
}
.loss-name {
font-size: 12px;
font-weight: 700;
letter-spacing: 0.08em;
text-transform: uppercase;
color: #7dd3fc;
}
.loss-value {
font-size: 15px;
font-weight: 700;
color: #f8fafc;
}
.loss-desc {
margin: 0;
font-size: 12px;
color: rgba(226, 232, 240, 0.8);
line-height: 1.5;
}
.pill {
display: inline-flex;
align-items: center;
gap: 6px;
padding: 8px 16px;
background: rgba(59, 130, 246, 0.1);
border: 1px solid var(--border-light);
border-radius: 20px;
font-size: 13px;
font-weight: 500;
color: #3b82f6;
transition: all 250ms cubic-bezier(0.4, 0, 0.2, 1);
animation: slideUp 600ms ease-out backwards;
}
.pill:nth-child(1) { animation-delay: 300ms; }
.pill:nth-child(2) { animation-delay: 350ms; }
.pill:nth-child(3) { animation-delay: 400ms; }
.pill:hover {
background: rgba(59, 130, 246, 0.15);
border-color: #3b82f6;
transform: translateY(-2px);
box-shadow: 0 4px 12px rgba(59, 130, 246, 0.2);
}
/* ==================== MAIN LAYOUT ==================== */
.main-layout {
display: grid;
grid-template-columns: 1fr;
gap: 24px;
align-items: start;
animation: slideUp 600ms ease-out 100ms both;
}
/* Upload Bar */
.upload-bar {
display: flex;
flex-direction: column;
gap: 16px;
width: 100%;
}
.upload-bar.has-results {
grid-column: 1;
grid-row: 1;
}
.sidebar-header {
padding: 12px 0;
border-bottom: 1px solid var(--border-light);
}
.sidebar-header h3 {
font-size: 14px;
font-weight: 700;
text-transform: uppercase;
letter-spacing: 0.08em;
color: #3b82f6;
margin: 0;
}
/* Compact Dropzone */
.compact-dropzone {
padding: 18px 22px !important;
border-radius: 14px !important;
max-width: 100% !important;
animation: slideUp 600ms ease-out 150ms both;
}
.compact-dropzone.has-file {
padding: 18px 22px !important;
}
.compact-upload-content {
display: flex;
flex-direction: row;
justify-content: space-between;
align-items: center;
align-items: center;
gap: 12px;
padding: 0;
}
.compact-upload-icon {
font-size: 32px;
animation: bounce 2s ease-in-out infinite;
}
.compact-upload-text {
font-size: 13px;
font-weight: 600;
color: var(--text-primary);
margin: 0;
text-align: left;
}
/* Compact Preview */
.compact-preview {
display: flex;
flex-direction: row;
gap: 14px;
padding: 0 !important;
align-items: center;
justify-content: space-between;
}
.compact-preview-image {
width: 180px;
height: 120px;
border-radius: 10px;
object-fit: cover;
animation: slideUp 400ms ease-out;
}
.file-meta {
text-align: left;
width: auto;
flex: 1;
}
.file-name-compact {
font-size: 11px;
font-weight: 600;
color: var(--text-primary);
margin: 0;
word-break: break-all;
}
.file-size-compact {
font-size: 10px;
color: var(--text-secondary);
margin: 2px 0 0;
}
/* Compact Buttons */
.compact-button {
padding: 8px 14px !important;
font-size: 12px !important;
border-radius: 8px !important;
}
.compact-enhance-button {
width: 100%;
padding: 10px 16px !important;
font-size: 13px !important;
animation: slideUp 600ms ease-out 200ms both;
}
.compact-reset-button {
width: 100%;
padding: 8px 12px !important;
font-size: 12px !important;
}
.compact-alert {
font-size: 12px !important;
padding: 10px 12px !important;
max-width: 100% !important;
margin: 0 !important;
}
/* Results Main */
.results-main {
display: flex;
flex-direction: column;
gap: 20px;
width: 100%;
}
.results-main .section-title {
margin: 0 0 8px;
animation: slideUp 600ms ease-out 50ms both;
}
.dropzone::before {
content: "";
position: absolute;
inset: 0;
background: radial-gradient(circle at 30% 20%, rgba(59, 130, 246, 0.05), transparent 50%);
pointer-events: none;
}
.dropzone::after {
content: "";
position: absolute;
inset: 0;
background: linear-gradient(135deg, transparent, rgba(255, 255, 255, 0.4), transparent);
opacity: 0;
transition: opacity 300ms ease;
pointer-events: none;
}
.dropzone:hover::after {
opacity: 1;
}
.dropzone.dropzone-active {
border-color: #3b82f6;
background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(139, 92, 246, 0.06));
transform: translateY(-4px);
box-shadow: 0 20px 60px rgba(59, 130, 246, 0.18);
}
.dropzone.has-file {
border-color: var(--border-light);
background: linear-gradient(135deg, rgba(16, 185, 129, 0.05), rgba(34, 197, 94, 0.05));
}
#imagePicker {
display: none;
}
.upload-button,
.change-button {
display: inline-block;
padding: 12px 28px;
background: linear-gradient(135deg, #3b82f6, #2563eb);
color: white;
border: none;
border-radius: 10px;
font-size: 14px;
font-weight: 600;
cursor: pointer;
transition: all 250ms cubic-bezier(0.4, 0, 0.2, 1);
box-shadow: 0 4px 15px rgba(59, 130, 246, 0.35);
position: relative;
overflow: hidden;
}
.upload-button::before,
.change-button::before {
content: '';
position: absolute;
top: 50%;
left: 50%;
width: 0;
height: 0;
background: rgba(255, 255, 255, 0.2);
border-radius: 50%;
transform: translate(-50%, -50%);
transition: width 400ms, height 400ms;
}
.upload-button:hover::before,
.change-button:hover::before {
width: 300px;
height: 300px;
}
.upload-button:hover,
.change-button:hover {
transform: translateY(-3px);
box-shadow: 0 8px 25px rgba(59, 130, 246, 0.45);
}
.upload-button:active,
.change-button:active {
transform: translateY(-1px);
box-shadow: 0 5px 15px rgba(59, 130, 246, 0.3);
}
.upload-button:focus-visible,
.change-button:focus-visible {
outline: 2px solid #3b82f6;
outline-offset: 2px;
}
/* Base Dropzone Styling */
.dropzone {
border: 2px dashed var(--border-medium);
border-radius: 16px;
padding: 48px 32px;
text-align: center;
background: linear-gradient(135deg, rgba(248, 250, 252, 0.9), rgba(241, 245, 249, 0.7));
backdrop-filter: blur(10px);
transition: all 300ms cubic-bezier(0.23, 1, 0.320, 1);
cursor: pointer;
position: relative;
overflow: hidden;
}
/* File Preview */
.file-preview {
position: relative;
display: flex;
flex-direction: column;
align-items: center;
gap: 16px;
animation: slideUp 300ms ease-out;
}
.preview-image {
max-width: 100%;
max-height: 300px;
border-radius: 12px;
object-fit: cover;
box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
animation: slideUp 500ms ease-out;
transition: transform 250ms ease;
}
.preview-image:hover {
transform: scale(1.02);
}
.file-info {
text-align: center;
}
.file-name {
font-size: 14px;
font-weight: 600;
color: var(--text-primary);
margin: 0;
word-break: break-all;
}
.file-size {
font-size: 12px;
color: var(--text-secondary);
margin: 4px 0 0;
}
/* ==================== ACTION SECTION ==================== */
.action-section {
display: flex;
justify-content: center;
gap: 12px;
margin-top: 24px;
animation: slideUp 600ms ease-out 200ms both;
}
.enhance-button {
display: inline-flex;
align-items: center;
gap: 8px;
padding: 14px 36px;
background: linear-gradient(135deg, #3b82f6, #2563eb);
color: white;
border: none;
border-radius: 10px;
font-size: 15px;
font-weight: 600;
cursor: pointer;
transition: all 250ms cubic-bezier(0.4, 0, 0.2, 1);
box-shadow: 0 8px 25px rgba(59, 130, 246, 0.35);
position: relative;
overflow: hidden;
}
.enhance-button::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 500ms ease;
}
.enhance-button:hover:not(:disabled)::before {
left: 100%;
}
.enhance-button:hover:not(:disabled) {
transform: translateY(-4px);
box-shadow: 0 12px 35px rgba(59, 130, 246, 0.45);
}
.enhance-button:active:not(:disabled) {
transform: translateY(-2px);
box-shadow: 0 6px 20px rgba(59, 130, 246, 0.3);
}
.enhance-button:focus-visible {
outline: 2px solid #3b82f6;
outline-offset: 2px;
}
.enhance-button:disabled {
opacity: 0.85;
cursor: not-allowed;
}
.enhance-button.processing {
background: linear-gradient(135deg, #2563eb, #1d4ed8);
}
.spinner {
display: inline-block;
width: 16px;
height: 16px;
border: 2.5px solid rgba(255, 255, 255, 0.25);
border-top-color: white;
border-radius: 50%;
animation: spin 0.8s linear infinite;
margin-right: 2px;
}
/* ==================== ALERTS ==================== */
.alert {
max-width: 600px;
margin: 0 auto;
padding: 14px 16px;
border-radius: 10px;
font-size: 14px;
animation: slideDown 300ms ease-out;
border-left: 4px solid transparent;
backdrop-filter: blur(8px);
}
.alert-error {
background: linear-gradient(135deg, rgba(239, 68, 68, 0.12), rgba(220, 38, 38, 0.08));
border: 1px solid rgba(239, 68, 68, 0.35);
border-left-color: #ef4444;
color: #b91c1c;
}
.alert-success {
background: linear-gradient(135deg, rgba(16, 185, 129, 0.12), rgba(34, 197, 94, 0.08));
border: 1px solid rgba(16, 185, 129, 0.35);
border-left-color: #10b981;
color: #065f46;
}
/* ==================== COMPARISON SECTION ==================== */
.comparison-section {
animation: slideUp 500ms ease-out;
}
.section-title {
font-size: 24px;
font-weight: 700;
margin: 0 0 8px;
color: var(--text-primary);
animation: slideUp 500ms ease-out 50ms both;
}
.section-subtitle {
font-size: 14px;
color: var(--text-secondary);
margin: 0 0 24px;
animation: slideUp 500ms ease-out 100ms both;
}
/* Comparison Images */
.comparison-images {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 20px;
max-width: 1700px;
width: 100%;
margin: 0 auto;
animation: slideUp 600ms ease-out 150ms both;
}
.comparison-item {
position: relative;
display: flex;
flex-direction: column;
gap: 12px;
}
.comparison-label {
font-size: 13px;
font-weight: 600;
text-transform: uppercase;
letter-spacing: 0.08em;
color: #3b82f6;
padding: 8px 12px;
background: rgba(59, 130, 246, 0.1);
border-radius: 6px;
text-align: center;
}
.comparison-image {
width: 100%;
height: clamp(300px, 34vw, 520px);
border-radius: 12px;
object-fit: cover;
box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
transition: all 250ms cubic-bezier(0.4, 0, 0.2, 1);
animation: slideUp 600ms ease-out 150ms both;
}
.comparison-image:hover {
transform: scale(1.02);
box-shadow: 0 25px 70px rgba(0, 0, 0, 0.2);
}
/* Result Actions */
.result-actions {
display: flex;
gap: 12px;
justify-content: center;
margin-top: 28px;
animation: slideUp 600ms ease-out 250ms both;
}
.download-button,
.reset-button {
padding: 12px 28px;
border: none;
border-radius: 10px;
font-size: 14px;
font-weight: 600;
cursor: pointer;
transition: all 250ms cubic-bezier(0.4, 0, 0.2, 1);
position: relative;
overflow: hidden;
}
.download-button {
background: linear-gradient(135deg, #10b981, #059669);
color: white;
box-shadow: 0 4px 15px rgba(16, 185, 129, 0.35);
}
.download-button::before {
content: '';
position: absolute;
top: 50%;
left: 50%;
width: 0;
height: 0;
background: rgba(255, 255, 255, 0.2);
border-radius: 50%;
transform: translate(-50%, -50%);
transition: width 400ms, height 400ms;
}
.download-button:hover {
transform: translateY(-3px);
box-shadow: 0 8px 25px rgba(16, 185, 129, 0.45);
}
.download-button:hover::before {
width: 300px;
height: 300px;
}
.download-button:active {
transform: translateY(-1px);
}
.download-button:focus-visible {
outline: 2px solid #10b981;
outline-offset: 2px;
}
.reset-button {
background: var(--bg-secondary);
color: var(--text-primary);
border: 1.5px solid var(--border-medium);
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}
.reset-button:hover {
background: var(--bg-tertiary);
border-color: var(--border-dark);
box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}
.reset-button:active {
transform: translateY(-1px);
}
.reset-button:focus-visible {
outline: 2px solid #3b82f6;
outline-offset: 2px;
}
/* ==================== EMPTY STATE ==================== */
.empty-state {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
gap: 16px;
padding: 60px 20px;
color: var(--text-secondary);
animation: fadeIn 500ms ease-out 300ms both;
}
.empty-icon {
font-size: 64px;
opacity: 0.5;
animation: float 3s ease-in-out infinite;
}
.empty-state p {
margin: 0;
font-size: 16px;
font-weight: 500;
}
/* ==================== FOOTER ==================== */
.app-footer {
padding: 24px 20px;
text-align: center;
background: linear-gradient(135deg, rgba(59, 130, 246, 0.05), rgba(139, 92, 246, 0.05));
border-top: 1px solid var(--border-light);
color: var(--text-secondary);
font-size: 13px;
margin-top: auto;
animation: slideUp 600ms ease-out 400ms both;
}
/* ==================== ANIMATIONS ==================== */
@keyframes slideUp {
from {
opacity: 0;
transform: translateY(20px);
}
to {
opacity: 1;
transform: translateY(0);
}
}
@keyframes slideDown {
from {
opacity: 0;
transform: translateY(-10px);
}
to {
opacity: 1;
transform: translateY(0);
}
}
@keyframes fadeIn {
from {
opacity: 0;
}
to {
opacity: 1;
}
}
@keyframes float {
0%,
100% {
transform: translateY(0);
}
50% {
transform: translateY(-8px);
}
}
@keyframes bounce {
0%,
100% {
transform: scale(1);
}
50% {
transform: scale(1.05);
}
}
@keyframes spin {
to {
transform: rotate(360deg);
}
}
@keyframes shimmer {
0% {
background-position: -1000px 0;
}
100% {
background-position: 1000px 0;
}
}
@keyframes pulse-glow {
0%,
100% {
box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.5);
}
50% {
box-shadow: 0 0 0 10px rgba(59, 130, 246, 0);
}
}
/* ==================== RESPONSIVE ==================== */
@media (max-width: 1024px) {
.main-layout {
grid-template-columns: 1fr;
gap: 24px;
}
.upload-bar {
position: static;
}
.comparison-images {
grid-template-columns: 1fr 1fr;
}
.comparison-image {
height: clamp(260px, 34vw, 420px);
}
}
@media (max-width: 768px) {
.app-shell {
padding: 32px 16px;
gap: 32px;
}
.app-header {
padding: 24px 16px;
}
.main-layout {
grid-template-columns: 1fr;
gap: 20px;
}
.upload-bar {
order: 2;
}
.results-main {
order: 1;
}
.dropzone {
padding: 36px 20px;
border-radius: 16px;
}
.hero-title {
font-size: clamp(24px, 5vw, 36px);
}
.preview-image {
max-height: 200px;
}
.comparison-images {
grid-template-columns: 1fr;
gap: 16px;
}
.comparison-image {
height: 240px;
}
.feature-pills {
gap: 8px;
}
.pill {
font-size: 12px;
padding: 6px 12px;
}
.result-actions {
flex-direction: column;
width: 100%;
}
.download-button,
.reset-button {
width: 100%;
}
.loss-grid {
grid-template-columns: 1fr;
}
}
@media (max-width: 480px) {
.app-shell {
padding: 24px 12px;
gap: 24px;
}
.dropzone {
padding: 28px 16px;
border-radius: 12px;
}
.dropzone-title {
font-size: 16px;
}
.upload-icon {
font-size: 36px;
}
.hero-title {
font-size: 24px;
}
.feature-pills {
gap: 6px;
}
.pill {
font-size: 11px;
}
.comparison-images {
grid-template-columns: 1fr;
gap: 12px;
}
.comparison-image {
aspect-ratio: 4/3;
}
.comparison-label {
font-size: 11px;
}
.logo-section {
gap: 8px;
}
.app-title {
font-size: 20px;
}
.main-layout {
grid-template-columns: 1fr;
}
.compact-button {
padding: 6px 10px !important;
}
}
.actions {
margin-top: 16px;
display: flex;
flex-wrap: wrap;
gap: 10px;
}
.enhance-btn,
.reset-btn,
.download-btn {
border: none;
border-radius: 12px;
padding: 11px 16px;
font-family: var(--body-font);
font-weight: 700;
font-size: 0.95rem;
cursor: pointer;
transition: transform 200ms ease, box-shadow 200ms ease, opacity 200ms ease;
}
.enhance-btn {
color: #f2fffc;
background: linear-gradient(130deg, #1f7b85, #14545c);
box-shadow: 0 12px 30px -20px rgba(15, 76, 83, 0.9);
}
.enhance-btn:disabled {
opacity: 0.72;
cursor: not-allowed;
}
.reset-btn {
color: var(--text-main);
background: rgba(255, 255, 255, 0.72);
border: 1px solid var(--panel-border);
}
.download-btn {
text-decoration: none;
color: var(--text-main);
background: #f3c969;
}
.enhance-btn:hover,
.reset-btn:hover,
.download-btn:hover {
transform: translateY(-1px);
}
.error-banner {
margin-top: 12px;
border-radius: 12px;
padding: 10px 12px;
color: #6e1f16;
background: #ffe8e1;
border: 1px solid #f7c2b8;
}
.preview-grid {
margin-top: 18px;
display: grid;
grid-template-columns: repeat(2, minmax(0, 1fr));
gap: 14px;
}
.preview-card {
border: 1px solid var(--panel-border);
border-radius: 20px;
padding: 14px;
background: rgba(255, 255, 255, 0.82);
min-height: 310px;
}
h2 {
margin: 2px 0 10px;
color: var(--text-main);
font-family: var(--display-font);
font-size: 1.16rem;
}
.placeholder {
width: 100%;
height: 260px;
border-radius: 12px;
}
.preview-card img {
display: block;
max-width: 100%;
max-height: min(70vh, 560px);
width: auto;
height: auto;
margin: 0 auto;
object-fit: contain;
image-rendering: auto;
border-radius: 12px;
border: 1px solid rgba(10, 47, 54, 0.15);
background: #f7fbfa;
}
.placeholder {
display: grid;
place-items: center;
text-align: center;
color: var(--text-muted);
padding: 20px;
background: linear-gradient(120deg, rgba(221, 231, 232, 0.5), rgba(248, 251, 250, 0.95));
border: 1px solid rgba(10, 47, 54, 0.08);
}
@keyframes riseIn {
from {
opacity: 0;
transform: translateY(10px);
}
to {
opacity: 1;
transform: translateY(0);
}
}
@media (max-width: 900px) {
.app-shell {
padding-top: 24px;
}
.panel {
padding: 16px;
}
.preview-grid {
grid-template-columns: 1fr;
}
.preview-card {
min-height: 270px;
}
.placeholder {
height: 220px;
}
.preview-card img {
max-height: 420px;
}
}