* {
    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, #f5f7fa 0%, #c3cfe2 100%);
    min-height: 100vh;
    padding: 20px;
    color: #333;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    padding: 30px;
}

header {
    text-align: center;
    margin-bottom: 30px;
    border-bottom: 3px solid #4a90e2;
    padding-bottom: 20px;
}

header h1 {
    font-size: 2.5em;
    color: #4a90e2;
    margin-bottom: 10px;
}

header p {
    color: #666;
    font-size: 1.1em;
}

.controls {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    flex-wrap: wrap;
    justify-content: center;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-size: 1em;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
}

.btn-primary {
    background: #4a90e2;
    color: white;
}

.btn-primary:hover {
    background: #357abd;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(74, 144, 226, 0.4);
}

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

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

.planner {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 30px;
}

.week-planner {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
}

.day {
    background: #f9fafb;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    padding: 15px;
    transition: all 0.2s ease;
}

.day:hover {
    border-color: #4a90e2;
    box-shadow: 0 4px 8px rgba(74, 144, 226, 0.1);
}

.day h3 {
    color: #4a90e2;
    margin-bottom: 15px;
    font-size: 1.1em;
    text-align: center;
}

.meal {
    background: white;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 12px;
    margin-bottom: 12px;
    transition: all 0.2s ease;
}

.meal:hover {
    border-color: #4a90e2;
    background: #f0f4ff;
}

.meal-type {
    display: inline-block;
    background: #e8f0fe;
    color: #4a90e2;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.85em;
    font-weight: 600;
    margin-bottom: 8px;
}

.meal-content {
    min-height: 30px;
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.meal-content p {
    font-size: 0.9em;
    color: #333;
}

.meal-actions {
    display: flex;
    gap: 5px;
}

.recipe-select {
    width: 100%;
    padding: 6px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.85em;
    background: white;
    cursor: pointer;
    transition: border-color 0.2s;
}

.recipe-select:focus {
    outline: none;
    border-color: #4a90e2;
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.1);
}

.shopping-list {
    background: #f9fafb;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    padding: 20px;
    height: fit-content;
    position: sticky;
    top: 20px;
}

.shopping-list h2 {
    color: #4a90e2;
    margin-bottom: 15px;
    font-size: 1.1em;
}

.shopping-items {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.shopping-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 4px;
    font-size: 0.9em;
    transition: all 0.2s ease;
}

.shopping-item:hover {
    background: #f0f4ff;
    border-color: #4a90e2;
}

.shopping-checkbox {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #4a90e2;
}

/* Print styles */
@media print {
    body {
        background: white;
        padding: 0;
    }

    .container {
        box-shadow: none;
        padding: 20px;
    }

    .controls {
        display: none;
    }

    .planner {
        grid-template-columns: 1fr;
    }

    .shopping-list {
        position: static;
        margin-top: 30px;
        border-top: 3px solid #4a90e2;
        page-break-inside: avoid;
    }

    .day {
        page-break-inside: avoid;
    }

    .shopping-checkbox {
        accent-color: #333;
    }
}

/* Responsive design */
@media (max-width: 768px) {
    .container {
        padding: 20px;
    }

    header h1 {
        font-size: 1.8em;
    }

    .planner {
        grid-template-columns: 1fr;
    }

    .shopping-list {
        position: static;
    }

    .week-planner {
        grid-template-columns: 1fr;
    }

    .controls {
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 15px;
    }

    header {
        padding-bottom: 15px;
    }

    header h1 {
        font-size: 1.5em;
    }

    header p {
        font-size: 0.95em;
    }

    .week-planner {
        gap: 10px;
    }

    .day {
        padding: 10px;
    }

    .meal {
        margin-bottom: 8px;
        padding: 8px;
    }

    .shopping-list {
        padding: 15px;
    }
}
