:root { --color-recyclable: #104883; --color-hazardous: #e53122; --color-wet: #694539; --color-dry: #312d2a; --color-tab-inactive: #eceff3; --color-tab-inactive-text: #9aa3b2; --color-gray-bg: #f0f4f8; --color-gray-text: #8a94a6; --color-border: #e8ecf1; --color-surface: #ffffff; --color-body: #eef2f7; --color-row-even: #ffffff; --color-row-odd: #f5f8fb; --radius-sm: 10px; --radius-md: 14px; --radius-lg: 18px; --radius-xl: 22px; --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.06); --shadow-md: 0 4px 16px rgba(15, 23, 42, 0.08); --shadow-lg: 0 12px 40px rgba(15, 23, 42, 0.14); } *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; } body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif; background: var(--color-body); color: #2d3748; line-height: 1.6; -webkit-tap-highlight-color: transparent; } /* Layout utilities */ .flex { display: flex; } .flex-col { flex-direction: column; } .flex-1 { flex: 1; } .items-center { align-items: center; } .items-start { align-items: flex-start; } .justify-center { justify-content: center; } .justify-between { justify-content: space-between; } .justify-end { justify-content: flex-end; } .gap-1 { gap: 0.25rem; } .gap-2 { gap: 0.5rem; } .gap-3 { gap: 0.75rem; } .w-full { width: 100%; } .h-full { height: 100%; } .min-h-screen { min-height: 100vh; } .max-w-md { max-width: 28rem; } .mx-auto { margin-left: auto; margin-right: auto; } .px-3 { padding-left: 0.75rem; padding-right: 0.75rem; } .px-4 { padding-left: 1rem; padding-right: 1rem; } .py-2 { padding-top: 0.5rem; padding-bottom: 0.5rem; } .py-3 { padding-top: 0.75rem; padding-bottom: 0.75rem; } .py-4 { padding-top: 1rem; padding-bottom: 1rem; } .text-center { text-align: center; } .text-left { text-align: left; } .text-right { text-align: right; } .text-sm { font-size: 0.875rem; } .text-base { font-size: 1rem; } .text-lg { font-size: 1.125rem; } .font-bold { font-weight: 700; } .font-medium { font-weight: 500; } .rounded-lg { border-radius: var(--radius-md); } .shadow { box-shadow: var(--shadow-sm); } .shadow-lg { box-shadow: var(--shadow-lg); } .overflow-hidden { overflow: hidden; } .overflow-y-auto { overflow-y: auto; } .relative { position: relative; } .fixed { position: fixed; } .inset-0 { top: 0; right: 0; bottom: 0; left: 0; } .z-50 { z-index: 50; } .hidden { display: none !important; } .shrink-0 { flex-shrink: 0; } .cursor-pointer { cursor: pointer; } .select-none { user-select: none; } /* Category colors */ .text-recyclable { color: var(--color-recyclable); } .text-hazardous { color: var(--color-hazardous); } .text-wet { color: var(--color-wet); } .text-dry { color: var(--color-dry); } .text-gray { color: var(--color-gray-text); } .bg-gray-light { background-color: var(--color-gray-bg); } /* App shell */ .app-container { max-width: 28rem; margin: 0 auto; min-height: 100vh; display: flex; flex-direction: column; background: #eef2f7; box-shadow: none; } /* Header */ .header { padding: 1.125rem 1.25rem 1rem; background: #eef2f7; border-bottom: none; box-shadow: 0 1px 0 rgba(15, 23, 42, 0.05); } .header-top { display: flex; align-items: center; justify-content: flex-end; margin-bottom: 0.875rem; position: relative; } .header-actions { display: flex; align-items: center; gap: 0.625rem; } .logo-icon { /*width: 2.75rem; */ height: 2.75rem; flex-shrink: 0; position: absolute; left: 0; top: 50%; transform: translateY(-50%); border-radius: var(--radius-sm); box-shadow: var(--shadow-sm); } .title-text { font-size: 1.2rem; font-weight: 700; line-height: 1.45; color: #1a202c; letter-spacing: -0.01em; } /* Buttons */ .btn { border: none; cursor: pointer; font-size: 0.875rem; border-radius: var(--radius-sm); transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease; font-family: inherit; } .btn:active { transform: scale(0.97); opacity: 0.9; } .btn-header { padding: 0.5rem 0.875rem; background: var(--color-gray-bg); color: #4a5568; font-weight: 500; box-shadow: var(--shadow-sm); } .btn-query { padding: 0.75rem 1.125rem; background: linear-gradient(135deg, #1e5088 0%, #104883 100%); color: #fff; font-weight: 600; white-space: nowrap; box-shadow: 0 3px 10px rgba(23, 59, 107, 0.28); border-radius: var(--radius-sm); } .btn-voice { padding: 0.75rem 0.875rem; background: var(--color-gray-bg); color: #4a5568; font-size: 0.75rem; white-space: nowrap; min-width: 4.75rem; font-weight: 500; box-shadow: var(--shadow-sm); border-radius: var(--radius-sm); } .btn-voice.recording { background: linear-gradient(135deg, #ff6b6b 0%, #ee4444 100%); color: #fff; animation: pulse 1.2s ease-in-out infinite; box-shadow: 0 3px 12px rgba(238, 68, 68, 0.35); } .btn-standard { padding: 0.375rem 0.875rem; background: rgba(255, 255, 255, 0.92); color: #2d3748; font-size: 0.75rem; font-weight: 600; border-radius: 9999px; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12); backdrop-filter: blur(4px); } .btn-confirm { width: 100%; padding: 1rem 1.25rem; background: linear-gradient(135deg, #1e5088 0%, #104883 100%); color: #fff; font-size: 1.0625rem; font-weight: 600; border-radius: var(--radius-md); margin-top: 1.75rem; box-shadow: 0 4px 14px rgba(23, 59, 107, 0.3); letter-spacing: 0.02em; } .btn-close { background: var(--color-gray-bg); border: none; font-size: 1.25rem; color: #718096; cursor: pointer; line-height: 1; width: 2rem; height: 2rem; border-radius: 50%; display: flex; align-items: center; justify-content: center; transition: background 0.15s ease; } .btn-close:hover { background: #e2e8f0; } .btn-close-transparent { background: transparent; border: none; font-size: 1.75rem; color: rgba(0, 0, 0, 0.22); cursor: pointer; line-height: 1; padding: 0.625rem; margin-top: 0.75rem; border-radius: 50%; transition: color 0.15s ease, background 0.15s ease; } .btn-close-transparent:hover { color: rgba(0, 0, 0, 0.45); background: var(--color-gray-bg); } @keyframes pulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.85; transform: scale(0.98); } } /* Search row */ .search-row { display: flex; align-items: center; gap: 0.625rem; padding: 0.875rem 1.25rem 1rem; background: #eef2f7; } .search-input { flex: 1; padding: 0.8125rem 1rem; border: 1.5px solid var(--color-border); border-radius: var(--radius-sm); font-size: 1rem; outline: none; background: var(--color-gray-bg); color: #2d3748; transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease; } .search-input:focus { border-color: var(--color-recyclable); background: #fff; box-shadow: 0 0 0 3px rgba(23, 59, 107, 0.12); } .search-input::placeholder { color: #a0aec0; } /* Language dropdown */ .lang-dropdown { position: relative; } .lang-menu { position: absolute; top: calc(100% + 6px); right: 0; background: #fff; border: 1px solid var(--color-border); border-radius: var(--radius-sm); box-shadow: var(--shadow-lg); min-width: 7rem; z-index: 60; overflow: hidden; padding: 0.375rem; } .lang-menu-item { padding: 0.625rem 0.875rem; cursor: pointer; font-size: 0.875rem; border-radius: 8px; color: #4a5568; transition: background 0.15s ease; } .lang-menu-item:hover, .lang-menu-item.active { background: var(--color-gray-bg); color: #1a202c; font-weight: 500; } /* Browse section */ .browse-section { flex: 1; display: flex; flex-direction: column; overflow: hidden; padding: 0 1rem 1rem; gap: 0; } /* Tabs */ .tabs-wrap { border-radius: var(--radius-md); overflow: hidden; box-shadow: var(--shadow-sm); } .tabs { display: flex; gap: 0; background: var(--color-tab-inactive); padding: 0; } .tab { flex: 1; display: flex; flex-direction: column; align-items: stretch; padding: 0; cursor: pointer; transition: background-color 0.2s ease; border-radius: 0; border-bottom: none; background: var(--color-tab-inactive); overflow: hidden; min-width: 0; } .tab-color-bar { display: block; width: 100%; height: 4px; flex-shrink: 0; } .tab.active { position: relative; z-index: 1; margin-bottom: -1px; } .tab-icon { display: block; width: 100%; max-width: 210px; height: auto; aspect-ratio: 1 / 1; margin: 0 auto; object-fit: contain; object-position: center; } .tab.active .tab-icon { filter: none; } /* Tab detail */ .tab-detail { padding: 1rem 1.125rem 1.125rem; color: #fff; display: flex; flex-direction: column; min-height: 4.5rem; border-radius: 0; box-shadow: none; margin-top: -1px; } .tab-desc { font-size: 0.875rem; line-height: 1.65; opacity: 0.95; } .tab-standard-wrap { align-self: flex-end; margin-top: calc(1 * 1.65em); } /* Search result hints */ .search-hints { padding: 1rem 1.25rem; background: var(--color-gray-bg); border-radius: var(--radius-md); margin: 0 1rem 0.75rem; } .search-hint-main { font-size: 0.9375rem; font-weight: 600; margin-bottom: 0.375rem; color: #2d3748; line-height: 1.5; } .search-hint-sub { font-size: 0.8125rem; color: var(--color-gray-text); line-height: 1.5; } /* Item list */ .item-list { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; } .item-list-browse { margin-top: 0.875rem; border-radius: var(--radius-md); overflow: hidden; border: 1px solid var(--color-border); box-shadow: var(--shadow-sm); } .item-list-search-wrap { margin: 0 1rem 1rem; border-radius: var(--radius-md); overflow: hidden; border: 1px solid var(--color-border); box-shadow: var(--shadow-sm); } .list-item { padding: 1rem 1.125rem; text-align: center; cursor: pointer; font-size: 1rem; color: #2d3748; transition: background 0.15s ease; letter-spacing: 0.01em; } .list-item-even { background: var(--color-row-even); } .list-item-odd { background: var(--color-row-odd); } .list-item:active { background: #e8f0fe !important; } .list-item-search { display: flex; justify-content: space-between; align-items: center; text-align: left; padding: 1rem 1.25rem; } .list-item-search .item-name { flex: 1; font-weight: 500; } .list-item-search .item-category { font-size: 0.875rem; font-weight: 600; flex-shrink: 0; margin-left: 0.75rem; } /* Modals */ .modal-overlay { position: fixed; inset: 0; background: rgba(15, 23, 42, 0.45); backdrop-filter: blur(4px); display: flex; align-items: center; justify-content: center; z-index: 50; padding: 1.25rem; animation: fadeIn 0.2s ease; } .modal-card { background: #fff; border-radius: var(--radius-xl); padding: 1.75rem 1.625rem; width: 100%; max-width: 22rem; max-height: 85vh; overflow-y: auto; position: relative; box-shadow: var(--shadow-lg); animation: slideUp 0.25s ease; } .modal-card-wide { max-width: 24rem; } .modal-card-item { color: #fff; } .modal-card-item .modal-title { color: #fff; } .modal-card-item .modal-line { color: #fff; opacity: 0.95; } .modal-card-item .modal-divider { border-top-color: rgba(255, 255, 255, 0.35); } .modal-card-item .modal-tips-title { color: #fff; } .modal-card-item .modal-tips-list { color: #fff; opacity: 0.9; } .modal-card-item .modal-standard-body { color: #fff; opacity: 0.95; } .modal-card-item .btn-close-transparent { color: rgba(255, 255, 255, 0.55); } .modal-card-item .btn-close-transparent:hover { color: rgba(255, 255, 255, 0.9); background: rgba(255, 255, 255, 0.12); } .modal-header { display: flex; justify-content: flex-end; margin-bottom: 0.25rem; } .modal-title { font-size: 1.3125rem; font-weight: 700; text-align: center; margin-bottom: 1rem; color: #1a202c; line-height: 1.35; } .modal-suggest { text-align: center; color: #fff; } .modal-suggest-label { font-size: 0.875rem; color: #fff; opacity: 0.95; line-height: 1.65; } .modal-suggest-visual { display: flex; justify-content: center; align-items: center; } .modal-suggest-icon { display: block; width: auto; max-width: 210px; height: auto; aspect-ratio: 1 / 1; object-fit: contain; object-position: center; } .modal-line { font-size: 0.875rem; color: #4a5568; margin-bottom: 0.5rem; line-height: 1.65; padding: 0 0.5rem; } .modal-divider { border: none; border-top: 1px solid var(--color-border); margin: 1.25rem 0 1rem; } .modal-tips-title { font-size: 0.875rem; font-weight: 700; margin-bottom: 0.625rem; color: #2d3748; } .modal-tips-list { font-size: 0.8125rem; color: #718096; line-height: 1.85; padding-left: 0; list-style: none; } .modal-tips-list li { margin-bottom: 0.375rem; padding-left: 0.25rem; } .modal-standard-body { font-size: 0.875rem; line-height: 1.75; color: #4a5568; white-space: pre-line; padding: 0 0.25rem; } .welcome-title { font-size: 1.375rem; font-weight: 700; text-align: center; color: #1a202c; line-height: 1.35; margin-bottom: 1.25rem; } .welcome-text p { font-size: 0.9375rem; line-height: 1.75; margin-bottom: 0.875rem; text-align: left; color: #4a5568; } .welcome-text p:last-child { margin-bottom: 0; } @keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } } @keyframes slideUp { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } } /* Main content area */ .main-content { flex: 1; display: flex; flex-direction: column; overflow: hidden; background: var(--color-body); } #browse-view { flex: 1; display: flex; flex-direction: column; overflow: hidden; } #search-view { padding-top: 0.75rem; } .no-results { padding: 2.5rem 1.5rem; text-align: center; color: var(--color-gray-text); font-size: 0.9375rem; line-height: 1.6; } .app-footer { padding: 1rem 1.25rem 1.25rem; text-align: center; background: #eef2f7; border-top: 1px solid var(--color-border); flex-shrink: 0; } .app-footer p { font-size: 0.75rem; color: var(--color-gray-text); line-height: 1.5; letter-spacing: 0.01em; } @media (min-width: 768px) { body { padding: 1.5rem 0; } .app-container { min-height: calc(100vh - 3rem); border-radius: var(--radius-xl); overflow: hidden; } .title-text { font-size: 1.375rem; } .modal-card { max-width: 26rem; padding: 2rem 1.75rem; } .list-item { padding: 1.0625rem 1.25rem; } }