* {
    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;
    color: #333;
}

.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;
    position: relative;
}

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

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

.tabs {
    display: flex;
    background: #f5f5f5;
    border-bottom: 2px solid #e0e0e0;
}

.tab-btn {
    flex: 1;
    padding: 15px;
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 1em;
    font-weight: 500;
    transition: all 0.3s;
}

.tab-btn:hover {
    background: rgba(102, 126, 234, 0.1);
}

.tab-btn.active {
    background: white;
    color: #667eea;
    border-bottom: 3px solid #667eea;
}

.tab-content {
    display: none;
    padding: 30px;
}

.tab-content.active {
    display: block;
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.calendar-header button {
    padding: 10px 20px;
    border: none;
    background: #667eea;
    color: white;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1em;
    transition: background 0.3s;
}

.calendar-header button:hover {
    background: #5568d3;
}

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

.day-card {
    background: #f9f9f9;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    padding: 15px;
    min-height: 150px;
    transition: all 0.3s;
    cursor: pointer;
}

.day-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    border-color: #667eea;
}

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

.day-header {
    font-weight: 600;
    margin-bottom: 10px;
    color: #667eea;
}

.day-date {
    font-size: 0.9em;
    color: #666;
    margin-bottom: 10px;
}

.meal-item {
    background: white;
    padding: 8px;
    border-radius: 5px;
    margin-top: 8px;
    font-size: 0.9em;
    border-left: 3px solid #667eea;
}

.meal-item.has-guests {
    border-left-color: #e91e63;
}

.meal-name {
    font-weight: 500;
    color: #333;
}

.meal-guests {
    font-size: 0.8em;
    color: #e91e63;
    margin-top: 3px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.section-header h2 {
    color: #667eea;
}

.btn-primary {
    padding: 10px 20px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1em;
    transition: background 0.3s;
}

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

.btn-secondary {
    padding: 10px 20px;
    background: #ccc;
    color: #333;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1em;
    transition: background 0.3s;
}

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

.recipes-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.recipe-card {
    background: #f9f9f9;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    padding: 20px;
    transition: all 0.3s;
}

.recipe-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    border-color: #667eea;
}

.recipe-card h3 {
    color: #667eea;
    margin-bottom: 10px;
}

.recipe-card p {
    color: #666;
    margin-bottom: 10px;
    line-height: 1.5;
}

.recipe-card .recipe-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.recipe-card button {
    flex: 1;
    padding: 8px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.9em;
    transition: all 0.3s;
}

.recipe-card .btn-edit {
    background: #667eea;
    color: white;
}

.recipe-card .btn-edit:hover {
    background: #5568d3;
}

.recipe-card .btn-delete {
    background: #f44336;
    color: white;
}

.recipe-card .btn-delete:hover {
    background: #d32f2f;
}

.suggestions-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.suggestion-card {
    background: #f9f9f9;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    padding: 15px;
    transition: all 0.3s;
}

.suggestion-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.suggestion-card h4 {
    color: #667eea;
    margin-bottom: 8px;
}

.suggestion-meta {
    font-size: 0.85em;
    color: #666;
}

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

.modal.show {
    display: block;
}

.modal-content {
    background-color: white;
    margin: 50px auto;
    padding: 30px;
    border-radius: 10px;
    max-width: 600px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    position: relative;
}

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

.close:hover,
.close:focus {
    color: #000;
}

.modal-content h2 {
    color: #667eea;
    margin-bottom: 20px;
}

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

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

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px;
    border: 2px solid #e0e0e0;
    border-radius: 5px;
    font-size: 1em;
    font-family: inherit;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
}

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

.planner-section {
    margin-top: 20px;
}

.planner-section h3 {
    color: #667eea;
    margin-bottom: 15px;
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #999;
}

.empty-state-icon {
    font-size: 4em;
    margin-bottom: 20px;
}

@media (max-width: 768px) {
    .calendar-grid {
        grid-template-columns: 1fr;
    }
    
    .recipes-list {
        grid-template-columns: 1fr;
    }
    
    .suggestions-list {
        grid-template-columns: 1fr;
    }
}

/* Authentication UI */
#userMenu {
    position: absolute;
    top: 30px;
    right: 30px;
    display: flex;
    align-items: center;
    gap: 15px;
    color: white;
}

#userEmail {
    font-size: 0.9em;
    opacity: 0.9;
}

#logoutBtn {
    padding: 8px 15px;
    font-size: 0.9em;
}

#authRequired {
    padding: 4rem 2rem;
    text-align: center;
}

#authRequired h2 {
    margin-bottom: 1rem;
    color: #667eea;
}

#authRequired p {
    margin-bottom: 2rem;
    color: #666;
}

#loginStep2 {
    text-align: center;
}

#loginStep2 p {
    margin-bottom: 1rem;
}

#loginStep2 p:first-child {
    font-size: 1.2em;
    color: #28a745;
    margin-bottom: 0.5rem;
}

