Spaces:
Sleeping
Sleeping
| /* ═══════════════════════════════════════════════════════════ | |
| CIFAR-10 Image Classifier — Flask App Styles | |
| Modern, premium design with glassmorphism and gradients | |
| ═══════════════════════════════════════════════════════════ */ | |
| :root { | |
| --primary: #6C5CE7; | |
| --primary-light: #A29BFE; | |
| --secondary: #B388FF; | |
| --accent: #CE93D8; | |
| --grape: #7C4DFF; | |
| --grape-light: #B47CFF; | |
| --grape-glow: rgba(124, 77, 255, 0.25); | |
| --bg-dark: #0c0c1d; | |
| --bg-card: rgba(255, 255, 255, 0.05); | |
| --bg-card-hover: rgba(255, 255, 255, 0.08); | |
| --text: #E8E8F0; | |
| --text-muted: #9B9BB0; | |
| --border: rgba(255, 255, 255, 0.08); | |
| --shadow: 0 8px 32px rgba(0, 0, 0, 0.3); | |
| --radius: 16px; | |
| --radius-sm: 8px; | |
| --section-gap: 40px; | |
| } | |
| * { | |
| margin: 0; | |
| padding: 0; | |
| box-sizing: border-box; | |
| } | |
| body { | |
| font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif; | |
| background: var(--bg-dark); | |
| background-image: | |
| radial-gradient(ellipse at 20% 50%, rgba(108, 92, 231, 0.15) 0%, transparent 50%), | |
| radial-gradient(ellipse at 80% 20%, rgba(124, 77, 255, 0.10) 0%, transparent 50%), | |
| radial-gradient(ellipse at 50% 80%, rgba(179, 136, 255, 0.08) 0%, transparent 50%); | |
| color: var(--text); | |
| min-height: 100vh; | |
| line-height: 1.6; | |
| } | |
| .container { | |
| max-width: 800px; | |
| margin: 0 auto; | |
| padding: 40px 20px; | |
| } | |
| /* ─── Header ──────────────────────────────────────────── */ | |
| .header { | |
| text-align: center; | |
| margin-bottom: var(--section-gap); | |
| } | |
| .logo { | |
| display: flex; | |
| align-items: center; | |
| justify-content: center; | |
| margin-bottom: var(--section-gap); | |
| } | |
| .header h1 { | |
| font-size: 2rem; | |
| font-weight: 700; | |
| background: linear-gradient(135deg, var(--primary-light), var(--grape-light)); | |
| -webkit-background-clip: text; | |
| -webkit-text-fill-color: transparent; | |
| background-clip: text; | |
| } | |
| .subtitle { | |
| color: var(--text-muted); | |
| font-size: 0.95rem; | |
| margin-bottom: 16px; | |
| } | |
| .model-badge { | |
| display: inline-block; | |
| background: linear-gradient(135deg, var(--primary), var(--grape)); | |
| color: white; | |
| padding: 2px 12px; | |
| border-radius: 20px; | |
| font-size: 0.85rem; | |
| font-weight: 600; | |
| } | |
| .class-tags { | |
| display: flex; | |
| flex-direction: column; | |
| align-items: center; | |
| gap: 10px; | |
| margin-top: 0; | |
| } | |
| .tags-row { | |
| display: flex; | |
| justify-content: center; | |
| gap: 8px; | |
| flex-wrap: wrap; | |
| } | |
| .tag { | |
| background: rgba(124, 77, 255, 0.08); | |
| border: 1px solid rgba(124, 77, 255, 0.2); | |
| padding: 4px 12px; | |
| border-radius: 20px; | |
| font-size: 0.8rem; | |
| color: var(--primary-light); | |
| transition: all 0.2s ease; | |
| } | |
| .tag:hover { | |
| background: rgba(124, 77, 255, 0.15); | |
| color: var(--text); | |
| border-color: var(--grape); | |
| transform: translateY(-1px); | |
| box-shadow: 0 2px 12px var(--grape-glow); | |
| } | |
| /* ─── Model Selection ────────────────────────────────── */ | |
| .model-selection { | |
| margin-bottom: var(--section-gap); | |
| text-align: center; | |
| } | |
| .model-label { | |
| font-weight: 500; | |
| font-size: 13px; | |
| color: var(--text-muted); | |
| margin-right: 8px; | |
| } | |
| .model-select { | |
| padding: 5px 10px; | |
| border-radius: 6px; | |
| border: 1px solid var(--grape); | |
| background: rgba(124, 77, 255, 0.08); | |
| backdrop-filter: blur(10px); | |
| color: var(--text); | |
| font-family: inherit; | |
| font-size: 13px; | |
| cursor: pointer; | |
| outline: none; | |
| transition: all 0.2s ease; | |
| } | |
| .model-select:hover { | |
| border-color: var(--grape-light); | |
| box-shadow: 0 0 0 2px var(--grape-glow); | |
| } | |
| .model-select:focus { | |
| border-color: var(--grape-light); | |
| box-shadow: 0 0 0 2px var(--grape-glow); | |
| } | |
| /* ─── Upload Section ──────────────────────────────────── */ | |
| .upload-section { | |
| margin-bottom: var(--section-gap); | |
| } | |
| .dropzone { | |
| background: var(--bg-card); | |
| border: 2px dashed var(--border); | |
| border-radius: var(--radius); | |
| padding: 35px 20px; | |
| text-align: center; | |
| cursor: pointer; | |
| transition: all 0.3s ease; | |
| position: relative; | |
| } | |
| .dropzone:hover, | |
| .dropzone.dragover { | |
| border-color: var(--grape); | |
| background: rgba(124, 77, 255, 0.08); | |
| transform: translateY(-2px); | |
| box-shadow: 0 8px 24px var(--grape-glow); | |
| } | |
| .dropzone-icon { | |
| font-size: 3rem; | |
| display: block; | |
| margin-bottom: 12px; | |
| } | |
| .dropzone-text { | |
| font-size: 1.1rem; | |
| font-weight: 500; | |
| color: var(--text); | |
| } | |
| .dropzone-subtext { | |
| font-size: 0.85rem; | |
| color: var(--text-muted); | |
| margin-top: 4px; | |
| } | |
| .file-input { | |
| position: absolute; | |
| top: 0; | |
| left: 0; | |
| width: 100%; | |
| height: 100%; | |
| opacity: 0; | |
| cursor: pointer; | |
| } | |
| .file-list { | |
| margin-top: 12px; | |
| display: flex; | |
| flex-direction: column; | |
| gap: 4px; | |
| } | |
| .file-item { | |
| background: var(--bg-card); | |
| padding: 8px 16px; | |
| border-radius: var(--radius-sm); | |
| font-size: 0.85rem; | |
| color: var(--text-muted); | |
| border: 1px solid var(--border); | |
| } | |
| .submit-btn { | |
| display: block; | |
| width: 100%; | |
| margin-top: 20px; | |
| padding: 16px; | |
| font-size: 1.1rem; | |
| font-weight: 600; | |
| font-family: 'Inter', sans-serif; | |
| color: white; | |
| background: linear-gradient(135deg, var(--primary), var(--grape)); | |
| border: none; | |
| border-radius: var(--radius-sm); | |
| cursor: pointer; | |
| transition: all 0.3s ease; | |
| box-shadow: 0 4px 16px var(--grape-glow); | |
| } | |
| .submit-btn:hover:not(:disabled) { | |
| transform: translateY(-2px); | |
| box-shadow: 0 6px 24px rgba(124, 77, 255, 0.4); | |
| } | |
| .submit-btn:disabled { | |
| opacity: 0.4; | |
| cursor: not-allowed; | |
| } | |
| .btn-icon { | |
| margin-right: 6px; | |
| } | |
| /* ─── Results Section ─────────────────────────────────── */ | |
| .results-section { | |
| margin-bottom: var(--section-gap); | |
| } | |
| .results-title { | |
| font-size: 1.4rem; | |
| font-weight: 600; | |
| margin-bottom: 24px; | |
| text-align: center; | |
| } | |
| .result-card { | |
| background: var(--bg-card); | |
| border: 1px solid var(--border); | |
| border-radius: var(--radius); | |
| padding: 24px; | |
| margin-bottom: 20px; | |
| backdrop-filter: blur(10px); | |
| box-shadow: var(--shadow); | |
| transition: transform 0.2s ease; | |
| } | |
| .result-card:hover { | |
| transform: translateY(-2px); | |
| } | |
| .result-header { | |
| display: flex; | |
| justify-content: space-between; | |
| align-items: center; | |
| margin-bottom: 16px; | |
| padding-bottom: 12px; | |
| border-bottom: 1px solid var(--border); | |
| flex-wrap: wrap; | |
| gap: 8px; | |
| } | |
| .filename { | |
| font-weight: 500; | |
| font-size: 0.95rem; | |
| } | |
| .top-prediction { | |
| background: linear-gradient(135deg, rgba(124, 77, 255, 0.15), rgba(179, 136, 255, 0.05)); | |
| border: 1px solid rgba(124, 77, 255, 0.3); | |
| color: var(--grape-light); | |
| padding: 4px 14px; | |
| border-radius: 20px; | |
| font-size: 0.85rem; | |
| } | |
| .predictions { | |
| display: flex; | |
| flex-direction: column; | |
| gap: 8px; | |
| } | |
| .prediction-row { | |
| display: flex; | |
| align-items: center; | |
| gap: 12px; | |
| } | |
| .pred-class { | |
| width: 100px; | |
| font-size: 0.9rem; | |
| font-weight: 500; | |
| text-align: right; | |
| color: var(--text-muted); | |
| } | |
| .prob-bar-container { | |
| flex: 1; | |
| height: 24px; | |
| background: rgba(255, 255, 255, 0.04); | |
| border-radius: 12px; | |
| overflow: hidden; | |
| position: relative; | |
| } | |
| .prob-bar { | |
| height: 100%; | |
| background: linear-gradient(90deg, var(--primary), var(--grape)); | |
| border-radius: 12px; | |
| min-width: 2px; | |
| transition: width 0.8s ease; | |
| } | |
| .pred-prob { | |
| width: 60px; | |
| font-size: 0.85rem; | |
| font-weight: 600; | |
| color: var(--primary-light); | |
| text-align: right; | |
| } | |
| .error-msg { | |
| color: #ef9a9a; | |
| padding: 12px; | |
| background: rgba(239, 154, 154, 0.1); | |
| border-radius: var(--radius-sm); | |
| border: 1px solid rgba(239, 154, 154, 0.2); | |
| } | |
| /* ─── Footer ──────────────────────────────────────────── */ | |
| .footer { | |
| text-align: center; | |
| padding-top: var(--section-gap); | |
| margin-top: var(--section-gap); | |
| border-top: 1px solid rgba(124, 77, 255, 0.15); | |
| color: var(--text-muted); | |
| font-size: 0.85rem; | |
| } | |
| /* ─── Responsive ──────────────────────────────────────── */ | |
| @media (max-width: 600px) { | |
| .header h1 { | |
| font-size: 1.5rem; | |
| } | |
| .result-header { | |
| flex-direction: column; | |
| align-items: flex-start; | |
| } | |
| .pred-class { | |
| width: 80px; | |
| font-size: 0.8rem; | |
| } | |
| .dropzone { | |
| padding: 30px 16px; | |
| } | |
| } |