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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    overflow: hidden;
}

header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 30px;
    text-align: center;
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 20px;
}

.user-section {
    margin-top: 15px;
}

.user-section label {
    font-size: 1rem;
    margin-right: 10px;
}

.user-section input {
    padding: 8px 15px;
    border: none;
    border-radius: 20px;
    font-size: 1rem;
    width: 200px;
}

main {
    padding: 30px;
}

/* Meal Ideas Section */
#ideas-section {
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 30px;
}

/* Meal Ideas Link Section */
.ideas-link {
    background: #f0f4ff;
    border: 2px solid #c7d2fe;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 30px;
    text-align: center;
}

.ideas-link h2 {
    color: #333;
    font-size: 1.5rem;
    margin-bottom: 10px;
}

.ideas-link p {
    color: #64748b;
    font-size: 1rem;
    margin: 0;
}

.ideas-link a {
    display: inline-block;
    margin-top: 5px;
    text-decoration: none;
}

#ideas-section h2 {
    color: #333;
    font-size: 1.5rem;
    margin-bottom: 15px;
}

#addIdeaForm {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

#ideaText {
    flex: 1;
    padding: 10px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
}

#ideaText:focus {
    outline: none;
    border-color: #667eea;
}

#ideasList {
    list-style: none;
    padding: 0;
    margin: 0;
}

.idea-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px;
    background: white;
    border-radius: 6px;
    margin-bottom: 8px;
    border-left: 3px solid #667eea;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.idea-text {
    flex: 1;
    margin-right: 12px;
    word-break: break-word;
    color: #1e293b;
    font-weight: 500;
}

.delete-idea {
    background: #ff6b6b;
    border: none;
    color: white;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.delete-idea:hover {
    background: #ff4b4b;
}

.no-ideas {
    color: #666;
    padding: 12px;
    text-align: center;
    font-style: italic;
}

.controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 15px;
}

.controls h2 {
    color: #333;
    font-size: 1.5rem;
}

.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.btn-primary {
    background: #667eea;
    color: white;
}

.btn-primary:hover {
    background: #5568d3;
}

.btn-secondary {
    background: #e0e7ff;
    color: #667eea;
}

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

.calendar {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 15px;
}

.day-card {
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    padding: 15px;
    min-height: 150px;
    transition: all 0.3s ease;
}

.day-card:hover {
    border-color: #667eea;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.15);
}

.day-card.today {
    border-color: #667eea;
    background: #f0f4ff;
}

.day-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e2e8f0;
}

.day-name {
    font-weight: bold;
    color: #667eea;
    font-size: 0.9rem;
}

.day-date {
    color: #64748b;
    font-size: 0.85rem;
}

.meals-list {
    margin-top: 10px;
}

.meal-item {
    background: white;
    padding: 10px;
    border-radius: 6px;
    margin-bottom: 8px;
    border-left: 3px solid #667eea;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.meal-info {
    flex: 1;
}

.meal-name {
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 4px;
}

.meal-by {
    font-size: 0.75rem;
    color: #64748b;
}

.delete-meal {
    background: #ef4444;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 4px 8px;
    cursor: pointer;
    font-size: 0.75rem;
    transition: all 0.2s ease;
}

.delete-meal:hover {
    background: #dc2626;
}

.add-meal-btn {
    width: 100%;
    padding: 8px;
    background: #e0e7ff;
    color: #667eea;
    border: 2px dashed #667eea;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.add-meal-btn:hover {
    background: #c7d2fe;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
}

.modal.show {
    display: flex;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background: white;
    padding: 30px;
    border-radius: 15px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.close {
    float: right;
    font-size: 28px;
    font-weight: bold;
    color: #aaa;
    cursor: pointer;
}

.close:hover {
    color: #000;
}

.modal h2 {
    color: #333;
    margin-bottom: 10px;
}

.modal-date {
    color: #667eea;
    font-weight: 600;
    margin-bottom: 20px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
}

.form-control {
    width: 100%;
    padding: 10px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
}

.form-control:focus {
    outline: none;
    border-color: #667eea;
}

.modal-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.modal-actions .btn {
    flex: 1;
}

/* Responsive Design */
@media (max-width: 768px) {
    .calendar {
        grid-template-columns: 1fr;
    }
    
    .controls {
        flex-direction: column;
    }
    
    header h1 {
        font-size: 1.8rem;
    }
}
