:root { --primary-color: #4CAF50; --primary-dark: #388E3C; --accent-color: #FF9800; --text-dark: #1F2937; --text-light: #6B7280; --bg-gradient: linear-gradient(135deg, #fdfbfb 0%, #ebedee 100%); --glass-bg: rgba(255, 255, 255, 0.75); --glass-border: rgba(255, 255, 255, 0.4); --shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.15); --radius: 24px; --font-main: 'Outfit', sans-serif; } * { box-sizing: border-box; margin: 0; padding: 0; } body { font-family: var(--font-main); background: #e0f2f1; background-image: radial-gradient(at 0% 0%, hsla(152, 40%, 90%, 1) 0, transparent 50%), radial-gradient(at 100% 0%, hsla(38, 65%, 94%, 1) 0, transparent 50%); color: var(--text-dark); min-height: 100vh; } .app-container { max-width: 700px; margin: 0 auto; padding: 15px; } /* Header */ .header { display: flex; justify-content: space-between; align-items: center; padding: 10px 0; margin-bottom: 10px; } .logo { font-size: 1.5rem; font-weight: 700; color: var(--primary-dark); display: flex; align-items: center; gap: 10px; } .lang-toggle { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 0.9rem; } /* Toggle Switch */ .switch { position: relative; display: inline-block; width: 50px; height: 24px; } .switch input { opacity: 0; width: 0; height: 0; } .slider { position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0; background-color: #ccc; transition: .4s; border-radius: 24px; } .slider:before { position: absolute; content: ""; height: 18px; width: 18px; left: 3px; bottom: 3px; background-color: white; transition: .4s; border-radius: 50%; } input:checked+.slider { background-color: var(--primary-color); } input:checked+.slider:before { transform: translateX(26px); } /* Main Content */ .glass-panel { background: var(--glass-bg); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border: 1px solid var(--glass-border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 30px; text-align: center; transition: all 0.3s ease; } h2 { font-weight: 600; margin-bottom: 8px; } p { color: var(--text-light); margin-bottom: 20px; } /* Camera */ .camera-wrapper { position: relative; width: 100%; max-width: 400px; margin: 0 auto 20px; aspect-ratio: 1/1; /* Square for Instagram-like feel */ background: black; border-radius: 20px; overflow: hidden; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1); } video { width: 100%; height: 100%; object-fit: cover; } #overlay-canvas { position: absolute; top: 0; left: 0; width: 100%; height: 100%; pointer-events: none; } .controls { display: flex; justify-content: center; gap: 15px; flex-wrap: wrap; } .btn { border: none; padding: 12px 24px; border-radius: 50px; font-size: 1rem; font-weight: 600; cursor: pointer; display: flex; align-items: center; gap: 8px; transition: transform 0.2s, box-shadow 0.2s; } .primary-btn { background: var(--primary-color); color: white; box-shadow: 0 4px 14px rgba(76, 175, 80, 0.4); } .primary-btn:hover { transform: translateY(-2px); background: var(--primary-dark); box-shadow: 0 6px 20px rgba(76, 175, 80, 0.6); } .secondary-btn { background: white; color: var(--text-dark); border: 2px solid #e0e0e0; } .secondary-btn:hover { background: #f5f5f5; } /* Results */ .hidden { display: none; } .results-card { text-align: left; } .result-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; } .back-btn { background: none; border: none; font-size: 1rem; font-weight: 600; color: var(--text-light); cursor: pointer; } .fruit-identity { display: flex; align-items: center; gap: 20px; margin-bottom: 30px; } .fruit-img-container { width: 100px; height: 100px; border-radius: 20px; overflow: hidden; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1); } .fruit-img-container img { width: 100%; height: 100%; object-fit: cover; } .fruit-names h1 { font-size: 2rem; color: var(--text-dark); line-height: 1.2; } .fruit-names h3 { font-size: 1.2rem; color: var(--text-light); font-weight: 400; margin-bottom: 5px; } .confidence-badge { display: inline-block; background: #e6f4ea; color: var(--primary-dark); padding: 4px 8px; border-radius: 12px; font-size: 0.8rem; font-weight: 600; } /* Info Grid */ .info-grid { display: grid; grid-template-columns: 1fr; gap: 20px; } @media (min-width: 600px) { .info-grid { grid-template-columns: 1fr 1fr; } } .info-card { background: rgba(255, 255, 255, 0.6); padding: 20px; border-radius: 16px; } .highlight-card { grid-column: 1 / -1; background: #fff8e1; /* Light yellow for guide */ border: 1px solid #ffe0b2; } .card-title { font-size: 1.1rem; margin-bottom: 12px; color: var(--primary-dark); border-bottom: 2px solid rgba(0, 0, 0, 0.05); padding-bottom: 8px; } .nutrition-table { width: 100%; border-collapse: collapse; } .nutrition-table td { padding: 6px 0; border-bottom: 1px solid rgba(0, 0, 0, 0.05); } .nutrition-table td:first-child { color: var(--text-light); } .nutrition-table td:last-child { font-weight: 600; text-align: right; } .benefit-list { list-style: none; padding-left: 5px; } .benefit-list li { position: relative; padding-left: 20px; /* Space for bullet */ margin-bottom: 8px; line-height: 1.4; } .benefit-list li::before { content: "•"; color: var(--primary-color); font-weight: bold; font-size: 1.2rem; position: absolute; left: 0; top: -2px; } /* Loading Overlay */ #loading-overlay { position: absolute; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0, 0, 0, 0.7); color: white; display: flex; flex-direction: column; align-items: center; justify-content: center; z-index: 10; } .spinner { width: 40px; height: 40px; border: 4px solid rgba(255, 255, 255, 0.3); border-top: 4px solid white; border-radius: 50%; animation: spin 1s linear infinite; margin-bottom: 10px; } @keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }