Skip to content

vinceestl/smartfridge.github.io

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

styles.css* { margin: 0; padding: 0; box-sizing: border-box; }

body { font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; background: linear-gradient(135deg, #f0f9f0 0%, #ffffff 100%); color: #333; min-height: 100vh; padding-bottom: 40px; }

.container { max-width: 1200px; margin: 0 auto; padding: 20px; }

/* Header */ .header { background: linear-gradient(135deg, #27ae60 0%, #229954 100%); color: white; padding: 40px 20px; border-radius: 12px; margin-bottom: 30px; text-align: center; box-shadow: 0 4px 15px rgba(39, 174, 96, 0.2); }

.header h1 { font-size: 2.5em; margin-bottom: 10px; font-weight: 700; }

.header p { font-size: 1.1em; opacity: 0.95; }

/* Alerts Section */ .alerts-section { margin-bottom: 30px; }

.alert-box { background: #fff3cd; border-left: 4px solid #ffc107; padding: 15px 20px; border-radius: 8px; margin-bottom: 15px; display: flex; align-items: center; gap: 15px; animation: slideIn 0.3s ease-out; }

.alert-box.critical { background: #f8d7da; border-left-color: #dc3545; }

.alert-icon { font-size: 1.5em; }

.alert-box p { margin: 0; font-weight: 500; }

@keyframes slideIn { from { transform: translateX(-20px); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

/* Main Content */ .main-content { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; margin-bottom: 30px; }

@media (max-width: 768px) { .main-content { grid-template-columns: 1fr; } }

/* Sections */ .add-product-section, .fridge-section, .recipe-section { background: white; padding: 30px; border-radius: 12px; box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08); }

.add-product-section { grid-column: 1 / 2; }

.fridge-section { grid-column: 2 / 3; grid-row: 1 / 3; }

.recipe-section { grid-column: 1 / 2; }

@media (max-width: 768px) { .add-product-section, .fridge-section, .recipe-section { grid-column: 1 / 2; } }

section h2 { color: #27ae60; margin-bottom: 20px; font-size: 1.5em; border-bottom: 2px solid #e8f5e9; padding-bottom: 10px; }

/* Input Groups */ .input-group { margin-bottom: 20px; }

.input-group label { display: block; color: #555; margin-bottom: 8px; font-weight: 500; }

.input-field { width: 100%; padding: 12px 15px; border: 2px solid #e0e0e0; border-radius: 8px; font-size: 1em; transition: all 0.3s ease; font-family: inherit; }

.input-field:focus { outline: none; border-color: #27ae60; box-shadow: 0 0 0 3px rgba(39, 174, 96, 0.1); }

/* Buttons */ .button-group, .recipe-controls { display: flex; gap: 10px; flex-wrap: wrap; }

.btn { padding: 12px 20px; border: none; border-radius: 8px; font-size: 1em; font-weight: 600; cursor: pointer; transition: all 0.3s ease; flex: 1; min-width: 150px; }

.btn-primary { background: linear-gradient(135deg, #27ae60 0%, #229954 100%); color: white; box-shadow: 0 2px 8px rgba(39, 174, 96, 0.2); }

.btn-primary:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(39, 174, 96, 0.3); }

.btn-primary:active:not(:disabled) { transform: translateY(0); }

.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-secondary { background: #f0f0f0; color: #333; border: 1px solid #ddd; }

.btn-secondary:hover { background: #e8e8e8; }

.btn-danger { background: #dc3545; color: white; padding: 8px 12px; font-size: 0.9em; min-width: auto; }

.btn-danger:hover { background: #c82333; }

/* Fridge List */ .fridge-list { display: flex; flex-direction: column; gap: 12px; }

.empty-message { text-align: center; color: #999; padding: 20px; font-style: italic; }

.product-item { background: linear-gradient(135deg, #f0f9f0 0%, #e8f5e9 100%); border: 2px solid #27ae60; border-radius: 8px; padding: 15px; display: flex; justify-content: space-between; align-items: center; animation: slideIn 0.3s ease-out; position: relative; }

.product-item.expiring-soon { border-color: #ffc107; background: linear-gradient(135deg, #fffbf0 0%, #fff8e8 100%); }

.product-item.expired { border-color: #dc3545; background: linear-gradient(135deg, #fff5f5 0%, #ffe8e8 100%); }

.product-info { flex: 1; }

.product-name { font-weight: 600; color: #27ae60; font-size: 1.1em; margin-bottom: 5px; }

.product-date { font-size: 0.9em; color: #666; }

.product-status { display: inline-block; padding: 4px 8px; border-radius: 4px; font-size: 0.85em; font-weight: 600; margin-top: 5px; }

.status-fresh { background: #d4edda; color: #155724; }

.status-expiring { background: #fff3cd; color: #856404; }

.status-expired { background: #f8d7da; color: #721c24; }

.product-actions { display: flex; gap: 8px; align-items: center; }

.checkbox-input { width: 20px; height: 20px; cursor: pointer; accent-color: #27ae60; }

/* Recipe Output */ .recipe-info { background: #f0f9f0; padding: 10px; border-left: 3px solid #27ae60; margin-bottom: 15px; border-radius: 4px; color: #555; }

.recipe-output { margin-top: 20px; }

.recipe-card { background: linear-gradient(135deg, #f0f9f0 0%, #e8f5e9 100%); border: 2px solid #27ae60; border-radius: 8px; padding: 20px; animation: slideIn 0.3s ease-out; }

.recipe-card h3 { color: #27ae60; margin-bottom: 15px; font-size: 1.3em; }

.recipe-section-title { color: #229954; font-weight: 600; margin-top: 15px; margin-bottom: 8px; }

.recipe-card ul { margin-left: 20px; margin-bottom: 15px; }

.recipe-card li { margin-bottom: 8px; color: #555; }

.recipe-card ol { margin-left: 20px; }

.recipe-card ol li { margin-bottom: 8px; color: #555; }

/* Modal */ .modal { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0, 0, 0, 0.5); display: flex; align-items: center; justify-content: center; z-index: 1000; animation: fadeIn 0.3s ease-out; }

.modal.hidden { display: none; }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.modal-content { background: white; padding: 30px; border-radius: 12px; max-width: 500px; position: relative; box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2); animation: slideUp 0.3s ease-out; }

@keyframes slideUp { from { transform: translateY(30px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

.alert-modal { border-top: 4px solid #ffc107; }

.alert-modal h2 { color: #ff9800; margin-bottom: 20px; }

.close-btn { position: absolute; top: 15px; right: 15px; background: none; border: none; font-size: 2em; cursor: pointer; color: #999; transition: color 0.3s; }

.close-btn:hover { color: #333; }

/* Responsive */ @media (max-width: 480px) { .header h1 { font-size: 1.8em; }

.button-group {
    flex-direction: column;
}

.btn {
    min-width: 100%;
}

.product-item {
    flex-direction: column;
    align-items: flex-start;
}

.product-actions {
    width: 100%;
    margin-top: 10px;
}

}

About

smartfridge

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published