/* Reset & Base Styles */ * { margin: 0; padding: 0; box-sizing: border-box; } :root { --primary: #4361ee; --primary-dark: #3a56d4; --secondary: #7209b7; --success: #4cc9f0; --warning: #f72585; --danger: #e63946; --light: #f8f9fa; --dark: #212529; --gray: #6c757d; --light-gray: #e9ecef; --border-radius: 12px; --shadow: 0 4px 12px rgba(0, 0, 0, 0.08); --transition: all 0.3s ease; } body { font-family: 'Inter', sans-serif; background-color: #fafbff; color: var(--dark); line-height: 1.6; } .container { width: 100%; max-width: 800px; margin: 0 auto; padding: 0 20px; } /* Header */ .app-header { background: white; box-shadow: var(--shadow); position: sticky; top: 0; z-index: 100; } .app-title { font-size: 1.8rem; font-weight: 700; color: var(--primary); padding: 16px 0; } .built-by { position: absolute; right: 20px; top: 50%; transform: translateY(-50%); font-size: 0.85rem; color: var(--gray); text-decoration: none; } .built-by:hover { text-decoration: underline; } /* Main Layout */ .app-main { padding: 24px 0; } .section-title { font-size: 1.4rem; font-weight: 600; margin: 28px 0 16px; color: var(--dark); } /* Scanner Section */ .scanner-section { text-align: center; margin-bottom: 32px; } .scanner-placeholder { background: white; border-radius: var(--border-radius); padding: 32px 24px; box-shadow: var(--shadow); position: relative; } .scanner-frame { width: 240px; height: 240px; margin: 0 auto 20px; border: 3px dashed var(--primary); border-radius: 16px; position: relative; overflow: hidden; } .scanner-frame::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 40px; background: linear-gradient(to bottom, rgba(67, 97, 238, 0.15), transparent); animation: scanLine 2s infinite; } @keyframes scanLine { 0% { top: 0; } 100% { top: 200px; } } .scanner-instruction { color: var(--gray); margin-bottom: 20px; font-size: 1.1rem; } /* Profile Section */ .profile-section { background: white; border-radius: var(--border-radius); padding: 24px; margin-bottom: 28px; box-shadow: var(--shadow); } .profile-tags { display: flex; flex-wrap: wrap; gap: 10px; margin: 16px 0; } .tag { padding: 6px 14px; border-radius: 20px; font-size: 0.85rem; font-weight: 600; } .tag-allergy { background-color: rgba(230, 57, 70, 0.15); color: var(--danger); } .tag-diet { background-color: rgba(67, 97, 238, 0.15); color: var(--primary); } /* Recent Scans */ .scan-history { display: flex; flex-direction: column; gap: 16px; } .scan-item { display: flex; align-items: flex-start; gap: 16px; padding: 16px; background: white; border-radius: var(--border-radius); box-shadow: var(--shadow); } .scan-icon { width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center; flex-shrink: 0; } .scan-icon.safe { background-color: rgba(76, 201, 240, 0.15); color: var(--success); } .scan-icon.warning { background-color: rgba(247, 37, 133, 0.15); color: var(--warning); } .scan-icon.unsafe { background-color: rgba(230, 57, 70, 0.15); color: var(--danger); } .scan-icon::before { font-size: 1.2rem; font-weight: bold; } .scan-info h3 { font-size: 1.1rem; margin-bottom: 4px; } .scan-status { font-size: 0.9rem; } /* Quick Actions */ .quick-actions { margin-top: 20px; } .action-buttons { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; } /* Buttons */ .btn { font-family: 'Inter', sans-serif; font-weight: 600; border: none; border-radius: var(--border-radius); padding: 14px 20px; cursor: pointer; transition: var(--transition); display: inline-flex; align-items: center; justify-content: center; text-decoration: none; width: 100%; } .btn-primary { background-color: var(--primary); color: white; } .btn-primary:hover { background-color: var(--primary-dark); transform: translateY(-2px); } .btn-secondary { background-color: var(--light-gray); color: var(--dark); } .btn-secondary:hover { background-color: #dfe3e6; } .btn-outline { background-color: transparent; border: 2px solid var(--primary); color: var(--primary); } .btn-outline:hover { background-color: rgba(67, 97, 238, 0.08); } /* Footer */ .app-footer { background: white; padding: 20px 0; border-top: 1px solid var(--light-gray); margin-top: 40px; } .app-footer p { text-align: center; color: var(--gray); font-size: 0.9rem; } /* Responsive Design */ @media (max-width: 600px) { .container { padding: 0 16px; } .app-title { font-size: 1.5rem; } .built-by { position: static; transform: none; display: block; margin-top: 8px; text-align: center; } .scanner-frame { width: 200px; height: 200px; } .action-buttons { grid-template-columns: 1fr; } } /* Accessibility */ @media (prefers-reduced-motion: reduce) { * { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; } } /* Focus states for accessibility */ .btn:focus, .btn:active { outline: 2px solid var(--primary); outline-offset: 2px; }