/* ───────────────────────────────────────────── 🍕 Food Classifier | style.css Built by Koyeliya Ghosh | koyelog ───────────────────────────────────────────── */ /* ── Reset & Base ── */ *, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; } :root { --primary: #ff6b35; --primary-dark:#e85d04; --primary-light:#f7c59f; --secondary: #2d2d2d; --bg: #fafafa; --bg-card: #ffffff; --text: #1a1a1a; --text-muted: #777; --border: #ebebeb; --success: #22c55e; --shadow: 0 4px 24px rgba(0,0,0,0.08); --shadow-lg: 0 12px 40px rgba(255,107,53,0.15); --radius: 16px; --radius-sm: 10px; --transition: all 0.3s ease; } html { scroll-behavior: smooth; } body { font-family: 'Poppins', sans-serif; background: var(--bg); color: var(--text); line-height: 1.6; overflow-x: hidden; } /* ───────────────────────────────────────────── 🔝 NAVBAR ───────────────────────────────────────────── */ .navbar { position: sticky; top: 0; z-index: 999; display: flex; align-items: center; justify-content: space-between; padding: 14px 60px; background: rgba(255,255,255,0.92); backdrop-filter: blur(12px); border-bottom: 1px solid var(--border); box-shadow: 0 2px 12px rgba(0,0,0,0.05); } .nav-brand { display: flex; align-items: center; gap: 8px; } .nav-logo { font-size: 1.6rem; } .nav-title { font-size: 1.3rem; font-weight: 800; color: var(--primary); } .nav-badge { background: var(--primary-light); color: var(--primary-dark); font-size: 0.7rem; font-weight: 600; padding: 2px 10px; border-radius: 20px; } .nav-links { display: flex; align-items: center; gap: 28px; } .nav-links a { text-decoration: none; color: var(--text-muted); font-size: 0.9rem; font-weight: 500; transition: var(--transition); } .nav-links a:hover { color: var(--primary); } /* ───────────────────────────────────────────── 🦸 HERO ───────────────────────────────────────────── */ .hero { display: flex; align-items: center; justify-content: space-between; padding: 80px 60px; background: linear-gradient(135deg, #fff5f0 0%, #ffffff 60%, #fff8f0 100%); min-height: 90vh; position: relative; overflow: hidden; } .hero::before { content: ''; position: absolute; top: -100px; right: -100px; width: 400px; height: 400px; background: radial-gradient(circle, rgba(255,107,53,0.1), transparent 70%); border-radius: 50%; } .hero-content { max-width: 560px; z-index: 1; } .hero-badge { display: inline-block; background: linear-gradient(135deg, var(--primary-light), #ffe8dc); color: var(--primary-dark); font-size: 0.8rem; font-weight: 600; padding: 6px 18px; border-radius: 30px; margin-bottom: 20px; border: 1px solid rgba(255,107,53,0.2); } .hero-title { font-size: 3.2rem; font-weight: 800; line-height: 1.2; color: var(--text); margin-bottom: 16px; } .gradient-text { background: linear-gradient(135deg, var(--primary), #ff9a56); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; } .hero-subtitle { font-size: 1.05rem; color: var(--text-muted); margin-bottom: 32px; line-height: 1.7; } .hero-stats { display: flex; align-items: center; gap: 20px; margin-bottom: 36px; padding: 20px 24px; background: white; border-radius: var(--radius); box-shadow: var(--shadow); width: fit-content; } .stat { text-align: center; } .stat-num { display: block; font-size: 1.6rem; font-weight: 800; color: var(--primary); line-height: 1; } .stat-label { font-size: 0.72rem; color: var(--text-muted); font-weight: 500; margin-top: 4px; } .stat-divider { width: 1px; height: 36px; background: var(--border); } .hero-btn { display: inline-flex; align-items: center; gap: 10px; background: linear-gradient(135deg, var(--primary), var(--primary-dark)); color: white; text-decoration: none; padding: 14px 36px; border-radius: 50px; font-size: 1rem; font-weight: 700; transition: var(--transition); box-shadow: 0 6px 20px rgba(255,107,53,0.35); } .hero-btn:hover { transform: translateY(-2px); box-shadow: 0 10px 28px rgba(255,107,53,0.45); } /* Floating Food Emojis */ .hero-visual { position: relative; width: 420px; height: 420px; } .food-emojis { position: relative; width: 100%; height: 100%; } .emoji { position: absolute; font-size: 3rem; animation: float 6s ease-in-out infinite; filter: drop-shadow(0 4px 8px rgba(0,0,0,0.1)); } .e1 { top: 10%; left: 40%; animation-delay: 0s; font-size: 3.5rem; } .e2 { top: 25%; left: 70%; animation-delay: 0.8s; font-size: 2.5rem; } .e3 { top: 50%; left: 80%; animation-delay: 1.6s; font-size: 3rem; } .e4 { top: 70%; left: 60%; animation-delay: 2.4s; font-size: 2.8rem; } .e5 { top: 75%; left: 20%; animation-delay: 3.2s; font-size: 2.5rem; } .e6 { top: 50%; left: 5%; animation-delay: 4s; font-size: 2.8rem; } .e7 { top: 20%; left: 10%; animation-delay: 4.8s; font-size: 2.5rem; } .e8 { top: 5%; left: 60%; animation-delay: 1.2s; font-size: 2rem; } @keyframes float { 0%, 100% { transform: translateY(0) rotate(0deg); } 33% { transform: translateY(-18px) rotate(5deg); } 66% { transform: translateY(-8px) rotate(-3deg); } } /* ───────────────────────────────────────────── 📦 SECTION SHARED ───────────────────────────────────────────── */ .section-header { text-align: center; margin-bottom: 50px; } .section-header h2 { font-size: 2rem; font-weight: 800; color: var(--text); margin-bottom: 8px; } .section-header p { color: var(--text-muted); font-size: 1rem; } /* ───────────────────────────────────────────── 🔍 CLASSIFIER SECTION ───────────────────────────────────────────── */ .classifier-section { padding: 80px 60px; background: white; } .classifier-container { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; max-width: 1100px; margin: 0 auto; } /* Upload Panel */ .upload-panel { display: flex; flex-direction: column; gap: 20px; } .upload-box { border: 3px dashed var(--primary-light); border-radius: var(--radius); min-height: 320px; display: flex; flex-direction: column; align-items: center; justify-content: center; cursor: pointer; transition: var(--transition); background: #fff9f6; position: relative; overflow: hidden; } .upload-box:hover { border-color: var(--primary); background: #fff3ed; box-shadow: var(--shadow-lg); } .upload-box.drag-over { border-color: var(--primary); background: #ffe8dc; transform: scale(1.02); } .upload-content { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 40px; text-align: center; } .upload-icon { font-size: 3.5rem; } .upload-content h3 { font-size: 1.1rem; font-weight: 700; color: var(--text); } .upload-content p { color: var(--text-muted); font-size: 0.9rem; } .upload-hint { background: var(--primary-light); color: var(--primary-dark); font-size: 0.75rem; font-weight: 600; padding: 4px 14px; border-radius: 20px; margin-top: 6px; } #previewImg { width: 100%; height: 320px; object-fit: cover; border-radius: calc(var(--radius) - 3px); display: block; } .change-img { position: absolute; bottom: 12px; left: 50%; transform: translateX(-50%); display: flex; } .change-img button { background: rgba(0,0,0,0.65); color: white; border: none; padding: 8px 20px; border-radius: 30px; font-size: 0.85rem; cursor: pointer; font-family: 'Poppins', sans-serif; transition: var(--transition); display: flex; align-items: center; gap: 6px; } .change-img button:hover { background: rgba(0,0,0,0.85); } .classify-btn { width: 100%; padding: 16px; background: linear-gradient(135deg, var(--primary), var(--primary-dark)); color: white; border: none; border-radius: 50px; font-size: 1.05rem; font-weight: 700; font-family: 'Poppins', sans-serif; cursor: pointer; transition: var(--transition); display: flex; align-items: center; justify-content: center; gap: 10px; box-shadow: 0 6px 20px rgba(255,107,53,0.3); } .classify-btn:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 10px 28px rgba(255,107,53,0.45); } .classify-btn:disabled { background: #e0e0e0; color: #aaa; cursor: not-allowed; box-shadow: none; transform: none; } .upload-tips { background: #f9f9f9; border-radius: var(--radius-sm); padding: 16px 20px; font-size: 0.85rem; color: var(--text-muted); } .upload-tips p { margin-bottom: 8px; font-weight: 600; color: var(--text); } .upload-tips ul { padding-left: 20px; } .upload-tips li { margin-bottom: 4px; } /* Results Panel */ .results-panel { background: #f9f9f9; border-radius: var(--radius); min-height: 480px; display: flex; flex-direction: column; overflow: hidden; border: 1px solid var(--border); } .results-empty, .results-loading { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 40px; text-align: center; color: var(--text-muted); } .empty-icon { font-size: 4rem; opacity: 0.4; } .results-empty h3 { font-size: 1.1rem; color: var(--text); } .results-empty p { font-size: 0.9rem; max-width: 220px; } /* Food Loader */ .food-loader { display: flex; gap: 10px; font-size: 2rem; margin-bottom: 10px; } .food-loader span { animation: bounce 1.2s ease-in-out infinite; } .food-loader span:nth-child(1) { animation-delay: 0s; } .food-loader span:nth-child(2) { animation-delay: 0.2s; } .food-loader span:nth-child(3) { animation-delay: 0.4s; } @keyframes bounce { 0%, 100% { transform: translateY(0); } 40% { transform: translateY(-16px); } } .results-content { padding: 24px; display: flex; flex-direction: column; gap: 18px; } /* Top Result Card */ .top-result-card { background: linear-gradient(135deg, var(--primary), #ff9a56); color: white; border-radius: var(--radius-sm); padding: 20px 24px; text-align: center; } .top-result-label { font-size: 1.6rem; font-weight: 800; margin-bottom: 4px; } .top-result-score { font-size: 0.95rem; opacity: 0.9; font-weight: 500; } .top-result-time { font-size: 0.78rem; opacity: 0.75; margin-top: 4px; } /* Info Cards */ .info-cards { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; } .info-card { background: white; border-radius: var(--radius-sm); padding: 14px 12px; text-align: center; border: 1px solid var(--border); transition: var(--transition); } .info-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); } .info-icon { font-size: 1.5rem; margin-bottom: 4px; } .info-label { font-size: 0.7rem; color: var(--text-muted); font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 4px; } .info-value { font-size: 0.82rem; font-weight: 700; color: var(--text); line-height: 1.3; } /* Predictions Bar Chart */ .predictions-box { background: white; border-radius: var(--radius-sm); padding: 18px; border: 1px solid var(--border); } .predictions-box h4 { font-size: 0.95rem; font-weight: 700; margin-bottom: 14px; color: var(--text); } .pred-item { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; } .pred-rank { font-size: 0.72rem; font-weight: 700; color: var(--primary); width: 20px; flex-shrink: 0; } .pred-label { font-size: 0.8rem; font-weight: 600; color: var(--text); width: 130px; flex-shrink: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .pred-bar-wrap { flex: 1; background: #f0f0f0; border-radius: 20px; height: 10px; overflow: hidden; } .pred-bar { height: 100%; border-radius: 20px; transition: width 0.8s ease; min-width: 4px; } .pred-score { font-size: 0.75rem; font-weight: 700; color: var(--text-muted); width: 42px; text-align: right; flex-shrink: 0; } .try-again-btn { width: 100%; padding: 12px; background: white; color: var(--primary); border: 2px solid var(--primary); border-radius: 50px; font-size: 0.9rem; font-weight: 700; font-family: 'Poppins', sans-serif; cursor: pointer; transition: var(--transition); display: flex; align-items: center; justify-content: center; gap: 8px; } .try-again-btn:hover { background: var(--primary); color: white; transform: translateY(-2px); } /* ───────────────────────────────────────────── 🧠 HOW IT WORKS ───────────────────────────────────────────── */ .how-section { padding: 80px 60px; background: linear-gradient(135deg, #fff5f0, #ffffff); } .steps-grid { display: flex; align-items: center; justify-content: center; gap: 16px; max-width: 1000px; margin: 0 auto; flex-wrap: wrap; } .step-card { background: white; border-radius: var(--radius); padding: 30px 24px; text-align: center; width: 200px; box-shadow: var(--shadow); border: 1px solid var(--border); transition: var(--transition); position: relative; } .step-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); border-color: var(--primary-light); } .step-num { position: absolute; top: -14px; left: 50%; transform: translateX(-50%); background: linear-gradient(135deg, var(--primary), var(--primary-dark)); color: white; font-size: 0.75rem; font-weight: 800; padding: 4px 14px; border-radius: 20px; } .step-icon { font-size: 2.5rem; margin: 10px 0 12px; } .step-card h3 { font-size: 0.95rem; font-weight: 700; margin-bottom: 8px; color: var(--text); } .step-card p { font-size: 0.8rem; color: var(--text-muted); line-height: 1.5; } .step-arrow { font-size: 1.8rem; color: var(--primary-light); font-weight: 700; flex-shrink: 0; } /* ───────────────────────────────────────────── 🍱 FOODS SECTION ───────────────────────────────────────────── */ .foods-section { padding: 80px 60px; background: white; } .foods-search { max-width: 480px; margin: 0 auto 40px; } .foods-search input { width: 100%; padding: 14px 24px; border: 2px solid var(--border); border-radius: 50px; font-size: 0.95rem; font-family: 'Poppins', sans-serif; outline: none; transition: var(--transition); background: #fafafa; color: var(--text); } .foods-search input:focus { border-color: var(--primary); background: white; box-shadow: 0 0 0 4px rgba(255,107,53,0.1); } .foods-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; max-width: 1100px; margin: 0 auto; } .food-card { background: #fff9f6; border: 1px solid #ffe8dc; border-radius: var(--radius-sm); padding: 16px 12px; text-align: center; transition: var(--transition); cursor: default; } .food-card:hover { transform: translateY(-4px); box-shadow: 0 6px 20px rgba(255,107,53,0.12); border-color: var(--primary-light); background: white; } .food-card-emoji { font-size: 1.8rem; display: block; margin-bottom: 6px; } .food-card-name { display: block; font-size: 0.78rem; font-weight: 700; color: var(--text); margin-bottom: 4px; line-height: 1.3; } .food-card-cal { display: block; font-size: 0.7rem; color: var(--primary); font-weight: 600; } /* ───────────────────────────────────────────── 🦶 FOOTER ───────────────────────────────────────────── */ .footer { background: var(--secondary); color: white; padding: 40px 60px; } .footer-content { max-width: 1100px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 20px; } .footer-brand span { font-size: 1.3rem; font-weight: 800; color: var(--primary); } .footer-brand p { font-size: 0.85rem; color: #aaa; margin-top: 4px; } .footer-links { display: flex; gap: 24px; } .footer-links a { color: #ccc; text-decoration: none; font-size: 0.85rem; transition: var(--transition); } .footer-links a:hover { color: var(--primary); } .footer-info p { font-size: 0.78rem; color: #666; text-align: right; } /* ───────────────────────────────────────────── 📱 RESPONSIVE ───────────────────────────────────────────── */ @media (max-width: 1024px) { .navbar { padding: 14px 30px; } .hero { padding: 60px 30px; } .classifier-section, .how-section, .foods-section { padding: 60px 30px; } .footer { padding: 30px; } } @media (max-width: 768px) { .hero { flex-direction: column; text-align: center; padding: 50px 24px; min-height: auto; gap: 40px; } .hero-title { font-size: 2.2rem; } .hero-stats { margin: 0 auto 30px; } .hero-visual { width: 280px; height: 280px; } .navbar { padding: 14px 20px; } .nav-links { display: none; } .classifier-container { grid-template-columns: 1fr; } .info-cards { grid-template-columns: 1fr 1fr; } .steps-grid { gap: 10px; } .step-arrow { display: none; } .step-card { width: 160px; padding: 24px 16px; } .foods-grid { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); } .footer-content { flex-direction: column; text-align: center; } .footer-info p { text-align: center; } } @media (max-width: 480px) { .hero-title { font-size: 1.8rem; } .hero-stats { flex-direction: column; gap: 14px; } .stat-divider { width: 60px; height: 1px; } .info-cards { grid-template-columns: 1fr; } .classifier-section, .how-section, .foods-section { padding: 40px 16px; } }