From 37bc55f0ba822b16b565db0520144e4d85421ed5 Mon Sep 17 00:00:00 2001 From: Ricardo Campos Date: Mon, 27 Oct 2025 12:51:50 -0300 Subject: [PATCH] feat: change to dark mode --- auth.css | 62 ++++++++++----------- index.html | 2 +- settings.css | 20 ++++--- style.css | 153 ++++++++++++++++++++++++++------------------------- 4 files changed, 122 insertions(+), 115 deletions(-) diff --git a/auth.css b/auth.css index 5061dc8..bb40686 100644 --- a/auth.css +++ b/auth.css @@ -1,9 +1,9 @@ /* Authentication Header Styles */ .auth-header { - background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); + background: linear-gradient(135deg, #4A5D8A 0%, #5A3E7A 100%); color: white; padding: 12px 0; - box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1); + box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3); border-radius: 6px; top: 0; z-index: 1000; @@ -31,12 +31,12 @@ } .auth-form { - background: rgba(255, 255, 255, 0.1); + background: rgba(40, 40, 40, 0.9); backdrop-filter: blur(10px); border-radius: 6px; padding: 25px; min-width: 300px; - border: 1px solid rgba(255, 255, 255, 0.2); + border: 1px solid rgba(100, 100, 100, 0.3); } .auth-form h3 { @@ -53,31 +53,31 @@ .auth-form input { width: 100%; padding: 12px; - border: 1px solid rgba(255, 255, 255, 0.3); + border: 1px solid rgba(100, 100, 100, 0.5); border-radius: 6px; - background: rgba(255, 255, 255, 0.1); - color: white; + background: rgba(30, 30, 30, 0.8); + color: #e0e0e0; font-size: 1rem; backdrop-filter: blur(10px); box-sizing: border-box; } .auth-form input::placeholder { - color: rgba(255, 255, 255, 0.7); + color: rgba(160, 160, 160, 0.8); } .auth-form input:focus { outline: none; - border-color: rgba(255, 255, 255, 0.6); - background: rgba(255, 255, 255, 0.15); + border-color: rgba(107, 141, 214, 0.8); + background: rgba(40, 40, 40, 0.9); } .auth-btn { width: 100%; padding: 12px; - background: rgba(255, 255, 255, 0.2); + background: rgba(107, 141, 214, 0.8); color: white; - border: 1px solid rgba(255, 255, 255, 0.3); + border: 1px solid rgba(107, 141, 214, 0.5); border-radius: 6px; cursor: pointer; font-size: 1rem; @@ -87,7 +87,7 @@ } .auth-btn:hover { - background: rgba(255, 255, 255, 0.3); + background: rgba(107, 141, 214, 0.9); transform: translateY(-1px); } @@ -95,7 +95,7 @@ text-align: center; margin: 15px 0 0 0; font-size: 0.9rem; - color: rgba(255, 255, 255, 0.8); + color: rgba(200, 200, 200, 0.9); } .auth-switch a { @@ -137,9 +137,9 @@ /* Header button styles */ .header-btn { padding: 6px 12px; - background: rgba(255, 255, 255, 0.2); + background: rgba(107, 141, 214, 0.6); color: white; - border: 1px solid rgba(255, 255, 255, 0.3); + border: 1px solid rgba(107, 141, 214, 0.4); border-radius: 6px; cursor: pointer; font-size: 0.8rem; @@ -150,7 +150,7 @@ } .header-btn:hover { - background: rgba(255, 255, 255, 0.3); + background: rgba(107, 141, 214, 0.8); transform: translateY(-1px); } @@ -163,9 +163,9 @@ .mobile-menu-toggle { display: none; padding: 8px 12px; - background: rgba(255, 255, 255, 0.2); + background: rgba(107, 141, 214, 0.6); color: white; - border: 1px solid rgba(255, 255, 255, 0.3); + border: 1px solid rgba(107, 141, 214, 0.4); border-radius: 6px; cursor: pointer; font-size: 1.2rem; @@ -174,7 +174,7 @@ } .mobile-menu-toggle:hover { - background: rgba(255, 255, 255, 0.3); + background: rgba(107, 141, 214, 0.8); } /* Mobile dropdown menu */ @@ -182,11 +182,11 @@ position: absolute; top: 100%; right: 0; - background: rgba(103, 126, 234, 0.95); + background: rgba(74, 93, 138, 0.95); backdrop-filter: blur(15px); - border: 1px solid rgba(255, 255, 255, 0.2); + border: 1px solid rgba(100, 100, 100, 0.3); border-radius: 8px; - box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3); + box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4); z-index: 1000; min-width: 160px; margin-top: 8px; @@ -203,7 +203,7 @@ cursor: pointer; font-size: 0.9rem; transition: all 0.2s ease; - border-bottom: 1px solid rgba(255, 255, 255, 0.1); + border-bottom: 1px solid rgba(100, 100, 100, 0.2); } .mobile-menu-item:last-child { @@ -211,7 +211,7 @@ } .mobile-menu-item:hover { - background: rgba(255, 255, 255, 0.2); + background: rgba(107, 141, 214, 0.4); } .mobile-menu-item.logout:hover { @@ -221,9 +221,9 @@ /* Legacy support for existing logout-btn class */ .logout-btn { padding: 6px 12px; - background: rgba(255, 255, 255, 0.2); + background: rgba(107, 141, 214, 0.6); color: white; - border: 1px solid rgba(255, 255, 255, 0.3); + border: 1px solid rgba(107, 141, 214, 0.4); border-radius: 6px; cursor: pointer; font-size: 0.8rem; @@ -232,7 +232,7 @@ } .logout-btn:hover { - background: rgba(255, 255, 255, 0.3); + background: rgba(107, 141, 214, 0.8); } /* Loading Overlay */ @@ -242,7 +242,7 @@ left: 0; width: 100%; height: 100%; - background: rgba(0, 0, 0, 0.7); + background: rgba(0, 0, 0, 0.8); display: flex; flex-direction: column; justify-content: center; @@ -254,8 +254,8 @@ .loading-spinner { width: 50px; height: 50px; - border: 4px solid rgba(255, 255, 255, 0.3); - border-top: 4px solid white; + border: 4px solid rgba(107, 141, 214, 0.3); + border-top: 4px solid #6B8DD6; border-radius: 50%; animation: spin 1s linear infinite; margin-bottom: 20px; diff --git a/index.html b/index.html index d897df6..727d83a 100644 --- a/index.html +++ b/index.html @@ -23,7 +23,7 @@ - + diff --git a/settings.css b/settings.css index e1e6e81..930879e 100644 --- a/settings.css +++ b/settings.css @@ -3,8 +3,8 @@ border-radius: 10px; padding: 25px; min-width: 300px; - /* background: rgba(255, 255, 255, 0.1); - border: 1px solid rgba(255, 255, 255, 0.2); */ + background: rgba(40, 40, 40, 0.9); + border: 1px solid rgba(100, 100, 100, 0.3); } .settings-form .form-group { @@ -18,24 +18,26 @@ font-size: 1rem; backdrop-filter: blur(10px); box-sizing: border-box; - border: 1px solid #ccc; + border: 1px solid #404040; + background: #2a2a2a; + color: #e0e0e0; } .settings-form input::placeholder { - color: rgba(0, 0, 0, 0.7); + color: rgba(160, 160, 160, 0.8); } .settings-form input:focus { outline: none; - border-color: #667eea; + border-color: #6B8DD6; } .settings-btn { width: 100%; padding: 12px; color: white; - background: #667eea; - border: 1px solid #667eea; + background: #6B8DD6; + border: 1px solid #6B8DD6; border-radius: 6px; cursor: pointer; font-size: 1rem; @@ -45,7 +47,7 @@ } .settings-btn:hover { - background: #8d9de7; - border: 1px solid #8d9de7; + background: #5A7BC4; + border: 1px solid #5A7BC4; transform: translateY(-1px); } diff --git a/style.css b/style.css index b8991e6..b5146c3 100644 --- a/style.css +++ b/style.css @@ -6,19 +6,19 @@ body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; - background: #f5f5f5; + background: #121212; min-height: 100vh; padding: 12px; - color: #333; + color: #e0e0e0; line-height: 1.6; } .container { max-width: 1200px; margin: 0 auto; - background: rgba(255, 255, 255, 0.95); + background: rgba(30, 30, 30, 0.95); border-radius: 6px; - box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2); + box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4); padding: 40px; backdrop-filter: blur(10px); } @@ -27,18 +27,18 @@ h1 { text-align: center; margin-bottom: 40px; font-size: 2.5rem; - color: #4a5568; + color: #b0b0b0; font-weight: 300; } .calories-banner { text-align: center; - background: linear-gradient(135deg, #FF6B6B, #4ECDC4); + background: linear-gradient(135deg, #8B5A3C, #3A8B8B); color: white; padding: 30px 20px; border-radius: 6px; margin-bottom: 30px; - box-shadow: 0 10px 30px rgba(255, 107, 107, 0.3); + box-shadow: 0 10px 30px rgba(139, 90, 60, 0.3); transition: transform 0.3s ease; } @@ -73,7 +73,7 @@ h1 { text-align: center; font-size: 1.1rem; margin-bottom: 30px; - color: #4a5568; + color: #b0b0b0; font-weight: 500; } @@ -85,21 +85,22 @@ h1 { .food-search-input { width: 100%; padding: 15px 20px; - border: 2px solid #e0e0e0; + border: 2px solid #404040; border-radius: 6px; font-size: 16px; transition: all 0.3s ease; - background: white; - outline: none; + background: #2a2a2a; + color: #e0e0e0; + outline: none; } .food-search-input:focus { - border-color: #667eea; - box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1); + border-color: #6B8DD6; + box-shadow: 0 0 0 3px rgba(107, 141, 214, 0.2); } .food-search-input::placeholder { - color: #999; + color: #666; } /* Loading indicator */ @@ -110,8 +111,8 @@ h1 { transform: translateY(-50%); width: 20px; height: 20px; - border: 2px solid #e0e0e0; - border-top: 2px solid #667eea; + border: 2px solid #404040; + border-top: 2px solid #6B8DD6; border-radius: 50%; animation: spin 1s linear infinite; display: none; @@ -132,10 +133,10 @@ h1 { top: 100%; left: 0; right: 0; - background: white; - border: 1px solid #e0e0e0; + background: #2a2a2a; + border: 1px solid #404040; border-radius: 6px; - box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15); + box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3); z-index: 1002; max-height: 300px; overflow-y: auto; @@ -149,13 +150,14 @@ h1 { .search-result-item { padding: 15px 20px; - border-bottom: 1px solid #f0f0f0; + border-bottom: 1px solid #404040; cursor: pointer; transition: background-color 0.2s ease; display: flex; justify-content: space-between; align-items: center; - background: white; + background: #2a2a2a; + color: #e0e0e0; } .search-result-item:last-child { @@ -164,7 +166,7 @@ h1 { .search-result-item:hover, .search-result-item.highlighted { - background-color: #f8f9ff; + background-color: #3a3a3a; } .food-log-section { @@ -175,7 +177,7 @@ h1 { .section-title { font-size: 24px; font-weight: 600; - color: #333; + color: #e0e0e0; margin-bottom: 20px; text-align: center; } @@ -187,15 +189,15 @@ h1 { } .food-card { - background: white; + background: #2a2a2a; border-radius: 6px; - box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1); + box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3); overflow: hidden; transition: all 0.3s ease; } .food-card:hover { - box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15); + box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4); } .card-header { @@ -204,13 +206,13 @@ h1 { display: flex; justify-content: between; align-items: center; - background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); + background: linear-gradient(135deg, #4A5D8A 0%, #5A3E7A 100%); color: white; position: relative; } .card-header:hover { - background: linear-gradient(135deg, #5a6fd8 0%, #6a4190 100%); + background: linear-gradient(135deg, #3E4F78 0%, #4E3268 100%); } .card-main-info { @@ -228,7 +230,7 @@ h1 { .food-name { font-size: 16px; font-weight: 600; - color: #333; + color: #e0e0e0; margin-bottom: 4px; } @@ -285,14 +287,14 @@ h1 { .nutrition-item { text-align: center; padding: 12px; - background: white; + background: #2a2a2a; border-radius: 6px; - box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1); + box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3); } .nutrition-label { font-size: 12px; - color: #666; + color: #999; letter-spacing: 0.5px; margin-bottom: 4px; } @@ -300,7 +302,7 @@ h1 { .nutrition-value { font-size: 16px; font-weight: 600; - color: #333; + color: #e0e0e0; } .card-actions { @@ -308,7 +310,7 @@ h1 { justify-content: space-between; gap: 8px; padding-top: 16px; - border-top: 1px solid #e0e0e0; + border-top: 1px solid #404040; } .btn { @@ -350,7 +352,7 @@ h1 { .empty-state { text-align: center; padding: 60px 20px; - color: #666; + color: #999; } .empty-state-icon { @@ -360,7 +362,7 @@ h1 { } .add-food-btn { - background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); + background: linear-gradient(135deg, #4A5D8A 0%, #5A3E7A 100%); color: white; border: none; padding: 12px 24px; @@ -372,40 +374,40 @@ h1 { } .add-food-btn:hover { - background: linear-gradient(135deg, #5a6fd8 0%, #6a4190 100%); + background: linear-gradient(135deg, #3E4F78 0%, #4E3268 100%); transform: translateY(-1px); } .food-details { font-size: 13px; - color: #666; + color: #999; } .food-calories { font-weight: 600; - color: #667eea; + color: #6B8DD6; font-size: 14px; } .no-results { padding: 20px; text-align: center; - color: #666; + color: #999; font-style: italic; } .add-food-section { - background: white; + background: #2a2a2a; padding: 30px; border-radius: 6px; margin-bottom: 30px; - box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1); + box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3); } .add-food-title { font-size: 1.5rem; margin-bottom: 20px; - color: #4a5568; + color: #b0b0b0; text-align: center; } @@ -433,29 +435,30 @@ h1 { label { margin-bottom: 5px; font-weight: 600; - color: #4a5568; + color: #b0b0b0; } #gramAmount { width: 100%; padding: 15px 20px; - border: 2px solid #e0e0e0; + border: 2px solid #404040; border-radius: 6px; font-size: 1rem; transition: all 0.3s ease; - background: white; + background: #2a2a2a; + color: #e0e0e0; min-width: 0; box-sizing: border-box; outline: none; } #gramAmount:focus { - border-color: #667eea; - box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1); + border-color: #6B8DD6; + box-shadow: 0 0 0 3px rgba(107, 141, 214, 0.2); } #gramAmount::placeholder { - color: #999; + color: #666; } .add-btn { @@ -495,15 +498,15 @@ label { } .food-table-section { - background: white; + background: #2a2a2a; border-radius: 6px; margin-bottom: 30px; - box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1); + box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3); overflow: hidden; } .table-title { - background: linear-gradient(135deg, #667eea, #764ba2); + background: linear-gradient(135deg, #4A5D8A, #5A3E7A); color: white; padding: 20px; font-size: 1.2rem; @@ -526,19 +529,20 @@ label { .food-table td { padding: 15px 10px; text-align: left; - border-bottom: 1px solid #e2e8f0; + border-bottom: 1px solid #404040; white-space: nowrap; + color: #e0e0e0; } .food-table th { - background: #f8fafc; + background: #1a1a1a; font-weight: 600; - color: #4a5568; + color: #b0b0b0; font-size: 0.9rem; } .food-table tr:hover { - background: #f7fafc; + background: #3a3a3a; } .delete-btn { @@ -557,15 +561,15 @@ label { } .calendar-section { - background: white; + background: #2a2a2a; border-radius: 6px; - box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1); + box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3); overflow: hidden; margin-top: 30px; } .calendar-header { - background: linear-gradient(135deg, #667eea, #764ba2); + background: linear-gradient(135deg, #4A5D8A, #5A3E7A); color: white; padding: 20px; display: flex; @@ -597,20 +601,21 @@ label { display: grid; grid-template-columns: repeat(7, 1fr); gap: 1px; - background: #e2e8f0; + background: #404040; } .calendar-day-header { - background: #f8fafc; + background: #1a1a1a; padding: 15px 5px; text-align: center; font-weight: 600; - color: #4a5568; + color: #b0b0b0; font-size: 0.9rem; } .calendar-day { - background: white; + background: #2a2a2a; + color: #e0e0e0; padding: 15px 5px; text-align: center; cursor: pointer; @@ -624,17 +629,17 @@ label { } .calendar-day:hover { - background: #f7fafc; + background: #3a3a3a; } .calendar-day.other-month { - color: #cbd5e0; - background: #f8fafc; + color: #666; + background: #1a1a1a; } .calendar-day.today { - background: #667eea; - /*color: white;*/ + background: #6B8DD6; + color: white; font-weight: bold; } @@ -666,27 +671,27 @@ label { gap: 15px; margin-top: 20px; padding: 20px; - background: #f8fafc; + background: #1a1a1a; border-radius: 6px; } .nutrition-item { text-align: center; padding: 10px; - background: white; + background: #2a2a2a; border-radius: 6px; - box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1); + box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3); } .nutrition-value { font-size: 1.2rem; font-weight: bold; - color: #4a5568; + color: #e0e0e0; } .nutrition-label { font-size: 0.8rem; - color: #718096; + color: #999; margin-top: 2px; } @@ -695,7 +700,7 @@ label { } .muted { - color: #ccc; + color: #666; } @media (max-width: 768px) {